@autoai-ui/autoui 0.1.1 → 0.1.3

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/index.cjs CHANGED
@@ -1,3 +1,4 @@
1
+ (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode(":root{--autoui-bg: #ffffff;--autoui-bg-alt: #f4f4f5;--autoui-text: #111111;--autoui-accent: #007aff;--autoui-border: #e5e5e5}[data-theme=dark]{--autoui-bg: #1c1c1e;--autoui-bg-alt: #2c2c2e;--autoui-text: #f2f2f7;--autoui-accent: #0a84ff;--autoui-border: #3a3a3c}.autoui-chat{background:var(--autoui-bg);color:var(--autoui-text);border:1px solid var(--autoui-border);border-radius:12px;display:flex;flex-direction:column;height:480px;width:360px;overflow:hidden;font-family:system-ui,sans-serif}.autoui-chat-header{background:var(--autoui-bg-alt);padding:.75rem 1rem;border-bottom:1px solid var(--autoui-border);display:flex;justify-content:space-between;align-items:center}.autoui-chat-title{font-size:1rem;display:flex;align-items:center;font-weight:600;margin:0}.autoui-chat-closebtn{width:2rem;height:2rem!important;display:flex;justify-content:center;border:none;cursor:pointer;font-size:1rem;color:#000;background-color:transparent;align-items:center;border-radius:100%}.autoui-chat-messages{flex:1;overflow-y:auto;padding:1rem;display:flex;flex-direction:column;gap:.5rem;scroll-behavior:smooth}.autoui-chat-messages::-webkit-scrollbar{width:8px}.autoui-chat-messages::-webkit-scrollbar-track{background:transparent}.autoui-chat-messages::-webkit-scrollbar-thumb{background:linear-gradient(180deg,#444,#666);border-radius:6px;-webkit-transition:background .3s ease;transition:background .3s ease}.autoui-chat-messages::-webkit-scrollbar-thumb:hover{background:linear-gradient(180deg,#555,#777)}.autoui-chat-messages{scrollbar-width:thin;scrollbar-color:#555 transparent}.autoui-chat-message{display:flex;margin-bottom:.75rem}.autoui-chat-message.user{justify-content:flex-end}.autoui-chat-message.assistant{justify-content:flex-start}.autoui-chat-bubble{background:var(--autoui-bg-alt);padding:.5rem .75rem;border-radius:16px;max-width:80%;word-break:break-word}.autoui-chat-message.assistant .autoui-chat-bubble:has(>div[class*=w-full]){max-width:100%;width:100%;padding:1rem;background:transparent}.autoui-chat-bubble>div[class*=w-full]{max-width:100%;width:100%;min-width:0}.autoui-chat-message.user .autoui-chat-bubble{background:var(--autoui-accent);color:#fff}.autoui-chat-input{display:flex;border-top:1px solid var(--autoui-border);background:var(--autoui-bg-alt);padding:.5rem;gap:.5rem}.autoui-chat-textbox{flex:1;border:1px solid var(--autoui-border);border-radius:8px;padding:.5rem .75rem;background:var(--autoui-bg);color:var(--autoui-text)}.autoui-chat-send{background:var(--autoui-accent);border:none;color:#fff;border-radius:8px;padding:0 1rem;cursor:pointer;font-size:1rem}.autoui-chat-send img{height:1.5rem;color:#fff;fill:#fff}.autoui-chat-send:hover{opacity:.9}.autoui-chat-open-btn{width:50px;height:50px;border-radius:50%;border:1px solid var(--autoui-border);background:var(--autoui-bg-alt);color:var(--autoui-text);cursor:pointer;font-size:1rem;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 4px #0000001a;transition:all .2s ease;position:fixed;bottom:1.75rem;right:1.75rem;z-index:10000}.autoui-chat-open-btn:hover{background:var(--autoui-accent);color:#fff;transform:translateY(-2px)}.autoui-chat-open-btn:active{transform:translateY(0);opacity:.9}.autoui-chat-portal{position:fixed;right:4rem;bottom:4rem;z-index:9999;display:flex;justify-content:flex-end;align-items:flex-end;pointer-events:none;background:transparent}.autoui-chat-wrapper{pointer-events:auto;margin:1rem;width:full;max-height:600px;background:var(--autoui-bg);border-radius:16px;box-shadow:0 8px 24px #00000026;overflow:hidden;transform:translateY(20px);opacity:0;animation:autoui-slide-up .25s ease forwards}@keyframes autoui-slide-up{0%{transform:translateY(20px);opacity:0}to{transform:translateY(0);opacity:1}}")),document.head.appendChild(a)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
1
2
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const I=require("react"),ko=require("react-dom");var pt={exports:{}},Qe={};var ro;function xn(){if(ro)return Qe;ro=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function o(n,r,s){var i=null;if(s!==void 0&&(i=""+s),r.key!==void 0&&(i=""+r.key),"key"in r){s={};for(var l in r)l!=="key"&&(s[l]=r[l])}else s=r;return r=s.ref,{$$typeof:e,type:n,key:i,ref:r!==void 0?r:null,props:s}}return Qe.Fragment=t,Qe.jsx=o,Qe.jsxs=o,Qe}var et={};var so;function vn(){return so||(so=1,process.env.NODE_ENV!=="production"&&(function(){function e(h){if(h==null)return null;if(typeof h=="function")return h.$$typeof===A?null:h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case g:return"Fragment";case f:return"Profiler";case d:return"StrictMode";case P:return"Suspense";case u:return"SuspenseList";case j:return"Activity"}if(typeof h=="object")switch(typeof h.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),h.$$typeof){case k:return"Portal";case H:return h.displayName||"Context";case S:return(h._context.displayName||"Context")+".Consumer";case z:var M=h.render;return h=h.displayName,h||(h=M.displayName||M.name||"",h=h!==""?"ForwardRef("+h+")":"ForwardRef"),h;case v:return M=h.displayName||null,M!==null?M:e(h.type)||"Memo";case y:M=h._payload,h=h._init;try{return e(h(M))}catch{}}return null}function t(h){return""+h}function o(h){try{t(h);var M=!1}catch{M=!0}if(M){M=console;var q=M.error,Q=typeof Symbol=="function"&&Symbol.toStringTag&&h[Symbol.toStringTag]||h.constructor.name||"Object";return q.call(M,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",Q),t(h)}}function n(h){if(h===g)return"<>";if(typeof h=="object"&&h!==null&&h.$$typeof===y)return"<...>";try{var M=e(h);return M?"<"+M+">":"<...>"}catch{return"<...>"}}function r(){var h=F.A;return h===null?null:h.getOwner()}function s(){return Error("react-stack-top-frame")}function i(h){if(D.call(h,"key")){var M=Object.getOwnPropertyDescriptor(h,"key").get;if(M&&M.isReactWarning)return!1}return h.key!==void 0}function l(h,M){function q(){X||(X=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",M))}q.isReactWarning=!0,Object.defineProperty(h,"key",{get:q,configurable:!0})}function a(){var h=e(this.type);return K[h]||(K[h]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),h=this.props.ref,h!==void 0?h:null}function c(h,M,q,Q,Pe,Be){var ee=q.ref;return h={$$typeof:C,type:h,key:M,props:q,_owner:Q},(ee!==void 0?ee:null)!==null?Object.defineProperty(h,"ref",{enumerable:!1,get:a}):Object.defineProperty(h,"ref",{enumerable:!1,value:null}),h._store={},Object.defineProperty(h._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(h,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(h,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Pe}),Object.defineProperty(h,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Be}),Object.freeze&&(Object.freeze(h.props),Object.freeze(h)),h}function m(h,M,q,Q,Pe,Be){var ee=M.children;if(ee!==void 0)if(Q)if(_(ee)){for(Q=0;Q<ee.length;Q++)T(ee[Q]);Object.freeze&&Object.freeze(ee)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else T(ee);if(D.call(M,"key")){ee=e(h);var E=Object.keys(M).filter(function(ne){return ne!=="key"});Q=0<E.length?"{key: someKey, "+E.join(": ..., ")+": ...}":"{key: someKey}",Te[ee+Q]||(E=0<E.length?"{"+E.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
2
3
  let props = %s;
3
4
  <%s {...props} />
package/dist/index.mjs CHANGED
@@ -1,3 +1,4 @@
1
+ (function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode(":root{--autoui-bg: #ffffff;--autoui-bg-alt: #f4f4f5;--autoui-text: #111111;--autoui-accent: #007aff;--autoui-border: #e5e5e5}[data-theme=dark]{--autoui-bg: #1c1c1e;--autoui-bg-alt: #2c2c2e;--autoui-text: #f2f2f7;--autoui-accent: #0a84ff;--autoui-border: #3a3a3c}.autoui-chat{background:var(--autoui-bg);color:var(--autoui-text);border:1px solid var(--autoui-border);border-radius:12px;display:flex;flex-direction:column;height:480px;width:360px;overflow:hidden;font-family:system-ui,sans-serif}.autoui-chat-header{background:var(--autoui-bg-alt);padding:.75rem 1rem;border-bottom:1px solid var(--autoui-border);display:flex;justify-content:space-between;align-items:center}.autoui-chat-title{font-size:1rem;display:flex;align-items:center;font-weight:600;margin:0}.autoui-chat-closebtn{width:2rem;height:2rem!important;display:flex;justify-content:center;border:none;cursor:pointer;font-size:1rem;color:#000;background-color:transparent;align-items:center;border-radius:100%}.autoui-chat-messages{flex:1;overflow-y:auto;padding:1rem;display:flex;flex-direction:column;gap:.5rem;scroll-behavior:smooth}.autoui-chat-messages::-webkit-scrollbar{width:8px}.autoui-chat-messages::-webkit-scrollbar-track{background:transparent}.autoui-chat-messages::-webkit-scrollbar-thumb{background:linear-gradient(180deg,#444,#666);border-radius:6px;-webkit-transition:background .3s ease;transition:background .3s ease}.autoui-chat-messages::-webkit-scrollbar-thumb:hover{background:linear-gradient(180deg,#555,#777)}.autoui-chat-messages{scrollbar-width:thin;scrollbar-color:#555 transparent}.autoui-chat-message{display:flex;margin-bottom:.75rem}.autoui-chat-message.user{justify-content:flex-end}.autoui-chat-message.assistant{justify-content:flex-start}.autoui-chat-bubble{background:var(--autoui-bg-alt);padding:.5rem .75rem;border-radius:16px;max-width:80%;word-break:break-word}.autoui-chat-message.assistant .autoui-chat-bubble:has(>div[class*=w-full]){max-width:100%;width:100%;padding:1rem;background:transparent}.autoui-chat-bubble>div[class*=w-full]{max-width:100%;width:100%;min-width:0}.autoui-chat-message.user .autoui-chat-bubble{background:var(--autoui-accent);color:#fff}.autoui-chat-input{display:flex;border-top:1px solid var(--autoui-border);background:var(--autoui-bg-alt);padding:.5rem;gap:.5rem}.autoui-chat-textbox{flex:1;border:1px solid var(--autoui-border);border-radius:8px;padding:.5rem .75rem;background:var(--autoui-bg);color:var(--autoui-text)}.autoui-chat-send{background:var(--autoui-accent);border:none;color:#fff;border-radius:8px;padding:0 1rem;cursor:pointer;font-size:1rem}.autoui-chat-send img{height:1.5rem;color:#fff;fill:#fff}.autoui-chat-send:hover{opacity:.9}.autoui-chat-open-btn{width:50px;height:50px;border-radius:50%;border:1px solid var(--autoui-border);background:var(--autoui-bg-alt);color:var(--autoui-text);cursor:pointer;font-size:1rem;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 4px #0000001a;transition:all .2s ease;position:fixed;bottom:1.75rem;right:1.75rem;z-index:10000}.autoui-chat-open-btn:hover{background:var(--autoui-accent);color:#fff;transform:translateY(-2px)}.autoui-chat-open-btn:active{transform:translateY(0);opacity:.9}.autoui-chat-portal{position:fixed;right:4rem;bottom:4rem;z-index:9999;display:flex;justify-content:flex-end;align-items:flex-end;pointer-events:none;background:transparent}.autoui-chat-wrapper{pointer-events:auto;margin:1rem;width:full;max-height:600px;background:var(--autoui-bg);border-radius:16px;box-shadow:0 8px 24px #00000026;overflow:hidden;transform:translateY(20px);opacity:0;animation:autoui-slide-up .25s ease forwards}@keyframes autoui-slide-up{0%{transform:translateY(20px);opacity:0}to{transform:translateY(0);opacity:1}}")),document.head.appendChild(a)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
1
2
  import P, { forwardRef as yn, useMemo as Po, createContext as Bo, useContext as Ao, useState as Ct, createElement as wt, useRef as $t, useEffect as Tt, useCallback as Ne, memo as _o, lazy as Cn } from "react";
2
3
  import Rn, { createPortal as En } from "react-dom";
3
4
  var gt = { exports: {} }, et = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autoai-ui/autoui",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "scripts": {
@@ -28,7 +28,8 @@
28
28
  "registry": "https://registry.npmjs.org/"
29
29
  },
30
30
  "dependencies": {
31
- "react-virtuoso": "^4.14.1"
31
+ "react-virtuoso": "^4.14.1",
32
+ "vite-plugin-css-injected-by-js": "^3.5.2"
32
33
  },
33
34
  "devDependencies": {
34
35
  "@changesets/cli": "^2.29.7",
package/dist/autoui.css DELETED
@@ -1 +0,0 @@
1
- :root{--autoui-bg: #ffffff;--autoui-bg-alt: #f4f4f5;--autoui-text: #111111;--autoui-accent: #007aff;--autoui-border: #e5e5e5}[data-theme=dark]{--autoui-bg: #1c1c1e;--autoui-bg-alt: #2c2c2e;--autoui-text: #f2f2f7;--autoui-accent: #0a84ff;--autoui-border: #3a3a3c}.autoui-chat{background:var(--autoui-bg);color:var(--autoui-text);border:1px solid var(--autoui-border);border-radius:12px;display:flex;flex-direction:column;height:480px;width:360px;overflow:hidden;font-family:system-ui,sans-serif}.autoui-chat-header{background:var(--autoui-bg-alt);padding:.75rem 1rem;border-bottom:1px solid var(--autoui-border);display:flex;justify-content:space-between;align-items:center}.autoui-chat-title{font-size:1rem;display:flex;align-items:center;font-weight:600;margin:0}.autoui-chat-closebtn{width:2rem;height:2rem!important;display:flex;justify-content:center;border:none;cursor:pointer;font-size:1rem;color:#000;background-color:transparent;align-items:center;border-radius:100%}.autoui-chat-messages{flex:1;overflow-y:auto;padding:1rem;display:flex;flex-direction:column;gap:.5rem;scroll-behavior:smooth}.autoui-chat-messages::-webkit-scrollbar{width:8px}.autoui-chat-messages::-webkit-scrollbar-track{background:transparent}.autoui-chat-messages::-webkit-scrollbar-thumb{background:linear-gradient(180deg,#444,#666);border-radius:6px;-webkit-transition:background .3s ease;transition:background .3s ease}.autoui-chat-messages::-webkit-scrollbar-thumb:hover{background:linear-gradient(180deg,#555,#777)}.autoui-chat-messages{scrollbar-width:thin;scrollbar-color:#555 transparent}.autoui-chat-message{display:flex;margin-bottom:.75rem}.autoui-chat-message.user{justify-content:flex-end}.autoui-chat-message.assistant{justify-content:flex-start}.autoui-chat-bubble{background:var(--autoui-bg-alt);padding:.5rem .75rem;border-radius:16px;max-width:80%;word-break:break-word}.autoui-chat-message.assistant .autoui-chat-bubble:has(>div[class*=w-full]){max-width:100%;width:100%;padding:1rem;background:transparent}.autoui-chat-bubble>div[class*=w-full]{max-width:100%;width:100%;min-width:0}.autoui-chat-message.user .autoui-chat-bubble{background:var(--autoui-accent);color:#fff}.autoui-chat-input{display:flex;border-top:1px solid var(--autoui-border);background:var(--autoui-bg-alt);padding:.5rem;gap:.5rem}.autoui-chat-textbox{flex:1;border:1px solid var(--autoui-border);border-radius:8px;padding:.5rem .75rem;background:var(--autoui-bg);color:var(--autoui-text)}.autoui-chat-send{background:var(--autoui-accent);border:none;color:#fff;border-radius:8px;padding:0 1rem;cursor:pointer;font-size:1rem}.autoui-chat-send img{height:1.5rem;color:#fff;fill:#fff}.autoui-chat-send:hover{opacity:.9}.autoui-chat-open-btn{width:50px;height:50px;border-radius:50%;border:1px solid var(--autoui-border);background:var(--autoui-bg-alt);color:var(--autoui-text);cursor:pointer;font-size:1rem;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 4px #0000001a;transition:all .2s ease;position:fixed;bottom:1.75rem;right:1.75rem;z-index:10000}.autoui-chat-open-btn:hover{background:var(--autoui-accent);color:#fff;transform:translateY(-2px)}.autoui-chat-open-btn:active{transform:translateY(0);opacity:.9}.autoui-chat-portal{position:fixed;right:4rem;bottom:4rem;z-index:9999;display:flex;justify-content:flex-end;align-items:flex-end;pointer-events:none;background:transparent}.autoui-chat-wrapper{pointer-events:auto;margin:1rem;width:full;max-height:600px;background:var(--autoui-bg);border-radius:16px;box-shadow:0 8px 24px #00000026;overflow:hidden;transform:translateY(20px);opacity:0;animation:autoui-slide-up .25s ease forwards}@keyframes autoui-slide-up{0%{transform:translateY(20px);opacity:0}to{transform:translateY(0);opacity:1}}