powergrid-viewer 1.5.4

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 (57) hide show
  1. package/README.md +35 -0
  2. package/dist/img/help.ba7779cc.svg +1 -0
  3. package/dist/img/log.04ef6981.svg +1 -0
  4. package/dist/img/pass.da9065dc.svg +3 -0
  5. package/dist/img/rules.64f9aae5.svg +28 -0
  6. package/dist/img/sound-off.72ada995.svg +3 -0
  7. package/dist/img/sound-on.c55edd90.svg +3 -0
  8. package/dist/img/undo.208666d2.svg +3 -0
  9. package/dist/media/notification.55fa47dd.ogg +0 -0
  10. package/dist/media/notification.ac905963.mp3 +0 -0
  11. package/dist/media/piece-drop.eef5f607.mp3 +0 -0
  12. package/dist/powergrid-viewer.css +1 -0
  13. package/dist/powergrid-viewer.umd.min.js +35 -0
  14. package/package.json +49 -0
  15. package/src/audio/notification.mp3 +0 -0
  16. package/src/audio/notification.ogg +0 -0
  17. package/src/audio/piece-drop.mp3 +0 -0
  18. package/src/components/Calculator.vue +62 -0
  19. package/src/components/Game.vue +1354 -0
  20. package/src/components/PlayerBoard.vue +230 -0
  21. package/src/components/boards/CityCount.vue +82 -0
  22. package/src/components/boards/Map.vue +196 -0
  23. package/src/components/boards/PlayerOrder.vue +68 -0
  24. package/src/components/boards/PowerPlantMarket.vue +184 -0
  25. package/src/components/boards/Resources.vue +446 -0
  26. package/src/components/buttons/Button.vue +26 -0
  27. package/src/components/buttons/HelpButton.vue +18 -0
  28. package/src/components/buttons/LogButton.vue +15 -0
  29. package/src/components/buttons/PassButton.vue +18 -0
  30. package/src/components/buttons/RulesButton.vue +14 -0
  31. package/src/components/buttons/SoundButton.vue +18 -0
  32. package/src/components/buttons/UndoButton.vue +17 -0
  33. package/src/components/buttons/index.js +9 -0
  34. package/src/components/pieces/Card.vue +131 -0
  35. package/src/components/pieces/Coal.vue +40 -0
  36. package/src/components/pieces/Garbage.vue +40 -0
  37. package/src/components/pieces/House.vue +51 -0
  38. package/src/components/pieces/Hybrid.vue +37 -0
  39. package/src/components/pieces/Oil.vue +40 -0
  40. package/src/components/pieces/Piece.vue +104 -0
  41. package/src/components/pieces/Uranium.vue +32 -0
  42. package/src/components/pieces/index.js +10 -0
  43. package/src/icons/help.svg +1 -0
  44. package/src/icons/log.svg +1 -0
  45. package/src/icons/pass.svg +3 -0
  46. package/src/icons/rules.svg +28 -0
  47. package/src/icons/sound-off.svg +3 -0
  48. package/src/icons/sound-on.svg +3 -0
  49. package/src/icons/undo.svg +3 -0
  50. package/src/launch.ts +87 -0
  51. package/src/main.ts +3 -0
  52. package/src/self-contained.ts +97 -0
  53. package/src/shims-tsx.d.ts +13 -0
  54. package/src/shims-vue.d.ts +4 -0
  55. package/src/types/ui-data.ts +34 -0
  56. package/src/wrapper.ts +8 -0
  57. package/tsconfig.json +23 -0
