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.

chore(pckt): pull latest pckt lexicons

Mary 490a2230 f0c08444

+359 -462
+5
.changeset/easy-cats-hear.md
··· 1 + --- 2 + '@atcute/pckt': patch 3 + --- 4 + 5 + pull latest pckt lexicons
+3 -3
packages/definitions/pckt/lexicons/blog/pckt/block/blockquote.json
··· 8 8 "content": { 9 9 "type": "array", 10 10 "items": { 11 - "refs": ["blog.pckt.block.paragraph"], 11 + "refs": ["blog.pckt.block.text"], 12 12 "type": "union", 13 13 "closed": false 14 14 }, 15 - "description": "Array of paragraph content" 15 + "description": "Array of text blocks" 16 16 } 17 17 } 18 18 } 19 19 }, 20 20 "$type": "com.atproto.lexicon.schema", 21 21 "lexicon": 1, 22 - "description": "Blockquote for quoted text or citations. Typically rendered with distinct visual styling to set quoted content apart from the main text." 22 + "description": "Blockquote for quoted text or citations. Contains text blocks." 23 23 }
+8 -22
packages/definitions/pckt/lexicons/blog/pckt/block/codeBlock.json
··· 3 3 "defs": { 4 4 "main": { 5 5 "type": "object", 6 - "properties": { 7 - "attrs": { 8 - "ref": "#codeBlockAttrs", 9 - "type": "ref", 10 - "description": "Code block attributes" 11 - }, 12 - "content": { 13 - "type": "array", 14 - "items": { 15 - "ref": "blog.pckt.block.text", 16 - "type": "ref" 17 - }, 18 - "description": "Array of text nodes containing the code" 19 - } 20 - } 21 - }, 22 - "codeBlockAttrs": { 23 - "type": "object", 6 + "required": ["plaintext"], 24 7 "properties": { 25 8 "language": { 26 9 "type": "string", 27 10 "maxLength": 50, 28 - "description": "Programming language for syntax highlighting (e.g., 'javascript', 'python', 'php')" 11 + "description": "Programming language for syntax highlighting" 12 + }, 13 + "plaintext": { 14 + "type": "string", 15 + "description": "The code content" 29 16 } 30 - }, 31 - "description": "Code block attributes" 17 + } 32 18 } 33 19 }, 34 20 "$type": "com.atproto.lexicon.schema", 35 21 "lexicon": 1, 36 - "description": "Preformatted code block with optional syntax highlighting. Preserves whitespace and displays code in a monospace font." 22 + "description": "Preformatted code block with optional syntax highlighting." 37 23 }
+15 -24
packages/definitions/pckt/lexicons/blog/pckt/block/heading.json
··· 3 3 "defs": { 4 4 "main": { 5 5 "type": "object", 6 - "required": ["attrs"], 6 + "required": ["plaintext"], 7 7 "properties": { 8 - "attrs": { 9 - "ref": "#headingAttrs", 10 - "type": "ref", 11 - "description": "Heading attributes" 8 + "level": { 9 + "type": "integer", 10 + "maximum": 6, 11 + "minimum": 1, 12 + "description": "Heading level from 1 (most important) to 6 (least important)" 12 13 }, 13 - "content": { 14 + "facets": { 14 15 "type": "array", 15 16 "items": { 16 - "refs": ["blog.pckt.block.text", "blog.pckt.block.hardBreak"], 17 - "type": "union", 18 - "closed": false 17 + "ref": "blog.pckt.richtext.facet", 18 + "type": "ref" 19 19 }, 20 - "description": "Inline content of the heading (text with optional formatting)" 20 + "description": "Facets for text formatting and features" 21 + }, 22 + "plaintext": { 23 + "type": "string", 24 + "description": "The plain text content of the heading" 21 25 } 22 26 } 23 - }, 24 - "headingAttrs": { 25 - "type": "object", 26 - "required": ["level"], 27 - "properties": { 28 - "level": { 29 - "type": "integer", 30 - "maximum": 6, 31 - "minimum": 1, 32 - "description": "Heading level from 1 (most important) to 6 (least important)" 33 - } 34 - }, 35 - "description": "Heading attributes" 36 27 } 37 28 }, 38 29 "$type": "com.atproto.lexicon.schema", 39 30 "lexicon": 1, 40 - "description": "A heading block with hierarchical levels (H1-H6). Headings provide document structure and semantic meaning for accessibility and navigation." 31 + "description": "A heading block with hierarchical levels (1-6) for document structure." 41 32 }
+3 -7
packages/definitions/pckt/lexicons/blog/pckt/block/listItem.json
··· 8 8 "content": { 9 9 "type": "array", 10 10 "items": { 11 - "refs": [ 12 - "blog.pckt.block.paragraph", 13 - "blog.pckt.block.bulletList", 14 - "blog.pckt.block.orderedList" 15 - ], 11 + "refs": ["blog.pckt.block.text", "blog.pckt.block.bulletList", "blog.pckt.block.orderedList"], 16 12 "type": "union", 17 13 "closed": false 18 14 }, 19 - "description": "Array of block content (paragraphs or nested lists)" 15 + "description": "Array of block content (text or nested lists)" 20 16 } 21 17 } 22 18 } 23 19 }, 24 20 "$type": "com.atproto.lexicon.schema", 25 21 "lexicon": 1, 26 - "description": "List item within ordered or unordered lists. Can contain paragraphs and nested lists." 22 + "description": "List item within ordered or unordered lists. Can contain text blocks and nested lists." 27 23 }
+7 -1
packages/definitions/pckt/lexicons/blog/pckt/block/mention.json
··· 3 3 "defs": { 4 4 "main": { 5 5 "type": "object", 6 - "required": ["did"], 6 + "required": ["did", "handle"], 7 7 "properties": { 8 8 "did": { 9 9 "type": "string", 10 10 "format": "did", 11 11 "description": "The DID of the mentioned user (e.g., did:plc:abc123xyz). This is the canonical reference that persists even if the user changes their handle, following app.bsky.richtext.facet#mention" 12 + }, 13 + "handle": { 14 + "type": "string", 15 + "format": "handle", 16 + "maxLength": 253, 17 + "description": "The handle of the mentioned user at the time of mention (e.g., alice.bsky.social). Used for display text and byte offset calculation in facets." 12 18 } 13 19 } 14 20 }
+5 -16
packages/definitions/pckt/lexicons/blog/pckt/block/orderedList.json
··· 5 5 "type": "object", 6 6 "required": ["content"], 7 7 "properties": { 8 - "attrs": { 9 - "ref": "#orderedListAttrs", 10 - "type": "ref", 11 - "description": "Optional attributes for the ordered list" 8 + "start": { 9 + "type": "integer", 10 + "minimum": 1, 11 + "description": "Starting number for the ordered list (default: 1)" 12 12 }, 13 13 "content": { 14 14 "type": "array", ··· 19 19 "description": "Array of list items" 20 20 } 21 21 } 22 - }, 23 - "orderedListAttrs": { 24 - "type": "object", 25 - "properties": { 26 - "start": { 27 - "type": "integer", 28 - "minimum": 1, 29 - "description": "Starting number for the ordered list" 30 - } 31 - }, 32 - "description": "Ordered list attributes" 33 22 } 34 23 }, 35 24 "$type": "com.atproto.lexicon.schema", 36 25 "lexicon": 1, 37 - "description": "Ordered numbered list. Each item can contain rich content including nested lists. Numbering can start at any positive integer." 26 + "description": "Ordered numbered list. Each item can contain rich content including nested lists." 38 27 }
+8
packages/definitions/pckt/lexicons/blog/pckt/block/paragraph.json
··· 4 4 "main": { 5 5 "type": "object", 6 6 "properties": { 7 + "facets": { 8 + "type": "array", 9 + "items": { 10 + "ref": "blog.pckt.richtext.facet", 11 + "type": "ref" 12 + }, 13 + "description": "Facets for text formatting and features within this paragraph" 14 + }, 7 15 "content": { 8 16 "type": "array", 9 17 "items": {
+7 -19
packages/definitions/pckt/lexicons/blog/pckt/block/taskItem.json
··· 3 3 "defs": { 4 4 "main": { 5 5 "type": "object", 6 - "required": ["attrs", "content"], 6 + "required": ["checked", "content"], 7 7 "properties": { 8 - "attrs": { 9 - "ref": "#taskItemAttrs", 10 - "type": "ref", 11 - "description": "Task item attributes" 8 + "checked": { 9 + "type": "boolean", 10 + "description": "Whether the task is completed" 12 11 }, 13 12 "content": { 14 13 "type": "array", 15 14 "items": { 16 - "refs": ["blog.pckt.block.paragraph"], 15 + "refs": ["blog.pckt.block.text"], 17 16 "type": "union", 18 17 "closed": false 19 18 }, 20 - "description": "Array of paragraph content" 19 + "description": "Array of text blocks" 21 20 } 22 21 } 23 - }, 24 - "taskItemAttrs": { 25 - "type": "object", 26 - "required": ["checked"], 27 - "properties": { 28 - "checked": { 29 - "type": "boolean", 30 - "description": "Whether the task is checked or unchecked" 31 - } 32 - }, 33 - "description": "Task item attributes" 34 22 } 35 23 }, 36 24 "$type": "com.atproto.lexicon.schema", 37 25 "lexicon": 1, 38 - "description": "Individual task item with checkbox state. Contains rich text content that describes the task." 26 + "description": "Individual task item with checkbox state." 39 27 }
+10 -20
packages/definitions/pckt/lexicons/blog/pckt/block/text.json
··· 3 3 "defs": { 4 4 "main": { 5 5 "type": "object", 6 - "required": ["text"], 6 + "required": ["plaintext"], 7 7 "properties": { 8 - "text": { 9 - "type": "string", 10 - "maxLength": 10000, 11 - "description": "The actual text content", 12 - "maxGraphemes": 5000 13 - }, 14 - "marks": { 8 + "facets": { 15 9 "type": "array", 16 10 "items": { 17 - "refs": [ 18 - "blog.pckt.mark.bold", 19 - "blog.pckt.mark.italic", 20 - "blog.pckt.mark.underline", 21 - "blog.pckt.mark.strike", 22 - "blog.pckt.mark.code", 23 - "blog.pckt.mark.link" 24 - ], 25 - "type": "union", 26 - "closed": false 11 + "ref": "blog.pckt.richtext.facet", 12 + "type": "ref" 27 13 }, 28 - "description": "Optional array of formatting marks applied to this text (bold, italic, links, etc.)" 14 + "description": "Facets for text formatting and features" 15 + }, 16 + "plaintext": { 17 + "type": "string", 18 + "description": "The plain text content" 29 19 } 30 20 } 31 21 } 32 22 }, 33 23 "$type": "com.atproto.lexicon.schema", 34 24 "lexicon": 1, 35 - "description": "An inline text node with optional formatting marks. Text nodes are the leaf nodes containing actual textual content within paragraphs and other container blocks." 25 + "description": "A text block containing plain text content with optional formatting via facets." 36 26 }
-12
packages/definitions/pckt/lexicons/blog/pckt/mark/bold.json
··· 1 - { 2 - "id": "blog.pckt.mark.bold", 3 - "defs": { 4 - "main": { 5 - "type": "object", 6 - "required": [], 7 - "properties": {} 8 - } 9 - }, 10 - "$type": "com.atproto.lexicon.schema", 11 - "lexicon": 1 12 - }
-12
packages/definitions/pckt/lexicons/blog/pckt/mark/code.json
··· 1 - { 2 - "id": "blog.pckt.mark.code", 3 - "defs": { 4 - "main": { 5 - "type": "object", 6 - "required": [], 7 - "properties": {} 8 - } 9 - }, 10 - "$type": "com.atproto.lexicon.schema", 11 - "lexicon": 1 12 - }
-12
packages/definitions/pckt/lexicons/blog/pckt/mark/italic.json
··· 1 - { 2 - "id": "blog.pckt.mark.italic", 3 - "defs": { 4 - "main": { 5 - "type": "object", 6 - "required": [], 7 - "properties": {} 8 - } 9 - }, 10 - "$type": "com.atproto.lexicon.schema", 11 - "lexicon": 1 12 - }
-47
packages/definitions/pckt/lexicons/blog/pckt/mark/link.json
··· 1 - { 2 - "id": "blog.pckt.mark.link", 3 - "defs": { 4 - "main": { 5 - "type": "object", 6 - "required": ["attrs"], 7 - "properties": { 8 - "attrs": { 9 - "ref": "#linkAttrs", 10 - "type": "ref", 11 - "description": "Link attributes that define the hyperlink behavior and destination" 12 - } 13 - } 14 - }, 15 - "linkAttrs": { 16 - "type": "object", 17 - "required": ["href"], 18 - "properties": { 19 - "rel": { 20 - "type": "string", 21 - "maxLength": 100, 22 - "description": "Defines the relationship between the current document and the linked resource (e.g., nofollow, noopener)" 23 - }, 24 - "href": { 25 - "type": "string", 26 - "format": "uri", 27 - "maxLength": 2000, 28 - "description": "The URL destination of the hyperlink" 29 - }, 30 - "title": { 31 - "type": "string", 32 - "maxLength": 500, 33 - "description": "Additional information about the link, typically shown as a tooltip on hover" 34 - }, 35 - "target": { 36 - "type": "string", 37 - "maxLength": 50, 38 - "description": "Specifies where to open the linked document (e.g., _blank, _self)" 39 - } 40 - }, 41 - "description": "Link attributes" 42 - } 43 - }, 44 - "$type": "com.atproto.lexicon.schema", 45 - "lexicon": 1, 46 - "description": "Hyperlink formatting. Creates a clickable link to an external or internal resource." 47 - }
-12
packages/definitions/pckt/lexicons/blog/pckt/mark/strike.json
··· 1 - { 2 - "id": "blog.pckt.mark.strike", 3 - "defs": { 4 - "main": { 5 - "type": "object", 6 - "required": [], 7 - "properties": {} 8 - } 9 - }, 10 - "$type": "com.atproto.lexicon.schema", 11 - "lexicon": 1 12 - }
-12
packages/definitions/pckt/lexicons/blog/pckt/mark/underline.json
··· 1 - { 2 - "id": "blog.pckt.mark.underline", 3 - "defs": { 4 - "main": { 5 - "type": "object", 6 - "required": [], 7 - "properties": {} 8 - } 9 - }, 10 - "$type": "com.atproto.lexicon.schema", 11 - "lexicon": 1 12 - }
+116
packages/definitions/pckt/lexicons/blog/pckt/richtext/facet.json
··· 1 + { 2 + "id": "blog.pckt.richtext.facet", 3 + "defs": { 4 + "id": { 5 + "type": "object", 6 + "properties": { 7 + "id": { 8 + "type": "string" 9 + } 10 + }, 11 + "description": "Facet feature for an identifier. Used for linking to a segment" 12 + }, 13 + "bold": { 14 + "type": "object", 15 + "description": "Facet feature for bold text" 16 + }, 17 + "code": { 18 + "type": "object", 19 + "description": "Facet feature for inline code" 20 + }, 21 + "link": { 22 + "type": "object", 23 + "required": ["uri"], 24 + "properties": { 25 + "uri": { 26 + "type": "string" 27 + } 28 + }, 29 + "description": "Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL." 30 + }, 31 + "main": { 32 + "type": "object", 33 + "required": ["index", "features"], 34 + "properties": { 35 + "index": { 36 + "ref": "#byteSlice", 37 + "type": "ref" 38 + }, 39 + "features": { 40 + "type": "array", 41 + "items": { 42 + "refs": [ 43 + "#link", 44 + "#didMention", 45 + "#atMention", 46 + "#code", 47 + "#highlight", 48 + "#underline", 49 + "#strikethrough", 50 + "#id", 51 + "#bold", 52 + "#italic" 53 + ], 54 + "type": "union" 55 + } 56 + } 57 + } 58 + }, 59 + "italic": { 60 + "type": "object", 61 + "description": "Facet feature for italic text" 62 + }, 63 + "atMention": { 64 + "type": "object", 65 + "required": ["atURI"], 66 + "properties": { 67 + "atURI": { 68 + "type": "string", 69 + "format": "uri" 70 + } 71 + }, 72 + "description": "Facet feature for mentioning an AT URI" 73 + }, 74 + "byteSlice": { 75 + "type": "object", 76 + "required": ["byteStart", "byteEnd"], 77 + "properties": { 78 + "byteEnd": { 79 + "type": "integer", 80 + "minimum": 0 81 + }, 82 + "byteStart": { 83 + "type": "integer", 84 + "minimum": 0 85 + } 86 + }, 87 + "description": "Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text." 88 + }, 89 + "highlight": { 90 + "type": "object", 91 + "description": "Facet feature for highlighted text" 92 + }, 93 + "underline": { 94 + "type": "object", 95 + "description": "Facet feature for underline markup" 96 + }, 97 + "didMention": { 98 + "type": "object", 99 + "required": ["did"], 100 + "properties": { 101 + "did": { 102 + "type": "string", 103 + "format": "did" 104 + } 105 + }, 106 + "description": "Facet feature for mentioning a DID" 107 + }, 108 + "strikethrough": { 109 + "type": "object", 110 + "description": "Facet feature for strikethrough markup" 111 + } 112 + }, 113 + "$type": "com.atproto.lexicon.schema", 114 + "lexicon": 1, 115 + "description": "Annotation of a sub-string within rich text." 116 + }
+1 -6
packages/definitions/pckt/lib/lexicons/index.ts
··· 16 16 export * as BlogPcktBlockText from './types/blog/pckt/block/text.js'; 17 17 export * as BlogPcktBlockWebsite from './types/blog/pckt/block/website.js'; 18 18 export * as BlogPcktDocument from './types/blog/pckt/document.js'; 19 - export * as BlogPcktMarkBold from './types/blog/pckt/mark/bold.js'; 20 - export * as BlogPcktMarkCode from './types/blog/pckt/mark/code.js'; 21 - export * as BlogPcktMarkItalic from './types/blog/pckt/mark/italic.js'; 22 - export * as BlogPcktMarkLink from './types/blog/pckt/mark/link.js'; 23 - export * as BlogPcktMarkStrike from './types/blog/pckt/mark/strike.js'; 24 - export * as BlogPcktMarkUnderline from './types/blog/pckt/mark/underline.js'; 25 19 export * as BlogPcktPublication from './types/blog/pckt/publication.js'; 20 + export * as BlogPcktRichtextFacet from './types/blog/pckt/richtext/facet.js'; 26 21 export * as BlogPcktTheme from './types/blog/pckt/theme.js';
+3 -3
packages/definitions/pckt/lib/lexicons/types/blog/pckt/block/blockquote.ts
··· 1 1 import type {} from '@atcute/lexicons'; 2 2 import * as v from '@atcute/lexicons/validations'; 3 - import * as BlogPcktBlockParagraph from './paragraph.js'; 3 + import * as BlogPcktBlockText from './text.js'; 4 4 5 5 const _mainSchema = /*#__PURE__*/ v.object({ 6 6 $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('blog.pckt.block.blockquote')), 7 7 /** 8 - * Array of paragraph content 8 + * Array of text blocks 9 9 */ 10 10 get content() { 11 - return /*#__PURE__*/ v.array(/*#__PURE__*/ v.variant([BlogPcktBlockParagraph.mainSchema])); 11 + return /*#__PURE__*/ v.array(/*#__PURE__*/ v.variant([BlogPcktBlockText.mainSchema])); 12 12 }, 13 13 }); 14 14
+5 -21
packages/definitions/pckt/lib/lexicons/types/blog/pckt/block/codeBlock.ts
··· 1 1 import type {} from '@atcute/lexicons'; 2 2 import * as v from '@atcute/lexicons/validations'; 3 - import * as BlogPcktBlockText from './text.js'; 4 3 5 - const _codeBlockAttrsSchema = /*#__PURE__*/ v.object({ 6 - $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('blog.pckt.block.codeBlock#codeBlockAttrs')), 4 + const _mainSchema = /*#__PURE__*/ v.object({ 5 + $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('blog.pckt.block.codeBlock')), 7 6 /** 8 - * Programming language for syntax highlighting (e.g., 'javascript', 'python', 'php') 7 + * Programming language for syntax highlighting 9 8 * @maxLength 50 10 9 */ 11 10 language: /*#__PURE__*/ v.optional( 12 11 /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [/*#__PURE__*/ v.stringLength(0, 50)]), 13 12 ), 14 - }); 15 - const _mainSchema = /*#__PURE__*/ v.object({ 16 - $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('blog.pckt.block.codeBlock')), 17 13 /** 18 - * Code block attributes 19 - */ 20 - get attrs() { 21 - return /*#__PURE__*/ v.optional(codeBlockAttrsSchema); 22 - }, 23 - /** 24 - * Array of text nodes containing the code 14 + * The code content 25 15 */ 26 - get content() { 27 - return /*#__PURE__*/ v.optional(/*#__PURE__*/ v.array(BlogPcktBlockText.mainSchema)); 28 - }, 16 + plaintext: /*#__PURE__*/ v.string(), 29 17 }); 30 18 31 - type codeBlockAttrs$schematype = typeof _codeBlockAttrsSchema; 32 19 type main$schematype = typeof _mainSchema; 33 20 34 - export interface codeBlockAttrsSchema extends codeBlockAttrs$schematype {} 35 21 export interface mainSchema extends main$schematype {} 36 22 37 - export const codeBlockAttrsSchema = _codeBlockAttrsSchema as codeBlockAttrsSchema; 38 23 export const mainSchema = _mainSchema as mainSchema; 39 24 40 - export interface CodeBlockAttrs extends v.InferInput<typeof codeBlockAttrsSchema> {} 41 25 export interface Main extends v.InferInput<typeof mainSchema> {}
+14 -26
packages/definitions/pckt/lib/lexicons/types/blog/pckt/block/heading.ts
··· 1 1 import type {} from '@atcute/lexicons'; 2 2 import * as v from '@atcute/lexicons/validations'; 3 - import * as BlogPcktBlockHardBreak from './hardBreak.js'; 4 - import * as BlogPcktBlockText from './text.js'; 3 + import * as BlogPcktRichtextFacet from '../richtext/facet.js'; 5 4 6 - const _headingAttrsSchema = /*#__PURE__*/ v.object({ 7 - $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('blog.pckt.block.heading#headingAttrs')), 8 - /** 9 - * Heading level from 1 (most important) to 6 (least important) 10 - * @minimum 1 11 - * @maximum 6 12 - */ 13 - level: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [/*#__PURE__*/ v.integerRange(1, 6)]), 14 - }); 15 5 const _mainSchema = /*#__PURE__*/ v.object({ 16 6 $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('blog.pckt.block.heading')), 17 7 /** 18 - * Heading attributes 8 + * Facets for text formatting and features 19 9 */ 20 - get attrs() { 21 - return headingAttrsSchema; 10 + get facets() { 11 + return /*#__PURE__*/ v.optional(/*#__PURE__*/ v.array(BlogPcktRichtextFacet.mainSchema)); 22 12 }, 23 13 /** 24 - * Inline content of the heading (text with optional formatting) 14 + * Heading level from 1 (most important) to 6 (least important) 15 + * @minimum 1 16 + * @maximum 6 25 17 */ 26 - get content() { 27 - return /*#__PURE__*/ v.optional( 28 - /*#__PURE__*/ v.array( 29 - /*#__PURE__*/ v.variant([BlogPcktBlockHardBreak.mainSchema, BlogPcktBlockText.mainSchema]), 30 - ), 31 - ); 32 - }, 18 + level: /*#__PURE__*/ v.optional( 19 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [/*#__PURE__*/ v.integerRange(1, 6)]), 20 + ), 21 + /** 22 + * The plain text content of the heading 23 + */ 24 + plaintext: /*#__PURE__*/ v.string(), 33 25 }); 34 26 35 - type headingAttrs$schematype = typeof _headingAttrsSchema; 36 27 type main$schematype = typeof _mainSchema; 37 28 38 - export interface headingAttrsSchema extends headingAttrs$schematype {} 39 29 export interface mainSchema extends main$schematype {} 40 30 41 - export const headingAttrsSchema = _headingAttrsSchema as headingAttrsSchema; 42 31 export const mainSchema = _mainSchema as mainSchema; 43 32 44 - export interface HeadingAttrs extends v.InferInput<typeof headingAttrsSchema> {} 45 33 export interface Main extends v.InferInput<typeof mainSchema> {}
+3 -3
packages/definitions/pckt/lib/lexicons/types/blog/pckt/block/listItem.ts
··· 2 2 import * as v from '@atcute/lexicons/validations'; 3 3 import * as BlogPcktBlockBulletList from './bulletList.js'; 4 4 import * as BlogPcktBlockOrderedList from './orderedList.js'; 5 - import * as BlogPcktBlockParagraph from './paragraph.js'; 5 + import * as BlogPcktBlockText from './text.js'; 6 6 7 7 const _mainSchema = /*#__PURE__*/ v.object({ 8 8 $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('blog.pckt.block.listItem')), 9 9 /** 10 - * Array of block content (paragraphs or nested lists) 10 + * Array of block content (text or nested lists) 11 11 */ 12 12 get content() { 13 13 return /*#__PURE__*/ v.array( 14 14 /*#__PURE__*/ v.variant([ 15 15 BlogPcktBlockBulletList.mainSchema, 16 16 BlogPcktBlockOrderedList.mainSchema, 17 - BlogPcktBlockParagraph.mainSchema, 17 + BlogPcktBlockText.mainSchema, 18 18 ]), 19 19 ); 20 20 },
+5
packages/definitions/pckt/lib/lexicons/types/blog/pckt/block/mention.ts
··· 7 7 * The DID of the mentioned user (e.g., did:plc:abc123xyz). This is the canonical reference that persists even if the user changes their handle, following app.bsky.richtext.facet#mention 8 8 */ 9 9 did: /*#__PURE__*/ v.didString(), 10 + /** 11 + * The handle of the mentioned user at the time of mention (e.g., alice.bsky.social). Used for display text and byte offset calculation in facets. 12 + * @maxLength 253 13 + */ 14 + handle: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.handleString(), [/*#__PURE__*/ v.stringLength(0, 253)]), 10 15 }); 11 16 12 17 type main$schematype = typeof _mainSchema;
+1 -14
packages/definitions/pckt/lib/lexicons/types/blog/pckt/block/orderedList.ts
··· 5 5 const _mainSchema = /*#__PURE__*/ v.object({ 6 6 $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('blog.pckt.block.orderedList')), 7 7 /** 8 - * Optional attributes for the ordered list 9 - */ 10 - get attrs() { 11 - return /*#__PURE__*/ v.optional(orderedListAttrsSchema); 12 - }, 13 - /** 14 8 * Array of list items 15 9 */ 16 10 get content() { 17 11 return /*#__PURE__*/ v.array(BlogPcktBlockListItem.mainSchema); 18 12 }, 19 - }); 20 - const _orderedListAttrsSchema = /*#__PURE__*/ v.object({ 21 - $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('blog.pckt.block.orderedList#orderedListAttrs')), 22 13 /** 23 - * Starting number for the ordered list 14 + * Starting number for the ordered list (default: 1) 24 15 * @minimum 1 25 16 */ 26 17 start: /*#__PURE__*/ v.optional( ··· 29 20 }); 30 21 31 22 type main$schematype = typeof _mainSchema; 32 - type orderedListAttrs$schematype = typeof _orderedListAttrsSchema; 33 23 34 24 export interface mainSchema extends main$schematype {} 35 - export interface orderedListAttrsSchema extends orderedListAttrs$schematype {} 36 25 37 26 export const mainSchema = _mainSchema as mainSchema; 38 - export const orderedListAttrsSchema = _orderedListAttrsSchema as orderedListAttrsSchema; 39 27 40 28 export interface Main extends v.InferInput<typeof mainSchema> {} 41 - export interface OrderedListAttrs extends v.InferInput<typeof orderedListAttrsSchema> {}
+7
packages/definitions/pckt/lib/lexicons/types/blog/pckt/block/paragraph.ts
··· 3 3 import * as BlogPcktBlockHardBreak from './hardBreak.js'; 4 4 import * as BlogPcktBlockMention from './mention.js'; 5 5 import * as BlogPcktBlockText from './text.js'; 6 + import * as BlogPcktRichtextFacet from '../richtext/facet.js'; 6 7 7 8 const _mainSchema = /*#__PURE__*/ v.object({ 8 9 $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('blog.pckt.block.paragraph')), ··· 19 20 ]), 20 21 ), 21 22 ); 23 + }, 24 + /** 25 + * Facets for text formatting and features within this paragraph 26 + */ 27 + get facets() { 28 + return /*#__PURE__*/ v.optional(/*#__PURE__*/ v.array(BlogPcktRichtextFacet.mainSchema)); 22 29 }, 23 30 }); 24 31
+5 -18
packages/definitions/pckt/lib/lexicons/types/blog/pckt/block/taskItem.ts
··· 1 1 import type {} from '@atcute/lexicons'; 2 2 import * as v from '@atcute/lexicons/validations'; 3 - import * as BlogPcktBlockParagraph from './paragraph.js'; 3 + import * as BlogPcktBlockText from './text.js'; 4 4 5 5 const _mainSchema = /*#__PURE__*/ v.object({ 6 6 $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('blog.pckt.block.taskItem')), 7 7 /** 8 - * Task item attributes 8 + * Whether the task is completed 9 9 */ 10 - get attrs() { 11 - return taskItemAttrsSchema; 12 - }, 10 + checked: /*#__PURE__*/ v.boolean(), 13 11 /** 14 - * Array of paragraph content 12 + * Array of text blocks 15 13 */ 16 14 get content() { 17 - return /*#__PURE__*/ v.array(/*#__PURE__*/ v.variant([BlogPcktBlockParagraph.mainSchema])); 15 + return /*#__PURE__*/ v.array(/*#__PURE__*/ v.variant([BlogPcktBlockText.mainSchema])); 18 16 }, 19 17 }); 20 - const _taskItemAttrsSchema = /*#__PURE__*/ v.object({ 21 - $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('blog.pckt.block.taskItem#taskItemAttrs')), 22 - /** 23 - * Whether the task is checked or unchecked 24 - */ 25 - checked: /*#__PURE__*/ v.boolean(), 26 - }); 27 18 28 19 type main$schematype = typeof _mainSchema; 29 - type taskItemAttrs$schematype = typeof _taskItemAttrsSchema; 30 20 31 21 export interface mainSchema extends main$schematype {} 32 - export interface taskItemAttrsSchema extends taskItemAttrs$schematype {} 33 22 34 23 export const mainSchema = _mainSchema as mainSchema; 35 - export const taskItemAttrsSchema = _taskItemAttrsSchema as taskItemAttrsSchema; 36 24 37 25 export interface Main extends v.InferInput<typeof mainSchema> {} 38 - export interface TaskItemAttrs extends v.InferInput<typeof taskItemAttrsSchema> {}
+6 -27
packages/definitions/pckt/lib/lexicons/types/blog/pckt/block/text.ts
··· 1 1 import type {} from '@atcute/lexicons'; 2 2 import * as v from '@atcute/lexicons/validations'; 3 - import * as BlogPcktMarkBold from '../mark/bold.js'; 4 - import * as BlogPcktMarkCode from '../mark/code.js'; 5 - import * as BlogPcktMarkItalic from '../mark/italic.js'; 6 - import * as BlogPcktMarkLink from '../mark/link.js'; 7 - import * as BlogPcktMarkStrike from '../mark/strike.js'; 8 - import * as BlogPcktMarkUnderline from '../mark/underline.js'; 3 + import * as BlogPcktRichtextFacet from '../richtext/facet.js'; 9 4 10 5 const _mainSchema = /*#__PURE__*/ v.object({ 11 6 $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('blog.pckt.block.text')), 12 7 /** 13 - * Optional array of formatting marks applied to this text (bold, italic, links, etc.) 8 + * Facets for text formatting and features 14 9 */ 15 - get marks() { 16 - return /*#__PURE__*/ v.optional( 17 - /*#__PURE__*/ v.array( 18 - /*#__PURE__*/ v.variant([ 19 - BlogPcktMarkBold.mainSchema, 20 - BlogPcktMarkCode.mainSchema, 21 - BlogPcktMarkItalic.mainSchema, 22 - BlogPcktMarkLink.mainSchema, 23 - BlogPcktMarkStrike.mainSchema, 24 - BlogPcktMarkUnderline.mainSchema, 25 - ]), 26 - ), 27 - ); 10 + get facets() { 11 + return /*#__PURE__*/ v.optional(/*#__PURE__*/ v.array(BlogPcktRichtextFacet.mainSchema)); 28 12 }, 29 13 /** 30 - * The actual text content 31 - * @maxLength 10000 32 - * @maxGraphemes 5000 14 + * The plain text content 33 15 */ 34 - text: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 35 - /*#__PURE__*/ v.stringLength(0, 10000), 36 - /*#__PURE__*/ v.stringGraphemes(0, 5000), 37 - ]), 16 + plaintext: /*#__PURE__*/ v.string(), 38 17 }); 39 18 40 19 type main$schematype = typeof _mainSchema;
-14
packages/definitions/pckt/lib/lexicons/types/blog/pckt/mark/bold.ts
··· 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('blog.pckt.mark.bold')), 6 - }); 7 - 8 - type main$schematype = typeof _mainSchema; 9 - 10 - export interface mainSchema extends main$schematype {} 11 - 12 - export const mainSchema = _mainSchema as mainSchema; 13 - 14 - export interface Main extends v.InferInput<typeof mainSchema> {}
-14
packages/definitions/pckt/lib/lexicons/types/blog/pckt/mark/code.ts
··· 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('blog.pckt.mark.code')), 6 - }); 7 - 8 - type main$schematype = typeof _mainSchema; 9 - 10 - export interface mainSchema extends main$schematype {} 11 - 12 - export const mainSchema = _mainSchema as mainSchema; 13 - 14 - export interface Main extends v.InferInput<typeof mainSchema> {}
-14
packages/definitions/pckt/lib/lexicons/types/blog/pckt/mark/italic.ts
··· 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('blog.pckt.mark.italic')), 6 - }); 7 - 8 - type main$schematype = typeof _mainSchema; 9 - 10 - export interface mainSchema extends main$schematype {} 11 - 12 - export const mainSchema = _mainSchema as mainSchema; 13 - 14 - export interface Main extends v.InferInput<typeof mainSchema> {}
-55
packages/definitions/pckt/lib/lexicons/types/blog/pckt/mark/link.ts
··· 1 - import type {} from '@atcute/lexicons'; 2 - import * as v from '@atcute/lexicons/validations'; 3 - 4 - const _linkAttrsSchema = /*#__PURE__*/ v.object({ 5 - $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('blog.pckt.mark.link#linkAttrs')), 6 - /** 7 - * The URL destination of the hyperlink 8 - * @maxLength 2000 9 - */ 10 - href: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.genericUriString(), [ 11 - /*#__PURE__*/ v.stringLength(0, 2000), 12 - ]), 13 - /** 14 - * Defines the relationship between the current document and the linked resource (e.g., nofollow, noopener) 15 - * @maxLength 100 16 - */ 17 - rel: /*#__PURE__*/ v.optional( 18 - /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [/*#__PURE__*/ v.stringLength(0, 100)]), 19 - ), 20 - /** 21 - * Specifies where to open the linked document (e.g., _blank, _self) 22 - * @maxLength 50 23 - */ 24 - target: /*#__PURE__*/ v.optional( 25 - /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [/*#__PURE__*/ v.stringLength(0, 50)]), 26 - ), 27 - /** 28 - * Additional information about the link, typically shown as a tooltip on hover 29 - * @maxLength 500 30 - */ 31 - title: /*#__PURE__*/ v.optional( 32 - /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [/*#__PURE__*/ v.stringLength(0, 500)]), 33 - ), 34 - }); 35 - const _mainSchema = /*#__PURE__*/ v.object({ 36 - $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('blog.pckt.mark.link')), 37 - /** 38 - * Link attributes that define the hyperlink behavior and destination 39 - */ 40 - get attrs() { 41 - return linkAttrsSchema; 42 - }, 43 - }); 44 - 45 - type linkAttrs$schematype = typeof _linkAttrsSchema; 46 - type main$schematype = typeof _mainSchema; 47 - 48 - export interface linkAttrsSchema extends linkAttrs$schematype {} 49 - export interface mainSchema extends main$schematype {} 50 - 51 - export const linkAttrsSchema = _linkAttrsSchema as linkAttrsSchema; 52 - export const mainSchema = _mainSchema as mainSchema; 53 - 54 - export interface LinkAttrs extends v.InferInput<typeof linkAttrsSchema> {} 55 - export interface Main extends v.InferInput<typeof mainSchema> {}
-14
packages/definitions/pckt/lib/lexicons/types/blog/pckt/mark/strike.ts
··· 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('blog.pckt.mark.strike')), 6 - }); 7 - 8 - type main$schematype = typeof _mainSchema; 9 - 10 - export interface mainSchema extends main$schematype {} 11 - 12 - export const mainSchema = _mainSchema as mainSchema; 13 - 14 - export interface Main extends v.InferInput<typeof mainSchema> {}
-14
packages/definitions/pckt/lib/lexicons/types/blog/pckt/mark/underline.ts
··· 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('blog.pckt.mark.underline')), 6 - }); 7 - 8 - type main$schematype = typeof _mainSchema; 9 - 10 - export interface mainSchema extends main$schematype {} 11 - 12 - export const mainSchema = _mainSchema as mainSchema; 13 - 14 - export interface Main extends v.InferInput<typeof mainSchema> {}
+122
packages/definitions/pckt/lib/lexicons/types/blog/pckt/richtext/facet.ts
··· 1 + import type {} from '@atcute/lexicons'; 2 + import * as v from '@atcute/lexicons/validations'; 3 + 4 + const _atMentionSchema = /*#__PURE__*/ v.object({ 5 + $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('blog.pckt.richtext.facet#atMention')), 6 + atURI: /*#__PURE__*/ v.genericUriString(), 7 + }); 8 + const _boldSchema = /*#__PURE__*/ v.object({ 9 + $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('blog.pckt.richtext.facet#bold')), 10 + }); 11 + const _byteSliceSchema = /*#__PURE__*/ v.object({ 12 + $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('blog.pckt.richtext.facet#byteSlice')), 13 + /** 14 + * @minimum 0 15 + */ 16 + byteEnd: /*#__PURE__*/ v.integer(), 17 + /** 18 + * @minimum 0 19 + */ 20 + byteStart: /*#__PURE__*/ v.integer(), 21 + }); 22 + const _codeSchema = /*#__PURE__*/ v.object({ 23 + $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('blog.pckt.richtext.facet#code')), 24 + }); 25 + const _didMentionSchema = /*#__PURE__*/ v.object({ 26 + $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('blog.pckt.richtext.facet#didMention')), 27 + did: /*#__PURE__*/ v.didString(), 28 + }); 29 + const _highlightSchema = /*#__PURE__*/ v.object({ 30 + $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('blog.pckt.richtext.facet#highlight')), 31 + }); 32 + const _idSchema = /*#__PURE__*/ v.object({ 33 + $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('blog.pckt.richtext.facet#id')), 34 + id: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 35 + }); 36 + const _italicSchema = /*#__PURE__*/ v.object({ 37 + $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('blog.pckt.richtext.facet#italic')), 38 + }); 39 + const _linkSchema = /*#__PURE__*/ v.object({ 40 + $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('blog.pckt.richtext.facet#link')), 41 + uri: /*#__PURE__*/ v.string(), 42 + }); 43 + const _mainSchema = /*#__PURE__*/ v.object({ 44 + $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('blog.pckt.richtext.facet')), 45 + get features() { 46 + return /*#__PURE__*/ v.array( 47 + /*#__PURE__*/ v.variant([ 48 + atMentionSchema, 49 + boldSchema, 50 + codeSchema, 51 + didMentionSchema, 52 + highlightSchema, 53 + idSchema, 54 + italicSchema, 55 + linkSchema, 56 + strikethroughSchema, 57 + underlineSchema, 58 + ]), 59 + ); 60 + }, 61 + get index() { 62 + return byteSliceSchema; 63 + }, 64 + }); 65 + const _strikethroughSchema = /*#__PURE__*/ v.object({ 66 + $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('blog.pckt.richtext.facet#strikethrough')), 67 + }); 68 + const _underlineSchema = /*#__PURE__*/ v.object({ 69 + $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('blog.pckt.richtext.facet#underline')), 70 + }); 71 + 72 + type atMention$schematype = typeof _atMentionSchema; 73 + type bold$schematype = typeof _boldSchema; 74 + type byteSlice$schematype = typeof _byteSliceSchema; 75 + type code$schematype = typeof _codeSchema; 76 + type didMention$schematype = typeof _didMentionSchema; 77 + type highlight$schematype = typeof _highlightSchema; 78 + type id$schematype = typeof _idSchema; 79 + type italic$schematype = typeof _italicSchema; 80 + type link$schematype = typeof _linkSchema; 81 + type main$schematype = typeof _mainSchema; 82 + type strikethrough$schematype = typeof _strikethroughSchema; 83 + type underline$schematype = typeof _underlineSchema; 84 + 85 + export interface atMentionSchema extends atMention$schematype {} 86 + export interface boldSchema extends bold$schematype {} 87 + export interface byteSliceSchema extends byteSlice$schematype {} 88 + export interface codeSchema extends code$schematype {} 89 + export interface didMentionSchema extends didMention$schematype {} 90 + export interface highlightSchema extends highlight$schematype {} 91 + export interface idSchema extends id$schematype {} 92 + export interface italicSchema extends italic$schematype {} 93 + export interface linkSchema extends link$schematype {} 94 + export interface mainSchema extends main$schematype {} 95 + export interface strikethroughSchema extends strikethrough$schematype {} 96 + export interface underlineSchema extends underline$schematype {} 97 + 98 + export const atMentionSchema = _atMentionSchema as atMentionSchema; 99 + export const boldSchema = _boldSchema as boldSchema; 100 + export const byteSliceSchema = _byteSliceSchema as byteSliceSchema; 101 + export const codeSchema = _codeSchema as codeSchema; 102 + export const didMentionSchema = _didMentionSchema as didMentionSchema; 103 + export const highlightSchema = _highlightSchema as highlightSchema; 104 + export const idSchema = _idSchema as idSchema; 105 + export const italicSchema = _italicSchema as italicSchema; 106 + export const linkSchema = _linkSchema as linkSchema; 107 + export const mainSchema = _mainSchema as mainSchema; 108 + export const strikethroughSchema = _strikethroughSchema as strikethroughSchema; 109 + export const underlineSchema = _underlineSchema as underlineSchema; 110 + 111 + export interface AtMention extends v.InferInput<typeof atMentionSchema> {} 112 + export interface Bold extends v.InferInput<typeof boldSchema> {} 113 + export interface ByteSlice extends v.InferInput<typeof byteSliceSchema> {} 114 + export interface Code extends v.InferInput<typeof codeSchema> {} 115 + export interface DidMention extends v.InferInput<typeof didMentionSchema> {} 116 + export interface Highlight extends v.InferInput<typeof highlightSchema> {} 117 + export interface Id extends v.InferInput<typeof idSchema> {} 118 + export interface Italic extends v.InferInput<typeof italicSchema> {} 119 + export interface Link extends v.InferInput<typeof linkSchema> {} 120 + export interface Main extends v.InferInput<typeof mainSchema> {} 121 + export interface Strikethrough extends v.InferInput<typeof strikethroughSchema> {} 122 + export interface Underline extends v.InferInput<typeof underlineSchema> {}