├── .github ├── dependabot.yml └── workflows │ ├── codeql-analysis.yml │ └── nodejs.yml ├── .gitignore ├── .gitpod.yml ├── .jshintrc ├── .npmrc ├── .typesafe-i18n.json ├── CHANGELOG.md ├── LICENSE ├── bin └── gen_examples.mjs ├── dev.md ├── docs ├── config │ ├── config.html │ └── cori-vishnu.pgn ├── css │ ├── base.css │ ├── layout.css │ ├── prettify.css │ └── skeleton.css ├── docu.html ├── examples.html ├── examples │ ├── 1000.html │ ├── 1001.html │ ├── 1002.html │ ├── 1003.html │ ├── 1004.html │ ├── 1005.html │ ├── 1020.html │ ├── 1021.html │ ├── 1022.html │ ├── 1023.html │ ├── 1024.html │ ├── 1025.html │ ├── 1026.html │ ├── 1027.html │ ├── 1028.html │ ├── 1029.html │ ├── 1051.html │ ├── 1052.html │ ├── 1053.html │ ├── 1054.html │ ├── 1055.html │ ├── 1056.html │ ├── 1057.html │ ├── 1058.html │ ├── 1059.html │ ├── 1100.html │ ├── 1101.html │ ├── 1104.html │ ├── 1107.html │ ├── 1110.html │ ├── 1114.html │ ├── 1118.html │ ├── 1121.html │ ├── 1124.html │ ├── 1127.html │ ├── 1130.html │ ├── 1134.html │ ├── 1137.html │ ├── 1140.html │ ├── 1145.html │ ├── 1150.html │ ├── 1200.html │ ├── 1201.html │ ├── 1202.html │ ├── 1203.html │ ├── 1204.html │ ├── 1205.html │ ├── 1206.html │ ├── 1207.html │ └── 1208.html ├── img │ ├── favicon.png │ ├── structure-html.dia │ ├── structure-html.haml │ └── structure-html.png ├── index.html ├── js │ ├── examples.mjs │ ├── functions.mjs │ ├── prettify.js │ └── run_prettify.js ├── lib │ ├── dist.js │ ├── dist.js.gz │ ├── dist.js.map │ └── dist.js.map.gz └── readme.md ├── examples ├── base │ ├── board.html │ ├── edit.html │ ├── print.html │ ├── puzzle.html │ ├── readme.html │ ├── readme.md │ └── view.html ├── books │ ├── marschall-anand-tabelle.jpg │ ├── marschall-anand.jpg │ ├── marschall-anand2.jpg │ ├── marschall-krogius.jpg │ ├── morphy.jpg │ ├── najdorf-2.jpg │ ├── najdorf-3.jpg │ ├── najdorf-notation.jpg │ ├── najdorf.jpg │ ├── new-in-chess.jpg │ ├── opfer.jpg │ ├── sicilian.jpg │ ├── tarrasch.jpg │ └── tarrasch2.jpg ├── configuration │ ├── board │ │ ├── 0_boardSize.html │ │ ├── 1_coordinates.html │ │ ├── 2_orientation.html │ │ ├── 3_position.html │ │ ├── boardSize.html │ │ ├── coordinates.html │ │ ├── orientation.html │ │ ├── position.html │ │ └── width.html │ ├── config.html │ ├── default │ │ ├── 00_default.html │ │ ├── 01_global-default.html │ │ ├── 02-1_pieceStyle-css.html │ │ ├── 02-2_pieceStyle-css.html │ │ ├── 02-3_pieceStyle-css.html │ │ ├── 03_theme-css.html │ │ ├── 04_orientation.html │ │ ├── 05_showFen.html │ │ ├── 06_showCoords.html │ │ ├── 07_coordsInner.html │ │ ├── 08_headers.html │ │ ├── 09_notation.html │ │ ├── 10_png.html │ │ ├── 11_position.html │ │ ├── 12_figurine.html │ │ ├── 13_notationLayout.html │ │ ├── 14_timerTime.html │ │ ├── 15_coordsFactor.html │ │ ├── 16_coordsFontSize.html │ │ ├── 17_colorMarker.html │ │ ├── 18_locale.html │ │ ├── 19_startPlay.html │ │ ├── 20_hideMovesBefore.html │ │ ├── 21_showResult.html │ │ ├── 22_movable.html │ │ ├── 23_highlight.html │ │ ├── 24_timeAnnotation.html │ │ ├── 25_resizable.html │ │ └── global-default.html │ ├── input │ │ ├── 0_pgn.html │ │ ├── 1_headers.html │ │ ├── 2_pgnFileExternal.html │ │ ├── 3_many-games-left.html │ │ ├── 4_many-many-games-left.html │ │ ├── headers-edit.html │ │ ├── headers.html │ │ ├── many-games-left.html │ │ ├── many-games-top.html │ │ ├── pgn.html │ │ └── pgnFile.html │ ├── layout │ │ ├── 00_top-one.html │ │ ├── 01_bottom-one.html │ │ ├── 02_left-one.html │ │ ├── 03_right-one.html │ │ ├── 04_top-header.html │ │ ├── 05_left-header.html │ │ ├── 06_width-edit.html │ │ ├── 07_width-print.html │ │ ├── 08_width-view.html │ │ ├── 09_top-movesHeight.html │ │ ├── 10_top-no-params.html │ │ ├── 11_left-no-size.html │ │ ├── 12_top-width-boardSize.html │ │ ├── 13_left-width-boardSize.html │ │ ├── 14_left-width-movesWidth.html │ │ ├── 15_top-width-movesHeight.html │ │ ├── top-many.html │ │ ├── top-one-few-moves.html │ │ └── top-one.html │ ├── moves │ │ ├── 0_one-locale.html │ │ ├── 1_parse-error.html │ │ ├── 2_chess-error.html │ │ ├── 3_showFen.html │ │ ├── 4_showResult.html │ │ ├── 5_figurine.html │ │ ├── 6_nags.html │ │ ├── figurines.html │ │ ├── list-layout.html │ │ ├── locale.html │ │ ├── promotion.html │ │ └── timerTime.html │ └── themes │ │ ├── 0_pieceStyle.html │ │ ├── 1_theme.html │ │ ├── pieceStyle.html │ │ └── themes.html ├── img │ ├── analyse-chess-buttons.png │ ├── chess24.png │ ├── chesscom-buttons1.png │ ├── chesscom-buttons2.png │ ├── chesscom-editor.jpg │ ├── chesscom.png │ ├── lichess-notation-variant.png │ └── lichess-notation-variant2.png ├── modes │ ├── board │ │ ├── 0_one-board.html │ │ ├── board.html │ │ ├── cg-pieces.html │ │ ├── cg-themes.html │ │ ├── chessground.html │ │ ├── one-board.html │ │ ├── rankFontSize.html │ │ └── styles.html │ ├── edit │ │ ├── 0_layout-left.html │ │ ├── 1_promotion.html │ │ ├── 2_variations2.html │ │ ├── edit.html │ │ ├── layout-left.html │ │ └── sa.html │ ├── print │ │ ├── blackburn.html │ │ ├── print.1.html │ │ └── print.html │ └── view │ │ ├── 0_pgn.html │ │ ├── 1_check.html │ │ ├── 2_comments.html │ │ ├── 3_pgnShowFen.html │ │ ├── 4_promotion.html │ │ ├── 5_shapes.html │ │ ├── 6_nags.html │ │ ├── empty.html │ │ ├── layout-left.html │ │ ├── layout-top.html │ │ ├── min-pos.html │ │ ├── nag.pgn │ │ ├── promotion.html │ │ ├── shapes.html │ │ ├── syntaxerrors.html │ │ ├── var-pos.html │ │ ├── variations3.html │ │ └── view-pos.html ├── pgn │ ├── GM_games.pgn │ ├── README.md │ ├── WorldChamp1972.pgn │ ├── cori-vishnu.pgn │ ├── great_masters.pgn │ ├── kk.pgn │ ├── krasenkov-nakamura.pgn │ ├── match1.pgn │ ├── match2.pgn │ ├── match3.pgn │ ├── match4.pgn │ ├── md-example.md │ ├── mieses.pgn │ ├── morphy-rousseau.pgn │ ├── moscow64.pgn │ ├── nags.pgn │ ├── newyork1924.pgn │ ├── semicomm.pgn │ ├── var1.pgn │ └── world_matches.pgn ├── react │ ├── .gitignore │ ├── App.js │ ├── PgnViewer.js │ └── readme.md ├── readme │ ├── 02_left-one.html │ ├── edit.html │ └── sportverlag.html ├── template.html ├── tickets │ ├── loc │ │ ├── buttons-de.json │ │ └── chess-de.json │ ├── ticket003.html │ ├── ticket003v.html │ ├── ticket003v2.html │ ├── ticket003v3.html │ ├── ticket004.html │ ├── ticket005.html │ ├── ticket006.html │ ├── ticket007.html │ ├── ticket009.html │ ├── ticket010.html │ ├── ticket011.html │ ├── ticket013.html │ ├── ticket019.html │ ├── ticket023-2.html │ ├── ticket023.html │ ├── ticket025.html │ ├── ticket026.html │ ├── ticket030.html │ ├── ticket031.html │ ├── ticket042.html │ ├── ticket043.html │ ├── ticket045.html │ ├── ticket046-2.html │ ├── ticket046-3.html │ ├── ticket046.html │ ├── ticket047.html │ ├── ticket052.html │ ├── ticket053-lic.pgn │ ├── ticket053-pgnv.pgn │ ├── ticket053.html │ ├── ticket058.html │ ├── ticket059.html │ ├── ticket060.html │ ├── ticket064-left-right.html │ ├── ticket064-top-bottom.1.html │ ├── ticket065.html │ ├── ticket066.html │ ├── ticket071.html │ ├── ticket072.html │ ├── ticket077.html │ ├── ticket087.html │ ├── ticket091.html │ ├── ticket093.html │ ├── ticket096.html │ ├── ticket105.html │ ├── ticket106.html │ ├── ticket108.html │ ├── ticket109.html │ ├── ticket112-1.html │ ├── ticket112-2.html │ ├── ticket112.html │ ├── ticket114.html │ ├── ticket116.html │ ├── ticket117-2.html │ ├── ticket117.html │ ├── ticket119-2col-art.html │ ├── ticket119-2x3.html │ ├── ticket119-3x3.html │ ├── ticket119-3x4.html │ ├── ticket121.html │ ├── ticket122.html │ ├── ticket126.html │ ├── ticket135.html │ ├── ticket139.html │ ├── ticket140.html │ ├── ticket144.html │ ├── ticket145-1.html │ ├── ticket145-2.html │ ├── ticket145.html │ ├── ticket153.html │ ├── ticket154.html │ ├── ticket158-bottom.html │ ├── ticket158-left.html │ ├── ticket158-right.html │ ├── ticket158-top-boardSize.html │ ├── ticket158-top-divWidth.html │ ├── ticket158-top.html │ ├── ticket171.html │ ├── ticket177.html │ ├── ticket182-top.html │ ├── ticket186.html │ ├── ticket190-2.html │ ├── ticket190.html │ ├── ticket205.html │ ├── ticket218.html │ ├── ticket219.html │ ├── ticket227.html │ ├── ticket228.html │ ├── ticket230-svg-net.html │ ├── ticket230-webfont-net.html │ ├── ticket234.html │ ├── ticket235-2.html │ ├── ticket235.html │ ├── ticket240.html │ ├── ticket244.html │ ├── ticket245.html │ ├── ticket246.html │ ├── ticket247.html │ ├── ticket261.html │ ├── ticket303.html │ ├── ticket309p.html │ ├── ticket311p.html │ ├── ticket318.html │ ├── ticket337.html │ ├── ticket338.html │ ├── ticket387.html │ ├── ticket414.html │ ├── ticket416.html │ ├── ticket436-1.html │ ├── ticket436.html │ ├── ticket452.html │ ├── ticket482.html │ ├── ticket484.html │ ├── ticket518.html │ ├── ticket522.html │ ├── ticket555.html │ ├── ticket565.html │ ├── ticket580.html │ ├── ticket601-left.html │ └── ticket601-top.html └── trainer │ ├── README.md │ ├── angriffsobject-finden.html │ ├── guter-läufer.html │ └── verteidigung.html ├── package-lock.json ├── package-scripts.js ├── package.json ├── postcss.config.js ├── react.md ├── readme.md ├── roadmap.md ├── screenshots ├── edit-variation.png ├── sportverlag.png └── view-layout-left.png ├── src ├── api.ts ├── css │ ├── .uuid │ ├── CAChess-fig.woff │ ├── CAChess-min.woff │ ├── ChessAlpha.woff │ ├── ChessBerlin.woff │ ├── ChessMerida.woff │ ├── NotoSans.woff │ ├── pgnvjs.css │ ├── resize.css │ └── theme.css ├── i18n.ts ├── i18n │ ├── formatters.ts │ ├── i18n-types.ts │ ├── i18n-util.sync.ts │ └── i18n-util.ts ├── img │ ├── board │ │ ├── beyer.svg │ │ ├── blue.svg │ │ ├── brown.svg │ │ ├── falken.svg │ │ ├── green.svg │ │ ├── informator.svg │ │ ├── sportverlag.svg │ │ └── zeit.svg │ ├── chesspieces │ │ ├── alpha │ │ │ ├── bB.svg │ │ │ ├── bK.svg │ │ │ ├── bN.svg │ │ │ ├── bP.svg │ │ │ ├── bQ.svg │ │ │ ├── bR.svg │ │ │ ├── wB.svg │ │ │ ├── wK.svg │ │ │ ├── wN.svg │ │ │ ├── wN1.svg │ │ │ ├── wP.svg │ │ │ ├── wQ.svg │ │ │ └── wR.svg │ │ ├── beyer │ │ │ ├── bB.png │ │ │ ├── bK.png │ │ │ ├── bN.png │ │ │ ├── bP.png │ │ │ ├── bQ.png │ │ │ ├── bR.png │ │ │ ├── wB.png │ │ │ ├── wK.png │ │ │ ├── wN.png │ │ │ ├── wP.png │ │ │ ├── wQ.png │ │ │ └── wR.png │ │ ├── case │ │ │ ├── bB.svg │ │ │ ├── bK.svg │ │ │ ├── bN.svg │ │ │ ├── bP.svg │ │ │ ├── bQ.svg │ │ │ ├── bR.svg │ │ │ ├── wB.svg │ │ │ ├── wK.svg │ │ │ ├── wN.svg │ │ │ ├── wP.svg │ │ │ ├── wQ.svg │ │ │ └── wR.svg │ │ ├── condal │ │ │ ├── bB.png │ │ │ ├── bK.png │ │ │ ├── bN.png │ │ │ ├── bP.png │ │ │ ├── bQ.png │ │ │ ├── bR.png │ │ │ ├── wB.png │ │ │ ├── wK.png │ │ │ ├── wN.png │ │ │ ├── wP.png │ │ │ ├── wQ.png │ │ │ └── wR.png │ │ ├── leipzig │ │ │ ├── bB.svg │ │ │ ├── bK.svg │ │ │ ├── bN.svg │ │ │ ├── bP.svg │ │ │ ├── bQ.svg │ │ │ ├── bR.svg │ │ │ ├── wB.svg │ │ │ ├── wK.svg │ │ │ ├── wN.svg │ │ │ ├── wP.svg │ │ │ ├── wQ.svg │ │ │ └── wR.svg │ │ ├── maya │ │ │ ├── bB.svg │ │ │ ├── bK.svg │ │ │ ├── bN.svg │ │ │ ├── bP.svg │ │ │ ├── bQ.svg │ │ │ ├── bR.svg │ │ │ ├── wB.svg │ │ │ ├── wK.svg │ │ │ ├── wN.svg │ │ │ ├── wP.svg │ │ │ ├── wQ.svg │ │ │ └── wR.svg │ │ ├── merida │ │ │ ├── bB.svg │ │ │ ├── bK.svg │ │ │ ├── bN.svg │ │ │ ├── bP.svg │ │ │ ├── bQ.svg │ │ │ ├── bR.svg │ │ │ ├── wB.svg │ │ │ ├── wK.svg │ │ │ ├── wN.svg │ │ │ ├── wP.svg │ │ │ ├── wQ.svg │ │ │ └── wR.svg │ │ ├── uscf │ │ │ ├── bB.png │ │ │ ├── bK.png │ │ │ ├── bN.png │ │ │ ├── bP.png │ │ │ ├── bQ.png │ │ │ ├── bR.png │ │ │ ├── wB.png │ │ │ ├── wK.png │ │ │ ├── wN.png │ │ │ ├── wP.png │ │ │ ├── wQ.png │ │ │ └── wR.png │ │ └── wikipedia │ │ │ ├── bB.svg │ │ │ ├── bK.svg │ │ │ ├── bN.svg │ │ │ ├── bP.svg │ │ │ ├── bQ.svg │ │ │ ├── bR.svg │ │ │ ├── wB.svg │ │ │ ├── wK.svg │ │ │ ├── wN.svg │ │ │ ├── wP.svg │ │ │ ├── wQ.svg │ │ │ └── wR.svg │ ├── favicon.ico │ └── pattern │ │ ├── chess1x1.png │ │ ├── diagonal-stripe-1.svg │ │ ├── diagonal.png │ │ ├── diagonal1x2.png │ │ ├── diagonal1x2r.png │ │ ├── diagonal1x3.png │ │ └── vertical1x3.png ├── index.ts ├── locales │ ├── cs.ts │ ├── da.ts │ ├── de.ts │ ├── en.ts │ ├── es.ts │ ├── et.ts │ ├── fi.ts │ ├── fr.ts │ ├── hu.ts │ ├── is.ts │ ├── it.ts │ ├── nb.ts │ ├── nl.ts │ ├── pt.ts │ ├── ro.ts │ └── sv.ts ├── pgnv.ts ├── resize.ts ├── timer.ts └── types.ts ├── test ├── i18n-trial.ts ├── i18n.ts └── timer.ts ├── tsconfig.json ├── webpack.common.cjs ├── webpack.dev.cjs └── webpack.prod.cjs /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: "npm" # See documentation for possible values 9 | directory: "/" # Location of package manifests 10 | schedule: 11 | interval: "daily" 12 | -------------------------------------------------------------------------------- /.github/workflows/nodejs.yml: -------------------------------------------------------------------------------- 1 | name: Node CI 2 | 3 | on: [push] 4 | 5 | jobs: 6 | build: 7 | 8 | runs-on: ubuntu-latest 9 | 10 | strategy: 11 | matrix: 12 | node-version: [20, 22] 13 | 14 | steps: 15 | - uses: actions/checkout@v3 16 | - name: Use Node.src ${{ matrix.node-version }} 17 | uses: actions/setup-node@v3 18 | with: 19 | node-version: ${{ matrix.node-version }} 20 | - name: npm install, build, and test 21 | run: | 22 | npm install 23 | npm run build 24 | npm run test 25 | env: 26 | CI: true 27 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | lib/* 2 | .idea/* 3 | node_modules/* 4 | .aider* 5 | -------------------------------------------------------------------------------- /.gitpod.yml: -------------------------------------------------------------------------------- 1 | # This configuration file was automatically generated by Gitpod. 2 | # Please adjust to your needs (see https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml) 3 | # and commit this file to your remote git repository to share the goodness with others. 4 | 5 | # Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart 6 | 7 | tasks: 8 | - init: npm install 9 | 10 | 11 | -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "esversion": 6, 3 | "asi": true, 4 | "predef": [ 5 | "window", 6 | "document", 7 | "console", 8 | "swal", 9 | "Event"] 10 | } -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | locales = en,de,fr,es,cs,da,et,fi,hu,is,it,nb,nl,pt,ro,sv -------------------------------------------------------------------------------- /.typesafe-i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "adapters": [], 3 | "$schema": "https://unpkg.com/typesafe-i18n@5.26.2/schema/typesafe-i18n.json" 4 | } -------------------------------------------------------------------------------- /docs/examples/1000.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Board with defaults 7 | 8 | 9 | 10 | 11 | 12 | 13 |

