gamefic-sdk 2.1.0 → 2.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/gamefic-sdk/version.rb +1 -1
- data/scaffolds/react/package.json.gf.erb +1 -1
- data/scaffolds/react/web/src/index.js +6 -6
- data/scaffolds/react/web/src/scenes/Activity.jsx +13 -0
- data/scaffolds/react/web/src/scenes/Conclusion.jsx +12 -0
- data/scaffolds/react/web/src/scenes/MultipleChoice.jsx +13 -0
- data/scaffolds/react/web/src/scenes/Pause.jsx +13 -0
- data/scaffolds/react/web/src/scenes/index.js +8 -8
- metadata +6 -6
- data/scaffolds/react/web/src/scenes/ActivityScene.jsx +0 -13
- data/scaffolds/react/web/src/scenes/ConclusionScene.jsx +0 -12
- data/scaffolds/react/web/src/scenes/MultipleChoiceScene.jsx +0 -37
- data/scaffolds/react/web/src/scenes/PauseScene.jsx +0 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a866238615f7218acadfc7b9f2af9d914d9a8e615196eb301ae2347d9c7e9bed
|
4
|
+
data.tar.gz: ea7da83b2131148021813dd3d9f4b069278797f1b5e68fc0d91349cfcab64d85
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f491f6228a652685032500ace199b37b29f14c855838f2a4168a50574f21a98781e5304cb00a31d7eaee85f1395ef80e0bb94d32b4bec93248def7ef8a8af6e
|
7
|
+
data.tar.gz: 10d0faaaa0fd8aa903c1f7d6c3955031691312d481c9dc7fd9e97344b188840b162cdd666f513710b87f5c42b9c340f3a53d70f9531ef1a64bc3264cd07782b1
|
data/CHANGELOG.md
CHANGED
data/lib/gamefic-sdk/version.rb
CHANGED
@@ -4,16 +4,16 @@ import { Console, Terminal } from 'react-gamefic';
|
|
4
4
|
|
5
5
|
import { driver } from 'driver';
|
6
6
|
|
7
|
-
import {
|
7
|
+
import { Activity, Pause, MultipleChoice, Conclusion } from './scenes';
|
8
8
|
import 'react-gamefic/styles/ebook';
|
9
9
|
import './style.css';
|
10
10
|
|
11
11
|
const sceneComponents = {
|
12
|
-
Activity:
|
13
|
-
Pause:
|
14
|
-
MultipleChoice:
|
15
|
-
YesOrNo:
|
16
|
-
Conclusion:
|
12
|
+
Activity: Activity,
|
13
|
+
Pause: Pause,
|
14
|
+
MultipleChoice: MultipleChoice,
|
15
|
+
YesOrNo: MultipleChoice,
|
16
|
+
Conclusion: Conclusion
|
17
17
|
}
|
18
18
|
|
19
19
|
render(
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { ActivityScene, Output, CommandForm } from 'react-gamefic';
|
3
|
+
|
4
|
+
export class Activity extends React.Component {
|
5
|
+
render() {
|
6
|
+
return (
|
7
|
+
<ActivityScene>
|
8
|
+
<Output {...this.props} transcribe={true} />
|
9
|
+
<CommandForm prompt={this.props.state.prompt} />
|
10
|
+
</ActivityScene>
|
11
|
+
);
|
12
|
+
}
|
13
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { ConclusionScene, Output } from 'react-gamefic';
|
3
|
+
|
4
|
+
export class Conclusion extends React.Component {
|
5
|
+
render() {
|
6
|
+
return (
|
7
|
+
<ConclusionScene>
|
8
|
+
<Output {...this.props} transcribe={true} />
|
9
|
+
</ConclusionScene>
|
10
|
+
);
|
11
|
+
}
|
12
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { MultipleChoiceScene, ChoiceList } from 'react-gamefic';
|
3
|
+
|
4
|
+
export class MultipleChoice extends React.Component {
|
5
|
+
render() {
|
6
|
+
return (
|
7
|
+
<MultipleChoiceScene>
|
8
|
+
<Output {...this.props} transcribe={true} />,
|
9
|
+
<ChoiceList options={this.props.state.options} prompt={this.props.state.prompt} />
|
10
|
+
</MultipleChoiceScene>
|
11
|
+
);
|
12
|
+
}
|
13
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { PauseScene, Output, CommandLink } from 'react-gamefic';
|
3
|
+
|
4
|
+
export class Pause extends React.Component {
|
5
|
+
render() {
|
6
|
+
return (
|
7
|
+
<PauseScene>
|
8
|
+
<Output {...this.props} transcribe={true} />
|
9
|
+
<CommandLink command="">Continue</CommandLink>
|
10
|
+
</PauseScene>
|
11
|
+
);
|
12
|
+
}
|
13
|
+
}
|
@@ -1,11 +1,11 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
1
|
+
import { Activity } from './Activity.jsx';
|
2
|
+
import { Pause } from './Pause.jsx';
|
3
|
+
import { MultipleChoice } from './MultipleChoice.jsx';
|
4
|
+
import { Conclusion } from './Conclusion.jsx';
|
5
5
|
|
6
6
|
export {
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
Activity,
|
8
|
+
Pause,
|
9
|
+
MultipleChoice,
|
10
|
+
Conclusion
|
11
11
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gamefic-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fred Snyder
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-08-
|
11
|
+
date: 2020-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gamefic
|
@@ -261,10 +261,10 @@ files:
|
|
261
261
|
- scaffolds/react/web/src/driver/opal.rb
|
262
262
|
- scaffolds/react/web/src/driver/production.js
|
263
263
|
- scaffolds/react/web/src/index.js
|
264
|
-
- scaffolds/react/web/src/scenes/
|
265
|
-
- scaffolds/react/web/src/scenes/
|
266
|
-
- scaffolds/react/web/src/scenes/
|
267
|
-
- scaffolds/react/web/src/scenes/
|
264
|
+
- scaffolds/react/web/src/scenes/Activity.jsx
|
265
|
+
- scaffolds/react/web/src/scenes/Conclusion.jsx
|
266
|
+
- scaffolds/react/web/src/scenes/MultipleChoice.jsx
|
267
|
+
- scaffolds/react/web/src/scenes/Pause.jsx
|
268
268
|
- scaffolds/react/web/src/scenes/index.js
|
269
269
|
- scaffolds/react/web/src/style.css
|
270
270
|
- scaffolds/react/webpack.config.js
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { Output, CommandForm } from 'react-gamefic';
|
3
|
-
|
4
|
-
export class ActivityScene extends React.Component {
|
5
|
-
render() {
|
6
|
-
return (
|
7
|
-
<div className="ActivityScene">
|
8
|
-
<Output {...this.props} />
|
9
|
-
<CommandForm prompt={this.props.state.prompt} />
|
10
|
-
</div>
|
11
|
-
);
|
12
|
-
}
|
13
|
-
}
|
@@ -1,37 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { Output } from 'react-gamefic';
|
3
|
-
import { CommandLink } from 'react-gamefic';
|
4
|
-
|
5
|
-
export class MultipleChoiceScene extends React.Component {
|
6
|
-
renderChoices() {
|
7
|
-
if (this.props.state.options) {
|
8
|
-
const listItems = this.props.state.options.map((opt, index) => {
|
9
|
-
return (
|
10
|
-
<li key={index}>
|
11
|
-
<CommandLink command={opt}>{opt}</CommandLink>
|
12
|
-
</li>
|
13
|
-
);
|
14
|
-
});
|
15
|
-
return (
|
16
|
-
<nav>
|
17
|
-
<ol>
|
18
|
-
{listItems}
|
19
|
-
</ol>
|
20
|
-
</nav>
|
21
|
-
);
|
22
|
-
} else {
|
23
|
-
console.warn("Error: Multiple choice scene does not have any options");
|
24
|
-
return '';
|
25
|
-
}
|
26
|
-
}
|
27
|
-
|
28
|
-
render() {
|
29
|
-
return (
|
30
|
-
<div className="MultipleChoiceScene">
|
31
|
-
<Output {...this.props} />
|
32
|
-
<label>{this.props.state.prompt}</label>
|
33
|
-
{this.renderChoices()}
|
34
|
-
</div>
|
35
|
-
);
|
36
|
-
}
|
37
|
-
}
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { Output, CommandLink, CommandForm } from 'react-gamefic';
|
3
|
-
|
4
|
-
export class PauseScene extends React.Component {
|
5
|
-
render() {
|
6
|
-
return (
|
7
|
-
<div className="PauseScene">
|
8
|
-
<Output {...this.props} />
|
9
|
-
<CommandLink command="">Continue</CommandLink>
|
10
|
-
</div>
|
11
|
-
);
|
12
|
-
}
|
13
|
-
}
|