js-dos 7.1.19 → 7.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/yarn-gulp.yml +30 -0
- package/README.md +1 -1
- package/dist/js-dos.css +59 -0
- package/dist/js-dos.js +15 -10
- package/dist/js-dos.js.map +1 -0
- package/dist/types/src/components/controls.d.ts +1 -0
- package/dist/types/src/hardware-transport-layer.d.ts +1 -1
- package/dist/types/src/icons.d.ts +22 -4
- package/dist/types/src/player-app.d.ts +7 -3
- package/dist/types/src/player.d.ts +3 -1
- package/examples/digger/index.html +8 -1
- package/package.json +3 -3
- package/yarn-error.log +391 -26
- package/dist/player.js.map +0 -1
|
@@ -2,6 +2,7 @@ import { Props } from "../player-app";
|
|
|
2
2
|
interface ControlsProps extends Props {
|
|
3
3
|
class?: string;
|
|
4
4
|
column?: boolean;
|
|
5
|
+
portal: boolean;
|
|
5
6
|
}
|
|
6
7
|
export declare function Controls(props: ControlsProps): import("preact").VNode<any> | import("preact").VNode<any>[];
|
|
7
8
|
export {};
|
|
@@ -3,7 +3,7 @@ export interface Hardware {
|
|
|
3
3
|
readConfig(): string;
|
|
4
4
|
sendMessage(payload: string): void;
|
|
5
5
|
addKey(key: number, pressed: number, timeMs: number): void;
|
|
6
|
-
mouseMove(x: number, y: number, timeMs: number): void;
|
|
6
|
+
mouseMove(x: number, y: number, relative: boolean, timeMs: number): void;
|
|
7
7
|
mouseButton(button: number, pressed: number, timeMs: number): void;
|
|
8
8
|
getFramePayload(): string;
|
|
9
9
|
writeFile(path: string, blob: string): string;
|
|
@@ -8,6 +8,12 @@ export declare const Icons: {
|
|
|
8
8
|
Mobile: (props: {
|
|
9
9
|
class: string;
|
|
10
10
|
}) => import("preact").VNode<any> | import("preact").VNode<any>[];
|
|
11
|
+
SwithcHorizontal: (props: {
|
|
12
|
+
class: string;
|
|
13
|
+
}) => import("preact").VNode<any> | import("preact").VNode<any>[];
|
|
14
|
+
EyeOff: (props: {
|
|
15
|
+
class: string;
|
|
16
|
+
}) => import("preact").VNode<any> | import("preact").VNode<any>[];
|
|
11
17
|
Pause: (props: {
|
|
12
18
|
class: string;
|
|
13
19
|
}) => import("preact").VNode<any> | import("preact").VNode<any>[];
|
|
@@ -23,10 +29,7 @@ export declare const Icons: {
|
|
|
23
29
|
PencilAlt: (props: {
|
|
24
30
|
class: string;
|
|
25
31
|
}) => import("preact").VNode<any> | import("preact").VNode<any>[];
|
|
26
|
-
|
|
27
|
-
class: string;
|
|
28
|
-
}) => import("preact").VNode<any> | import("preact").VNode<any>[];
|
|
29
|
-
Minimize: (props: {
|
|
32
|
+
ArrowsExpand: (props: {
|
|
30
33
|
class: string;
|
|
31
34
|
}) => import("preact").VNode<any> | import("preact").VNode<any>[];
|
|
32
35
|
ChevronLeft: (props: {
|
|
@@ -44,4 +47,19 @@ export declare const Icons: {
|
|
|
44
47
|
Upload: (props: {
|
|
45
48
|
class: string;
|
|
46
49
|
}) => import("preact").VNode<any> | import("preact").VNode<any>[];
|
|
50
|
+
Plus: (props: {
|
|
51
|
+
class: string;
|
|
52
|
+
}) => import("preact").VNode<any> | import("preact").VNode<any>[];
|
|
53
|
+
CursorClick: (props: {
|
|
54
|
+
class: string;
|
|
55
|
+
}) => import("preact").VNode<any> | import("preact").VNode<any>[];
|
|
56
|
+
Cursor: (props: {
|
|
57
|
+
class: string;
|
|
58
|
+
}) => import("preact").VNode<any> | import("preact").VNode<any>[];
|
|
59
|
+
Refresh: (props: {
|
|
60
|
+
class: string;
|
|
61
|
+
}) => import("preact").VNode<any> | import("preact").VNode<any>[];
|
|
62
|
+
CurrencyDollar: (props: {
|
|
63
|
+
class: string;
|
|
64
|
+
}) => import("preact").VNode<any> | import("preact").VNode<any>[];
|
|
47
65
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import "preact/debug";
|
|
2
1
|
import { ClientId, DosPlayer, DosPlayerOptions } from "./player";
|
|
3
2
|
export interface Props {
|
|
4
3
|
player: () => DosPlayer;
|
|
@@ -7,7 +6,11 @@ export interface Props {
|
|
|
7
6
|
setClientId: (clientId: ClientId | null) => void;
|
|
8
7
|
requestClientId?: (userGesture: boolean) => Promise<ClientId | null>;
|
|
9
8
|
mobileControls: boolean;
|
|
10
|
-
setMobileControls: (controls: boolean) => void
|
|
9
|
+
setMobileControls: (controls: boolean) => Promise<void>;
|
|
10
|
+
mirroredControls: boolean;
|
|
11
|
+
setMirroredControls: (mirrored: boolean) => Promise<void>;
|
|
12
|
+
autolock: boolean;
|
|
13
|
+
setAutolock: (autolock: boolean) => Promise<void>;
|
|
11
14
|
keyboard: boolean;
|
|
12
15
|
toggleKeyboard: () => void;
|
|
13
16
|
fullscreen: boolean;
|
|
@@ -25,5 +28,6 @@ export interface Props {
|
|
|
25
28
|
export declare function PlayerApp(playerProps: {
|
|
26
29
|
player: () => DosPlayer;
|
|
27
30
|
options: () => DosPlayerOptions;
|
|
31
|
+
setOnRun: (onRun: () => void) => void;
|
|
28
32
|
}): import("preact").VNode<any> | import("preact").VNode<any>[];
|
|
29
|
-
export declare function createPlayerApp(root: HTMLDivElement, player: DosPlayer, options: DosPlayerOptions): void;
|
|
33
|
+
export declare function createPlayerApp(root: HTMLDivElement, player: DosPlayer, options: DosPlayerOptions, setOnRun: (onRun: () => void) => void): void;
|
|
@@ -9,11 +9,13 @@ export interface DosPlayer extends DosInstance {
|
|
|
9
9
|
bundleUrl: string | null;
|
|
10
10
|
}
|
|
11
11
|
export interface DosPlayerOptions extends DosOptions {
|
|
12
|
-
title?: string;
|
|
13
12
|
style?: "default" | "none";
|
|
14
13
|
hardware?: Hardware;
|
|
15
14
|
clientId?: ClientIdSupplier;
|
|
16
15
|
onExit?: () => void;
|
|
16
|
+
noSideBar?: boolean;
|
|
17
|
+
noFullscreen?: boolean;
|
|
18
|
+
donate?: boolean;
|
|
17
19
|
}
|
|
18
20
|
export declare type DosPlayerFactoryType = (root: HTMLDivElement, options?: DosPlayerOptions) => DosPlayer;
|
|
19
21
|
export declare function DosPlayer(root: HTMLDivElement, options?: DosPlayerOptions): DosPlayer;
|
|
@@ -21,6 +21,13 @@
|
|
|
21
21
|
<body>
|
|
22
22
|
<div id="jsdos" />
|
|
23
23
|
<script>
|
|
24
|
+
let bundleUrl = "https://cdn.dos.zone/original/2X/2/24b00b14f118580763440ecaddcc948f8cb94f14.jsdos"; // digger
|
|
25
|
+
// bundleUrl = "https://cdn.dos.zone/original/2X/6/6a2bfa87c031c2a11ab212758a5d914f7c112eeb.jsdos"; // dagnerous dave 2
|
|
26
|
+
// bundleUrl = "https://cdn.dos.zone/original/2X/1/1b063b2520052ebb504184667ac95e72423331de.jsdos"; // lost vikings
|
|
27
|
+
// bundleUrl = "doom.jsdos";
|
|
28
|
+
// bundleUrl = "wolf.jsdos";
|
|
29
|
+
// bundleUrl = "heroes2.jsdos";
|
|
30
|
+
// bundleUrl = "https://doszone-uploads.s3.dualstack.eu-central-1.amazonaws.com/original/2X/6/60b165c86771eadf24cb2f81aef4656b85d167a6.jsdos";
|
|
24
31
|
let clientId = null;
|
|
25
32
|
emulators.pathPrefix = "/dist/";
|
|
26
33
|
Dos(document.getElementById("jsdos"), {
|
|
@@ -37,7 +44,7 @@
|
|
|
37
44
|
|
|
38
45
|
return Promise.resolve(clientId);
|
|
39
46
|
}
|
|
40
|
-
}).run(
|
|
47
|
+
}).run(bundleUrl);
|
|
41
48
|
</script>
|
|
42
49
|
</body>
|
|
43
50
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "js-dos",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.2.4",
|
|
4
4
|
"description": "Easiest API to run dos programs in browser",
|
|
5
5
|
"main": "dist/js-dos.js",
|
|
6
6
|
"types": "dist/types/src/player.d.ts",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dosbox"
|
|
22
22
|
],
|
|
23
23
|
"author": "Alexander Guryanov (aka caiiiycuk)",
|
|
24
|
-
"license": "
|
|
24
|
+
"license": "GPL-2.0",
|
|
25
25
|
"bugs": {
|
|
26
26
|
"url": "https://github.com/caiiiycuk/js-dos/issues"
|
|
27
27
|
},
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"core-js": "^3.17.1",
|
|
50
50
|
"del": "^5.1.0",
|
|
51
51
|
"emulators": "^0.72.0",
|
|
52
|
-
"emulators-ui": "^0.
|
|
52
|
+
"emulators-ui": "^0.72.4",
|
|
53
53
|
"eslint": "^7.32.0",
|
|
54
54
|
"eslint-config-google": "^0.14.0",
|
|
55
55
|
"gulp": "^4.0.2",
|