Board with defaults

14 |

Javascript part

15 |
var board = PGNV.pgnBoard('board', {});
16 |

HTML part

17 |
<div id="board" style="width: 400px"></div>
18 |

See the back link to the original examples page.

19 |
Use pgn-viewer for only displaying a board. See the section "Boards" for details on that.
20 |
21 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/examples/1020.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Starting Board 7 | 8 | 9 | 10 | 11 | 12 | 13 |

Starting Board

14 |

Javascript part

15 |
var board = PGNV.pgnBoard('board', {});
16 |

HTML part

17 |
<div id="board" style="width: 400px"></div>
18 |

See the back link to the original examples page.

19 |
ChessBoard initializes to the starting position on board with an empty configuration.
20 |
21 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/examples/1023.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Set orientation to black 7 | 8 | 9 | 10 | 11 | 12 | 13 |

Set orientation to black

14 |

Javascript part

15 |
PGNV.pgnBoard('b1', {orientation: 'black'});
16 |

HTML part

17 |
<div id="b1" style="width: 300px; margin: 20px;float: left""></div>
18 |

See the back link to the original examples page.

19 |
ChessBoard with orientation set to black.
20 |
21 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/examples/1024.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Don't show coordinates 7 | 8 | 9 | 10 | 11 | 12 | 13 |

Don't show coordinates

14 |

Javascript part

15 |
PGNV.pgnBoard('b1', {showCoords: false});
16 |

HTML part

17 |
<div id="b1" style="width: 300px; margin: 20px;float: left""></div>
18 |

See the back link to the original examples page.

19 |
ChessBoard with showCoords set to false.
20 |
21 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/examples/1134.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Show FEN in text field 7 | 8 | 9 | 10 | 11 | 12 | 13 |

Show FEN in text field

14 |

Javascript part

15 |
var pgn = "1. e4 e5 2. Nf3 Nc6  ...  24. Bxe7# 1-0";
16 | pgnv = PGNV.pgnView("board2", {pgn: pgn});
17 |

HTML part

18 |
<div id="board2" style="width: 450px"></div>
19 |

See the back link to the original examples page.

20 |
Shows a game in viewer with FEN text field
21 |
22 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /docs/examples/1137.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Show FEN in text field 7 | 8 | 9 | 10 | 11 | 12 | 13 |

Show FEN in text field

14 |

Javascript part

15 |
var pgn = "1. f4 e6 g4 Qh4# 0-1";
16 | pgnv = PGNV.pgnView("board2", {pgn: pgn, showResult: true});
17 |

HTML part

18 |
<div id="board2" style="width: 450px"></div>
19 |

See the back link to the original examples page.

20 |
Shows the result of the game in the PGN notation
21 |
22 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /docs/examples/1200.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Default layout top 7 | 8 | 9 | 10 | 11 | 12 | 13 |

Default layout top

14 |

Javascript part

15 |
var pgn = "1. e4 e5 2. Nf3 Nc6  ...  24. Bxe7# 1-0";
16 | pgnv = PGNV.pgnView("board2", {pgn: pgn});
17 |

HTML part

18 |
<div id="board2" style="width: 300px"></div>
19 |

See the back link to the original examples page.

20 |
Shows a game in default layout top
21 |
22 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /docs/examples/1201.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Default layout top in edit mode 7 | 8 | 9 | 10 | 11 | 12 | 13 |

Default layout top in edit mode

14 |

Javascript part

15 |
var pgn = "1. e4 e5 2. Nf3 Nc6  ...  24. Bxe7# 1-0";
16 | pgnv = PGNV.pgnEdit("board2", {pgn: pgn});
17 |

HTML part

18 |
<div id="board2" style="width: 300px"></div>
19 |

See the back link to the original examples page.

20 |
Shows a game in default layout top in edit mode
21 |
22 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /docs/examples/1202.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Layout left 7 | 8 | 9 | 10 | 11 | 12 | 13 |

Layout left

14 |

Javascript part

15 |
var pgn = "1. e4 e5 2. Nf3 Nc6  ...  24. Bxe7# 1-0";
16 | pgnv = PGNV.pgnView("board2", {pgn: pgn, layout: 'left'});
17 |

HTML part

18 |
<div id="board2" style="width: 500px"></div>
19 |

See the back link to the original examples page.

20 |
Shows a game in layout left
21 |
22 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /docs/examples/1203.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Default layout top in edit mode 7 | 8 | 9 | 10 | 11 | 12 | 13 |

Default layout top in edit mode

14 |

Javascript part

15 |
var pgn = "1. e4 e5 2. Nf3 Nc6  ...  24. Bxe7# 1-0";
16 | pgnv = PGNV.pgnEdit("board2", {pgn: pgn, layout: 'left'});
17 |

HTML part

18 |
<div id="board2" style="width: 500px"></div>
19 |

See the back link to the original examples page.

20 |
Shows a game in default layout top in edit mode
21 |
22 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /docs/examples/1204.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Default layout top 7 | 8 | 9 | 10 | 11 | 12 | 13 |

Default layout top

14 |

Javascript part

15 |
var pgn = "1. e4 e5 2. Nf3 Nc6  ...  24. Bxe7# 1-0";
16 | pgnv = PGNV.pgnView("board2", {pgn: pgn, layout: 'bottom'});
17 |

HTML part

18 |
<div id="board2" style="width: 300px"></div>
19 |

See the back link to the original examples page.

20 |
Shows a game in layout bottom
21 |
22 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /docs/examples/1205.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Layout right 7 | 8 | 9 | 10 | 11 | 12 | 13 |

Layout right

14 |

Javascript part

15 |
var pgn = "1. e4 e5 2. Nf3 Nc6  ...  24. Bxe7# 1-0";
16 | pgnv = PGNV.pgnView("board2", {pgn: pgn, layout: 'right'});
17 |

HTML part

18 |
<div id="board2" style="width: 500px"></div>
19 |

See the back link to the original examples page.

