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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e191127d0c07f062207511ce1abb9b6b8237252a2c211751554673cc43a9572d
4
- data.tar.gz: e68a2692143010304e89abe4ccaf5d99f3227a39f89ef10c1cb7d56df6ed0c25
3
+ metadata.gz: a866238615f7218acadfc7b9f2af9d914d9a8e615196eb301ae2347d9c7e9bed
4
+ data.tar.gz: ea7da83b2131148021813dd3d9f4b069278797f1b5e68fc0d91349cfcab64d85
5
5
  SHA512:
6
- metadata.gz: b871b39cc1371113111d917ec0ff01180483daefefbe9725e95f1d486f9b72d708215b8ca8b483784b908d3682c7430b29ecb6fc13953b626c92b170555a315e
7
- data.tar.gz: a3e31833934272af6363b821f76cb8b1af8427b1797ccc0b61dcaff023aa9dc6323b9b4de174387d659a9ee1307020be81ee111560b173dba2b2afb99e6874f9
6
+ metadata.gz: 9f491f6228a652685032500ace199b37b29f14c855838f2a4168a50574f21a98781e5304cb00a31d7eaee85f1395ef80e0bb94d32b4bec93248def7ef8a8af6e
7
+ data.tar.gz: 10d0faaaa0fd8aa903c1f7d6c3955031691312d481c9dc7fd9e97344b188840b162cdd666f513710b87f5c42b9c340f3a53d70f9531ef1a64bc3264cd07782b1
@@ -1,3 +1,6 @@
1
+ ## 2.2.0 - August 29, 2020
2
+ - Update to react-gamefic 0.4.0
3
+
1
4
  ## 2.1.0 - August 27, 2020
2
5
  - Update web app with customizable scene components
3
6
 
@@ -1,5 +1,5 @@
1
1
  module Gamefic
2
2
  module Sdk
3
- VERSION = '2.1.0'
3
+ VERSION = '2.2.0'
4
4
  end
5
5
  end
@@ -29,6 +29,6 @@
29
29
  "gamefic-driver": "^0.2.1",
30
30
  "react": "^16.5.2",
31
31
  "react-dom": "^16.5.2",
32
- "react-gamefic": "^0.3.0"
32
+ "react-gamefic": "^0.4.0"
33
33
  }
34
34
  }
@@ -4,16 +4,16 @@ import { Console, Terminal } from 'react-gamefic';
4
4
 
5
5
  import { driver } from 'driver';
6
6
 
7
- import { ActivityScene, PauseScene, MultipleChoiceScene, ConclusionScene } from './scenes';
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: ActivityScene,
13
- Pause: PauseScene,
14
- MultipleChoice: MultipleChoiceScene,
15
- YesOrNo: MultipleChoiceScene,
16
- Conclusion: ConclusionScene
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 { ActivityScene } from './ActivityScene.jsx';
2
- import { PauseScene } from './PauseScene.jsx';
3
- import { MultipleChoiceScene } from './MultipleChoiceScene.jsx';
4
- import { ConclusionScene } from './ConclusionScene.jsx';
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
- ActivityScene,
8
- PauseScene,
9
- MultipleChoiceScene,
10
- ConclusionScene
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.1.0
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-27 00:00:00.000000000 Z
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/ActivityScene.jsx
265
- - scaffolds/react/web/src/scenes/ConclusionScene.jsx
266
- - scaffolds/react/web/src/scenes/MultipleChoiceScene.jsx
267
- - scaffolds/react/web/src/scenes/PauseScene.jsx
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,12 +0,0 @@
1
- import React from 'react';
2
- import { Output } from 'react-gamefic';
3
-
4
- export class ConclusionScene extends React.Component {
5
- render() {
6
- return (
7
- <div className="ConclusionScene">
8
- <Output {...this.props} />
9
- </div>
10
- );
11
- }
12
- }
@@ -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
- }