@tutorialkit-rb/types 1.5.2-rb.0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -0
- package/dist/default-localization.d.ts +20 -0
- package/dist/default-localization.js +20 -0
- package/dist/entities/index.d.ts +61 -0
- package/dist/entities/index.js +1 -0
- package/dist/entities/nav.d.ts +8 -0
- package/dist/entities/nav.js +1 -0
- package/dist/files-ref.d.ts +1 -0
- package/dist/files-ref.js +3 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +4 -0
- package/dist/schemas/chapter.d.ts +379 -0
- package/dist/schemas/chapter.js +9 -0
- package/dist/schemas/common.d.ts +894 -0
- package/dist/schemas/common.js +229 -0
- package/dist/schemas/content.d.ts +1512 -0
- package/dist/schemas/content.js +9 -0
- package/dist/schemas/i18n.d.ts +151 -0
- package/dist/schemas/i18n.js +133 -0
- package/dist/schemas/index.d.ts +6 -0
- package/dist/schemas/index.js +6 -0
- package/dist/schemas/lesson.d.ts +382 -0
- package/dist/schemas/lesson.js +10 -0
- package/dist/schemas/metatags.d.ts +15 -0
- package/dist/schemas/metatags.js +13 -0
- package/dist/schemas/part.d.ts +382 -0
- package/dist/schemas/part.js +13 -0
- package/dist/schemas/tutorial.d.ts +378 -0
- package/dist/schemas/tutorial.js +14 -0
- package/dist/utils/interpolation.d.ts +1 -0
- package/dist/utils/interpolation.js +6 -0
- package/package.json +39 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { chapterSchema } from './chapter.js';
|
|
2
|
+
import { lessonSchema } from './lesson.js';
|
|
3
|
+
import { partSchema } from './part.js';
|
|
4
|
+
import { tutorialSchema } from './tutorial.js';
|
|
5
|
+
export const contentSchema = tutorialSchema
|
|
6
|
+
.strict()
|
|
7
|
+
.or(partSchema.strict())
|
|
8
|
+
.or(chapterSchema.strict())
|
|
9
|
+
.or(lessonSchema.strict());
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const i18nSchema: z.ZodObject<{
|
|
3
|
+
/**
|
|
4
|
+
* Template on how to format a part. Variables: ${index} and ${title}.
|
|
5
|
+
*
|
|
6
|
+
* @default 'Part ${index}: ${title}'
|
|
7
|
+
*/
|
|
8
|
+
partTemplate: z.ZodOptional<z.ZodString>;
|
|
9
|
+
/**
|
|
10
|
+
* Text of the edit page link.
|
|
11
|
+
*
|
|
12
|
+
* @default 'Edit this page'
|
|
13
|
+
*/
|
|
14
|
+
editPageText: z.ZodOptional<z.ZodString>;
|
|
15
|
+
/**
|
|
16
|
+
* Text of the WebContainer link.
|
|
17
|
+
*
|
|
18
|
+
* @default 'Powered by WebContainers'
|
|
19
|
+
*/
|
|
20
|
+
webcontainerLinkText: z.ZodOptional<z.ZodString>;
|
|
21
|
+
/**
|
|
22
|
+
* Text shown on the call to action button to start webcontainer when boot was blocked
|
|
23
|
+
* due to memory restrictions.
|
|
24
|
+
*
|
|
25
|
+
* @default 'Start WebContainer'
|
|
26
|
+
*/
|
|
27
|
+
startWebContainerText: z.ZodOptional<z.ZodString>;
|
|
28
|
+
/**
|
|
29
|
+
* Text shown in the preview section when there are no steps to run and no preview to show.
|
|
30
|
+
*
|
|
31
|
+
* @default 'No preview to run nor steps to show'
|
|
32
|
+
*/
|
|
33
|
+
noPreviewNorStepsText: z.ZodOptional<z.ZodString>;
|
|
34
|
+
/**
|
|
35
|
+
* Text shown on top of the file tree.
|
|
36
|
+
*
|
|
37
|
+
* @default 'Files'
|
|
38
|
+
*/
|
|
39
|
+
filesTitleText: z.ZodOptional<z.ZodString>;
|
|
40
|
+
/**
|
|
41
|
+
* Text shown on file tree's context menu's file creation button.
|
|
42
|
+
*
|
|
43
|
+
* @default 'Create file'
|
|
44
|
+
*/
|
|
45
|
+
fileTreeCreateFileText: z.ZodOptional<z.ZodString>;
|
|
46
|
+
/**
|
|
47
|
+
* Text shown on file tree's context menu's folder creation button.
|
|
48
|
+
*
|
|
49
|
+
* @default 'Create folder'
|
|
50
|
+
*/
|
|
51
|
+
fileTreeCreateFolderText: z.ZodOptional<z.ZodString>;
|
|
52
|
+
/**
|
|
53
|
+
* Text shown on dialog when user attempts to edit files that don't match allowed patterns.
|
|
54
|
+
*
|
|
55
|
+
* @default 'This action is not allowed'
|
|
56
|
+
*/
|
|
57
|
+
fileTreeActionNotAllowedText: z.ZodOptional<z.ZodString>;
|
|
58
|
+
/**
|
|
59
|
+
* Text shown on dialog when user attempts create file or folder that already exists on filesystem but is not visible on file tree, e.g. template files.
|
|
60
|
+
*
|
|
61
|
+
* @default 'File exists on filesystem already'
|
|
62
|
+
*/
|
|
63
|
+
fileTreeFileExistsAlreadyText: z.ZodOptional<z.ZodString>;
|
|
64
|
+
/**
|
|
65
|
+
* Text shown on dialog describing allowed patterns when file or folder creation failed.
|
|
66
|
+
*
|
|
67
|
+
* @default 'Created files and folders must match following patterns:'
|
|
68
|
+
*/
|
|
69
|
+
fileTreeAllowedPatternsText: z.ZodOptional<z.ZodString>;
|
|
70
|
+
/**
|
|
71
|
+
* Text shown on confirmation buttons on dialogs.
|
|
72
|
+
*
|
|
73
|
+
* @default 'OK'
|
|
74
|
+
*/
|
|
75
|
+
confirmationText: z.ZodOptional<z.ZodString>;
|
|
76
|
+
/**
|
|
77
|
+
* Text shown on top of the steps section.
|
|
78
|
+
*
|
|
79
|
+
* @default 'Preparing Environment'
|
|
80
|
+
*/
|
|
81
|
+
prepareEnvironmentTitleText: z.ZodOptional<z.ZodString>;
|
|
82
|
+
/**
|
|
83
|
+
* Text shown on top of the preview section when `previews[_].title` is not configured.
|
|
84
|
+
*
|
|
85
|
+
* @default 'Preview'
|
|
86
|
+
*/
|
|
87
|
+
defaultPreviewTitleText: z.ZodOptional<z.ZodString>;
|
|
88
|
+
/**
|
|
89
|
+
* Title attribute for the preview reload button.
|
|
90
|
+
*
|
|
91
|
+
* @default 'Reload Preview'
|
|
92
|
+
*/
|
|
93
|
+
reloadPreviewTitle: z.ZodOptional<z.ZodString>;
|
|
94
|
+
/**
|
|
95
|
+
* Text for the toggle terminal button.
|
|
96
|
+
*
|
|
97
|
+
* @default 'Toggle Terminal'
|
|
98
|
+
*/
|
|
99
|
+
toggleTerminalButtonText: z.ZodOptional<z.ZodString>;
|
|
100
|
+
/**
|
|
101
|
+
* Text for the solve button.
|
|
102
|
+
*
|
|
103
|
+
* @default 'Solve'
|
|
104
|
+
*/
|
|
105
|
+
solveButtonText: z.ZodOptional<z.ZodString>;
|
|
106
|
+
/**
|
|
107
|
+
* Text for the reset button.
|
|
108
|
+
*
|
|
109
|
+
* @default 'Reset'
|
|
110
|
+
*/
|
|
111
|
+
resetButtonText: z.ZodOptional<z.ZodString>;
|
|
112
|
+
}, "strip", z.ZodTypeAny, {
|
|
113
|
+
partTemplate?: string | undefined;
|
|
114
|
+
editPageText?: string | undefined;
|
|
115
|
+
webcontainerLinkText?: string | undefined;
|
|
116
|
+
startWebContainerText?: string | undefined;
|
|
117
|
+
noPreviewNorStepsText?: string | undefined;
|
|
118
|
+
filesTitleText?: string | undefined;
|
|
119
|
+
fileTreeCreateFileText?: string | undefined;
|
|
120
|
+
fileTreeCreateFolderText?: string | undefined;
|
|
121
|
+
fileTreeActionNotAllowedText?: string | undefined;
|
|
122
|
+
fileTreeFileExistsAlreadyText?: string | undefined;
|
|
123
|
+
fileTreeAllowedPatternsText?: string | undefined;
|
|
124
|
+
confirmationText?: string | undefined;
|
|
125
|
+
prepareEnvironmentTitleText?: string | undefined;
|
|
126
|
+
defaultPreviewTitleText?: string | undefined;
|
|
127
|
+
reloadPreviewTitle?: string | undefined;
|
|
128
|
+
toggleTerminalButtonText?: string | undefined;
|
|
129
|
+
solveButtonText?: string | undefined;
|
|
130
|
+
resetButtonText?: string | undefined;
|
|
131
|
+
}, {
|
|
132
|
+
partTemplate?: string | undefined;
|
|
133
|
+
editPageText?: string | undefined;
|
|
134
|
+
webcontainerLinkText?: string | undefined;
|
|
135
|
+
startWebContainerText?: string | undefined;
|
|
136
|
+
noPreviewNorStepsText?: string | undefined;
|
|
137
|
+
filesTitleText?: string | undefined;
|
|
138
|
+
fileTreeCreateFileText?: string | undefined;
|
|
139
|
+
fileTreeCreateFolderText?: string | undefined;
|
|
140
|
+
fileTreeActionNotAllowedText?: string | undefined;
|
|
141
|
+
fileTreeFileExistsAlreadyText?: string | undefined;
|
|
142
|
+
fileTreeAllowedPatternsText?: string | undefined;
|
|
143
|
+
confirmationText?: string | undefined;
|
|
144
|
+
prepareEnvironmentTitleText?: string | undefined;
|
|
145
|
+
defaultPreviewTitleText?: string | undefined;
|
|
146
|
+
reloadPreviewTitle?: string | undefined;
|
|
147
|
+
toggleTerminalButtonText?: string | undefined;
|
|
148
|
+
solveButtonText?: string | undefined;
|
|
149
|
+
resetButtonText?: string | undefined;
|
|
150
|
+
}>;
|
|
151
|
+
export type I18nSchema = z.infer<typeof i18nSchema>;
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const i18nSchema = z.object({
|
|
3
|
+
/**
|
|
4
|
+
* Template on how to format a part. Variables: ${index} and ${title}.
|
|
5
|
+
*
|
|
6
|
+
* @default 'Part ${index}: ${title}'
|
|
7
|
+
*/
|
|
8
|
+
partTemplate: z.string().optional().describe('Template on how to format a part. Variables: ${index} and ${title}.'),
|
|
9
|
+
/**
|
|
10
|
+
* Text of the edit page link.
|
|
11
|
+
*
|
|
12
|
+
* @default 'Edit this page'
|
|
13
|
+
*/
|
|
14
|
+
editPageText: z.string().optional().describe('Text of the edit page link.'),
|
|
15
|
+
/**
|
|
16
|
+
* Text of the WebContainer link.
|
|
17
|
+
*
|
|
18
|
+
* @default 'Powered by WebContainers'
|
|
19
|
+
*/
|
|
20
|
+
webcontainerLinkText: z.string().optional().describe('Text of the WebContainer link.'),
|
|
21
|
+
/**
|
|
22
|
+
* Text shown on the call to action button to start webcontainer when boot was blocked
|
|
23
|
+
* due to memory restrictions.
|
|
24
|
+
*
|
|
25
|
+
* @default 'Start WebContainer'
|
|
26
|
+
*/
|
|
27
|
+
startWebContainerText: z
|
|
28
|
+
.string()
|
|
29
|
+
.optional()
|
|
30
|
+
.describe('Text shown on the call to action button to start webcontainer when boot was blocked due to memory restrictions.'),
|
|
31
|
+
/**
|
|
32
|
+
* Text shown in the preview section when there are no steps to run and no preview to show.
|
|
33
|
+
*
|
|
34
|
+
* @default 'No preview to run nor steps to show'
|
|
35
|
+
*/
|
|
36
|
+
noPreviewNorStepsText: z
|
|
37
|
+
.string()
|
|
38
|
+
.optional()
|
|
39
|
+
.describe('Text shown in the preview section when there are no steps to run and no preview to show.'),
|
|
40
|
+
/**
|
|
41
|
+
* Text shown on top of the file tree.
|
|
42
|
+
*
|
|
43
|
+
* @default 'Files'
|
|
44
|
+
*/
|
|
45
|
+
filesTitleText: z.string().optional().describe('Text shown on top of the file tree.'),
|
|
46
|
+
/**
|
|
47
|
+
* Text shown on file tree's context menu's file creation button.
|
|
48
|
+
*
|
|
49
|
+
* @default 'Create file'
|
|
50
|
+
*/
|
|
51
|
+
fileTreeCreateFileText: z
|
|
52
|
+
.string()
|
|
53
|
+
.optional()
|
|
54
|
+
.describe("Text shown on file tree's context menu's file creation button."),
|
|
55
|
+
/**
|
|
56
|
+
* Text shown on file tree's context menu's folder creation button.
|
|
57
|
+
*
|
|
58
|
+
* @default 'Create folder'
|
|
59
|
+
*/
|
|
60
|
+
fileTreeCreateFolderText: z
|
|
61
|
+
.string()
|
|
62
|
+
.optional()
|
|
63
|
+
.describe("Text shown on file tree's context menu's folder creation button."),
|
|
64
|
+
/**
|
|
65
|
+
* Text shown on dialog when user attempts to edit files that don't match allowed patterns.
|
|
66
|
+
*
|
|
67
|
+
* @default 'This action is not allowed'
|
|
68
|
+
*/
|
|
69
|
+
fileTreeActionNotAllowedText: z
|
|
70
|
+
.string()
|
|
71
|
+
.optional()
|
|
72
|
+
.describe("Text shown on dialog when user attempts to edit files that don't match allowed patterns."),
|
|
73
|
+
/**
|
|
74
|
+
* Text shown on dialog when user attempts create file or folder that already exists on filesystem but is not visible on file tree, e.g. template files.
|
|
75
|
+
*
|
|
76
|
+
* @default 'File exists on filesystem already'
|
|
77
|
+
*/
|
|
78
|
+
fileTreeFileExistsAlreadyText: z
|
|
79
|
+
.string()
|
|
80
|
+
.optional()
|
|
81
|
+
.describe('Text shown on dialog when user attempts create file or folder that already exists on filesystem but is not visible on file tree, e.g. template files.'),
|
|
82
|
+
/**
|
|
83
|
+
* Text shown on dialog describing allowed patterns when file or folder creation failed.
|
|
84
|
+
*
|
|
85
|
+
* @default 'Created files and folders must match following patterns:'
|
|
86
|
+
*/
|
|
87
|
+
fileTreeAllowedPatternsText: z
|
|
88
|
+
.string()
|
|
89
|
+
.optional()
|
|
90
|
+
.describe('Text shown on dialog describing allowed patterns when file or folder creation failed.'),
|
|
91
|
+
/**
|
|
92
|
+
* Text shown on confirmation buttons on dialogs.
|
|
93
|
+
*
|
|
94
|
+
* @default 'OK'
|
|
95
|
+
*/
|
|
96
|
+
confirmationText: z.string().optional().describe('Text shown on confirmation buttons on dialogs.'),
|
|
97
|
+
/**
|
|
98
|
+
* Text shown on top of the steps section.
|
|
99
|
+
*
|
|
100
|
+
* @default 'Preparing Environment'
|
|
101
|
+
*/
|
|
102
|
+
prepareEnvironmentTitleText: z.string().optional().describe('Text shown on top of the steps section.'),
|
|
103
|
+
/**
|
|
104
|
+
* Text shown on top of the preview section when `previews[_].title` is not configured.
|
|
105
|
+
*
|
|
106
|
+
* @default 'Preview'
|
|
107
|
+
*/
|
|
108
|
+
defaultPreviewTitleText: z.string().optional().describe('Text shown on top of the preview section.'),
|
|
109
|
+
/**
|
|
110
|
+
* Title attribute for the preview reload button.
|
|
111
|
+
*
|
|
112
|
+
* @default 'Reload Preview'
|
|
113
|
+
*/
|
|
114
|
+
reloadPreviewTitle: z.string().optional().describe('Title attribute for the preview reload button.'),
|
|
115
|
+
/**
|
|
116
|
+
* Text for the toggle terminal button.
|
|
117
|
+
*
|
|
118
|
+
* @default 'Toggle Terminal'
|
|
119
|
+
*/
|
|
120
|
+
toggleTerminalButtonText: z.string().optional().describe('Text for the toggle terminal button.'),
|
|
121
|
+
/**
|
|
122
|
+
* Text for the solve button.
|
|
123
|
+
*
|
|
124
|
+
* @default 'Solve'
|
|
125
|
+
*/
|
|
126
|
+
solveButtonText: z.string().optional().describe('Text for the solve button.'),
|
|
127
|
+
/**
|
|
128
|
+
* Text for the reset button.
|
|
129
|
+
*
|
|
130
|
+
* @default 'Reset'
|
|
131
|
+
*/
|
|
132
|
+
resetButtonText: z.string().optional().describe('Text for the reset button.'),
|
|
133
|
+
});
|
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const lessonSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
3
|
+
mainCommand: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodString, z.ZodString], null>, z.ZodObject<{
|
|
4
|
+
command: z.ZodString;
|
|
5
|
+
title: z.ZodString;
|
|
6
|
+
}, "strict", z.ZodTypeAny, {
|
|
7
|
+
title: string;
|
|
8
|
+
command: string;
|
|
9
|
+
}, {
|
|
10
|
+
title: string;
|
|
11
|
+
command: string;
|
|
12
|
+
}>]>>;
|
|
13
|
+
prepareCommands: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodString, z.ZodString], null>, z.ZodObject<{
|
|
14
|
+
command: z.ZodString;
|
|
15
|
+
title: z.ZodString;
|
|
16
|
+
}, "strict", z.ZodTypeAny, {
|
|
17
|
+
title: string;
|
|
18
|
+
command: string;
|
|
19
|
+
}, {
|
|
20
|
+
title: string;
|
|
21
|
+
command: string;
|
|
22
|
+
}>]>, "many">>;
|
|
23
|
+
}, {
|
|
24
|
+
meta: z.ZodOptional<z.ZodObject<{
|
|
25
|
+
image: z.ZodOptional<z.ZodString>;
|
|
26
|
+
description: z.ZodOptional<z.ZodString>;
|
|
27
|
+
title: z.ZodOptional<z.ZodString>;
|
|
28
|
+
}, "strip", z.ZodTypeAny, {
|
|
29
|
+
image?: string | undefined;
|
|
30
|
+
description?: string | undefined;
|
|
31
|
+
title?: string | undefined;
|
|
32
|
+
}, {
|
|
33
|
+
image?: string | undefined;
|
|
34
|
+
description?: string | undefined;
|
|
35
|
+
title?: string | undefined;
|
|
36
|
+
}>>;
|
|
37
|
+
custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
38
|
+
previews: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodTuple<[z.ZodNumber, z.ZodString], null>, z.ZodTuple<[z.ZodNumber, z.ZodString, z.ZodString], null>, z.ZodObject<{
|
|
39
|
+
port: z.ZodNumber;
|
|
40
|
+
title: z.ZodString;
|
|
41
|
+
pathname: z.ZodOptional<z.ZodString>;
|
|
42
|
+
}, "strict", z.ZodTypeAny, {
|
|
43
|
+
title: string;
|
|
44
|
+
port: number;
|
|
45
|
+
pathname?: string | undefined;
|
|
46
|
+
}, {
|
|
47
|
+
title: string;
|
|
48
|
+
port: number;
|
|
49
|
+
pathname?: string | undefined;
|
|
50
|
+
}>]>, "many">]>>;
|
|
51
|
+
autoReload: z.ZodOptional<z.ZodBoolean>;
|
|
52
|
+
filesystem: z.ZodOptional<z.ZodObject<{
|
|
53
|
+
watch: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>;
|
|
54
|
+
}, "strip", z.ZodTypeAny, {
|
|
55
|
+
watch?: boolean | string[] | undefined;
|
|
56
|
+
}, {
|
|
57
|
+
watch?: boolean | string[] | undefined;
|
|
58
|
+
}>>;
|
|
59
|
+
template: z.ZodOptional<z.ZodString>;
|
|
60
|
+
terminal: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodObject<{
|
|
61
|
+
open: z.ZodOptional<z.ZodBoolean>;
|
|
62
|
+
panels: z.ZodUnion<[z.ZodLiteral<"output">, z.ZodLiteral<"terminal">, z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"output">, z.ZodLiteral<"terminal">]>, z.ZodTuple<[z.ZodUnion<[z.ZodLiteral<"output">, z.ZodLiteral<"terminal">]>, z.ZodString], null>, z.ZodObject<{
|
|
63
|
+
type: z.ZodUnion<[z.ZodLiteral<"output">, z.ZodLiteral<"terminal">]>;
|
|
64
|
+
id: z.ZodOptional<z.ZodString>;
|
|
65
|
+
title: z.ZodOptional<z.ZodString>;
|
|
66
|
+
allowRedirects: z.ZodOptional<z.ZodBoolean>;
|
|
67
|
+
allowCommands: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
68
|
+
}, "strict", z.ZodTypeAny, {
|
|
69
|
+
type: "output" | "terminal";
|
|
70
|
+
title?: string | undefined;
|
|
71
|
+
id?: string | undefined;
|
|
72
|
+
allowRedirects?: boolean | undefined;
|
|
73
|
+
allowCommands?: string[] | undefined;
|
|
74
|
+
}, {
|
|
75
|
+
type: "output" | "terminal";
|
|
76
|
+
title?: string | undefined;
|
|
77
|
+
id?: string | undefined;
|
|
78
|
+
allowRedirects?: boolean | undefined;
|
|
79
|
+
allowCommands?: string[] | undefined;
|
|
80
|
+
}>]>, "many">, ("output" | "terminal" | ["output" | "terminal", string] | {
|
|
81
|
+
type: "output" | "terminal";
|
|
82
|
+
title?: string | undefined;
|
|
83
|
+
id?: string | undefined;
|
|
84
|
+
allowRedirects?: boolean | undefined;
|
|
85
|
+
allowCommands?: string[] | undefined;
|
|
86
|
+
})[], ("output" | "terminal" | ["output" | "terminal", string] | {
|
|
87
|
+
type: "output" | "terminal";
|
|
88
|
+
title?: string | undefined;
|
|
89
|
+
id?: string | undefined;
|
|
90
|
+
allowRedirects?: boolean | undefined;
|
|
91
|
+
allowCommands?: string[] | undefined;
|
|
92
|
+
})[]>]>;
|
|
93
|
+
activePanel: z.ZodOptional<z.ZodNumber>;
|
|
94
|
+
allowRedirects: z.ZodOptional<z.ZodBoolean>;
|
|
95
|
+
allowCommands: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
96
|
+
}, "strict", z.ZodTypeAny, {
|
|
97
|
+
panels: "output" | "terminal" | ("output" | "terminal" | ["output" | "terminal", string] | {
|
|
98
|
+
type: "output" | "terminal";
|
|
99
|
+
title?: string | undefined;
|
|
100
|
+
id?: string | undefined;
|
|
101
|
+
allowRedirects?: boolean | undefined;
|
|
102
|
+
allowCommands?: string[] | undefined;
|
|
103
|
+
})[];
|
|
104
|
+
open?: boolean | undefined;
|
|
105
|
+
allowRedirects?: boolean | undefined;
|
|
106
|
+
allowCommands?: string[] | undefined;
|
|
107
|
+
activePanel?: number | undefined;
|
|
108
|
+
}, {
|
|
109
|
+
panels: "output" | "terminal" | ("output" | "terminal" | ["output" | "terminal", string] | {
|
|
110
|
+
type: "output" | "terminal";
|
|
111
|
+
title?: string | undefined;
|
|
112
|
+
id?: string | undefined;
|
|
113
|
+
allowRedirects?: boolean | undefined;
|
|
114
|
+
allowCommands?: string[] | undefined;
|
|
115
|
+
})[];
|
|
116
|
+
open?: boolean | undefined;
|
|
117
|
+
allowRedirects?: boolean | undefined;
|
|
118
|
+
allowCommands?: string[] | undefined;
|
|
119
|
+
activePanel?: number | undefined;
|
|
120
|
+
}>]>>;
|
|
121
|
+
focus: z.ZodOptional<z.ZodString>;
|
|
122
|
+
editor: z.ZodOptional<z.ZodUnion<[z.ZodOptional<z.ZodBoolean>, z.ZodObject<{
|
|
123
|
+
fileTree: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodObject<{
|
|
124
|
+
allowEdits: z.ZodUnion<[z.ZodBoolean, z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
125
|
+
}, "strict", z.ZodTypeAny, {
|
|
126
|
+
allowEdits: string | boolean | string[];
|
|
127
|
+
}, {
|
|
128
|
+
allowEdits: string | boolean | string[];
|
|
129
|
+
}>]>>;
|
|
130
|
+
}, "strict", z.ZodTypeAny, {
|
|
131
|
+
fileTree?: boolean | {
|
|
132
|
+
allowEdits: string | boolean | string[];
|
|
133
|
+
} | undefined;
|
|
134
|
+
}, {
|
|
135
|
+
fileTree?: boolean | {
|
|
136
|
+
allowEdits: string | boolean | string[];
|
|
137
|
+
} | undefined;
|
|
138
|
+
}>]>>;
|
|
139
|
+
i18n: z.ZodOptional<z.ZodObject<{
|
|
140
|
+
partTemplate: z.ZodOptional<z.ZodString>;
|
|
141
|
+
editPageText: z.ZodOptional<z.ZodString>;
|
|
142
|
+
webcontainerLinkText: z.ZodOptional<z.ZodString>;
|
|
143
|
+
startWebContainerText: z.ZodOptional<z.ZodString>;
|
|
144
|
+
noPreviewNorStepsText: z.ZodOptional<z.ZodString>;
|
|
145
|
+
filesTitleText: z.ZodOptional<z.ZodString>;
|
|
146
|
+
fileTreeCreateFileText: z.ZodOptional<z.ZodString>;
|
|
147
|
+
fileTreeCreateFolderText: z.ZodOptional<z.ZodString>;
|
|
148
|
+
fileTreeActionNotAllowedText: z.ZodOptional<z.ZodString>;
|
|
149
|
+
fileTreeFileExistsAlreadyText: z.ZodOptional<z.ZodString>;
|
|
150
|
+
fileTreeAllowedPatternsText: z.ZodOptional<z.ZodString>;
|
|
151
|
+
confirmationText: z.ZodOptional<z.ZodString>;
|
|
152
|
+
prepareEnvironmentTitleText: z.ZodOptional<z.ZodString>;
|
|
153
|
+
defaultPreviewTitleText: z.ZodOptional<z.ZodString>;
|
|
154
|
+
reloadPreviewTitle: z.ZodOptional<z.ZodString>;
|
|
155
|
+
toggleTerminalButtonText: z.ZodOptional<z.ZodString>;
|
|
156
|
+
solveButtonText: z.ZodOptional<z.ZodString>;
|
|
157
|
+
resetButtonText: z.ZodOptional<z.ZodString>;
|
|
158
|
+
}, "strip", z.ZodTypeAny, {
|
|
159
|
+
partTemplate?: string | undefined;
|
|
160
|
+
editPageText?: string | undefined;
|
|
161
|
+
webcontainerLinkText?: string | undefined;
|
|
162
|
+
startWebContainerText?: string | undefined;
|
|
163
|
+
noPreviewNorStepsText?: string | undefined;
|
|
164
|
+
filesTitleText?: string | undefined;
|
|
165
|
+
fileTreeCreateFileText?: string | undefined;
|
|
166
|
+
fileTreeCreateFolderText?: string | undefined;
|
|
167
|
+
fileTreeActionNotAllowedText?: string | undefined;
|
|
168
|
+
fileTreeFileExistsAlreadyText?: string | undefined;
|
|
169
|
+
fileTreeAllowedPatternsText?: string | undefined;
|
|
170
|
+
confirmationText?: string | undefined;
|
|
171
|
+
prepareEnvironmentTitleText?: string | undefined;
|
|
172
|
+
defaultPreviewTitleText?: string | undefined;
|
|
173
|
+
reloadPreviewTitle?: string | undefined;
|
|
174
|
+
toggleTerminalButtonText?: string | undefined;
|
|
175
|
+
solveButtonText?: string | undefined;
|
|
176
|
+
resetButtonText?: string | undefined;
|
|
177
|
+
}, {
|
|
178
|
+
partTemplate?: string | undefined;
|
|
179
|
+
editPageText?: string | undefined;
|
|
180
|
+
webcontainerLinkText?: string | undefined;
|
|
181
|
+
startWebContainerText?: string | undefined;
|
|
182
|
+
noPreviewNorStepsText?: string | undefined;
|
|
183
|
+
filesTitleText?: string | undefined;
|
|
184
|
+
fileTreeCreateFileText?: string | undefined;
|
|
185
|
+
fileTreeCreateFolderText?: string | undefined;
|
|
186
|
+
fileTreeActionNotAllowedText?: string | undefined;
|
|
187
|
+
fileTreeFileExistsAlreadyText?: string | undefined;
|
|
188
|
+
fileTreeAllowedPatternsText?: string | undefined;
|
|
189
|
+
confirmationText?: string | undefined;
|
|
190
|
+
prepareEnvironmentTitleText?: string | undefined;
|
|
191
|
+
defaultPreviewTitleText?: string | undefined;
|
|
192
|
+
reloadPreviewTitle?: string | undefined;
|
|
193
|
+
toggleTerminalButtonText?: string | undefined;
|
|
194
|
+
solveButtonText?: string | undefined;
|
|
195
|
+
resetButtonText?: string | undefined;
|
|
196
|
+
}>>;
|
|
197
|
+
editPageLink: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
|
|
198
|
+
openInStackBlitz: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodObject<{
|
|
199
|
+
projectTitle: z.ZodOptional<z.ZodString>;
|
|
200
|
+
projectDescription: z.ZodOptional<z.ZodString>;
|
|
201
|
+
projectTemplate: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"html">, z.ZodLiteral<"node">, z.ZodLiteral<"angular-cli">, z.ZodLiteral<"create-react-app">, z.ZodLiteral<"javascript">, z.ZodLiteral<"polymer">, z.ZodLiteral<"typescript">, z.ZodLiteral<"vue">]>>;
|
|
202
|
+
}, "strict", z.ZodTypeAny, {
|
|
203
|
+
projectTitle?: string | undefined;
|
|
204
|
+
projectDescription?: string | undefined;
|
|
205
|
+
projectTemplate?: "html" | "node" | "angular-cli" | "create-react-app" | "javascript" | "polymer" | "typescript" | "vue" | undefined;
|
|
206
|
+
}, {
|
|
207
|
+
projectTitle?: string | undefined;
|
|
208
|
+
projectDescription?: string | undefined;
|
|
209
|
+
projectTemplate?: "html" | "node" | "angular-cli" | "create-react-app" | "javascript" | "polymer" | "typescript" | "vue" | undefined;
|
|
210
|
+
}>]>>;
|
|
211
|
+
downloadAsZip: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodObject<{
|
|
212
|
+
filename: z.ZodString;
|
|
213
|
+
}, "strict", z.ZodTypeAny, {
|
|
214
|
+
filename: string;
|
|
215
|
+
}, {
|
|
216
|
+
filename: string;
|
|
217
|
+
}>]>>;
|
|
218
|
+
}>, {
|
|
219
|
+
title: z.ZodString;
|
|
220
|
+
slug: z.ZodOptional<z.ZodString>;
|
|
221
|
+
}>, {
|
|
222
|
+
type: z.ZodLiteral<"lesson">;
|
|
223
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
224
|
+
hideRoot: z.ZodOptional<z.ZodBoolean>;
|
|
225
|
+
}>, "strip", z.ZodTypeAny, {
|
|
226
|
+
type: "lesson";
|
|
227
|
+
title: string;
|
|
228
|
+
custom?: Record<string, any> | undefined;
|
|
229
|
+
mainCommand?: string | [string, string] | {
|
|
230
|
+
title: string;
|
|
231
|
+
command: string;
|
|
232
|
+
} | undefined;
|
|
233
|
+
prepareCommands?: (string | [string, string] | {
|
|
234
|
+
title: string;
|
|
235
|
+
command: string;
|
|
236
|
+
})[] | undefined;
|
|
237
|
+
terminal?: boolean | {
|
|
238
|
+
panels: "output" | "terminal" | ("output" | "terminal" | ["output" | "terminal", string] | {
|
|
239
|
+
type: "output" | "terminal";
|
|
240
|
+
title?: string | undefined;
|
|
241
|
+
id?: string | undefined;
|
|
242
|
+
allowRedirects?: boolean | undefined;
|
|
243
|
+
allowCommands?: string[] | undefined;
|
|
244
|
+
})[];
|
|
245
|
+
open?: boolean | undefined;
|
|
246
|
+
allowRedirects?: boolean | undefined;
|
|
247
|
+
allowCommands?: string[] | undefined;
|
|
248
|
+
activePanel?: number | undefined;
|
|
249
|
+
} | undefined;
|
|
250
|
+
meta?: {
|
|
251
|
+
image?: string | undefined;
|
|
252
|
+
description?: string | undefined;
|
|
253
|
+
title?: string | undefined;
|
|
254
|
+
} | undefined;
|
|
255
|
+
previews?: boolean | (string | number | [number, string] | [number, string, string] | {
|
|
256
|
+
title: string;
|
|
257
|
+
port: number;
|
|
258
|
+
pathname?: string | undefined;
|
|
259
|
+
})[] | undefined;
|
|
260
|
+
autoReload?: boolean | undefined;
|
|
261
|
+
filesystem?: {
|
|
262
|
+
watch?: boolean | string[] | undefined;
|
|
263
|
+
} | undefined;
|
|
264
|
+
template?: string | undefined;
|
|
265
|
+
focus?: string | undefined;
|
|
266
|
+
editor?: boolean | {
|
|
267
|
+
fileTree?: boolean | {
|
|
268
|
+
allowEdits: string | boolean | string[];
|
|
269
|
+
} | undefined;
|
|
270
|
+
} | undefined;
|
|
271
|
+
i18n?: {
|
|
272
|
+
partTemplate?: string | undefined;
|
|
273
|
+
editPageText?: string | undefined;
|
|
274
|
+
webcontainerLinkText?: string | undefined;
|
|
275
|
+
startWebContainerText?: string | undefined;
|
|
276
|
+
noPreviewNorStepsText?: string | undefined;
|
|
277
|
+
filesTitleText?: string | undefined;
|
|
278
|
+
fileTreeCreateFileText?: string | undefined;
|
|
279
|
+
fileTreeCreateFolderText?: string | undefined;
|
|
280
|
+
fileTreeActionNotAllowedText?: string | undefined;
|
|
281
|
+
fileTreeFileExistsAlreadyText?: string | undefined;
|
|
282
|
+
fileTreeAllowedPatternsText?: string | undefined;
|
|
283
|
+
confirmationText?: string | undefined;
|
|
284
|
+
prepareEnvironmentTitleText?: string | undefined;
|
|
285
|
+
defaultPreviewTitleText?: string | undefined;
|
|
286
|
+
reloadPreviewTitle?: string | undefined;
|
|
287
|
+
toggleTerminalButtonText?: string | undefined;
|
|
288
|
+
solveButtonText?: string | undefined;
|
|
289
|
+
resetButtonText?: string | undefined;
|
|
290
|
+
} | undefined;
|
|
291
|
+
editPageLink?: string | boolean | undefined;
|
|
292
|
+
openInStackBlitz?: boolean | {
|
|
293
|
+
projectTitle?: string | undefined;
|
|
294
|
+
projectDescription?: string | undefined;
|
|
295
|
+
projectTemplate?: "html" | "node" | "angular-cli" | "create-react-app" | "javascript" | "polymer" | "typescript" | "vue" | undefined;
|
|
296
|
+
} | undefined;
|
|
297
|
+
downloadAsZip?: boolean | {
|
|
298
|
+
filename: string;
|
|
299
|
+
} | undefined;
|
|
300
|
+
slug?: string | undefined;
|
|
301
|
+
scope?: string | undefined;
|
|
302
|
+
hideRoot?: boolean | undefined;
|
|
303
|
+
}, {
|
|
304
|
+
type: "lesson";
|
|
305
|
+
title: string;
|
|
306
|
+
custom?: Record<string, any> | undefined;
|
|
307
|
+
mainCommand?: string | [string, string] | {
|
|
308
|
+
title: string;
|
|
309
|
+
command: string;
|
|
310
|
+
} | undefined;
|
|
311
|
+
prepareCommands?: (string | [string, string] | {
|
|
312
|
+
title: string;
|
|
313
|
+
command: string;
|
|
314
|
+
})[] | undefined;
|
|
315
|
+
terminal?: boolean | {
|
|
316
|
+
panels: "output" | "terminal" | ("output" | "terminal" | ["output" | "terminal", string] | {
|
|
317
|
+
type: "output" | "terminal";
|
|
318
|
+
title?: string | undefined;
|
|
319
|
+
id?: string | undefined;
|
|
320
|
+
allowRedirects?: boolean | undefined;
|
|
321
|
+
allowCommands?: string[] | undefined;
|
|
322
|
+
})[];
|
|
323
|
+
open?: boolean | undefined;
|
|
324
|
+
allowRedirects?: boolean | undefined;
|
|
325
|
+
allowCommands?: string[] | undefined;
|
|
326
|
+
activePanel?: number | undefined;
|
|
327
|
+
} | undefined;
|
|
328
|
+
meta?: {
|
|
329
|
+
image?: string | undefined;
|
|
330
|
+
description?: string | undefined;
|
|
331
|
+
title?: string | undefined;
|
|
332
|
+
} | undefined;
|
|
333
|
+
previews?: boolean | (string | number | [number, string] | [number, string, string] | {
|
|
334
|
+
title: string;
|
|
335
|
+
port: number;
|
|
336
|
+
pathname?: string | undefined;
|
|
337
|
+
})[] | undefined;
|
|
338
|
+
autoReload?: boolean | undefined;
|
|
339
|
+
filesystem?: {
|
|
340
|
+
watch?: boolean | string[] | undefined;
|
|
341
|
+
} | undefined;
|
|
342
|
+
template?: string | undefined;
|
|
343
|
+
focus?: string | undefined;
|
|
344
|
+
editor?: boolean | {
|
|
345
|
+
fileTree?: boolean | {
|
|
346
|
+
allowEdits: string | boolean | string[];
|
|
347
|
+
} | undefined;
|
|
348
|
+
} | undefined;
|
|
349
|
+
i18n?: {
|
|
350
|
+
partTemplate?: string | undefined;
|
|
351
|
+
editPageText?: string | undefined;
|
|
352
|
+
webcontainerLinkText?: string | undefined;
|
|
353
|
+
startWebContainerText?: string | undefined;
|
|
354
|
+
noPreviewNorStepsText?: string | undefined;
|
|
355
|
+
filesTitleText?: string | undefined;
|
|
356
|
+
fileTreeCreateFileText?: string | undefined;
|
|
357
|
+
fileTreeCreateFolderText?: string | undefined;
|
|
358
|
+
fileTreeActionNotAllowedText?: string | undefined;
|
|
359
|
+
fileTreeFileExistsAlreadyText?: string | undefined;
|
|
360
|
+
fileTreeAllowedPatternsText?: string | undefined;
|
|
361
|
+
confirmationText?: string | undefined;
|
|
362
|
+
prepareEnvironmentTitleText?: string | undefined;
|
|
363
|
+
defaultPreviewTitleText?: string | undefined;
|
|
364
|
+
reloadPreviewTitle?: string | undefined;
|
|
365
|
+
toggleTerminalButtonText?: string | undefined;
|
|
366
|
+
solveButtonText?: string | undefined;
|
|
367
|
+
resetButtonText?: string | undefined;
|
|
368
|
+
} | undefined;
|
|
369
|
+
editPageLink?: string | boolean | undefined;
|
|
370
|
+
openInStackBlitz?: boolean | {
|
|
371
|
+
projectTitle?: string | undefined;
|
|
372
|
+
projectDescription?: string | undefined;
|
|
373
|
+
projectTemplate?: "html" | "node" | "angular-cli" | "create-react-app" | "javascript" | "polymer" | "typescript" | "vue" | undefined;
|
|
374
|
+
} | undefined;
|
|
375
|
+
downloadAsZip?: boolean | {
|
|
376
|
+
filename: string;
|
|
377
|
+
} | undefined;
|
|
378
|
+
slug?: string | undefined;
|
|
379
|
+
scope?: string | undefined;
|
|
380
|
+
hideRoot?: boolean | undefined;
|
|
381
|
+
}>;
|
|
382
|
+
export type LessonSchema = z.infer<typeof lessonSchema>;
|