20 |
Shows a game in layout right
21 |
22 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /docs/img/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/docs/img/favicon.png -------------------------------------------------------------------------------- /docs/img/structure-html.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/docs/img/structure-html.dia -------------------------------------------------------------------------------- /docs/img/structure-html.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/docs/img/structure-html.png -------------------------------------------------------------------------------- /docs/lib/dist.js.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/docs/lib/dist.js.gz -------------------------------------------------------------------------------- /docs/lib/dist.js.map.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/docs/lib/dist.js.map.gz -------------------------------------------------------------------------------- /docs/readme.md: -------------------------------------------------------------------------------- 1 | This part of pgn-viewer is only for constructing a web site that will document the possibilities and give examples. You will find that web site [here](https://mliebelt.github.io/pgn-viewer/index.html). 2 | 3 | Don't use these files as examples that could be easily adapted, because they are only provided to show the features nicely. Use instead the examples that can be found under `modules/pgn-viewer/examples`. -------------------------------------------------------------------------------- /examples/base/board.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Example of pgn-viewer in Board mode 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 19 | 20 | -------------------------------------------------------------------------------- /examples/base/readme.md: -------------------------------------------------------------------------------- 1 | ## Summary 2 | 3 | [pgn-viewer](https://github.com/mliebelt/pgn-viewer) allows to display chess games in various ways. The distribution (where this readme is a part of) contains all necessary files to integrate the viewer into your web application. To demonstrate the usage, the files in the directory `examples` are included as well. So for a start, you may use the four examples to see the difference in the four modes: 4 | 5 | * [Board](board.html): Just display a chess board 6 | * [View](view.html): Allow to view a chess game, play the moves 7 | * [Print](print.html): Gives a print representation with multiple boards in it, but no interactive view 8 | * [Edit](edit.html): A variant to `View` that even allows to adapt the games (not finished yet). 9 | * [Puzzle](puzzle.html): Lets you guess the next move 10 | 11 | See the documentation of the current version on [github pages](http://mliebelt.github.io/pgn-viewer/) for examples, documentation of the API and some background. -------------------------------------------------------------------------------- /examples/books/marschall-anand-tabelle.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/examples/books/marschall-anand-tabelle.jpg -------------------------------------------------------------------------------- /examples/books/marschall-anand.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/examples/books/marschall-anand.jpg -------------------------------------------------------------------------------- /examples/books/marschall-anand2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/examples/books/marschall-anand2.jpg -------------------------------------------------------------------------------- /examples/books/marschall-krogius.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/examples/books/marschall-krogius.jpg -------------------------------------------------------------------------------- /examples/books/morphy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/examples/books/morphy.jpg -------------------------------------------------------------------------------- /examples/books/najdorf-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/examples/books/najdorf-2.jpg -------------------------------------------------------------------------------- /examples/books/najdorf-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/examples/books/najdorf-3.jpg -------------------------------------------------------------------------------- /examples/books/najdorf-notation.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/examples/books/najdorf-notation.jpg -------------------------------------------------------------------------------- /examples/books/najdorf.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/examples/books/najdorf.jpg -------------------------------------------------------------------------------- /examples/books/new-in-chess.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/examples/books/new-in-chess.jpg -------------------------------------------------------------------------------- /examples/books/opfer.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/examples/books/opfer.jpg -------------------------------------------------------------------------------- /examples/books/sicilian.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/examples/books/sicilian.jpg -------------------------------------------------------------------------------- /examples/books/tarrasch.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/examples/books/tarrasch.jpg -------------------------------------------------------------------------------- /examples/books/tarrasch2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/examples/books/tarrasch2.jpg -------------------------------------------------------------------------------- /examples/configuration/board/0_boardSize.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Parameter boardSize 6 | 7 | 8 | 9 |

Parameter boardSize

10 | 11 |
The following boards (and moves) set the parameter boardSize:
12 |
    13 |
  1. Uses the default of Chessground, not the div: 320px
  2. 14 |
  3. Uses the parameter width: 450px
  4. 15 |
  5. Explicit to set the board width: 600px
  6. 16 |
17 |
18 |
19 |
20 | 21 | 22 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /examples/configuration/board/1_coordinates.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Parameter for coordinates 6 | 7 | 8 | 9 |

Parameter coordsInner and coordsFactor

10 | 11 |
The parameter "coordsInner" denotes if the coordinates should be shown in the board and not outside. 12 | Those are the numbers 1-8 13 | for the rows and the alpha characters a-h for the columns on the board. Here the coordinates are shown 14 | outside, with a bigger coordsFactor.
15 |
16 | 17 | coordsInner == false, coordsFactor == 1.6 18 |
19 | 20 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /examples/configuration/board/2_orientation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | parameter orientation: "white" (default) or "black" 6 | 7 | 8 | 9 |

parameter orientation: "white" (default) or "black"

10 | 11 |
The parameter "orientation" denotes the orientation of the board. The default value 12 | "white" defines that the white pieces are at the bottom, the value "black" defines 13 | that the black pieces are at the bottom.
14 | 15 |
16 | 17 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /examples/configuration/board/3_position.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | position parameter 6 | 7 | 8 | 9 |

Postion parameter

10 | 11 |
The position parameter defines the starting position of the game. It is relevant 12 | in all modes. It defaults to the start position.
13 | 14 |
15 | 16 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /examples/configuration/default/01_global-default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | How to set global defaults 6 | 7 | 8 | 9 |

Global defaults

10 | 11 |
This examples shows how to set global defaults, without changing the source code:
12 | 17 | 18 |
As a result, the game is shown from the black perspective, but with locale `de`, because that is defined in the local configuration.
19 |
20 |
21 | 22 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /examples/configuration/default/06_showCoords.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Set showCoords in configuration 6 | 7 | 8 | 9 |

Set showCoords in configuration

10 | 11 |
The following is shown: default (showCoords == true); set; not set. Only useful in mode view, edit, board, not for print. 12 |
13 | 14 |
15 |
16 |
17 |
18 |
19 | 20 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /examples/configuration/default/25_resizable.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Set resizable in configuration 6 | 7 | 8 | 9 |

Set resizable in configuration

10 | 11 |
Set resizable in configuration: not set == true; 12 | set class to false for board, view, edit mode. Not relevant for print 13 |
14 | 15 |
16 |
17 |
18 |
19 |
20 |
21 | 22 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /examples/configuration/input/0_pgn.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | pgn parameter 6 | 7 | 8 | 9 |

Pgn parameter

10 | 11 |
The pgn parameter gives all the moves of the game that should be played.
12 |

View mode: start of evergreen game

13 |
14 | 15 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/configuration/input/1_headers.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Parameter headers set to true 6 | 7 | 8 | 9 |

Parameter headers

10 | 11 |
The parameter headers allows to suppress the headers. It is only relevant for the modes 12 | view, print and edit, not used in mode board
13 |
14 | Normal pgnView 15 |

16 | 17 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /examples/configuration/input/2_pgnFileExternal.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Read PGN from file 6 | 7 | 8 | 9 |
10 | 15 | 16 | -------------------------------------------------------------------------------- /examples/configuration/input/3_many-games-left.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Read PGN from file 6 | 7 | 8 | 9 |

Many games as pgnFile

10 |
11 | 14 | 15 | -------------------------------------------------------------------------------- /examples/configuration/input/4_many-many-games-left.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Read PGN from file 6 | 7 | 8 | 9 |

Many games as pgnFile

10 |
11 | 15 | 16 | -------------------------------------------------------------------------------- /examples/configuration/input/headers-edit.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Parameter headers for edit 6 | 7 | 8 | 9 |

Parameter headers for edit

10 | 11 | Normal pgnEdit, headers are visible 12 |

13 | 14 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /examples/configuration/input/pgnFile.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Read PGN from file 6 | 7 | 8 | 9 |
10 | 15 | 16 | -------------------------------------------------------------------------------- /examples/configuration/layout/06_width-edit.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Parameter size 6 | 7 | 8 | 9 |

Width in edit mode

10 | 11 | 12 |
13 | 14 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/configuration/layout/07_width-print.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Width print mode 6 | 7 | 8 | 9 |

Width print mode

10 |
11 | 12 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /examples/configuration/layout/08_width-view.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Width view mode 6 | 7 | 8 | 9 |

Width view mode

10 | 11 |
12 | 13 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /examples/configuration/layout/11_left-no-size.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Layout top: one typical example 6 | 7 | 8 | 9 | 10 |

Set width with the div only, no additional sizes, default layout, many moves. The moves height is currently 11 | 3/5 of the board size.

12 |
13 | 14 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/configuration/layout/12_top-width-boardSize.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Layout top: one typical example 6 | 7 | 8 | 9 | 10 |

Set width with the div only, no additional sizes, default layout, many moves. The moves height is currently 11 | 3/5 of the board size.

12 |
13 | 14 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /examples/configuration/layout/13_left-width-boardSize.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Layout top: one typical example 6 | 7 | 8 | 9 | 10 |

Set width and boardSize, with a different ratio as 3/5 (default). Here width is 2 times the boardSize. 11 | Changing the boardSize by resize keeps the width stable.

12 |
13 | 14 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /examples/configuration/layout/14_left-width-movesWidth.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Layout top: setting width and movesSize 6 | 7 | 8 | 9 | 10 |

Set width and movesSize. Does not work as expected (currently) 11 |

17 |
18 | 19 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /examples/configuration/layout/15_top-width-movesHeight.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Layout top: setting width and movesHeight 6 | 7 | 8 | 9 | 10 |

Set width and movesHeight.

11 |
12 | 13 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /examples/configuration/layout/top-one-few-moves.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Layout top: one typical example 6 | 7 | 8 | 9 | 10 |

Set width with the div only, no additional sizes, default layout, many moves. The moves height is currently 11 | 3/5 of the board size.

12 |
13 | 14 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/configuration/moves/0_one-locale.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Parameter locale 6 | 7 | 8 | 9 | 10 | 11 |

Parameter locale

12 | 13 | 16 |
17 |
18 | 19 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /examples/configuration/moves/1_parse-error.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Display parse error 6 | 7 | 8 | 9 |

Display parse error

10 | 11 |
12 |
13 | 14 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/configuration/moves/2_chess-error.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Display chess error 6 | 7 | 8 | 9 |

Display chess error

10 | 11 |
12 |
13 | 14 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/configuration/moves/3_showFen.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Show FEN in the viewer 6 | 7 | 8 | 9 |

Parameter showFen: true

10 | 11 |
12 |
13 | 14 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/configuration/moves/4_showResult.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Show result: true 6 | 7 | 8 | 9 |

Parameter showResult: true

10 | 11 |
12 |
13 | 14 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/configuration/moves/5_figurine.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Show figurine notation 6 | 7 | 8 | 9 |

Show figurine notation

10 | 11 |
12 |
13 | 14 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/configuration/moves/6_nags.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Show known tags 6 | 7 | 8 | 9 |

Show figurine notation

10 | 11 |
12 |
13 |
14 | 15 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /examples/configuration/moves/figurines.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Show figurine notation 6 | 7 | 8 | 9 |

Show figurine notation

10 | 11 | From the left: Alpha, Merida, Berlin, NotoSans fonts, CA Chess fonts. 12 |
13 |
14 |
15 |
16 |
17 |
18 | 19 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /examples/configuration/moves/promotion.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Some Games to Edit 7 | 8 | 9 | 10 |

Example that demontrates that the ticket 29 is fixed. It demonstrates how paws are promoted 11 | Ticket 29 at GitHub

12 |
13 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/configuration/themes/0_pieceStyle.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | parameter pieceStyle 6 | 7 | 8 | 9 |

parameter pieceStyle

10 | 11 |
Use the piece style: alpha
12 |
13 | 14 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /examples/configuration/themes/1_theme.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Setting the theme 6 | 7 | 8 |

Setting the theme

9 | 10 | 11 |
12 | 13 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /examples/img/analyse-chess-buttons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/examples/img/analyse-chess-buttons.png -------------------------------------------------------------------------------- /examples/img/chess24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/examples/img/chess24.png -------------------------------------------------------------------------------- /examples/img/chesscom-buttons1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/examples/img/chesscom-buttons1.png -------------------------------------------------------------------------------- /examples/img/chesscom-buttons2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/examples/img/chesscom-buttons2.png -------------------------------------------------------------------------------- /examples/img/chesscom-editor.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/examples/img/chesscom-editor.jpg -------------------------------------------------------------------------------- /examples/img/chesscom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/examples/img/chesscom.png -------------------------------------------------------------------------------- /examples/img/lichess-notation-variant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/examples/img/lichess-notation-variant.png -------------------------------------------------------------------------------- /examples/img/lichess-notation-variant2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/examples/img/lichess-notation-variant2.png -------------------------------------------------------------------------------- /examples/modes/board/0_one-board.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Some Games to Edit 6 | 7 | 8 | 9 | 10 | 11 |
12 |

13 | 14 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /examples/modes/board/cg-themes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Some Games to Edit 6 | 7 | 8 | 9 | 10 |
11 |
12 |
13 | 14 |

Brown Wikipedia.

15 | 16 |
17 |
18 |
19 | 20 |

Zeit Wikipedia.

21 | 22 |
23 |
24 |
25 | 26 |

Informator Merida.

27 | 28 |
29 | 30 | 31 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /examples/modes/board/chessground.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Some Games to Edit 6 | 7 | 8 | 9 | 10 |
11 |
12 |
13 | 14 |

Here is some text in between.

15 | 16 |
17 |
18 |
19 | 20 |

Here is some text in between.

21 | 22 |
23 |
24 |
25 | 26 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /examples/modes/board/one-board.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Some Games to Edit 6 | 7 | 8 | 9 | 10 | 11 |
12 |

13 | 14 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /examples/modes/board/rankFontSize.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Some Games to Edit 6 | 7 | 8 | 9 | 10 |
11 | 12 |

Rank font size set to 10.

13 | 14 |
15 | 16 |

Rank font size set to 40.

17 | 18 |
19 | 20 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /examples/modes/edit/1_promotion.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Some Games to Edit 6 | 7 | 8 | 9 |

Empty game

10 | 11 |
Play moves in edit mode.
12 | 13 |
14 | 15 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/modes/edit/sa.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Sweetalert 6 | 7 | 8 | 9 | 10 |

Sweetalert

11 | 12 | 13 | 14 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /examples/modes/view/0_pgn.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Some Games to Edit 6 | 7 | 8 | 9 |
10 | 15 | 16 | -------------------------------------------------------------------------------- /examples/modes/view/1_check.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Show Check 6 | 7 | 8 | 9 | 10 |
11 |
12 |
13 | 14 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /examples/modes/view/3_pgnShowFen.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | pgnView with FEN 6 | 7 | 8 | 9 |
10 | 15 | 16 | -------------------------------------------------------------------------------- /examples/modes/view/4_promotion.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Show Promotion 6 | 7 | 8 | 9 | 10 |
11 |
12 |
13 | 14 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /examples/modes/view/5_shapes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Draw Shapes 6 | 7 | 8 | 9 | 10 |

Show shapes for annotations

11 | Play through the games, and see the shapes. 12 |
13 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /examples/modes/view/empty.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |

Minimal configuration

7 | 8 | This example shows the minimal configuration when using the distributed version of pgn-viewer. There is only one 9 | file needed: 10 | 11 | 14 |
15 | 19 | 20 | -------------------------------------------------------------------------------- /examples/modes/view/min-pos.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Some Games to Edit 6 | 7 | 8 | 9 |
10 | 13 | 14 | -------------------------------------------------------------------------------- /examples/modes/view/nag.pgn: -------------------------------------------------------------------------------- 1 | [White "Me"] [Black "You"] 2 | 1. e4$1 e5$2 2. Nf3$3 Nc6$4 3. d4$5 exd4$6 4. Bc4$7 Bc5$10 5. c3$13 dxc3$14 6. Bxf7+$15 Kxf7$16 7. Qd5+$17 Ke8$18 8. Qh5+$19 g6$22 9. Qxc5$23 Nf6$26 10. Nxc3$27 d6$32 11. Qe3$33 Qe7$36 12. O-O$37 Nb4$40 13. Qd2$41 Bg4$44 14. Nd4$45 Kd7$132 15. h3$133 Be6$138 16. a3$139 Nc6$140 17. Re1$141 Kc8$142 18. Nxc6$143 bxc6$144 19. Qe2$145 Nd7$146 20. Qa6+$220 Kb8$221 21. Qxc6$238 Nb6$239 22. Nb5$240 Qd7$241 23. Qc3$242 Re8$243 24. a4$244 Kb7$245 25. b3$246 a6$247 26. Nd4$248 c5$252 27. Nxe6$254 Qc6$255 28. Ng5$249 Rac8$250 29. a5$251 Na8$253 -------------------------------------------------------------------------------- /examples/modes/view/promotion.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Show Promotion 6 | 7 | 8 | 9 | 10 |
11 |
12 |
13 |
14 | 15 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/modes/view/syntaxerrors.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Some Games to Edit 6 | 7 | 8 | 9 | 10 |

Syntax errors in games

11 | 12 | The goal here is that syntax errors are shown to the user, if the user allows that (by y configuration parameter). 13 | 14 |

Wrong syntax

15 | 16 |
17 | 18 | 24 | 25 |

The expectation here is, that the syntax error is shown instead of the normal game (so the div is used to display 26 | the errror instead).

27 | -------------------------------------------------------------------------------- /examples/modes/view/var-pos.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Some Games to Edit 6 | 7 | 8 | 9 |
10 | 14 | 15 | -------------------------------------------------------------------------------- /examples/modes/view/variations3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Some Games to Edit 6 | 7 | 8 | 9 | 10 |

Some variations (short ones)

11 | 12 |
The following games demonstrate how variations are handled.
13 | 14 |
15 | 16 |
17 | 18 |
19 | 20 |
21 | 22 |
23 | 24 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /examples/modes/view/view-pos.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Some Games to Edit 6 | 7 | 8 | 9 |
10 |
11 |
12 | 18 | 19 | -------------------------------------------------------------------------------- /examples/pgn/match4.pgn: -------------------------------------------------------------------------------- 1 | [FEN "2r1k2r/1q2pp2/R1n2b2/7p/3p4/2pP2PP/2P3B1/2BQ1RK1 w k - 0 1"] 2 | 3 | 1. Rxc6 Rxc6 2. Qf3 Kd7 3. Qd5+ Kc7 4. Bf4+ Kc8 (4... Kb6 5. Rb1+) 5. Qxc6+ 4 | Qxc6 6. Bxc6 {und Weiss gewinnt leicht} * 5 | 6 | -------------------------------------------------------------------------------- /examples/pgn/morphy-rousseau.pgn: -------------------------------------------------------------------------------- 1 | [Event ""] 2 | [Site "New Orleans (USA)"] 3 | [Date "1849.??.??"] 4 | [Round "?"] 5 | [White "Morphy Paul"] 6 | [Black "Rousseau Emmanuel (USA)"] 7 | [Result "1-0"] 8 | [ECO "C39"] 9 | [WhiteElo "2680"] 10 | [BlackElo "0"] 11 | [Annotator ""] 12 | [Source ""] 13 | [Remark ""] 14 | 15 | 1.e4 e5 2.f4 exf4 3.Nf3 g5 4.h4 g4 5.Ng5 h6 6.Nxf7 Kxf7 7.Qxg4 16 | Qf6 8.Bc4+ Ke7 9.Nc3 c6 10.e5 Qxe5+ 11.Kd1 Kd8 12.Re1 Qc5 13.Bxg8 17 | d5 14.Re8+ Kxe8 15.Qxc8+ Ke7 16.Nxd5+ Kd6 17.Qc7# 1-0 -------------------------------------------------------------------------------- /examples/pgn/nags.pgn: -------------------------------------------------------------------------------- 1 | [White "Me"] 2 | [Black "You"] 3 | [Event "Any"] 4 | 5 | Nf3$1 Nf6$2 Ng1$3 Ng8$4 Nf3$5 Nf6$6 Ng1$7 Ng8$8 Nf3$9 Nf6$10 Ng1$11 Ng8$12 Nf3$13 Nf6$14 Ng1$15 Ng8$16 Nf3$17 Nf6$18 Ng1$19 Ng8$20 Nf3$21 Nf6$22 Ng1$23 Ng8$24 Nf3$32 Nf6$33 Ng1$36 Ng8$37 Nf3$40 Nf6$41 Ng1$44 Ng8$132 Nf3$133 Nf6$136 Ng1$140 Ng8$146 Nf3$220 Nf6$221 -------------------------------------------------------------------------------- /examples/pgn/var1.pgn: -------------------------------------------------------------------------------- 1 | 1. e4 e5 2. f4 (2. Nf3 Nc6 3. Bb5 (3. Bc4 Bc5 {macht keinen Spaß}) (3. d4 exd4 2 | 4. Bc4 {geht eher}) 3... a6 4. Ba4 Nf6) 2... exf4 3. Nf3 * 3 | 4 | -------------------------------------------------------------------------------- /examples/react/.gitignore: -------------------------------------------------------------------------------- 1 | test-pgn-viewer-app/* -------------------------------------------------------------------------------- /examples/react/App.js: -------------------------------------------------------------------------------- 1 | import {PGNViewer} from './PgnViewer'; 2 | 3 | function App() { 4 | return ( 5 |
6 | 7 | [Event "F/S Return Match"] 8 | [Site "Belgrade"] 9 | [Date "1992.11.04"] 10 | [Round "29"] 11 | [White "Fischer, Robert J."] 12 | [Black "Spassky, Boris V."] 13 | [Result "1/2-1/2"] 14 | 15 | 1. e4 e5 2. Nf3 Nc6 3. Bb5 a6 4. Ba4 Nf6 5. O-O Be7 6. Re1 b5 7. Bb3 d6 8. c3 O-O 9. h3 Nb8 10. d4 Nbd7 16 | 11. c4 c6 12. cxb5 axb5 13. Nc3 Bb7 14. Bg5 b4 15. Nb1 h6 16. Bh4 c5 17. dxe5 Nxe4 18. Bxe7 Qxe7 19. exd6 Qf6 17 | 20. Nbd2 Nxd6 21. Nc4 Nxc4 22. Bxc4 Nb6 23. Ne5 Rae8 24. Bxf7+ Rxf7 25. Nxf7 Rxe1+ 26. Qxe1 Kxf7 27. Qe3 Qg5 18 | 28. Qxg5 hxg5 29. b3 Ke6 30. a3 Kd6 31. axb4 cxb4 32. Ra5 Nd5 33. f3 Bc8 34. Kf2 Bf5 35. Ra7 g6 36. Ra6+ Kc5 19 | 37. Ke1 Nf4 38. g3 Nxh3 39. Kd2 Kb5 40. Rd6 Kc5 41. Ra6 Nf2 42. g4 Bd3 43. Re6 1/2-1/2 20 | 21 |
22 | ); 23 | } 24 | 25 | export default App; 26 | -------------------------------------------------------------------------------- /examples/react/PgnViewer.js: -------------------------------------------------------------------------------- 1 | import React, {useLayoutEffect} from 'react' 2 | import Children from 'react-children-utilities' 3 | import * as uuid from 'uuid' 4 | import { pgnView } from '@mliebelt/pgn-viewer' 5 | 6 | export function PGNViewer(props) { 7 | const gameDecription = Children.onlyText(props.children) 8 | const id = 'board-' + uuid.v4() 9 | 10 | useLayoutEffect(() => { 11 | pgnView(id, 12 | { 13 | pgn: gameDecription, 14 | timerTime: '1', 15 | locale: 'pl', 16 | startPlay: 1, 17 | showResult: true, 18 | boardSize: '340', 19 | showFen: true, 20 | pieceStyle: 'merida' 21 | } 22 | ) 23 | }) 24 | 25 | return ( 26 |
27 | ) 28 | } -------------------------------------------------------------------------------- /examples/react/readme.md: -------------------------------------------------------------------------------- 1 | # How to use pgn-viewer in React 2 | 3 | * Create react app by running `npx create-react-app test-pgn-viewer-app` 4 | * Move to the folder `cd test-pgn-viewer-app`. 5 | * Copy `App.js` and `PgnViewer.js` from above to the `src` folder. 6 | * Integrate "@mliebelt/pgn-viewer" into the dependencies in `package.json`. 7 | * Run `npm start` 8 | 9 | As a result, you should see the `pgn-viewer` with a game. 10 | -------------------------------------------------------------------------------- /examples/readme/sportverlag.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Some Games to Edit 6 | 7 | 8 | 9 | 10 | 11 |
12 |

