@learnpack/learnpack 5.0.92 → 5.0.94
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 -13
- package/lib/creatorDist/assets/{index-B48vF2UK.js → index-EA507Y8n.js} +36 -30
- package/lib/creatorDist/index.html +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
- package/src/creator/src/App.tsx +3 -1
- package/src/creator/src/components/syllabus/SyllabusEditor.tsx +2 -1
- package/src/creator/src/utils/store.ts +4 -0
- package/src/creatorDist/assets/{index-B48vF2UK.js → index-EA507Y8n.js} +36 -30
- package/src/creatorDist/index.html +1 -1
package/README.md
CHANGED
@@ -21,7 +21,7 @@ $ npm install -g @learnpack/learnpack
|
|
21
21
|
$ learnpack COMMAND
|
22
22
|
running command...
|
23
23
|
$ learnpack (-v|--version|version)
|
24
|
-
@learnpack/learnpack/5.0.
|
24
|
+
@learnpack/learnpack/5.0.94 win32-x64 node-v22.15.0
|
25
25
|
$ learnpack --help [COMMAND]
|
26
26
|
USAGE
|
27
27
|
$ learnpack COMMAND
|
@@ -80,7 +80,7 @@ DESCRIPTION
|
|
80
80
|
12. If there is a file within the exercises folder but not inside of any particular exercise's folder. (Warning)
|
81
81
|
```
|
82
82
|
|
83
|
-
_See code: [src\commands\audit.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.
|
83
|
+
_See code: [src\commands\audit.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.94/src\commands\audit.ts)_
|
84
84
|
|
85
85
|
## `learnpack breakToken`
|
86
86
|
|
@@ -95,7 +95,7 @@ OPTIONS
|
|
95
95
|
-y, --yes Skip all prompts and initialize an empty project
|
96
96
|
```
|
97
97
|
|
98
|
-
_See code: [src\commands\breakToken.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.
|
98
|
+
_See code: [src\commands\breakToken.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.94/src\commands\breakToken.ts)_
|
99
99
|
|
100
100
|
## `learnpack clean`
|
101
101
|
|
@@ -110,7 +110,7 @@ DESCRIPTION
|
|
110
110
|
Extra documentation goes here
|
111
111
|
```
|
112
112
|
|
113
|
-
_See code: [src\commands\clean.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.
|
113
|
+
_See code: [src\commands\clean.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.94/src\commands\clean.ts)_
|
114
114
|
|
115
115
|
## `learnpack download [PACKAGE]`
|
116
116
|
|
@@ -128,7 +128,7 @@ DESCRIPTION
|
|
128
128
|
Extra documentation goes here
|
129
129
|
```
|
130
130
|
|
131
|
-
_See code: [src\commands\download.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.
|
131
|
+
_See code: [src\commands\download.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.94/src\commands\download.ts)_
|
132
132
|
|
133
133
|
## `learnpack help [COMMAND]`
|
134
134
|
|
@@ -160,7 +160,7 @@ OPTIONS
|
|
160
160
|
-y, --yes Skip all prompts and initialize an empty project
|
161
161
|
```
|
162
162
|
|
163
|
-
_See code: [src\commands\init.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.
|
163
|
+
_See code: [src\commands\init.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.94/src\commands\init.ts)_
|
164
164
|
|
165
165
|
## `learnpack login [PACKAGE]`
|
166
166
|
|
@@ -178,7 +178,7 @@ DESCRIPTION
|
|
178
178
|
Extra documentation goes here
|
179
179
|
```
|
180
180
|
|
181
|
-
_See code: [src\commands\login.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.
|
181
|
+
_See code: [src\commands\login.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.94/src\commands\login.ts)_
|
182
182
|
|
183
183
|
## `learnpack logout [PACKAGE]`
|
184
184
|
|
@@ -196,7 +196,7 @@ DESCRIPTION
|
|
196
196
|
Extra documentation goes here
|
197
197
|
```
|
198
198
|
|
199
|
-
_See code: [src\commands\logout.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.
|
199
|
+
_See code: [src\commands\logout.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.94/src\commands\logout.ts)_
|
200
200
|
|
201
201
|
## `learnpack plugins`
|
202
202
|
|
@@ -328,7 +328,7 @@ OPTIONS
|
|
328
328
|
-s, --strict strict mode
|
329
329
|
```
|
330
330
|
|
331
|
-
_See code: [src\commands\publish.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.
|
331
|
+
_See code: [src\commands\publish.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.94/src\commands\publish.ts)_
|
332
332
|
|
333
333
|
## `learnpack serve`
|
334
334
|
|
@@ -345,7 +345,7 @@ OPTIONS
|
|
345
345
|
-y, --yes Skip all prompts and initialize an empty project
|
346
346
|
```
|
347
347
|
|
348
|
-
_See code: [src\commands\serve.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.
|
348
|
+
_See code: [src\commands\serve.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.94/src\commands\serve.ts)_
|
349
349
|
|
350
350
|
## `learnpack start`
|
351
351
|
|
@@ -367,7 +367,7 @@ OPTIONS
|
|
367
367
|
-y, --yes Skip all prompts and initialize an empty project
|
368
368
|
```
|
369
369
|
|
370
|
-
_See code: [src\commands\start.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.
|
370
|
+
_See code: [src\commands\start.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.94/src\commands\start.ts)_
|
371
371
|
|
372
372
|
## `learnpack test [EXERCISESLUG]`
|
373
373
|
|
@@ -384,7 +384,7 @@ OPTIONS
|
|
384
384
|
-y, --yes Skip all prompts and initialize an empty project
|
385
385
|
```
|
386
386
|
|
387
|
-
_See code: [src\commands\test.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.
|
387
|
+
_See code: [src\commands\test.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.94/src\commands\test.ts)_
|
388
388
|
|
389
389
|
## `learnpack translate`
|
390
390
|
|
@@ -398,7 +398,7 @@ OPTIONS
|
|
398
398
|
-y, --yes Skip all prompts and initialize an empty project
|
399
399
|
```
|
400
400
|
|
401
|
-
_See code: [src\commands\translate.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.
|
401
|
+
_See code: [src\commands\translate.ts](https://github.com/learnpack/learnpack-cli/blob/v5.0.94/src\commands\translate.ts)_
|
402
402
|
<!-- commandsstop -->
|
403
403
|
|
404
404
|
> > > > > > > 0cb3e56d84c197f9d008836bb573eade212b7e57
|
@@ -14555,6 +14555,9 @@ const I_ = (n) => (e) => {
|
|
14555
14555
|
undo: () => {
|
14556
14556
|
n((e) => ({ history: e.history.slice(0, -1) }))
|
14557
14557
|
},
|
14558
|
+
cleanHistory: () => {
|
14559
|
+
n(() => ({ history: [] }))
|
14560
|
+
},
|
14558
14561
|
consumables: {},
|
14559
14562
|
setConsumables: (e) =>
|
14560
14563
|
n((t) => {
|
@@ -73798,25 +73801,27 @@ function kQ() {
|
|
73798
73801
|
setFormState: t,
|
73799
73802
|
setAuth: i,
|
73800
73803
|
push: r,
|
73804
|
+
cleanHistory: a,
|
73801
73805
|
} = Wr(
|
73802
|
-
nS((
|
73803
|
-
formState:
|
73804
|
-
setFormState:
|
73805
|
-
setAuth:
|
73806
|
-
push:
|
73806
|
+
nS((h) => ({
|
73807
|
+
formState: h.formState,
|
73808
|
+
setFormState: h.setFormState,
|
73809
|
+
setAuth: h.setAuth,
|
73810
|
+
push: h.push,
|
73811
|
+
cleanHistory: h.cleanHistory,
|
73807
73812
|
}))
|
73808
73813
|
)
|
73809
73814
|
me.useEffect(() => {
|
73810
|
-
e.isCompleted &&
|
73815
|
+
e.isCompleted && l()
|
73811
73816
|
}, [e]),
|
73812
73817
|
me.useEffect(() => {
|
73813
|
-
|
73818
|
+
s()
|
73814
73819
|
}, [])
|
73815
|
-
const
|
73816
|
-
const { token:
|
73817
|
-
if (
|
73818
|
-
const
|
73819
|
-
i({ bcToken:
|
73820
|
+
const s = async () => {
|
73821
|
+
const { token: h } = bO()
|
73822
|
+
if (h) {
|
73823
|
+
const d = await vO(h)
|
73824
|
+
i({ bcToken: h, userId: d.id, rigoToken: d.rigobot.key, user: d }),
|
73820
73825
|
t({
|
73821
73826
|
variables: [
|
73822
73827
|
"description",
|
@@ -73836,13 +73841,14 @@ function kQ() {
|
|
73836
73841
|
],
|
73837
73842
|
})
|
73838
73843
|
},
|
73839
|
-
|
73840
|
-
|
73844
|
+
l = async () => {
|
73845
|
+
a()
|
73846
|
+
const h = await pO({
|
73841
73847
|
courseInfo: JSON.stringify(e),
|
73842
73848
|
prevInteractions: "",
|
73843
73849
|
}),
|
73844
|
-
|
73845
|
-
r({ lessons:
|
73850
|
+
d = h.parsed.listOfSteps.map((p) => mO(p, []))
|
73851
|
+
r({ lessons: d, courseInfo: { ...e, title: h.parsed.title } }),
|
73846
73852
|
n("/creator/syllabus"),
|
73847
73853
|
t({
|
73848
73854
|
description: "",
|
@@ -73854,7 +73860,7 @@ function kQ() {
|
|
73854
73860
|
currentStep: "description",
|
73855
73861
|
})
|
73856
73862
|
},
|
73857
|
-
|
73863
|
+
u = () =>
|
73858
73864
|
[
|
73859
73865
|
{
|
73860
73866
|
title: "Provide a description for your tutorial",
|
@@ -73865,8 +73871,8 @@ function kQ() {
|
|
73865
73871
|
className:
|
73866
73872
|
"w-full h-24 border-2 border-gray-300 rounded-md p-2 bg-white",
|
73867
73873
|
value: e.description,
|
73868
|
-
onChange: (
|
73869
|
-
t({ description:
|
73874
|
+
onChange: (d) => {
|
73875
|
+
t({ description: d.target.value })
|
73870
73876
|
},
|
73871
73877
|
}),
|
73872
73878
|
},
|
@@ -73912,8 +73918,8 @@ function kQ() {
|
|
73912
73918
|
className:
|
73913
73919
|
"w-full h-24 border-2 border-gray-300 rounded-md p-2 bg-white",
|
73914
73920
|
defaultValue: e.targetAudience,
|
73915
|
-
onBlur: (
|
73916
|
-
t({ targetAudience:
|
73921
|
+
onBlur: (d) => {
|
73922
|
+
t({ targetAudience: d.target.value })
|
73917
73923
|
},
|
73918
73924
|
}),
|
73919
73925
|
}),
|
@@ -73958,24 +73964,24 @@ function kQ() {
|
|
73958
73964
|
className:
|
73959
73965
|
"w-full h-40 border-2 border-gray-300 rounded-md p-2",
|
73960
73966
|
value: e.contentIndex,
|
73961
|
-
onChange: (
|
73962
|
-
t({ contentIndex:
|
73967
|
+
onChange: (d) => {
|
73968
|
+
t({ contentIndex: d.target.value })
|
73963
73969
|
},
|
73964
73970
|
}),
|
73965
73971
|
ve.jsx(cB, {
|
73966
|
-
onResult: (
|
73967
|
-
let
|
73968
|
-
|
73969
|
-
|
73972
|
+
onResult: (d) => {
|
73973
|
+
let p = ""
|
73974
|
+
d.forEach((g) => {
|
73975
|
+
p += `<FILE NAME="${g.name}">${g.text}</FILE>
|
73970
73976
|
`
|
73971
73977
|
}),
|
73972
|
-
t({ contentIndex:
|
73978
|
+
t({ contentIndex: p })
|
73973
73979
|
},
|
73974
73980
|
}),
|
73975
73981
|
],
|
73976
73982
|
}),
|
73977
73983
|
},
|
73978
|
-
].filter((
|
73984
|
+
].filter((d) => e.variables.includes(d.slug) || d.slug === e.currentStep)
|
73979
73985
|
return ve.jsx(ve.Fragment, {
|
73980
73986
|
children: e.isCompleted
|
73981
73987
|
? ve.jsx(tS, {
|
@@ -73988,7 +73994,7 @@ function kQ() {
|
|
73988
73994
|
})
|
73989
73995
|
: ve.jsx(gq, {
|
73990
73996
|
formState: e,
|
73991
|
-
steps:
|
73997
|
+
steps: u(),
|
73992
73998
|
setFormState: t,
|
73993
73999
|
onFinish: () => {
|
73994
74000
|
t({ isCompleted: !0 })
|
@@ -10,7 +10,7 @@
|
|
10
10
|
/>
|
11
11
|
|
12
12
|
<title>Learnpack Creator: Craft tutorials in seconds!</title>
|
13
|
-
<script type="module" crossorigin src="/creator/assets/index-
|
13
|
+
<script type="module" crossorigin src="/creator/assets/index-EA507Y8n.js"></script>
|
14
14
|
<link rel="stylesheet" crossorigin href="/creator/assets/index-ldEC0yWM.css">
|
15
15
|
</head>
|
16
16
|
<body>
|
package/oclif.manifest.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":"5.0.
|
1
|
+
{"version":"5.0.94","commands":{"audit":{"id":"audit","description":"learnpack audit is the command in charge of creating an auditory of the repository\n...\nlearnpack audit checks for the following information in a repository:\n 1. The configuration object has slug, repository and description. (Error)\n 2. The command learnpack clean has been run. (Error)\n 3. If a markdown or test file doesn't have any content. (Error)\n 4. The links are accessing to valid servers. (Error)\n 5. The relative images are working (If they have the shortest path to the image or if the images exists in the assets). (Error)\n 6. The external images are working (If they are pointing to a valid server). (Error)\n 7. The exercises directory names are valid. (Error)\n 8. If an exercise doesn't have a README file. (Error)\n 9. The exercises array (Of the config file) has content. (Error)\n 10. The exercses have the same translations. (Warning)\n 11. The .gitignore file exists. (Warning)\n 12. If there is a file within the exercises folder but not inside of any particular exercise's folder. (Warning)\n","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{"strict":{"name":"strict","type":"boolean","char":"s","description":"strict mode","allowNo":false}},"args":[]},"breakToken":{"id":"breakToken","description":"Break the token","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{"yes":{"name":"yes","type":"boolean","char":"y","description":"Skip all prompts and initialize an empty project","allowNo":false},"grading":{"name":"grading","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"clean":{"id":"clean","description":"Clean the configuration object\n ...\n Extra documentation goes here\n ","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{},"args":[]},"download":{"id":"download","description":"Describe the command here\n...\nExtra documentation goes here\n","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"package","description":"The unique string that identifies this package on learnpack","required":false,"hidden":false}]},"init":{"id":"init","description":"Create a new learning package: Book, Tutorial or Exercise","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{"yes":{"name":"yes","type":"boolean","char":"y","description":"Skip all prompts and initialize an empty project","allowNo":false},"grading":{"name":"grading","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"login":{"id":"login","description":"Describe the command here\n ...\n Extra documentation goes here\n ","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"package","description":"The unique string that identifies this package on learnpack","required":false,"hidden":false}]},"logout":{"id":"logout","description":"Describe the command here\n ...\n Extra documentation goes here\n ","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{},"args":[{"name":"package","description":"The unique string that identifies this package on learnpack","required":false,"hidden":false}]},"publish":{"id":"publish","description":"Builds the project by copying necessary files and directories into a zip file","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{"strict":{"name":"strict","type":"boolean","char":"s","description":"strict mode","allowNo":false},"help":{"name":"help","type":"boolean","char":"h","description":"show CLI help","allowNo":false}},"args":[]},"serve":{"id":"serve","description":"Runs a small server to build tutorials","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{"yes":{"name":"yes","type":"boolean","char":"y","description":"Skip all prompts and initialize an empty project","allowNo":false},"port":{"name":"port","type":"option","char":"p","description":"server port"},"host":{"name":"host","type":"option","char":"h","description":"server host"},"debug":{"name":"debug","type":"boolean","char":"d","description":"debugger mode for more verbage","allowNo":false}},"args":[]},"start":{"id":"start","description":"Runs a small server with all the exercise instructions","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{"yes":{"name":"yes","type":"boolean","char":"y","description":"Skip all prompts and initialize an empty project","allowNo":false},"port":{"name":"port","type":"option","char":"p","description":"server port"},"host":{"name":"host","type":"option","char":"h","description":"server host"},"disableGrading":{"name":"disableGrading","type":"boolean","char":"D","description":"disble grading functionality","allowNo":false},"watch":{"name":"watch","type":"boolean","char":"w","description":"Watch for file changes","allowNo":false},"editor":{"name":"editor","type":"option","char":"e","description":"[preview, extension]","options":["extension","preview"]},"version":{"name":"version","type":"option","char":"v","description":"E.g: 1.0.1"},"grading":{"name":"grading","type":"option","char":"g","description":"[isolated, incremental]","options":["isolated","incremental"]},"debug":{"name":"debug","type":"boolean","char":"d","description":"debugger mode for more verbage","allowNo":false}},"args":[]},"test":{"id":"test","description":"Test exercises","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{"yes":{"name":"yes","type":"boolean","char":"y","description":"Skip all prompts and initialize an empty project","allowNo":false}},"args":[{"name":"exerciseSlug","description":"The name of the exercise to test","required":false,"hidden":false}]},"translate":{"id":"translate","description":"List all the lessons, the user is able of select many of them to translate to the given languages","pluginName":"@learnpack/learnpack","pluginType":"core","aliases":[],"flags":{"yes":{"name":"yes","type":"boolean","char":"y","description":"Skip all prompts and initialize an empty project","allowNo":false}},"args":[]}}}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@learnpack/learnpack",
|
3
3
|
"description": "Seamlessly build, sell and/or take interactive & auto-graded tutorials, start learning now or build a new tutorial to your audience.",
|
4
|
-
"version": "5.0.
|
4
|
+
"version": "5.0.94",
|
5
5
|
"author": "Alejandro Sanchez @alesanchezr",
|
6
6
|
"contributors": [
|
7
7
|
{
|
package/src/creator/src/App.tsx
CHANGED
@@ -17,12 +17,13 @@ import FileUploader from "./components/FileUploader"
|
|
17
17
|
function App() {
|
18
18
|
const navigate = useNavigate()
|
19
19
|
|
20
|
-
const { formState, setFormState, setAuth, push } = useStore(
|
20
|
+
const { formState, setFormState, setAuth, push, cleanHistory } = useStore(
|
21
21
|
useShallow((state) => ({
|
22
22
|
formState: state.formState,
|
23
23
|
setFormState: state.setFormState,
|
24
24
|
setAuth: state.setAuth,
|
25
25
|
push: state.push,
|
26
|
+
cleanHistory: state.cleanHistory,
|
26
27
|
}))
|
27
28
|
)
|
28
29
|
|
@@ -68,6 +69,7 @@ function App() {
|
|
68
69
|
}
|
69
70
|
|
70
71
|
const handleCreateTutorial = async () => {
|
72
|
+
cleanHistory()
|
71
73
|
const res = await interactiveCreation({
|
72
74
|
courseInfo: JSON.stringify(formState),
|
73
75
|
prevInteractions: "",
|
@@ -46,13 +46,14 @@ const SyllabusEditor: React.FC = () => {
|
|
46
46
|
const [showLoginModal, setShowLoginModal] = useState(false)
|
47
47
|
const [isThinking, setIsThinking] = useState(false)
|
48
48
|
|
49
|
-
const { history, auth, setAuth, push, uploadedFiles } = useStore(
|
49
|
+
const { history, auth, setAuth, push, uploadedFiles, cleanHistory } = useStore(
|
50
50
|
useShallow((state) => ({
|
51
51
|
history: state.history,
|
52
52
|
auth: state.auth,
|
53
53
|
setAuth: state.setAuth,
|
54
54
|
push: state.push,
|
55
55
|
uploadedFiles: state.uploadedFiles,
|
56
|
+
cleanHistory: state.cleanHistory,
|
56
57
|
}))
|
57
58
|
)
|
58
59
|
|
@@ -41,6 +41,7 @@ type Store = {
|
|
41
41
|
uploadedFiles: UploadedFile[]
|
42
42
|
setUploadedFiles: (uploadedFiles: UploadedFile[]) => void
|
43
43
|
|
44
|
+
cleanHistory: () => void
|
44
45
|
history: Syllabus[]
|
45
46
|
undo: () => void
|
46
47
|
push: (syllabus: Syllabus) => void
|
@@ -96,6 +97,9 @@ const useStore = create<Store>()(
|
|
96
97
|
}
|
97
98
|
})
|
98
99
|
},
|
100
|
+
cleanHistory: () => {
|
101
|
+
set(() => ({ history: [] }))
|
102
|
+
},
|
99
103
|
consumables: {},
|
100
104
|
setConsumables: (consumables: Partial<Consumables>) =>
|
101
105
|
set((state) => {
|
@@ -14555,6 +14555,9 @@ const I_ = (n) => (e) => {
|
|
14555
14555
|
undo: () => {
|
14556
14556
|
n((e) => ({ history: e.history.slice(0, -1) }))
|
14557
14557
|
},
|
14558
|
+
cleanHistory: () => {
|
14559
|
+
n(() => ({ history: [] }))
|
14560
|
+
},
|
14558
14561
|
consumables: {},
|
14559
14562
|
setConsumables: (e) =>
|
14560
14563
|
n((t) => {
|
@@ -73798,25 +73801,27 @@ function kQ() {
|
|
73798
73801
|
setFormState: t,
|
73799
73802
|
setAuth: i,
|
73800
73803
|
push: r,
|
73804
|
+
cleanHistory: a,
|
73801
73805
|
} = Wr(
|
73802
|
-
nS((
|
73803
|
-
formState:
|
73804
|
-
setFormState:
|
73805
|
-
setAuth:
|
73806
|
-
push:
|
73806
|
+
nS((h) => ({
|
73807
|
+
formState: h.formState,
|
73808
|
+
setFormState: h.setFormState,
|
73809
|
+
setAuth: h.setAuth,
|
73810
|
+
push: h.push,
|
73811
|
+
cleanHistory: h.cleanHistory,
|
73807
73812
|
}))
|
73808
73813
|
)
|
73809
73814
|
me.useEffect(() => {
|
73810
|
-
e.isCompleted &&
|
73815
|
+
e.isCompleted && l()
|
73811
73816
|
}, [e]),
|
73812
73817
|
me.useEffect(() => {
|
73813
|
-
|
73818
|
+
s()
|
73814
73819
|
}, [])
|
73815
|
-
const
|
73816
|
-
const { token:
|
73817
|
-
if (
|
73818
|
-
const
|
73819
|
-
i({ bcToken:
|
73820
|
+
const s = async () => {
|
73821
|
+
const { token: h } = bO()
|
73822
|
+
if (h) {
|
73823
|
+
const d = await vO(h)
|
73824
|
+
i({ bcToken: h, userId: d.id, rigoToken: d.rigobot.key, user: d }),
|
73820
73825
|
t({
|
73821
73826
|
variables: [
|
73822
73827
|
"description",
|
@@ -73836,13 +73841,14 @@ function kQ() {
|
|
73836
73841
|
],
|
73837
73842
|
})
|
73838
73843
|
},
|
73839
|
-
|
73840
|
-
|
73844
|
+
l = async () => {
|
73845
|
+
a()
|
73846
|
+
const h = await pO({
|
73841
73847
|
courseInfo: JSON.stringify(e),
|
73842
73848
|
prevInteractions: "",
|
73843
73849
|
}),
|
73844
|
-
|
73845
|
-
r({ lessons:
|
73850
|
+
d = h.parsed.listOfSteps.map((p) => mO(p, []))
|
73851
|
+
r({ lessons: d, courseInfo: { ...e, title: h.parsed.title } }),
|
73846
73852
|
n("/creator/syllabus"),
|
73847
73853
|
t({
|
73848
73854
|
description: "",
|
@@ -73854,7 +73860,7 @@ function kQ() {
|
|
73854
73860
|
currentStep: "description",
|
73855
73861
|
})
|
73856
73862
|
},
|
73857
|
-
|
73863
|
+
u = () =>
|
73858
73864
|
[
|
73859
73865
|
{
|
73860
73866
|
title: "Provide a description for your tutorial",
|
@@ -73865,8 +73871,8 @@ function kQ() {
|
|
73865
73871
|
className:
|
73866
73872
|
"w-full h-24 border-2 border-gray-300 rounded-md p-2 bg-white",
|
73867
73873
|
value: e.description,
|
73868
|
-
onChange: (
|
73869
|
-
t({ description:
|
73874
|
+
onChange: (d) => {
|
73875
|
+
t({ description: d.target.value })
|
73870
73876
|
},
|
73871
73877
|
}),
|
73872
73878
|
},
|
@@ -73912,8 +73918,8 @@ function kQ() {
|
|
73912
73918
|
className:
|
73913
73919
|
"w-full h-24 border-2 border-gray-300 rounded-md p-2 bg-white",
|
73914
73920
|
defaultValue: e.targetAudience,
|
73915
|
-
onBlur: (
|
73916
|
-
t({ targetAudience:
|
73921
|
+
onBlur: (d) => {
|
73922
|
+
t({ targetAudience: d.target.value })
|
73917
73923
|
},
|
73918
73924
|
}),
|
73919
73925
|
}),
|
@@ -73958,24 +73964,24 @@ function kQ() {
|
|
73958
73964
|
className:
|
73959
73965
|
"w-full h-40 border-2 border-gray-300 rounded-md p-2",
|
73960
73966
|
value: e.contentIndex,
|
73961
|
-
onChange: (
|
73962
|
-
t({ contentIndex:
|
73967
|
+
onChange: (d) => {
|
73968
|
+
t({ contentIndex: d.target.value })
|
73963
73969
|
},
|
73964
73970
|
}),
|
73965
73971
|
ve.jsx(cB, {
|
73966
|
-
onResult: (
|
73967
|
-
let
|
73968
|
-
|
73969
|
-
|
73972
|
+
onResult: (d) => {
|
73973
|
+
let p = ""
|
73974
|
+
d.forEach((g) => {
|
73975
|
+
p += `<FILE NAME="${g.name}">${g.text}</FILE>
|
73970
73976
|
`
|
73971
73977
|
}),
|
73972
|
-
t({ contentIndex:
|
73978
|
+
t({ contentIndex: p })
|
73973
73979
|
},
|
73974
73980
|
}),
|
73975
73981
|
],
|
73976
73982
|
}),
|
73977
73983
|
},
|
73978
|
-
].filter((
|
73984
|
+
].filter((d) => e.variables.includes(d.slug) || d.slug === e.currentStep)
|
73979
73985
|
return ve.jsx(ve.Fragment, {
|
73980
73986
|
children: e.isCompleted
|
73981
73987
|
? ve.jsx(tS, {
|
@@ -73988,7 +73994,7 @@ function kQ() {
|
|
73988
73994
|
})
|
73989
73995
|
: ve.jsx(gq, {
|
73990
73996
|
formState: e,
|
73991
|
-
steps:
|
73997
|
+
steps: u(),
|
73992
73998
|
setFormState: t,
|
73993
73999
|
onFinish: () => {
|
73994
74000
|
t({ isCompleted: !0 })
|
@@ -10,7 +10,7 @@
|
|
10
10
|
/>
|
11
11
|
|
12
12
|
<title>Learnpack Creator: Craft tutorials in seconds!</title>
|
13
|
-
<script type="module" crossorigin src="/creator/assets/index-
|
13
|
+
<script type="module" crossorigin src="/creator/assets/index-EA507Y8n.js"></script>
|
14
14
|
<link rel="stylesheet" crossorigin href="/creator/assets/index-ldEC0yWM.css">
|
15
15
|
</head>
|
16
16
|
<body>
|