@dust-tt/sparkle 0.2.131 → 0.2.133-rc
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/cjs/index.js +83 -13
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +83 -13
- package/dist/esm/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -1
package/dist/esm/index.js
CHANGED
|
@@ -52608,7 +52608,7 @@ function _defineProperty(obj, key, value) {
|
|
|
52608
52608
|
}
|
|
52609
52609
|
return obj;
|
|
52610
52610
|
}
|
|
52611
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
52611
|
+
function _objectWithoutPropertiesLoose$1(source, excluded) {
|
|
52612
52612
|
if (source == null) return {};
|
|
52613
52613
|
var target = {};
|
|
52614
52614
|
var sourceKeys = Object.keys(source);
|
|
@@ -52622,7 +52622,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
52622
52622
|
}
|
|
52623
52623
|
function _objectWithoutProperties(source, excluded) {
|
|
52624
52624
|
if (source == null) return {};
|
|
52625
|
-
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
52625
|
+
var target = _objectWithoutPropertiesLoose$1(source, excluded);
|
|
52626
52626
|
var key, i;
|
|
52627
52627
|
if (Object.getOwnPropertySymbols) {
|
|
52628
52628
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -53135,12 +53135,12 @@ var useLottieInteractivity = function useLottieInteractivity(_ref4) {
|
|
|
53135
53135
|
return View;
|
|
53136
53136
|
};
|
|
53137
53137
|
|
|
53138
|
-
var _excluded = ["style", "interactivity"];
|
|
53138
|
+
var _excluded$2 = ["style", "interactivity"];
|
|
53139
53139
|
var Lottie = function Lottie(props) {
|
|
53140
53140
|
var _a, _b, _c;
|
|
53141
53141
|
var style = props.style,
|
|
53142
53142
|
interactivity = props.interactivity,
|
|
53143
|
-
lottieProps = _objectWithoutProperties(props, _excluded);
|
|
53143
|
+
lottieProps = _objectWithoutProperties(props, _excluded$2);
|
|
53144
53144
|
/**
|
|
53145
53145
|
* Initialize the 'useLottie' hook
|
|
53146
53146
|
*/
|
|
@@ -55244,18 +55244,88 @@ function FilterChips(_a) {
|
|
|
55244
55244
|
return (React__default.createElement("div", { className: "s-flex s-flex-row s-flex-wrap s-gap-2" }, filters.map(function (filterName) { return (React__default.createElement(Button, { label: filterName, variant: selectedFilter === filterName ? "primary" : "tertiary", key: filterName, size: "xs", hasMagnifying: false, onClick: function () { return handleFilterClick(filterName); } })); })));
|
|
55245
55245
|
}
|
|
55246
55246
|
|
|
55247
|
+
function _extends() {
|
|
55248
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
55249
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
55250
|
+
var source = arguments[i];
|
|
55251
|
+
for (var key in source) {
|
|
55252
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
55253
|
+
target[key] = source[key];
|
|
55254
|
+
}
|
|
55255
|
+
}
|
|
55256
|
+
}
|
|
55257
|
+
return target;
|
|
55258
|
+
};
|
|
55259
|
+
return _extends.apply(this, arguments);
|
|
55260
|
+
}
|
|
55261
|
+
|
|
55262
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
55263
|
+
if (source == null) return {};
|
|
55264
|
+
var target = {};
|
|
55265
|
+
var sourceKeys = Object.keys(source);
|
|
55266
|
+
var key, i;
|
|
55267
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
55268
|
+
key = sourceKeys[i];
|
|
55269
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
55270
|
+
target[key] = source[key];
|
|
55271
|
+
}
|
|
55272
|
+
return target;
|
|
55273
|
+
}
|
|
55274
|
+
|
|
55275
|
+
var updateRef = function updateRef(ref, value) {
|
|
55276
|
+
if (typeof ref === 'function') {
|
|
55277
|
+
ref(value);
|
|
55278
|
+
return;
|
|
55279
|
+
}
|
|
55280
|
+
ref.current = value;
|
|
55281
|
+
};
|
|
55282
|
+
|
|
55283
|
+
var useComposedRef = function useComposedRef(libRef, userRef) {
|
|
55284
|
+
var prevUserRef = useRef();
|
|
55285
|
+
return useCallback(function (instance) {
|
|
55286
|
+
libRef.current = instance;
|
|
55287
|
+
|
|
55288
|
+
if (prevUserRef.current) {
|
|
55289
|
+
updateRef(prevUserRef.current, null);
|
|
55290
|
+
}
|
|
55291
|
+
|
|
55292
|
+
prevUserRef.current = userRef;
|
|
55293
|
+
|
|
55294
|
+
if (!userRef) {
|
|
55295
|
+
return;
|
|
55296
|
+
}
|
|
55297
|
+
|
|
55298
|
+
updateRef(userRef, instance);
|
|
55299
|
+
}, [userRef]);
|
|
55300
|
+
};
|
|
55301
|
+
|
|
55302
|
+
var noop = function noop() {};
|
|
55303
|
+
|
|
55304
|
+
var _excluded = ["cacheMeasurements", "maxRows", "minRows", "onChange", "onHeightChange"];
|
|
55305
|
+
var TextareaAutosize = function TextareaAutosize(_ref, userRef) {
|
|
55306
|
+
_ref.cacheMeasurements;
|
|
55307
|
+
_ref.maxRows;
|
|
55308
|
+
_ref.minRows;
|
|
55309
|
+
var _ref$onChange = _ref.onChange,
|
|
55310
|
+
onChange = _ref$onChange === void 0 ? noop : _ref$onChange;
|
|
55311
|
+
_ref.onHeightChange;
|
|
55312
|
+
var props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
55313
|
+
props.value !== undefined;
|
|
55314
|
+
var libRef = React.useRef(null);
|
|
55315
|
+
var ref = useComposedRef(libRef, userRef);
|
|
55316
|
+
React.useRef(0);
|
|
55317
|
+
React.useRef();
|
|
55318
|
+
return /*#__PURE__*/React.createElement("textarea", _extends({}, props, {
|
|
55319
|
+
onChange: onChange,
|
|
55320
|
+
ref: ref
|
|
55321
|
+
}));
|
|
55322
|
+
};
|
|
55323
|
+
var index$3 = /* #__PURE__ */React.forwardRef(TextareaAutosize);
|
|
55324
|
+
|
|
55247
55325
|
function TextArea(_a) {
|
|
55248
55326
|
var placeholder = _a.placeholder, value = _a.value, onChange = _a.onChange, error = _a.error, _b = _a.showErrorLabel, showErrorLabel = _b === void 0 ? false : _b, className = _a.className;
|
|
55249
|
-
var textareaRef = useRef(null);
|
|
55250
|
-
useEffect(function () {
|
|
55251
|
-
var textarea = textareaRef.current;
|
|
55252
|
-
if (textarea) {
|
|
55253
|
-
textarea.style.height = "auto"; // Reset height to recalculate
|
|
55254
|
-
textarea.style.height = "".concat(textarea.scrollHeight, "px"); // Set to scroll height
|
|
55255
|
-
}
|
|
55256
|
-
}, [value]); // Re-run when value changes
|
|
55257
55327
|
return (React__default.createElement("div", { className: "s-flex s-flex-col s-gap-1 s-p-px" },
|
|
55258
|
-
React__default.createElement(
|
|
55328
|
+
React__default.createElement(index$3, { className: classNames("overflow-y-auto s-block s-min-h-60 s-w-full s-min-w-0 s-rounded-xl s-text-sm s-transition-all s-duration-200 s-scrollbar-hide", !error
|
|
55259
55329
|
? "s-border-structure-100 focus:s-border-action-300 focus:s-ring-action-300"
|
|
55260
55330
|
: "s-border-red-500 focus:s-border-red-500 focus:s-ring-red-500", "s-border-structure-200 s-bg-structure-50", "s-resize-y", className !== null && className !== void 0 ? className : ""), placeholder: placeholder, value: value !== null && value !== void 0 ? value : "", onChange: function (e) {
|
|
55261
55331
|
onChange(e.target.value);
|