13 | 14 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /examples/template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Some Games to Edit 6 | 7 | 8 | 9 | Enter here your example file, most of the time by providing. 10 | You have to run a local web server at the root of the directory. 11 | 12 |
13 | 14 | 20 | -------------------------------------------------------------------------------- /examples/tickets/loc/buttons-de.json: -------------------------------------------------------------------------------- 1 | { 2 | "flipper" : "Demo 77: Tausche die Seiten", 3 | "first" : "Demo 77: Gehe zum ersten Zug", 4 | "prev" : "Demo 77: Gehe einen Zug zurück", 5 | "next" : "Demo 77: Nächster Zug", 6 | "play" : "Demo 77: Spiele alle Züge", 7 | "last" : "Demo 77: Gehe ans Ende des Spiels", 8 | "deleteVar" : "Lösche Variante", 9 | "promoteVar" : "Werte Variante auf", 10 | "deleteMoves" : "Lösche die restlichen Züge von hier", 11 | "nags" : "NAGs Menü", 12 | "pgn" : "Zeige die PGN Notation an", 13 | "hidePGN" : "Ausblenden des angezeigten PGN" 14 | } 15 | -------------------------------------------------------------------------------- /examples/tickets/loc/chess-de.json: -------------------------------------------------------------------------------- 1 | { 2 | "q": "D", 3 | "k": "K", 4 | "r": "T", 5 | "b": "L", 6 | "n": "S", 7 | "Q": "D", 8 | "K": "K", 9 | "R": "T", 10 | "B": "L", 11 | "N": "S" 12 | 13 | } -------------------------------------------------------------------------------- /examples/tickets/ticket003.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Different layouts for notation 6 | 7 | 8 | 9 |

Ticket 3 at GitHub. 10 | Show different layouts for notation. 11 |

12 |
13 |
14 | 15 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /examples/tickets/ticket003v.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Different layouts for notation 6 | 7 | 8 | 9 |

Ticket 3 at GitHub. 10 | Show different layouts for notation. 11 |

12 |
13 |
14 | 15 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /examples/tickets/ticket003v3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Different layouts for notation 6 | 7 | 8 | 9 |

Ticket 3 at GitHub. 10 | Show different layouts for notation. 11 |

12 |
13 |
14 | 15 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /examples/tickets/ticket004.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Use FontAwesome buttons where possible 6 | 7 | 8 | 9 |

This example shows the usage for Font Awesome in the different modes: 10 | Ticket 4 at GitHub. 11 | It would be nice to have the buttons in different sizes, different colors, ... to show how 12 | to have some variations. 13 |

14 |
15 |
16 | 17 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /examples/tickets/ticket005.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Fixed: Missing Capture Symbol in Notation 6 | 7 | 8 | 9 |

This example shows that capture symbols are there in the notation: 10 | Ticket 5 at GitHub. 11 |

12 |
13 | 14 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /examples/tickets/ticket009.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Some Games to Edit 6 | 7 | 8 | 9 |

This example demonstrates that the current version does not have the problem of ticket 9 (spaces after a move before a NAG): 10 | Ticket 9 at GitHub. 11 |

12 |
13 |
14 |
The shown pgn is the following: 1. e4 $1 e5 $2 2. Nf3 $3 Nc6 $4 3. Bc4$13 Bc5$14 4. c3$15 15 | 16 | See the difference in using the white space (and not).
17 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /examples/tickets/ticket010.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Some Games to Edit 6 | 7 | 8 | 9 |

Example that demontrates that the ticket 10 is fixed: 10 | Ticket 10 at GitHub

11 |
12 | 17 |
18 |
The shown pgn is the following: 1. e4 {comment} 1... e5
19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/tickets/ticket011.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Disambiguation in print format 6 | 7 | 8 | 9 |

