@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.
@@ -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
- import { gameState } from "./stores/stateStore.js";
11
- export { KBase };
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
- import { gameState } from "./stores/stateStore.js";
12
- export { KBase }; // Compoenents
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
@@ -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
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo2555/koppeliajs",
3
- "version": "0.0.117",
3
+ "version": "0.0.118",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run package",