@aizu-chat/react 0.0.6 → 0.0.8

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.
Files changed (145) hide show
  1. package/dist/chunk-27KHUFCW.mjs +826 -0
  2. package/dist/chunk-2E7KQQED.mjs +816 -0
  3. package/dist/chunk-2PRXGXTN.mjs +826 -0
  4. package/dist/chunk-2UZJYWLD.mjs +49 -0
  5. package/dist/chunk-2ZNJT52V.mjs +814 -0
  6. package/dist/chunk-34B6VEJC.mjs +677 -0
  7. package/dist/chunk-35JN2QFA.mjs +784 -0
  8. package/dist/chunk-3FHGECHR.mjs +829 -0
  9. package/dist/chunk-3IU2OVAG.mjs +780 -0
  10. package/dist/chunk-3QKHSOJ4.mjs +728 -0
  11. package/dist/chunk-3XKU4RH2.mjs +814 -0
  12. package/dist/chunk-432NOVMD.mjs +822 -0
  13. package/dist/chunk-4KUZUKKS.mjs +776 -0
  14. package/dist/chunk-4UO5EJ54.mjs +826 -0
  15. package/dist/chunk-66DXSMQL.mjs +826 -0
  16. package/dist/chunk-6IIUDDOD.mjs +775 -0
  17. package/dist/chunk-6LVL2AO4.mjs +660 -0
  18. package/dist/chunk-6OMCLP7J.mjs +727 -0
  19. package/dist/chunk-6SYZLU5L.mjs +782 -0
  20. package/dist/chunk-6XLUHLNW.mjs +826 -0
  21. package/dist/chunk-6Z4U3TJM.mjs +728 -0
  22. package/dist/chunk-6ZNP2727.mjs +686 -0
  23. package/dist/chunk-75Q3MZEF.mjs +52 -0
  24. package/dist/chunk-A4YWLH3K.mjs +751 -0
  25. package/dist/chunk-AT5CG6CS.mjs +53 -0
  26. package/dist/chunk-B4CPQFKO.mjs +826 -0
  27. package/dist/chunk-BH52V6JW.mjs +776 -0
  28. package/dist/chunk-BYPRKP6J.mjs +782 -0
  29. package/dist/chunk-BZVP32PP.mjs +826 -0
  30. package/dist/chunk-C6T755JT.mjs +780 -0
  31. package/dist/chunk-CCFEXIKG.mjs +815 -0
  32. package/dist/chunk-CTYW4VK4.mjs +815 -0
  33. package/dist/chunk-D2UMLUGP.mjs +685 -0
  34. package/dist/chunk-D4DQP4GI.mjs +817 -0
  35. package/dist/chunk-DIBJNQPT.mjs +782 -0
  36. package/dist/chunk-DJQK65LJ.mjs +822 -0
  37. package/dist/chunk-DLQEX6QS.mjs +661 -0
  38. package/dist/chunk-EADN4TWS.mjs +819 -0
  39. package/dist/chunk-EAW7EHJI.mjs +826 -0
  40. package/dist/chunk-EBU5NLRJ.mjs +661 -0
  41. package/dist/chunk-EDBTUKCC.mjs +738 -0
  42. package/dist/chunk-EHQQJPCV.mjs +53 -0
  43. package/dist/chunk-EKELJTME.mjs +674 -0
  44. package/dist/chunk-ELAN3AIY.mjs +784 -0
  45. package/dist/chunk-EWW3DF5X.mjs +814 -0
  46. package/dist/chunk-EXJ5M326.mjs +826 -0
  47. package/dist/chunk-F3DEI4YK.mjs +682 -0
  48. package/dist/chunk-FBJJFSCR.mjs +778 -0
  49. package/dist/chunk-G7M72PUZ.mjs +776 -0
  50. package/dist/chunk-GFVIBK25.mjs +673 -0
  51. package/dist/chunk-GYZ6ICY2.mjs +685 -0
  52. package/dist/chunk-H733EISO.mjs +826 -0
  53. package/dist/chunk-H7C7VETZ.mjs +776 -0
  54. package/dist/chunk-HD2IHWNW.mjs +776 -0
  55. package/dist/chunk-HKAXD2CX.mjs +776 -0
  56. package/dist/chunk-HLRWI4YU.mjs +778 -0
  57. package/dist/chunk-HNPNRGTG.mjs +686 -0
  58. package/dist/chunk-HQYDHSWS.mjs +678 -0
  59. package/dist/chunk-HVPJAO66.mjs +654 -0
  60. package/dist/chunk-I36Q4NZE.mjs +675 -0
  61. package/dist/chunk-ICOCFEPA.mjs +776 -0
  62. package/dist/chunk-IMM7TFAT.mjs +685 -0
  63. package/dist/chunk-J5OEYYWK.mjs +728 -0
  64. package/dist/chunk-JDR62NUF.mjs +729 -0
  65. package/dist/chunk-JEOWW4D7.mjs +49 -0
  66. package/dist/chunk-JIAD2PHZ.mjs +779 -0
  67. package/dist/chunk-JMHZ4OMV.mjs +814 -0
  68. package/dist/chunk-JUYVQ5F6.mjs +673 -0
  69. package/dist/chunk-K2EPLJ4A.mjs +728 -0
  70. package/dist/chunk-K2WK46MB.mjs +776 -0
  71. package/dist/chunk-KM4P2EHL.mjs +729 -0
  72. package/dist/chunk-KR4PTVQ4.mjs +779 -0
  73. package/dist/chunk-KUHNPG4Q.mjs +796 -0
  74. package/dist/chunk-KXFNNAMR.mjs +814 -0
  75. package/dist/chunk-LEZIDZXE.mjs +831 -0
  76. package/dist/chunk-LMFIKGQM.mjs +782 -0
  77. package/dist/chunk-LT43AVHN.mjs +780 -0
  78. package/dist/chunk-MBHPFGVB.mjs +782 -0
  79. package/dist/chunk-MDMZAAPV.mjs +685 -0
  80. package/dist/chunk-MFFRGYEX.mjs +728 -0
  81. package/dist/chunk-O3U6ONKJ.mjs +677 -0
  82. package/dist/chunk-OEPSB4XZ.mjs +686 -0
  83. package/dist/chunk-OJ5M55LN.mjs +660 -0
  84. package/dist/chunk-OSHAWBTV.mjs +800 -0
  85. package/dist/chunk-OVDFBN6H.mjs +800 -0
  86. package/dist/chunk-OWFM4DXQ.mjs +686 -0
  87. package/dist/chunk-P4FEBZ5I.mjs +829 -0
  88. package/dist/chunk-QBXYSNTR.mjs +675 -0
  89. package/dist/chunk-QDS6QW7Y.mjs +738 -0
  90. package/dist/chunk-QN5L3XNN.mjs +830 -0
  91. package/dist/chunk-QOK4APM5.mjs +728 -0
  92. package/dist/chunk-QR37WSLB.mjs +826 -0
  93. package/dist/chunk-QS7TKK6W.mjs +685 -0
  94. package/dist/chunk-QTL5KRV3.mjs +686 -0
  95. package/dist/chunk-QV2LQKNI.mjs +686 -0
  96. package/dist/chunk-QV74GE66.mjs +778 -0
  97. package/dist/chunk-R3NQ7SPU.mjs +780 -0
  98. package/dist/chunk-R3Z7JF73.mjs +673 -0
  99. package/dist/chunk-S63OOCED.mjs +781 -0
  100. package/dist/chunk-SJJDDFKI.mjs +830 -0
  101. package/dist/chunk-SLS4OSOJ.mjs +826 -0
  102. package/dist/chunk-SRFLVMCW.mjs +685 -0
  103. package/dist/chunk-SUOZPZBK.mjs +826 -0
  104. package/dist/chunk-TBBN7SM4.mjs +660 -0
  105. package/dist/chunk-TLJKLZBR.mjs +734 -0
  106. package/dist/chunk-U4ODVQIJ.mjs +728 -0
  107. package/dist/chunk-UA2YL34U.mjs +782 -0
  108. package/dist/chunk-UOQWXJXH.mjs +779 -0
  109. package/dist/chunk-UYBDUWOL.mjs +776 -0
  110. package/dist/chunk-UZD3IED4.mjs +676 -0
  111. package/dist/chunk-V2YCL6RC.mjs +798 -0
  112. package/dist/chunk-V5ROKX6T.mjs +779 -0
  113. package/dist/chunk-VBZLGI7W.mjs +819 -0
  114. package/dist/chunk-VEAZMIG4.mjs +830 -0
  115. package/dist/chunk-VMG4TRFB.mjs +750 -0
  116. package/dist/chunk-VOLA2PFJ.mjs +676 -0
  117. package/dist/chunk-VTBZU2XN.mjs +826 -0
  118. package/dist/chunk-WC37DM4U.mjs +816 -0
  119. package/dist/chunk-WDLA4JJY.mjs +778 -0
  120. package/dist/chunk-WQ6BKSTC.mjs +815 -0
  121. package/dist/chunk-WXSNIINA.mjs +778 -0
  122. package/dist/chunk-WYBPKSFQ.mjs +816 -0
  123. package/dist/chunk-XFRN7OPZ.mjs +686 -0
  124. package/dist/chunk-XLRF64SW.mjs +53 -0
  125. package/dist/chunk-YLNMIJBD.mjs +728 -0
  126. package/dist/chunk-YUGESFKI.mjs +819 -0
  127. package/dist/chunk-YVDMWPWQ.mjs +776 -0
  128. package/dist/chunk-Z6L7TEVJ.mjs +828 -0
  129. package/dist/chunk-Z72DRRM6.mjs +829 -0
  130. package/dist/chunk-ZXF3RMZZ.mjs +685 -0
  131. package/dist/components.d.mts +12 -2
  132. package/dist/components.d.ts +12 -2
  133. package/dist/components.js +229 -61
  134. package/dist/components.mjs +5 -3
  135. package/dist/index.d.mts +2 -1
  136. package/dist/index.d.ts +2 -1
  137. package/dist/index.js +273 -61
  138. package/dist/index.mjs +10 -2
  139. package/dist/sdk.d.mts +39 -0
  140. package/dist/sdk.d.ts +39 -0
  141. package/dist/sdk.js +121 -0
  142. package/dist/sdk.mjs +10 -0
  143. package/package.json +1 -1
  144. package/dist/chunk-R4SQBMHN.mjs +0 -55
  145. /package/dist/{chunk-5HB6SA7W.mjs → chunk-4FW2X356.mjs} +0 -0
