@mideind/netskrafl-react 1.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +8 -0
- package/.eslintrc.json +13 -0
- package/README.md +63 -0
- package/dist/cjs/index.css +6837 -0
- package/dist/cjs/index.js +3046 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/esm/index.css +6837 -0
- package/dist/esm/index.js +3046 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/types.d.ts +41 -0
- package/package.json +63 -0
- package/rollup.config.js +60 -0
- package/src/components/index.ts +2 -0
- package/src/components/netskrafl/Netskrafl.stories.tsx +66 -0
- package/src/components/netskrafl/Netskrafl.tsx +135 -0
- package/src/components/netskrafl/Netskrafl.types.ts +7 -0
- package/src/components/netskrafl/index.ts +2 -0
- package/src/css/fonts.css +4 -0
- package/src/css/glyphs.css +224 -0
- package/src/css/skrafl-explo.css +6616 -0
- package/src/fonts/glyphicons-regular.eot +0 -0
- package/src/fonts/glyphicons-regular.ttf +0 -0
- package/src/fonts/glyphicons-regular.woff +0 -0
- package/src/index.ts +2 -0
- package/src/messages/messages.json +1576 -0
- package/src/mithril/actions.ts +319 -0
- package/src/mithril/bag.ts +65 -0
- package/src/mithril/bestdisplay.ts +74 -0
- package/src/mithril/blankdialog.ts +94 -0
- package/src/mithril/board.ts +336 -0
- package/src/mithril/buttons.ts +303 -0
- package/src/mithril/challengedialog.ts +186 -0
- package/src/mithril/channel.ts +162 -0
- package/src/mithril/chat.ts +228 -0
- package/src/mithril/components.ts +496 -0
- package/src/mithril/dragdrop.ts +219 -0
- package/src/mithril/elopage.ts +180 -0
- package/src/mithril/friend.ts +227 -0
- package/src/mithril/game.ts +1378 -0
- package/src/mithril/gameview.ts +111 -0
- package/src/mithril/globalstate.ts +33 -0
- package/src/mithril/i18n.ts +186 -0
- package/src/mithril/localstorage.ts +133 -0
- package/src/mithril/login.ts +122 -0
- package/src/mithril/logo.ts +270 -0
- package/src/mithril/main.ts +737 -0
- package/src/mithril/mithril.ts +29 -0
- package/src/mithril/model.ts +817 -0
- package/src/mithril/movelistitem.ts +226 -0
- package/src/mithril/page.ts +852 -0
- package/src/mithril/playername.ts +91 -0
- package/src/mithril/promodialog.ts +82 -0
- package/src/mithril/recentlist.ts +148 -0
- package/src/mithril/request.ts +52 -0
- package/src/mithril/review.ts +634 -0
- package/src/mithril/rightcolumn.ts +398 -0
- package/src/mithril/searchbutton.ts +118 -0
- package/src/mithril/statsdisplay.ts +109 -0
- package/src/mithril/tabs.ts +169 -0
- package/src/mithril/tile.ts +145 -0
- package/src/mithril/twoletter.ts +76 -0
- package/src/mithril/types.ts +379 -0
- package/src/mithril/userinfodialog.ts +171 -0
- package/src/mithril/util.ts +304 -0
- package/src/mithril/wait.ts +246 -0
- package/src/mithril/wordcheck.ts +102 -0
- package/tsconfig.json +28 -0
- package/vite.config.ts +12 -0
package/.eslintignore
ADDED
package/.eslintrc.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"parser": "@typescript-eslint/parser",
|
|
3
|
+
"extends": [
|
|
4
|
+
"eslint:recommended",
|
|
5
|
+
"plugin:@typescript-eslint/recommended",
|
|
6
|
+
"plugin:prettier/recommended"
|
|
7
|
+
],
|
|
8
|
+
"plugins": ["@typescript-eslint", "prettier"],
|
|
9
|
+
"rules": {
|
|
10
|
+
"prettier/prettier": "error",
|
|
11
|
+
"@typescript-eslint/explicit-module-boundary-types": "off"
|
|
12
|
+
}
|
|
13
|
+
}
|
package/README.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
|
|
2
|
+
# netskrafl-react
|
|
3
|
+
|
|
4
|
+
## A React front end for Netskrafl
|
|
5
|
+
|
|
6
|
+
This is a web front end for the Netskrafl game server, packaged as a React component.
|
|
7
|
+
|
|
8
|
+
The component is written in TypeScript. It assumes that the containing application
|
|
9
|
+
(a) performs user authentication and (b) determines whether users have full access to the
|
|
10
|
+
Netskrafl functionality (typically by being paying subscribers) or limited/free access.
|
|
11
|
+
Information about (a) and (b) is passed to the component via its props.
|
|
12
|
+
|
|
13
|
+
The code for the Netskrafl backend server can be found on GitHub
|
|
14
|
+
at [https://github.com/mideind/Netskrafl](https://github.com/mideind/Netskrafl).
|
|
15
|
+
The backend is written in Python, using the Flask web framework.
|
|
16
|
+
The `netskrafl-react` component talks to the Netskrafl server via a
|
|
17
|
+
JSON API over HTTPS, and uses Firebase for real-time updates.
|
|
18
|
+
|
|
19
|
+
The source code for `netskrafl-react` is a bit unusual in that it was originally
|
|
20
|
+
written for the [Mithril](https://mithril.js.org) UI framework. The Mithril code
|
|
21
|
+
has been wrapped in a React component. Modifying the component thus requires
|
|
22
|
+
some familiarity with Mithril, as well as React. However, Mithril is fairly
|
|
23
|
+
straightforward and arguably simpler than React, so this should not be a major
|
|
24
|
+
obstacle.
|
|
25
|
+
|
|
26
|
+
## Installation
|
|
27
|
+
|
|
28
|
+
To install the Netskrafl React component via `npm`, run the following command:
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
npm install netskrafl-react
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Development
|
|
35
|
+
|
|
36
|
+
During development, you can run the rollup bundler in watch mode by running:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npm run watch
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
You can also use Storybook as a testing container by running:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
npm run storybook
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
To build the component for production, run:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
npm run rollup
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
See the `package.json` file for specifics.
|
|
55
|
+
|
|
56
|
+
## License and copyright
|
|
57
|
+
|
|
58
|
+
Copyright © 2025 Miðeind ehf. The original author of `netskrafl-react`
|
|
59
|
+
is *Vilhjálmur Þorsteinsson*.
|
|
60
|
+
|
|
61
|
+
This code is released under the
|
|
62
|
+
[CC-BY-NC 4.0 license](https://creativecommons.org/licenses/by-nc/4.0/).
|
|
63
|
+
See the LICENSE file for details.
|