@erudit-js/prose 4.1.1 → 4.2.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/dist/app/appElement.d.ts +7 -6
- package/dist/app/appElement.js +1 -1
- package/dist/app/composables/anchor.d.ts +7 -7
- package/dist/app/composables/appElement.d.ts +4 -4
- package/dist/app/composables/appElement.js +3 -3
- package/dist/app/composables/context.d.ts +3 -2
- package/dist/app/composables/elementIcon.d.ts +2 -2
- package/dist/app/composables/elementIcon.js +1 -1
- package/dist/app/composables/language.d.ts +2 -2
- package/dist/app/composables/language.js +1 -1
- package/dist/app/composables/storage.d.ts +4 -4
- package/dist/app/composables/storage.js +0 -4
- package/dist/app/default/Mix.vue +2 -2
- package/dist/app/default/Text.vue +2 -2
- package/dist/app/shared/Prose.vue +3 -3
- package/dist/app/shared/Render.vue +5 -14
- package/dist/app/shared/block/AsideMenu.vue +2 -2
- package/dist/app/shared/block/AsideMenuCopyLink.vue +1 -1
- package/dist/app/shared/block/Block.vue +4 -4
- package/dist/app/shared/inliner/Inliner.vue +2 -2
- package/dist/coreElement.d.ts +25 -7
- package/dist/coreElement.js +2 -2
- package/dist/elements/accent/Accent.vue +4 -4
- package/dist/elements/accent/AccentColumnSection.vue +2 -2
- package/dist/elements/accent/AccentRowSections.vue +2 -2
- package/dist/elements/accent/app.d.ts +3 -3
- package/dist/elements/accent/app.js +2 -2
- package/dist/elements/accent/core.d.ts +61 -300
- package/dist/elements/accent/core.js +83 -68
- package/dist/elements/callout/Callout.vue +4 -4
- package/dist/elements/callout/app.d.ts +1 -8
- package/dist/elements/callout/app.js +2 -2
- package/dist/elements/callout/core.d.ts +21 -59
- package/dist/elements/callout/core.js +18 -17
- package/dist/elements/caption/Caption.vue +3 -3
- package/dist/elements/caption/app.d.ts +1 -8
- package/dist/elements/caption/app.js +2 -2
- package/dist/elements/caption/core.d.ts +21 -99
- package/dist/elements/caption/core.js +18 -22
- package/dist/elements/details/Details.vue +3 -3
- package/dist/elements/details/app.d.ts +1 -8
- package/dist/elements/details/app.js +2 -2
- package/dist/elements/details/core.d.ts +18 -61
- package/dist/elements/details/core.js +16 -11
- package/dist/elements/diagram/Diagram.vue +14 -11
- package/dist/elements/diagram/app.d.ts +1 -29
- package/dist/elements/diagram/app.js +2 -2
- package/dist/elements/diagram/core.d.ts +14 -177
- package/dist/elements/diagram/core.js +5 -8
- package/dist/elements/emphasis/Emphasis.vue +3 -3
- package/dist/elements/emphasis/app.d.ts +1 -8
- package/dist/elements/emphasis/app.js +2 -2
- package/dist/elements/emphasis/core.d.ts +13 -76
- package/dist/elements/emphasis/core.js +8 -9
- package/dist/elements/flex/Flex.vue +3 -3
- package/dist/elements/flex/app.d.ts +1 -8
- package/dist/elements/flex/app.js +2 -2
- package/dist/elements/flex/core.d.ts +16 -58
- package/dist/elements/flex/core.js +6 -7
- package/dist/elements/gallery/Gallery.vue +3 -3
- package/dist/elements/gallery/app.d.ts +1 -22
- package/dist/elements/gallery/app.js +2 -2
- package/dist/elements/gallery/core.d.ts +11 -132
- package/dist/elements/gallery/core.js +4 -5
- package/dist/elements/heading/Heading.vue +3 -3
- package/dist/elements/heading/_global.d.ts +2 -2
- package/dist/elements/heading/app.d.ts +1 -8
- package/dist/elements/heading/app.js +2 -2
- package/dist/elements/heading/core.d.ts +13 -97
- package/dist/elements/heading/core.js +8 -8
- package/dist/elements/horizontalLine/app.d.ts +1 -8
- package/dist/elements/horizontalLine/app.js +2 -2
- package/dist/elements/horizontalLine/core.d.ts +9 -47
- package/dist/elements/horizontalLine/core.js +4 -5
- package/dist/elements/image/Image.vue +3 -3
- package/dist/elements/image/ImageElement.vue +4 -4
- package/dist/elements/image/app.d.ts +1 -15
- package/dist/elements/image/app.js +2 -2
- package/dist/elements/image/core.d.ts +29 -108
- package/dist/elements/image/core.js +12 -19
- package/dist/elements/image/storage.d.ts +1 -1
- package/dist/elements/image/storage.js +6 -6
- package/dist/elements/lineBreak/app.d.ts +1 -8
- package/dist/elements/lineBreak/app.js +2 -2
- package/dist/elements/lineBreak/core.d.ts +9 -47
- package/dist/elements/lineBreak/core.js +4 -5
- package/dist/elements/link/BlockLink.vue +4 -6
- package/dist/elements/link/Link.vue +4 -4
- package/dist/elements/link/core.d.ts +6 -6
- package/dist/elements/link/core.js +4 -3
- package/dist/elements/link/dependency/app.d.ts +1 -15
- package/dist/elements/link/dependency/app.js +3 -3
- package/dist/elements/link/dependency/core.d.ts +27 -105
- package/dist/elements/link/dependency/core.js +6 -8
- package/dist/elements/link/hook.d.ts +12 -0
- package/dist/elements/link/hook.js +45 -0
- package/dist/elements/link/reference/app.d.ts +1 -15
- package/dist/elements/link/reference/app.js +3 -3
- package/dist/elements/link/reference/core.d.ts +24 -103
- package/dist/elements/link/reference/core.js +6 -8
- package/dist/elements/link/storage.js +1 -1
- package/dist/elements/list/List.vue +7 -5
- package/dist/elements/list/_global.d.ts +3 -3
- package/dist/elements/list/app.d.ts +1 -15
- package/dist/elements/list/app.js +2 -2
- package/dist/elements/list/core.d.ts +33 -155
- package/dist/elements/list/core.js +20 -18
- package/dist/elements/math/app.d.ts +1 -15
- package/dist/elements/math/app.js +3 -3
- package/dist/elements/math/block.d.ts +31 -43
- package/dist/elements/math/block.js +10 -9
- package/dist/elements/math/components/BlockMath.vue +4 -4
- package/dist/elements/math/components/InlinerMath.vue +4 -4
- package/dist/elements/math/core.d.ts +25 -53
- package/dist/elements/math/core.js +3 -11
- package/dist/elements/math/inliner.d.ts +24 -36
- package/dist/elements/math/inliner.js +10 -12
- package/dist/elements/paragraph/Paragraph.vue +3 -3
- package/dist/elements/paragraph/app.d.ts +1 -8
- package/dist/elements/paragraph/app.js +2 -2
- package/dist/elements/paragraph/core.d.ts +12 -53
- package/dist/elements/paragraph/core.js +6 -7
- package/dist/elements/problem/app.d.ts +1 -29
- package/dist/elements/problem/app.js +4 -4
- package/dist/elements/problem/components/Problem.vue +3 -3
- package/dist/elements/problem/components/ProblemContent.vue +15 -21
- package/dist/elements/problem/components/ProblemExpanderSection.vue +2 -2
- package/dist/elements/problem/components/Problems.vue +11 -7
- package/dist/elements/problem/components/SubProblem.vue +3 -4
- package/dist/elements/problem/components/expanders/Check.vue +3 -3
- package/dist/elements/problem/components/expanders/Checks.vue +6 -3
- package/dist/elements/problem/components/expanders/DefaultPlusSections.vue +3 -7
- package/dist/elements/problem/components/expanders/Hint.vue +3 -3
- package/dist/elements/problem/composables/problemScript.d.ts +2 -2
- package/dist/elements/problem/core.d.ts +63 -299
- package/dist/elements/problem/core.js +9 -11
- package/dist/elements/problem/hook.d.ts +1 -0
- package/dist/elements/problem/hook.js +14 -0
- package/dist/elements/problem/problem.d.ts +20 -77
- package/dist/elements/problem/problem.js +6 -6
- package/dist/elements/problem/problemCheck.d.ts +33 -83
- package/dist/elements/problem/problemCheck.js +16 -10
- package/dist/elements/problem/problemContent.d.ts +54 -401
- package/dist/elements/problem/problemContent.js +47 -58
- package/dist/elements/problem/problemScript.d.ts +18 -10
- package/dist/elements/problem/problemScript.js +15 -26
- package/dist/elements/problem/problems.d.ts +29 -188
- package/dist/elements/problem/problems.js +11 -15
- package/dist/elements/problem/storage.d.ts +1 -1
- package/dist/elements/problem/storage.js +2 -3
- package/dist/elements/table/Table.vue +3 -3
- package/dist/elements/table/app.d.ts +1 -29
- package/dist/elements/table/app.js +2 -2
- package/dist/elements/table/core.d.ts +28 -309
- package/dist/elements/table/core.js +17 -29
- package/dist/elements/video/Video.vue +4 -4
- package/dist/elements/video/app.d.ts +1 -15
- package/dist/elements/video/app.js +2 -2
- package/dist/elements/video/core.d.ts +26 -106
- package/dist/elements/video/core.js +11 -16
- package/dist/elements/video/storage.d.ts +1 -1
- package/dist/elements/video/storage.js +2 -3
- package/dist/error.d.ts +3 -0
- package/dist/error.js +6 -0
- package/dist/include.d.ts +4 -4
- package/dist/include.js +6 -12
- package/dist/index.d.ts +11 -11
- package/dist/index.js +11 -11
- package/dist/rawElement.d.ts +9 -6
- package/dist/rawElement.js +4 -0
- package/dist/rawToProse/countSchemas.d.ts +1 -0
- package/dist/rawToProse/countSchemas.js +11 -0
- package/dist/rawToProse/hook.d.ts +39 -0
- package/dist/rawToProse/hook.js +6 -0
- package/dist/rawToProse/index.d.ts +34 -0
- package/dist/rawToProse/index.js +92 -0
- package/dist/rawToProse/uniqueTitles.d.ts +1 -0
- package/dist/rawToProse/uniqueTitles.js +11 -0
- package/dist/shared/filePath.js +31 -4
- package/dist/shared/paragraphWrap.d.ts +3 -3
- package/dist/shared/paragraphWrap.js +7 -12
- package/dist/slugify/index.d.ts +3 -1
- package/dist/slugify/index.js +5 -6
- package/dist/slugify/languages/en.js +1 -1
- package/dist/slugify/languages/ru.js +1 -1
- package/dist/snippet.d.ts +39 -33
- package/dist/snippet.js +139 -73
- package/dist/tag.d.ts +22 -19
- package/dist/tag.js +19 -15
- package/dist/toc.d.ts +12 -18
- package/dist/toc.js +120 -42
- package/package.json +8 -7
- package/dist/app/default/Inliners.vue +0 -11
- package/dist/context.d.ts +0 -4
- package/dist/context.js +0 -1
- package/dist/elements/link/step.d.ts +0 -16
- package/dist/elements/link/step.js +0 -36
- package/dist/elements/problem/step.d.ts +0 -5
- package/dist/elements/problem/step.js +0 -13
- package/dist/resolve.d.ts +0 -21
- package/dist/resolve.js +0 -102
- package/dist/resolveStep.d.ts +0 -9
- package/dist/resolveStep.js +0 -3
- package/dist/title.d.ts +0 -8
- package/dist/title.js +0 -6
- package/dist/utils/docs.d.ts +0 -1
- package/dist/utils/docs.js +0 -22
- /package/{types.d.ts → raw.d.ts} +0 -0
|
@@ -1,324 +1,43 @@
|
|
|
1
|
-
import { type InlinerSchema, type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { type InlinerSchema, type Schema } from 'tsprose';
|
|
2
|
+
import { type CaptionSchema } from '../caption/core.js';
|
|
3
|
+
export interface TableDataSchema extends Schema {
|
|
4
|
+
name: 'tableData';
|
|
5
|
+
type: 'inliner';
|
|
5
6
|
linkable: false;
|
|
6
7
|
Data: undefined;
|
|
7
8
|
Storage: undefined;
|
|
8
9
|
Children: InlinerSchema[];
|
|
9
|
-
}
|
|
10
|
-
export declare const
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
}
|
|
11
|
+
export declare const tableDataSchema: TableDataSchema;
|
|
12
|
+
export declare const Td: import("../../tag.js").ToEruditTag<TableDataSchema, "Td", unknown>;
|
|
13
|
+
export interface TableRowSchema extends Schema {
|
|
14
|
+
name: 'tableRow';
|
|
15
|
+
type: 'inliner';
|
|
13
16
|
linkable: false;
|
|
14
17
|
Data: undefined;
|
|
15
18
|
Storage: undefined;
|
|
16
|
-
Children:
|
|
17
|
-
}
|
|
18
|
-
export declare const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
Storage: undefined;
|
|
24
|
-
Children: InlinerSchema[];
|
|
25
|
-
}, {
|
|
26
|
-
Td: import("@jsprose/core").Tag<"Td", {
|
|
27
|
-
name: "tableData";
|
|
28
|
-
type: "inliner";
|
|
29
|
-
linkable: false;
|
|
30
|
-
Data: undefined;
|
|
31
|
-
Storage: undefined;
|
|
32
|
-
Children: InlinerSchema[];
|
|
33
|
-
}, TagChildren>;
|
|
34
|
-
}, undefined>;
|
|
35
|
-
export declare const tableRowSchema: {
|
|
36
|
-
name: "tableRow";
|
|
37
|
-
type: "inliner";
|
|
38
|
-
linkable: false;
|
|
39
|
-
Data: undefined;
|
|
40
|
-
Storage: undefined;
|
|
41
|
-
Children: {
|
|
42
|
-
name: "tableData";
|
|
43
|
-
type: "inliner";
|
|
44
|
-
linkable: false;
|
|
45
|
-
Data: undefined;
|
|
46
|
-
Storage: undefined;
|
|
47
|
-
Children: InlinerSchema[];
|
|
48
|
-
}[];
|
|
49
|
-
};
|
|
50
|
-
export declare const Tr: import("@jsprose/core").Tag<"Tr", {
|
|
51
|
-
name: "tableRow";
|
|
52
|
-
type: "inliner";
|
|
53
|
-
linkable: false;
|
|
54
|
-
Data: undefined;
|
|
55
|
-
Storage: undefined;
|
|
56
|
-
Children: {
|
|
57
|
-
name: "tableData";
|
|
58
|
-
type: "inliner";
|
|
59
|
-
linkable: false;
|
|
60
|
-
Data: undefined;
|
|
61
|
-
Storage: undefined;
|
|
62
|
-
Children: InlinerSchema[];
|
|
63
|
-
}[];
|
|
64
|
-
}, TagChildren>;
|
|
65
|
-
export declare const tableRowRegistryItem: import("@jsprose/core").RegistryItem<{
|
|
66
|
-
name: "tableRow";
|
|
67
|
-
type: "inliner";
|
|
68
|
-
linkable: false;
|
|
69
|
-
Data: undefined;
|
|
70
|
-
Storage: undefined;
|
|
71
|
-
Children: {
|
|
72
|
-
name: "tableData";
|
|
73
|
-
type: "inliner";
|
|
74
|
-
linkable: false;
|
|
75
|
-
Data: undefined;
|
|
76
|
-
Storage: undefined;
|
|
77
|
-
Children: InlinerSchema[];
|
|
78
|
-
}[];
|
|
79
|
-
}, {
|
|
80
|
-
Tr: import("@jsprose/core").Tag<"Tr", {
|
|
81
|
-
name: "tableRow";
|
|
82
|
-
type: "inliner";
|
|
83
|
-
linkable: false;
|
|
84
|
-
Data: undefined;
|
|
85
|
-
Storage: undefined;
|
|
86
|
-
Children: {
|
|
87
|
-
name: "tableData";
|
|
88
|
-
type: "inliner";
|
|
89
|
-
linkable: false;
|
|
90
|
-
Data: undefined;
|
|
91
|
-
Storage: undefined;
|
|
92
|
-
Children: InlinerSchema[];
|
|
93
|
-
}[];
|
|
94
|
-
}, TagChildren>;
|
|
95
|
-
}, undefined>;
|
|
96
|
-
export declare const tableSchema: {
|
|
97
|
-
name: "table";
|
|
98
|
-
type: "block";
|
|
19
|
+
Children: TableDataSchema[];
|
|
20
|
+
}
|
|
21
|
+
export declare const tableRowSchema: TableRowSchema;
|
|
22
|
+
export declare const Tr: import("../../tag.js").ToEruditTag<TableRowSchema, "Tr", unknown>;
|
|
23
|
+
export interface TableSchema extends Schema {
|
|
24
|
+
name: 'table';
|
|
25
|
+
type: 'block';
|
|
99
26
|
linkable: true;
|
|
100
27
|
Data: undefined;
|
|
101
28
|
Storage: undefined;
|
|
102
|
-
Children: (
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
Data: import("../caption/core.js").CaptionData | undefined;
|
|
107
|
-
Storage: undefined;
|
|
108
|
-
Children: InlinerSchema[];
|
|
109
|
-
} | {
|
|
110
|
-
name: "tableRow";
|
|
111
|
-
type: "inliner";
|
|
112
|
-
linkable: false;
|
|
113
|
-
Data: undefined;
|
|
114
|
-
Storage: undefined;
|
|
115
|
-
Children: {
|
|
116
|
-
name: "tableData";
|
|
117
|
-
type: "inliner";
|
|
118
|
-
linkable: false;
|
|
119
|
-
Data: undefined;
|
|
120
|
-
Storage: undefined;
|
|
121
|
-
Children: InlinerSchema[];
|
|
122
|
-
}[];
|
|
123
|
-
})[];
|
|
124
|
-
};
|
|
125
|
-
export declare const Table: import("@jsprose/core").Tag<"Table", {
|
|
126
|
-
name: "table";
|
|
127
|
-
type: "block";
|
|
128
|
-
linkable: true;
|
|
129
|
-
Data: undefined;
|
|
130
|
-
Storage: undefined;
|
|
131
|
-
Children: ({
|
|
132
|
-
name: "caption";
|
|
133
|
-
type: "inliner";
|
|
134
|
-
linkable: false;
|
|
135
|
-
Data: import("../caption/core.js").CaptionData | undefined;
|
|
136
|
-
Storage: undefined;
|
|
137
|
-
Children: InlinerSchema[];
|
|
138
|
-
} | {
|
|
139
|
-
name: "tableRow";
|
|
140
|
-
type: "inliner";
|
|
141
|
-
linkable: false;
|
|
142
|
-
Data: undefined;
|
|
143
|
-
Storage: undefined;
|
|
144
|
-
Children: {
|
|
145
|
-
name: "tableData";
|
|
146
|
-
type: "inliner";
|
|
147
|
-
linkable: false;
|
|
148
|
-
Data: undefined;
|
|
149
|
-
Storage: undefined;
|
|
150
|
-
Children: InlinerSchema[];
|
|
151
|
-
}[];
|
|
152
|
-
})[];
|
|
153
|
-
}, TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet>;
|
|
154
|
-
export declare const tableRegistryItem: import("@jsprose/core").RegistryItem<{
|
|
155
|
-
name: "table";
|
|
156
|
-
type: "block";
|
|
157
|
-
linkable: true;
|
|
158
|
-
Data: undefined;
|
|
159
|
-
Storage: undefined;
|
|
160
|
-
Children: ({
|
|
161
|
-
name: "caption";
|
|
162
|
-
type: "inliner";
|
|
163
|
-
linkable: false;
|
|
164
|
-
Data: import("../caption/core.js").CaptionData | undefined;
|
|
165
|
-
Storage: undefined;
|
|
166
|
-
Children: InlinerSchema[];
|
|
167
|
-
} | {
|
|
168
|
-
name: "tableRow";
|
|
169
|
-
type: "inliner";
|
|
170
|
-
linkable: false;
|
|
171
|
-
Data: undefined;
|
|
172
|
-
Storage: undefined;
|
|
173
|
-
Children: {
|
|
174
|
-
name: "tableData";
|
|
175
|
-
type: "inliner";
|
|
176
|
-
linkable: false;
|
|
177
|
-
Data: undefined;
|
|
178
|
-
Storage: undefined;
|
|
179
|
-
Children: InlinerSchema[];
|
|
180
|
-
}[];
|
|
181
|
-
})[];
|
|
182
|
-
}, {
|
|
183
|
-
Table: import("@jsprose/core").Tag<"Table", {
|
|
184
|
-
name: "table";
|
|
185
|
-
type: "block";
|
|
186
|
-
linkable: true;
|
|
187
|
-
Data: undefined;
|
|
188
|
-
Storage: undefined;
|
|
189
|
-
Children: ({
|
|
190
|
-
name: "caption";
|
|
191
|
-
type: "inliner";
|
|
192
|
-
linkable: false;
|
|
193
|
-
Data: import("../caption/core.js").CaptionData | undefined;
|
|
194
|
-
Storage: undefined;
|
|
195
|
-
Children: InlinerSchema[];
|
|
196
|
-
} | {
|
|
197
|
-
name: "tableRow";
|
|
198
|
-
type: "inliner";
|
|
199
|
-
linkable: false;
|
|
200
|
-
Data: undefined;
|
|
201
|
-
Storage: undefined;
|
|
202
|
-
Children: {
|
|
203
|
-
name: "tableData";
|
|
204
|
-
type: "inliner";
|
|
205
|
-
linkable: false;
|
|
206
|
-
Data: undefined;
|
|
207
|
-
Storage: undefined;
|
|
208
|
-
Children: InlinerSchema[];
|
|
209
|
-
}[];
|
|
210
|
-
})[];
|
|
211
|
-
}, TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet>;
|
|
212
|
-
}, undefined>;
|
|
29
|
+
Children: (TableRowSchema | CaptionSchema)[];
|
|
30
|
+
}
|
|
31
|
+
export declare const tableSchema: TableSchema;
|
|
32
|
+
export declare const Table: import("../../tag.js").ToEruditTag<TableSchema, "Table", unknown>;
|
|
213
33
|
declare const _default: [{
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
type: "inliner";
|
|
217
|
-
linkable: false;
|
|
218
|
-
Data: undefined;
|
|
219
|
-
Storage: undefined;
|
|
220
|
-
Children: InlinerSchema[];
|
|
221
|
-
}, {
|
|
222
|
-
Td: import("@jsprose/core").Tag<"Td", {
|
|
223
|
-
name: "tableData";
|
|
224
|
-
type: "inliner";
|
|
225
|
-
linkable: false;
|
|
226
|
-
Data: undefined;
|
|
227
|
-
Storage: undefined;
|
|
228
|
-
Children: InlinerSchema[];
|
|
229
|
-
}, TagChildren>;
|
|
230
|
-
}, undefined>;
|
|
34
|
+
readonly schema: TableDataSchema;
|
|
35
|
+
readonly tags: [import("../../tag.js").ToEruditTag<TableDataSchema, "Td", unknown>];
|
|
231
36
|
}, {
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
type: "inliner";
|
|
235
|
-
linkable: false;
|
|
236
|
-
Data: undefined;
|
|
237
|
-
Storage: undefined;
|
|
238
|
-
Children: {
|
|
239
|
-
name: "tableData";
|
|
240
|
-
type: "inliner";
|
|
241
|
-
linkable: false;
|
|
242
|
-
Data: undefined;
|
|
243
|
-
Storage: undefined;
|
|
244
|
-
Children: InlinerSchema[];
|
|
245
|
-
}[];
|
|
246
|
-
}, {
|
|
247
|
-
Tr: import("@jsprose/core").Tag<"Tr", {
|
|
248
|
-
name: "tableRow";
|
|
249
|
-
type: "inliner";
|
|
250
|
-
linkable: false;
|
|
251
|
-
Data: undefined;
|
|
252
|
-
Storage: undefined;
|
|
253
|
-
Children: {
|
|
254
|
-
name: "tableData";
|
|
255
|
-
type: "inliner";
|
|
256
|
-
linkable: false;
|
|
257
|
-
Data: undefined;
|
|
258
|
-
Storage: undefined;
|
|
259
|
-
Children: InlinerSchema[];
|
|
260
|
-
}[];
|
|
261
|
-
}, TagChildren>;
|
|
262
|
-
}, undefined>;
|
|
37
|
+
readonly schema: TableRowSchema;
|
|
38
|
+
readonly tags: [import("../../tag.js").ToEruditTag<TableRowSchema, "Tr", unknown>];
|
|
263
39
|
}, {
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
type: "block";
|
|
267
|
-
linkable: true;
|
|
268
|
-
Data: undefined;
|
|
269
|
-
Storage: undefined;
|
|
270
|
-
Children: ({
|
|
271
|
-
name: "caption";
|
|
272
|
-
type: "inliner";
|
|
273
|
-
linkable: false;
|
|
274
|
-
Data: import("../caption/core.js").CaptionData | undefined;
|
|
275
|
-
Storage: undefined;
|
|
276
|
-
Children: InlinerSchema[];
|
|
277
|
-
} | {
|
|
278
|
-
name: "tableRow";
|
|
279
|
-
type: "inliner";
|
|
280
|
-
linkable: false;
|
|
281
|
-
Data: undefined;
|
|
282
|
-
Storage: undefined;
|
|
283
|
-
Children: {
|
|
284
|
-
name: "tableData";
|
|
285
|
-
type: "inliner";
|
|
286
|
-
linkable: false;
|
|
287
|
-
Data: undefined;
|
|
288
|
-
Storage: undefined;
|
|
289
|
-
Children: InlinerSchema[];
|
|
290
|
-
}[];
|
|
291
|
-
})[];
|
|
292
|
-
}, {
|
|
293
|
-
Table: import("@jsprose/core").Tag<"Table", {
|
|
294
|
-
name: "table";
|
|
295
|
-
type: "block";
|
|
296
|
-
linkable: true;
|
|
297
|
-
Data: undefined;
|
|
298
|
-
Storage: undefined;
|
|
299
|
-
Children: ({
|
|
300
|
-
name: "caption";
|
|
301
|
-
type: "inliner";
|
|
302
|
-
linkable: false;
|
|
303
|
-
Data: import("../caption/core.js").CaptionData | undefined;
|
|
304
|
-
Storage: undefined;
|
|
305
|
-
Children: InlinerSchema[];
|
|
306
|
-
} | {
|
|
307
|
-
name: "tableRow";
|
|
308
|
-
type: "inliner";
|
|
309
|
-
linkable: false;
|
|
310
|
-
Data: undefined;
|
|
311
|
-
Storage: undefined;
|
|
312
|
-
Children: {
|
|
313
|
-
name: "tableData";
|
|
314
|
-
type: "inliner";
|
|
315
|
-
linkable: false;
|
|
316
|
-
Data: undefined;
|
|
317
|
-
Storage: undefined;
|
|
318
|
-
Children: InlinerSchema[];
|
|
319
|
-
}[];
|
|
320
|
-
})[];
|
|
321
|
-
}, TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet>;
|
|
322
|
-
}, undefined>;
|
|
40
|
+
readonly schema: TableSchema;
|
|
41
|
+
readonly tags: [import("../../tag.js").ToEruditTag<TableSchema, "Table", unknown>];
|
|
323
42
|
}];
|
|
324
43
|
export default _default;
|
|
@@ -1,34 +1,24 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineSchema, ensureTagChildren, ensureTagInlinerChildren } from "tsprose";
|
|
2
2
|
import { defineEruditTag } from "../../tag.js";
|
|
3
3
|
import { captionSchema } from "../caption/core.js";
|
|
4
|
-
import {
|
|
5
|
-
//
|
|
6
|
-
// Table Data
|
|
7
|
-
//
|
|
4
|
+
import { defineProseCoreElements } from "../../coreElement.js";
|
|
8
5
|
export const tableDataSchema = defineSchema({
|
|
9
6
|
name: "tableData",
|
|
10
7
|
type: "inliner",
|
|
11
8
|
linkable: false
|
|
12
|
-
})
|
|
9
|
+
});
|
|
13
10
|
export const Td = defineEruditTag({
|
|
14
11
|
tagName: "Td",
|
|
15
12
|
schema: tableDataSchema
|
|
16
|
-
})(({ element, children, tagName
|
|
17
|
-
ensureTagInlinerChildren(tagName, children
|
|
13
|
+
})(({ element, children, tagName }) => {
|
|
14
|
+
ensureTagInlinerChildren(tagName, children);
|
|
18
15
|
element.children = children;
|
|
19
16
|
});
|
|
20
|
-
export const tableDataRegistryItem = defineRegistryItem({
|
|
21
|
-
schema: tableDataSchema,
|
|
22
|
-
tags: [Td]
|
|
23
|
-
});
|
|
24
|
-
//
|
|
25
|
-
// Table Row
|
|
26
|
-
//
|
|
27
17
|
export const tableRowSchema = defineSchema({
|
|
28
18
|
name: "tableRow",
|
|
29
19
|
type: "inliner",
|
|
30
20
|
linkable: false
|
|
31
|
-
})
|
|
21
|
+
});
|
|
32
22
|
export const Tr = defineEruditTag({
|
|
33
23
|
tagName: "Tr",
|
|
34
24
|
schema: tableRowSchema
|
|
@@ -36,18 +26,11 @@ export const Tr = defineEruditTag({
|
|
|
36
26
|
ensureTagChildren(tagName, children, tableDataSchema);
|
|
37
27
|
element.children = children;
|
|
38
28
|
});
|
|
39
|
-
export const tableRowRegistryItem = defineRegistryItem({
|
|
40
|
-
schema: tableRowSchema,
|
|
41
|
-
tags: [Tr]
|
|
42
|
-
});
|
|
43
|
-
//
|
|
44
|
-
// Table
|
|
45
|
-
//
|
|
46
29
|
export const tableSchema = defineSchema({
|
|
47
30
|
name: "table",
|
|
48
31
|
type: "block",
|
|
49
32
|
linkable: true
|
|
50
|
-
})
|
|
33
|
+
});
|
|
51
34
|
export const Table = defineEruditTag({
|
|
52
35
|
tagName: "Table",
|
|
53
36
|
schema: tableSchema
|
|
@@ -55,11 +38,16 @@ export const Table = defineEruditTag({
|
|
|
55
38
|
ensureTagChildren(tagName, children, [tableRowSchema, captionSchema]);
|
|
56
39
|
element.children = children;
|
|
57
40
|
});
|
|
58
|
-
|
|
41
|
+
//
|
|
42
|
+
// Core Elements
|
|
43
|
+
//
|
|
44
|
+
export default defineProseCoreElements({
|
|
45
|
+
schema: tableDataSchema,
|
|
46
|
+
tags: [Td]
|
|
47
|
+
}, {
|
|
48
|
+
schema: tableRowSchema,
|
|
49
|
+
tags: [Tr]
|
|
50
|
+
}, {
|
|
59
51
|
schema: tableSchema,
|
|
60
52
|
tags: [Table]
|
|
61
53
|
});
|
|
62
|
-
//
|
|
63
|
-
// Erudit Core Elements
|
|
64
|
-
//
|
|
65
|
-
export default defineEruditProseCoreElements({ registryItem: tableDataRegistryItem }, { registryItem: tableRowRegistryItem }, { registryItem: tableRegistryItem });
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
import { onMounted, onUnmounted, ref, useTemplateRef } from 'vue';
|
|
3
|
-
import type {
|
|
3
|
+
import type { ToProseElement } from 'tsprose';
|
|
4
4
|
|
|
5
|
-
import type {
|
|
5
|
+
import type { VideoSchema } from './core.js';
|
|
6
6
|
import { useElementStorage } from '../../app/composables/storage.js';
|
|
7
7
|
import { lightInvert, darkInvert } from '../../app/shared/invert.js';
|
|
8
8
|
import Block from '../../app/shared/block/Block.vue';
|
|
9
9
|
import Caption from '../caption/Caption.vue';
|
|
10
10
|
|
|
11
11
|
const { element } = defineProps<{
|
|
12
|
-
element:
|
|
12
|
+
element: ToProseElement<VideoSchema>;
|
|
13
13
|
}>();
|
|
14
|
-
const videoStorage = await useElementStorage
|
|
14
|
+
const videoStorage = await useElementStorage(element);
|
|
15
15
|
|
|
16
16
|
const videoElement = useTemplateRef('video');
|
|
17
17
|
const observer = ref<IntersectionObserver | null>(null);
|
|
@@ -1,16 +1,2 @@
|
|
|
1
|
-
declare const _default: import("../../app/appElement.js").
|
|
2
|
-
name: "video";
|
|
3
|
-
type: "block";
|
|
4
|
-
linkable: true;
|
|
5
|
-
Data: import("./core.js").VideoData;
|
|
6
|
-
Storage: import("./core.js").VideoStorage;
|
|
7
|
-
Children: [{
|
|
8
|
-
name: "caption";
|
|
9
|
-
type: "inliner";
|
|
10
|
-
linkable: false;
|
|
11
|
-
Data: import("../caption/core.js").CaptionData | undefined;
|
|
12
|
-
Storage: undefined;
|
|
13
|
-
Children: import("@jsprose/core").InlinerSchema[];
|
|
14
|
-
}] | undefined;
|
|
15
|
-
}>;
|
|
1
|
+
declare const _default: import("../../app/appElement.js").ProseAppElement<import("./core.js").VideoSchema>;
|
|
16
2
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineProseAppElement } from "../../app/appElement.js";
|
|
2
2
|
import { videoSchema } from "./core.js";
|
|
3
|
-
export default
|
|
3
|
+
export default defineProseAppElement({
|
|
4
4
|
schema: videoSchema,
|
|
5
5
|
component: () => import("./Video.vue"),
|
|
6
6
|
languages: {
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
+
import { type Schema } from 'tsprose';
|
|
1
2
|
import type { Invert } from '../../shared/invert.js';
|
|
3
|
+
import { captionSchema } from '../caption/core.js';
|
|
4
|
+
export interface VideoSchema extends Schema {
|
|
5
|
+
name: 'video';
|
|
6
|
+
type: 'block';
|
|
7
|
+
linkable: true;
|
|
8
|
+
Data: VideoData;
|
|
9
|
+
Storage: VideoStorage;
|
|
10
|
+
Children: [typeof captionSchema] | undefined;
|
|
11
|
+
}
|
|
2
12
|
export interface VideoData {
|
|
3
13
|
src: string;
|
|
4
14
|
autoplay?: boolean;
|
|
@@ -8,121 +18,31 @@ export interface VideoData {
|
|
|
8
18
|
export interface VideoStorage {
|
|
9
19
|
resolvedSrc: string;
|
|
10
20
|
}
|
|
11
|
-
export declare const videoSchema:
|
|
12
|
-
|
|
13
|
-
type: "block";
|
|
14
|
-
linkable: true;
|
|
15
|
-
Data: VideoData;
|
|
16
|
-
Storage: VideoStorage;
|
|
17
|
-
Children: [{
|
|
18
|
-
name: "caption";
|
|
19
|
-
type: "inliner";
|
|
20
|
-
linkable: false;
|
|
21
|
-
Data: import("../caption/core.js").CaptionData | undefined;
|
|
22
|
-
Storage: undefined;
|
|
23
|
-
Children: import("@jsprose/core").InlinerSchema[];
|
|
24
|
-
}] | undefined;
|
|
25
|
-
};
|
|
26
|
-
export declare const Video: import("@jsprose/core").Tag<"Video", {
|
|
27
|
-
name: "video";
|
|
28
|
-
type: "block";
|
|
29
|
-
linkable: true;
|
|
30
|
-
Data: VideoData;
|
|
31
|
-
Storage: VideoStorage;
|
|
32
|
-
Children: [{
|
|
33
|
-
name: "caption";
|
|
34
|
-
type: "inliner";
|
|
35
|
-
linkable: false;
|
|
36
|
-
Data: import("../caption/core.js").CaptionData | undefined;
|
|
37
|
-
Storage: undefined;
|
|
38
|
-
Children: import("@jsprose/core").InlinerSchema[];
|
|
39
|
-
}] | undefined;
|
|
40
|
-
}, {
|
|
21
|
+
export declare const videoSchema: VideoSchema;
|
|
22
|
+
export declare const Video: import("../../tag.js").ToEruditTag<VideoSchema, "Video", {
|
|
41
23
|
src: string;
|
|
42
24
|
autoplay?: boolean;
|
|
43
25
|
invert?: Invert;
|
|
44
26
|
width?: string;
|
|
45
27
|
children?: {};
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
linkable: true;
|
|
51
|
-
Data: VideoData;
|
|
52
|
-
Storage: VideoStorage;
|
|
53
|
-
Children: [{
|
|
54
|
-
name: "caption";
|
|
55
|
-
type: "inliner";
|
|
56
|
-
linkable: false;
|
|
57
|
-
Data: import("../caption/core.js").CaptionData | undefined;
|
|
58
|
-
Storage: undefined;
|
|
59
|
-
Children: import("@jsprose/core").InlinerSchema[];
|
|
60
|
-
}] | undefined;
|
|
61
|
-
}, {
|
|
62
|
-
Video: import("@jsprose/core").Tag<"Video", {
|
|
63
|
-
name: "video";
|
|
64
|
-
type: "block";
|
|
65
|
-
linkable: true;
|
|
66
|
-
Data: VideoData;
|
|
67
|
-
Storage: VideoStorage;
|
|
68
|
-
Children: [{
|
|
69
|
-
name: "caption";
|
|
70
|
-
type: "inliner";
|
|
71
|
-
linkable: false;
|
|
72
|
-
Data: import("../caption/core.js").CaptionData | undefined;
|
|
73
|
-
Storage: undefined;
|
|
74
|
-
Children: import("@jsprose/core").InlinerSchema[];
|
|
75
|
-
}] | undefined;
|
|
76
|
-
}, {
|
|
28
|
+
}>;
|
|
29
|
+
declare const _default: {
|
|
30
|
+
readonly schema: VideoSchema;
|
|
31
|
+
readonly tags: [import("../../tag.js").ToEruditTag<VideoSchema, "Video", {
|
|
77
32
|
src: string;
|
|
78
33
|
autoplay?: boolean;
|
|
79
34
|
invert?: Invert;
|
|
80
35
|
width?: string;
|
|
81
36
|
children?: {};
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
name: "caption";
|
|
93
|
-
type: "inliner";
|
|
94
|
-
linkable: false;
|
|
95
|
-
Data: import("../caption/core.js").CaptionData | undefined;
|
|
96
|
-
Storage: undefined;
|
|
97
|
-
Children: import("@jsprose/core").InlinerSchema[];
|
|
98
|
-
}] | undefined;
|
|
99
|
-
}, {
|
|
100
|
-
Video: import("@jsprose/core").Tag<"Video", {
|
|
101
|
-
name: "video";
|
|
102
|
-
type: "block";
|
|
103
|
-
linkable: true;
|
|
104
|
-
Data: VideoData;
|
|
105
|
-
Storage: VideoStorage;
|
|
106
|
-
Children: [{
|
|
107
|
-
name: "caption";
|
|
108
|
-
type: "inliner";
|
|
109
|
-
linkable: false;
|
|
110
|
-
Data: import("../caption/core.js").CaptionData | undefined;
|
|
111
|
-
Storage: undefined;
|
|
112
|
-
Children: import("@jsprose/core").InlinerSchema[];
|
|
113
|
-
}] | undefined;
|
|
114
|
-
}, {
|
|
115
|
-
src: string;
|
|
116
|
-
autoplay?: boolean;
|
|
117
|
-
invert?: Invert;
|
|
118
|
-
width?: string;
|
|
119
|
-
children?: {};
|
|
120
|
-
} & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet>;
|
|
121
|
-
}, undefined>;
|
|
37
|
+
}>];
|
|
38
|
+
readonly rawToProseHook: ({ result }: {
|
|
39
|
+
task: import("../../index.js").EruditRawToProseTask;
|
|
40
|
+
result: import("../../index.js").EruditRawToProseResult;
|
|
41
|
+
}) => {
|
|
42
|
+
matchStep: ({ rawElement }: {
|
|
43
|
+
rawElement: import("../../rawElement.js").ToEruditRawElement<VideoSchema>;
|
|
44
|
+
proseElement: import("tsprose").ProseElement;
|
|
45
|
+
}) => void;
|
|
46
|
+
};
|
|
122
47
|
};
|
|
123
48
|
export default _default;
|
|
124
|
-
export declare const videoSrcStep: ({ rawElement }: {
|
|
125
|
-
context: import("../../context.js").EruditProseContext;
|
|
126
|
-
rawElement: import("../../rawElement.js").EruditRawElement<import("@jsprose/core").AnySchema>;
|
|
127
|
-
proseElement: import("@jsprose/core").ProseElement<import("@jsprose/core").AnySchema>;
|
|
128
|
-
}) => string | undefined;
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineSchema, ensureTagChildren } from "tsprose";
|
|
2
2
|
import { captionSchema } from "../caption/core.js";
|
|
3
3
|
import { defineEruditTag } from "../../tag.js";
|
|
4
|
-
import {
|
|
5
|
-
import { defineResolveStep } from "../../resolveStep.js";
|
|
4
|
+
import { defineProseCoreElement } from "../../coreElement.js";
|
|
6
5
|
export const videoSchema = defineSchema({
|
|
7
6
|
name: "video",
|
|
8
7
|
type: "block",
|
|
9
8
|
linkable: true
|
|
10
|
-
})
|
|
9
|
+
});
|
|
11
10
|
export const Video = defineEruditTag({
|
|
12
11
|
tagName: "Video",
|
|
13
12
|
schema: videoSchema
|
|
14
13
|
})(({ element, tagName, props, children }) => {
|
|
15
14
|
if (children) {
|
|
16
|
-
|
|
17
|
-
element.children = children;
|
|
15
|
+
ensureTagChildren(tagName, children, captionSchema);
|
|
16
|
+
element.children = [children[0]];
|
|
18
17
|
}
|
|
19
18
|
element.data = { src: props.src };
|
|
20
19
|
element.storageKey = props.src;
|
|
@@ -28,16 +27,12 @@ export const Video = defineEruditTag({
|
|
|
28
27
|
element.data.invert = props.invert;
|
|
29
28
|
}
|
|
30
29
|
});
|
|
31
|
-
export
|
|
30
|
+
export default defineProseCoreElement({
|
|
32
31
|
schema: videoSchema,
|
|
33
|
-
tags: [Video]
|
|
34
|
-
})
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
//
|
|
39
|
-
export const videoSrcStep = defineResolveStep(({ rawElement }) => {
|
|
40
|
-
if (isRawElement(rawElement, videoSchema)) {
|
|
41
|
-
return rawElement.data.src;
|
|
32
|
+
tags: [Video],
|
|
33
|
+
rawToProseHook: ({ result }) => {
|
|
34
|
+
return { matchStep: ({ rawElement }) => {
|
|
35
|
+
result.files.add(rawElement.data.src);
|
|
36
|
+
} };
|
|
42
37
|
}
|
|
43
38
|
});
|