koffing 0.4.0 → 0.5.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.
Files changed (62) hide show
  1. package/Makefile +21 -0
  2. package/README.md +75 -26
  3. package/build/asset-manifest.json +22 -0
  4. package/build/favicon.png +0 -0
  5. package/build/index.html +1 -0
  6. package/build/precache-manifest.5382b78dea2866c8a94cee003da35d84.js +26 -0
  7. package/build/robots.txt +3 -0
  8. package/build/service-worker.js +39 -0
  9. package/build/static/css/main.102b9840.chunk.css +2 -0
  10. package/build/static/css/main.102b9840.chunk.css.map +1 -0
  11. package/build/static/js/2.4b3dd85a.chunk.js +3 -0
  12. package/build/static/js/2.4b3dd85a.chunk.js.LICENSE.txt +67 -0
  13. package/build/static/js/2.4b3dd85a.chunk.js.map +1 -0
  14. package/build/static/js/main.07f66bec.chunk.js +2 -0
  15. package/build/static/js/main.07f66bec.chunk.js.map +1 -0
  16. package/build/static/js/runtime-main.525bb0ff.js +2 -0
  17. package/build/static/js/runtime-main.525bb0ff.js.map +1 -0
  18. package/package.json +42 -31
  19. package/public/favicon.png +0 -0
  20. package/public/index.html +30 -0
  21. package/public/robots.txt +3 -0
  22. package/src/App.test.js +9 -0
  23. package/src/components/App.js +18 -0
  24. package/src/components/AppFooter/AppFooter.css.js +12 -0
  25. package/src/components/AppFooter/AppFooter.js +31 -0
  26. package/src/components/AppFooter/index.js +3 -0
  27. package/src/components/AppHeader/AppHeader.css.js +21 -0
  28. package/src/components/AppHeader/AppHeader.js +34 -0
  29. package/src/components/AppHeader/index.js +3 -0
  30. package/src/components/Board/Board.css.js +21 -0
  31. package/src/components/Board/Board.js +110 -0
  32. package/src/components/Board/index.js +3 -0
  33. package/src/components/BoardInput/BoardInput.css.js +14 -0
  34. package/src/components/BoardInput/BoardInput.js +36 -0
  35. package/src/components/BoardInput/index.js +3 -0
  36. package/src/components/BoardOutput/BoardOutput.css.js +17 -0
  37. package/src/components/BoardOutput/BoardOutput.js +36 -0
  38. package/src/components/BoardOutput/index.js +3 -0
  39. package/src/components/Code/Code.css.js +10 -0
  40. package/src/components/Code/Code.js +28 -0
  41. package/src/components/Code/index.js +3 -0
  42. package/src/components/StyledComponent.js +24 -0
  43. package/src/components/ThemedApp.js +25 -0
  44. package/src/core/Koffing.js +71 -0
  45. package/src/{Pokemon.js → core/Pokemon.js} +9 -2
  46. package/src/{PokemonTeam.js → core/PokemonTeam.js} +0 -2
  47. package/src/{PokemonTeamSet.js → core/PokemonTeamSet.js} +0 -2
  48. package/src/{ShowdownParser.js → core/ShowdownParser.js} +7 -8
  49. package/src/core/index.js +7 -0
  50. package/src/img/koffing-shiny.png +0 -0
  51. package/src/img/koffing.png +0 -0
  52. package/src/index.css +42 -0
  53. package/src/index.js +15 -74
  54. package/src/serviceWorker.js +141 -0
  55. package/src/setupTests.js +5 -0
  56. package/src/teams/example.koffing.js +25 -0
  57. package/src/tools/base64.js +25 -0
  58. package/src/tools/history.js +17 -0
  59. package/src/tools/index.js +4 -0
  60. package/src/variables.json +5 -0
  61. package/dist/koffing.js +0 -940
  62. package/dist/koffing.min.js +0 -1
@@ -0,0 +1,25 @@
1
+ export default `
2
+ === [gen7] Folder 1/Example Team ===
3
+
4
+ Smogon (Koffing) (F) @ Eviolite
5
+ Level: 5
6
+ Ability: Levitate
7
+ Shiny: Yes
8
+ Happiness: 255
9
+ EVs: 36 HP / 236 Def / 236 SpD
10
+ IVs: 31 HP / 30 Atk / 31 SpA / 30 SpD / 31 Spe
11
+ Bold Nature
12
+ - Will-O-Wisp
13
+ - Pain Split
14
+ - Sludge Bomb
15
+ - Fire Blast
16
+
17
+ Weezing @ Black Sludge
18
+ Ability: Levitate
19
+ EVs: 252 HP / 160 Def / 96 Spe
20
+ Bold Nature
21
+ - Sludge Bomb
22
+ - Will-O-Wisp
23
+ - Toxic Spikes
24
+ - Taunt
25
+ `;
@@ -0,0 +1,25 @@
1
+ class base64 {
2
+ static encode = function (unencoded) {
3
+ return new Buffer(unencoded || '').toString('base64');
4
+ };
5
+
6
+ static decode = function (encoded) {
7
+ return new Buffer(encoded || '', 'base64').toString('utf8');
8
+ };
9
+
10
+
11
+ static urlEncode = function (unencoded) {
12
+ let encoded = base64.encode(unencoded);
13
+ return encoded.replace('+', '-')
14
+ .replace('/', '_').replace(/=+$/, '');
15
+ };
16
+
17
+ static urlDecode = function (encoded) {
18
+ encoded = encoded.replace('-', '+').replace('_', '/');
19
+ while (encoded.length % 4)
20
+ encoded += '=';
21
+ return base64.decode(encoded);
22
+ };
23
+ }
24
+
25
+ export default base64;
@@ -0,0 +1,17 @@
1
+ export default {
2
+ getState() {
3
+ return window.location.hash.replace(/^#/, '');
4
+ },
5
+ createStateUrl(state) {
6
+ return window.location.origin + window.location.pathname + '#' + state;
7
+ },
8
+ pushState(state) {
9
+ window.history.pushState(null, null, state);
10
+ },
11
+ addListener(callback) {
12
+ window.addEventListener("popstate", callback, false);
13
+ },
14
+ removeListener(callback) {
15
+ window.removeEventListener("popstate", callback, false);
16
+ }
17
+ }
@@ -0,0 +1,4 @@
1
+ import base64 from './base64';
2
+ import history from './history';
3
+
4
+ export {base64, history};
@@ -0,0 +1,5 @@
1
+ {
2
+ "header_title": "Koffing - Pokémon Showdown Team Parser",
3
+ "github_url": "https://github.com/itsjavi/koffing",
4
+ "homepage": "https://itsjavi.com/koffing"
5
+ }