package/README.md ADDED
@@ -0,0 +1,35 @@
1
+ # powergrid-viewer
2
+
3
+ ## Project setup
4
+
5
+ ```
6
+ yarn install
7
+ ```
8
+
9
+ ### Compiles and hot-reloads for development
10
+
11
+ ```
12
+ yarn serve
13
+ ```
14
+
15
+ ### Compiles and minifies for production
16
+
17
+ ```
18
+ yarn build
19
+ ```
20
+
21
+ ### Run your unit tests
22
+
23
+ ```
24
+ yarn test:unit
25
+ ```
26
+
27
+ ### Lints and fixes files
28
+
29
+ ```
30
+ yarn lint
31
+ ```
32
+
33
+ ### Customize configuration
34
+
35
+ See [Configuration Reference](https://cli.vuejs.org/config/).
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M14.601 21.5c0 1.38-1.116 2.5-2.499 2.5-1.378 0-2.499-1.12-2.499-2.5s1.121-2.5 2.499-2.5c1.383 0 2.499 1.119 2.499 2.5zm-2.42-21.5c-4.029 0-7.06 2.693-7.06 8h3.955c0-2.304.906-4.189 3.024-4.189 1.247 0 2.57.828 2.684 2.411.123 1.666-.767 2.511-1.892 3.582-2.924 2.78-2.816 4.049-2.816 7.196h3.943c0-1.452-.157-2.508 1.838-4.659 1.331-1.436 2.986-3.222 3.021-5.943.047-3.963-2.751-6.398-6.697-6.398z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M24 12c0 6.627-5.373 12-12 12s-12-5.373-12-12h2c0 5.514 4.486 10 10 10s10-4.486 10-10-4.486-10-10-10c-2.777 0-5.287 1.141-7.099 2.977l2.061 2.061-6.962 1.354 1.305-7.013 2.179 2.18c2.172-2.196 5.182-3.559 8.516-3.559 6.627 0 12 5.373 12 12zm-13-6v8h7v-2h-5v-6h-2z"/></svg>
@@ -0,0 +1,3 @@
1
+ <svg width="40" height="40" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M0 0 L20 20 L0 40 Z M20 0 L40 20 L20 40 Z" />
3
+ </svg>
@@ -0,0 +1,28 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="475.452px" height="475.451px" viewBox="0 0 475.452 475.451">
2
+ <g>
3
+ <path d="M468.083,118.385c-3.99-5.33-9.61-9.419-16.854-12.275c0.387,6.665-0.086,12.09-1.42,16.281l-85.65,281.789
4
+ c-1.526,4.948-4.859,8.897-9.992,11.848c-5.141,2.953-10.469,4.428-15.989,4.428H74.66c-22.84,0-36.542-6.652-41.112-19.985
5
+ c-1.903-5.14-1.807-9.229,0.288-12.275c2.092-2.857,5.708-4.288,10.85-4.288h248.102c17.702,0,29.93-3.285,36.688-9.852
6
+ c6.763-6.567,13.565-21.177,20.413-43.824l78.228-258.669c4.186-14.084,2.474-26.457-5.141-37.113s-18.462-15.987-32.548-15.987
7
+ H173.163c-2.474,0-7.329,0.854-14.562,2.568l0.284-0.859c-5.33-1.14-9.851-1.662-13.562-1.571
8
+ c-3.71,0.099-7.137,1.192-10.277,3.289c-3.14,2.094-5.664,4.328-7.566,6.706c-1.903,2.38-3.761,5.426-5.568,9.136
9
+ c-1.805,3.715-3.33,7.142-4.567,10.282c-1.237,3.14-2.666,6.473-4.281,9.998c-1.62,3.521-3.186,6.423-4.71,8.706
10
+ c-1.143,1.523-2.758,3.521-4.854,5.996c-2.091,2.474-3.805,4.664-5.137,6.567c-1.331,1.903-2.19,3.616-2.568,5.14
11
+ c-0.378,1.711-0.19,4.233,0.571,7.566c0.76,3.328,1.047,5.753,0.854,7.277c-0.76,7.232-3.378,16.414-7.849,27.552
12
+ c-4.471,11.136-8.52,19.18-12.135,24.126c-0.761,0.95-2.853,3.092-6.28,6.424c-3.427,3.33-5.52,6.23-6.279,8.704
13
+ c-0.762,0.951-0.81,3.617-0.144,7.994c0.666,4.38,0.907,7.423,0.715,9.136c-0.765,6.473-3.14,15.037-7.139,25.697
14
+ c-3.999,10.657-7.994,19.414-11.993,26.265c-0.569,1.141-2.185,3.328-4.853,6.567c-2.662,3.237-4.283,5.902-4.853,7.99
15
+ c-0.38,1.523-0.33,4.188,0.144,7.994c0.473,3.806,0.426,6.66-0.144,8.562c-1.521,7.228-4.377,15.94-8.565,26.125
16
+ c-4.187,10.178-8.47,18.896-12.851,26.121c-1.138,1.906-2.712,4.145-4.708,6.711c-1.999,2.566-3.568,4.805-4.711,6.707
17
+ c-1.141,1.903-1.903,3.901-2.284,5.996c-0.19,1.143,0.098,2.998,0.859,5.571c0.76,2.566,1.047,4.612,0.854,6.14
18
+ c-0.192,2.662-0.57,6.187-1.141,10.567c-0.572,4.373-0.859,6.939-0.859,7.699c-4.187,11.424-3.999,23.511,0.572,36.269
19
+ c5.33,14.838,14.797,27.36,28.406,37.541c13.61,10.185,27.74,15.27,42.398,15.27h263.521c12.367,0,24.026-4.141,34.971-12.416
20
+ c10.944-8.281,18.227-18.507,21.837-30.696l78.511-258.662C477.412,141.51,475.701,129.234,468.083,118.385z M164.31,118.956
21
+ l5.997-18.274c0.76-2.474,2.329-4.615,4.709-6.423c2.38-1.805,4.808-2.712,7.282-2.712h173.589c2.663,0,4.565,0.903,5.708,2.712
22
+ c1.14,1.809,1.335,3.949,0.575,6.423l-6.002,18.274c-0.764,2.475-2.327,4.611-4.713,6.424c-2.382,1.805-4.805,2.708-7.278,2.708
23
+ H170.593c-2.666,0-4.568-0.9-5.711-2.708C163.74,123.567,163.55,121.431,164.31,118.956z M140.615,192.045l5.996-18.271
24
+ c0.76-2.474,2.331-4.615,4.709-6.423c2.38-1.809,4.805-2.712,7.282-2.712h173.583c2.666,0,4.572,0.9,5.712,2.712
25
+ c1.14,1.809,1.331,3.949,0.568,6.423l-5.996,18.271c-0.759,2.474-2.33,4.617-4.708,6.423c-2.383,1.809-4.805,2.712-7.283,2.712
26
+ H146.895c-2.664,0-4.567-0.9-5.708-2.712C140.043,196.662,139.854,194.519,140.615,192.045z"/>
27
+ </g>
28
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
2
+ <path d="M5 17h-5v-10h5v10zm2-10v10l9 5v-20l-9 5zm15.324 4.993l1.646-1.659-1.324-1.324-1.651 1.67-1.665-1.648-1.316 1.318 1.67 1.657-1.65 1.669 1.318 1.317 1.658-1.672 1.666 1.653 1.324-1.325-1.676-1.656z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
2
+ <path d="M5 17h-5v-10h5v10zm2-10v10l9 5v-20l-9 5zm17 4h-5v2h5v-2zm-1.584-6.232l-4.332 2.5 1 1.732 4.332-2.5-1-1.732zm1 12.732l-4.332-2.5-1 1.732 4.332 2.5 1-1.732z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="497.25px" height="497.25px" viewBox="0 0 497.25 497.25" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill="black" d="M248.625,89.25 V0 l-127.5,127.5 l127.5,127.5 V140.25 c84.15,0,153,68.85,153,153 c0,84.15-68.85,153-153,153 c-84.15,0-153-68.85-153-153 h-51 c0,112.2,91.8,204,204,204 s204-91.8,204-204 S360.825,89.25,248.625,89.25z"/>
3
+ </svg>
@@ -0,0 +1 @@
1
+ .canClick{cursor:pointer}.calculator{fill:#333}.calculator .button{cursor:pointer}.calculator .visor{font-family:"system-ui"}ul{-webkit-margin-before:0;margin-block-start:0}.game{display:flex;align-items:center;flex-direction:column}.fitToScreen{height:100%}.statusBar{height:40px;width:100%;background-color:#000;color:#fff;text-align:center;line-height:40px;font-size:20px;position:fixed}#scene{max-height:calc(100% - 40px);flex-grow:1;margin:40px auto auto auto}body,html{height:100%;width:100%;margin:0;padding:0}text{font-family:Arial;pointer-events:none;dominant-baseline:central;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.button.highlightButton rect{stroke:#00f;stroke-width:4px}.button.enabled{cursor:pointer}.button.enabled:hover circle,.button.enabled:hover rect{fill:silver;stroke:#fff}.button.enabled:hover line{stroke:#fff}.button.enabled:hover image{filter:invert(1)}.button.enabled:hover text{fill:#fff}.button:not(.enabled) circle,.button:not(.enabled) line,.button:not(.enabled) rect{stroke:silver}.button:not(.enabled) image{filter:invert(.75)}.button:not(.enabled) text{fill:silver}.modal{display:none;position:fixed;z-index:1;padding-top:10vh;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:rgba(0,0,0,.4)}.modal.visible{display:block}.modal-content{border-radius:5px;background-color:#fefefe;margin:auto;padding:10px 20px 20px 20px;border:1px solid #888}@media only screen and (min-width:1240px){.modal-content{position:absolute;left:50%;transform:translate(-50%)}}.modal-body{max-height:calc(80vh - 64px);overflow:auto}.modal-log{max-height:calc(80vh - 75px);overflow:auto;border:1px solid #000}.log-line{padding:5px}.log-line:nth-last-child(2n){background:#ccc}.log-line:nth-last-child(odd){background:#fff}.modal-title{text-align:center;margin-bottom:10px}.close,.modal-title{font-size:28px;font-weight:700}.close{color:#aaa;float:right}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer}.payment-table{border:1px solid #000;margin:5px auto}.payment-table tr td{border:1px solid #000;text-align:center;padding:0 10px 0 10px}.final-score-table,.spending-table{margin:auto;border:1px solid #000}.final-score-table tr td,.final-score-table tr th,.spending-table tr td,.spending-table tr th{border:1px solid #000;text-align:center;overflow:hidden;text-overflow:ellipsis}.final-score-table tr td div,.final-score-table tr th div,.spending-table tr td div,.spending-table tr th div{width:120px;line-height:38px}.final-score-table tr td:first-child div,.final-score-table tr th:first-child div,.spending-table tr td:first-child div,.spending-table tr th:first-child div{width:250px}.confirm-message{font-size:18px;padding:10px}.confirm-buttons{text-align:center}.confirm-button{margin:15px 0 0 15px}