Example that demontrates that the ticket 11 is fixed: 10 | Ticket 11 at GitHub

11 |
12 | 17 |
18 |
The shown pgn is the following: 1. e4 e5 2. Nf3 Nc6 3. Bb5 a6 4. Bxc6 dxc6
19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/tickets/ticket013.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Some Games to Edit 6 | 7 | 8 | 9 |
10 | 13 | 14 | -------------------------------------------------------------------------------- /examples/tickets/ticket023-2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Some Games to Edit 6 | 7 | 8 | 9 |

Example that demontrates that the ticket 23 is fixed (with variation given by position, not SetUp): 10 | Ticket 23 at GitHub

11 |
12 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /examples/tickets/ticket023.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Some Games to Edit 6 | 7 | 8 | 9 |

Example that demontrates that the ticket 23 is fixed: 10 | Ticket 23 at GitHub

11 |
12 | 13 |
14 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /examples/tickets/ticket025.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Some Games to Edit 7 | 8 | 9 | 10 |

Example that demontrates that the ticket 25 is fixed. Here is demonstrated how to style in HTML 11 | individually, and have your own layout of headers, board, moves, buttons, ...: 12 | Ticket 25 at GitHub

13 |
14 |
15 |
16 |
17 | then there comes some text ... 18 |
19 |
20 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /examples/tickets/ticket026.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Some Games to Edit 6 | 7 | 8 | 9 |

Example that demontrates that the ticket 26 is fixed. See the chess in move 6 and the mate in move 7: 10 | Ticket 26 at GitHub

11 |
12 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /examples/tickets/ticket030.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Underpromotion 6 | 7 | 8 |

Underpromotion

9 | 10 | Ticket 30 at GitHub. 11 | Allow underpromotion 12 |

13 |

Underpromotion

14 | 15 | 19 | 20 |
21 | 22 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /examples/tickets/ticket031.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Some Games to Edit 6 | 7 | 8 | 9 |

Example that demontrates that the ticket 31 is fixed. See the wrong move: 10 | Ticket 31 at GitHub. As you 11 | can see, the whole PGN is read, but after the wrong move, the computation is aborted.

12 |
13 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /examples/tickets/ticket042.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Load PGN from external file 6 | 7 | 8 | 9 |

Load an example from an external file (file is local to the deployment, "../pgn/cori-vishnu.pgn"): 10 | Ticket 42 at GitHub. Look at the example below.

11 |
12 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /examples/tickets/ticket043.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Ugly display of tags 6 | 7 | 8 | 9 |

Example shows bad display of tags: 10 | Ticket 43 at GitHub. Look at the example below.

11 |
12 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /examples/tickets/ticket045.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Demonstrate the use of global defaults 6 | 7 | 8 | 9 |

Demonstrate the use of global defaults: 10 | Ticket 45 at GitHub. How to use global defaults.

11 |

Only global defaults: locale == fr, width == 400px, pieceStyle == alpha

12 |
13 | 14 |

locale == de

15 |
16 | 17 |

locale == en, pieceStyle == merida

18 |
19 | 20 |

width == 300px

21 |
22 | 23 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /examples/tickets/ticket046-2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Allow to start from different position 6 | 7 | 8 | 9 |

Allow FEN string with PGN to define start position from analysis (config is startPlay: 'exd5'): 10 | Ticket 46 at GitHub. Allow to start from a different position than the start of the pgn notation.

11 | 12 |
Parameter startPlay == move number 13 | 14 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /examples/tickets/ticket046-3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Cut moves before start position 6 | 7 | 8 | 9 |

Allow FEN string with PGN to define start position from analysis: 10 | Ticket 46 at GitHub. Allow to start from a different position than the start of the pgn notation.

11 | 12 |
Parameter startPlay == 3, hide moves before == true. pgn: "1. e4 e5 2. Nf3 Nc6 3. Bc4 Nf6" 13 | 14 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /examples/tickets/ticket047.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Ensure that move numbers are "correct" 6 | 7 | 8 | 9 |

Example that demonstrates editing a game has fault: 10 | Ticket 47 at GitHub. Shows when given wrong move numbers what the effect is.

11 |
Missing move numbers: e4 e5 Nf3 Nc6 12 | 13 |
Correct move numbers: 1. e4 e5 2. Nf3 Nc6 14 |
Wrong move numbers: 3. e4 e5 5. Nf3 Nc6 15 |
Starting with black move 16 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /examples/tickets/ticket052.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Some Games to Edit 6 | 7 | 8 | 9 |

Example that demonstrates that the ticket 31 is fixed. See the wrong move: 10 | Ticket 52 at GitHub. As you 11 | can see, the whole PGN is read, but after the wrong move, the computation is aborted.

12 |
13 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /examples/tickets/ticket053-lic.pgn: -------------------------------------------------------------------------------- 1 | 1. e4! e5? 2. Nf3!! Nc6?? 3. Bc4!? Nf6?! 4. Ng5 $7 Bc5 $10 5. Nxf7 $13 Bxf2+ $14 6. Kxf2 $15 Nxe4+ $16 7. Kg1 $17 Qh4 $18 8. g3 $19 * 2 | -------------------------------------------------------------------------------- /examples/tickets/ticket053-pgnv.pgn: -------------------------------------------------------------------------------- 1 | 1. e4! e5? 2. Nf3‼ Nc6⁇ 3. Bc4⁉ Nf6⁈ 4. Ng5□ Bc5= 5. Nxf7∞ Bxf2+⩲ 6. Kxf2⩱ Nxe4+± 7. Kg1∓ Qh4+− 8. g3-+ 2 | -------------------------------------------------------------------------------- /examples/tickets/ticket053.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Enclude all nag symbols in the grammar 6 | 7 | 8 | 9 |

Example that demonstrates editing a game has fault: 10 | Ticket 53 at GitHub. See the 11 | example game for all NAGs currently possible.

12 |
13 |
14 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /examples/tickets/ticket058.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Edit a game 6 | 7 | 8 | 9 |

Example that demonstrates editing a game has fault: 10 | Ticket 58 at GitHub. Make here 11 | the first move with the mouse as it is in the notation, it should just highlight the already 12 | existing move. Instead, it is appended at the end.

13 |
14 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/tickets/ticket059.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Edit a game 6 | 7 | 8 | 9 |

Example that demonstrates editing a game has fault: 10 | Ticket 59 at GitHub. Make here a different first 11 | move than the displayed one. This should then be added as variant to the first move. Instead, it is appended at the end.

12 |
13 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /examples/tickets/ticket060.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Parsing variations of the first move 6 | 7 | 8 | 9 |

Example that demonstrates editing a game has fault: 10 | Ticket 60 at GitHub. See that the 11 | parser does not allow variation without move indication.

12 |
13 |
14 |
15 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /examples/tickets/ticket065.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Use the complicated locale 6 | 7 | 8 | 9 |

Create one simple example, and use that for to show different styling: 10 | Ticket 65 at GitHub. Create different examples, that are identical 11 | but different in using the new parameter layout.

12 | 13 |

Layout Top Left

14 | 15 |

Brings the board to the top left (default), and moves to the right (floating).

16 |
17 |
18 | 19 | 20 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /examples/tickets/ticket071.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Avoid D in PGN for diagrams 6 | 7 | 8 | 9 |

Try to avoid D when adding diagram through PGN.

10 | 11 |
12 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /examples/tickets/ticket077.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Allow definition of localPath by user 6 | 7 | 8 | 9 | 10 |

Ticket 77 at GitHub. 11 | Give the user the configuration to redefine the localPath (or variants of it). Demonstrates this by redefining some of the buttons. So by hovering over the button, you see that a different localization is used in this example only.

12 |
You have to redefine the locales paths before calling `pgnAny`, because this is done during initialization of the whole thing. So it is included in the head of this example, please have a look at the source code. To test it, I had to disable caching, to see an effect on this. So if you want to see that as well, disable it as well.
13 |
14 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /examples/tickets/ticket087.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Move number continuation 6 | 7 | 8 | 9 |

Ticket 87 at GitHub. 10 | Move numbers should be inluded when continuing main line or variation (for black and white).

11 | 12 |
13 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /examples/tickets/ticket091.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Handle comments with '[' 6 | 7 | 8 | 9 |

Ticket 91 at GitHub. 10 | Show and allow edit of arrows and circles.

11 | 12 |
13 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /examples/tickets/ticket093.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Handle comments with '[' 6 | 7 | 8 | 9 |

Ticket 93 at GitHub. 10 | Move numbers should be inluded when continuing main line or variation (for black and white).

11 | 12 |
13 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /examples/tickets/ticket096.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Handle comments with '[' 6 | 7 | 8 | 9 |

Ticket 96 at GitHub. 10 | Ensure that produced configuration works.

11 |

Enter below some configuration produced in the configurator, and see if it works the same way 12 | as in the `config.html` file.

13 |
14 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /examples/tickets/ticket105.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Handle comments with '[' 6 | 7 | 8 | 9 |

Ticket 105 at GitHub. 10 | Missing black comment in variation.

11 | 12 |
13 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /examples/tickets/ticket106.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Add mark for who has the move 6 | 7 | 8 |

Bug: Jumping to first move does not remove last move mark

9 | 10 | Ticket 106 at GitHub. 11 | How to show who is to move. 12 |

13 |

Example game

14 | 15 | 19 | 20 |
21 | 22 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /examples/tickets/ticket108.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Handle comments with '[' 6 | 7 | 8 | 9 |

Ticket 108 at GitHub. 10 | En passent not working well (in edit mode).

11 |
12 |
13 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/tickets/ticket109.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Going back to first move in edit mode 6 | 7 | 8 | 9 |

Ticket 109 at GitHub. 10 | Going back to starting position leads to strange effects.

11 |
12 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /examples/tickets/ticket112-1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Add mark for who has the move 6 | 7 | 8 |

Show adding move mark

9 | 10 | Ticket 112 at GitHub. 11 | How to show who is to move. 12 |

13 |

Only board

14 |
15 |

Edit mode

16 |
17 |

View Mode

18 |
19 |

Print Mode

20 |
21 | 22 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /examples/tickets/ticket112.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Add mark for who has the move 6 | 7 | 8 |

Show adding move mark

9 | 10 | Ticket 112 at GitHub. 11 | How to show who is to move. 12 |

13 |

View Mode

14 |
15 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /examples/tickets/ticket114.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Add mark for who has the move 6 | 7 | 8 |

Add result to moves list

9 | 10 | Ticket 114 at GitHub. 11 | How to show who is to move. 12 |

13 |

Show result (1-0)

14 |
15 |

Show result (0-1)

16 |
17 |

Default (no result)

18 |
19 | 20 | 21 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /examples/tickets/ticket116.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Resizable board 6 | 7 | 8 | 9 | 10 | Ticket 116 at GitHub. 11 | 12 |

Resizable board

13 | 14 |
15 | 16 | 19 | 20 |

Resizable set to false

21 | 22 | 23 |
24 | 25 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /examples/tickets/ticket117-2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Correct incomplete FEN 6 | 7 | 8 |

Correct incomplete FEN

9 | 10 | Ticket 117 at GitHub. 11 | Correct incomplete FEN 12 |

13 | 14 | 15 |
16 | 17 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /examples/tickets/ticket117.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Correct incomplete FEN 6 | 7 | 8 |

Correct incomplete FEN

9 | 10 | Ticket 117 at GitHub. 11 | Correct incomplete FEN 12 |

13 | 14 | 15 |
16 | 17 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /examples/tickets/ticket121.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Chess960 support 6 | 7 | 8 |

Chess960 support

9 | 10 | Ticket 121 at GitHub. 11 | 12 |
13 | 14 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /examples/tickets/ticket126.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Resizable support 6 | 7 | 8 |

Resizable support

9 | 10 | Ticket 126 at GitHub. 11 | 12 |

Resizable (default: true)

13 |
14 | 15 |

Resizable set to false

16 |
17 | 18 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /examples/tickets/ticket135.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Use long algebraic notation 6 | 7 | 8 | 9 |

Ticket 135 at GitHub. 10 | Use long algebraic notation

11 |
12 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /examples/tickets/ticket139.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Handle comments with '[' 6 | 7 | 8 | 9 |

Ticket 139 at GitHub. 10 | Console error after last move.

11 |
12 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /examples/tickets/ticket140.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Handle comments with '[' 6 | 7 | 8 | 9 |

Ticket 140 at GitHub. 10 | Missing first move move number (in case of black).

11 |
12 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /examples/tickets/ticket144.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Duplicate promotion display 6 | 7 | 8 | 9 |

Ticket 140 at GitHub. 10 | Duplicate promotion display

11 |
12 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /examples/tickets/ticket145-1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Bugged board in details 6 | 7 | 8 | 9 |

Bugged board in details

10 | 11 |
Here the whole thing is working. Has something to do we revealing the board later, after 12 | having finished everything.
13 | 14 |
15 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /examples/tickets/ticket145-2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Bugged board in details (only Chessground) 6 | 7 | 8 | 9 |

Solution for Bugged board in details (only Chessground)

10 | 11 |
Don't use the pgn-viewer, but only Chessground.
12 | 13 |
14 |
15 |
16 | 17 | 29 | 30 |

Bugged board (Chessground)

31 |
32 |
33 |
34 | 35 | 39 | 40 | -------------------------------------------------------------------------------- /examples/tickets/ticket145.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Bugged board in details 6 | 7 | 8 | 9 |

Bugged board in details

10 | 11 |
Shows a bugged board when opening the details.
12 | 13 |
14 |
15 | 18 |
19 | 20 |

Bugged board in details (workaround)

