+5
.changeset/open-yaks-know.md
+5
.changeset/open-yaks-know.md
+1
-1
lexdocs/leaflet/README.md
+1
-1
lexdocs/leaflet/README.md
+21
lexdocs/leaflet/blocks/code.json
+21
lexdocs/leaflet/blocks/code.json
···
1
+
{
2
+
"lexicon": 1,
3
+
"id": "pub.leaflet.blocks.code",
4
+
"defs": {
5
+
"main": {
6
+
"type": "object",
7
+
"required": ["plaintext"],
8
+
"properties": {
9
+
"plaintext": {
10
+
"type": "string"
11
+
},
12
+
"language": {
13
+
"type": "string"
14
+
},
15
+
"syntaxHighlightingTheme": {
16
+
"type": "string"
17
+
}
18
+
}
19
+
}
20
+
}
21
+
}
+15
lexdocs/leaflet/blocks/math.json
+15
lexdocs/leaflet/blocks/math.json
+3
-1
lexdocs/leaflet/pages/linearDocument.json
+3
-1
lexdocs/leaflet/pages/linearDocument.json
+50
lexdocs/leaflet/publication.json
+50
lexdocs/leaflet/publication.json
···
26
26
"type": "blob",
27
27
"accept": ["image/*"],
28
28
"maxSize": 1000000
29
+
},
30
+
"theme": {
31
+
"type": "ref",
32
+
"ref": "#theme"
33
+
},
34
+
"preferences": {
35
+
"type": "ref",
36
+
"ref": "#preferences"
29
37
}
38
+
}
39
+
}
40
+
},
41
+
"preferences": {
42
+
"type": "object",
43
+
"properties": {
44
+
"showInDiscover": {
45
+
"type": "boolean",
46
+
"default": true
47
+
}
48
+
}
49
+
},
50
+
"theme": {
51
+
"type": "object",
52
+
"properties": {
53
+
"backgroundColor": {
54
+
"type": "union",
55
+
"refs": ["pub.leaflet.theme.color#rgba", "pub.leaflet.theme.color#rgb"]
56
+
},
57
+
"backgroundImage": {
58
+
"type": "ref",
59
+
"ref": "pub.leaflet.theme.backgroundImage"
60
+
},
61
+
"primary": {
62
+
"type": "union",
63
+
"refs": ["pub.leaflet.theme.color#rgba", "pub.leaflet.theme.color#rgb"]
64
+
},
65
+
"pageBackground": {
66
+
"type": "union",
67
+
"refs": ["pub.leaflet.theme.color#rgba", "pub.leaflet.theme.color#rgb"]
68
+
},
69
+
"showPageBackground": {
70
+
"type": "boolean",
71
+
"default": false
72
+
},
73
+
"accentBackground": {
74
+
"type": "union",
75
+
"refs": ["pub.leaflet.theme.color#rgba", "pub.leaflet.theme.color#rgb"]
76
+
},
77
+
"accentText": {
78
+
"type": "union",
79
+
"refs": ["pub.leaflet.theme.color#rgba", "pub.leaflet.theme.color#rgb"]
30
80
}
31
81
}
32
82
}
+23
lexdocs/leaflet/theme/backgroundImage.json
+23
lexdocs/leaflet/theme/backgroundImage.json
···
1
+
{
2
+
"lexicon": 1,
3
+
"id": "pub.leaflet.theme.backgroundImage",
4
+
"defs": {
5
+
"main": {
6
+
"type": "object",
7
+
"required": ["image"],
8
+
"properties": {
9
+
"image": {
10
+
"type": "blob",
11
+
"accept": ["image/*"],
12
+
"maxSize": 1000000
13
+
},
14
+
"width": {
15
+
"type": "integer"
16
+
},
17
+
"repeat": {
18
+
"type": "boolean"
19
+
}
20
+
}
21
+
}
22
+
}
23
+
}
+53
lexdocs/leaflet/theme/color.json
+53
lexdocs/leaflet/theme/color.json
···
1
+
{
2
+
"lexicon": 1,
3
+
"id": "pub.leaflet.theme.color",
4
+
"defs": {
5
+
"rgba": {
6
+
"type": "object",
7
+
"required": ["r", "g", "b", "a"],
8
+
"properties": {
9
+
"r": {
10
+
"type": "integer",
11
+
"maximum": 255,
12
+
"minimum": 0
13
+
},
14
+
"g": {
15
+
"type": "integer",
16
+
"maximum": 255,
17
+
"minimum": 0
18
+
},
19
+
"b": {
20
+
"type": "integer",
21
+
"maximum": 255,
22
+
"minimum": 0
23
+
},
24
+
"a": {
25
+
"type": "integer",
26
+
"maximum": 100,
27
+
"minimum": 0
28
+
}
29
+
}
30
+
},
31
+
"rgb": {
32
+
"type": "object",
33
+
"required": ["r", "g", "b"],
34
+
"properties": {
35
+
"r": {
36
+
"type": "integer",
37
+
"maximum": 255,
38
+
"minimum": 0
39
+
},
40
+
"g": {
41
+
"type": "integer",
42
+
"maximum": 255,
43
+
"minimum": 0
44
+
},
45
+
"b": {
46
+
"type": "integer",
47
+
"maximum": 255,
48
+
"minimum": 0
49
+
}
50
+
}
51
+
}
52
+
}
53
+
}
+4
packages/definitions/leaflet/lib/lexicons/index.ts
+4
packages/definitions/leaflet/lib/lexicons/index.ts
···
1
+
export * as PubLeafletBlocksCode from './types/pub/leaflet/blocks/code.js';
1
2
export * as PubLeafletBlocksHeader from './types/pub/leaflet/blocks/header.js';
2
3
export * as PubLeafletBlocksImage from './types/pub/leaflet/blocks/image.js';
4
+
export * as PubLeafletBlocksMath from './types/pub/leaflet/blocks/math.js';
3
5
export * as PubLeafletBlocksText from './types/pub/leaflet/blocks/text.js';
4
6
export * as PubLeafletBlocksUnorderedList from './types/pub/leaflet/blocks/unorderedList.js';
5
7
export * as PubLeafletBlocksWebsite from './types/pub/leaflet/blocks/website.js';
···
8
10
export * as PubLeafletPagesLinearDocument from './types/pub/leaflet/pages/linearDocument.js';
9
11
export * as PubLeafletPublication from './types/pub/leaflet/publication.js';
10
12
export * as PubLeafletRichtextFacet from './types/pub/leaflet/richtext/facet.js';
13
+
export * as PubLeafletThemeBackgroundImage from './types/pub/leaflet/theme/backgroundImage.js';
14
+
export * as PubLeafletThemeColor from './types/pub/leaflet/theme/color.js';
+17
packages/definitions/leaflet/lib/lexicons/types/pub/leaflet/blocks/code.ts
+17
packages/definitions/leaflet/lib/lexicons/types/pub/leaflet/blocks/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('pub.leaflet.blocks.code')),
6
+
language: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()),
7
+
plaintext: /*#__PURE__*/ v.string(),
8
+
syntaxHighlightingTheme: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()),
9
+
});
10
+
11
+
type main$schematype = typeof _mainSchema;
12
+
13
+
export interface mainSchema extends main$schematype {}
14
+
15
+
export const mainSchema = _mainSchema as mainSchema;
16
+
17
+
export interface Main extends v.InferInput<typeof mainSchema> {}
+15
packages/definitions/leaflet/lib/lexicons/types/pub/leaflet/blocks/math.ts
+15
packages/definitions/leaflet/lib/lexicons/types/pub/leaflet/blocks/math.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('pub.leaflet.blocks.math')),
6
+
tex: /*#__PURE__*/ v.string(),
7
+
});
8
+
9
+
type main$schematype = typeof _mainSchema;
10
+
11
+
export interface mainSchema extends main$schematype {}
12
+
13
+
export const mainSchema = _mainSchema as mainSchema;
14
+
15
+
export interface Main extends v.InferInput<typeof mainSchema> {}
+4
packages/definitions/leaflet/lib/lexicons/types/pub/leaflet/pages/linearDocument.ts
+4
packages/definitions/leaflet/lib/lexicons/types/pub/leaflet/pages/linearDocument.ts
···
1
1
import type {} from '@atcute/lexicons';
2
2
import * as v from '@atcute/lexicons/validations';
3
+
import * as PubLeafletBlocksCode from '../blocks/code.js';
3
4
import * as PubLeafletBlocksHeader from '../blocks/header.js';
4
5
import * as PubLeafletBlocksImage from '../blocks/image.js';
6
+
import * as PubLeafletBlocksMath from '../blocks/math.js';
5
7
import * as PubLeafletBlocksText from '../blocks/text.js';
6
8
import * as PubLeafletBlocksUnorderedList from '../blocks/unorderedList.js';
7
9
import * as PubLeafletBlocksWebsite from '../blocks/website.js';
···
13
15
),
14
16
get block() {
15
17
return /*#__PURE__*/ v.variant([
18
+
PubLeafletBlocksCode.mainSchema,
16
19
PubLeafletBlocksHeader.mainSchema,
17
20
PubLeafletBlocksImage.mainSchema,
21
+
PubLeafletBlocksMath.mainSchema,
18
22
PubLeafletBlocksText.mainSchema,
19
23
PubLeafletBlocksUnorderedList.mainSchema,
20
24
PubLeafletBlocksWebsite.mainSchema,
+52
packages/definitions/leaflet/lib/lexicons/types/pub/leaflet/publication.ts
+52
packages/definitions/leaflet/lib/lexicons/types/pub/leaflet/publication.ts
···
1
1
import type {} from '@atcute/lexicons';
2
2
import * as v from '@atcute/lexicons/validations';
3
3
import type {} from '@atcute/lexicons/ambient';
4
+
import * as PubLeafletThemeBackgroundImage from './theme/backgroundImage.js';
5
+
import * as PubLeafletThemeColor from './theme/color.js';
4
6
5
7
const _mainSchema = /*#__PURE__*/ v.record(
6
8
/*#__PURE__*/ v.tidString(),
···
12
14
),
13
15
icon: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.blob()),
14
16
name: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [/*#__PURE__*/ v.stringLength(0, 2000)]),
17
+
get preferences() {
18
+
return /*#__PURE__*/ v.optional(preferencesSchema);
19
+
},
20
+
get theme() {
21
+
return /*#__PURE__*/ v.optional(themeSchema);
22
+
},
15
23
}),
16
24
);
25
+
const _preferencesSchema = /*#__PURE__*/ v.object({
26
+
$type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('pub.leaflet.publication#preferences')),
27
+
showInDiscover: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.boolean(), true),
28
+
});
29
+
const _themeSchema = /*#__PURE__*/ v.object({
30
+
$type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('pub.leaflet.publication#theme')),
31
+
get accentBackground() {
32
+
return /*#__PURE__*/ v.optional(
33
+
/*#__PURE__*/ v.variant([PubLeafletThemeColor.rgbSchema, PubLeafletThemeColor.rgbaSchema]),
34
+
);
35
+
},
36
+
get accentText() {
37
+
return /*#__PURE__*/ v.optional(
38
+
/*#__PURE__*/ v.variant([PubLeafletThemeColor.rgbSchema, PubLeafletThemeColor.rgbaSchema]),
39
+
);
40
+
},
41
+
get backgroundColor() {
42
+
return /*#__PURE__*/ v.optional(
43
+
/*#__PURE__*/ v.variant([PubLeafletThemeColor.rgbSchema, PubLeafletThemeColor.rgbaSchema]),
44
+
);
45
+
},
46
+
get backgroundImage() {
47
+
return /*#__PURE__*/ v.optional(PubLeafletThemeBackgroundImage.mainSchema);
48
+
},
49
+
get pageBackground() {
50
+
return /*#__PURE__*/ v.optional(
51
+
/*#__PURE__*/ v.variant([PubLeafletThemeColor.rgbSchema, PubLeafletThemeColor.rgbaSchema]),
52
+
);
53
+
},
54
+
get primary() {
55
+
return /*#__PURE__*/ v.optional(
56
+
/*#__PURE__*/ v.variant([PubLeafletThemeColor.rgbSchema, PubLeafletThemeColor.rgbaSchema]),
57
+
);
58
+
},
59
+
showPageBackground: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.boolean(), false),
60
+
});
17
61
18
62
type main$schematype = typeof _mainSchema;
63
+
type preferences$schematype = typeof _preferencesSchema;
64
+
type theme$schematype = typeof _themeSchema;
19
65
20
66
export interface mainSchema extends main$schematype {}
67
+
export interface preferencesSchema extends preferences$schematype {}
68
+
export interface themeSchema extends theme$schematype {}
21
69
22
70
export const mainSchema = _mainSchema as mainSchema;
71
+
export const preferencesSchema = _preferencesSchema as preferencesSchema;
72
+
export const themeSchema = _themeSchema as themeSchema;
23
73
24
74
export interface Main extends v.InferInput<typeof mainSchema> {}
75
+
export interface Preferences extends v.InferInput<typeof preferencesSchema> {}
76
+
export interface Theme extends v.InferInput<typeof themeSchema> {}
25
77
26
78
declare module '@atcute/lexicons/ambient' {
27
79
interface Records {
+17
packages/definitions/leaflet/lib/lexicons/types/pub/leaflet/theme/backgroundImage.ts
+17
packages/definitions/leaflet/lib/lexicons/types/pub/leaflet/theme/backgroundImage.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('pub.leaflet.theme.backgroundImage')),
6
+
image: /*#__PURE__*/ v.blob(),
7
+
repeat: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.boolean()),
8
+
width: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.integer()),
9
+
});
10
+
11
+
type main$schematype = typeof _mainSchema;
12
+
13
+
export interface mainSchema extends main$schematype {}
14
+
15
+
export const mainSchema = _mainSchema as mainSchema;
16
+
17
+
export interface Main extends v.InferInput<typeof mainSchema> {}
+28
packages/definitions/leaflet/lib/lexicons/types/pub/leaflet/theme/color.ts
+28
packages/definitions/leaflet/lib/lexicons/types/pub/leaflet/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('pub.leaflet.theme.color#rgb')),
6
+
b: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [/*#__PURE__*/ v.integerRange(0, 255)]),
7
+
g: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [/*#__PURE__*/ v.integerRange(0, 255)]),
8
+
r: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [/*#__PURE__*/ v.integerRange(0, 255)]),
9
+
});
10
+
const _rgbaSchema = /*#__PURE__*/ v.object({
11
+
$type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('pub.leaflet.theme.color#rgba')),
12
+
a: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [/*#__PURE__*/ v.integerRange(0, 100)]),
13
+
b: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [/*#__PURE__*/ v.integerRange(0, 255)]),
14
+
g: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [/*#__PURE__*/ v.integerRange(0, 255)]),
15
+
r: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [/*#__PURE__*/ v.integerRange(0, 255)]),
16
+
});
17
+
18
+
type rgb$schematype = typeof _rgbSchema;
19
+
type rgba$schematype = typeof _rgbaSchema;
20
+
21
+
export interface rgbSchema extends rgb$schematype {}
22
+
export interface rgbaSchema extends rgba$schematype {}
23
+
24
+
export const rgbSchema = _rgbSchema as rgbSchema;
25
+
export const rgbaSchema = _rgbaSchema as rgbaSchema;
26
+
27
+
export interface Rgb extends v.InferInput<typeof rgbSchema> {}
28
+
export interface Rgba extends v.InferInput<typeof rgbaSchema> {}