@c2n/chatbot 0.0.6 → 0.0.7

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/chatbot.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { LitElement, html, unsafeCSS } from "lit";
2
- import { customElement, property } from "lit/decorators.js";
2
+ import { property } from "lit/decorators.js";
3
+ import { customElement } from "@c2n/core/element-helper.js";
3
4
  import "@c2n/avatar";
4
5
  //#region src/chatbot.scss?inline
5
6
  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}";
package/package.json CHANGED
@@ -1,18 +1,30 @@
1
1
  {
2
2
  "name": "@c2n/chatbot",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "type": "module",
5
5
  "main": "dist/chatbot.js",
6
6
  "exports": {
7
7
  ".": {
8
- "default": "./dist/chatbot.js",
9
- "types": "./types/src/chatbot.d.ts"
8
+ "types": "./types/src/chatbot.d.ts",
9
+ "default": "./dist/chatbot.js"
10
+ },
11
+ "./react": {
12
+ "types": "./react.d.ts",
13
+ "default": "./react.js"
14
+ },
15
+ "./vue": {
16
+ "types": "./vue.d.ts",
17
+ "default": "./vue.js"
10
18
  },
11
19
  "./custom-elements.json": "./custom-elements.json"
12
20
  },
13
21
  "files": [
14
22
  "dist",
15
- "types"
23
+ "types",
24
+ "react.d.ts",
25
+ "react.js",
26
+ "vue.d.ts",
27
+ "vue.js"
16
28
  ],
17
29
  "keywords": [
18
30
  "chatbot",
@@ -51,13 +63,13 @@
51
63
  }
52
64
  },
53
65
  "dependencies": {
54
- "@c2n/avatar": "0.0.6",
55
- "@c2n/core": "0.0.6",
66
+ "@c2n/avatar": "0.0.7",
67
+ "@c2n/core": "0.0.7",
56
68
  "lit": "3.3.3"
57
69
  },
58
70
  "devDependencies": {
59
71
  "@c2n/config": "*"
60
72
  },
61
73
  "customElements": "custom-elements.json",
62
- "gitHead": "2921054bc75299da66dad11c1e374246ff88a51e"
74
+ "gitHead": "c8db398a27f7cd417d665fdf5da455fee2d4e910"
63
75
  }
package/react.d.ts ADDED
@@ -0,0 +1,24 @@
1
+ // GENERATED by @c2n/framework-types. Do not edit by hand.
2
+ //
3
+ // JSX types for the custom elements of @c2n/chatbot. Import once, anywhere in the program:
4
+ //
5
+ // import '@c2n/chatbot/react'
6
+ //
7
+ // Register the elements at module scope before React renders, or React writes an object prop as an
8
+ // attribute and it stringifies.
9
+
10
+ import type { DetailedHTMLProps, HTMLAttributes } from 'react'
11
+ import type { Chatbot } from '@c2n/chatbot'
12
+
13
+ /** Standard React host-element attributes plus the element's own public properties. */
14
+ type C2Props<T> = DetailedHTMLProps<HTMLAttributes<T>, T> & Partial<Omit<T, keyof HTMLElement>>
15
+
16
+ declare module 'react' {
17
+ namespace JSX {
18
+ interface IntrinsicElements {
19
+ 'c2-chatbot': C2Props<Chatbot>
20
+ }
21
+ }
22
+ }
23
+
24
+ export {}
package/react.js ADDED
@@ -0,0 +1,3 @@
1
+ // GENERATED by @c2n/framework-types. Do not edit by hand.
2
+ // Types only — see the matching .d.ts.
3
+ export {}
@@ -1,15 +1,15 @@
1
1
  import { LitElement } from 'lit';
2
2
  import '@c2n/avatar';
3
3
  /**
4
- * @tag c2-chatbot
4
+ * Minimal chatbot shell that greets a named user and renders application-provided conversation content.
5
5
  *
6
- * @slot default - This is a default/unnamed slot
6
+ * @tag c2-chatbot
7
7
  *
8
- * @event
9
- * @cssproperty
8
+ * @slot default - Conversation content rendered inside the chatbot shell.
10
9
  */
11
10
  export declare class Chatbot extends LitElement {
12
11
  static styles: import("lit").CSSResult;
12
+ /** Name included in the chatbot greeting. */
13
13
  name: string;
14
14
  render(): import("lit-html").TemplateResult<1>;
15
15
  }
@@ -1 +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"}
1
+ {"version":3,"file":"chatbot.d.ts","sourceRoot":"","sources":["../../src/chatbot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAmB,MAAM,KAAK,CAAA;AAIjD,OAAO,aAAa,CAAA;AACpB;;;;;;GAMG;AACH,qBACa,OAAQ,SAAQ,UAAU;IACrC,OAAgB,MAAM,0BAAoB;IAE1C,6CAA6C;IACjB,IAAI,SAAqB;IAE5C,MAAM;CAYhB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,OAAO,CAAA;KACtB;CACF"}
package/vue.d.ts ADDED
@@ -0,0 +1,29 @@
1
+ // GENERATED by @c2n/framework-types. Do not edit by hand.
2
+ //
3
+ // Vue template types for the custom elements of @c2n/chatbot. Import once, anywhere in the program:
4
+ //
5
+ // import '@c2n/chatbot/vue'
6
+ //
7
+ // Tell the compiler about the tags as well, or every c2-* tag is resolved as a Vue component and renders
8
+ // nothing: template.compilerOptions.isCustomElement = (tag) => tag.startsWith('c2-') in vite.config.ts.
9
+
10
+ import type { DefineComponent, HTMLAttributes } from 'vue'
11
+ import type { Chatbot } from '@c2n/chatbot'
12
+
13
+ /** The element's own public properties, plus every attribute Vue understands on a host element. */
14
+ type C2Props<T> = Partial<Omit<T, keyof HTMLElement>> & HTMLAttributes
15
+
16
+ declare module 'vue' {
17
+ interface GlobalComponents {
18
+ 'c2-chatbot': DefineComponent<C2Props<Chatbot>>
19
+ }
20
+ }
21
+
22
+ declare module '@vue/runtime-dom' {
23
+ interface HTMLAttributes {
24
+ /** Vue's own definition omits it, and slotting a plain element into a component needs it. */
25
+ slot?: string
26
+ }
27
+ }
28
+
29
+ export {}
package/vue.js ADDED
@@ -0,0 +1,3 @@
1
+ // GENERATED by @c2n/framework-types. Do not edit by hand.
2
+ // Types only — see the matching .d.ts.
3
+ export {}