21 | 22 |
Shows a bugged board when opening the details.
23 | 24 |
25 |
26 |
27 | 28 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /examples/tickets/ticket153.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Ensure that pieces are positioned correctly 6 | 7 | 8 | 9 |

Ticket 153 at GitHub. 10 | Ensure that pieces are positioned correctly

11 |
12 |
13 |
14 |
15 |
16 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /examples/tickets/ticket154.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Ensure default theme and pieceStyle are set 6 | 7 | 8 | 9 |

Ticket 154 at GitHub. 10 | Ensure default theme and pieceStyle are set

11 |
12 |

This shows the default: theme == blue, pieceStyle == merida

13 |
14 |

This shows how to override the theme and style by using classes in HTML.

15 |
16 |

This shows how to override the theme and style by using parameters in the configuration.

17 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /examples/tickets/ticket171.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Allow manual moves from the outside 6 | 7 | 8 | 9 |

Ticket 171 at GitHub. 10 | Use the developer tools of the browser to do the following:

11 |
    12 |
  1. Set a breakpoint after the pgnView (or pgnEdit).
  2. 13 |
  3. Type into the console: v.base.manualMove(SAN) where SAN is the SAN string for a move 14 | that is possible in that position.
  4. 15 |
  5. Then continue, but leave the console open.
  6. 16 |
  7. See how the move is made on the board.
  8. 17 |
  9. Type some more moves the same way.
  10. 18 |
19 |
20 |

Viewer

21 |
22 |

Editor

23 | 24 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /examples/tickets/ticket177.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Different locales with defaults 6 | 7 | 8 | 9 |

Ticket 177 at GitHub. 10 | Show the working of default locale.

11 |
12 |

Locale en (default)

13 |
14 |

Locale de (complete)

15 |
16 |

Locale fr (incomplete, see some NAGs)

17 |
18 |

Locale es (incomplete, see all NAGs)

19 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /examples/tickets/ticket186.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Different locales with defaults 6 | 7 | 8 | 9 |

Ticket 186 at GitHub. Resize of board not working.

10 |
11 |

Layout left

12 |
13 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/tickets/ticket190-2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Display all boards in pgnPrint 6 | 7 | 8 | 9 |

Display all boards in pgnPrint

10 | 11 | Displays the boards from blacks perspective (using NAG $221). 12 | 13 |
14 | 15 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/tickets/ticket190.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Display all boards in pgnPrint 6 | 7 | 8 | 9 |

Display all boards in pgnPrint

10 | 11 |
12 | 13 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /examples/tickets/ticket205.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | King in chess 6 | 7 | 8 | 9 |

Ticket 205 at GitHub. 10 | In the following game, the king is in chess when starting

11 | 12 |
13 | 14 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /examples/tickets/ticket218.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Allow arrows and circles in start position 6 | 7 | 8 | 9 |

Allow arrows and circles in start position

10 | 11 |
12 | 13 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/tickets/ticket230-svg-net.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Parameter locale 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |

Having icons loaded from internet (SVG)

14 | 15 |
16 | 17 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /examples/tickets/ticket230-webfont-net.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Parameter locale 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |

Having icons loaded from internet (Web Font)

14 | 15 |
16 | 17 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /examples/tickets/ticket234.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Parameter orientation with headers 6 | 7 | 8 | 9 |

Having icons loaded from internet (SVG)

10 | 11 |
12 | 13 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /examples/tickets/ticket235-2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Mixing viewer with Fontawesome icons (loading before) 6 | 7 | 8 | 9 | 10 |

Having additional library integrated of Fontawesome

11 |

Now with some icons

12 | 13 |
14 | 15 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/tickets/ticket235.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Mixing viewer with Fontawesome icons (loading after) 6 | 7 | 8 | 9 | 10 |

Having additional library integrated of Fontawesome

11 |

Now with some icons

12 | 13 |
14 | 15 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/tickets/ticket240.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Correct color marker 6 | 7 | 8 | 9 |

Correct color marker

10 | 11 | Try to click on white moves, more than once, and see if the color marker changes or not. 12 |
13 | 14 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /examples/tickets/ticket244.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Correct list layout for complex variations 6 | 7 | 8 | 9 |

Correct list layout for complex variations

10 | 11 |
12 | 13 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /examples/tickets/ticket245.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Correct list layout for complex variations 6 | 7 | 8 | 9 |

Correct list layout for complex variations

10 | 11 |
12 |
13 | 14 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/tickets/ticket246.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Demonstrates that O-O (and O-O-O) are not split by line break 6 | 7 | 8 | 9 |

Demonstrates that O-O (and O-O-O) are not split by line break

10 | 11 | Just play around with the dots, to see different line breaks, but O-O will not be split any more. 12 |
13 | 14 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /examples/tickets/ticket247.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Add CSS to overwrite symbols 6 | 7 | 12 | 13 | 14 |

Add CSS to overwrite symbols

15 | 16 | Look at the first move, and hover with the mouse over the NAG. You should see an explanation of that NAG. 17 | 18 |
19 | 20 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /examples/tickets/ticket261.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Missing move number after variation ends 6 | 7 | 8 | 9 |

Missing move number after variation ends

10 | 11 | 12 |
13 | 14 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /examples/tickets/ticket311p.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Using UCI Input 6 | 7 | 8 | 9 |

Using UCI Input

10 | 11 |
12 | 13 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /examples/tickets/ticket318.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Resize on coordsInner == false 6 | 7 | 8 | 9 |

Resize on coordsInner == false

10 | 11 |
12 |

Resize on coordsInner == true

13 | 14 |
15 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /examples/tickets/ticket337.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Interpret language_LOCALE 6 | 7 | 8 | 9 |

No locale set == English

10 | 11 |
12 |

Locale set as 'de_DE'

13 | 14 |
15 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /examples/tickets/ticket338.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Set arrows and circles in initial position 6 | 7 | 8 | 9 | 10 |
11 | 15 |
16 | 20 | 21 |
22 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /examples/tickets/ticket387.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Interpret language_LOCALE 6 | 7 | 8 | 9 |

Default: arrows enabled

10 | 11 |
12 |

Disable arrows

13 | 14 |
15 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /examples/tickets/ticket414.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Ensures result goes to next line in `list` mode. 6 | 7 | 8 | 9 |

Ensures result goes to next line in `list` mode

10 | 11 |
12 | 13 | Second example, with then last move from white. 14 | 15 |
16 | 17 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /examples/tickets/ticket436-1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Interpret language_LOCALE 6 | 7 | 8 | 9 |

Fix problem with missing disambiguator in edit mode

10 | 11 |
12 | 13 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /examples/tickets/ticket436.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Interpret language_LOCALE 6 | 7 | 8 | 9 |

Fix problem with missing disambiguator in edit mode

10 | 11 |
12 | 13 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /examples/tickets/ticket452.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Overlap of headers with coordinates 6 | 7 | 8 | 9 | 10 |
11 | 15 | 16 |
17 | 21 | 22 |
23 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /examples/tickets/ticket482.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Allow manual moves from the outside 6 | 7 | 8 | 9 |

Ticket 482 at GitHub. 10 | Use the developer tools of the browser to do the following:

11 |
    12 |
  1. Open the console, and check after the example has loaded that v is bound to the viewer.
  2. 13 |
  3. Type into the console: `v.base.jumpToMove(2)` and see how the position is shown.
  4. 14 |
15 |
16 |

Viewer

17 | 18 | 19 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /examples/tickets/ticket484.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Difference in Android WebView? 6 | 7 | 8 | 9 |

Ticket 584 at GitHub.

10 | 11 | Reproduce the bug with switching games with variants. Somehow the parsing is not working correctly. 12 |
13 |

Viewer

14 | 15 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /examples/tickets/ticket518.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Ugly display of games in dropdown when values are missing 6 | 7 | 8 | 9 |

Ticket 518 at GitHub.

10 | 11 |
12 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /examples/tickets/ticket522.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | puzzle not doing all moves 6 | 7 | 8 | 9 |

Ticket 522 at GitHub. 10 | 11 |

12 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /examples/tickets/ticket555.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Game Comment not showing up 6 | 7 | 8 | 9 |

Ticket 555 at GitHub. 10 | 11 |

12 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /examples/tickets/ticket580.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Allow manual moves from the outside 6 | 7 | 8 | 9 |

10 | Ticket 580 at GitHub. Should show diagrams in the notation when the NAG 'D' is 11 | appended. 12 |

13 |
14 |

Viewer

