@c2n/chatbot 0.0.6

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Nguyen Thai Vinh
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # Chatbot
2
+
3
+ // TODO
@@ -0,0 +1,40 @@
1
+ import { LitElement, html, unsafeCSS } from "lit";
2
+ import { customElement, property } from "lit/decorators.js";
3
+ import "@c2n/avatar";
4
+ //#region src/chatbot.scss?inline
5
+ var chatbot_default = "/* ex : var((width: 24px), width, c2-checkbox) returns var(--c2-checkbox-width, 24px) */\n:host {\n display: flex;\n --c2-avatar--width: 32px;\n --c2-avatar--height: 32px;\n --c2-avatar--font-size: 13px;\n}\n\n.c2-chatbot {\n display: flex;\n flex-direction: column;\n flex: 1;\n border-top: var(--c2-chatbot--border-top,1px solid rgb(177, 177, 177));\n border-bottom: var(--c2-chatbot--border-bottom,1px solid rgb(177, 177, 177));\n border-right: var(--c2-chatbot--border-right,1px solid rgb(177, 177, 177));\n border-left: var(--c2-chatbot--border-left,1px solid rgb(177, 177, 177));\n border-top-left-radius: var(--c2-chatbot--border-top-left-radius,8px);\n border-top-right-radius: var(--c2-chatbot--border-top-right-radius,8px);\n border-bottom-left-radius: var(--c2-chatbot--border-bottom-left-radius,8px);\n border-bottom-right-radius: var(--c2-chatbot--border-bottom-right-radius,8px);\n}\n.c2-chatbot .c2-chatbot__header-container {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: var(--c2-chatbot__header--padding,16px 16px);\n background: var(--c2-chatbot__header--background,rgb(248, 248, 248));\n border-top-left-radius: inherit;\n border-top-right-radius: inherit;\n border-bottom: var(--c2-chatbot__header--border-bottom,1px solid rgb(177, 177, 177));\n}";
6
+ //#endregion
7
+ //#region \0@oxc-project+runtime@0.148.0/helpers/esm/decorate.js
8
+ function __decorate(decorators, target, key, desc) {
9
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
10
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
11
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
12
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
13
+ }
14
+ //#endregion
15
+ //#region src/chatbot.ts
16
+ var Chatbot = class Chatbot extends LitElement {
17
+ constructor(..._args) {
18
+ super(..._args);
19
+ this.name = "Example property";
20
+ }
21
+ static {
22
+ this.styles = unsafeCSS(chatbot_default);
23
+ }
24
+ render() {
25
+ return html`
26
+ <div class="c2-chatbot">
27
+ <section class="c2-chatbot__header-container">
28
+ <c2-avatar name="Elisa Jasmin" initial-count="2"></c2-avatar>
29
+ <div>Elisa Jasmin</div>
30
+ </section>
31
+ <section class="c2-chatbot__message-container"></section>
32
+ <section class="c2-chatbot__input-container"></section>
33
+ </div>
34
+ `;
35
+ }
36
+ };
37
+ __decorate([property({ type: String })], Chatbot.prototype, "name", void 0);
38
+ Chatbot = __decorate([customElement("c2-chatbot")], Chatbot);
39
+ //#endregion
40
+ export { Chatbot };
package/package.json ADDED
@@ -0,0 +1,63 @@
1
+ {
2
+ "name": "@c2n/chatbot",
3
+ "version": "0.0.6",
4
+ "type": "module",
5
+ "main": "dist/chatbot.js",
6
+ "exports": {
7
+ ".": {
8
+ "default": "./dist/chatbot.js",
9
+ "types": "./types/src/chatbot.d.ts"
10
+ },
11
+ "./custom-elements.json": "./custom-elements.json"
12
+ },
13
+ "files": [
14
+ "dist",
15
+ "types"
16
+ ],
17
+ "keywords": [
18
+ "chatbot",
19
+ "web component",
20
+ "lit"
21
+ ],
22
+ "license": "MIT",
23
+ "author": "code2nguyen@gmail.com",
24
+ "publishConfig": {
25
+ "registry": "https://registry.npmjs.org",
26
+ "access": "public"
27
+ },
28
+ "repository": {
29
+ "type": "git",
30
+ "url": "https://github.com/code2nguyen/web-components.git"
31
+ },
32
+ "scripts": {
33
+ "dev": "vite",
34
+ "build": "wireit",
35
+ "build:only": "vite build",
36
+ "type-check": "wireit"
37
+ },
38
+ "wireit": {
39
+ "type-check": {
40
+ "dependencies": [
41
+ "../../packages/core:build",
42
+ "../../packages/components/avatar:build"
43
+ ],
44
+ "command": "tsc -p tsconfig.lib.json --composite false"
45
+ },
46
+ "build": {
47
+ "dependencies": [
48
+ "type-check"
49
+ ],
50
+ "command": "vite build"
51
+ }
52
+ },
53
+ "dependencies": {
54
+ "@c2n/avatar": "0.0.6",
55
+ "@c2n/core": "0.0.6",
56
+ "lit": "3.3.3"
57
+ },
58
+ "devDependencies": {
59
+ "@c2n/config": "*"
60
+ },
61
+ "customElements": "custom-elements.json",
62
+ "gitHead": "2921054bc75299da66dad11c1e374246ff88a51e"
63
+ }
@@ -0,0 +1,21 @@
1
+ import { LitElement } from 'lit';
2
+ import '@c2n/avatar';
3
+ /**
4
+ * @tag c2-chatbot
5
+ *
6
+ * @slot default - This is a default/unnamed slot
7
+ *
8
+ * @event
9
+ * @cssproperty
10
+ */
11
+ export declare class Chatbot extends LitElement {
12
+ static styles: import("lit").CSSResult;
13
+ name: string;
14
+ render(): import("lit-html").TemplateResult<1>;
15
+ }
16
+ declare global {
17
+ interface HTMLElementTagNameMap {
18
+ 'c2-chatbot': Chatbot;
19
+ }
20
+ }
21
+ //# sourceMappingURL=chatbot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chatbot.d.ts","sourceRoot":"","sources":["../../src/chatbot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAmB,MAAM,KAAK,CAAA;AAGjD,OAAO,aAAa,CAAA;AACpB;;;;;;;GAOG;AACH,qBACa,OAAQ,SAAQ,UAAU;IACrC,OAAgB,MAAM,0BAAoB;IAEd,IAAI,SAAqB;IAE5C,MAAM;CAYhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,OAAO,CAAA;KACtB;CACF"}