chatroom-app 1.0.2 → 1.0.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chatroom-app",
3
- "version": "1.0.2",
3
+ "version": "1.0.5",
4
4
  "type": "module",
5
5
  "main": "./dist/chatroom-app.cjs",
6
6
  "module": "./dist/chatroom-app.mjs",
@@ -30,7 +30,7 @@
30
30
  "autoprefixer": "^10.4.20",
31
31
  "dotenv": "^16.4.7",
32
32
  "https-proxy-agent": "^7.0.6",
33
- "lit-element": "^4.1.0",
33
+ "lit": "^2.7.0",
34
34
  "mqtt": "^5.10.3",
35
35
  "postcss": "^8.4.49",
36
36
  "tailwindcss": "^3.4.17",
package/dist/app.d.ts DELETED
@@ -1,27 +0,0 @@
1
- import { LitElement } from 'lit-element';
2
- import './components/main/main.component';
3
- import './components/message-box/message-box.component';
4
- import './components/dialog-box/dialog-box.component';
5
- export declare class ChatroomApp extends LitElement {
6
- static styles: import("lit-element").CSSResult;
7
- token: string;
8
- showMainContainer: boolean;
9
- static properties: {
10
- token: {
11
- type: StringConstructor;
12
- };
13
- showMainContainer: {
14
- type: BooleanConstructor;
15
- };
16
- };
17
- constructor();
18
- connectedCallback(): void;
19
- render(): import("lit-html").TemplateResult<1>;
20
- private _toggleMainContainer;
21
- firstUpdated(): void;
22
- }
23
- declare global {
24
- interface HTMLElementTagNameMap {
25
- 'chatroom-app': ChatroomApp;
26
- }
27
- }
@@ -1,18 +0,0 @@
1
- import { LitElement } from 'lit-element';
2
- import { Message } from '../../models/message.model';
3
- /**
4
- * dialog-box
5
- */
6
- export declare class DialogBoxComponent extends LitElement {
7
- static styles: import("lit-element").CSSResult;
8
- messages: Message[];
9
- topic: string;
10
- constructor();
11
- render(): import("lit-html").TemplateResult<1>;
12
- private _closeDialog;
13
- }
14
- declare global {
15
- interface HTMLElementTagNameMap {
16
- 'dialog-box': DialogBoxComponent;
17
- }
18
- }
@@ -1,6 +0,0 @@
1
- export declare class DialogBoxController {
2
- private model;
3
- constructor();
4
- setMessage(message: string): void;
5
- getMessage(): string;
6
- }
@@ -1,5 +0,0 @@
1
- export declare class DialogBoxModel {
2
- private message;
3
- setMessage(message: string): void;
4
- getMessage(): string;
5
- }
@@ -1,16 +0,0 @@
1
- import { MainModel } from './main.model';
2
- import MQTTService from '../../utils/mqtt-service';
3
- export declare class MainController {
4
- private clientId;
5
- private model;
6
- private mqttService?;
7
- private historyService?;
8
- getMqttService(): MQTTService | undefined;
9
- getMainModel(): MainModel;
10
- constructor(clientid: string);
11
- initMqtt(): void;
12
- sendMessage(message: string): void;
13
- getMessages(): string[];
14
- addMessage(message: string): void;
15
- getHistory(topic: string): import("../../models/message.model").Message[];
16
- }
@@ -1,5 +0,0 @@
1
- export declare class MainModel {
2
- private messages;
3
- addMessage(message: string): void;
4
- getMessages(): string[];
5
- }
@@ -1,17 +0,0 @@
1
- import { LitElement } from 'lit-element';
2
- /**
3
- * message-box
4
- */
5
- export declare class MessageBoxComponent extends LitElement {
6
- static styles: import("lit-element").CSSResult;
7
- private controller;
8
- clientId: string;
9
- constructor();
10
- render(): import("lit-html").TemplateResult<1>;
11
- private _sendMessage;
12
- }
13
- declare global {
14
- interface HTMLElementTagNameMap {
15
- 'message-box': MessageBoxComponent;
16
- }
17
- }
@@ -1,8 +0,0 @@
1
- import { MessageBoxModel } from './message-box.model';
2
- export declare class MessageBoxController {
3
- private model;
4
- getModel(): MessageBoxModel;
5
- constructor();
6
- updateMessage(message: string): void;
7
- getMessage(): string;
8
- }
@@ -1,5 +0,0 @@
1
- export declare class MessageBoxModel {
2
- private message;
3
- setMessage(message: string): void;
4
- getMessage(): string;
5
- }
@@ -1,6 +0,0 @@
1
- export interface Message {
2
- topic: string;
3
- username: string;
4
- message: string;
5
- timestamp: Date;
6
- }
@@ -1,6 +0,0 @@
1
- import { Message } from '../models/message.model';
2
- export declare class HistoryService {
3
- private history;
4
- constructor();
5
- getHistory(topic: string): Message[];
6
- }
@@ -1,5 +0,0 @@
1
- import { IClientOptions } from 'mqtt';
2
- export declare function generateMqttConfig(clientId: string): {
3
- brokerUrl: any;
4
- options: IClientOptions;
5
- };
@@ -1,9 +0,0 @@
1
- import { IClientOptions } from 'mqtt';
2
- declare class MQTTService {
3
- private client;
4
- constructor(brokerUrl: string, options?: IClientOptions);
5
- subscribe(topic: string, callback: (topic: string, message: Buffer) => void): void;
6
- publish(topic: string, message: string): void;
7
- disconnect(): void;
8
- }
9
- export default MQTTService;