@atcute/pckt 0.1.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.
- package/LICENSE +14 -0
- package/README.md +59 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/lexicons/index.d.ts +27 -0
- package/dist/lexicons/index.d.ts.map +1 -0
- package/dist/lexicons/index.js +27 -0
- package/dist/lexicons/index.js.map +1 -0
- package/dist/lexicons/types/blog/pckt/block/blockquote.d.ts +17 -0
- package/dist/lexicons/types/blog/pckt/block/blockquote.d.ts.map +1 -0
- package/dist/lexicons/types/blog/pckt/block/blockquote.js +13 -0
- package/dist/lexicons/types/blog/pckt/block/blockquote.js.map +1 -0
- package/dist/lexicons/types/blog/pckt/block/blueskyEmbed.d.ts +17 -0
- package/dist/lexicons/types/blog/pckt/block/blueskyEmbed.d.ts.map +1 -0
- package/dist/lexicons/types/blog/pckt/block/blueskyEmbed.js +13 -0
- package/dist/lexicons/types/blog/pckt/block/blueskyEmbed.js.map +1 -0
- package/dist/lexicons/types/blog/pckt/block/bulletList.d.ts +17 -0
- package/dist/lexicons/types/blog/pckt/block/bulletList.d.ts.map +1 -0
- package/dist/lexicons/types/blog/pckt/block/bulletList.js +13 -0
- package/dist/lexicons/types/blog/pckt/block/bulletList.js.map +1 -0
- package/dist/lexicons/types/blog/pckt/block/codeBlock.d.ts +35 -0
- package/dist/lexicons/types/blog/pckt/block/codeBlock.d.ts.map +1 -0
- package/dist/lexicons/types/blog/pckt/block/codeBlock.js +29 -0
- package/dist/lexicons/types/blog/pckt/block/codeBlock.js.map +1 -0
- package/dist/lexicons/types/blog/pckt/block/hardBreak.d.ts +12 -0
- package/dist/lexicons/types/blog/pckt/block/hardBreak.d.ts.map +1 -0
- package/dist/lexicons/types/blog/pckt/block/hardBreak.js +6 -0
- package/dist/lexicons/types/blog/pckt/block/hardBreak.js.map +1 -0
- package/dist/lexicons/types/blog/pckt/block/heading.d.ts +37 -0
- package/dist/lexicons/types/blog/pckt/block/heading.d.ts.map +1 -0
- package/dist/lexicons/types/blog/pckt/block/heading.js +32 -0
- package/dist/lexicons/types/blog/pckt/block/heading.js.map +1 -0
- package/dist/lexicons/types/blog/pckt/block/horizontalRule.d.ts +12 -0
- package/dist/lexicons/types/blog/pckt/block/horizontalRule.d.ts.map +1 -0
- package/dist/lexicons/types/blog/pckt/block/horizontalRule.js +6 -0
- package/dist/lexicons/types/blog/pckt/block/horizontalRule.js.map +1 -0
- package/dist/lexicons/types/blog/pckt/block/iframe.d.ts +22 -0
- package/dist/lexicons/types/blog/pckt/block/iframe.d.ts.map +1 -0
- package/dist/lexicons/types/blog/pckt/block/iframe.js +17 -0
- package/dist/lexicons/types/blog/pckt/block/iframe.js.map +1 -0
- package/dist/lexicons/types/blog/pckt/block/image.d.ts +75 -0
- package/dist/lexicons/types/blog/pckt/block/image.d.ts.map +1 -0
- package/dist/lexicons/types/blog/pckt/block/image.js +71 -0
- package/dist/lexicons/types/blog/pckt/block/image.js.map +1 -0
- package/dist/lexicons/types/blog/pckt/block/listItem.d.ts +19 -0
- package/dist/lexicons/types/blog/pckt/block/listItem.d.ts.map +1 -0
- package/dist/lexicons/types/blog/pckt/block/listItem.js +20 -0
- package/dist/lexicons/types/blog/pckt/block/listItem.js.map +1 -0
- package/dist/lexicons/types/blog/pckt/block/mention.d.ts +16 -0
- package/dist/lexicons/types/blog/pckt/block/mention.d.ts.map +1 -0
- package/dist/lexicons/types/blog/pckt/block/mention.js +10 -0
- package/dist/lexicons/types/blog/pckt/block/mention.js.map +1 -0
- package/dist/lexicons/types/blog/pckt/block/orderedList.d.ts +35 -0
- package/dist/lexicons/types/blog/pckt/block/orderedList.d.ts.map +1 -0
- package/dist/lexicons/types/blog/pckt/block/orderedList.js +29 -0
- package/dist/lexicons/types/blog/pckt/block/orderedList.js.map +1 -0
- package/dist/lexicons/types/blog/pckt/block/paragraph.d.ts +19 -0
- package/dist/lexicons/types/blog/pckt/block/paragraph.d.ts.map +1 -0
- package/dist/lexicons/types/blog/pckt/block/paragraph.js +21 -0
- package/dist/lexicons/types/blog/pckt/block/paragraph.js.map +1 -0
- package/dist/lexicons/types/blog/pckt/block/taskItem.d.ts +34 -0
- package/dist/lexicons/types/blog/pckt/block/taskItem.d.ts.map +1 -0
- package/dist/lexicons/types/blog/pckt/block/taskItem.js +27 -0
- package/dist/lexicons/types/blog/pckt/block/taskItem.js.map +1 -0
- package/dist/lexicons/types/blog/pckt/block/taskList.d.ts +17 -0
- package/dist/lexicons/types/blog/pckt/block/taskList.d.ts.map +1 -0
- package/dist/lexicons/types/blog/pckt/block/taskList.js +13 -0
- package/dist/lexicons/types/blog/pckt/block/taskList.js.map +1 -0
- package/dist/lexicons/types/blog/pckt/block/text.d.ts +28 -0
- package/dist/lexicons/types/blog/pckt/block/text.d.ts.map +1 -0
- package/dist/lexicons/types/blog/pckt/block/text.js +36 -0
- package/dist/lexicons/types/blog/pckt/block/text.js.map +1 -0
- package/dist/lexicons/types/blog/pckt/block/website.d.ts +28 -0
- package/dist/lexicons/types/blog/pckt/block/website.d.ts.map +1 -0
- package/dist/lexicons/types/blog/pckt/block/website.js +22 -0
- package/dist/lexicons/types/blog/pckt/block/website.js.map +1 -0
- package/dist/lexicons/types/blog/pckt/document.d.ts +78 -0
- package/dist/lexicons/types/blog/pckt/document.d.ts.map +1 -0
- package/dist/lexicons/types/blog/pckt/document.js +101 -0
- package/dist/lexicons/types/blog/pckt/document.js.map +1 -0
- package/dist/lexicons/types/blog/pckt/mark/bold.d.ts +12 -0
- package/dist/lexicons/types/blog/pckt/mark/bold.d.ts.map +1 -0
- package/dist/lexicons/types/blog/pckt/mark/bold.js +6 -0
- package/dist/lexicons/types/blog/pckt/mark/bold.js.map +1 -0
- package/dist/lexicons/types/blog/pckt/mark/code.d.ts +12 -0
- package/dist/lexicons/types/blog/pckt/mark/code.d.ts.map +1 -0
- package/dist/lexicons/types/blog/pckt/mark/code.js +6 -0
- package/dist/lexicons/types/blog/pckt/mark/code.js.map +1 -0
- package/dist/lexicons/types/blog/pckt/mark/italic.d.ts +12 -0
- package/dist/lexicons/types/blog/pckt/mark/italic.d.ts.map +1 -0
- package/dist/lexicons/types/blog/pckt/mark/italic.js +6 -0
- package/dist/lexicons/types/blog/pckt/mark/italic.js.map +1 -0
- package/dist/lexicons/types/blog/pckt/mark/link.d.ts +45 -0
- package/dist/lexicons/types/blog/pckt/mark/link.d.ts.map +1 -0
- package/dist/lexicons/types/blog/pckt/mark/link.js +41 -0
- package/dist/lexicons/types/blog/pckt/mark/link.js.map +1 -0
- package/dist/lexicons/types/blog/pckt/mark/strike.d.ts +12 -0
- package/dist/lexicons/types/blog/pckt/mark/strike.d.ts.map +1 -0
- package/dist/lexicons/types/blog/pckt/mark/strike.js +6 -0
- package/dist/lexicons/types/blog/pckt/mark/strike.js.map +1 -0
- package/dist/lexicons/types/blog/pckt/mark/underline.d.ts +12 -0
- package/dist/lexicons/types/blog/pckt/mark/underline.d.ts.map +1 -0
- package/dist/lexicons/types/blog/pckt/mark/underline.js +6 -0
- package/dist/lexicons/types/blog/pckt/mark/underline.js.map +1 -0
- package/dist/lexicons/types/blog/pckt/publication.d.ts +76 -0
- package/dist/lexicons/types/blog/pckt/publication.d.ts.map +1 -0
- package/dist/lexicons/types/blog/pckt/publication.js +80 -0
- package/dist/lexicons/types/blog/pckt/publication.js.map +1 -0
- package/dist/lexicons/types/blog/pckt/theme.d.ts +59 -0
- package/dist/lexicons/types/blog/pckt/theme.d.ts.map +1 -0
- package/dist/lexicons/types/blog/pckt/theme.js +53 -0
- package/dist/lexicons/types/blog/pckt/theme.js.map +1 -0
- package/lib/index.ts +1 -0
- package/lib/lexicons/index.ts +26 -0
- package/lib/lexicons/types/blog/pckt/block/blockquote.ts +21 -0
- package/lib/lexicons/types/blog/pckt/block/blueskyEmbed.ts +21 -0
- package/lib/lexicons/types/blog/pckt/block/bulletList.ts +21 -0
- package/lib/lexicons/types/blog/pckt/block/codeBlock.ts +41 -0
- package/lib/lexicons/types/blog/pckt/block/hardBreak.ts +14 -0
- package/lib/lexicons/types/blog/pckt/block/heading.ts +45 -0
- package/lib/lexicons/types/blog/pckt/block/horizontalRule.ts +14 -0
- package/lib/lexicons/types/blog/pckt/block/iframe.ts +26 -0
- package/lib/lexicons/types/blog/pckt/block/image.ts +87 -0
- package/lib/lexicons/types/blog/pckt/block/listItem.ts +29 -0
- package/lib/lexicons/types/blog/pckt/block/mention.ts +18 -0
- package/lib/lexicons/types/blog/pckt/block/orderedList.ts +41 -0
- package/lib/lexicons/types/blog/pckt/block/paragraph.ts +31 -0
- package/lib/lexicons/types/blog/pckt/block/taskItem.ts +38 -0
- package/lib/lexicons/types/blog/pckt/block/taskList.ts +21 -0
- package/lib/lexicons/types/blog/pckt/block/text.ts +46 -0
- package/lib/lexicons/types/blog/pckt/block/website.ts +30 -0
- package/lib/lexicons/types/blog/pckt/document.ts +124 -0
- package/lib/lexicons/types/blog/pckt/mark/bold.ts +14 -0
- package/lib/lexicons/types/blog/pckt/mark/code.ts +14 -0
- package/lib/lexicons/types/blog/pckt/mark/italic.ts +14 -0
- package/lib/lexicons/types/blog/pckt/mark/link.ts +55 -0
- package/lib/lexicons/types/blog/pckt/mark/strike.ts +14 -0
- package/lib/lexicons/types/blog/pckt/mark/underline.ts +14 -0
- package/lib/lexicons/types/blog/pckt/publication.ts +101 -0
- package/lib/lexicons/types/blog/pckt/theme.ts +65 -0
- package/package.json +47 -0
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import type {} from '@atcute/lexicons';
|
|
2
|
+
import * as v from '@atcute/lexicons/validations';
|
|
3
|
+
import type {} from '@atcute/lexicons/ambient';
|
|
4
|
+
import * as BlogPcktBlockBlockquote from './block/blockquote.js';
|
|
5
|
+
import * as BlogPcktBlockBlueskyEmbed from './block/blueskyEmbed.js';
|
|
6
|
+
import * as BlogPcktBlockBulletList from './block/bulletList.js';
|
|
7
|
+
import * as BlogPcktBlockCodeBlock from './block/codeBlock.js';
|
|
8
|
+
import * as BlogPcktBlockHeading from './block/heading.js';
|
|
9
|
+
import * as BlogPcktBlockHorizontalRule from './block/horizontalRule.js';
|
|
10
|
+
import * as BlogPcktBlockImage from './block/image.js';
|
|
11
|
+
import * as BlogPcktBlockListItem from './block/listItem.js';
|
|
12
|
+
import * as BlogPcktBlockOrderedList from './block/orderedList.js';
|
|
13
|
+
import * as BlogPcktBlockParagraph from './block/paragraph.js';
|
|
14
|
+
import * as BlogPcktBlockTaskItem from './block/taskItem.js';
|
|
15
|
+
import * as BlogPcktBlockTaskList from './block/taskList.js';
|
|
16
|
+
import * as ComAtprotoRepoStrongRef from '@atcute/atproto/types/repo/strongRef';
|
|
17
|
+
|
|
18
|
+
const _mainSchema = /*#__PURE__*/ v.record(
|
|
19
|
+
/*#__PURE__*/ v.tidString(),
|
|
20
|
+
/*#__PURE__*/ v.object({
|
|
21
|
+
$type: /*#__PURE__*/ v.literal('blog.pckt.document'),
|
|
22
|
+
/**
|
|
23
|
+
* Structured content blocks composing the document body
|
|
24
|
+
*/
|
|
25
|
+
get blocks() {
|
|
26
|
+
return /*#__PURE__*/ v.array(
|
|
27
|
+
/*#__PURE__*/ v.variant([
|
|
28
|
+
BlogPcktBlockBlockquote.mainSchema,
|
|
29
|
+
BlogPcktBlockBlueskyEmbed.mainSchema,
|
|
30
|
+
BlogPcktBlockBulletList.mainSchema,
|
|
31
|
+
BlogPcktBlockCodeBlock.mainSchema,
|
|
32
|
+
BlogPcktBlockHeading.mainSchema,
|
|
33
|
+
BlogPcktBlockHorizontalRule.mainSchema,
|
|
34
|
+
BlogPcktBlockImage.mainSchema,
|
|
35
|
+
BlogPcktBlockListItem.mainSchema,
|
|
36
|
+
BlogPcktBlockOrderedList.mainSchema,
|
|
37
|
+
BlogPcktBlockParagraph.mainSchema,
|
|
38
|
+
BlogPcktBlockTaskItem.mainSchema,
|
|
39
|
+
BlogPcktBlockTaskList.mainSchema,
|
|
40
|
+
]),
|
|
41
|
+
);
|
|
42
|
+
},
|
|
43
|
+
/**
|
|
44
|
+
* Plain text representation of the document content for search and preview
|
|
45
|
+
* @maxLength 100000
|
|
46
|
+
* @maxGraphemes 50000
|
|
47
|
+
*/
|
|
48
|
+
bodyPlain: /*#__PURE__*/ v.optional(
|
|
49
|
+
/*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [
|
|
50
|
+
/*#__PURE__*/ v.stringLength(0, 100000),
|
|
51
|
+
/*#__PURE__*/ v.stringGraphemes(0, 50000),
|
|
52
|
+
]),
|
|
53
|
+
),
|
|
54
|
+
/**
|
|
55
|
+
* Optional cover/featured image (10MB max)
|
|
56
|
+
* @accept image/*
|
|
57
|
+
* @maxSize 10000000
|
|
58
|
+
*/
|
|
59
|
+
cover: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.blob()),
|
|
60
|
+
/**
|
|
61
|
+
* Blob references for images used within the document content
|
|
62
|
+
*/
|
|
63
|
+
images: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.array(/*#__PURE__*/ v.blob())),
|
|
64
|
+
/**
|
|
65
|
+
* Reference to the parent publication this document belongs to
|
|
66
|
+
*/
|
|
67
|
+
get publication() {
|
|
68
|
+
return ComAtprotoRepoStrongRef.mainSchema;
|
|
69
|
+
},
|
|
70
|
+
/**
|
|
71
|
+
* Timestamp when the document was first published
|
|
72
|
+
*/
|
|
73
|
+
publishedAt: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.datetimeString()),
|
|
74
|
+
/**
|
|
75
|
+
* URL-friendly slug for the document (used to construct canonical URL)
|
|
76
|
+
* @maxLength 500
|
|
77
|
+
*/
|
|
78
|
+
slug: /*#__PURE__*/ v.optional(
|
|
79
|
+
/*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [/*#__PURE__*/ v.stringLength(0, 500)]),
|
|
80
|
+
),
|
|
81
|
+
/**
|
|
82
|
+
* Optional tags for categorization and discovery
|
|
83
|
+
* @maxLength 20
|
|
84
|
+
*/
|
|
85
|
+
tags: /*#__PURE__*/ v.optional(
|
|
86
|
+
/*#__PURE__*/ v.constrain(
|
|
87
|
+
/*#__PURE__*/ v.array(
|
|
88
|
+
/*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [
|
|
89
|
+
/*#__PURE__*/ v.stringLength(0, 100),
|
|
90
|
+
/*#__PURE__*/ v.stringGraphemes(0, 50),
|
|
91
|
+
]),
|
|
92
|
+
),
|
|
93
|
+
[/*#__PURE__*/ v.arrayLength(0, 20)],
|
|
94
|
+
),
|
|
95
|
+
),
|
|
96
|
+
/**
|
|
97
|
+
* Document title/headline
|
|
98
|
+
* @maxLength 1280
|
|
99
|
+
* @maxGraphemes 128
|
|
100
|
+
*/
|
|
101
|
+
title: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [
|
|
102
|
+
/*#__PURE__*/ v.stringLength(0, 1280),
|
|
103
|
+
/*#__PURE__*/ v.stringGraphemes(0, 128),
|
|
104
|
+
]),
|
|
105
|
+
/**
|
|
106
|
+
* Timestamp when the document was last modified
|
|
107
|
+
*/
|
|
108
|
+
updatedAt: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.datetimeString()),
|
|
109
|
+
}),
|
|
110
|
+
);
|
|
111
|
+
|
|
112
|
+
type main$schematype = typeof _mainSchema;
|
|
113
|
+
|
|
114
|
+
export interface mainSchema extends main$schematype {}
|
|
115
|
+
|
|
116
|
+
export const mainSchema = _mainSchema as mainSchema;
|
|
117
|
+
|
|
118
|
+
export interface Main extends v.InferInput<typeof mainSchema> {}
|
|
119
|
+
|
|
120
|
+
declare module '@atcute/lexicons/ambient' {
|
|
121
|
+
interface Records {
|
|
122
|
+
'blog.pckt.document': mainSchema;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
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> {}
|
|
@@ -0,0 +1,14 @@
|
|
|
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> {}
|
|
@@ -0,0 +1,14 @@
|
|
|
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> {}
|
|
@@ -0,0 +1,55 @@
|
|
|
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> {}
|
|
@@ -0,0 +1,14 @@
|
|
|
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> {}
|
|
@@ -0,0 +1,14 @@
|
|
|
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> {}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import type {} from '@atcute/lexicons';
|
|
2
|
+
import * as v from '@atcute/lexicons/validations';
|
|
3
|
+
import type {} from '@atcute/lexicons/ambient';
|
|
4
|
+
import * as BlogPcktTheme from './theme.js';
|
|
5
|
+
|
|
6
|
+
const _mainSchema = /*#__PURE__*/ v.record(
|
|
7
|
+
/*#__PURE__*/ v.tidString(),
|
|
8
|
+
/*#__PURE__*/ v.object({
|
|
9
|
+
$type: /*#__PURE__*/ v.literal('blog.pckt.publication'),
|
|
10
|
+
/**
|
|
11
|
+
* Base URL path for the publication (e.g., https://blog.pckt.blog)
|
|
12
|
+
* @maxLength 2000
|
|
13
|
+
*/
|
|
14
|
+
basePath: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.genericUriString(), [
|
|
15
|
+
/*#__PURE__*/ v.stringLength(0, 2000),
|
|
16
|
+
]),
|
|
17
|
+
/**
|
|
18
|
+
* Timestamp when the publication was first created
|
|
19
|
+
*/
|
|
20
|
+
createdAt: /*#__PURE__*/ v.datetimeString(),
|
|
21
|
+
/**
|
|
22
|
+
* Publication description or tagline
|
|
23
|
+
* @maxLength 2000
|
|
24
|
+
* @maxGraphemes 500
|
|
25
|
+
*/
|
|
26
|
+
description: /*#__PURE__*/ v.optional(
|
|
27
|
+
/*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [
|
|
28
|
+
/*#__PURE__*/ v.stringLength(0, 2000),
|
|
29
|
+
/*#__PURE__*/ v.stringGraphemes(0, 500),
|
|
30
|
+
]),
|
|
31
|
+
),
|
|
32
|
+
/**
|
|
33
|
+
* Extension objects (open union) for additional features
|
|
34
|
+
* @maxLength 10
|
|
35
|
+
*/
|
|
36
|
+
get extensions() {
|
|
37
|
+
return /*#__PURE__*/ v.optional(
|
|
38
|
+
/*#__PURE__*/ v.constrain(/*#__PURE__*/ v.array(/*#__PURE__*/ v.variant([])), [
|
|
39
|
+
/*#__PURE__*/ v.arrayLength(0, 10),
|
|
40
|
+
]),
|
|
41
|
+
);
|
|
42
|
+
},
|
|
43
|
+
/**
|
|
44
|
+
* Publication icon/avatar image
|
|
45
|
+
* @accept image/png, image/jpeg, image/webp, image/gif
|
|
46
|
+
* @maxSize 500000
|
|
47
|
+
*/
|
|
48
|
+
icon: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.blob()),
|
|
49
|
+
/**
|
|
50
|
+
* Publication name/title
|
|
51
|
+
* @maxLength 200
|
|
52
|
+
* @maxGraphemes 100
|
|
53
|
+
*/
|
|
54
|
+
name: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [
|
|
55
|
+
/*#__PURE__*/ v.stringLength(0, 200),
|
|
56
|
+
/*#__PURE__*/ v.stringGraphemes(0, 100),
|
|
57
|
+
]),
|
|
58
|
+
/**
|
|
59
|
+
* Publication preferences and settings
|
|
60
|
+
*/
|
|
61
|
+
get preferences() {
|
|
62
|
+
return /*#__PURE__*/ v.optional(preferencesSchema);
|
|
63
|
+
},
|
|
64
|
+
/**
|
|
65
|
+
* Theme configuration as an open union; accepts blog.pckt.theme and future types.
|
|
66
|
+
*/
|
|
67
|
+
get theme() {
|
|
68
|
+
return /*#__PURE__*/ v.optional(/*#__PURE__*/ v.variant([BlogPcktTheme.mainSchema]));
|
|
69
|
+
},
|
|
70
|
+
/**
|
|
71
|
+
* Timestamp when the publication was last updated (optional)
|
|
72
|
+
*/
|
|
73
|
+
updatedAt: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.datetimeString()),
|
|
74
|
+
}),
|
|
75
|
+
);
|
|
76
|
+
const _preferencesSchema = /*#__PURE__*/ v.object({
|
|
77
|
+
$type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('blog.pckt.publication#preferences')),
|
|
78
|
+
/**
|
|
79
|
+
* Whether documents from this publication should appear in public discover feeds
|
|
80
|
+
* @default true
|
|
81
|
+
*/
|
|
82
|
+
showInDiscover: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.boolean(), true),
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
type main$schematype = typeof _mainSchema;
|
|
86
|
+
type preferences$schematype = typeof _preferencesSchema;
|
|
87
|
+
|
|
88
|
+
export interface mainSchema extends main$schematype {}
|
|
89
|
+
export interface preferencesSchema extends preferences$schematype {}
|
|
90
|
+
|
|
91
|
+
export const mainSchema = _mainSchema as mainSchema;
|
|
92
|
+
export const preferencesSchema = _preferencesSchema as preferencesSchema;
|
|
93
|
+
|
|
94
|
+
export interface Main extends v.InferInput<typeof mainSchema> {}
|
|
95
|
+
export interface Preferences extends v.InferInput<typeof preferencesSchema> {}
|
|
96
|
+
|
|
97
|
+
declare module '@atcute/lexicons/ambient' {
|
|
98
|
+
interface Records {
|
|
99
|
+
'blog.pckt.publication': mainSchema;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
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.theme')),
|
|
6
|
+
/**
|
|
7
|
+
* Dark mode color palette
|
|
8
|
+
*/
|
|
9
|
+
get dark() {
|
|
10
|
+
return paletteSchema;
|
|
11
|
+
},
|
|
12
|
+
/**
|
|
13
|
+
* Font family name (optional)
|
|
14
|
+
* @maxLength 100
|
|
15
|
+
*/
|
|
16
|
+
font: /*#__PURE__*/ v.optional(
|
|
17
|
+
/*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [/*#__PURE__*/ v.stringLength(0, 100)]),
|
|
18
|
+
),
|
|
19
|
+
/**
|
|
20
|
+
* Light mode color palette
|
|
21
|
+
*/
|
|
22
|
+
get light() {
|
|
23
|
+
return paletteSchema;
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
const _paletteSchema = /*#__PURE__*/ v.object({
|
|
27
|
+
$type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('blog.pckt.theme#palette')),
|
|
28
|
+
/**
|
|
29
|
+
* Accent color (hex value)
|
|
30
|
+
* @maxLength 7
|
|
31
|
+
*/
|
|
32
|
+
accent: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [/*#__PURE__*/ v.stringLength(0, 7)]),
|
|
33
|
+
/**
|
|
34
|
+
* Background color (hex value)
|
|
35
|
+
* @maxLength 7
|
|
36
|
+
*/
|
|
37
|
+
background: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [/*#__PURE__*/ v.stringLength(0, 7)]),
|
|
38
|
+
/**
|
|
39
|
+
* Link color (hex value)
|
|
40
|
+
* @maxLength 7
|
|
41
|
+
*/
|
|
42
|
+
link: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [/*#__PURE__*/ v.stringLength(0, 7)]),
|
|
43
|
+
/**
|
|
44
|
+
* Surface hover color (hex value)
|
|
45
|
+
* @maxLength 7
|
|
46
|
+
*/
|
|
47
|
+
surfaceHover: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [/*#__PURE__*/ v.stringLength(0, 7)]),
|
|
48
|
+
/**
|
|
49
|
+
* Primary text color (hex value)
|
|
50
|
+
* @maxLength 7
|
|
51
|
+
*/
|
|
52
|
+
text: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [/*#__PURE__*/ v.stringLength(0, 7)]),
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
type main$schematype = typeof _mainSchema;
|
|
56
|
+
type palette$schematype = typeof _paletteSchema;
|
|
57
|
+
|
|
58
|
+
export interface mainSchema extends main$schematype {}
|
|
59
|
+
export interface paletteSchema extends palette$schematype {}
|
|
60
|
+
|
|
61
|
+
export const mainSchema = _mainSchema as mainSchema;
|
|
62
|
+
export const paletteSchema = _paletteSchema as paletteSchema;
|
|
63
|
+
|
|
64
|
+
export interface Main extends v.InferInput<typeof mainSchema> {}
|
|
65
|
+
export interface Palette extends v.InferInput<typeof paletteSchema> {}
|
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "module",
|
|
3
|
+
"name": "@atcute/pckt",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"description": "pckt (blog.pckt.*) schema definitions",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"atcute",
|
|
8
|
+
"atproto",
|
|
9
|
+
"pckt"
|
|
10
|
+
],
|
|
11
|
+
"license": "0BSD",
|
|
12
|
+
"repository": {
|
|
13
|
+
"url": "https://github.com/mary-ext/atcute",
|
|
14
|
+
"directory": "packages/definitions/pckt"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist/",
|
|
18
|
+
"lib/",
|
|
19
|
+
"!lib/**/*.bench.ts",
|
|
20
|
+
"!lib/**/*.test.ts"
|
|
21
|
+
],
|
|
22
|
+
"exports": {
|
|
23
|
+
".": "./dist/index.js",
|
|
24
|
+
"./types/*": "./dist/lexicons/types/blog/pckt/*.js"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@atcute/atproto": "^3.1.9",
|
|
28
|
+
"@atcute/lexicons": "^1.2.5"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@atcute/lex-cli": "^2.5.0"
|
|
32
|
+
},
|
|
33
|
+
"atcute:lexicons": {
|
|
34
|
+
"mappings": {
|
|
35
|
+
"blog.pckt.*": {
|
|
36
|
+
"type": "namespace",
|
|
37
|
+
"path": "./types/{{nsid_remainder}}"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"scripts": {
|
|
42
|
+
"build": "tsc",
|
|
43
|
+
"pull": "lex-cli pull",
|
|
44
|
+
"generate": "rm -r ./lib/lexicons/; lex-cli generate",
|
|
45
|
+
"prepublish": "rm -rf dist; pnpm run build"
|
|
46
|
+
}
|
|
47
|
+
}
|