@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
|
@@ -9,16 +9,16 @@ import {
|
|
|
9
9
|
useId,
|
|
10
10
|
useTemplateRef,
|
|
11
11
|
} from 'vue';
|
|
12
|
-
import type {
|
|
12
|
+
import type { ToProseElement } from 'tsprose';
|
|
13
13
|
|
|
14
|
-
import type {
|
|
14
|
+
import type { DiagramSchema } from './core.js';
|
|
15
15
|
import { usePhotoSwipe } from '../../app/shared/photoswipe/composable.js';
|
|
16
16
|
import { useProseContext } from '../../app/composables/context.js';
|
|
17
17
|
import Caption from '../caption/Caption.vue';
|
|
18
18
|
import Block from '../../app/shared/block/Block.vue';
|
|
19
19
|
|
|
20
20
|
const { element } = defineProps<{
|
|
21
|
-
element:
|
|
21
|
+
element: ToProseElement<DiagramSchema>;
|
|
22
22
|
}>();
|
|
23
23
|
|
|
24
24
|
let isWebkit = ref<boolean>();
|
|
@@ -282,7 +282,7 @@ async function renderDiagram() {
|
|
|
282
282
|
[data-prose-accent] & {
|
|
283
283
|
--arrowColor: color-mix(
|
|
284
284
|
in hsl,
|
|
285
|
-
var(--accentText)
|
|
285
|
+
var(--accentText) 70%,
|
|
286
286
|
var(--accentBackground)
|
|
287
287
|
);
|
|
288
288
|
|
|
@@ -310,12 +310,12 @@ async function renderDiagram() {
|
|
|
310
310
|
:global(.node) ellipse {
|
|
311
311
|
fill: color-mix(
|
|
312
312
|
in hsl,
|
|
313
|
-
var(--accentText)
|
|
313
|
+
var(--accentText) 25%,
|
|
314
314
|
var(--accentBackground)
|
|
315
315
|
) !important;
|
|
316
316
|
stroke: color-mix(
|
|
317
317
|
in hsl,
|
|
318
|
-
var(--accentText)
|
|
318
|
+
var(--accentText) 80%,
|
|
319
319
|
var(--accentBackground)
|
|
320
320
|
) !important;
|
|
321
321
|
}
|
|
@@ -333,7 +333,11 @@ async function renderDiagram() {
|
|
|
333
333
|
polygon,
|
|
334
334
|
circle,
|
|
335
335
|
ellipse {
|
|
336
|
-
fill: color-mix(
|
|
336
|
+
fill: color-mix(
|
|
337
|
+
in hsl,
|
|
338
|
+
var(--color-brand) 50%,
|
|
339
|
+
var(--color-text-dimmed)
|
|
340
|
+
) !important;
|
|
337
341
|
stroke: transparent !important;
|
|
338
342
|
}
|
|
339
343
|
|
|
@@ -343,10 +347,9 @@ async function renderDiagram() {
|
|
|
343
347
|
polygon,
|
|
344
348
|
circle,
|
|
345
349
|
ellipse {
|
|
346
|
-
fill:
|
|
347
|
-
in hsl,
|
|
348
|
-
var(--accentText)
|
|
349
|
-
var(--accentBackground)
|
|
350
|
+
fill: light-dark(
|
|
351
|
+
color-mix(in hsl, var(--accentText) 90%, var(--color-bg-root)),
|
|
352
|
+
color-mix(in hsl, var(--accentText) 65%, var(--color-bg-root))
|
|
350
353
|
) !important;
|
|
351
354
|
stroke: transparent !important;
|
|
352
355
|
}
|
|
@@ -1,30 +1,2 @@
|
|
|
1
|
-
declare const _default: import("../../app/appElement.js").
|
|
2
|
-
name: "diagram";
|
|
3
|
-
type: "block";
|
|
4
|
-
linkable: true;
|
|
5
|
-
Data: undefined;
|
|
6
|
-
Storage: undefined;
|
|
7
|
-
Children: [{
|
|
8
|
-
name: "text";
|
|
9
|
-
type: "inliner";
|
|
10
|
-
linkable: false;
|
|
11
|
-
Data: string;
|
|
12
|
-
Storage: undefined;
|
|
13
|
-
Children: undefined;
|
|
14
|
-
}] | [{
|
|
15
|
-
name: "text";
|
|
16
|
-
type: "inliner";
|
|
17
|
-
linkable: false;
|
|
18
|
-
Data: string;
|
|
19
|
-
Storage: undefined;
|
|
20
|
-
Children: undefined;
|
|
21
|
-
}, {
|
|
22
|
-
name: "caption";
|
|
23
|
-
type: "inliner";
|
|
24
|
-
linkable: false;
|
|
25
|
-
Data: import("../caption/core.js").CaptionData | undefined;
|
|
26
|
-
Storage: undefined;
|
|
27
|
-
Children: import("@jsprose/core").InlinerSchema[];
|
|
28
|
-
}];
|
|
29
|
-
}>;
|
|
1
|
+
declare const _default: import("../../app/appElement.js").ProseAppElement<import("./core.js").DiagramSchema>;
|
|
30
2
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineProseAppElement } from "../../app/appElement.js";
|
|
2
2
|
import { diagramSchema } from "./core.js";
|
|
3
|
-
export default
|
|
3
|
+
export default defineProseAppElement({
|
|
4
4
|
schema: diagramSchema,
|
|
5
5
|
component: () => import("./Diagram.vue"),
|
|
6
6
|
languages: {
|
|
@@ -1,187 +1,24 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { type Schema, type TextSchema } from 'tsprose';
|
|
2
|
+
import { type CaptionSchema } from '../caption/core.js';
|
|
3
|
+
export interface DiagramSchema extends Schema {
|
|
4
|
+
name: 'diagram';
|
|
5
|
+
type: 'block';
|
|
5
6
|
linkable: true;
|
|
6
7
|
Data: undefined;
|
|
7
8
|
Storage: undefined;
|
|
8
|
-
Children: [
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
Data: string;
|
|
13
|
-
Storage: undefined;
|
|
14
|
-
Children: undefined;
|
|
15
|
-
}] | [{
|
|
16
|
-
name: "text";
|
|
17
|
-
type: "inliner";
|
|
18
|
-
linkable: false;
|
|
19
|
-
Data: string;
|
|
20
|
-
Storage: undefined;
|
|
21
|
-
Children: undefined;
|
|
22
|
-
}, {
|
|
23
|
-
name: "caption";
|
|
24
|
-
type: "inliner";
|
|
25
|
-
linkable: false;
|
|
26
|
-
Data: import("../caption/core.js").CaptionData | undefined;
|
|
27
|
-
Storage: undefined;
|
|
28
|
-
Children: import("@jsprose/core").InlinerSchema[];
|
|
29
|
-
}];
|
|
30
|
-
};
|
|
31
|
-
export declare const Diagram: import("@jsprose/core").Tag<"Diagram", {
|
|
32
|
-
name: "diagram";
|
|
33
|
-
type: "block";
|
|
34
|
-
linkable: true;
|
|
35
|
-
Data: undefined;
|
|
36
|
-
Storage: undefined;
|
|
37
|
-
Children: [{
|
|
38
|
-
name: "text";
|
|
39
|
-
type: "inliner";
|
|
40
|
-
linkable: false;
|
|
41
|
-
Data: string;
|
|
42
|
-
Storage: undefined;
|
|
43
|
-
Children: undefined;
|
|
44
|
-
}] | [{
|
|
45
|
-
name: "text";
|
|
46
|
-
type: "inliner";
|
|
47
|
-
linkable: false;
|
|
48
|
-
Data: string;
|
|
49
|
-
Storage: undefined;
|
|
50
|
-
Children: undefined;
|
|
51
|
-
}, {
|
|
52
|
-
name: "caption";
|
|
53
|
-
type: "inliner";
|
|
54
|
-
linkable: false;
|
|
55
|
-
Data: import("../caption/core.js").CaptionData | undefined;
|
|
56
|
-
Storage: undefined;
|
|
57
|
-
Children: import("@jsprose/core").InlinerSchema[];
|
|
58
|
-
}];
|
|
59
|
-
}, TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet>;
|
|
60
|
-
export declare const diagramRegistryItem: import("@jsprose/core").RegistryItem<{
|
|
61
|
-
name: "diagram";
|
|
62
|
-
type: "block";
|
|
63
|
-
linkable: true;
|
|
64
|
-
Data: undefined;
|
|
65
|
-
Storage: undefined;
|
|
66
|
-
Children: [{
|
|
67
|
-
name: "text";
|
|
68
|
-
type: "inliner";
|
|
69
|
-
linkable: false;
|
|
70
|
-
Data: string;
|
|
71
|
-
Storage: undefined;
|
|
72
|
-
Children: undefined;
|
|
73
|
-
}] | [{
|
|
74
|
-
name: "text";
|
|
75
|
-
type: "inliner";
|
|
76
|
-
linkable: false;
|
|
77
|
-
Data: string;
|
|
78
|
-
Storage: undefined;
|
|
79
|
-
Children: undefined;
|
|
80
|
-
}, {
|
|
81
|
-
name: "caption";
|
|
82
|
-
type: "inliner";
|
|
83
|
-
linkable: false;
|
|
84
|
-
Data: import("../caption/core.js").CaptionData | undefined;
|
|
85
|
-
Storage: undefined;
|
|
86
|
-
Children: import("@jsprose/core").InlinerSchema[];
|
|
87
|
-
}];
|
|
88
|
-
}, {
|
|
89
|
-
Diagram: import("@jsprose/core").Tag<"Diagram", {
|
|
90
|
-
name: "diagram";
|
|
91
|
-
type: "block";
|
|
92
|
-
linkable: true;
|
|
93
|
-
Data: undefined;
|
|
94
|
-
Storage: undefined;
|
|
95
|
-
Children: [{
|
|
96
|
-
name: "text";
|
|
97
|
-
type: "inliner";
|
|
98
|
-
linkable: false;
|
|
99
|
-
Data: string;
|
|
100
|
-
Storage: undefined;
|
|
101
|
-
Children: undefined;
|
|
102
|
-
}] | [{
|
|
103
|
-
name: "text";
|
|
104
|
-
type: "inliner";
|
|
105
|
-
linkable: false;
|
|
106
|
-
Data: string;
|
|
107
|
-
Storage: undefined;
|
|
108
|
-
Children: undefined;
|
|
109
|
-
}, {
|
|
110
|
-
name: "caption";
|
|
111
|
-
type: "inliner";
|
|
112
|
-
linkable: false;
|
|
113
|
-
Data: import("../caption/core.js").CaptionData | undefined;
|
|
114
|
-
Storage: undefined;
|
|
115
|
-
Children: import("@jsprose/core").InlinerSchema[];
|
|
116
|
-
}];
|
|
117
|
-
}, TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet>;
|
|
118
|
-
}, undefined>;
|
|
9
|
+
Children: [TextSchema] | [TextSchema, CaptionSchema];
|
|
10
|
+
}
|
|
11
|
+
export declare const diagramSchema: DiagramSchema;
|
|
12
|
+
export declare const Diagram: import("../../tag.js").ToEruditTag<DiagramSchema, "Diagram", unknown>;
|
|
119
13
|
declare const _default: {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
Data: undefined;
|
|
125
|
-
Storage: undefined;
|
|
126
|
-
Children: [{
|
|
127
|
-
name: "text";
|
|
128
|
-
type: "inliner";
|
|
129
|
-
linkable: false;
|
|
130
|
-
Data: string;
|
|
131
|
-
Storage: undefined;
|
|
132
|
-
Children: undefined;
|
|
133
|
-
}] | [{
|
|
134
|
-
name: "text";
|
|
135
|
-
type: "inliner";
|
|
136
|
-
linkable: false;
|
|
137
|
-
Data: string;
|
|
138
|
-
Storage: undefined;
|
|
139
|
-
Children: undefined;
|
|
140
|
-
}, {
|
|
141
|
-
name: "caption";
|
|
142
|
-
type: "inliner";
|
|
143
|
-
linkable: false;
|
|
144
|
-
Data: import("../caption/core.js").CaptionData | undefined;
|
|
145
|
-
Storage: undefined;
|
|
146
|
-
Children: import("@jsprose/core").InlinerSchema[];
|
|
147
|
-
}];
|
|
148
|
-
}, {
|
|
149
|
-
Diagram: import("@jsprose/core").Tag<"Diagram", {
|
|
150
|
-
name: "diagram";
|
|
151
|
-
type: "block";
|
|
152
|
-
linkable: true;
|
|
153
|
-
Data: undefined;
|
|
154
|
-
Storage: undefined;
|
|
155
|
-
Children: [{
|
|
156
|
-
name: "text";
|
|
157
|
-
type: "inliner";
|
|
158
|
-
linkable: false;
|
|
159
|
-
Data: string;
|
|
160
|
-
Storage: undefined;
|
|
161
|
-
Children: undefined;
|
|
162
|
-
}] | [{
|
|
163
|
-
name: "text";
|
|
164
|
-
type: "inliner";
|
|
165
|
-
linkable: false;
|
|
166
|
-
Data: string;
|
|
167
|
-
Storage: undefined;
|
|
168
|
-
Children: undefined;
|
|
169
|
-
}, {
|
|
170
|
-
name: "caption";
|
|
171
|
-
type: "inliner";
|
|
172
|
-
linkable: false;
|
|
173
|
-
Data: import("../caption/core.js").CaptionData | undefined;
|
|
174
|
-
Storage: undefined;
|
|
175
|
-
Children: import("@jsprose/core").InlinerSchema[];
|
|
176
|
-
}];
|
|
177
|
-
}, TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet>;
|
|
178
|
-
}, undefined>;
|
|
179
|
-
dependencies: {
|
|
180
|
-
photoswipe: {
|
|
14
|
+
readonly schema: DiagramSchema;
|
|
15
|
+
readonly tags: [import("../../tag.js").ToEruditTag<DiagramSchema, "Diagram", unknown>];
|
|
16
|
+
readonly dependencies: {
|
|
17
|
+
readonly photoswipe: {
|
|
181
18
|
optimize: boolean;
|
|
182
19
|
transpile: boolean;
|
|
183
20
|
};
|
|
184
|
-
'photoswipe/lightbox': {
|
|
21
|
+
readonly 'photoswipe/lightbox': {
|
|
185
22
|
optimize: boolean;
|
|
186
23
|
transpile: boolean;
|
|
187
24
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineSchema, ensureRawElement, ensureTagChildren, textSchema } from "tsprose";
|
|
2
2
|
import { captionSchema } from "../caption/core.js";
|
|
3
3
|
import { defineEruditTag } from "../../tag.js";
|
|
4
|
-
import { defineEruditProseCoreElement } from "../../coreElement.js";
|
|
5
4
|
import { photoswipeDependency } from "../../shared/photoswipe.js";
|
|
5
|
+
import { defineProseCoreElement } from "../../coreElement.js";
|
|
6
6
|
export const diagramSchema = defineSchema({
|
|
7
7
|
name: "diagram",
|
|
8
8
|
type: "block",
|
|
9
9
|
linkable: true
|
|
10
|
-
})
|
|
10
|
+
});
|
|
11
11
|
export const Diagram = defineEruditTag({
|
|
12
12
|
tagName: "Diagram",
|
|
13
13
|
schema: diagramSchema
|
|
@@ -20,11 +20,8 @@ export const Diagram = defineEruditTag({
|
|
|
20
20
|
element.children = [children[0], children[1]];
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
|
-
export
|
|
23
|
+
export default defineProseCoreElement({
|
|
24
24
|
schema: diagramSchema,
|
|
25
|
-
tags: [Diagram]
|
|
26
|
-
});
|
|
27
|
-
export default defineEruditProseCoreElement({
|
|
28
|
-
registryItem: diagramRegistryItem,
|
|
25
|
+
tags: [Diagram],
|
|
29
26
|
dependencies: { ...photoswipeDependency }
|
|
30
27
|
});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import type {
|
|
2
|
+
import type { ToProseElement } from 'tsprose';
|
|
3
3
|
|
|
4
|
-
import type {
|
|
4
|
+
import type { EmphasisSchema } from './core.js';
|
|
5
5
|
import Render from '../../app/shared/Render.vue';
|
|
6
6
|
|
|
7
|
-
defineProps<{ element:
|
|
7
|
+
defineProps<{ element: ToProseElement<EmphasisSchema> }>();
|
|
8
8
|
</script>
|
|
9
9
|
|
|
10
10
|
<template>
|
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
declare const _default: import("../../app/appElement.js").
|
|
2
|
-
name: "emphasis";
|
|
3
|
-
type: "inliner";
|
|
4
|
-
linkable: true;
|
|
5
|
-
Data: import("./core.js").EmphasisData;
|
|
6
|
-
Storage: undefined;
|
|
7
|
-
Children: import("@jsprose/core").InlinerSchema[];
|
|
8
|
-
}>;
|
|
1
|
+
declare const _default: import("../../app/appElement.js").ProseAppElement<import("./core.js").EmphasisSchema>;
|
|
9
2
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineProseAppElement } from "../../app/appElement.js";
|
|
2
2
|
import { emphasisSchema } from "./core.js";
|
|
3
|
-
export default
|
|
3
|
+
export default defineProseAppElement({
|
|
4
4
|
schema: emphasisSchema,
|
|
5
5
|
component: () => import("./Emphasis.vue")
|
|
6
6
|
});
|
|
@@ -1,90 +1,27 @@
|
|
|
1
|
-
import { type InlinerSchema
|
|
1
|
+
import { type InlinerSchema } from 'tsprose';
|
|
2
2
|
export type EmphasisData = {
|
|
3
3
|
type: 'italic';
|
|
4
4
|
} | {
|
|
5
5
|
type: 'bold';
|
|
6
6
|
accent?: boolean;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
9
|
-
name:
|
|
10
|
-
type:
|
|
8
|
+
export interface EmphasisSchema extends InlinerSchema {
|
|
9
|
+
name: 'emphasis';
|
|
10
|
+
type: 'inliner';
|
|
11
11
|
linkable: true;
|
|
12
12
|
Data: EmphasisData;
|
|
13
13
|
Storage: undefined;
|
|
14
14
|
Children: InlinerSchema[];
|
|
15
|
-
}
|
|
16
|
-
export declare const
|
|
17
|
-
|
|
18
|
-
type: "inliner";
|
|
19
|
-
linkable: true;
|
|
20
|
-
Data: EmphasisData;
|
|
21
|
-
Storage: undefined;
|
|
22
|
-
Children: InlinerSchema[];
|
|
23
|
-
}, {
|
|
15
|
+
}
|
|
16
|
+
export declare const emphasisSchema: EmphasisSchema;
|
|
17
|
+
export declare const B: import("../../tag.js").ToEruditTag<EmphasisSchema, "B", {
|
|
24
18
|
accent?: boolean;
|
|
25
|
-
}
|
|
26
|
-
export declare const I: import("
|
|
27
|
-
name: "emphasis";
|
|
28
|
-
type: "inliner";
|
|
29
|
-
linkable: true;
|
|
30
|
-
Data: EmphasisData;
|
|
31
|
-
Storage: undefined;
|
|
32
|
-
Children: InlinerSchema[];
|
|
33
|
-
}, TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet>;
|
|
34
|
-
export declare const emphasisRegistryItem: import("@jsprose/core").RegistryItem<{
|
|
35
|
-
name: "emphasis";
|
|
36
|
-
type: "inliner";
|
|
37
|
-
linkable: true;
|
|
38
|
-
Data: EmphasisData;
|
|
39
|
-
Storage: undefined;
|
|
40
|
-
Children: InlinerSchema[];
|
|
41
|
-
}, {
|
|
42
|
-
B: import("@jsprose/core").Tag<"B", {
|
|
43
|
-
name: "emphasis";
|
|
44
|
-
type: "inliner";
|
|
45
|
-
linkable: true;
|
|
46
|
-
Data: EmphasisData;
|
|
47
|
-
Storage: undefined;
|
|
48
|
-
Children: InlinerSchema[];
|
|
49
|
-
}, {
|
|
50
|
-
accent?: boolean;
|
|
51
|
-
} & TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet>;
|
|
52
|
-
I: import("@jsprose/core").Tag<"I", {
|
|
53
|
-
name: "emphasis";
|
|
54
|
-
type: "inliner";
|
|
55
|
-
linkable: true;
|
|
56
|
-
Data: EmphasisData;
|
|
57
|
-
Storage: undefined;
|
|
58
|
-
Children: InlinerSchema[];
|
|
59
|
-
}, TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet>;
|
|
60
|
-
}, undefined>;
|
|
19
|
+
}>;
|
|
20
|
+
export declare const I: import("../../tag.js").ToEruditTag<EmphasisSchema, "I", unknown>;
|
|
61
21
|
declare const _default: {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
Data: EmphasisData;
|
|
67
|
-
Storage: undefined;
|
|
68
|
-
Children: InlinerSchema[];
|
|
69
|
-
}, {
|
|
70
|
-
B: import("@jsprose/core").Tag<"B", {
|
|
71
|
-
name: "emphasis";
|
|
72
|
-
type: "inliner";
|
|
73
|
-
linkable: true;
|
|
74
|
-
Data: EmphasisData;
|
|
75
|
-
Storage: undefined;
|
|
76
|
-
Children: InlinerSchema[];
|
|
77
|
-
}, {
|
|
78
|
-
accent?: boolean;
|
|
79
|
-
} & TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet>;
|
|
80
|
-
I: import("@jsprose/core").Tag<"I", {
|
|
81
|
-
name: "emphasis";
|
|
82
|
-
type: "inliner";
|
|
83
|
-
linkable: true;
|
|
84
|
-
Data: EmphasisData;
|
|
85
|
-
Storage: undefined;
|
|
86
|
-
Children: InlinerSchema[];
|
|
87
|
-
}, TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet>;
|
|
88
|
-
}, undefined>;
|
|
22
|
+
readonly schema: EmphasisSchema;
|
|
23
|
+
readonly tags: [import("../../tag.js").ToEruditTag<EmphasisSchema, "B", {
|
|
24
|
+
accent?: boolean;
|
|
25
|
+
}>, import("../../tag.js").ToEruditTag<EmphasisSchema, "I", unknown>];
|
|
89
26
|
};
|
|
90
27
|
export default _default;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { defineEruditProseCoreElement } from "../../coreElement.js";
|
|
1
|
+
import { defineSchema, ensureTagInlinerChildren } from "tsprose";
|
|
3
2
|
import { defineEruditTag } from "../../tag.js";
|
|
3
|
+
import { defineProseCoreElement } from "../../coreElement.js";
|
|
4
4
|
export const emphasisSchema = defineSchema({
|
|
5
5
|
name: "emphasis",
|
|
6
6
|
type: "inliner",
|
|
7
7
|
linkable: true
|
|
8
|
-
})
|
|
8
|
+
});
|
|
9
9
|
export const B = defineEruditTag({
|
|
10
10
|
tagName: "B",
|
|
11
11
|
schema: emphasisSchema
|
|
12
|
-
})(({ element, tagName, props, children
|
|
13
|
-
ensureTagInlinerChildren(tagName, children
|
|
12
|
+
})(({ element, tagName, props, children }) => {
|
|
13
|
+
ensureTagInlinerChildren(tagName, children);
|
|
14
14
|
element.children = children;
|
|
15
15
|
element.data = { type: "bold" };
|
|
16
16
|
if (props.accent === true) {
|
|
@@ -20,13 +20,12 @@ export const B = defineEruditTag({
|
|
|
20
20
|
export const I = defineEruditTag({
|
|
21
21
|
tagName: "I",
|
|
22
22
|
schema: emphasisSchema
|
|
23
|
-
})(({ element, tagName, children
|
|
24
|
-
ensureTagInlinerChildren(tagName, children
|
|
23
|
+
})(({ element, tagName, children }) => {
|
|
24
|
+
ensureTagInlinerChildren(tagName, children);
|
|
25
25
|
element.children = children;
|
|
26
26
|
element.data = { type: "italic" };
|
|
27
27
|
});
|
|
28
|
-
export
|
|
28
|
+
export default defineProseCoreElement({
|
|
29
29
|
schema: emphasisSchema,
|
|
30
30
|
tags: [B, I]
|
|
31
31
|
});
|
|
32
|
-
export default defineEruditProseCoreElement({ registryItem: emphasisRegistryItem });
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import type {
|
|
2
|
+
import type { ToProseElement } from 'tsprose';
|
|
3
3
|
|
|
4
|
-
import type {
|
|
4
|
+
import type { FlexSchema } from './core.js';
|
|
5
5
|
import Block from '../../app/shared/block/Block.vue';
|
|
6
6
|
import Render from '../../app/shared/Render.vue';
|
|
7
7
|
|
|
8
|
-
const { element } = defineProps<{ element:
|
|
8
|
+
const { element } = defineProps<{ element: ToProseElement<FlexSchema> }>();
|
|
9
9
|
|
|
10
10
|
const justify = (() => {
|
|
11
11
|
return element?.data?.justifyContent ?? 'center';
|
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
declare const _default: import("../../app/appElement.js").
|
|
2
|
-
name: "flex";
|
|
3
|
-
type: "block";
|
|
4
|
-
linkable: true;
|
|
5
|
-
Data: import("./core.js").FlexData | undefined;
|
|
6
|
-
Storage: undefined;
|
|
7
|
-
Children: import("@jsprose/core").BlockSchema[];
|
|
8
|
-
}>;
|
|
1
|
+
declare const _default: import("../../app/appElement.js").ProseAppElement<import("./core.js").FlexSchema>;
|
|
9
2
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineProseAppElement } from "../../app/appElement.js";
|
|
2
2
|
import { flexSchema } from "./core.js";
|
|
3
|
-
export default
|
|
3
|
+
export default defineProseAppElement({
|
|
4
4
|
schema: flexSchema,
|
|
5
5
|
component: () => import("./Flex.vue"),
|
|
6
6
|
languages: {
|
|
@@ -1,71 +1,29 @@
|
|
|
1
|
-
import { type BlockSchema, type
|
|
1
|
+
import { type BlockSchema, type Schema } from 'tsprose';
|
|
2
|
+
export interface FlexSchema extends Schema {
|
|
3
|
+
name: 'flex';
|
|
4
|
+
type: 'block';
|
|
5
|
+
linkable: true;
|
|
6
|
+
Data: FlexData | undefined;
|
|
7
|
+
Storage: undefined;
|
|
8
|
+
Children: BlockSchema[];
|
|
9
|
+
}
|
|
2
10
|
export interface FlexData {
|
|
3
11
|
gap?: string;
|
|
4
12
|
justifyContent?: string;
|
|
5
13
|
flexes?: string[];
|
|
6
14
|
}
|
|
7
|
-
export declare const flexSchema:
|
|
8
|
-
|
|
9
|
-
type: "block";
|
|
10
|
-
linkable: true;
|
|
11
|
-
Data: FlexData | undefined;
|
|
12
|
-
Storage: undefined;
|
|
13
|
-
Children: BlockSchema[];
|
|
14
|
-
};
|
|
15
|
-
export declare const Flex: import("@jsprose/core").Tag<"Flex", {
|
|
16
|
-
name: "flex";
|
|
17
|
-
type: "block";
|
|
18
|
-
linkable: true;
|
|
19
|
-
Data: FlexData | undefined;
|
|
20
|
-
Storage: undefined;
|
|
21
|
-
Children: BlockSchema[];
|
|
22
|
-
}, {
|
|
15
|
+
export declare const flexSchema: FlexSchema;
|
|
16
|
+
export declare const Flex: import("../../tag.js").ToEruditTag<FlexSchema, "Flex", {
|
|
23
17
|
gap?: string;
|
|
24
18
|
justify?: string;
|
|
25
19
|
flexes?: string[];
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
linkable: true;
|
|
31
|
-
Data: FlexData | undefined;
|
|
32
|
-
Storage: undefined;
|
|
33
|
-
Children: BlockSchema[];
|
|
34
|
-
}, {
|
|
35
|
-
Flex: import("@jsprose/core").Tag<"Flex", {
|
|
36
|
-
name: "flex";
|
|
37
|
-
type: "block";
|
|
38
|
-
linkable: true;
|
|
39
|
-
Data: FlexData | undefined;
|
|
40
|
-
Storage: undefined;
|
|
41
|
-
Children: BlockSchema[];
|
|
42
|
-
}, {
|
|
20
|
+
}>;
|
|
21
|
+
declare const _default: {
|
|
22
|
+
readonly schema: FlexSchema;
|
|
23
|
+
readonly tags: [import("../../tag.js").ToEruditTag<FlexSchema, "Flex", {
|
|
43
24
|
gap?: string;
|
|
44
25
|
justify?: string;
|
|
45
26
|
flexes?: string[];
|
|
46
|
-
}
|
|
47
|
-
}, undefined>;
|
|
48
|
-
declare const _default: {
|
|
49
|
-
registryItem: import("@jsprose/core").RegistryItem<{
|
|
50
|
-
name: "flex";
|
|
51
|
-
type: "block";
|
|
52
|
-
linkable: true;
|
|
53
|
-
Data: FlexData | undefined;
|
|
54
|
-
Storage: undefined;
|
|
55
|
-
Children: BlockSchema[];
|
|
56
|
-
}, {
|
|
57
|
-
Flex: import("@jsprose/core").Tag<"Flex", {
|
|
58
|
-
name: "flex";
|
|
59
|
-
type: "block";
|
|
60
|
-
linkable: true;
|
|
61
|
-
Data: FlexData | undefined;
|
|
62
|
-
Storage: undefined;
|
|
63
|
-
Children: BlockSchema[];
|
|
64
|
-
}, {
|
|
65
|
-
gap?: string;
|
|
66
|
-
justify?: string;
|
|
67
|
-
flexes?: string[];
|
|
68
|
-
} & TagChildren & import("../../toc.js").ObjPropToc & import("../../snippet.js").ObjPropSnippet>;
|
|
69
|
-
}, undefined>;
|
|
27
|
+
}>];
|
|
70
28
|
};
|
|
71
29
|
export default _default;
|