@momo2555/koppeliajs 0.0.117 → 0.0.118
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/dist/components/Button.svelte +29 -0
- package/dist/components/Button.svelte.d.ts +21 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/scripts/state.js +1 -3
- package/package.json +1 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
export let text: String;
|
|
3
|
+
export let callback: () => void;
|
|
4
|
+
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<div class="button" on:click={callback}>
|
|
8
|
+
<p class="luciole">
|
|
9
|
+
{text}
|
|
10
|
+
</p>
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
<style>
|
|
14
|
+
.button {
|
|
15
|
+
background-color: #245bec;
|
|
16
|
+
display: flex;
|
|
17
|
+
padding: 15px;
|
|
18
|
+
border-radius: 28px;
|
|
19
|
+
margin: 10px;
|
|
20
|
+
z-index: 1;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.button p {
|
|
24
|
+
color: white;
|
|
25
|
+
margin: auto;
|
|
26
|
+
padding: 0;
|
|
27
|
+
font-size: 22px;
|
|
28
|
+
}
|
|
29
|
+
</style>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
+
$$bindings?: Bindings;
|
|
4
|
+
} & Exports;
|
|
5
|
+
(internal: unknown, props: Props & {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
11
|
+
};
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
13
|
+
}
|
|
14
|
+
declare const Button: $$__sveltets_2_IsomorphicComponent<{
|
|
15
|
+
text: String;
|
|
16
|
+
callback: () => void;
|
|
17
|
+
}, {
|
|
18
|
+
[evt: string]: CustomEvent<any>;
|
|
19
|
+
}, {}, {}, string>;
|
|
20
|
+
type Button = InstanceType<typeof Button>;
|
|
21
|
+
export default Button;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "./styles/fonts.css";
|
|
2
2
|
import KBase from "./components/KBase.svelte";
|
|
3
3
|
import GrowableElement from "./components/GrowableElement.svelte";
|
|
4
|
+
import Button from "./components/Button.svelte";
|
|
4
5
|
import { Koppelia } from "./scripts/koppelia.js";
|
|
5
6
|
import { Console } from "./scripts/console.js";
|
|
6
7
|
import { Message } from "./scripts/message.js";
|
|
7
8
|
import { Device } from "./scripts/device.js";
|
|
8
9
|
import { Play } from "./scripts/play.js";
|
|
9
10
|
import { updateRoute, routeType } from './stores/routeStore.js';
|
|
10
|
-
|
|
11
|
-
export {
|
|
12
|
-
export { updateRoute, routeType, Koppelia, Console, Message, Device, gameState, Play, GrowableElement };
|
|
11
|
+
export { KBase, GrowableElement, Button };
|
|
12
|
+
export { updateRoute, routeType, Koppelia, Console, Message, Device, Play };
|
package/dist/index.js
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import "./styles/fonts.css";
|
|
3
3
|
import KBase from "./components/KBase.svelte";
|
|
4
4
|
import GrowableElement from "./components/GrowableElement.svelte";
|
|
5
|
+
import Button from "./components/Button.svelte";
|
|
5
6
|
import { Koppelia } from "./scripts/koppelia.js";
|
|
6
7
|
import { Console } from "./scripts/console.js";
|
|
7
8
|
import { Message } from "./scripts/message.js";
|
|
8
9
|
import { Device } from "./scripts/device.js";
|
|
9
10
|
import { Play } from "./scripts/play.js";
|
|
10
11
|
import { updateRoute, routeType } from './stores/routeStore.js';
|
|
11
|
-
|
|
12
|
-
export {
|
|
13
|
-
export { updateRoute, routeType, Koppelia, Console, Message, Device, gameState, Play, GrowableElement }; // libraries and stores
|
|
12
|
+
export { KBase, GrowableElement, Button }; // Compoenents
|
|
13
|
+
export { updateRoute, routeType, Koppelia, Console, Message, Device, Play }; // libraries and stores
|
package/dist/scripts/state.js
CHANGED
|
@@ -34,8 +34,7 @@ export class State {
|
|
|
34
34
|
* @param newState
|
|
35
35
|
*/
|
|
36
36
|
setState(newState, force = false) {
|
|
37
|
-
this._forceState = force;
|
|
38
|
-
console.log("force from setstate = ", force);
|
|
37
|
+
this._forceState = force; // if force to true -> force the state to be sent entirely instead of sending an update
|
|
39
38
|
this._globalState.set(newState);
|
|
40
39
|
}
|
|
41
40
|
/**
|
|
@@ -87,7 +86,6 @@ export class State {
|
|
|
87
86
|
req.setRequest("changeState");
|
|
88
87
|
req.addParam("state", update);
|
|
89
88
|
req.addParam("update", !this._forceState);
|
|
90
|
-
console.log("force from subscriber = ", this._forceState);
|
|
91
89
|
this._forceState = false;
|
|
92
90
|
this._console.sendMessage(req);
|
|
93
91
|
});
|