@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/cjs/index.js
CHANGED
|
@@ -52628,7 +52628,7 @@ function _defineProperty(obj, key, value) {
|
|
|
52628
52628
|
}
|
|
52629
52629
|
return obj;
|
|
52630
52630
|
}
|
|
52631
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
52631
|
+
function _objectWithoutPropertiesLoose$1(source, excluded) {
|
|
52632
52632
|
if (source == null) return {};
|
|
52633
52633
|
var target = {};
|
|
52634
52634
|
var sourceKeys = Object.keys(source);
|
|
@@ -52642,7 +52642,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
52642
52642
|
}
|
|
52643
52643
|
function _objectWithoutProperties(source, excluded) {
|
|
52644
52644
|
if (source == null) return {};
|
|
52645
|
-
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
52645
|
+
var target = _objectWithoutPropertiesLoose$1(source, excluded);
|
|
52646
52646
|
var key, i;
|
|
52647
52647
|
if (Object.getOwnPropertySymbols) {
|
|
52648
52648
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -53155,12 +53155,12 @@ var useLottieInteractivity = function useLottieInteractivity(_ref4) {
|
|
|
53155
53155
|
return View;
|
|
53156
53156
|
};
|
|
53157
53157
|
|
|
53158
|
-
var _excluded = ["style", "interactivity"];
|
|
53158
|
+
var _excluded$2 = ["style", "interactivity"];
|
|
53159
53159
|
var Lottie = function Lottie(props) {
|
|
53160
53160
|
var _a, _b, _c;
|
|
53161
53161
|
var style = props.style,
|
|
53162
53162
|
interactivity = props.interactivity,
|
|
53163
|
-
lottieProps = _objectWithoutProperties(props, _excluded);
|
|
53163
|
+
lottieProps = _objectWithoutProperties(props, _excluded$2);
|
|
53164
53164
|
/**
|
|
53165
53165
|
* Initialize the 'useLottie' hook
|
|
53166
53166
|
*/
|
|
@@ -55264,18 +55264,88 @@ function FilterChips(_a) {
|
|
|
55264
55264
|
return (React.createElement("div", { className: "s-flex s-flex-row s-flex-wrap s-gap-2" }, filters.map(function (filterName) { return (React.createElement(Button, { label: filterName, variant: selectedFilter === filterName ? "primary" : "tertiary", key: filterName, size: "xs", hasMagnifying: false, onClick: function () { return handleFilterClick(filterName); } })); })));
|
|
55265
55265
|
}
|
|
55266
55266
|
|
|
55267
|
+
function _extends() {
|
|
55268
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
55269
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
55270
|
+
var source = arguments[i];
|
|
55271
|
+
for (var key in source) {
|
|
55272
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
55273
|
+
target[key] = source[key];
|
|
55274
|
+
}
|
|
55275
|
+
}
|
|
55276
|
+
}
|
|
55277
|
+
return target;
|
|
55278
|
+
};
|
|
55279
|
+
return _extends.apply(this, arguments);
|
|
55280
|
+
}
|
|
55281
|
+
|
|
55282
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
55283
|
+
if (source == null) return {};
|
|
55284
|
+
var target = {};
|
|
55285
|
+
var sourceKeys = Object.keys(source);
|
|
55286
|
+
var key, i;
|
|
55287
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
55288
|
+
key = sourceKeys[i];
|
|
55289
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
55290
|
+
target[key] = source[key];
|
|
55291
|
+
}
|
|
55292
|
+
return target;
|
|
55293
|
+
}
|
|
55294
|
+
|
|
55295
|
+
var updateRef = function updateRef(ref, value) {
|
|
55296
|
+
if (typeof ref === 'function') {
|
|
55297
|
+
ref(value);
|
|
55298
|
+
return;
|
|
55299
|
+
}
|
|
55300
|
+
ref.current = value;
|
|
55301
|
+
};
|
|
55302
|
+
|
|
55303
|
+
var useComposedRef = function useComposedRef(libRef, userRef) {
|
|
55304
|
+
var prevUserRef = React.useRef();
|
|
55305
|
+
return React.useCallback(function (instance) {
|
|
55306
|
+
libRef.current = instance;
|
|
55307
|
+
|
|
55308
|
+
if (prevUserRef.current) {
|
|
55309
|
+
updateRef(prevUserRef.current, null);
|
|
55310
|
+
}
|
|
55311
|
+
|
|
55312
|
+
prevUserRef.current = userRef;
|
|
55313
|
+
|
|
55314
|
+
if (!userRef) {
|
|
55315
|
+
return;
|
|
55316
|
+
}
|
|
55317
|
+
|
|
55318
|
+
updateRef(userRef, instance);
|
|
55319
|
+
}, [userRef]);
|
|
55320
|
+
};
|
|
55321
|
+
|
|
55322
|
+
var noop = function noop() {};
|
|
55323
|
+
|
|
55324
|
+
var _excluded = ["cacheMeasurements", "maxRows", "minRows", "onChange", "onHeightChange"];
|
|
55325
|
+
var TextareaAutosize = function TextareaAutosize(_ref, userRef) {
|
|
55326
|
+
_ref.cacheMeasurements;
|
|
55327
|
+
_ref.maxRows;
|
|
55328
|
+
_ref.minRows;
|
|
55329
|
+
var _ref$onChange = _ref.onChange,
|
|
55330
|
+
onChange = _ref$onChange === void 0 ? noop : _ref$onChange;
|
|
55331
|
+
_ref.onHeightChange;
|
|
55332
|
+
var props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
55333
|
+
props.value !== undefined;
|
|
55334
|
+
var libRef = React__namespace.useRef(null);
|
|
55335
|
+
var ref = useComposedRef(libRef, userRef);
|
|
55336
|
+
React__namespace.useRef(0);
|
|
55337
|
+
React__namespace.useRef();
|
|
55338
|
+
return /*#__PURE__*/React__namespace.createElement("textarea", _extends({}, props, {
|
|
55339
|
+
onChange: onChange,
|
|
55340
|
+
ref: ref
|
|
55341
|
+
}));
|
|
55342
|
+
};
|
|
55343
|
+
var index$3 = /* #__PURE__ */React__namespace.forwardRef(TextareaAutosize);
|
|
55344
|
+
|
|
55267
55345
|
function TextArea(_a) {
|
|
55268
55346
|
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;
|
|
55269
|
-
var textareaRef = React.useRef(null);
|
|
55270
|
-
React.useEffect(function () {
|
|
55271
|
-
var textarea = textareaRef.current;
|
|
55272
|
-
if (textarea) {
|
|
55273
|
-
textarea.style.height = "auto"; // Reset height to recalculate
|
|
55274
|
-
textarea.style.height = "".concat(textarea.scrollHeight, "px"); // Set to scroll height
|
|
55275
|
-
}
|
|
55276
|
-
}, [value]); // Re-run when value changes
|
|
55277
55347
|
return (React.createElement("div", { className: "s-flex s-flex-col s-gap-1 s-p-px" },
|
|
55278
|
-
React.createElement(
|
|
55348
|
+
React.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
|
|
55279
55349
|
? "s-border-structure-100 focus:s-border-action-300 focus:s-ring-action-300"
|
|
55280
55350
|
: "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) {
|
|
55281
55351
|
onChange(e.target.value);
|