@erudit-js/prose 4.0.0-dev.1 → 4.0.0-dev.2
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/dist/app/shared/invert.d.ts +2 -2
- package/dist/app/shared/invert.js +2 -2
- package/dist/elements/accent/Accent.vue +2 -2
- package/dist/elements/accent/AccentColumnSection.vue +2 -2
- package/dist/elements/accent/AccentRowSections.vue +1 -1
- package/dist/elements/accent/core.d.ts +2 -2
- package/dist/elements/callout/Callout.vue +6 -9
- package/dist/elements/callout/core.d.ts +3 -3
- package/dist/elements/details/Details.vue +1 -2
- package/dist/elements/diagram/core.d.ts +3 -3
- package/dist/elements/emphasis/Emphasis.vue +1 -1
- package/dist/elements/emphasis/core.d.ts +6 -6
- package/dist/elements/flex/Flex.vue +8 -2
- package/dist/elements/flex/core.d.ts +7 -3
- package/dist/elements/flex/core.js +4 -0
- package/dist/elements/gallery/core.d.ts +3 -3
- package/dist/elements/heading/Heading.vue +1 -1
- package/dist/elements/heading/core.d.ts +9 -9
- package/dist/elements/heading/core.js +14 -10
- package/dist/elements/horizontalLine/HorizontalLine.vue +1 -1
- package/dist/elements/image/core.d.ts +3 -3
- package/dist/elements/link/BlockLink.vue +1 -2
- package/dist/elements/link/Link.vue +4 -2
- package/dist/elements/list/List.vue +3 -6
- package/dist/elements/list/core.d.ts +3 -3
- package/dist/elements/math/block.d.ts +9 -9
- package/dist/elements/math/block.js +3 -3
- package/dist/elements/math/components/BlockMath.vue +1 -1
- package/dist/elements/math/components/MathGroup.vue +4 -4
- package/dist/elements/math/core.d.ts +2 -2
- package/dist/elements/math/inliner.d.ts +2 -2
- package/dist/elements/paragraph/Paragraph.vue +1 -1
- package/dist/elements/paragraph/core.d.ts +3 -3
- package/dist/elements/problem/components/ProblemButton.vue +2 -2
- package/dist/elements/problem/components/ProblemContainer.vue +1 -2
- package/dist/elements/problem/components/ProblemExpander.vue +1 -1
- package/dist/elements/problem/components/ProblemExpanderSection.vue +2 -3
- package/dist/elements/problem/components/ProblemHeader.vue +2 -6
- package/dist/elements/problem/components/Problems.vue +3 -3
- package/dist/elements/problem/components/expanders/Check.vue +2 -3
- package/dist/elements/problem/components/expanders/Checks.vue +1 -1
- package/dist/elements/problem/core.d.ts +44 -8
- package/dist/elements/problem/problem.d.ts +3 -3
- package/dist/elements/problem/problem.js +3 -2
- package/dist/elements/problem/problemContent.d.ts +42 -37
- package/dist/elements/problem/problemContent.js +86 -2
- package/dist/elements/problem/problems.d.ts +3 -3
- package/dist/elements/problem/problems.js +3 -2
- package/dist/elements/table/Table.vue +2 -4
- package/dist/elements/table/core.d.ts +3 -3
- package/dist/elements/video/core.d.ts +3 -3
- package/dist/include.js +0 -1
- package/dist/snippet.d.ts +24 -34
- package/dist/snippet.js +60 -31
- package/dist/tag.d.ts +3 -3
- package/dist/tag.js +1 -1
- package/package.json +2 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const lightInvert = "not-dark:invert not-dark:hue-rotate-180
|
|
2
|
-
export declare const darkInvert = "dark:invert dark:hue-rotate-180
|
|
1
|
+
export declare const lightInvert = "not-dark:invert not-dark:hue-rotate-180";
|
|
2
|
+
export declare const darkInvert = "dark:invert dark:hue-rotate-180";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const lightInvert = "not-dark:invert not-dark:hue-rotate-180
|
|
2
|
-
export const darkInvert = "dark:invert dark:hue-rotate-180
|
|
1
|
+
export const lightInvert = "not-dark:invert not-dark:hue-rotate-180";
|
|
2
|
+
export const darkInvert = "dark:invert dark:hue-rotate-180";
|
|
@@ -60,13 +60,13 @@ const accentOptions = (appElement as any)['accent'] as AccentAppOptions;
|
|
|
60
60
|
}"
|
|
61
61
|
:class="[
|
|
62
62
|
`rounded-xl border border-(--accentBorder)
|
|
63
|
-
bg-(--accentBackground)
|
|
63
|
+
bg-(--accentBackground)`,
|
|
64
64
|
]"
|
|
65
65
|
>
|
|
66
66
|
<div
|
|
67
67
|
class="text-main-lg flex items-center gap-(--proseAsideWidth)
|
|
68
68
|
px-(--proseAsideWidth) py-(--proseAsideWidth) font-semibold
|
|
69
|
-
text-(--accentText)
|
|
69
|
+
text-(--accentText)"
|
|
70
70
|
>
|
|
71
71
|
<EruditIcon
|
|
72
72
|
:name="accentIcon"
|
|
@@ -31,7 +31,7 @@ watchEffect(() => {
|
|
|
31
31
|
@click="opened = !opened"
|
|
32
32
|
class="group relative flex cursor-pointer items-center border-t
|
|
33
33
|
border-(--accentBorder) p-(--proseAsideWidth) font-medium
|
|
34
|
-
text-(--accentText)
|
|
34
|
+
text-(--accentText)"
|
|
35
35
|
>
|
|
36
36
|
<div class="flex-1">{{ title }}</div>
|
|
37
37
|
<button
|
|
@@ -49,7 +49,7 @@ watchEffect(() => {
|
|
|
49
49
|
<div
|
|
50
50
|
:class="[
|
|
51
51
|
`absolute bottom-0 left-0 w-full border-b border-dashed
|
|
52
|
-
border-(--accentBorder)
|
|
52
|
+
border-(--accentBorder)`,
|
|
53
53
|
opened ? 'opacity-100' : 'opacity-0',
|
|
54
54
|
]"
|
|
55
55
|
></div>
|
|
@@ -106,7 +106,7 @@ export declare function defineAccentCore<const I extends string, const J extends
|
|
|
106
106
|
} | {
|
|
107
107
|
row?: undefined;
|
|
108
108
|
column?: true;
|
|
109
|
-
}) & TagChildren)) & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet
|
|
109
|
+
}) & TagChildren)) & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet>;
|
|
110
110
|
registryItem: import("@jsprose/core").RegistryItem<{
|
|
111
111
|
name: `accent_${TDefinition["name"]}`;
|
|
112
112
|
type: "block";
|
|
@@ -179,7 +179,7 @@ export declare function defineAccentCore<const I extends string, const J extends
|
|
|
179
179
|
} | {
|
|
180
180
|
row?: undefined;
|
|
181
181
|
column?: true;
|
|
182
|
-
}) & TagChildren)) & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet
|
|
182
|
+
}) & TagChildren)) & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet>, {
|
|
183
183
|
tagName: K;
|
|
184
184
|
}>; }, undefined>;
|
|
185
185
|
};
|
|
@@ -25,23 +25,20 @@ const formatText = useFormatText();
|
|
|
25
25
|
:src="calloutStorage.resolvedIconSrc"
|
|
26
26
|
loading="lazy"
|
|
27
27
|
class="outline-border size-[60px] rounded-full border-2
|
|
28
|
-
border-transparent outline-2
|
|
28
|
+
border-transparent outline-2"
|
|
29
29
|
/>
|
|
30
30
|
</div>
|
|
31
31
|
<div
|
|
32
32
|
class="border-border/90 relative flex-1 rounded-xl border
|
|
33
|
-
bg-(--calloutBg) py-(--proseAsideWidth) font-serif
|
|
34
|
-
|
|
33
|
+
bg-(--calloutBg) py-(--proseAsideWidth) font-serif
|
|
34
|
+
shadow-md"
|
|
35
35
|
>
|
|
36
|
-
<div
|
|
37
|
-
:class="$style.
|
|
38
|
-
class="max-micro:hidden transition-[border]"
|
|
39
|
-
>
|
|
40
|
-
<div :class="$style.fill" class="transition-[border]"></div>
|
|
36
|
+
<div :class="$style.arrow" class="max-micro:hidden">
|
|
37
|
+
<div :class="$style.fill"></div>
|
|
41
38
|
</div>
|
|
42
39
|
<header
|
|
43
40
|
class="gap-small mb-(--proseAsideWidth) flex items-center
|
|
44
|
-
px-(--proseAsideWidth) font-semibold
|
|
41
|
+
px-(--proseAsideWidth) font-semibold"
|
|
45
42
|
>
|
|
46
43
|
<img
|
|
47
44
|
:src="calloutStorage.resolvedIconSrc"
|
|
@@ -27,7 +27,7 @@ export declare const Callout: import("@jsprose/core").Tag<"Callout", {
|
|
|
27
27
|
icon: string;
|
|
28
28
|
invert?: Invert;
|
|
29
29
|
title: string;
|
|
30
|
-
} & TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet
|
|
30
|
+
} & TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet>;
|
|
31
31
|
export declare const calloutRegistryItem: import("@jsprose/core").RegistryItem<{
|
|
32
32
|
name: "callout";
|
|
33
33
|
type: "block";
|
|
@@ -47,7 +47,7 @@ export declare const calloutRegistryItem: import("@jsprose/core").RegistryItem<{
|
|
|
47
47
|
icon: string;
|
|
48
48
|
invert?: Invert;
|
|
49
49
|
title: string;
|
|
50
|
-
} & TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet
|
|
50
|
+
} & TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet>;
|
|
51
51
|
}, undefined>;
|
|
52
52
|
declare const _default: {
|
|
53
53
|
registryItem: import("@jsprose/core").RegistryItem<{
|
|
@@ -69,7 +69,7 @@ declare const _default: {
|
|
|
69
69
|
icon: string;
|
|
70
70
|
invert?: Invert;
|
|
71
71
|
title: string;
|
|
72
|
-
} & TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet
|
|
72
|
+
} & TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet>;
|
|
73
73
|
}, undefined>;
|
|
74
74
|
};
|
|
75
75
|
export default _default;
|
|
@@ -30,8 +30,7 @@ const containsAnchor = useContainsAnchor(element);
|
|
|
30
30
|
<Block :element v-if="isAnchor || containsAnchor || mode !== 'static'">
|
|
31
31
|
<div
|
|
32
32
|
class="border-border bg-bg-accent/30 rounded-xl border-2
|
|
33
|
-
border-dashed
|
|
34
|
-
dark:border-white/30 dark:bg-white/5"
|
|
33
|
+
border-dashed dark:border-white/30 dark:bg-white/5"
|
|
35
34
|
>
|
|
36
35
|
<div class="text-text-muted p-(--proseAsideWidth) font-medium">
|
|
37
36
|
<EruditIcon
|
|
@@ -56,7 +56,7 @@ export declare const Diagram: import("@jsprose/core").Tag<"Diagram", {
|
|
|
56
56
|
Storage: undefined;
|
|
57
57
|
Children: import("@jsprose/core").InlinerSchema[];
|
|
58
58
|
}];
|
|
59
|
-
}, TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet
|
|
59
|
+
}, TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet>;
|
|
60
60
|
export declare const diagramRegistryItem: import("@jsprose/core").RegistryItem<{
|
|
61
61
|
name: "diagram";
|
|
62
62
|
type: "block";
|
|
@@ -114,7 +114,7 @@ export declare const diagramRegistryItem: import("@jsprose/core").RegistryItem<{
|
|
|
114
114
|
Storage: undefined;
|
|
115
115
|
Children: import("@jsprose/core").InlinerSchema[];
|
|
116
116
|
}];
|
|
117
|
-
}, TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet
|
|
117
|
+
}, TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet>;
|
|
118
118
|
}, undefined>;
|
|
119
119
|
declare const _default: {
|
|
120
120
|
registryItem: import("@jsprose/core").RegistryItem<{
|
|
@@ -174,7 +174,7 @@ declare const _default: {
|
|
|
174
174
|
Storage: undefined;
|
|
175
175
|
Children: import("@jsprose/core").InlinerSchema[];
|
|
176
176
|
}];
|
|
177
|
-
}, TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet
|
|
177
|
+
}, TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet>;
|
|
178
178
|
}, undefined>;
|
|
179
179
|
dependencies: {
|
|
180
180
|
mermaid: {
|
|
@@ -11,7 +11,7 @@ defineProps<{ element: ProseElement<typeof emphasisSchema> }>();
|
|
|
11
11
|
<strong
|
|
12
12
|
v-if="element.data.type === 'bold'"
|
|
13
13
|
:class="[
|
|
14
|
-
'font-semibold
|
|
14
|
+
'font-semibold',
|
|
15
15
|
element.data?.accent
|
|
16
16
|
? 'text-(--accentText,var(--color-text-deep))'
|
|
17
17
|
: 'text-text-deep',
|
|
@@ -22,7 +22,7 @@ export declare const B: import("@jsprose/core").Tag<"B", {
|
|
|
22
22
|
Children: InlinerSchema[];
|
|
23
23
|
}, {
|
|
24
24
|
accent?: boolean;
|
|
25
|
-
} & TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet
|
|
25
|
+
} & TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet>;
|
|
26
26
|
export declare const I: import("@jsprose/core").Tag<"I", {
|
|
27
27
|
name: "emphasis";
|
|
28
28
|
type: "inliner";
|
|
@@ -30,7 +30,7 @@ export declare const I: import("@jsprose/core").Tag<"I", {
|
|
|
30
30
|
Data: EmphasisData;
|
|
31
31
|
Storage: undefined;
|
|
32
32
|
Children: InlinerSchema[];
|
|
33
|
-
}, TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet
|
|
33
|
+
}, TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet>;
|
|
34
34
|
export declare const emphasisRegistryItem: import("@jsprose/core").RegistryItem<{
|
|
35
35
|
name: "emphasis";
|
|
36
36
|
type: "inliner";
|
|
@@ -48,7 +48,7 @@ export declare const emphasisRegistryItem: import("@jsprose/core").RegistryItem<
|
|
|
48
48
|
Children: InlinerSchema[];
|
|
49
49
|
}, {
|
|
50
50
|
accent?: boolean;
|
|
51
|
-
} & TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet
|
|
51
|
+
} & TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet>;
|
|
52
52
|
I: import("@jsprose/core").Tag<"I", {
|
|
53
53
|
name: "emphasis";
|
|
54
54
|
type: "inliner";
|
|
@@ -56,7 +56,7 @@ export declare const emphasisRegistryItem: import("@jsprose/core").RegistryItem<
|
|
|
56
56
|
Data: EmphasisData;
|
|
57
57
|
Storage: undefined;
|
|
58
58
|
Children: InlinerSchema[];
|
|
59
|
-
}, TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet
|
|
59
|
+
}, TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet>;
|
|
60
60
|
}, undefined>;
|
|
61
61
|
declare const _default: {
|
|
62
62
|
registryItem: import("@jsprose/core").RegistryItem<{
|
|
@@ -76,7 +76,7 @@ declare const _default: {
|
|
|
76
76
|
Children: InlinerSchema[];
|
|
77
77
|
}, {
|
|
78
78
|
accent?: boolean;
|
|
79
|
-
} & TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet
|
|
79
|
+
} & TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet>;
|
|
80
80
|
I: import("@jsprose/core").Tag<"I", {
|
|
81
81
|
name: "emphasis";
|
|
82
82
|
type: "inliner";
|
|
@@ -84,7 +84,7 @@ declare const _default: {
|
|
|
84
84
|
Data: EmphasisData;
|
|
85
85
|
Storage: undefined;
|
|
86
86
|
Children: InlinerSchema[];
|
|
87
|
-
}, TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet
|
|
87
|
+
}, TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet>;
|
|
88
88
|
}, undefined>;
|
|
89
89
|
};
|
|
90
90
|
export default _default;
|
|
@@ -22,8 +22,14 @@ const gap = (() => {
|
|
|
22
22
|
:style="{ justifyContent: justify, gap }"
|
|
23
23
|
class="flex flex-wrap items-center"
|
|
24
24
|
>
|
|
25
|
-
<template v-for="item of element.children">
|
|
26
|
-
<div
|
|
25
|
+
<template v-for="(item, i) of element.children">
|
|
26
|
+
<div
|
|
27
|
+
:style="{
|
|
28
|
+
flex: element.data?.flexes
|
|
29
|
+
? element.data.flexes[i]
|
|
30
|
+
: undefined,
|
|
31
|
+
}"
|
|
32
|
+
>
|
|
27
33
|
<Render :element="item" />
|
|
28
34
|
</div>
|
|
29
35
|
</template>
|
|
@@ -2,6 +2,7 @@ import { type BlockSchema, type TagChildren } from '@jsprose/core';
|
|
|
2
2
|
export interface FlexData {
|
|
3
3
|
gap?: string;
|
|
4
4
|
justifyContent?: string;
|
|
5
|
+
flexes?: string[];
|
|
5
6
|
}
|
|
6
7
|
export declare const flexSchema: {
|
|
7
8
|
name: "flex";
|
|
@@ -21,7 +22,8 @@ export declare const Flex: import("@jsprose/core").Tag<"Flex", {
|
|
|
21
22
|
}, {
|
|
22
23
|
gap?: string;
|
|
23
24
|
justify?: string;
|
|
24
|
-
|
|
25
|
+
flexes?: string[];
|
|
26
|
+
} & TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet>;
|
|
25
27
|
export declare const flexRegistryItem: import("@jsprose/core").RegistryItem<{
|
|
26
28
|
name: "flex";
|
|
27
29
|
type: "block";
|
|
@@ -40,7 +42,8 @@ export declare const flexRegistryItem: import("@jsprose/core").RegistryItem<{
|
|
|
40
42
|
}, {
|
|
41
43
|
gap?: string;
|
|
42
44
|
justify?: string;
|
|
43
|
-
|
|
45
|
+
flexes?: string[];
|
|
46
|
+
} & TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet>;
|
|
44
47
|
}, undefined>;
|
|
45
48
|
declare const _default: {
|
|
46
49
|
registryItem: import("@jsprose/core").RegistryItem<{
|
|
@@ -61,7 +64,8 @@ declare const _default: {
|
|
|
61
64
|
}, {
|
|
62
65
|
gap?: string;
|
|
63
66
|
justify?: string;
|
|
64
|
-
|
|
67
|
+
flexes?: string[];
|
|
68
|
+
} & TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet>;
|
|
65
69
|
}, undefined>;
|
|
66
70
|
};
|
|
67
71
|
export default _default;
|
|
@@ -20,6 +20,10 @@ export const Flex = defineEruditTag({
|
|
|
20
20
|
element.data = element.data || {};
|
|
21
21
|
element.data.justifyContent = props.justify;
|
|
22
22
|
}
|
|
23
|
+
if (props.flexes) {
|
|
24
|
+
element.data = element.data || {};
|
|
25
|
+
element.data.flexes = props.flexes;
|
|
26
|
+
}
|
|
23
27
|
});
|
|
24
28
|
export const flexRegistryItem = defineRegistryItem({
|
|
25
29
|
schema: flexSchema,
|
|
@@ -42,7 +42,7 @@ export declare const Gallery: import("@jsprose/core").Tag<"Gallery", {
|
|
|
42
42
|
Children: import("@jsprose/core").InlinerSchema[];
|
|
43
43
|
}] | undefined;
|
|
44
44
|
}[];
|
|
45
|
-
}, TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet
|
|
45
|
+
}, TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet>;
|
|
46
46
|
export declare const galleryRegistryItem: import("@jsprose/core").RegistryItem<{
|
|
47
47
|
name: "gallery";
|
|
48
48
|
type: "block";
|
|
@@ -86,7 +86,7 @@ export declare const galleryRegistryItem: import("@jsprose/core").RegistryItem<{
|
|
|
86
86
|
Children: import("@jsprose/core").InlinerSchema[];
|
|
87
87
|
}] | undefined;
|
|
88
88
|
}[];
|
|
89
|
-
}, TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet
|
|
89
|
+
}, TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet>;
|
|
90
90
|
}, undefined>;
|
|
91
91
|
declare const _default: {
|
|
92
92
|
registryItem: import("@jsprose/core").RegistryItem<{
|
|
@@ -132,7 +132,7 @@ declare const _default: {
|
|
|
132
132
|
Children: import("@jsprose/core").InlinerSchema[];
|
|
133
133
|
}] | undefined;
|
|
134
134
|
}[];
|
|
135
|
-
}, TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet
|
|
135
|
+
}, TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet>;
|
|
136
136
|
}, undefined>;
|
|
137
137
|
};
|
|
138
138
|
export default _default;
|
|
@@ -20,7 +20,7 @@ export declare const H1: import("@jsprose/core").Tag<"H1", {
|
|
|
20
20
|
Data: HeadingData;
|
|
21
21
|
Storage: undefined;
|
|
22
22
|
Children: undefined;
|
|
23
|
-
}, TagChildren & NoToc & import("../../snippet.js").ObjPropSnippet
|
|
23
|
+
}, TagChildren & NoToc & import("../../snippet.js").ObjPropSnippet>;
|
|
24
24
|
export declare const H2: import("@jsprose/core").Tag<"H2", {
|
|
25
25
|
name: "heading";
|
|
26
26
|
type: "block";
|
|
@@ -28,7 +28,7 @@ export declare const H2: import("@jsprose/core").Tag<"H2", {
|
|
|
28
28
|
Data: HeadingData;
|
|
29
29
|
Storage: undefined;
|
|
30
30
|
Children: undefined;
|
|
31
|
-
}, TagChildren & NoToc & import("../../snippet.js").ObjPropSnippet
|
|
31
|
+
}, TagChildren & NoToc & import("../../snippet.js").ObjPropSnippet>;
|
|
32
32
|
export declare const H3: import("@jsprose/core").Tag<"H3", {
|
|
33
33
|
name: "heading";
|
|
34
34
|
type: "block";
|
|
@@ -36,7 +36,7 @@ export declare const H3: import("@jsprose/core").Tag<"H3", {
|
|
|
36
36
|
Data: HeadingData;
|
|
37
37
|
Storage: undefined;
|
|
38
38
|
Children: undefined;
|
|
39
|
-
}, TagChildren & NoToc & import("../../snippet.js").ObjPropSnippet
|
|
39
|
+
}, TagChildren & NoToc & import("../../snippet.js").ObjPropSnippet>;
|
|
40
40
|
export declare const headingRegistryItem: import("@jsprose/core").RegistryItem<{
|
|
41
41
|
name: "heading";
|
|
42
42
|
type: "block";
|
|
@@ -52,7 +52,7 @@ export declare const headingRegistryItem: import("@jsprose/core").RegistryItem<{
|
|
|
52
52
|
Data: HeadingData;
|
|
53
53
|
Storage: undefined;
|
|
54
54
|
Children: undefined;
|
|
55
|
-
}, TagChildren & NoToc & import("../../snippet.js").ObjPropSnippet
|
|
55
|
+
}, TagChildren & NoToc & import("../../snippet.js").ObjPropSnippet>;
|
|
56
56
|
H2: import("@jsprose/core").Tag<"H2", {
|
|
57
57
|
name: "heading";
|
|
58
58
|
type: "block";
|
|
@@ -60,7 +60,7 @@ export declare const headingRegistryItem: import("@jsprose/core").RegistryItem<{
|
|
|
60
60
|
Data: HeadingData;
|
|
61
61
|
Storage: undefined;
|
|
62
62
|
Children: undefined;
|
|
63
|
-
}, TagChildren & NoToc & import("../../snippet.js").ObjPropSnippet
|
|
63
|
+
}, TagChildren & NoToc & import("../../snippet.js").ObjPropSnippet>;
|
|
64
64
|
H3: import("@jsprose/core").Tag<"H3", {
|
|
65
65
|
name: "heading";
|
|
66
66
|
type: "block";
|
|
@@ -68,7 +68,7 @@ export declare const headingRegistryItem: import("@jsprose/core").RegistryItem<{
|
|
|
68
68
|
Data: HeadingData;
|
|
69
69
|
Storage: undefined;
|
|
70
70
|
Children: undefined;
|
|
71
|
-
}, TagChildren & NoToc & import("../../snippet.js").ObjPropSnippet
|
|
71
|
+
}, TagChildren & NoToc & import("../../snippet.js").ObjPropSnippet>;
|
|
72
72
|
}, undefined>;
|
|
73
73
|
declare const _default: {
|
|
74
74
|
registryItem: import("@jsprose/core").RegistryItem<{
|
|
@@ -86,7 +86,7 @@ declare const _default: {
|
|
|
86
86
|
Data: HeadingData;
|
|
87
87
|
Storage: undefined;
|
|
88
88
|
Children: undefined;
|
|
89
|
-
}, TagChildren & NoToc & import("../../snippet.js").ObjPropSnippet
|
|
89
|
+
}, TagChildren & NoToc & import("../../snippet.js").ObjPropSnippet>;
|
|
90
90
|
H2: import("@jsprose/core").Tag<"H2", {
|
|
91
91
|
name: "heading";
|
|
92
92
|
type: "block";
|
|
@@ -94,7 +94,7 @@ declare const _default: {
|
|
|
94
94
|
Data: HeadingData;
|
|
95
95
|
Storage: undefined;
|
|
96
96
|
Children: undefined;
|
|
97
|
-
}, TagChildren & NoToc & import("../../snippet.js").ObjPropSnippet
|
|
97
|
+
}, TagChildren & NoToc & import("../../snippet.js").ObjPropSnippet>;
|
|
98
98
|
H3: import("@jsprose/core").Tag<"H3", {
|
|
99
99
|
name: "heading";
|
|
100
100
|
type: "block";
|
|
@@ -102,7 +102,7 @@ declare const _default: {
|
|
|
102
102
|
Data: HeadingData;
|
|
103
103
|
Storage: undefined;
|
|
104
104
|
Children: undefined;
|
|
105
|
-
}, TagChildren & NoToc & import("../../snippet.js").ObjPropSnippet
|
|
105
|
+
}, TagChildren & NoToc & import("../../snippet.js").ObjPropSnippet>;
|
|
106
106
|
}, undefined>;
|
|
107
107
|
};
|
|
108
108
|
export default _default;
|
|
@@ -9,22 +9,22 @@ export const headingSchema = defineSchema({
|
|
|
9
9
|
export const H1 = defineEruditTag({
|
|
10
10
|
tagName: "H1",
|
|
11
11
|
schema: headingSchema
|
|
12
|
-
})(({ tagName, element, children }) => {
|
|
13
|
-
processHeadingElement(1, tagName, element, children);
|
|
12
|
+
})(({ tagName, element, props, children }) => {
|
|
13
|
+
processHeadingElement(1, tagName, props, element, children);
|
|
14
14
|
});
|
|
15
15
|
export const H2 = defineEruditTag({
|
|
16
16
|
tagName: "H2",
|
|
17
17
|
schema: headingSchema
|
|
18
|
-
})(({ tagName, element, children }) => {
|
|
19
|
-
processHeadingElement(2, tagName, element, children);
|
|
18
|
+
})(({ tagName, element, props, children }) => {
|
|
19
|
+
processHeadingElement(2, tagName, props, element, children);
|
|
20
20
|
});
|
|
21
21
|
export const H3 = defineEruditTag({
|
|
22
22
|
tagName: "H3",
|
|
23
23
|
schema: headingSchema
|
|
24
|
-
})(({ tagName, element, children }) => {
|
|
25
|
-
processHeadingElement(3, tagName, element, children);
|
|
24
|
+
})(({ tagName, element, props, children }) => {
|
|
25
|
+
processHeadingElement(3, tagName, props, element, children);
|
|
26
26
|
});
|
|
27
|
-
function processHeadingElement(level, tagName, element, children) {
|
|
27
|
+
function processHeadingElement(level, tagName, props, element, children) {
|
|
28
28
|
ensureTagChild(tagName, children, textSchema);
|
|
29
29
|
const child = children[0];
|
|
30
30
|
const title = child.data.trim();
|
|
@@ -36,9 +36,13 @@ function processHeadingElement(level, tagName, element, children) {
|
|
|
36
36
|
title
|
|
37
37
|
};
|
|
38
38
|
element.title = title;
|
|
39
|
-
element.
|
|
40
|
-
element.
|
|
41
|
-
|
|
39
|
+
element.snippet ||= {};
|
|
40
|
+
element.snippet.search ??= true;
|
|
41
|
+
// Only auto-enable SEO if quick is set in props
|
|
42
|
+
// Otherwise explicitly disable it to prevent auto-enablement from search flag
|
|
43
|
+
if (!props.snippet?.quick) {
|
|
44
|
+
element.snippet.seo ??= false;
|
|
45
|
+
}
|
|
42
46
|
element.toc = { add: true };
|
|
43
47
|
}
|
|
44
48
|
export const headingRegistryItem = defineRegistryItem({
|
|
@@ -43,7 +43,7 @@ export declare const Image: import("@jsprose/core").Tag<"Image", {
|
|
|
43
43
|
invert?: Invert;
|
|
44
44
|
width?: string;
|
|
45
45
|
children?: {};
|
|
46
|
-
} & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet
|
|
46
|
+
} & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet>;
|
|
47
47
|
export declare const imageRegistryItem: import("@jsprose/core").RegistryItem<{
|
|
48
48
|
name: "image";
|
|
49
49
|
type: "block";
|
|
@@ -78,7 +78,7 @@ export declare const imageRegistryItem: import("@jsprose/core").RegistryItem<{
|
|
|
78
78
|
invert?: Invert;
|
|
79
79
|
width?: string;
|
|
80
80
|
children?: {};
|
|
81
|
-
} & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet
|
|
81
|
+
} & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet>;
|
|
82
82
|
}, undefined>;
|
|
83
83
|
declare const _default: {
|
|
84
84
|
registryItem: import("@jsprose/core").RegistryItem<{
|
|
@@ -115,7 +115,7 @@ declare const _default: {
|
|
|
115
115
|
invert?: Invert;
|
|
116
116
|
width?: string;
|
|
117
117
|
children?: {};
|
|
118
|
-
} & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet
|
|
118
|
+
} & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet>;
|
|
119
119
|
}, undefined>;
|
|
120
120
|
dependencies: {
|
|
121
121
|
photoswipe: {
|
|
@@ -79,8 +79,7 @@ switch (linkStorage.type) {
|
|
|
79
79
|
<EruditIcon
|
|
80
80
|
name="arrow/outward"
|
|
81
81
|
class="text-brand/15 group-hocus:text-brand/20 top-small
|
|
82
|
-
right-small absolute shrink-0 text-[60px]
|
|
83
|
-
transition-[color]"
|
|
82
|
+
right-small absolute shrink-0 text-[60px]"
|
|
84
83
|
/>
|
|
85
84
|
<div
|
|
86
85
|
class="text-brand/80 group-hocus:text-brand mb-small gap-small
|
|
@@ -82,13 +82,15 @@ function linkClick() {
|
|
|
82
82
|
bg-transparent px-(--xGap) pt-(--tGap) pb-(--bGap)
|
|
83
83
|
whitespace-nowrap underline
|
|
84
84
|
decoration-[color-mix(in_srgb,var(--color-brand)30%,transparent)]
|
|
85
|
-
decoration-2 underline-offset-2 transition-[
|
|
85
|
+
decoration-2 underline-offset-2 transition-[background]"
|
|
86
86
|
>
|
|
87
87
|
<EruditIcon
|
|
88
88
|
:name="icon"
|
|
89
89
|
class="micro:pr-1.5 inline pr-1 text-[1.3em]"
|
|
90
90
|
/>
|
|
91
|
-
<span
|
|
91
|
+
<span class="whitespace-normal">
|
|
92
|
+
{{ formatText(element.data.label) }}
|
|
93
|
+
</span>
|
|
92
94
|
</EruditLink>
|
|
93
95
|
</Inliner>
|
|
94
96
|
</template>
|
|
@@ -31,8 +31,7 @@ defineProps<{ element: ProseElement<typeof listSchema> }>();
|
|
|
31
31
|
>
|
|
32
32
|
<div
|
|
33
33
|
class="micro:left-[11px] bg-text-disabled micro:w-[2px]
|
|
34
|
-
absolute top-[3px] bottom-[5px] left-[9px] w-[1px]
|
|
35
|
-
transition-[background]"
|
|
34
|
+
absolute top-[3px] bottom-[5px] left-[9px] w-[1px]"
|
|
36
35
|
></div>
|
|
37
36
|
<div class="relative shrink-0">
|
|
38
37
|
<div
|
|
@@ -40,8 +39,7 @@ defineProps<{ element: ProseElement<typeof listSchema> }>();
|
|
|
40
39
|
top-[3px] flex size-[20px] items-center
|
|
41
40
|
justify-center rounded-full border
|
|
42
41
|
border-(--liBorder) bg-(--liBackground)
|
|
43
|
-
font-semibold text-(--liText)
|
|
44
|
-
transition-[border,background,color]"
|
|
42
|
+
font-semibold text-(--liText)"
|
|
45
43
|
>
|
|
46
44
|
<template v-if="element.data.type === 'ol'">
|
|
47
45
|
<div class="micro:text-[13px] text-[10px]">
|
|
@@ -50,8 +48,7 @@ defineProps<{ element: ProseElement<typeof listSchema> }>();
|
|
|
50
48
|
</template>
|
|
51
49
|
<template v-else>
|
|
52
50
|
<div
|
|
53
|
-
class="size-1.5 rounded-full bg-(--liText)
|
|
54
|
-
transition-[background]"
|
|
51
|
+
class="size-1.5 rounded-full bg-(--liText)"
|
|
55
52
|
></div>
|
|
56
53
|
</template>
|
|
57
54
|
</div>
|
|
@@ -56,7 +56,7 @@ export declare const List: import("@jsprose/core").Tag<"List", {
|
|
|
56
56
|
start?: number;
|
|
57
57
|
} | {
|
|
58
58
|
type: "ul";
|
|
59
|
-
}) & TagChildren) & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet
|
|
59
|
+
}) & TagChildren) & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet>;
|
|
60
60
|
export declare const listItemRegistryItem: import("@jsprose/core").RegistryItem<{
|
|
61
61
|
name: "listItem";
|
|
62
62
|
type: "block";
|
|
@@ -108,7 +108,7 @@ export declare const listRegistryItem: import("@jsprose/core").RegistryItem<{
|
|
|
108
108
|
start?: number;
|
|
109
109
|
} | {
|
|
110
110
|
type: "ul";
|
|
111
|
-
}) & TagChildren) & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet
|
|
111
|
+
}) & TagChildren) & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet>;
|
|
112
112
|
}, undefined>;
|
|
113
113
|
declare const _default: [{
|
|
114
114
|
registryItem: import("@jsprose/core").RegistryItem<{
|
|
@@ -163,7 +163,7 @@ declare const _default: [{
|
|
|
163
163
|
start?: number;
|
|
164
164
|
} | {
|
|
165
165
|
type: "ul";
|
|
166
|
-
}) & TagChildren) & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet
|
|
166
|
+
}) & TagChildren) & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet>;
|
|
167
167
|
}, undefined>;
|
|
168
168
|
}];
|
|
169
169
|
export default _default;
|