15 | 16 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /examples/trainer/README.md: -------------------------------------------------------------------------------- 1 | # In a nutshell 2 | 3 | This directory shows some examples I use in the work of providing exercises to my training group. It goes like that: 4 | 5 | * Take a template like the 3 examples here. 6 | * Use minimal additional CSS to style the boards. 7 | * Bring them in a form you are able to print them out later. 8 | * Now find the right examples, some short text, to have exercises for them. 9 | 10 | Have fun! -------------------------------------------------------------------------------- /package-scripts.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | scripts: { 3 | gen_examples: 'node ./bin/gen_examples.js' 4 | } 5 | }; 6 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = {}; -------------------------------------------------------------------------------- /screenshots/edit-variation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/screenshots/edit-variation.png -------------------------------------------------------------------------------- /screenshots/sportverlag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/screenshots/sportverlag.png -------------------------------------------------------------------------------- /screenshots/view-layout-left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/screenshots/view-layout-left.png -------------------------------------------------------------------------------- /src/api.ts: -------------------------------------------------------------------------------- 1 | import {FEN} from "chessground/types"; 2 | 3 | export interface Api { 4 | // Here should be following all functions that are given as return to the callers, that want to 5 | // drive the viewer / editor (no reason to do that for board / print) then later. 6 | // First ideas are taken from 7 | // [wiki](https://github.com/mliebelt/pgn-viewer/wiki/API-and-Callbacks-for-reader-and-viewer) 8 | 9 | //state:Pgn 10 | /** 11 | * Sets the position of the board given the FEN (Forsyth-Edwards Notation). 12 | * 13 | * @param {string} fen - The FEN representation of the position. 14 | * @return {void} 15 | */ 16 | setPosition(fen:FEN): void 17 | makeMove(san:string): void 18 | } -------------------------------------------------------------------------------- /src/css/.uuid: -------------------------------------------------------------------------------- 1 | 7745cfc6-0311-4cc7-a21e-8ada680957cd -------------------------------------------------------------------------------- /src/css/CAChess-fig.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/css/CAChess-fig.woff -------------------------------------------------------------------------------- /src/css/CAChess-min.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/css/CAChess-min.woff -------------------------------------------------------------------------------- /src/css/ChessAlpha.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/css/ChessAlpha.woff -------------------------------------------------------------------------------- /src/css/ChessBerlin.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/css/ChessBerlin.woff -------------------------------------------------------------------------------- /src/css/ChessMerida.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/css/ChessMerida.woff -------------------------------------------------------------------------------- /src/css/NotoSans.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/css/NotoSans.woff -------------------------------------------------------------------------------- /src/css/resize.css: -------------------------------------------------------------------------------- 1 | cg-resize { 2 | display: block; 3 | position: absolute; 4 | right: -9px; 5 | bottom: -9px; 6 | width: 22px; 7 | height: 22px; 8 | cursor: nwse-resize; 9 | z-index: 10; 10 | } 11 | 12 | cg-resize::before, cg-resize::after { 13 | background: #000; 14 | content: ''; 15 | position: absolute; 16 | width: 12px; 17 | height: 1px; 18 | } 19 | 20 | cg-resize::after { 21 | transform: translate(1px, 6px) rotate( 22 | -45deg); 23 | } 24 | 25 | cg-resize::before { 26 | width: 5px; 27 | transform: translate(7px, 8px) rotate( 28 | -45deg); 29 | } 30 | 31 | cg-resize::before { 32 | width: 5px; 33 | transform: translate(7px, 8px) rotate( 34 | -45deg); 35 | } 36 | 37 | cg-resize:hover, .resizing cg-resize { 38 | border-radius: 50%; 39 | background: rgba(214,79,0,0.5); 40 | } -------------------------------------------------------------------------------- /src/i18n.ts: -------------------------------------------------------------------------------- 1 | import { i18n, loadedLocales } from "./i18n/i18n-util" 2 | import { loadAllLocales } from "./i18n/i18n-util.sync" 3 | import {SupportedLocales} from "./types"; 4 | 5 | loadAllLocales() 6 | 7 | function matchLoc(loc:string): SupportedLocales { 8 | let m = loc.match(/(.{2})_(.{2})/) 9 | if (m) { return m[1] as SupportedLocales } 10 | return loc as SupportedLocales 11 | } 12 | 13 | const i18next = function (loc:string) { 14 | const matchLocale = matchLoc(loc) 15 | return i18n()[matchLocale] 16 | } 17 | 18 | export { i18next } -------------------------------------------------------------------------------- /src/i18n/formatters.ts: -------------------------------------------------------------------------------- 1 | import type { FormattersInitializer } from 'typesafe-i18n' 2 | import type { Formatters } from './i18n-types' 3 | import {SupportedLocales} from "../types"; 4 | 5 | export const initFormatters: FormattersInitializer = (locale: SupportedLocales) => { 6 | 7 | const formatters: Formatters = { 8 | // add your formatter functions here 9 | } 10 | 11 | return formatters 12 | } 13 | -------------------------------------------------------------------------------- /src/img/board/blue.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/img/board/brown.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/img/board/falken.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/img/board/green.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/img/board/informator.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/img/board/zeit.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/img/chesspieces/alpha/bB.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/img/chesspieces/alpha/bK.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/img/chesspieces/alpha/bP.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/img/chesspieces/alpha/bR.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/img/chesspieces/alpha/wN1.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/img/chesspieces/beyer/bB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/img/chesspieces/beyer/bB.png -------------------------------------------------------------------------------- /src/img/chesspieces/beyer/bK.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/img/chesspieces/beyer/bK.png -------------------------------------------------------------------------------- /src/img/chesspieces/beyer/bN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/img/chesspieces/beyer/bN.png -------------------------------------------------------------------------------- /src/img/chesspieces/beyer/bP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/img/chesspieces/beyer/bP.png -------------------------------------------------------------------------------- /src/img/chesspieces/beyer/bQ.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/img/chesspieces/beyer/bQ.png -------------------------------------------------------------------------------- /src/img/chesspieces/beyer/bR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/img/chesspieces/beyer/bR.png -------------------------------------------------------------------------------- /src/img/chesspieces/beyer/wB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/img/chesspieces/beyer/wB.png -------------------------------------------------------------------------------- /src/img/chesspieces/beyer/wK.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/img/chesspieces/beyer/wK.png -------------------------------------------------------------------------------- /src/img/chesspieces/beyer/wN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/img/chesspieces/beyer/wN.png -------------------------------------------------------------------------------- /src/img/chesspieces/beyer/wP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/img/chesspieces/beyer/wP.png -------------------------------------------------------------------------------- /src/img/chesspieces/beyer/wQ.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/img/chesspieces/beyer/wQ.png -------------------------------------------------------------------------------- /src/img/chesspieces/beyer/wR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/img/chesspieces/beyer/wR.png -------------------------------------------------------------------------------- /src/img/chesspieces/case/bR.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 10 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/img/chesspieces/condal/bB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/img/chesspieces/condal/bB.png -------------------------------------------------------------------------------- /src/img/chesspieces/condal/bK.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/img/chesspieces/condal/bK.png -------------------------------------------------------------------------------- /src/img/chesspieces/condal/bN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/img/chesspieces/condal/bN.png -------------------------------------------------------------------------------- /src/img/chesspieces/condal/bP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/img/chesspieces/condal/bP.png -------------------------------------------------------------------------------- /src/img/chesspieces/condal/bQ.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/img/chesspieces/condal/bQ.png -------------------------------------------------------------------------------- /src/img/chesspieces/condal/bR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/img/chesspieces/condal/bR.png -------------------------------------------------------------------------------- /src/img/chesspieces/condal/wB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/img/chesspieces/condal/wB.png -------------------------------------------------------------------------------- /src/img/chesspieces/condal/wK.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/img/chesspieces/condal/wK.png -------------------------------------------------------------------------------- /src/img/chesspieces/condal/wN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/img/chesspieces/condal/wN.png -------------------------------------------------------------------------------- /src/img/chesspieces/condal/wP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/img/chesspieces/condal/wP.png -------------------------------------------------------------------------------- /src/img/chesspieces/condal/wQ.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/img/chesspieces/condal/wQ.png -------------------------------------------------------------------------------- /src/img/chesspieces/condal/wR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/img/chesspieces/condal/wR.png -------------------------------------------------------------------------------- /src/img/chesspieces/merida/bP.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/img/chesspieces/merida/bR.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/img/chesspieces/merida/wR.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/img/chesspieces/uscf/bB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/img/chesspieces/uscf/bB.png -------------------------------------------------------------------------------- /src/img/chesspieces/uscf/bK.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/img/chesspieces/uscf/bK.png -------------------------------------------------------------------------------- /src/img/chesspieces/uscf/bN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/img/chesspieces/uscf/bN.png -------------------------------------------------------------------------------- /src/img/chesspieces/uscf/bP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/img/chesspieces/uscf/bP.png -------------------------------------------------------------------------------- /src/img/chesspieces/uscf/bQ.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/img/chesspieces/uscf/bQ.png -------------------------------------------------------------------------------- /src/img/chesspieces/uscf/bR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/img/chesspieces/uscf/bR.png -------------------------------------------------------------------------------- /src/img/chesspieces/uscf/wB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/img/chesspieces/uscf/wB.png -------------------------------------------------------------------------------- /src/img/chesspieces/uscf/wK.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/img/chesspieces/uscf/wK.png -------------------------------------------------------------------------------- /src/img/chesspieces/uscf/wN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/img/chesspieces/uscf/wN.png -------------------------------------------------------------------------------- /src/img/chesspieces/uscf/wP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/img/chesspieces/uscf/wP.png -------------------------------------------------------------------------------- /src/img/chesspieces/uscf/wQ.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/img/chesspieces/uscf/wQ.png -------------------------------------------------------------------------------- /src/img/chesspieces/uscf/wR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/img/chesspieces/uscf/wR.png -------------------------------------------------------------------------------- /src/img/chesspieces/wikipedia/bP.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | -------------------------------------------------------------------------------- /src/img/chesspieces/wikipedia/wP.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | -------------------------------------------------------------------------------- /src/img/chesspieces/wikipedia/wR.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 11 | 14 | 16 | 19 | 21 | 24 | -------------------------------------------------------------------------------- /src/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/img/favicon.ico -------------------------------------------------------------------------------- /src/img/pattern/chess1x1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/img/pattern/chess1x1.png -------------------------------------------------------------------------------- /src/img/pattern/diagonal-stripe-1.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/img/pattern/diagonal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/img/pattern/diagonal.png -------------------------------------------------------------------------------- /src/img/pattern/diagonal1x2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/img/pattern/diagonal1x2.png -------------------------------------------------------------------------------- /src/img/pattern/diagonal1x2r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/img/pattern/diagonal1x2r.png -------------------------------------------------------------------------------- /src/img/pattern/diagonal1x3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/img/pattern/diagonal1x3.png -------------------------------------------------------------------------------- /src/img/pattern/vertical1x3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mliebelt/pgn-viewer/e7ec58ac7c4b49f8bc28ad153beb11eef230c03d/src/img/pattern/vertical1x3.png -------------------------------------------------------------------------------- /src/locales/cs.ts: -------------------------------------------------------------------------------- 1 | import {BaseTranslation, type Translation} from "../i18n/i18n-types" 2 | 3 | const cs: BaseTranslation = { 4 | "buttons:flipper" : "Flip po stranách desky", 5 | "buttons:first" : "Jít na první tah", 6 | "buttons:prev" : "Přejít na předchozí tah", 7 | "buttons:next" : "Přejít na další tah", 8 | "buttons:play" : "Přehrát / zastavit přehrávání všech tahů", 9 | "buttons:last" : "Přejít na poslední tah", 10 | "buttons:deleteVar" : "smazat variaci", 11 | "buttons:promoteVar" : "podporovat změnu", 12 | "buttons:deleteMoves" : "Odstranit odpočinku pohyby odtud", 13 | "buttons:nags" : "NAGs menu", 14 | "buttons:pgn" : "Zobrazení PGN z aktuální hry", 15 | "buttons:hidePGN" : "Skrýt zobrazené PGN", 16 | "buttons:getHint": "Dát nápovědu", 17 | "buttons:makeMove": "Ukažte další tah", 18 | "buttons:showSolution": "Ukažte celé řešení", 19 | "chess:q": "D", 20 | "chess:k": "K", 21 | "chess:r": "V", 22 | "chess:b": "S", 23 | "chess:n": "J", 24 | "chess:Q": "D", 25 | "chess:K": "K", 26 | "chess:R": "V", 27 | "chess:B": "S", 28 | "chess:N": "J" 29 | } satisfies Translation 30 | 31 | export default cs; -------------------------------------------------------------------------------- /src/locales/da.ts: -------------------------------------------------------------------------------- 1 | import {BaseTranslation, type Translation} from "../i18n/i18n-types" 2 | 3 | const da: BaseTranslation = { 4 | "buttons:flipper" : "Flip siderne af brættet", 5 | "buttons:first" : "Gå til første skridt", 6 | "buttons:prev" : "Gå til forrige træk", 7 | "buttons:next" : "Gå til næste træk", 8 | "buttons:play" : "Afspil / stoppe med at spille alle bevægelser", 9 | "buttons:last" : "Gå til sidste træk", 10 | "buttons:deleteVar" : "Slet variation", 11 | "buttons:promoteVar" : "Fremme variation", 12 | "buttons:deleteMoves" : "Slet resten bevæger sig fra her", 13 | "buttons:nags" : "NAGs menu", 14 | "buttons:pgn" : "Visning PGN af aktuelle spil", 15 | "buttons:hidePGN" : "Skjul den viste PGN", 16 | "buttons:getHint": "Giv et hint", 17 | "buttons:makeMove": "Vis næste træk", 18 | "buttons:showSolution": "Vis hele løsningen", 19 | "chess:q": "D", 20 | "chess:k": "K", 21 | "chess:r": "T", 22 | "chess:b": "L", 23 | "chess:n": "S", 24 | "chess:Q": "D", 25 | "chess:K": "K", 26 | "chess:R": "T", 27 | "chess:B": "L", 28 | "chess:N": "S" 29 | } satisfies Translation 30 | 31 | export default da; -------------------------------------------------------------------------------- /src/locales/et.ts: -------------------------------------------------------------------------------- 1 | import {BaseTranslation, type Translation} from "../i18n/i18n-types" 2 | 3 | const et: BaseTranslation = { 4 | "buttons:flipper" : "Flip pool pardal", 5 | "buttons:first" : "Mine esimese sammu", 6 | "buttons:prev" : "Mine eelmise käigu", 7 | "buttons:next" : "Mine järgmise käigu", 8 | "buttons:play" : "Play / lõpetada mängimine kõik käigud", 9 | "buttons:last" : "Mine viimase käigu", 10 | "buttons:deleteVar" : "Kustuta variatsioon", 11 | "buttons:promoteVar" : "Edendada variatsioon", 12 | "buttons:deleteMoves" : "Kustuta ülejäänud käigud siit", 13 | "buttons:nags" : "NAGs menu", 14 | "buttons:pgn" : "Näita PGN praeguse mängu", 15 | "buttons:hidePGN" : "Peida kuvatakse PGN", 16 | "buttons:getHint": "Anna vihje", 17 | "buttons:makeMove": "Näita järgmist käiku", 18 | "buttons:showSolution": "Näidake kogu lahendust", 19 | "chess:q": "L", 20 | "chess:k": "K", 21 | "chess:r": "V", 22 | "chess:b": "O", 23 | "chess:n": "R", 24 | "chess:Q": "L", 25 | "chess:K": "K", 26 | "chess:R": "V", 27 | "chess:B": "O", 28 | "chess:N": "R" 29 | } satisfies Translation 30 | 31 | export default et; -------------------------------------------------------------------------------- /src/locales/fi.ts: -------------------------------------------------------------------------------- 1 | import {BaseTranslation, type Translation} from "../i18n/i18n-types" 2 | 3 | const fi: BaseTranslation = { 4 | "buttons:flipper" : "Käännä lauta", 5 | "buttons:first" : "Mene ensimmäiseen siirtoon", 6 | "buttons:prev" : "Mene edelliseen siirtoon", 7 | "buttons:next" : "Mene seuraavaan siirtoon", 8 | "buttons:play" : "Toista kaikki siirrot / Lopeta siirtojen toisto", 9 | "buttons:last" : "Siirry viimeiseen liikkua", 10 | "buttons:deleteVar" : "Poista muunnelma", 11 | "buttons:promoteVar" : "Ylennä muunnelma", 12 | "buttons:deleteMoves" : "Poista loput siirrot", 13 | "buttons:nags" : "NAGs valikko", 14 | "buttons:pgn" : "Näytä pelin PGN", 15 | "buttons:hidePGN" : "Piilota PGN näyttö", 16 | "buttons:getHint": "Anna vihje", 17 | "buttons:makeMove": "Näytä seuraava siirto", 18 | "buttons:showSolution": "Näytä koko ratkaisu", 19 | "chess:q": "D", 20 | "chess:k": "K", 21 | "chess:r": "T", 22 | "chess:b": "L", 23 | "chess:n": "R", 24 | "chess:Q": "D", 25 | "chess:K": "K", 26 | "chess:R": "T", 27 | "chess:B": "L", 28 | "chess:N": "R" 29 | } satisfies Translation 30 | 31 | export default fi; -------------------------------------------------------------------------------- /src/locales/hu.ts: -------------------------------------------------------------------------------- 1 | import {BaseTranslation, type Translation} from "../i18n/i18n-types" 2 | 3 | const hu: BaseTranslation = { 4 | "buttons:flipper" : "Flip oldalán a tábla", 5 | "buttons:first" : "Menjünk az első lépés", 6 | "buttons:prev" : "Ugrás az előző mozgás", 7 | "buttons:next" : "Ugrás a következő lépés", 8 | "buttons:play" : "Lejátszás / stop playing minden mozog", 9 | "buttons:last" : "Menj az utolsó lépés", 10 | "buttons:deleteVar" : "Törlés variáció", 11 | "buttons:promoteVar" : "Támogassák variáció", 12 | "buttons:deleteMoves" : "Törlés többi mozog itt", 13 | "buttons:nags" : "NAGs menu", 14 | "buttons:pgn" : "Kijelző PGN aktuális játék", 15 | "buttons:hidePGN" : "Elrejtése a megjelenített PGN", 16 | "buttons:getHint": "Adj egy tippet", 17 | "buttons:makeMove": "Mutasd a következő lépést", 18 | "buttons:showSolution": "Mutasd meg a teljes megoldást", 19 | "chess:q": "V", 20 | "chess:k": "K", 21 | "chess:r": "B", 22 | "chess:b": "F", 23 | "chess:n": "H", 24 | "chess:Q": "V", 25 | "chess:K": "K", 26 | "chess:R": "B", 27 | "chess:B": "F", 28 | "chess:N": "H" 29 | } satisfies Translation 30 | 31 | export default hu; -------------------------------------------------------------------------------- /src/locales/is.ts: -------------------------------------------------------------------------------- 1 | import {BaseTranslation, type Translation} from "../i18n/i18n-types" 2 | 3 | const is: BaseTranslation = { 4 | "buttons:flipper" : "Flip hliðar borðsins", 5 | "buttons:first" : "Fara á fyrsta ferðinni", 6 | "buttons:prev" : "Fara í fyrri ferðinni", 7 | "buttons:next" : "Fara á næsta hreyfa", 8 | "buttons:play" : "Play / hætta að spila allt færist", 9 | "buttons:last" : "Fara að síðasta færa", 10 | "buttons:deleteVar" : "Eyða tilbrigði", 11 | "buttons:promoteVar" : "Efla tilbrigði", 12 | "buttons:deleteMoves" : "Eyða hvíld færist frá hér", 13 | "buttons:nags" : "NAGs menu", 14 | "buttons:pgn" : "Sýna PGN núverandi leik", 15 | "buttons:hidePGN" : "Fela birtist PGN", 16 | "buttons:getHint": "Gefðu vísbendingu", 17 | "buttons:makeMove": "Sýndu næstu hreyfingu", 18 | "buttons:showSolution": "Sýndu alla lausnina", 19 | "chess:q": "D", 20 | "chess:k": "K", 21 | "chess:r": "H", 22 | "chess:b": "B", 23 | "chess:n": "R", 24 | "chess:Q": "D", 25 | "chess:K": "K", 26 | "chess:R": "H", 27 | "chess:B": "B", 28 | "chess:N": "R" 29 | } satisfies Translation 30 | 31 | export default is; -------------------------------------------------------------------------------- /src/locales/nb.ts: -------------------------------------------------------------------------------- 1 | import {BaseTranslation, Translation} from "../i18n/i18n-types"; 2 | 3 | const nb: BaseTranslation = { 4 | "buttons:flipper" : "Vend sider av bordet", 5 | "buttons:first" : "Gå til første trekket", 6 | "buttons:prev" : "Gå til forrige trekk", 7 | "buttons:next" : "Gå til neste trekk", 8 | "buttons:play" : "Play / slutte å spille alle trekk", 9 | "buttons:last" : "Gå til siste trekk", 10 | "buttons:deleteVar" : "Slett variasjon", 11 | "buttons:promoteVar" : "Fremme variasjon", 12 | "buttons:deleteMoves" : "Slett resten beveger seg fra her", 13 | "buttons:nags" : "NAGs menu", 14 | "buttons:pgn" : "Visning PGN av dagens spill", 15 | "buttons:hidePGN" : "Skjul vises PGN", 16 | "buttons:getHint": "Gi et hint", 17 | "buttons:makeMove": "Vis neste trekk", 18 | "buttons:showSolution": "Vis hele løsningen", 19 | "chess:q": "D", 20 | "chess:k": "K", 21 | "chess:r": "T", 22 | "chess:b": "L", 23 | "chess:n": "S", 24 | "chess:Q": "D", 25 | "chess:K": "K", 26 | "chess:R": "T", 27 | "chess:B": "L", 28 | "chess:N": "S" 29 | } satisfies Translation 30 | 31 | 32 | export default nb; -------------------------------------------------------------------------------- /src/locales/nl.ts: -------------------------------------------------------------------------------- 1 | import {BaseTranslation, Translation} from "../i18n/i18n-types"; 2 | 3 | const nl: BaseTranslation = { 4 | 5 | "buttons:flipper" : "Flip de zijkanten van het bord", 6 | "buttons:first" : "Ga naar eerste zet", 7 | "buttons:prev" : "Ga naar vorige zet", 8 | "buttons:next" : "Ga naar de volgende stap", 9 | "buttons:play" : "Play / stop spelen van alle moves", 10 | "buttons:last" : "Ga naar laatste zet", 11 | "buttons:deleteVar" : "Verwijder variatie", 12 | "buttons:promoteVar" : "Bevorder variatie", 13 | "buttons:deleteMoves" : "Verwijder rust verhuist van hier", 14 | "buttons:nags" : "NAGs menu", 15 | "buttons:pgn" : "Weergave PGN van het huidige spel", 16 | "buttons:hidePGN" : "Verberg de weergegeven PGN", 17 | "buttons:getHint": "Geef een hint", 18 | "buttons:makeMove": "Laat de volgende zet zien", 19 | "buttons:showSolution": "Laat de hele oplossing zien", 20 | "chess:q": "D", 21 | "chess:k": "K", 22 | "chess:r": "T", 23 | "chess:b": "L", 24 | "chess:n": "P", 25 | "chess:Q": "D", 26 | "chess:K": "K", 27 | "chess:R": "T", 28 | "chess:B": "L", 29 | "chess:N": "P" 30 | } satisfies Translation 31 | 32 | export default nl; -------------------------------------------------------------------------------- /src/locales/pt.ts: -------------------------------------------------------------------------------- 1 | import {BaseTranslation, Translation} from "../i18n/i18n-types"; 2 | 3 | const pt: BaseTranslation = { 4 | "buttons:flipper" : "Virar os lados da placa", 5 | "buttons:first" : "Ir para o primeiro movimento", 6 | "buttons:prev" : "Ir para o movimento anterior", 7 | "buttons:next" : "Ir para o próximo movimento", 8 | "buttons:play" : "Reproduzir / parar de jogar todos os movimentos", 9 | "buttons:last" : "Ir para o último movimento", 10 | "buttons:deleteVar" : "Excluir variação", 11 | "buttons:promoteVar" : "Promover a variação", 12 | "buttons:deleteMoves" : "Excluir rest move daqui", 13 | "buttons:nags" : "NAGs menu", 14 | "buttons:pgn" : "Exibir PGN do jogo atual", 15 | "buttons:hidePGN" : "Ocultar a PGN exibida", 16 | "buttons:getHint": "Dê uma dica", 17 | "buttons:makeMove": "Mostre o próximo movimento", 18 | "buttons:showSolution": "Mostre toda a solução", 19 | "chess:q": "D", 20 | "chess:k": "R", 21 | "chess:r": "T", 22 | "chess:b": "B", 23 | "chess:n": "C", 24 | "chess:Q": "D", 25 | "chess:K": "R", 26 | "chess:R": "T", 27 | "chess:B": "B", 28 | "chess:N": "C" 29 | } satisfies Translation 30 | 31 | export default pt; -------------------------------------------------------------------------------- /src/locales/ro.ts: -------------------------------------------------------------------------------- 1 | import {BaseTranslation, Translation} from "../i18n/i18n-types"; 2 | 3 | const ro: BaseTranslation = { 4 | "buttons:flipper" : "Flip părțile laterale ale plăcii", 5 | "buttons:first" : "Du-te la prima mutare", 6 | "buttons:prev" : "Du-te la mutarea anterioară", 7 | "buttons:next" : "Du-te la următoarea mutare", 8 | "buttons:play" : "Redare / opri redarea toate mișcările", 9 | "buttons:last" : "Mergi la ultima mutare", 10 | "buttons:deleteVar" : "Şterge variație", 11 | "buttons:promoteVar" : "Să promoveze variația", 12 | "buttons:deleteMoves" : "Șterge de aici se mută de odihnă", 13 | "buttons:nags" : "NAGs menu", 14 | "buttons:pgn" : "Afișare PGN de joc curente", 15 | "buttons:hidePGN" : "Ascundeți PGN afișat", 16 | "buttons:getHint": "Dați un indiciu", 17 | "buttons:makeMove": "Arată următoarea mișcare", 18 | "buttons:showSolution": "Arată întreaga soluție", 19 | "chess:q": "D", 20 | "chess:k": "R", 21 | "chess:r": "T", 22 | "chess:b": "N", 23 | "chess:n": "C", 24 | "chess:Q": "D", 25 | "chess:K": "R", 26 | "chess:R": "T", 27 | "chess:B": "N", 28 | "chess:N": "C" 29 | } satisfies Translation 30 | 31 | export default ro; -------------------------------------------------------------------------------- /src/locales/sv.ts: -------------------------------------------------------------------------------- 1 | import {BaseTranslation, Translation} from "../i18n/i18n-types"; 2 | 3 | const sv: BaseTranslation = { 4 | "buttons:flipper" : "Vänd sidorna av styrelsen", 5 | "buttons:first" : "Gå till första steget", 6 | "buttons:prev" : "Gå till föregående drag", 7 | "buttons:next" : "Gå till nästa steg", 8 | "buttons:play" : "Play / sluta spela alla drag", 9 | "buttons:last" : "Gå till det senaste drag", 10 | "buttons:deleteVar" : "Radera variation", 11 | "buttons:promoteVar" : "Främja variation", 12 | "buttons:deleteMoves" : "Radera vila flyttar härifrån", 13 | "buttons:nags" : "NAGs menu", 14 | "buttons:pgn" : "Visning PGN av aktuella spelet", 15 | "buttons:hidePGN" : "Dölja visas PGN", 16 | "buttons:getHint": "Ge ett tips", 17 | "buttons:makeMove": "Visa nästa drag", 18 | "buttons:showSolution": "Visa hela lösningen", 19 | "chess:q": "D", 20 | "chess:k": "K", 21 | "chess:r": "T", 22 | "chess:b": "L", 23 | "chess:n": "S", 24 | "chess:Q": "D", 25 | "chess:K": "K", 26 | "chess:R": "T", 27 | "chess:B": "L", 28 | "chess:N": "S" 29 | } satisfies Translation 30 | 31 | export default sv; -------------------------------------------------------------------------------- /test/i18n-trial.ts: -------------------------------------------------------------------------------- 1 | import { i18n } from 'typesafe-i18n' 2 | 3 | type Locales = 'en' | 'de' | 'it' 4 | 5 | const localeTranslations = { 6 | en: { TODAY: 'Today is {date|weekday}' }, 7 | de: { TODAY: 'Heute ist {date|weekday}' }, 8 | it: { TODAY: 'Oggi è {date|weekday}' }, 9 | } 10 | 11 | const initFormatters = (locale: Locales) => { 12 | const dateFormatter = new Intl.DateTimeFormat(locale, { weekday: 'long' }) 13 | 14 | return { 15 | weekday: (value: Date | number) => dateFormatter.format(value), 16 | } 17 | } 18 | 19 | const formatters = { 20 | en: initFormatters('en'), 21 | de: initFormatters('de'), 22 | it: initFormatters('it'), 23 | } 24 | 25 | const L = i18n(localeTranslations, formatters) 26 | 27 | const now = new Date() 28 | 29 | // console.log(L.en.TODAY({ date: now })) // => 'Today is friday' 30 | // console.log(L.de.TODAY({ date: now })) // => 'Heute ist Freitag' 31 | // console.log(L.it.TODAY({ date: now })) // => 'Oggi è venerdì' -------------------------------------------------------------------------------- /test/timer.ts: -------------------------------------------------------------------------------- 1 | import Timer from "../src/timer" 2 | import { performance } from "perf_hooks" 3 | import { test, suite } from "uvu" 4 | import * as assert from "uvu/assert" 5 | 6 | const timerSuite = suite("When testing Timer functionality") 7 | timerSuite("should create a Timer and use it", async function (done){ 8 | let t = new Timer(10) 9 | assert.ok(t) 10 | assert.is(t.running(), false) 11 | let end 12 | t.bind(3000, function (){ 13 | end = performance.now() 14 | t.stop() 15 | assert.ok(end>3000, `${end} is not above 3000`) 16 | assert.ok(end<3100, `${end} is not below 3100`) 17 | }) 18 | let start = performance.now() 19 | t.start() 20 | // done 21 | }) 22 | // timerSuite.run() -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowJs": true, 4 | "allowSyntheticDefaultImports": true, 5 | // "baseUrl": ".", 6 | "checkJs": true, 7 | // "declaration": true, 8 | // "declarationMap": true, 9 | "esModuleInterop": true, 10 | "allowSyntheticDefaultImports": true, 11 | "forceConsistentCasingInFileNames": true, 12 | "module": "ES6", 13 | "moduleResolution": "Node", 14 | // "noImplicitReturns": true, 15 | // "noFallthroughCasesInSwitch": true, 16 | // "noEmit": true, 17 | // "noImplicitAny": true, 18 | // "outDir": "lib", 19 | // "skipLibCheck": true, 20 | // "sourceMap": true, 21 | // "strict": true, 22 | // "suppressImplicitAnyIndexErrors": true, 23 | "target": "ES6" 24 | }, 25 | "include": [ 26 | "./src/*.ts", "./src/locales/*.ts", "./test/*.ts"], 27 | "exclude": [ 28 | "node_modules" 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /webpack.dev.cjs: -------------------------------------------------------------------------------- 1 | const { merge } = require('webpack-merge'); 2 | const common = require('./webpack.common.cjs'); 3 | 4 | module.exports = merge(common, { 5 | mode: 'development', 6 | devtool: 'inline-source-map', 7 | devServer: { 8 | static: '.', 9 | },}); -------------------------------------------------------------------------------- /webpack.prod.cjs: -------------------------------------------------------------------------------- 1 | const { merge } = require('webpack-merge'); 2 | const common = require('./webpack.common.cjs'); 3 | 4 | module.exports = merge(common, { 5 | mode: 'production', 6 | devtool: 'source-map', 7 | }); 8 | --------------------------------------------------------------------------------