package/dist/sdk.js ADDED
@@ -0,0 +1,121 @@
1
+ 'use client'
2
+ "use strict";
3
+ var __defProp = Object.defineProperty;
4
+ var __defProps = Object.defineProperties;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
+ var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
11
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
12
+ var __spreadValues = (a, b) => {
13
+ for (var prop in b || (b = {}))
14
+ if (__hasOwnProp.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ if (__getOwnPropSymbols)
17
+ for (var prop of __getOwnPropSymbols(b)) {
18
+ if (__propIsEnum.call(b, prop))
19
+ __defNormalProp(a, prop, b[prop]);
20
+ }
21
+ return a;
22
+ };
23
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
24
+ var __objRest = (source, exclude) => {
25
+ var target = {};
26
+ for (var prop in source)
27
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
28
+ target[prop] = source[prop];
29
+ if (source != null && __getOwnPropSymbols)
30
+ for (var prop of __getOwnPropSymbols(source)) {
31
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
32
+ target[prop] = source[prop];
33
+ }
34
+ return target;
35
+ };
36
+ var __export = (target, all) => {
37
+ for (var name in all)
38
+ __defProp(target, name, { get: all[name], enumerable: true });
39
+ };
40
+ var __copyProps = (to, from, except, desc) => {
41
+ if (from && typeof from === "object" || typeof from === "function") {
42
+ for (let key of __getOwnPropNames(from))
43
+ if (!__hasOwnProp.call(to, key) && key !== except)
44
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
45
+ }
46
+ return to;
47
+ };
48
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
49
+ var __async = (__this, __arguments, generator) => {
50
+ return new Promise((resolve, reject) => {
51
+ var fulfilled = (value) => {
52
+ try {
53
+ step(generator.next(value));
54
+ } catch (e) {
55
+ reject(e);
56
+ }
57
+ };
58
+ var rejected = (value) => {
59
+ try {
60
+ step(generator.throw(value));
61
+ } catch (e) {
62
+ reject(e);
63
+ }
64
+ };
65
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
66
+ step((generator = generator.apply(__this, __arguments)).next());
67
+ });
68
+ };
69
+
70
+ // src/sdk/index.ts
71
+ var sdk_exports = {};
72
+ __export(sdk_exports, {
73
+ AizuClient: () => AizuClient,
74
+ createAizuClient: () => createAizuClient
75
+ });
76
+ module.exports = __toCommonJS(sdk_exports);
77
+
78
+ // src/sdk/client.ts
79
+ var AizuClient = class {
80
+ constructor(config) {
81
+ this.hostUrl = config.hostUrl;
82
+ this.apiKey = config.apiKey;
83
+ }
84
+ request(_0) {
85
+ return __async(this, arguments, function* (path, options = {}) {
86
+ const url = `${this.hostUrl}${path}`;
87
+ const _a = options, { body } = _a, restOptions = __objRest(_a, ["body"]);
88
+ const response = yield fetch(url, __spreadProps(__spreadValues({}, restOptions), {
89
+ headers: __spreadValues({
90
+ "Content-Type": "application/json",
91
+ "x-api-key": this.apiKey
92
+ }, options.headers),
93
+ body: body ? JSON.stringify(body) : void 0
94
+ }));
95
+ if (!response.ok) {
96
+ throw new Error(`API Error: ${response.statusText}`);
97
+ }
98
+ return yield response.json();
99
+ });
100
+ }
101
+ chat(params) {
102
+ return __async(this, null, function* () {
103
+ return this.request("/chat/query", {
104
+ method: "POST",
105
+ body: params
106
+ });
107
+ });
108
+ }
109
+ };
110
+ var createAizuClient = ({
111
+ hostUrl,
112
+ apiKey,
113
+ options
114
+ }) => {
115
+ return new AizuClient(__spreadValues({ hostUrl, apiKey }, options));
116
+ };
117
+ // Annotate the CommonJS export names for ESM import in node:
118
+ 0 && (module.exports = {
119
+ AizuClient,
120
+ createAizuClient
121
+ });
package/dist/sdk.mjs ADDED
@@ -0,0 +1,10 @@
1
+ 'use client'
2
+ import {
3
+ AizuClient,
4
+ createAizuClient
5
+ } from "./chunk-75Q3MZEF.mjs";
6
+ import "./chunk-33CPD3DF.mjs";
7
+ export {
8
+ AizuClient,
9
+ createAizuClient
10
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aizu-chat/react",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "sideEffects": ["*.css", "dist/**/*.css"],
5
5
  "license": "MIT",
6
6
  "files": ["dist"],
@@ -1,55 +0,0 @@
1
- 'use client'
2
-
3
- // #style-inject:#style-inject
4
- function styleInject(css, { insertAt } = {}) {
5
- if (!css || typeof document === "undefined") return;
6
- const head = document.head || document.getElementsByTagName("head")[0];
7
- const style = document.createElement("style");
8
- style.type = "text/css";
9
- if (insertAt === "top") {
10
- if (head.firstChild) {
11
- head.insertBefore(style, head.firstChild);
12
- } else {
13
- head.appendChild(style);
14
- }
15
- } else {
16
- head.appendChild(style);
17
- }
18
- if (style.styleSheet) {
19
- style.styleSheet.cssText = css;
20
- } else {
21
- style.appendChild(document.createTextNode(css));
22
- }
23
- }
24
-
25
- // src/global.css
26
- styleInject('/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */\n@layer properties;\n@layer theme, base, components, utilities;\n@layer theme {\n :root,\n :host {\n --font-sans:\n ui-sans-serif,\n system-ui,\n sans-serif,\n "Apple Color Emoji",\n "Segoe UI Emoji",\n "Segoe UI Symbol",\n "Noto Color Emoji";\n --font-mono:\n ui-monospace,\n SFMono-Regular,\n Menlo,\n Monaco,\n Consolas,\n "Liberation Mono",\n "Courier New",\n monospace;\n --color-red-500: oklch(63.7% 0.237 25.331);\n --spacing: 0.25rem;\n --default-font-family: var(--font-sans);\n --default-mono-font-family: var(--font-mono);\n }\n}\n@layer base {\n *,\n ::after,\n ::before,\n ::backdrop,\n ::file-selector-button {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: 0 solid;\n }\n html,\n :host {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n tab-size: 4;\n font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");\n font-feature-settings: var(--default-font-feature-settings, normal);\n font-variation-settings: var(--default-font-variation-settings, normal);\n -webkit-tap-highlight-color: transparent;\n }\n hr {\n height: 0;\n color: inherit;\n border-top-width: 1px;\n }\n abbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n font-size: inherit;\n font-weight: inherit;\n }\n a {\n color: inherit;\n -webkit-text-decoration: inherit;\n text-decoration: inherit;\n }\n b,\n strong {\n font-weight: bolder;\n }\n code,\n kbd,\n samp,\n pre {\n font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);\n font-feature-settings: var(--default-mono-font-feature-settings, normal);\n font-variation-settings: var(--default-mono-font-variation-settings, normal);\n font-size: 1em;\n }\n small {\n font-size: 80%;\n }\n sub,\n sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n sub {\n bottom: -0.25em;\n }\n sup {\n top: -0.5em;\n }\n table {\n text-indent: 0;\n border-color: inherit;\n border-collapse: collapse;\n }\n :-moz-focusring {\n outline: auto;\n }\n progress {\n vertical-align: baseline;\n }\n summary {\n display: list-item;\n }\n ol,\n ul,\n menu {\n list-style: none;\n }\n img,\n svg,\n video,\n canvas,\n audio,\n iframe,\n embed,\n object {\n display: block;\n vertical-align: middle;\n }\n img,\n video {\n max-width: 100%;\n height: auto;\n }\n button,\n input,\n select,\n optgroup,\n textarea,\n ::file-selector-button {\n font: inherit;\n font-feature-settings: inherit;\n font-variation-settings: inherit;\n letter-spacing: inherit;\n color: inherit;\n border-radius: 0;\n background-color: transparent;\n opacity: 1;\n }\n :where(select:is([multiple], [size])) optgroup {\n font-weight: bolder;\n }\n :where(select:is([multiple], [size])) optgroup option {\n padding-inline-start: 20px;\n }\n ::file-selector-button {\n margin-inline-end: 4px;\n }\n ::placeholder {\n opacity: 1;\n }\n @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {\n ::placeholder {\n color: currentcolor;\n @supports (color: color-mix(in lab, red, red)) {\n color: color-mix(in oklab, currentcolor 50%, transparent);\n }\n }\n }\n textarea {\n resize: vertical;\n }\n ::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n ::-webkit-date-and-time-value {\n min-height: 1lh;\n text-align: inherit;\n }\n ::-webkit-datetime-edit {\n display: inline-flex;\n }\n ::-webkit-datetime-edit-fields-wrapper {\n padding: 0;\n }\n ::-webkit-datetime-edit,\n ::-webkit-datetime-edit-year-field,\n ::-webkit-datetime-edit-month-field,\n ::-webkit-datetime-edit-day-field,\n ::-webkit-datetime-edit-hour-field,\n ::-webkit-datetime-edit-minute-field,\n ::-webkit-datetime-edit-second-field,\n ::-webkit-datetime-edit-millisecond-field,\n ::-webkit-datetime-edit-meridiem-field {\n padding-block: 0;\n }\n ::-webkit-calendar-picker-indicator {\n line-height: 1;\n }\n :-moz-ui-invalid {\n box-shadow: none;\n }\n button,\n input:where([type=button], [type=reset], [type=submit]),\n ::file-selector-button {\n appearance: button;\n }\n ::-webkit-inner-spin-button,\n ::-webkit-outer-spin-button {\n height: auto;\n }\n [hidden]:where(:not([hidden=until-found])) {\n display: none !important;\n }\n}\n@layer utilities {\n .border {\n border-style: var(--tw-border-style);\n border-width: 1px;\n }\n .border-red-500 {\n border-color: var(--color-red-500);\n }\n .p-3 {\n padding: calc(var(--spacing) * 3);\n }\n .hover\\:bg-red-500 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-red-500);\n }\n }\n }\n}\n@property --tw-border-style { syntax: "*"; inherits: false; initial-value: solid; }\n@layer properties {\n @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {\n *,\n ::before,\n ::after,\n ::backdrop {\n --tw-border-style: solid;\n }\n }\n}\n');
27
-
28
- // src/utils/cn.ts
29
- import { clsx } from "clsx";
30
- import { twMerge } from "tailwind-merge";
31
- function cn(...args) {
32
- return twMerge(clsx(args));
33
- }
34
-
35
- // src/components/Button.tsx
36
- import { jsx } from "react/jsx-runtime";
37
- function Button(props) {
38
- return /* @__PURE__ */ jsx(
39
- "button",
40
- {
41
- type: "button",
42
- onClick: props.onClick,
43
- className: cn(
44
- "p-3 border border-red-500 hover:bg-red-500",
45
- props.className
46
- ),
47
- children: props.children
48
- }
49
- );
50
- }
51
- Button.displayName = "Button";
52
-
53
- export {
54
- Button
55
- };
File without changes