@photoroom/ui 0.1.566 → 0.1.568

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@photoroom/ui",
3
- "version": "0.1.566",
3
+ "version": "0.1.568",
4
4
  "private": false,
5
5
  "description": "Photoroom design system components",
6
6
  "sideEffects": [
@@ -37,7 +37,7 @@
37
37
  "dependencies": {
38
38
  "@img-comparison-slider/react": "8.0.2",
39
39
  "@lottiefiles/react-lottie-player": "3.6.0",
40
- "@photoroom/icons": "0.1.40",
40
+ "@photoroom/icons": "0.1.41",
41
41
  "@radix-ui/react-accordion": "1.2.20",
42
42
  "@radix-ui/react-avatar": "1.2.6",
43
43
  "@radix-ui/react-checkbox": "1.3.11",
@@ -1,165 +0,0 @@
1
- import * as e from "react";
2
- import t, { useLayoutEffect as n } from "react";
3
- //#region ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/extends.js
4
- function r() {
5
- return r = Object.assign ? Object.assign.bind() : function(e) {
6
- for (var t = 1; t < arguments.length; t++) {
7
- var n = arguments[t];
8
- for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
9
- }
10
- return e;
11
- }, r.apply(null, arguments);
12
- }
13
- //#endregion
14
- //#region ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
15
- function i(e, t) {
16
- if (e == null) return {};
17
- var n = {};
18
- for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
19
- if (t.indexOf(r) !== -1) continue;
20
- n[r] = e[r];
21
- }
22
- return n;
23
- }
24
- //#endregion
25
- //#region ../../node_modules/.pnpm/use-isomorphic-layout-effect@1.2.1_@types+react@19.2.18_react@19.2.8/node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.browser.esm.js
26
- var a = n, o = function(e) {
27
- var n = t.useRef(e);
28
- return a(function() {
29
- n.current = e;
30
- }), n;
31
- }, s = function(e, t) {
32
- if (typeof e == "function") {
33
- e(t);
34
- return;
35
- }
36
- e.current = t;
37
- }, c = function(e, n) {
38
- var r = t.useRef();
39
- return t.useCallback(function(t) {
40
- e.current = t, r.current && s(r.current, null), r.current = n, n && s(n, t);
41
- }, [n]);
42
- }, l = {
43
- "min-height": "0",
44
- "max-height": "none",
45
- height: "0",
46
- visibility: "hidden",
47
- overflow: "hidden",
48
- position: "absolute",
49
- "z-index": "-1000",
50
- top: "0",
51
- right: "0",
52
- display: "block"
53
- }, u = function(e) {
54
- Object.keys(l).forEach(function(t) {
55
- e.style.setProperty(t, l[t], "important");
56
- });
57
- }, d = null, f = function(e, t) {
58
- var n = e.scrollHeight;
59
- return t.sizingStyle.boxSizing === "border-box" ? n + t.borderSize : n - t.paddingSize;
60
- };
61
- function p(e, t, n, r) {
62
- n === void 0 && (n = 1), r === void 0 && (r = Infinity), d || (d = document.createElement("textarea"), d.setAttribute("tabindex", "-1"), d.setAttribute("aria-hidden", "true"), u(d)), d.parentNode === null && document.body.appendChild(d);
63
- var i = e.paddingSize, a = e.borderSize, o = e.sizingStyle, s = o.boxSizing;
64
- Object.keys(o).forEach(function(e) {
65
- var t = e;
66
- d.style[t] = o[t];
67
- }), u(d), d.value = t;
68
- var c = f(d, e);
69
- d.value = t, c = f(d, e), d.value = "x";
70
- var l = d.scrollHeight - i, p = l * n;
71
- s === "border-box" && (p = p + i + a), c = Math.max(p, c);
72
- var m = l * r;
73
- return s === "border-box" && (m = m + i + a), c = Math.min(m, c), [c, l];
74
- }
75
- var m = function() {}, h = function(e, t) {
76
- return e.reduce(function(e, n) {
77
- return e[n] = t[n], e;
78
- }, {});
79
- }, g = [
80
- "borderBottomWidth",
81
- "borderLeftWidth",
82
- "borderRightWidth",
83
- "borderTopWidth",
84
- "boxSizing",
85
- "fontFamily",
86
- "fontSize",
87
- "fontStyle",
88
- "fontWeight",
89
- "letterSpacing",
90
- "lineHeight",
91
- "paddingBottom",
92
- "paddingLeft",
93
- "paddingRight",
94
- "paddingTop",
95
- "tabSize",
96
- "textIndent",
97
- "textRendering",
98
- "textTransform",
99
- "width",
100
- "wordBreak",
101
- "wordSpacing",
102
- "scrollbarGutter"
103
- ], _ = !!document.documentElement.currentStyle, v = function(e) {
104
- var t = window.getComputedStyle(e);
105
- if (t === null) return null;
106
- var n = h(g, t), r = n.boxSizing;
107
- return r === "" ? null : (_ && r === "border-box" && (n.width = parseFloat(n.width) + parseFloat(n.borderRightWidth) + parseFloat(n.borderLeftWidth) + parseFloat(n.paddingRight) + parseFloat(n.paddingLeft) + "px"), {
108
- sizingStyle: n,
109
- paddingSize: parseFloat(n.paddingBottom) + parseFloat(n.paddingTop),
110
- borderSize: parseFloat(n.borderBottomWidth) + parseFloat(n.borderTopWidth)
111
- });
112
- };
113
- function y(t, n, r) {
114
- var i = o(r);
115
- e.useLayoutEffect(function() {
116
- var e = function(e) {
117
- return i.current(e);
118
- };
119
- if (t) return t.addEventListener(n, e), function() {
120
- return t.removeEventListener(n, e);
121
- };
122
- }, []);
123
- }
124
- var b = function(e, t) {
125
- y(document.body, "reset", function(n) {
126
- e.current.form === n.target && t(n);
127
- });
128
- }, x = function(e) {
129
- y(window, "resize", e);
130
- }, S = function(e) {
131
- y(document.fonts, "loadingdone", e);
132
- }, C = [
133
- "cacheMeasurements",
134
- "maxRows",
135
- "minRows",
136
- "onChange",
137
- "onHeightChange"
138
- ], w = /* #__PURE__ */ e.forwardRef(function(t, n) {
139
- var a = t.cacheMeasurements, o = t.maxRows, s = t.minRows, l = t.onChange, u = l === void 0 ? m : l, d = t.onHeightChange, f = d === void 0 ? m : d, h = i(t, C), g = h.value !== void 0, _ = e.useRef(null), y = c(_, n), w = e.useRef(0), T = e.useRef(), E = function() {
140
- var e = _.current, t = a && T.current ? T.current : v(e);
141
- if (t) {
142
- T.current = t;
143
- var n = p(t, e.value || e.placeholder || "x", s, o), r = n[0], i = n[1];
144
- w.current !== r && (w.current = r, e.style.setProperty("height", r + "px", "important"), f(r, { rowHeight: i }));
145
- }
146
- };
147
- return e.useLayoutEffect(E), b(_, function() {
148
- if (!g) {
149
- var e = _.current.value;
150
- requestAnimationFrame(function() {
151
- var t = _.current;
152
- t && e !== t.value && E();
153
- });
154
- }
155
- }), x(E), S(E), /*#__PURE__*/ e.createElement("textarea", r({}, h, {
156
- onChange: function(e) {
157
- g || E(), u(e);
158
- },
159
- ref: y
160
- }));
161
- });
162
- //#endregion
163
- export { w as default };
164
-
165
- //# sourceMappingURL=react-textarea-autosize.browser.esm-D2NmNS-K.mjs.map