@super_studio/ecforce-ai-agent-react 1.1.1 → 1.1.2
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/ai-icon.mjs +8 -9
- package/dist/components/ai-icon.mjs.map +1 -1
- package/dist/components/chatbot-sheet.mjs +2 -2
- package/dist/components/chatbot-sheet.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/ai-icon.tsx +14 -11
- package/src/components/chatbot-sheet.tsx +1 -1
|
@@ -1,18 +1,17 @@
|
|
|
1
|
+
import { PROD_CHATBOT_URL } from "../lib/constants.mjs";
|
|
1
2
|
import { jsx } from "react/jsx-runtime";
|
|
2
3
|
|
|
3
4
|
//#region src/components/ai-icon.tsx
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
const AI_ICON_GIF_URL = new URL("/images/ai-icon.gif", PROD_CHATBOT_URL).toString();
|
|
6
|
+
function AiIcon({ width = 24, height = 24 }) {
|
|
7
|
+
return /* @__PURE__ */ jsx("img", {
|
|
8
|
+
src: AI_ICON_GIF_URL,
|
|
6
9
|
width,
|
|
7
10
|
height,
|
|
8
|
-
|
|
9
|
-
fill: "currentColor",
|
|
11
|
+
alt: "",
|
|
10
12
|
"aria-hidden": "true",
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
clipRule: "evenodd",
|
|
14
|
-
d: "M9.2 13.704s3.7-.812 4.325-3.74c.624-2.93.76-3.364 1.112-3.364.352 0 .42.309.5.618.08.309.51 2.276.613 2.745.102.47.783 2.93 3.712 3.616 2.93.686 3.338.697 3.338 1.12 0 .459-2.361.859-3.338 1.122-.976.263-3.042 1.007-3.587 3.49-.534 2.482-.681 3.489-1.238 3.489-.556 0-.545-.584-.613-.87-.068-.286-.34-1.819-.5-2.494-.147-.675-1.044-2.837-2.962-3.363-1.93-.527-3.962-.847-3.962-1.373s2.134-.824 2.6-.995ZM2.462 4.613s1.785-.39 2.08-1.798c.296-1.409.365-1.615.535-1.615.17 0 .205.149.239.298s.25 1.088.296 1.317c.045.229.375 1.409 1.785 1.74 1.41.333 1.603.333 1.603.54 0 .217-1.137.412-1.603.538-.466.126-1.467.48-1.729 1.683C5.407 8.507 5.338 9 5.078 9c-.262 0-.262-.286-.296-.424-.035-.137-.16-.882-.24-1.202-.079-.321-.5-1.363-1.432-1.615-.932-.252-1.91-.413-1.91-.665 0-.252 1.023-.4 1.25-.48h.012Z"
|
|
15
|
-
})
|
|
13
|
+
draggable: false,
|
|
14
|
+
style: { display: "block" }
|
|
16
15
|
});
|
|
17
16
|
}
|
|
18
17
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-icon.mjs","names":[],"sources":["../../src/components/ai-icon.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"ai-icon.mjs","names":[],"sources":["../../src/components/ai-icon.tsx"],"sourcesContent":["import { PROD_CHATBOT_URL } from \"../lib/constants\";\n\ntype AiIconProps = {\n width?: number;\n height?: number;\n};\n\nconst AI_ICON_GIF_URL = new URL(\n \"/images/ai-icon.gif\",\n PROD_CHATBOT_URL,\n).toString();\n\nexport function AiIcon({ width = 24, height = 24 }: AiIconProps) {\n return (\n <img\n src={AI_ICON_GIF_URL}\n width={width}\n height={height}\n alt=\"\"\n aria-hidden=\"true\"\n draggable={false}\n style={{ display: \"block\" }}\n />\n );\n}\n"],"mappings":";;;;AAOA,MAAM,kBAAkB,IAAI,IAC1B,uBACA,iBACD,CAAC,UAAU;AAEZ,SAAgB,OAAO,EAAE,QAAQ,IAAI,SAAS,MAAmB;AAC/D,QACE,oBAAC;EACC,KAAK;EACE;EACC;EACR,KAAI;EACJ,eAAY;EACZ,WAAW;EACX,OAAO,EAAE,SAAS,SAAS;GAC3B"}
|
|
@@ -18,8 +18,8 @@ function ChatbotSheet(_ref) {
|
|
|
18
18
|
align: "end",
|
|
19
19
|
content: "AIに質問してみましょう",
|
|
20
20
|
trigger: /* @__PURE__ */ jsx(SheetTrigger, { children: /* @__PURE__ */ jsx(AiIcon, {
|
|
21
|
-
width:
|
|
22
|
-
height:
|
|
21
|
+
width: 24,
|
|
22
|
+
height: 24
|
|
23
23
|
}) })
|
|
24
24
|
}), /* @__PURE__ */ jsxs(SheetContent, {
|
|
25
25
|
style: sheetStyle,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chatbot-sheet.mjs","names":[],"sources":["../../src/components/chatbot-sheet.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { AiIcon } from \"./ai-icon\";\nimport { ChatbotFrame, type ChatbotFrameProps } from \"./chatbot-frame\";\nimport {\n Sheet,\n SheetContent,\n SheetDescription,\n SheetTitle,\n SheetTrigger,\n} from \"./sheet\";\nimport { Tooltip } from \"./tooltip\";\n\ntype ChatbotSheetProps = ChatbotFrameProps & {\n sheetStyle?: React.CSSProperties;\n};\n\nexport function ChatbotSheet({ sheetStyle, ...props }: ChatbotSheetProps) {\n return (\n <Sheet>\n <Tooltip\n side=\"top\"\n align=\"end\"\n content=\"AIに質問してみましょう\"\n trigger={\n <SheetTrigger>\n <AiIcon width={
|
|
1
|
+
{"version":3,"file":"chatbot-sheet.mjs","names":[],"sources":["../../src/components/chatbot-sheet.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { AiIcon } from \"./ai-icon\";\nimport { ChatbotFrame, type ChatbotFrameProps } from \"./chatbot-frame\";\nimport {\n Sheet,\n SheetContent,\n SheetDescription,\n SheetTitle,\n SheetTrigger,\n} from \"./sheet\";\nimport { Tooltip } from \"./tooltip\";\n\ntype ChatbotSheetProps = ChatbotFrameProps & {\n sheetStyle?: React.CSSProperties;\n};\n\nexport function ChatbotSheet({ sheetStyle, ...props }: ChatbotSheetProps) {\n return (\n <Sheet>\n <Tooltip\n side=\"top\"\n align=\"end\"\n content=\"AIに質問してみましょう\"\n trigger={\n <SheetTrigger>\n <AiIcon width={24} height={24} />\n </SheetTrigger>\n }\n />\n <SheetContent style={sheetStyle}>\n <SheetTitle>AIに質問してみましょう</SheetTitle>\n <SheetDescription>AIに質問してみましょう</SheetDescription>\n <ChatbotFrame {...props} />\n </SheetContent>\n </Sheet>\n );\n}\n"],"mappings":";;;;;;;;;;;;mBAkB+B;AAA/B,SAAgB,aAAa,MAA6C;KAA7C,EAAE,qBAAe;AAC5C,QACE,qBAAC,oBACC,oBAAC;EACC,MAAK;EACL,OAAM;EACN,SAAQ;EACR,SACE,oBAAC,0BACC,oBAAC;GAAO,OAAO;GAAI,QAAQ;IAAM,GACpB;GAEjB,EACF,qBAAC;EAAa,OAAO;;GACnB,oBAAC,wBAAW,iBAAyB;GACrC,oBAAC,8BAAiB,iBAA+B;GACjD,oBAAC,iCAAiB,OAAS;;GACd,IACT"}
|
package/package.json
CHANGED
|
@@ -1,22 +1,25 @@
|
|
|
1
|
+
import { PROD_CHATBOT_URL } from "../lib/constants";
|
|
2
|
+
|
|
1
3
|
type AiIconProps = {
|
|
2
4
|
width?: number;
|
|
3
5
|
height?: number;
|
|
4
6
|
};
|
|
5
7
|
|
|
6
|
-
|
|
8
|
+
const AI_ICON_GIF_URL = new URL(
|
|
9
|
+
"/images/ai-icon.gif",
|
|
10
|
+
PROD_CHATBOT_URL,
|
|
11
|
+
).toString();
|
|
12
|
+
|
|
13
|
+
export function AiIcon({ width = 24, height = 24 }: AiIconProps) {
|
|
7
14
|
return (
|
|
8
|
-
<
|
|
15
|
+
<img
|
|
16
|
+
src={AI_ICON_GIF_URL}
|
|
9
17
|
width={width}
|
|
10
18
|
height={height}
|
|
11
|
-
|
|
12
|
-
fill="currentColor"
|
|
19
|
+
alt=""
|
|
13
20
|
aria-hidden="true"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
clipRule="evenodd"
|
|
18
|
-
d="M9.2 13.704s3.7-.812 4.325-3.74c.624-2.93.76-3.364 1.112-3.364.352 0 .42.309.5.618.08.309.51 2.276.613 2.745.102.47.783 2.93 3.712 3.616 2.93.686 3.338.697 3.338 1.12 0 .459-2.361.859-3.338 1.122-.976.263-3.042 1.007-3.587 3.49-.534 2.482-.681 3.489-1.238 3.489-.556 0-.545-.584-.613-.87-.068-.286-.34-1.819-.5-2.494-.147-.675-1.044-2.837-2.962-3.363-1.93-.527-3.962-.847-3.962-1.373s2.134-.824 2.6-.995ZM2.462 4.613s1.785-.39 2.08-1.798c.296-1.409.365-1.615.535-1.615.17 0 .205.149.239.298s.25 1.088.296 1.317c.045.229.375 1.409 1.785 1.74 1.41.333 1.603.333 1.603.54 0 .217-1.137.412-1.603.538-.466.126-1.467.48-1.729 1.683C5.407 8.507 5.338 9 5.078 9c-.262 0-.262-.286-.296-.424-.035-.137-.16-.882-.24-1.202-.079-.321-.5-1.363-1.432-1.615-.932-.252-1.91-.413-1.91-.665 0-.252 1.023-.4 1.25-.48h.012Z"
|
|
19
|
-
/>
|
|
20
|
-
</svg>
|
|
21
|
+
draggable={false}
|
|
22
|
+
style={{ display: "block" }}
|
|
23
|
+
/>
|
|
21
24
|
);
|
|
22
25
|
}
|