a collection of lightweight TypeScript packages for AT Protocol, the protocol powering Bluesky
atproto bluesky typescript npm
101
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(standard-site): initial commit

Mary c8554728 4df5be94

+728
+1
README.md
··· 62 62 | [`microcosm`](./packages/definitions/microcosm): `blue.microcosm.*`, `com.bad-example.*` definitions | 63 63 | [`ozone`](./packages/definitions/ozone): `tools.ozone.*` definitions | 64 64 | [`pckt`](./packages/definitions/pckt): `blog.pckt.*` definitions | 65 + | [`standard-site`](./packages/definitions/standard-site): `site.standard.*` definitions | 65 66 | [`tangled`](./packages/definitions/tangled): `sh.tangled.*` definitions | 66 67 | [`whitewind`](./packages/definitions/whitewind): `com.whtwnd.*` definitions | 67 68 | **Identity packages** |
+1
packages/clients/client/README.md
··· 51 51 | [`@atcute/tangled`](../../definitions/tangled) | `sh.tangled.*` | 52 52 | [`@atcute/microcosm`](../../definitions/microcosm) | `blue.microcosm.*`, `com.bad-example.*` | 53 53 | [`@atcute/pckt`](../../definitions/pckt) | `blog.pckt.*` | 54 + | [`@atcute/standard-site`](../../definitions/standard-site) | `site.standard.*` | 54 55 | [`@atcute/lexicon-community`](../../definitions/lexicon-community) | `community.lexicon.*` | 55 56 56 57 you can register multiple packages to combine their types.
+62
packages/definitions/standard-site/README.md
··· 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 + ```
+19
packages/definitions/standard-site/lex.config.js
··· 1 + import { defineLexiconConfig } from '@atcute/lex-cli'; 2 + 3 + export default defineLexiconConfig({ 4 + files: ['lexicons/**/*.json'], 5 + outdir: 'lib/lexicons/', 6 + imports: ['@atcute/atproto'], 7 + 8 + pull: { 9 + outdir: 'lexicons/', 10 + clean: true, 11 + sources: [ 12 + { 13 + type: 'atproto', 14 + mode: 'authority', 15 + authority: 'standard.site', 16 + }, 17 + ], 18 + }, 19 + });
+5
packages/definitions/standard-site/lexicons/README.md
··· 1 + # lexicon sources 2 + 3 + this directory contains lexicon documents pulled from the following sources: 4 + 5 + - atproto (authority: standard.site)
+79
packages/definitions/standard-site/lexicons/site/standard/document.json
··· 1 + { 2 + "id": "site.standard.document", 3 + "defs": { 4 + "main": { 5 + "key": "tid", 6 + "type": "record", 7 + "record": { 8 + "type": "object", 9 + "required": ["site", "title", "publishedAt"], 10 + "properties": { 11 + "path": { 12 + "type": "string", 13 + "description": "Combine with site or publication url to construct a canonical URL to the document. Prepend with a leading slash." 14 + }, 15 + "site": { 16 + "type": "string", 17 + "format": "uri", 18 + "description": "Points to a publication record (at://) or a publication url (https://) for loose documents. Avoid trailing slashes." 19 + }, 20 + "tags": { 21 + "type": "array", 22 + "items": { 23 + "type": "string", 24 + "maxLength": 1280, 25 + "maxGraphemes": 128 26 + }, 27 + "description": "Array of strings used to tag or categorize the document. Avoid prepending tags with hashtags." 28 + }, 29 + "title": { 30 + "type": "string", 31 + "maxLength": 5000, 32 + "description": "Title of the document.", 33 + "maxGraphemes": 500 34 + }, 35 + "content": { 36 + "refs": [], 37 + "type": "union", 38 + "closed": false, 39 + "description": "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." 40 + }, 41 + "updatedAt": { 42 + "type": "string", 43 + "format": "datetime", 44 + "description": "Timestamp of the documents last edit." 45 + }, 46 + "coverImage": { 47 + "type": "blob", 48 + "accept": ["image/*"], 49 + "maxSize": 1000000, 50 + "description": "Image to used for thumbnail or cover image. Less than 1MB is size." 51 + }, 52 + "bskyPostRef": { 53 + "ref": "com.atproto.repo.strongRef", 54 + "type": "ref", 55 + "description": "Strong reference to a Bluesky post. Useful to keep track of comments off-platform." 56 + }, 57 + "description": { 58 + "type": "string", 59 + "maxLength": 30000, 60 + "description": "A brief description or excerpt from the document.", 61 + "maxGraphemes": 3000 62 + }, 63 + "publishedAt": { 64 + "type": "string", 65 + "format": "datetime", 66 + "description": "Timestamp of the documents publish time." 67 + }, 68 + "textContent": { 69 + "type": "string", 70 + "description": "Plaintext representation of the documents contents. Should not contain markdown or other formatting." 71 + } 72 + } 73 + }, 74 + "description": "A document record representing a published article, blog post, or other content. Documents can belong to a publication or exist independently." 75 + } 76 + }, 77 + "$type": "com.atproto.lexicon.schema", 78 + "lexicon": 1 79 + }
+23
packages/definitions/standard-site/lexicons/site/standard/graph/subscription.json
··· 1 + { 2 + "id": "site.standard.graph.subscription", 3 + "defs": { 4 + "main": { 5 + "key": "tid", 6 + "type": "record", 7 + "record": { 8 + "type": "object", 9 + "required": ["publication"], 10 + "properties": { 11 + "publication": { 12 + "type": "string", 13 + "format": "at-uri", 14 + "description": "AT-URI reference to the publication record being subscribed to (ex: at://did:plc:abc123/site.standard.publication/xyz789)." 15 + } 16 + } 17 + }, 18 + "description": "Record declaring a subscription to a publication" 19 + } 20 + }, 21 + "$type": "com.atproto.lexicon.schema", 22 + "lexicon": 1 23 + }
+62
packages/definitions/standard-site/lexicons/site/standard/publication.json
··· 1 + { 2 + "id": "site.standard.publication", 3 + "defs": { 4 + "main": { 5 + "key": "tid", 6 + "type": "record", 7 + "record": { 8 + "type": "object", 9 + "required": ["url", "name"], 10 + "properties": { 11 + "url": { 12 + "type": "string", 13 + "format": "uri", 14 + "description": "Base publication url (ex: https://standard.site). The canonical document URL is formed by combining this value with the document path." 15 + }, 16 + "icon": { 17 + "type": "blob", 18 + "accept": ["image/*"], 19 + "maxSize": 1000000, 20 + "description": "Square image to identify the publication. Should be at least 256x256." 21 + }, 22 + "name": { 23 + "type": "string", 24 + "maxLength": 5000, 25 + "description": "Name of the publication.", 26 + "maxGraphemes": 500 27 + }, 28 + "basicTheme": { 29 + "ref": "site.standard.theme.basic", 30 + "type": "ref", 31 + "description": "Simplified publication theme for tools and apps to utilize when displaying content." 32 + }, 33 + "description": { 34 + "type": "string", 35 + "maxLength": 30000, 36 + "description": "Brief description of the publication.", 37 + "maxGraphemes": 3000 38 + }, 39 + "preferences": { 40 + "ref": "#preferences", 41 + "type": "ref", 42 + "description": "Object containing platform specific preferences (with a few shared properties)." 43 + } 44 + } 45 + }, 46 + "description": "A publication record representing a blog, website, or content platform. Publications serve as containers for documents and define the overall branding and settings." 47 + }, 48 + "preferences": { 49 + "type": "object", 50 + "properties": { 51 + "showInDiscover": { 52 + "type": "boolean", 53 + "default": true, 54 + "description": "Boolean which decides whether the publication should appear in discovery feeds." 55 + } 56 + }, 57 + "description": "Platform-specific preferences for the publication, including discovery and visibility settings." 58 + } 59 + }, 60 + "$type": "com.atproto.lexicon.schema", 61 + "lexicon": 1 62 + }
+34
packages/definitions/standard-site/lexicons/site/standard/theme/basic.json
··· 1 + { 2 + "id": "site.standard.theme.basic", 3 + "defs": { 4 + "main": { 5 + "type": "object", 6 + "required": ["background", "foreground", "accent", "accentForeground"], 7 + "properties": { 8 + "accent": { 9 + "refs": ["site.standard.theme.color#rgb"], 10 + "type": "union", 11 + "description": "Color used for links and button backgrounds." 12 + }, 13 + "background": { 14 + "refs": ["site.standard.theme.color#rgb"], 15 + "type": "union", 16 + "description": "Color used for content background." 17 + }, 18 + "foreground": { 19 + "refs": ["site.standard.theme.color#rgb"], 20 + "type": "union", 21 + "description": "Color used for content text." 22 + }, 23 + "accentForeground": { 24 + "refs": ["site.standard.theme.color#rgb"], 25 + "type": "union", 26 + "description": "Color used for button text." 27 + } 28 + }, 29 + "description": "A simplified theme definition for publications, providing basic color customization for content display across different platforms and applications." 30 + } 31 + }, 32 + "$type": "com.atproto.lexicon.schema", 33 + "lexicon": 1 34 + }
+54
packages/definitions/standard-site/lexicons/site/standard/theme/color.json
··· 1 + { 2 + "id": "site.standard.theme.color", 3 + "defs": { 4 + "rgb": { 5 + "type": "object", 6 + "required": ["r", "g", "b"], 7 + "properties": { 8 + "b": { 9 + "type": "integer", 10 + "maximum": 255, 11 + "minimum": 0 12 + }, 13 + "g": { 14 + "type": "integer", 15 + "maximum": 255, 16 + "minimum": 0 17 + }, 18 + "r": { 19 + "type": "integer", 20 + "maximum": 255, 21 + "minimum": 0 22 + } 23 + } 24 + }, 25 + "rgba": { 26 + "type": "object", 27 + "required": ["r", "g", "b", "a"], 28 + "properties": { 29 + "a": { 30 + "type": "integer", 31 + "maximum": 100, 32 + "minimum": 0 33 + }, 34 + "b": { 35 + "type": "integer", 36 + "maximum": 255, 37 + "minimum": 0 38 + }, 39 + "g": { 40 + "type": "integer", 41 + "maximum": 255, 42 + "minimum": 0 43 + }, 44 + "r": { 45 + "type": "integer", 46 + "maximum": 255, 47 + "minimum": 0 48 + } 49 + } 50 + } 51 + }, 52 + "$type": "com.atproto.lexicon.schema", 53 + "lexicon": 1 54 + }
+1
packages/definitions/standard-site/lib/index.ts
··· 1 + export * from './lexicons/index.js';
+5
packages/definitions/standard-site/lib/lexicons/index.ts
··· 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';
+94
packages/definitions/standard-site/lib/lexicons/types/site/standard/document.ts
··· 1 + import type {} from '@atcute/lexicons'; 2 + import * as v from '@atcute/lexicons/validations'; 3 + import type {} from '@atcute/lexicons/ambient'; 4 + import * as ComAtprotoRepoStrongRef from '@atcute/atproto/types/repo/strongRef'; 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 + */ 54 + tags: /*#__PURE__*/ v.optional( 55 + /*#__PURE__*/ v.array( 56 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 57 + /*#__PURE__*/ v.stringLength(0, 1280), 58 + /*#__PURE__*/ v.stringGraphemes(0, 128), 59 + ]), 60 + ), 61 + ), 62 + /** 63 + * Plaintext representation of the documents contents. Should not contain markdown or other formatting. 64 + */ 65 + textContent: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 66 + /** 67 + * Title of the document. 68 + * @maxLength 5000 69 + * @maxGraphemes 500 70 + */ 71 + title: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 72 + /*#__PURE__*/ v.stringLength(0, 5000), 73 + /*#__PURE__*/ v.stringGraphemes(0, 500), 74 + ]), 75 + /** 76 + * Timestamp of the documents last edit. 77 + */ 78 + updatedAt: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.datetimeString()), 79 + }), 80 + ); 81 + 82 + type main$schematype = typeof _mainSchema; 83 + 84 + export interface mainSchema extends main$schematype {} 85 + 86 + export const mainSchema = _mainSchema as mainSchema; 87 + 88 + export interface Main extends v.InferInput<typeof mainSchema> {} 89 + 90 + declare module '@atcute/lexicons/ambient' { 91 + interface Records { 92 + 'site.standard.document': mainSchema; 93 + } 94 + }
+28
packages/definitions/standard-site/lib/lexicons/types/site/standard/graph/subscription.ts
··· 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('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 + }
+79
packages/definitions/standard-site/lib/lexicons/types/site/standard/publication.ts
··· 1 + import type {} from '@atcute/lexicons'; 2 + import * as v from '@atcute/lexicons/validations'; 3 + import type {} from '@atcute/lexicons/ambient'; 4 + import * as SiteStandardThemeBasic from './theme/basic.js'; 5 + 6 + const _mainSchema = /*#__PURE__*/ v.record( 7 + /*#__PURE__*/ v.tidString(), 8 + /*#__PURE__*/ v.object({ 9 + $type: /*#__PURE__*/ v.literal('site.standard.publication'), 10 + /** 11 + * Simplified publication theme for tools and apps to utilize when displaying content. 12 + */ 13 + get basicTheme() { 14 + return /*#__PURE__*/ v.optional(SiteStandardThemeBasic.mainSchema); 15 + }, 16 + /** 17 + * Brief description of the publication. 18 + * @maxLength 30000 19 + * @maxGraphemes 3000 20 + */ 21 + description: /*#__PURE__*/ v.optional( 22 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 23 + /*#__PURE__*/ v.stringLength(0, 30000), 24 + /*#__PURE__*/ v.stringGraphemes(0, 3000), 25 + ]), 26 + ), 27 + /** 28 + * Square image to identify the publication. Should be at least 256x256. 29 + * @accept image/* 30 + * @maxSize 1000000 31 + */ 32 + icon: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.blob()), 33 + /** 34 + * Name of the publication. 35 + * @maxLength 5000 36 + * @maxGraphemes 500 37 + */ 38 + name: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 39 + /*#__PURE__*/ v.stringLength(0, 5000), 40 + /*#__PURE__*/ v.stringGraphemes(0, 500), 41 + ]), 42 + /** 43 + * Object containing platform specific preferences (with a few shared properties). 44 + */ 45 + get preferences() { 46 + return /*#__PURE__*/ v.optional(preferencesSchema); 47 + }, 48 + /** 49 + * Base publication url (ex: https://standard.site). The canonical document URL is formed by combining this value with the document path. 50 + */ 51 + url: /*#__PURE__*/ v.genericUriString(), 52 + }), 53 + ); 54 + const _preferencesSchema = /*#__PURE__*/ v.object({ 55 + $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('site.standard.publication#preferences')), 56 + /** 57 + * Boolean which decides whether the publication should appear in discovery feeds. 58 + * @default true 59 + */ 60 + showInDiscover: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.boolean(), true), 61 + }); 62 + 63 + type main$schematype = typeof _mainSchema; 64 + type preferences$schematype = typeof _preferencesSchema; 65 + 66 + export interface mainSchema extends main$schematype {} 67 + export interface preferencesSchema extends preferences$schematype {} 68 + 69 + export const mainSchema = _mainSchema as mainSchema; 70 + export const preferencesSchema = _preferencesSchema as preferencesSchema; 71 + 72 + export interface Main extends v.InferInput<typeof mainSchema> {} 73 + export interface Preferences extends v.InferInput<typeof preferencesSchema> {} 74 + 75 + declare module '@atcute/lexicons/ambient' { 76 + interface Records { 77 + 'site.standard.publication': mainSchema; 78 + } 79 + }
+39
packages/definitions/standard-site/lib/lexicons/types/site/standard/theme/basic.ts
··· 1 + import type {} from '@atcute/lexicons'; 2 + import * as v from '@atcute/lexicons/validations'; 3 + import * as SiteStandardThemeColor from './color.js'; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.object({ 6 + $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('site.standard.theme.basic')), 7 + /** 8 + * Color used for links and button backgrounds. 9 + */ 10 + get accent() { 11 + return /*#__PURE__*/ v.variant([SiteStandardThemeColor.rgbSchema]); 12 + }, 13 + /** 14 + * Color used for button text. 15 + */ 16 + get accentForeground() { 17 + return /*#__PURE__*/ v.variant([SiteStandardThemeColor.rgbSchema]); 18 + }, 19 + /** 20 + * Color used for content background. 21 + */ 22 + get background() { 23 + return /*#__PURE__*/ v.variant([SiteStandardThemeColor.rgbSchema]); 24 + }, 25 + /** 26 + * Color used for content text. 27 + */ 28 + get foreground() { 29 + return /*#__PURE__*/ v.variant([SiteStandardThemeColor.rgbSchema]); 30 + }, 31 + }); 32 + 33 + type main$schematype = typeof _mainSchema; 34 + 35 + export interface mainSchema extends main$schematype {} 36 + 37 + export const mainSchema = _mainSchema as mainSchema; 38 + 39 + export interface Main extends v.InferInput<typeof mainSchema> {}
+56
packages/definitions/standard-site/lib/lexicons/types/site/standard/theme/color.ts
··· 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> {}
+50
packages/definitions/standard-site/package.json
··· 1 + { 2 + "type": "module", 3 + "name": "@atcute/standard-site", 4 + "version": "0.0.0", 5 + "description": "standard.site (site.standard.*) schema definitions", 6 + "keywords": [ 7 + "atcute", 8 + "atproto", 9 + "standard.site" 10 + ], 11 + "license": "0BSD", 12 + "repository": { 13 + "url": "https://github.com/mary-ext/atcute", 14 + "directory": "packages/definitions/standard-site" 15 + }, 16 + "publishConfig": { 17 + "access": "public" 18 + }, 19 + "files": [ 20 + "dist/", 21 + "lib/", 22 + "!lib/**/*.bench.ts", 23 + "!lib/**/*.test.ts" 24 + ], 25 + "exports": { 26 + ".": "./dist/index.js", 27 + "./types/*": "./dist/lexicons/types/site/standard/*.js" 28 + }, 29 + "scripts": { 30 + "build": "tsgo", 31 + "pull": "lex-cli pull", 32 + "generate": "rm -r ./lib/lexicons/; lex-cli generate", 33 + "prepublish": "rm -rf dist; pnpm run build" 34 + }, 35 + "dependencies": { 36 + "@atcute/atproto": "workspace:^", 37 + "@atcute/lexicons": "workspace:^" 38 + }, 39 + "devDependencies": { 40 + "@atcute/lex-cli": "workspace:^" 41 + }, 42 + "atcute:lexicons": { 43 + "mappings": { 44 + "site.standard.*": { 45 + "type": "namespace", 46 + "path": "./types/{{nsid_remainder}}" 47 + } 48 + } 49 + } 50 + }
+23
packages/definitions/standard-site/tsconfig.json
··· 1 + { 2 + "compilerOptions": { 3 + "outDir": "dist/", 4 + "esModuleInterop": true, 5 + "skipLibCheck": true, 6 + "target": "ESNext", 7 + "allowJs": true, 8 + "resolveJsonModule": true, 9 + "moduleDetection": "force", 10 + "isolatedModules": true, 11 + "verbatimModuleSyntax": true, 12 + "strict": true, 13 + "noImplicitOverride": true, 14 + "noUnusedLocals": true, 15 + "noUnusedParameters": true, 16 + "noFallthroughCasesInSwitch": true, 17 + "module": "NodeNext", 18 + "sourceMap": true, 19 + "declaration": true, 20 + "declarationMap": true 21 + }, 22 + "include": ["lib"] 23 + }
+13
pnpm-lock.yaml
··· 398 398 specifier: workspace:^ 399 399 version: link:../../lexicons/lex-cli 400 400 401 + packages/definitions/standard-site: 402 + dependencies: 403 + '@atcute/atproto': 404 + specifier: workspace:^ 405 + version: link:../atproto 406 + '@atcute/lexicons': 407 + specifier: workspace:^ 408 + version: link:../../lexicons/lexicons 409 + devDependencies: 410 + '@atcute/lex-cli': 411 + specifier: workspace:^ 412 + version: link:../../lexicons/lex-cli 413 + 401 414 packages/definitions/tangled: 402 415 dependencies: 403 416 '@atcute/atproto':