@noya-app/noya-designsystem 0.1.35 → 0.1.37
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/.turbo/turbo-build.log +13 -12
- package/CHANGELOG.md +14 -0
- package/dist/index.css +1 -1
- package/dist/index.d.mts +1058 -0
- package/dist/index.d.ts +16 -23
- package/dist/index.js +1063 -1022
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +753 -704
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/components/Checkbox.tsx +76 -0
- package/src/components/Label.tsx +16 -29
- package/src/components/SelectMenu.tsx +39 -33
- package/src/components/Switch.tsx +5 -2
- package/src/index.tsx +1 -0
- package/src/utils/withSeparatorElements.ts +29 -3
- package/tailwind.config.ts +3 -2
- package/tsconfig.json +2 -1
package/dist/index.mjs
CHANGED
|
@@ -31,6 +31,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
31
31
|
// ../../node_modules/@babel/runtime/helpers/classCallCheck.js
|
|
32
32
|
var require_classCallCheck = __commonJS({
|
|
33
33
|
"../../node_modules/@babel/runtime/helpers/classCallCheck.js"(exports, module) {
|
|
34
|
+
"use strict";
|
|
34
35
|
function _classCallCheck23(instance, Constructor) {
|
|
35
36
|
if (!(instance instanceof Constructor)) {
|
|
36
37
|
throw new TypeError("Cannot call a class as a function");
|
|
@@ -43,6 +44,7 @@ var require_classCallCheck = __commonJS({
|
|
|
43
44
|
// ../../node_modules/@babel/runtime/helpers/typeof.js
|
|
44
45
|
var require_typeof = __commonJS({
|
|
45
46
|
"../../node_modules/@babel/runtime/helpers/typeof.js"(exports, module) {
|
|
47
|
+
"use strict";
|
|
46
48
|
function _typeof(o) {
|
|
47
49
|
"@babel/helpers - typeof";
|
|
48
50
|
return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
|
|
@@ -58,15 +60,14 @@ var require_typeof = __commonJS({
|
|
|
58
60
|
// ../../node_modules/@babel/runtime/helpers/toPrimitive.js
|
|
59
61
|
var require_toPrimitive = __commonJS({
|
|
60
62
|
"../../node_modules/@babel/runtime/helpers/toPrimitive.js"(exports, module) {
|
|
63
|
+
"use strict";
|
|
61
64
|
var _typeof = require_typeof()["default"];
|
|
62
65
|
function toPrimitive(t, r2) {
|
|
63
|
-
if ("object" != _typeof(t) || !t)
|
|
64
|
-
return t;
|
|
66
|
+
if ("object" != _typeof(t) || !t) return t;
|
|
65
67
|
var e = t[Symbol.toPrimitive];
|
|
66
68
|
if (void 0 !== e) {
|
|
67
69
|
var i = e.call(t, r2 || "default");
|
|
68
|
-
if ("object" != _typeof(i))
|
|
69
|
-
return i;
|
|
70
|
+
if ("object" != _typeof(i)) return i;
|
|
70
71
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
71
72
|
}
|
|
72
73
|
return ("string" === r2 ? String : Number)(t);
|
|
@@ -78,6 +79,7 @@ var require_toPrimitive = __commonJS({
|
|
|
78
79
|
// ../../node_modules/@babel/runtime/helpers/toPropertyKey.js
|
|
79
80
|
var require_toPropertyKey = __commonJS({
|
|
80
81
|
"../../node_modules/@babel/runtime/helpers/toPropertyKey.js"(exports, module) {
|
|
82
|
+
"use strict";
|
|
81
83
|
var _typeof = require_typeof()["default"];
|
|
82
84
|
var toPrimitive = require_toPrimitive();
|
|
83
85
|
function toPropertyKey(t) {
|
|
@@ -91,22 +93,20 @@ var require_toPropertyKey = __commonJS({
|
|
|
91
93
|
// ../../node_modules/@babel/runtime/helpers/createClass.js
|
|
92
94
|
var require_createClass = __commonJS({
|
|
93
95
|
"../../node_modules/@babel/runtime/helpers/createClass.js"(exports, module) {
|
|
96
|
+
"use strict";
|
|
94
97
|
var toPropertyKey = require_toPropertyKey();
|
|
95
98
|
function _defineProperties(target, props) {
|
|
96
99
|
for (var i = 0; i < props.length; i++) {
|
|
97
100
|
var descriptor = props[i];
|
|
98
101
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
99
102
|
descriptor.configurable = true;
|
|
100
|
-
if ("value" in descriptor)
|
|
101
|
-
descriptor.writable = true;
|
|
103
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
102
104
|
Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
|
|
103
105
|
}
|
|
104
106
|
}
|
|
105
107
|
function _createClass22(Constructor, protoProps, staticProps) {
|
|
106
|
-
if (protoProps)
|
|
107
|
-
|
|
108
|
-
if (staticProps)
|
|
109
|
-
_defineProperties(Constructor, staticProps);
|
|
108
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
109
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
110
110
|
Object.defineProperty(Constructor, "prototype", {
|
|
111
111
|
writable: false
|
|
112
112
|
});
|
|
@@ -119,6 +119,7 @@ var require_createClass = __commonJS({
|
|
|
119
119
|
// ../../node_modules/@babel/runtime/helpers/assertThisInitialized.js
|
|
120
120
|
var require_assertThisInitialized = __commonJS({
|
|
121
121
|
"../../node_modules/@babel/runtime/helpers/assertThisInitialized.js"(exports, module) {
|
|
122
|
+
"use strict";
|
|
122
123
|
function _assertThisInitialized15(self2) {
|
|
123
124
|
if (self2 === void 0) {
|
|
124
125
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
@@ -132,6 +133,7 @@ var require_assertThisInitialized = __commonJS({
|
|
|
132
133
|
// ../../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js
|
|
133
134
|
var require_possibleConstructorReturn = __commonJS({
|
|
134
135
|
"../../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"(exports, module) {
|
|
136
|
+
"use strict";
|
|
135
137
|
var _typeof = require_typeof()["default"];
|
|
136
138
|
var assertThisInitialized = require_assertThisInitialized();
|
|
137
139
|
function _possibleConstructorReturn16(self2, call) {
|
|
@@ -149,6 +151,7 @@ var require_possibleConstructorReturn = __commonJS({
|
|
|
149
151
|
// ../../node_modules/@babel/runtime/helpers/getPrototypeOf.js
|
|
150
152
|
var require_getPrototypeOf = __commonJS({
|
|
151
153
|
"../../node_modules/@babel/runtime/helpers/getPrototypeOf.js"(exports, module) {
|
|
154
|
+
"use strict";
|
|
152
155
|
function _getPrototypeOf16(o) {
|
|
153
156
|
module.exports = _getPrototypeOf16 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf17(o2) {
|
|
154
157
|
return o2.__proto__ || Object.getPrototypeOf(o2);
|
|
@@ -162,6 +165,7 @@ var require_getPrototypeOf = __commonJS({
|
|
|
162
165
|
// ../../node_modules/@babel/runtime/helpers/setPrototypeOf.js
|
|
163
166
|
var require_setPrototypeOf = __commonJS({
|
|
164
167
|
"../../node_modules/@babel/runtime/helpers/setPrototypeOf.js"(exports, module) {
|
|
168
|
+
"use strict";
|
|
165
169
|
function _setPrototypeOf(o, p) {
|
|
166
170
|
module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p2) {
|
|
167
171
|
o2.__proto__ = p2;
|
|
@@ -176,6 +180,7 @@ var require_setPrototypeOf = __commonJS({
|
|
|
176
180
|
// ../../node_modules/@babel/runtime/helpers/inherits.js
|
|
177
181
|
var require_inherits = __commonJS({
|
|
178
182
|
"../../node_modules/@babel/runtime/helpers/inherits.js"(exports, module) {
|
|
183
|
+
"use strict";
|
|
179
184
|
var setPrototypeOf = require_setPrototypeOf();
|
|
180
185
|
function _inherits16(subClass, superClass) {
|
|
181
186
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -191,8 +196,7 @@ var require_inherits = __commonJS({
|
|
|
191
196
|
Object.defineProperty(subClass, "prototype", {
|
|
192
197
|
writable: false
|
|
193
198
|
});
|
|
194
|
-
if (superClass)
|
|
195
|
-
setPrototypeOf(subClass, superClass);
|
|
199
|
+
if (superClass) setPrototypeOf(subClass, superClass);
|
|
196
200
|
}
|
|
197
201
|
module.exports = _inherits16, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
198
202
|
}
|
|
@@ -201,6 +205,7 @@ var require_inherits = __commonJS({
|
|
|
201
205
|
// ../../node_modules/@babel/runtime/helpers/defineProperty.js
|
|
202
206
|
var require_defineProperty = __commonJS({
|
|
203
207
|
"../../node_modules/@babel/runtime/helpers/defineProperty.js"(exports, module) {
|
|
208
|
+
"use strict";
|
|
204
209
|
var toPropertyKey = require_toPropertyKey();
|
|
205
210
|
function _defineProperty19(obj, key, value) {
|
|
206
211
|
key = toPropertyKey(key);
|
|
@@ -223,6 +228,7 @@ var require_defineProperty = __commonJS({
|
|
|
223
228
|
// ../../node_modules/@babel/runtime/helpers/extends.js
|
|
224
229
|
var require_extends = __commonJS({
|
|
225
230
|
"../../node_modules/@babel/runtime/helpers/extends.js"(exports, module) {
|
|
231
|
+
"use strict";
|
|
226
232
|
function _extends7() {
|
|
227
233
|
module.exports = _extends7 = Object.assign ? Object.assign.bind() : function(target) {
|
|
228
234
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -244,16 +250,15 @@ var require_extends = __commonJS({
|
|
|
244
250
|
// ../../node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js
|
|
245
251
|
var require_objectWithoutPropertiesLoose = __commonJS({
|
|
246
252
|
"../../node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js"(exports, module) {
|
|
253
|
+
"use strict";
|
|
247
254
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
248
|
-
if (source == null)
|
|
249
|
-
return {};
|
|
255
|
+
if (source == null) return {};
|
|
250
256
|
var target = {};
|
|
251
257
|
var sourceKeys = Object.keys(source);
|
|
252
258
|
var key, i;
|
|
253
259
|
for (i = 0; i < sourceKeys.length; i++) {
|
|
254
260
|
key = sourceKeys[i];
|
|
255
|
-
if (excluded.indexOf(key) >= 0)
|
|
256
|
-
continue;
|
|
261
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
257
262
|
target[key] = source[key];
|
|
258
263
|
}
|
|
259
264
|
return target;
|
|
@@ -265,20 +270,18 @@ var require_objectWithoutPropertiesLoose = __commonJS({
|
|
|
265
270
|
// ../../node_modules/@babel/runtime/helpers/objectWithoutProperties.js
|
|
266
271
|
var require_objectWithoutProperties = __commonJS({
|
|
267
272
|
"../../node_modules/@babel/runtime/helpers/objectWithoutProperties.js"(exports, module) {
|
|
273
|
+
"use strict";
|
|
268
274
|
var objectWithoutPropertiesLoose = require_objectWithoutPropertiesLoose();
|
|
269
275
|
function _objectWithoutProperties3(source, excluded) {
|
|
270
|
-
if (source == null)
|
|
271
|
-
return {};
|
|
276
|
+
if (source == null) return {};
|
|
272
277
|
var target = objectWithoutPropertiesLoose(source, excluded);
|
|
273
278
|
var key, i;
|
|
274
279
|
if (Object.getOwnPropertySymbols) {
|
|
275
280
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
276
281
|
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
277
282
|
key = sourceSymbolKeys[i];
|
|
278
|
-
if (excluded.indexOf(key) >= 0)
|
|
279
|
-
|
|
280
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key))
|
|
281
|
-
continue;
|
|
283
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
284
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
282
285
|
target[key] = source[key];
|
|
283
286
|
}
|
|
284
287
|
}
|
|
@@ -470,7 +473,7 @@ var require_react_is_development = __commonJS({
|
|
|
470
473
|
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
471
474
|
var Element2 = REACT_ELEMENT_TYPE;
|
|
472
475
|
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
473
|
-
var
|
|
476
|
+
var Fragment3 = REACT_FRAGMENT_TYPE;
|
|
474
477
|
var Lazy = REACT_LAZY_TYPE;
|
|
475
478
|
var Memo = REACT_MEMO_TYPE;
|
|
476
479
|
var Portal6 = REACT_PORTAL_TYPE;
|
|
@@ -529,7 +532,7 @@ var require_react_is_development = __commonJS({
|
|
|
529
532
|
exports.ContextProvider = ContextProvider;
|
|
530
533
|
exports.Element = Element2;
|
|
531
534
|
exports.ForwardRef = ForwardRef;
|
|
532
|
-
exports.Fragment =
|
|
535
|
+
exports.Fragment = Fragment3;
|
|
533
536
|
exports.Lazy = Lazy;
|
|
534
537
|
exports.Memo = Memo;
|
|
535
538
|
exports.Portal = Portal6;
|
|
@@ -650,6 +653,7 @@ var require_ReactPropTypesSecret = __commonJS({
|
|
|
650
653
|
// ../../node_modules/prop-types/lib/has.js
|
|
651
654
|
var require_has = __commonJS({
|
|
652
655
|
"../../node_modules/prop-types/lib/has.js"(exports, module) {
|
|
656
|
+
"use strict";
|
|
653
657
|
module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
654
658
|
}
|
|
655
659
|
});
|
|
@@ -1222,6 +1226,7 @@ var require_factoryWithThrowingShims = __commonJS({
|
|
|
1222
1226
|
// ../../node_modules/prop-types/index.js
|
|
1223
1227
|
var require_prop_types = __commonJS({
|
|
1224
1228
|
"../../node_modules/prop-types/index.js"(exports, module) {
|
|
1229
|
+
"use strict";
|
|
1225
1230
|
if (process.env.NODE_ENV !== "production") {
|
|
1226
1231
|
ReactIs = require_react_is();
|
|
1227
1232
|
throwOnDirectAccess = true;
|
|
@@ -1237,11 +1242,10 @@ var require_prop_types = __commonJS({
|
|
|
1237
1242
|
// ../../node_modules/@babel/runtime/helpers/arrayLikeToArray.js
|
|
1238
1243
|
var require_arrayLikeToArray = __commonJS({
|
|
1239
1244
|
"../../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"(exports, module) {
|
|
1245
|
+
"use strict";
|
|
1240
1246
|
function _arrayLikeToArray(arr, len) {
|
|
1241
|
-
if (len == null || len > arr.length)
|
|
1242
|
-
|
|
1243
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
1244
|
-
arr2[i] = arr[i];
|
|
1247
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
1248
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
1245
1249
|
return arr2;
|
|
1246
1250
|
}
|
|
1247
1251
|
module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
@@ -1251,10 +1255,10 @@ var require_arrayLikeToArray = __commonJS({
|
|
|
1251
1255
|
// ../../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js
|
|
1252
1256
|
var require_arrayWithoutHoles = __commonJS({
|
|
1253
1257
|
"../../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js"(exports, module) {
|
|
1258
|
+
"use strict";
|
|
1254
1259
|
var arrayLikeToArray = require_arrayLikeToArray();
|
|
1255
1260
|
function _arrayWithoutHoles(arr) {
|
|
1256
|
-
if (Array.isArray(arr))
|
|
1257
|
-
return arrayLikeToArray(arr);
|
|
1261
|
+
if (Array.isArray(arr)) return arrayLikeToArray(arr);
|
|
1258
1262
|
}
|
|
1259
1263
|
module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
1260
1264
|
}
|
|
@@ -1263,9 +1267,9 @@ var require_arrayWithoutHoles = __commonJS({
|
|
|
1263
1267
|
// ../../node_modules/@babel/runtime/helpers/iterableToArray.js
|
|
1264
1268
|
var require_iterableToArray = __commonJS({
|
|
1265
1269
|
"../../node_modules/@babel/runtime/helpers/iterableToArray.js"(exports, module) {
|
|
1270
|
+
"use strict";
|
|
1266
1271
|
function _iterableToArray(iter) {
|
|
1267
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
|
|
1268
|
-
return Array.from(iter);
|
|
1272
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
1269
1273
|
}
|
|
1270
1274
|
module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
1271
1275
|
}
|
|
@@ -1274,19 +1278,15 @@ var require_iterableToArray = __commonJS({
|
|
|
1274
1278
|
// ../../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js
|
|
1275
1279
|
var require_unsupportedIterableToArray = __commonJS({
|
|
1276
1280
|
"../../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"(exports, module) {
|
|
1281
|
+
"use strict";
|
|
1277
1282
|
var arrayLikeToArray = require_arrayLikeToArray();
|
|
1278
1283
|
function _unsupportedIterableToArray(o, minLen) {
|
|
1279
|
-
if (!o)
|
|
1280
|
-
|
|
1281
|
-
if (typeof o === "string")
|
|
1282
|
-
return arrayLikeToArray(o, minLen);
|
|
1284
|
+
if (!o) return;
|
|
1285
|
+
if (typeof o === "string") return arrayLikeToArray(o, minLen);
|
|
1283
1286
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1284
|
-
if (n === "Object" && o.constructor)
|
|
1285
|
-
|
|
1286
|
-
if (n === "
|
|
1287
|
-
return Array.from(o);
|
|
1288
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
1289
|
-
return arrayLikeToArray(o, minLen);
|
|
1287
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
1288
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
1289
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
|
|
1290
1290
|
}
|
|
1291
1291
|
module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
1292
1292
|
}
|
|
@@ -1295,6 +1295,7 @@ var require_unsupportedIterableToArray = __commonJS({
|
|
|
1295
1295
|
// ../../node_modules/@babel/runtime/helpers/nonIterableSpread.js
|
|
1296
1296
|
var require_nonIterableSpread = __commonJS({
|
|
1297
1297
|
"../../node_modules/@babel/runtime/helpers/nonIterableSpread.js"(exports, module) {
|
|
1298
|
+
"use strict";
|
|
1298
1299
|
function _nonIterableSpread() {
|
|
1299
1300
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1300
1301
|
}
|
|
@@ -1305,6 +1306,7 @@ var require_nonIterableSpread = __commonJS({
|
|
|
1305
1306
|
// ../../node_modules/@babel/runtime/helpers/toConsumableArray.js
|
|
1306
1307
|
var require_toConsumableArray = __commonJS({
|
|
1307
1308
|
"../../node_modules/@babel/runtime/helpers/toConsumableArray.js"(exports, module) {
|
|
1309
|
+
"use strict";
|
|
1308
1310
|
var arrayWithoutHoles = require_arrayWithoutHoles();
|
|
1309
1311
|
var iterableToArray = require_iterableToArray();
|
|
1310
1312
|
var unsupportedIterableToArray = require_unsupportedIterableToArray();
|
|
@@ -1319,9 +1321,9 @@ var require_toConsumableArray = __commonJS({
|
|
|
1319
1321
|
// ../../node_modules/@babel/runtime/helpers/arrayWithHoles.js
|
|
1320
1322
|
var require_arrayWithHoles = __commonJS({
|
|
1321
1323
|
"../../node_modules/@babel/runtime/helpers/arrayWithHoles.js"(exports, module) {
|
|
1324
|
+
"use strict";
|
|
1322
1325
|
function _arrayWithHoles(arr) {
|
|
1323
|
-
if (Array.isArray(arr))
|
|
1324
|
-
return arr;
|
|
1326
|
+
if (Array.isArray(arr)) return arr;
|
|
1325
1327
|
}
|
|
1326
1328
|
module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
1327
1329
|
}
|
|
@@ -1330,27 +1332,23 @@ var require_arrayWithHoles = __commonJS({
|
|
|
1330
1332
|
// ../../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js
|
|
1331
1333
|
var require_iterableToArrayLimit = __commonJS({
|
|
1332
1334
|
"../../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"(exports, module) {
|
|
1335
|
+
"use strict";
|
|
1333
1336
|
function _iterableToArrayLimit(r2, l) {
|
|
1334
1337
|
var t = null == r2 ? null : "undefined" != typeof Symbol && r2[Symbol.iterator] || r2["@@iterator"];
|
|
1335
1338
|
if (null != t) {
|
|
1336
1339
|
var e, n, i, u, a = [], f = true, o = false;
|
|
1337
1340
|
try {
|
|
1338
1341
|
if (i = (t = t.call(r2)).next, 0 === l) {
|
|
1339
|
-
if (Object(t) !== t)
|
|
1340
|
-
return;
|
|
1342
|
+
if (Object(t) !== t) return;
|
|
1341
1343
|
f = false;
|
|
1342
|
-
} else
|
|
1343
|
-
for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = true)
|
|
1344
|
-
;
|
|
1344
|
+
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = true) ;
|
|
1345
1345
|
} catch (r3) {
|
|
1346
1346
|
o = true, n = r3;
|
|
1347
1347
|
} finally {
|
|
1348
1348
|
try {
|
|
1349
|
-
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u))
|
|
1350
|
-
return;
|
|
1349
|
+
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
1351
1350
|
} finally {
|
|
1352
|
-
if (o)
|
|
1353
|
-
throw n;
|
|
1351
|
+
if (o) throw n;
|
|
1354
1352
|
}
|
|
1355
1353
|
}
|
|
1356
1354
|
return a;
|
|
@@ -1363,6 +1361,7 @@ var require_iterableToArrayLimit = __commonJS({
|
|
|
1363
1361
|
// ../../node_modules/@babel/runtime/helpers/nonIterableRest.js
|
|
1364
1362
|
var require_nonIterableRest = __commonJS({
|
|
1365
1363
|
"../../node_modules/@babel/runtime/helpers/nonIterableRest.js"(exports, module) {
|
|
1364
|
+
"use strict";
|
|
1366
1365
|
function _nonIterableRest() {
|
|
1367
1366
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1368
1367
|
}
|
|
@@ -1373,6 +1372,7 @@ var require_nonIterableRest = __commonJS({
|
|
|
1373
1372
|
// ../../node_modules/@babel/runtime/helpers/slicedToArray.js
|
|
1374
1373
|
var require_slicedToArray = __commonJS({
|
|
1375
1374
|
"../../node_modules/@babel/runtime/helpers/slicedToArray.js"(exports, module) {
|
|
1375
|
+
"use strict";
|
|
1376
1376
|
var arrayWithHoles = require_arrayWithHoles();
|
|
1377
1377
|
var iterableToArrayLimit = require_iterableToArrayLimit();
|
|
1378
1378
|
var unsupportedIterableToArray = require_unsupportedIterableToArray();
|
|
@@ -3928,8 +3928,7 @@ function AvatarStack({
|
|
|
3928
3928
|
return React2.cloneElement(child, { size: size3 });
|
|
3929
3929
|
});
|
|
3930
3930
|
return /* @__PURE__ */ React2.createElement("div", { className: "flex" }, childrenArray.map((child, index) => {
|
|
3931
|
-
if (index === 0)
|
|
3932
|
-
return child;
|
|
3931
|
+
if (index === 0) return child;
|
|
3933
3932
|
return /* @__PURE__ */ React2.createElement(
|
|
3934
3933
|
"div",
|
|
3935
3934
|
{
|
|
@@ -4117,12 +4116,88 @@ var Button = forwardRef3(function Button2({
|
|
|
4117
4116
|
return tooltip ? /* @__PURE__ */ React5.createElement(Tooltip, { content: tooltip }, buttonElement) : buttonElement;
|
|
4118
4117
|
});
|
|
4119
4118
|
|
|
4119
|
+
// src/components/Checkbox.tsx
|
|
4120
|
+
import React6, { forwardRef as forwardRef4, memo as memo3 } from "react";
|
|
4121
|
+
var colorSchemeStyles = {
|
|
4122
|
+
normal: "text-text-subtle",
|
|
4123
|
+
primary: "text-primary",
|
|
4124
|
+
secondary: "text-secondary"
|
|
4125
|
+
};
|
|
4126
|
+
var Checkbox = memo3(
|
|
4127
|
+
forwardRef4(function Checkbox2({ className, colorScheme = "secondary", ...props }, ref) {
|
|
4128
|
+
return /* @__PURE__ */ React6.createElement(
|
|
4129
|
+
"div",
|
|
4130
|
+
{
|
|
4131
|
+
className: `relative inline-flex w-[19px] h-[19px] ${colorSchemeStyles[colorScheme]} ${className ?? ""}`
|
|
4132
|
+
},
|
|
4133
|
+
/* @__PURE__ */ React6.createElement(
|
|
4134
|
+
"input",
|
|
4135
|
+
{
|
|
4136
|
+
ref,
|
|
4137
|
+
type: "checkbox",
|
|
4138
|
+
className: `
|
|
4139
|
+
w-full
|
|
4140
|
+
h-full
|
|
4141
|
+
peer
|
|
4142
|
+
appearance-none
|
|
4143
|
+
rounded
|
|
4144
|
+
bg-input-background
|
|
4145
|
+
transition-colors
|
|
4146
|
+
border
|
|
4147
|
+
border-input-border
|
|
4148
|
+
disabled:opacity-50
|
|
4149
|
+
disabled:cursor-not-allowed
|
|
4150
|
+
focus:ring-2
|
|
4151
|
+
focus:ring-primary
|
|
4152
|
+
focus:ring-offset-1
|
|
4153
|
+
`,
|
|
4154
|
+
style: {
|
|
4155
|
+
width: "27px",
|
|
4156
|
+
...props.style
|
|
4157
|
+
},
|
|
4158
|
+
...props
|
|
4159
|
+
}
|
|
4160
|
+
),
|
|
4161
|
+
/* @__PURE__ */ React6.createElement(
|
|
4162
|
+
"svg",
|
|
4163
|
+
{
|
|
4164
|
+
className: `
|
|
4165
|
+
absolute
|
|
4166
|
+
inset-0
|
|
4167
|
+
h-[27px]
|
|
4168
|
+
w-[27px]
|
|
4169
|
+
pointer-events-none
|
|
4170
|
+
stroke-white
|
|
4171
|
+
opacity-0
|
|
4172
|
+
peer-checked:opacity-100
|
|
4173
|
+
`,
|
|
4174
|
+
style: {
|
|
4175
|
+
strokeWidth: "1.3"
|
|
4176
|
+
},
|
|
4177
|
+
viewBox: "0 0 16 16",
|
|
4178
|
+
fill: "none",
|
|
4179
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
4180
|
+
},
|
|
4181
|
+
/* @__PURE__ */ React6.createElement(
|
|
4182
|
+
"path",
|
|
4183
|
+
{
|
|
4184
|
+
d: "M3 6L4.5 7.5L8 4",
|
|
4185
|
+
strokeLinecap: "round",
|
|
4186
|
+
strokeLinejoin: "round",
|
|
4187
|
+
stroke: "currentColor"
|
|
4188
|
+
}
|
|
4189
|
+
)
|
|
4190
|
+
)
|
|
4191
|
+
);
|
|
4192
|
+
})
|
|
4193
|
+
);
|
|
4194
|
+
|
|
4120
4195
|
// src/components/Chip.tsx
|
|
4121
4196
|
import { Cross1Icon, PlusIcon } from "@noya-app/noya-icons";
|
|
4122
|
-
import
|
|
4197
|
+
import React8, { forwardRef as forwardRef5, memo as memo4 } from "react";
|
|
4123
4198
|
|
|
4124
4199
|
// src/hooks/useHover.ts
|
|
4125
|
-
import * as
|
|
4200
|
+
import * as React7 from "react";
|
|
4126
4201
|
var globalIgnoreEmulatedMouseEvents = false;
|
|
4127
4202
|
var hoverCount = 0;
|
|
4128
4203
|
function setGlobalIgnoreEmulatedMouseEvents() {
|
|
@@ -4152,13 +4227,13 @@ function setupGlobalTouchEvents() {
|
|
|
4152
4227
|
}
|
|
4153
4228
|
function useHover(props = {}) {
|
|
4154
4229
|
const { onHoverStart, onHoverChange, onHoverEnd, isDisabled } = props;
|
|
4155
|
-
const [isHovered, setHovered] =
|
|
4156
|
-
const state =
|
|
4230
|
+
const [isHovered, setHovered] = React7.useState(false);
|
|
4231
|
+
const state = React7.useRef({
|
|
4157
4232
|
isHovered: false,
|
|
4158
4233
|
ignoreEmulatedMouseEvents: false
|
|
4159
4234
|
}).current;
|
|
4160
|
-
|
|
4161
|
-
const hoverProps =
|
|
4235
|
+
React7.useEffect(setupGlobalTouchEvents, []);
|
|
4236
|
+
const hoverProps = React7.useMemo(
|
|
4162
4237
|
function getHoverProps() {
|
|
4163
4238
|
function triggerHoverStart(event, pointerType) {
|
|
4164
4239
|
if (isDisabled || pointerType === "touch" || state.isHovered) {
|
|
@@ -4296,8 +4371,8 @@ function getIconStyles(size3, isAdd) {
|
|
|
4296
4371
|
scale-60
|
|
4297
4372
|
`;
|
|
4298
4373
|
}
|
|
4299
|
-
var Chip =
|
|
4300
|
-
|
|
4374
|
+
var Chip = memo4(
|
|
4375
|
+
forwardRef5(function Chip2({
|
|
4301
4376
|
colorScheme,
|
|
4302
4377
|
children: children2,
|
|
4303
4378
|
deletable,
|
|
@@ -4320,7 +4395,7 @@ var Chip = memo3(
|
|
|
4320
4395
|
});
|
|
4321
4396
|
const handleClick = !children2 && !deletable && addable ? onAdd : onClick;
|
|
4322
4397
|
const color = colorScheme === "primary" ? "var(--primary)" : colorScheme === "secondary" ? "var(--secondary)" : "var(--text)";
|
|
4323
|
-
return /* @__PURE__ */
|
|
4398
|
+
return /* @__PURE__ */ React8.createElement(
|
|
4324
4399
|
"span",
|
|
4325
4400
|
{
|
|
4326
4401
|
ref: forwardedRef,
|
|
@@ -4339,7 +4414,7 @@ var Chip = memo3(
|
|
|
4339
4414
|
tabIndex,
|
|
4340
4415
|
...rest
|
|
4341
4416
|
},
|
|
4342
|
-
addable && /* @__PURE__ */
|
|
4417
|
+
addable && /* @__PURE__ */ React8.createElement(
|
|
4343
4418
|
PlusIcon,
|
|
4344
4419
|
{
|
|
4345
4420
|
className: getIconStyles(size3, true),
|
|
@@ -4351,7 +4426,7 @@ var Chip = memo3(
|
|
|
4351
4426
|
}
|
|
4352
4427
|
),
|
|
4353
4428
|
children2,
|
|
4354
|
-
deletable && /* @__PURE__ */
|
|
4429
|
+
deletable && /* @__PURE__ */ React8.createElement(
|
|
4355
4430
|
Cross1Icon,
|
|
4356
4431
|
{
|
|
4357
4432
|
className: getIconStyles(size3, false),
|
|
@@ -4371,31 +4446,31 @@ var Chip = memo3(
|
|
|
4371
4446
|
import { CheckIcon as CheckIcon2, ChevronRightIcon as ChevronRightIcon2 } from "@noya-app/noya-icons";
|
|
4372
4447
|
import { useKeyboardShortcuts as useKeyboardShortcuts2 } from "@noya-app/noya-keymap";
|
|
4373
4448
|
import * as RadixContextMenu from "@radix-ui/react-context-menu";
|
|
4374
|
-
import
|
|
4449
|
+
import React25, { memo as memo12, useCallback as useCallback13, useMemo as useMemo11 } from "react";
|
|
4375
4450
|
|
|
4376
4451
|
// src/components/Icons.tsx
|
|
4377
4452
|
import * as Icons from "@noya-app/noya-icons";
|
|
4378
|
-
import
|
|
4453
|
+
import React9 from "react";
|
|
4379
4454
|
function renderIcon(iconName) {
|
|
4380
4455
|
if (typeof iconName === "string") {
|
|
4381
4456
|
const Icon = Icons[iconName];
|
|
4382
|
-
return /* @__PURE__ */
|
|
4457
|
+
return /* @__PURE__ */ React9.createElement(Icon, null);
|
|
4383
4458
|
}
|
|
4384
4459
|
return iconName;
|
|
4385
4460
|
}
|
|
4386
4461
|
|
|
4387
4462
|
// src/components/Spacer.tsx
|
|
4388
|
-
import
|
|
4389
|
-
var SpacerVertical =
|
|
4463
|
+
import React10, { forwardRef as forwardRef6 } from "react";
|
|
4464
|
+
var SpacerVertical = forwardRef6(
|
|
4390
4465
|
({ size: size3, inline, ...props }, ref) => {
|
|
4391
|
-
return /* @__PURE__ */
|
|
4466
|
+
return /* @__PURE__ */ React10.createElement("span", { className: `${inline ? "inline-block" : "block"} ${size3 === void 0 ? "flex flex-1" : ""}`, style: size3 ? {
|
|
4392
4467
|
minHeight: `${size3}px`
|
|
4393
4468
|
} : void 0, ...props, ref });
|
|
4394
4469
|
}
|
|
4395
4470
|
);
|
|
4396
|
-
var SpacerHorizontal =
|
|
4471
|
+
var SpacerHorizontal = forwardRef6(
|
|
4397
4472
|
({ size: size3, inline, ...props }, ref) => {
|
|
4398
|
-
return /* @__PURE__ */
|
|
4473
|
+
return /* @__PURE__ */ React10.createElement("span", { className: `${inline ? "inline-block" : "block"} ${size3 === void 0 ? "flex flex-1" : ""}`, style: size3 ? {
|
|
4399
4474
|
minWidth: `${size3}px`
|
|
4400
4475
|
} : void 0, ...props, ref });
|
|
4401
4476
|
}
|
|
@@ -4408,13 +4483,13 @@ var Spacer;
|
|
|
4408
4483
|
|
|
4409
4484
|
// src/components/internal/Menu.tsx
|
|
4410
4485
|
import { getShortcutDisplayParts } from "@noya-app/noya-keymap";
|
|
4411
|
-
import
|
|
4486
|
+
import React24, { memo as memo11 } from "react";
|
|
4412
4487
|
|
|
4413
4488
|
// src/contexts/DesignSystemConfiguration.tsx
|
|
4414
4489
|
import { getCurrentPlatform } from "@noya-app/noya-keymap";
|
|
4415
|
-
import
|
|
4490
|
+
import React23, {
|
|
4416
4491
|
createContext as createContext5,
|
|
4417
|
-
memo as
|
|
4492
|
+
memo as memo10,
|
|
4418
4493
|
useContext as useContext5,
|
|
4419
4494
|
useEffect as useEffect12,
|
|
4420
4495
|
useMemo as useMemo10,
|
|
@@ -4423,16 +4498,16 @@ import React22, {
|
|
|
4423
4498
|
|
|
4424
4499
|
// src/components/Toast.tsx
|
|
4425
4500
|
import * as ToastPrimitive from "@radix-ui/react-toast";
|
|
4426
|
-
import
|
|
4501
|
+
import React12 from "react";
|
|
4427
4502
|
|
|
4428
4503
|
// src/components/IconButton.tsx
|
|
4429
|
-
import
|
|
4430
|
-
forwardRef as
|
|
4431
|
-
memo as
|
|
4504
|
+
import React11, {
|
|
4505
|
+
forwardRef as forwardRef7,
|
|
4506
|
+
memo as memo5,
|
|
4432
4507
|
useMemo as useMemo2
|
|
4433
4508
|
} from "react";
|
|
4434
|
-
var IconButton =
|
|
4435
|
-
|
|
4509
|
+
var IconButton = memo5(
|
|
4510
|
+
forwardRef7(function IconButton2({ selected, iconName, color, size: size3, contentStyle, ...props }, forwardedRef) {
|
|
4436
4511
|
const Icon = Icons[iconName];
|
|
4437
4512
|
const style5 = useMemo2(() => {
|
|
4438
4513
|
return {
|
|
@@ -4441,7 +4516,7 @@ var IconButton = memo4(
|
|
|
4441
4516
|
...contentStyle
|
|
4442
4517
|
};
|
|
4443
4518
|
}, [contentStyle, size3]);
|
|
4444
|
-
return /* @__PURE__ */
|
|
4519
|
+
return /* @__PURE__ */ React11.createElement(Button, { ref: forwardedRef, ...props, variant: "none", contentStyle: style5 }, /* @__PURE__ */ React11.createElement(
|
|
4445
4520
|
Icon,
|
|
4446
4521
|
{
|
|
4447
4522
|
color: color ?? (selected ? "var(--icon-selected)" : "var(--icon)"),
|
|
@@ -4458,22 +4533,22 @@ var Toast = ({
|
|
|
4458
4533
|
children: children2,
|
|
4459
4534
|
...props
|
|
4460
4535
|
}) => {
|
|
4461
|
-
return /* @__PURE__ */
|
|
4536
|
+
return /* @__PURE__ */ React12.createElement(
|
|
4462
4537
|
ToastPrimitive.Root,
|
|
4463
4538
|
{
|
|
4464
4539
|
className: "px-2 py-2.5 grid grid-cols-[auto_max-content] gap-x-2.5 items-center rounded text-sm bg-popover-background shadow-[0_2px_4px_rgba(0,0,0,0.2),0_0_12px_rgba(0,0,0,0.1)] text-text-muted",
|
|
4465
4540
|
...props
|
|
4466
4541
|
},
|
|
4467
|
-
title && /* @__PURE__ */
|
|
4468
|
-
/* @__PURE__ */
|
|
4469
|
-
children2 && /* @__PURE__ */
|
|
4470
|
-
/* @__PURE__ */
|
|
4542
|
+
title && /* @__PURE__ */ React12.createElement(ToastPrimitive.Title, { className: `mb-[5px] ${textStyles.label} font-bold text-text` }, title),
|
|
4543
|
+
/* @__PURE__ */ React12.createElement(ToastPrimitive.Description, { className: `${textStyles.small} text-text-muted` }, content),
|
|
4544
|
+
children2 && /* @__PURE__ */ React12.createElement(ToastPrimitive.Action, { asChild: true, altText: "" }, children2),
|
|
4545
|
+
/* @__PURE__ */ React12.createElement(ToastPrimitive.Close, { "aria-label": "Close", asChild: true }, /* @__PURE__ */ React12.createElement(IconButton, { iconName: "Cross1Icon" }))
|
|
4471
4546
|
);
|
|
4472
4547
|
};
|
|
4473
|
-
var ToastProvider = ({ children: children2 }) => /* @__PURE__ */
|
|
4548
|
+
var ToastProvider = ({ children: children2 }) => /* @__PURE__ */ React12.createElement(ToastPrimitive.Provider, null, children2, /* @__PURE__ */ React12.createElement(ToastPrimitive.Viewport, { className: "fixed bottom-0 right-0 flex flex-col p-5 g-2.5 min-w-[200px] max-w-[100vw] m-0 list-none z-[2147483647] outline-none" }));
|
|
4474
4549
|
|
|
4475
4550
|
// src/contexts/DialogContext.tsx
|
|
4476
|
-
import
|
|
4551
|
+
import React21, {
|
|
4477
4552
|
createContext as createContext3,
|
|
4478
4553
|
useCallback as useCallback12,
|
|
4479
4554
|
useContext as useContext3,
|
|
@@ -4484,12 +4559,12 @@ import React20, {
|
|
|
4484
4559
|
|
|
4485
4560
|
// src/components/Dialog.tsx
|
|
4486
4561
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
4487
|
-
import
|
|
4488
|
-
forwardRef as
|
|
4562
|
+
import React13, {
|
|
4563
|
+
forwardRef as forwardRef8,
|
|
4489
4564
|
useImperativeHandle,
|
|
4490
4565
|
useRef as useRef2
|
|
4491
4566
|
} from "react";
|
|
4492
|
-
var StyledOverlay =
|
|
4567
|
+
var StyledOverlay = forwardRef8(({ className, ...props }, ref) => /* @__PURE__ */ React13.createElement(
|
|
4493
4568
|
DialogPrimitive.Overlay,
|
|
4494
4569
|
{
|
|
4495
4570
|
ref,
|
|
@@ -4497,7 +4572,7 @@ var StyledOverlay = forwardRef7(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
4497
4572
|
...props
|
|
4498
4573
|
}
|
|
4499
4574
|
));
|
|
4500
|
-
var StyledContent =
|
|
4575
|
+
var StyledContent = forwardRef8(({ className, ...props }, ref) => /* @__PURE__ */ React13.createElement(
|
|
4501
4576
|
DialogPrimitive.Content,
|
|
4502
4577
|
{
|
|
4503
4578
|
ref,
|
|
@@ -4512,7 +4587,7 @@ var StyledContent = forwardRef7(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
4512
4587
|
...props
|
|
4513
4588
|
}
|
|
4514
4589
|
));
|
|
4515
|
-
var StyledTitle =
|
|
4590
|
+
var StyledTitle = forwardRef8(({ className, ...props }, ref) => /* @__PURE__ */ React13.createElement(
|
|
4516
4591
|
DialogPrimitive.Title,
|
|
4517
4592
|
{
|
|
4518
4593
|
ref,
|
|
@@ -4523,7 +4598,7 @@ var StyledTitle = forwardRef7(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
4523
4598
|
...props
|
|
4524
4599
|
}
|
|
4525
4600
|
));
|
|
4526
|
-
var StyledDescription =
|
|
4601
|
+
var StyledDescription = forwardRef8(({ className, ...props }, ref) => /* @__PURE__ */ React13.createElement(
|
|
4527
4602
|
DialogPrimitive.Description,
|
|
4528
4603
|
{
|
|
4529
4604
|
ref,
|
|
@@ -4534,7 +4609,7 @@ var StyledDescription = forwardRef7(({ className, ...props }, ref) => /* @__PURE
|
|
|
4534
4609
|
...props
|
|
4535
4610
|
}
|
|
4536
4611
|
));
|
|
4537
|
-
var CloseButtonContainer =
|
|
4612
|
+
var CloseButtonContainer = forwardRef8(({ className, ...props }, ref) => /* @__PURE__ */ React13.createElement(
|
|
4538
4613
|
"div",
|
|
4539
4614
|
{
|
|
4540
4615
|
ref,
|
|
@@ -4542,7 +4617,7 @@ var CloseButtonContainer = forwardRef7(({ className, ...props }, ref) => /* @__P
|
|
|
4542
4617
|
...props
|
|
4543
4618
|
}
|
|
4544
4619
|
));
|
|
4545
|
-
var Dialog =
|
|
4620
|
+
var Dialog = forwardRef8(function Dialog2({
|
|
4546
4621
|
children: children2,
|
|
4547
4622
|
title,
|
|
4548
4623
|
description,
|
|
@@ -4555,12 +4630,11 @@ var Dialog = forwardRef7(function Dialog2({
|
|
|
4555
4630
|
const contentRef = useRef2(null);
|
|
4556
4631
|
useImperativeHandle(forwardedRef, () => ({
|
|
4557
4632
|
containsElement(element) {
|
|
4558
|
-
if (!contentRef.current)
|
|
4559
|
-
return false;
|
|
4633
|
+
if (!contentRef.current) return false;
|
|
4560
4634
|
return contentRef.current.contains(element);
|
|
4561
4635
|
}
|
|
4562
4636
|
}));
|
|
4563
|
-
return /* @__PURE__ */
|
|
4637
|
+
return /* @__PURE__ */ React13.createElement(DialogPrimitive.Root, { open, onOpenChange }, /* @__PURE__ */ React13.createElement(StyledOverlay, null), /* @__PURE__ */ React13.createElement(
|
|
4564
4638
|
StyledContent,
|
|
4565
4639
|
{
|
|
4566
4640
|
ref: contentRef,
|
|
@@ -4571,14 +4645,14 @@ var Dialog = forwardRef7(function Dialog2({
|
|
|
4571
4645
|
onInteractOutside: (event) => event.preventDefault()
|
|
4572
4646
|
}
|
|
4573
4647
|
},
|
|
4574
|
-
/* @__PURE__ */
|
|
4575
|
-
title && /* @__PURE__ */
|
|
4576
|
-
description && /* @__PURE__ */
|
|
4648
|
+
/* @__PURE__ */ React13.createElement(CloseButtonContainer, null, /* @__PURE__ */ React13.createElement(DialogPrimitive.Close, { asChild: true }, /* @__PURE__ */ React13.createElement(IconButton, { iconName: "Cross1Icon" }))),
|
|
4649
|
+
title && /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(StyledTitle, null, title), /* @__PURE__ */ React13.createElement(Spacer.Vertical, { size: description ? 10 : 20 })),
|
|
4650
|
+
description && /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(Spacer.Vertical, { size: 10 }), /* @__PURE__ */ React13.createElement(StyledDescription, null, description), /* @__PURE__ */ React13.createElement(Spacer.Vertical, { size: 20 })),
|
|
4577
4651
|
children2
|
|
4578
4652
|
));
|
|
4579
4653
|
});
|
|
4580
|
-
var FullscreenDialog =
|
|
4581
|
-
return /* @__PURE__ */
|
|
4654
|
+
var FullscreenDialog = forwardRef8(function FullscreenDialog2({ style: style5, ...rest }, forwardedRef) {
|
|
4655
|
+
return /* @__PURE__ */ React13.createElement(
|
|
4582
4656
|
Dialog,
|
|
4583
4657
|
{
|
|
4584
4658
|
ref: forwardedRef,
|
|
@@ -4604,13 +4678,13 @@ var FullscreenDialog = forwardRef7(function FullscreenDialog2({ style: style5, .
|
|
|
4604
4678
|
import { CaretDownIcon } from "@noya-app/noya-icons";
|
|
4605
4679
|
|
|
4606
4680
|
// ../noya-react-utils/src/components/AutoSizer.tsx
|
|
4607
|
-
import
|
|
4681
|
+
import React15, { memo as memo6, useRef as useRef3 } from "react";
|
|
4608
4682
|
|
|
4609
4683
|
// ../noya-react-utils/src/hooks/useSize.ts
|
|
4610
|
-
import * as
|
|
4684
|
+
import * as React14 from "react";
|
|
4611
4685
|
function useSize(refToObserve, dimensions = "both") {
|
|
4612
|
-
const [size3, setSize] =
|
|
4613
|
-
|
|
4686
|
+
const [size3, setSize] = React14.useState(void 0);
|
|
4687
|
+
React14.useEffect(() => {
|
|
4614
4688
|
if (refToObserve.current) {
|
|
4615
4689
|
const elementToObserve = refToObserve.current;
|
|
4616
4690
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
@@ -4657,26 +4731,26 @@ var style = {
|
|
|
4657
4731
|
flex: "1 0 0",
|
|
4658
4732
|
flexDirection: "column"
|
|
4659
4733
|
};
|
|
4660
|
-
var AutoSizer =
|
|
4734
|
+
var AutoSizer = memo6(function AutoSizer2({
|
|
4661
4735
|
children: children2,
|
|
4662
4736
|
className
|
|
4663
4737
|
}) {
|
|
4664
4738
|
const containerRef = useRef3(null);
|
|
4665
4739
|
const containerSize = useSize(containerRef);
|
|
4666
|
-
return /* @__PURE__ */
|
|
4740
|
+
return /* @__PURE__ */ React15.createElement("div", { ref: containerRef, style, className }, containerSize && containerSize.width > 0 && containerSize.height > 0 && children2(containerSize));
|
|
4667
4741
|
});
|
|
4668
|
-
var SingleDimensionAutoSizer =
|
|
4742
|
+
var SingleDimensionAutoSizer = memo6(function SingleDimensionAutoSizer2({
|
|
4669
4743
|
children: children2,
|
|
4670
4744
|
dimension,
|
|
4671
4745
|
className
|
|
4672
4746
|
}) {
|
|
4673
4747
|
const containerRef = useRef3(null);
|
|
4674
4748
|
const containerSize = useSize(containerRef, dimension);
|
|
4675
|
-
return /* @__PURE__ */
|
|
4749
|
+
return /* @__PURE__ */ React15.createElement("div", { ref: containerRef, style, className }, containerSize && containerSize[dimension] > 0 && children2(containerSize[dimension]));
|
|
4676
4750
|
});
|
|
4677
4751
|
|
|
4678
4752
|
// ../noya-react-utils/src/components/FileDropTarget.tsx
|
|
4679
|
-
import
|
|
4753
|
+
import React16, { memo as memo7, useCallback as useCallback3, useRef as useRef4 } from "react";
|
|
4680
4754
|
|
|
4681
4755
|
// ../noya-react-utils/src/hooks/useFileDropTarget.ts
|
|
4682
4756
|
import { useCallback as useCallback2, useState as useState3 } from "react";
|
|
@@ -4726,7 +4800,7 @@ function useFileDropTarget(ref, dropEvent) {
|
|
|
4726
4800
|
function isSupportedFile(file, supportedFileTypes) {
|
|
4727
4801
|
return supportedFileTypes.includes(file.type) || file.type === "" && file.name.endsWith(".sketch");
|
|
4728
4802
|
}
|
|
4729
|
-
var FileDropTarget =
|
|
4803
|
+
var FileDropTarget = memo7(function FileDropTarget2({
|
|
4730
4804
|
children: children2,
|
|
4731
4805
|
onDropFiles,
|
|
4732
4806
|
supportedFileTypes,
|
|
@@ -4769,7 +4843,7 @@ var FileDropTarget = memo6(function FileDropTarget2({
|
|
|
4769
4843
|
ref,
|
|
4770
4844
|
handleFile
|
|
4771
4845
|
);
|
|
4772
|
-
return /* @__PURE__ */
|
|
4846
|
+
return /* @__PURE__ */ React16.createElement("div", { ref, ...dropTargetProps, ...props }, typeof children2 === "function" ? children2(isDropTargetActive) : children2);
|
|
4773
4847
|
});
|
|
4774
4848
|
|
|
4775
4849
|
// ../noya-react-utils/src/hooks/useDeepArray.ts
|
|
@@ -4848,8 +4922,7 @@ var Emitter = class {
|
|
|
4848
4922
|
};
|
|
4849
4923
|
removeListener = (f) => {
|
|
4850
4924
|
const index = this.listeners.indexOf(f);
|
|
4851
|
-
if (index === -1)
|
|
4852
|
-
return;
|
|
4925
|
+
if (index === -1) return;
|
|
4853
4926
|
this.listeners.splice(index, 1);
|
|
4854
4927
|
};
|
|
4855
4928
|
emit = (...args) => {
|
|
@@ -4909,12 +4982,12 @@ function assignRef(ref, value) {
|
|
|
4909
4982
|
}
|
|
4910
4983
|
|
|
4911
4984
|
// src/components/InputField.tsx
|
|
4912
|
-
import
|
|
4985
|
+
import React20, {
|
|
4913
4986
|
Children,
|
|
4914
4987
|
createContext as createContext2,
|
|
4915
|
-
forwardRef as
|
|
4988
|
+
forwardRef as forwardRef11,
|
|
4916
4989
|
isValidElement,
|
|
4917
|
-
memo as
|
|
4990
|
+
memo as memo9,
|
|
4918
4991
|
useCallback as useCallback11,
|
|
4919
4992
|
useContext as useContext2,
|
|
4920
4993
|
useEffect as useEffect11,
|
|
@@ -4938,8 +5011,7 @@ function handleNudge(e) {
|
|
|
4938
5011
|
handled = true;
|
|
4939
5012
|
break;
|
|
4940
5013
|
}
|
|
4941
|
-
if (!handled)
|
|
4942
|
-
return;
|
|
5014
|
+
if (!handled) return;
|
|
4943
5015
|
if (e.shiftKey) {
|
|
4944
5016
|
amount *= 10;
|
|
4945
5017
|
} else if (e.altKey) {
|
|
@@ -4952,13 +5024,13 @@ function handleNudge(e) {
|
|
|
4952
5024
|
import { CheckIcon, ChevronRightIcon } from "@noya-app/noya-icons";
|
|
4953
5025
|
import { useKeyboardShortcuts } from "@noya-app/noya-keymap";
|
|
4954
5026
|
import * as RadixDropdownMenu from "@radix-ui/react-dropdown-menu";
|
|
4955
|
-
import
|
|
4956
|
-
forwardRef as
|
|
4957
|
-
memo as
|
|
5027
|
+
import React17, {
|
|
5028
|
+
forwardRef as forwardRef9,
|
|
5029
|
+
memo as memo8,
|
|
4958
5030
|
useCallback as useCallback9,
|
|
4959
5031
|
useMemo as useMemo6
|
|
4960
5032
|
} from "react";
|
|
4961
|
-
var DropdownMenuItem =
|
|
5033
|
+
var DropdownMenuItem = memo8(function ContextMenuItem({
|
|
4962
5034
|
value,
|
|
4963
5035
|
children: children2,
|
|
4964
5036
|
onSelect,
|
|
@@ -4970,12 +5042,11 @@ var DropdownMenuItem = memo7(function ContextMenuItem({
|
|
|
4970
5042
|
shortcut
|
|
4971
5043
|
}) {
|
|
4972
5044
|
const handleSelectItem = useCallback9(() => {
|
|
4973
|
-
if (!value)
|
|
4974
|
-
return;
|
|
5045
|
+
if (!value) return;
|
|
4975
5046
|
onSelect(value);
|
|
4976
5047
|
}, [onSelect, value]);
|
|
4977
5048
|
if (checked) {
|
|
4978
|
-
return /* @__PURE__ */
|
|
5049
|
+
return /* @__PURE__ */ React17.createElement(
|
|
4979
5050
|
RadixDropdownMenu.CheckboxItem,
|
|
4980
5051
|
{
|
|
4981
5052
|
checked,
|
|
@@ -4983,26 +5054,26 @@ var DropdownMenuItem = memo7(function ContextMenuItem({
|
|
|
4983
5054
|
onSelect: handleSelectItem,
|
|
4984
5055
|
className: styles.itemStyle({ disabled })
|
|
4985
5056
|
},
|
|
4986
|
-
/* @__PURE__ */
|
|
4987
|
-
icon && /* @__PURE__ */
|
|
5057
|
+
/* @__PURE__ */ React17.createElement(RadixDropdownMenu.ItemIndicator, { className: styles.itemIndicatorStyle }, /* @__PURE__ */ React17.createElement(CheckIcon, null)),
|
|
5058
|
+
icon && /* @__PURE__ */ React17.createElement(React17.Fragment, null, renderIcon(icon), /* @__PURE__ */ React17.createElement(Spacer.Horizontal, { size: 8 })),
|
|
4988
5059
|
children2
|
|
4989
5060
|
);
|
|
4990
5061
|
}
|
|
4991
|
-
const element = /* @__PURE__ */
|
|
5062
|
+
const element = /* @__PURE__ */ React17.createElement(
|
|
4992
5063
|
RadixDropdownMenu.Item,
|
|
4993
5064
|
{
|
|
4994
5065
|
disabled,
|
|
4995
5066
|
onSelect: handleSelectItem,
|
|
4996
5067
|
className: styles.itemStyle({ disabled })
|
|
4997
5068
|
},
|
|
4998
|
-
indented && /* @__PURE__ */
|
|
4999
|
-
icon && /* @__PURE__ */
|
|
5069
|
+
indented && /* @__PURE__ */ React17.createElement(Spacer.Horizontal, { size: CHECKBOX_WIDTH - CHECKBOX_RIGHT_INSET }),
|
|
5070
|
+
icon && /* @__PURE__ */ React17.createElement(React17.Fragment, null, renderIcon(icon), /* @__PURE__ */ React17.createElement(Spacer.Horizontal, { size: 8 })),
|
|
5000
5071
|
children2,
|
|
5001
|
-
shortcut && /* @__PURE__ */
|
|
5002
|
-
items && items.length > 0 && /* @__PURE__ */
|
|
5072
|
+
shortcut && /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(Spacer.Horizontal, null), /* @__PURE__ */ React17.createElement(Spacer.Horizontal, { size: 24 }), /* @__PURE__ */ React17.createElement(KeyboardShortcut, { shortcut })),
|
|
5073
|
+
items && items.length > 0 && /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(Spacer.Horizontal, null), /* @__PURE__ */ React17.createElement(Spacer.Horizontal, { size: 16 }), /* @__PURE__ */ React17.createElement(ChevronRightIcon, null))
|
|
5003
5074
|
);
|
|
5004
5075
|
if (items && items.length > 0) {
|
|
5005
|
-
return /* @__PURE__ */
|
|
5076
|
+
return /* @__PURE__ */ React17.createElement(
|
|
5006
5077
|
DropdownMenuRoot,
|
|
5007
5078
|
{
|
|
5008
5079
|
isNested: true,
|
|
@@ -5016,7 +5087,7 @@ var DropdownMenuItem = memo7(function ContextMenuItem({
|
|
|
5016
5087
|
return element;
|
|
5017
5088
|
}
|
|
5018
5089
|
});
|
|
5019
|
-
var DropdownMenuRoot =
|
|
5090
|
+
var DropdownMenuRoot = forwardRef9(function DropdownMenuRoot2({
|
|
5020
5091
|
items,
|
|
5021
5092
|
children: children2,
|
|
5022
5093
|
onSelect,
|
|
@@ -5044,7 +5115,7 @@ var DropdownMenuRoot = forwardRef8(function DropdownMenuRoot2({
|
|
|
5044
5115
|
const TriggerComponent = isNested ? RadixDropdownMenu.SubTrigger : RadixDropdownMenu.Trigger;
|
|
5045
5116
|
const ContentComponent = isNested ? RadixDropdownMenu.SubContent : RadixDropdownMenu.Content;
|
|
5046
5117
|
const contentStyle = useMemo6(() => ({ zIndex: 1e3 }), []);
|
|
5047
|
-
return /* @__PURE__ */
|
|
5118
|
+
return /* @__PURE__ */ React17.createElement(RootComponent, { onOpenChange, open }, /* @__PURE__ */ React17.createElement(TriggerComponent, { ref: forwardedRef, asChild: true }, children2), /* @__PURE__ */ React17.createElement(RadixDropdownMenu.Portal, null, /* @__PURE__ */ React17.createElement(
|
|
5048
5119
|
ContentComponent,
|
|
5049
5120
|
{
|
|
5050
5121
|
className: styles.contentStyle,
|
|
@@ -5058,13 +5129,13 @@ var DropdownMenuRoot = forwardRef8(function DropdownMenuRoot2({
|
|
|
5058
5129
|
},
|
|
5059
5130
|
items.length === 0 ? emptyState : null,
|
|
5060
5131
|
items.map(
|
|
5061
|
-
(item, index) => item === SEPARATOR_ITEM ? /* @__PURE__ */
|
|
5132
|
+
(item, index) => item === SEPARATOR_ITEM ? /* @__PURE__ */ React17.createElement(
|
|
5062
5133
|
RadixDropdownMenu.Separator,
|
|
5063
5134
|
{
|
|
5064
5135
|
key: index,
|
|
5065
5136
|
className: styles.separatorStyle
|
|
5066
5137
|
}
|
|
5067
|
-
) : /* @__PURE__ */
|
|
5138
|
+
) : /* @__PURE__ */ React17.createElement(
|
|
5068
5139
|
DropdownMenuItem,
|
|
5069
5140
|
{
|
|
5070
5141
|
key: item.value ?? index,
|
|
@@ -5082,12 +5153,12 @@ var DropdownMenuRoot = forwardRef8(function DropdownMenuRoot2({
|
|
|
5082
5153
|
)
|
|
5083
5154
|
)));
|
|
5084
5155
|
});
|
|
5085
|
-
var DropdownMenu =
|
|
5156
|
+
var DropdownMenu = memo8(DropdownMenuRoot);
|
|
5086
5157
|
|
|
5087
5158
|
// src/components/internal/TextInput.tsx
|
|
5088
5159
|
import { composeRefs } from "@radix-ui/react-compose-refs";
|
|
5089
|
-
import
|
|
5090
|
-
forwardRef as
|
|
5160
|
+
import React18, {
|
|
5161
|
+
forwardRef as forwardRef10,
|
|
5091
5162
|
useCallback as useCallback10,
|
|
5092
5163
|
useEffect as useEffect10,
|
|
5093
5164
|
useLayoutEffect as useLayoutEffect3,
|
|
@@ -5097,7 +5168,7 @@ import React17, {
|
|
|
5097
5168
|
|
|
5098
5169
|
// src/contexts/GlobalInputBlurContext.tsx
|
|
5099
5170
|
import { createContext, useContext, useEffect as useEffect9 } from "react";
|
|
5100
|
-
var defaultValue = (() => {
|
|
5171
|
+
var defaultValue = /* @__PURE__ */ (() => {
|
|
5101
5172
|
const listeners = [];
|
|
5102
5173
|
const value = {
|
|
5103
5174
|
addListener(f) {
|
|
@@ -5105,8 +5176,7 @@ var defaultValue = (() => {
|
|
|
5105
5176
|
},
|
|
5106
5177
|
removeListener(f) {
|
|
5107
5178
|
const index = listeners.indexOf(f);
|
|
5108
|
-
if (index === -1)
|
|
5109
|
-
return;
|
|
5179
|
+
if (index === -1) return;
|
|
5110
5180
|
listeners.splice(index, 1);
|
|
5111
5181
|
},
|
|
5112
5182
|
trigger() {
|
|
@@ -5136,8 +5206,8 @@ function useGlobalInputBlurTrigger() {
|
|
|
5136
5206
|
}
|
|
5137
5207
|
|
|
5138
5208
|
// src/components/internal/TextInput.tsx
|
|
5139
|
-
var ReadOnlyTextInput =
|
|
5140
|
-
return /* @__PURE__ */
|
|
5209
|
+
var ReadOnlyTextInput = forwardRef10(function ReadOnlyTextInput2({ onKeyDown, onFocusChange, value, ...rest }, forwardedRef) {
|
|
5210
|
+
return /* @__PURE__ */ React18.createElement(
|
|
5141
5211
|
"input",
|
|
5142
5212
|
{
|
|
5143
5213
|
ref: forwardedRef,
|
|
@@ -5148,7 +5218,7 @@ var ReadOnlyTextInput = forwardRef9(function ReadOnlyTextInput2({ onKeyDown, onF
|
|
|
5148
5218
|
}
|
|
5149
5219
|
);
|
|
5150
5220
|
});
|
|
5151
|
-
var ControlledTextInput =
|
|
5221
|
+
var ControlledTextInput = forwardRef10(function ControlledTextInput2({
|
|
5152
5222
|
onKeyDown,
|
|
5153
5223
|
value,
|
|
5154
5224
|
onChange,
|
|
@@ -5171,7 +5241,7 @@ var ControlledTextInput = forwardRef9(function ControlledTextInput2({
|
|
|
5171
5241
|
},
|
|
5172
5242
|
[onFocusCapture, onFocusChange]
|
|
5173
5243
|
);
|
|
5174
|
-
return /* @__PURE__ */
|
|
5244
|
+
return /* @__PURE__ */ React18.createElement(
|
|
5175
5245
|
"input",
|
|
5176
5246
|
{
|
|
5177
5247
|
ref: forwardedRef,
|
|
@@ -5187,7 +5257,7 @@ var ControlledTextInput = forwardRef9(function ControlledTextInput2({
|
|
|
5187
5257
|
}
|
|
5188
5258
|
);
|
|
5189
5259
|
});
|
|
5190
|
-
var SubmittableTextInput =
|
|
5260
|
+
var SubmittableTextInput = forwardRef10(function SubmittableTextInput2({
|
|
5191
5261
|
onKeyDown,
|
|
5192
5262
|
value,
|
|
5193
5263
|
onSubmit,
|
|
@@ -5198,7 +5268,7 @@ var SubmittableTextInput = forwardRef9(function SubmittableTextInput2({
|
|
|
5198
5268
|
submitAutomaticallyAfterDelay,
|
|
5199
5269
|
...rest
|
|
5200
5270
|
}, forwardedRef) {
|
|
5201
|
-
const ref =
|
|
5271
|
+
const ref = React18.useRef(null);
|
|
5202
5272
|
const latestValue = useRef11(value);
|
|
5203
5273
|
latestValue.current = value;
|
|
5204
5274
|
const userDidEdit = useRef11(false);
|
|
@@ -5210,16 +5280,14 @@ var SubmittableTextInput = forwardRef9(function SubmittableTextInput2({
|
|
|
5210
5280
|
const handleSubmit = useCallback10(() => {
|
|
5211
5281
|
const submissionValue = isSubmitTriggeredByEscapeKey.current ? value : internalValue;
|
|
5212
5282
|
isSubmitTriggeredByEscapeKey.current = false;
|
|
5213
|
-
if (submissionValue === value && !allowSubmittingWithSameValue)
|
|
5214
|
-
return;
|
|
5283
|
+
if (submissionValue === value && !allowSubmittingWithSameValue) return;
|
|
5215
5284
|
onSubmit(submissionValue);
|
|
5216
5285
|
userDidEdit.current = false;
|
|
5217
5286
|
setInternalValue(latestValue.current);
|
|
5218
5287
|
}, [allowSubmittingWithSameValue, value, internalValue, onSubmit]);
|
|
5219
5288
|
useGlobalInputBlurListener(
|
|
5220
5289
|
useCallback10(() => {
|
|
5221
|
-
if (ref.current !== document.activeElement)
|
|
5222
|
-
return;
|
|
5290
|
+
if (ref.current !== document.activeElement) return;
|
|
5223
5291
|
handleSubmit();
|
|
5224
5292
|
}, [handleSubmit])
|
|
5225
5293
|
);
|
|
@@ -5271,8 +5339,7 @@ var SubmittableTextInput = forwardRef9(function SubmittableTextInput2({
|
|
|
5271
5339
|
clearTimeout(autoSubmitTimeoutRef.current);
|
|
5272
5340
|
}
|
|
5273
5341
|
autoSubmitTimeoutRef.current = setTimeout(() => {
|
|
5274
|
-
if (userDidEdit.current === false)
|
|
5275
|
-
return;
|
|
5342
|
+
if (userDidEdit.current === false) return;
|
|
5276
5343
|
latestHandleSubmit.current();
|
|
5277
5344
|
}, submitAutomaticallyAfterDelay);
|
|
5278
5345
|
}
|
|
@@ -5282,7 +5349,7 @@ var SubmittableTextInput = forwardRef9(function SubmittableTextInput2({
|
|
|
5282
5349
|
}
|
|
5283
5350
|
};
|
|
5284
5351
|
}, [internalValue, submitAutomaticallyAfterDelay]);
|
|
5285
|
-
return /* @__PURE__ */
|
|
5352
|
+
return /* @__PURE__ */ React18.createElement(
|
|
5286
5353
|
"input",
|
|
5287
5354
|
{
|
|
5288
5355
|
ref: composeRefs(ref, forwardedRef),
|
|
@@ -5295,7 +5362,7 @@ var SubmittableTextInput = forwardRef9(function SubmittableTextInput2({
|
|
|
5295
5362
|
}
|
|
5296
5363
|
);
|
|
5297
5364
|
});
|
|
5298
|
-
var TextInput_default =
|
|
5365
|
+
var TextInput_default = forwardRef10(function TextInput(props, forwardedRef) {
|
|
5299
5366
|
const commonProps = {
|
|
5300
5367
|
onPointerDown: useCallback10(
|
|
5301
5368
|
(event) => event.stopPropagation(),
|
|
@@ -5314,17 +5381,17 @@ var TextInput_default = forwardRef9(function TextInput(props, forwardedRef) {
|
|
|
5314
5381
|
...props
|
|
5315
5382
|
};
|
|
5316
5383
|
if ("readOnly" in commonProps) {
|
|
5317
|
-
return /* @__PURE__ */
|
|
5384
|
+
return /* @__PURE__ */ React18.createElement(ReadOnlyTextInput, { ref: forwardedRef, ...commonProps, readOnly: true });
|
|
5318
5385
|
} else if ("onChange" in commonProps) {
|
|
5319
|
-
return /* @__PURE__ */
|
|
5386
|
+
return /* @__PURE__ */ React18.createElement(ControlledTextInput, { ref: forwardedRef, ...commonProps });
|
|
5320
5387
|
} else {
|
|
5321
|
-
return /* @__PURE__ */
|
|
5388
|
+
return /* @__PURE__ */ React18.createElement(SubmittableTextInput, { ref: forwardedRef, ...commonProps });
|
|
5322
5389
|
}
|
|
5323
5390
|
});
|
|
5324
5391
|
|
|
5325
5392
|
// src/components/Popover.tsx
|
|
5326
5393
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
5327
|
-
import
|
|
5394
|
+
import React19 from "react";
|
|
5328
5395
|
var closeStyles = {
|
|
5329
5396
|
all: "unset",
|
|
5330
5397
|
fontFamily: "inherit"
|
|
@@ -5346,7 +5413,7 @@ function Popover({
|
|
|
5346
5413
|
onFocusOutside,
|
|
5347
5414
|
onClickClose
|
|
5348
5415
|
}) {
|
|
5349
|
-
return /* @__PURE__ */
|
|
5416
|
+
return /* @__PURE__ */ React19.createElement(PopoverPrimitive.Root, { open, onOpenChange }, /* @__PURE__ */ React19.createElement(PopoverPrimitive.Trigger, { asChild: true }, trigger), /* @__PURE__ */ React19.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ React19.createElement(
|
|
5350
5417
|
PopoverPrimitive.Content,
|
|
5351
5418
|
{
|
|
5352
5419
|
className: `rounded font-[14px] bg-popover-background shadow-[0_2px_4px_rgba(0,0,0,0.2),0_0_12px_rgba(0,0,0,0.1)] max-h-[600px] overflow-y-auto text-text-muted z-[1000] ${variant === "large" ? "w-[680px]" : variant === "normal" ? "w-[240px]" : ""}`,
|
|
@@ -5362,14 +5429,14 @@ function Popover({
|
|
|
5362
5429
|
arrowPadding: 2
|
|
5363
5430
|
},
|
|
5364
5431
|
children2,
|
|
5365
|
-
showArrow && /* @__PURE__ */
|
|
5366
|
-
closable && /* @__PURE__ */
|
|
5432
|
+
showArrow && /* @__PURE__ */ React19.createElement(PopoverPrimitive.Arrow, { className: "fill-popover-background" }),
|
|
5433
|
+
closable && /* @__PURE__ */ React19.createElement(
|
|
5367
5434
|
PopoverPrimitive.Close,
|
|
5368
5435
|
{
|
|
5369
5436
|
className: "rounded-full h-[25px] w-[25px] inline-flex items-center justify-center absolute top-[5px] right-[5px]",
|
|
5370
5437
|
style: closeStyles
|
|
5371
5438
|
},
|
|
5372
|
-
/* @__PURE__ */
|
|
5439
|
+
/* @__PURE__ */ React19.createElement(IconButton, { iconName: "Cross2Icon", onClick: onClickClose })
|
|
5373
5440
|
)
|
|
5374
5441
|
)));
|
|
5375
5442
|
}
|
|
@@ -5385,13 +5452,13 @@ var InputFieldContext = createContext2({
|
|
|
5385
5452
|
onFocusChange: () => {
|
|
5386
5453
|
}
|
|
5387
5454
|
});
|
|
5388
|
-
var LabelContainer =
|
|
5455
|
+
var LabelContainer = forwardRef11(
|
|
5389
5456
|
({ pointerEvents, $labelPosition, $hasDropdown, $size, className, style: style5, ...props }, ref) => {
|
|
5390
5457
|
const memoizedStyles = useMemo7(() => ({
|
|
5391
5458
|
left: $labelPosition === "start" ? $size === "large" ? "6px" : $size === "medium" ? "2px" : "0px" : "",
|
|
5392
5459
|
right: $labelPosition === "end" ? $size === "large" ? "6px" : $size === "medium" ? "2px" : "0px" : ""
|
|
5393
5460
|
}), [$labelPosition, $size]);
|
|
5394
|
-
return /* @__PURE__ */
|
|
5461
|
+
return /* @__PURE__ */ React20.createElement(
|
|
5395
5462
|
"label",
|
|
5396
5463
|
{
|
|
5397
5464
|
ref,
|
|
@@ -5402,8 +5469,8 @@ var LabelContainer = forwardRef10(
|
|
|
5402
5469
|
);
|
|
5403
5470
|
}
|
|
5404
5471
|
);
|
|
5405
|
-
var InputFieldLabel =
|
|
5406
|
-
|
|
5472
|
+
var InputFieldLabel = memo9(
|
|
5473
|
+
forwardRef11(function InputFieldLabel2({
|
|
5407
5474
|
children: children2 = false,
|
|
5408
5475
|
pointerEvents = "none",
|
|
5409
5476
|
style: style5,
|
|
@@ -5412,14 +5479,12 @@ var InputFieldLabel = memo8(
|
|
|
5412
5479
|
const { labelPosition, hasDropdown, setLabelWidth, size: size3 } = useContext2(InputFieldContext);
|
|
5413
5480
|
const ref = useRef12(null);
|
|
5414
5481
|
useLayoutEffect4(() => {
|
|
5415
|
-
if (!setLabelWidth)
|
|
5416
|
-
return;
|
|
5482
|
+
if (!setLabelWidth) return;
|
|
5417
5483
|
const width = ref.current?.getBoundingClientRect().width;
|
|
5418
|
-
if (!width)
|
|
5419
|
-
return;
|
|
5484
|
+
if (!width) return;
|
|
5420
5485
|
setLabelWidth(width);
|
|
5421
5486
|
}, [setLabelWidth]);
|
|
5422
|
-
return /* @__PURE__ */
|
|
5487
|
+
return /* @__PURE__ */ React20.createElement(
|
|
5423
5488
|
LabelContainer,
|
|
5424
5489
|
{
|
|
5425
5490
|
$size: size3,
|
|
@@ -5437,7 +5502,7 @@ var InputFieldLabel = memo8(
|
|
|
5437
5502
|
);
|
|
5438
5503
|
})
|
|
5439
5504
|
);
|
|
5440
|
-
var DropdownContainer =
|
|
5505
|
+
var DropdownContainer = forwardRef11(({ className, ...props }, ref) => /* @__PURE__ */ React20.createElement(
|
|
5441
5506
|
"span",
|
|
5442
5507
|
{
|
|
5443
5508
|
ref,
|
|
@@ -5445,7 +5510,7 @@ var DropdownContainer = forwardRef10(({ className, ...props }, ref) => /* @__PUR
|
|
|
5445
5510
|
...props
|
|
5446
5511
|
}
|
|
5447
5512
|
));
|
|
5448
|
-
var InputFieldDropdownMenu =
|
|
5513
|
+
var InputFieldDropdownMenu = memo9(function InputFieldDropdownMenu2({ id, items, onSelect, children: children2 }) {
|
|
5449
5514
|
const { size: size3 } = useContext2(InputFieldContext);
|
|
5450
5515
|
const contentStyle = useMemo7(
|
|
5451
5516
|
() => ({
|
|
@@ -5454,7 +5519,7 @@ var InputFieldDropdownMenu = memo8(function InputFieldDropdownMenu2({ id, items,
|
|
|
5454
5519
|
}),
|
|
5455
5520
|
[size3]
|
|
5456
5521
|
);
|
|
5457
|
-
return /* @__PURE__ */
|
|
5522
|
+
return /* @__PURE__ */ React20.createElement(DropdownContainer, null, /* @__PURE__ */ React20.createElement(DropdownMenu, { items, onSelect }, children2 || /* @__PURE__ */ React20.createElement(
|
|
5458
5523
|
Button,
|
|
5459
5524
|
{
|
|
5460
5525
|
id,
|
|
@@ -5462,10 +5527,10 @@ var InputFieldDropdownMenu = memo8(function InputFieldDropdownMenu2({ id, items,
|
|
|
5462
5527
|
className: "flex flex-1",
|
|
5463
5528
|
contentStyle
|
|
5464
5529
|
},
|
|
5465
|
-
/* @__PURE__ */
|
|
5530
|
+
/* @__PURE__ */ React20.createElement(CaretDownIcon, null)
|
|
5466
5531
|
)));
|
|
5467
5532
|
});
|
|
5468
|
-
var ButtonContainer =
|
|
5533
|
+
var ButtonContainer = forwardRef11(({ $size, className, ...props }, ref) => /* @__PURE__ */ React20.createElement(
|
|
5469
5534
|
"span",
|
|
5470
5535
|
{
|
|
5471
5536
|
ref,
|
|
@@ -5473,17 +5538,15 @@ var ButtonContainer = forwardRef10(({ $size, className, ...props }, ref) => /* @
|
|
|
5473
5538
|
...props
|
|
5474
5539
|
}
|
|
5475
5540
|
));
|
|
5476
|
-
var InputFieldButton =
|
|
5477
|
-
|
|
5541
|
+
var InputFieldButton = memo9(
|
|
5542
|
+
forwardRef11(function InputFieldButton2(props, forwardedRef) {
|
|
5478
5543
|
const { children: children2, onClick, ...rest } = props;
|
|
5479
5544
|
const { size: size3, inputRef, setButtonWidth } = useContext2(InputFieldContext);
|
|
5480
5545
|
const ref = useRef12(null);
|
|
5481
5546
|
useLayoutEffect4(() => {
|
|
5482
|
-
if (!setButtonWidth)
|
|
5483
|
-
return;
|
|
5547
|
+
if (!setButtonWidth) return;
|
|
5484
5548
|
const width = ref.current?.getBoundingClientRect().width;
|
|
5485
|
-
if (!width)
|
|
5486
|
-
return;
|
|
5549
|
+
if (!width) return;
|
|
5487
5550
|
setButtonWidth(width);
|
|
5488
5551
|
}, [setButtonWidth]);
|
|
5489
5552
|
const defaultHandleClick = useCallback11(
|
|
@@ -5504,7 +5567,7 @@ var InputFieldButton = memo8(
|
|
|
5504
5567
|
},
|
|
5505
5568
|
[]
|
|
5506
5569
|
);
|
|
5507
|
-
return /* @__PURE__ */
|
|
5570
|
+
return /* @__PURE__ */ React20.createElement(ButtonContainer, { $size: size3 }, /* @__PURE__ */ React20.createElement(
|
|
5508
5571
|
Button,
|
|
5509
5572
|
{
|
|
5510
5573
|
ref: (element) => {
|
|
@@ -5522,7 +5585,7 @@ var InputFieldButton = memo8(
|
|
|
5522
5585
|
));
|
|
5523
5586
|
})
|
|
5524
5587
|
);
|
|
5525
|
-
var InputElement =
|
|
5588
|
+
var InputElement = forwardRef11(
|
|
5526
5589
|
({
|
|
5527
5590
|
disabled,
|
|
5528
5591
|
readOnly,
|
|
@@ -5544,7 +5607,7 @@ var InputElement = forwardRef10(
|
|
|
5544
5607
|
paddingLeft: `${paddingLeft}px`,
|
|
5545
5608
|
paddingRight: `${paddingRight}px`
|
|
5546
5609
|
}), [paddingLeft, paddingRight]);
|
|
5547
|
-
return /* @__PURE__ */
|
|
5610
|
+
return /* @__PURE__ */ React20.createElement(
|
|
5548
5611
|
TextInput_default,
|
|
5549
5612
|
{
|
|
5550
5613
|
value: value ?? "",
|
|
@@ -5558,7 +5621,7 @@ var InputElement = forwardRef10(
|
|
|
5558
5621
|
);
|
|
5559
5622
|
}
|
|
5560
5623
|
);
|
|
5561
|
-
var InputFieldInput =
|
|
5624
|
+
var InputFieldInput = forwardRef11(function InputFieldInput2({ textAlign, variant, ...rest }, forwardedRef) {
|
|
5562
5625
|
const {
|
|
5563
5626
|
labelPosition,
|
|
5564
5627
|
labelSize,
|
|
@@ -5577,7 +5640,7 @@ var InputFieldInput = forwardRef10(function InputFieldInput2({ textAlign, varian
|
|
|
5577
5640
|
useLayoutEffect4(() => {
|
|
5578
5641
|
setInputRef?.(forwardedRef);
|
|
5579
5642
|
}, [forwardedRef, setInputRef]);
|
|
5580
|
-
return /* @__PURE__ */
|
|
5643
|
+
return /* @__PURE__ */ React20.createElement(
|
|
5581
5644
|
InputElement,
|
|
5582
5645
|
{
|
|
5583
5646
|
ref: forwardedRef,
|
|
@@ -5600,7 +5663,7 @@ var InputFieldTypeahead = (props) => {
|
|
|
5600
5663
|
size: size3
|
|
5601
5664
|
// onFocusChange,
|
|
5602
5665
|
} = useContext2(InputFieldContext);
|
|
5603
|
-
return /* @__PURE__ */
|
|
5666
|
+
return /* @__PURE__ */ React20.createElement(
|
|
5604
5667
|
InputElement,
|
|
5605
5668
|
{
|
|
5606
5669
|
$labelPosition: labelPosition,
|
|
@@ -5611,8 +5674,8 @@ var InputFieldTypeahead = (props) => {
|
|
|
5611
5674
|
value: "",
|
|
5612
5675
|
className: "absolute inset-0 w-full h-full pointer-events-none bg-transparent shadow-none"
|
|
5613
5676
|
},
|
|
5614
|
-
/* @__PURE__ */
|
|
5615
|
-
/* @__PURE__ */
|
|
5677
|
+
/* @__PURE__ */ React20.createElement("span", { style: { opacity: 0 } }, props.prefix),
|
|
5678
|
+
/* @__PURE__ */ React20.createElement("span", { style: { opacity: 0.5 } }, props.value.slice(props.prefix.length))
|
|
5616
5679
|
);
|
|
5617
5680
|
};
|
|
5618
5681
|
function parseNumber(value) {
|
|
@@ -5635,8 +5698,7 @@ function InputFieldNumberInput(props) {
|
|
|
5635
5698
|
const handleKeyDown = useCallback11(
|
|
5636
5699
|
(event) => {
|
|
5637
5700
|
const amount = handleNudge(event);
|
|
5638
|
-
if (!amount)
|
|
5639
|
-
return;
|
|
5701
|
+
if (!amount) return;
|
|
5640
5702
|
onNudge?.(amount);
|
|
5641
5703
|
setInternalValue(void 0);
|
|
5642
5704
|
event.preventDefault();
|
|
@@ -5669,7 +5731,7 @@ function InputFieldNumberInput(props) {
|
|
|
5669
5731
|
},
|
|
5670
5732
|
[onBlur]
|
|
5671
5733
|
);
|
|
5672
|
-
return /* @__PURE__ */
|
|
5734
|
+
return /* @__PURE__ */ React20.createElement(
|
|
5673
5735
|
InputFieldInput,
|
|
5674
5736
|
{
|
|
5675
5737
|
...rest,
|
|
@@ -5681,7 +5743,7 @@ function InputFieldNumberInput(props) {
|
|
|
5681
5743
|
}
|
|
5682
5744
|
);
|
|
5683
5745
|
}
|
|
5684
|
-
var RootContainer =
|
|
5746
|
+
var RootContainer = forwardRef11(({ $width, $flex, className, ...props }, ref) => /* @__PURE__ */ React20.createElement(
|
|
5685
5747
|
"div",
|
|
5686
5748
|
{
|
|
5687
5749
|
ref,
|
|
@@ -5706,10 +5768,10 @@ function InputFieldRoot({
|
|
|
5706
5768
|
const hasDropdown = childrenArray.some(
|
|
5707
5769
|
(child) => isValidElement(child) && child.type === InputFieldDropdownMenu
|
|
5708
5770
|
);
|
|
5709
|
-
const [isFocused, setIsFocused] =
|
|
5710
|
-
const [measuredLabelSize, setMeasuredLabelSize] =
|
|
5711
|
-
const [measuredButtonSize, setMeasuredButtonSize] =
|
|
5712
|
-
const [measuredWidth, setMeasuredWidth] =
|
|
5771
|
+
const [isFocused, setIsFocused] = React20.useState(false);
|
|
5772
|
+
const [measuredLabelSize, setMeasuredLabelSize] = React20.useState();
|
|
5773
|
+
const [measuredButtonSize, setMeasuredButtonSize] = React20.useState();
|
|
5774
|
+
const [measuredWidth, setMeasuredWidth] = React20.useState();
|
|
5713
5775
|
const handleFocusChange = useCallback11(
|
|
5714
5776
|
(isFocused2) => {
|
|
5715
5777
|
setIsFocused(isFocused2);
|
|
@@ -5717,7 +5779,7 @@ function InputFieldRoot({
|
|
|
5717
5779
|
},
|
|
5718
5780
|
[onFocusChange]
|
|
5719
5781
|
);
|
|
5720
|
-
const [inputRef, setInputRef] =
|
|
5782
|
+
const [inputRef, setInputRef] = React20.useState();
|
|
5721
5783
|
useEffect11(() => {
|
|
5722
5784
|
if (inputRef && typeof inputRef !== "function") {
|
|
5723
5785
|
setMeasuredWidth?.(
|
|
@@ -5751,7 +5813,7 @@ function InputFieldRoot({
|
|
|
5751
5813
|
inputRef
|
|
5752
5814
|
]
|
|
5753
5815
|
);
|
|
5754
|
-
const rootElement = /* @__PURE__ */
|
|
5816
|
+
const rootElement = /* @__PURE__ */ React20.createElement(
|
|
5755
5817
|
RootContainer,
|
|
5756
5818
|
{
|
|
5757
5819
|
id,
|
|
@@ -5762,7 +5824,7 @@ function InputFieldRoot({
|
|
|
5762
5824
|
},
|
|
5763
5825
|
children2
|
|
5764
5826
|
);
|
|
5765
|
-
return /* @__PURE__ */
|
|
5827
|
+
return /* @__PURE__ */ React20.createElement(InputFieldContext.Provider, { value: contextValue }, renderPopoverContent ? /* @__PURE__ */ React20.createElement(
|
|
5766
5828
|
Popover,
|
|
5767
5829
|
{
|
|
5768
5830
|
open: true,
|
|
@@ -5778,7 +5840,7 @@ function InputFieldRoot({
|
|
|
5778
5840
|
event.stopPropagation();
|
|
5779
5841
|
}
|
|
5780
5842
|
},
|
|
5781
|
-
measuredWidth && /* @__PURE__ */
|
|
5843
|
+
measuredWidth && /* @__PURE__ */ React20.createElement("div", { className: `flex flex-col w-[${measuredWidth}] hidden` }, renderPopoverContent({ width: measuredWidth }))
|
|
5782
5844
|
) : rootElement);
|
|
5783
5845
|
}
|
|
5784
5846
|
var PrimitiveInputField = ({
|
|
@@ -5786,7 +5848,7 @@ var PrimitiveInputField = ({
|
|
|
5786
5848
|
disabled,
|
|
5787
5849
|
className,
|
|
5788
5850
|
...props
|
|
5789
|
-
}) => /* @__PURE__ */
|
|
5851
|
+
}) => /* @__PURE__ */ React20.createElement(
|
|
5790
5852
|
"input",
|
|
5791
5853
|
{
|
|
5792
5854
|
className: `flex w-0 flex-1 relative border-none outline-none min-w-0 self-stretch rounded py-1 px-1.5 bg-input-background select-all pointer-events-[all] focus:ring-2 focus:ring-primary focus:z-10 font-sans font-normal text-heading5 placeholder:text-text-disabled ${readOnly ? "text-text-muted" : disabled ? "text-text-disabled" : "text-text"} ${className ?? ""}`,
|
|
@@ -5795,10 +5857,10 @@ var PrimitiveInputField = ({
|
|
|
5795
5857
|
);
|
|
5796
5858
|
var InputField;
|
|
5797
5859
|
((InputField2) => {
|
|
5798
|
-
InputField2.Root =
|
|
5799
|
-
InputField2.Input =
|
|
5800
|
-
InputField2.Typeahead =
|
|
5801
|
-
InputField2.NumberInput =
|
|
5860
|
+
InputField2.Root = memo9(InputFieldRoot);
|
|
5861
|
+
InputField2.Input = memo9(InputFieldInput);
|
|
5862
|
+
InputField2.Typeahead = memo9(InputFieldTypeahead);
|
|
5863
|
+
InputField2.NumberInput = memo9(InputFieldNumberInput);
|
|
5802
5864
|
InputField2.DropdownMenu = InputFieldDropdownMenu;
|
|
5803
5865
|
InputField2.Button = InputFieldButton;
|
|
5804
5866
|
InputField2.Label = InputFieldLabel;
|
|
@@ -5824,13 +5886,11 @@ var DialogProvider = function DialogProvider2({
|
|
|
5824
5886
|
const [contents, setContents] = useState13();
|
|
5825
5887
|
const isOpen = !!contents;
|
|
5826
5888
|
const close = useCallback12(() => {
|
|
5827
|
-
if (!contents)
|
|
5828
|
-
return;
|
|
5889
|
+
if (!contents) return;
|
|
5829
5890
|
contents.resolve(void 0);
|
|
5830
5891
|
}, [contents]);
|
|
5831
5892
|
const submit = useCallback12(() => {
|
|
5832
|
-
if (!contents || !contents.inputValue)
|
|
5833
|
-
return;
|
|
5893
|
+
if (!contents || !contents.inputValue) return;
|
|
5834
5894
|
contents.resolve(contents.inputValue);
|
|
5835
5895
|
setContents(void 0);
|
|
5836
5896
|
}, [contents]);
|
|
@@ -5851,8 +5911,7 @@ var DialogProvider = function DialogProvider2({
|
|
|
5851
5911
|
);
|
|
5852
5912
|
const handleKeyDown = useCallback12(
|
|
5853
5913
|
(event) => {
|
|
5854
|
-
if (event.key !== "Enter")
|
|
5855
|
-
return;
|
|
5914
|
+
if (event.key !== "Enter") return;
|
|
5856
5915
|
event.stopPropagation();
|
|
5857
5916
|
event.preventDefault();
|
|
5858
5917
|
submit();
|
|
@@ -5862,11 +5921,10 @@ var DialogProvider = function DialogProvider2({
|
|
|
5862
5921
|
const inputRef = useRef13(null);
|
|
5863
5922
|
const dialogRef = useRef13(null);
|
|
5864
5923
|
const containsElement = useCallback12((element) => {
|
|
5865
|
-
if (!dialogRef.current)
|
|
5866
|
-
return false;
|
|
5924
|
+
if (!dialogRef.current) return false;
|
|
5867
5925
|
return dialogRef.current.containsElement(element);
|
|
5868
5926
|
}, []);
|
|
5869
|
-
return /* @__PURE__ */
|
|
5927
|
+
return /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement(
|
|
5870
5928
|
DialogContext.Provider,
|
|
5871
5929
|
{
|
|
5872
5930
|
value: useMemo8(
|
|
@@ -5875,7 +5933,7 @@ var DialogProvider = function DialogProvider2({
|
|
|
5875
5933
|
)
|
|
5876
5934
|
},
|
|
5877
5935
|
children2
|
|
5878
|
-
), /* @__PURE__ */
|
|
5936
|
+
), /* @__PURE__ */ React21.createElement(
|
|
5879
5937
|
Dialog,
|
|
5880
5938
|
{
|
|
5881
5939
|
ref: dialogRef,
|
|
@@ -5896,7 +5954,7 @@ var DialogProvider = function DialogProvider2({
|
|
|
5896
5954
|
inputRef.current?.setSelectionRange(0, inputRef.current.value.length);
|
|
5897
5955
|
}, [])
|
|
5898
5956
|
},
|
|
5899
|
-
/* @__PURE__ */
|
|
5957
|
+
/* @__PURE__ */ React21.createElement(InputField.Root, null, /* @__PURE__ */ React21.createElement(
|
|
5900
5958
|
InputField.Input,
|
|
5901
5959
|
{
|
|
5902
5960
|
ref: inputRef,
|
|
@@ -5912,8 +5970,8 @@ var DialogProvider = function DialogProvider2({
|
|
|
5912
5970
|
onKeyDown: handleKeyDown
|
|
5913
5971
|
}
|
|
5914
5972
|
)),
|
|
5915
|
-
/* @__PURE__ */
|
|
5916
|
-
/* @__PURE__ */
|
|
5973
|
+
/* @__PURE__ */ React21.createElement(Spacer.Vertical, { size: 20 }),
|
|
5974
|
+
/* @__PURE__ */ React21.createElement("div", { className: "flex-1 flex-row items-center" }, /* @__PURE__ */ React21.createElement(Spacer.Horizontal, null), /* @__PURE__ */ React21.createElement(Button, { onClick: close }, "Cancel"), /* @__PURE__ */ React21.createElement(Spacer.Horizontal, { size: 16 }), /* @__PURE__ */ React21.createElement(Button, { disabled: !contents?.inputValue, onClick: submit }, "Submit"))
|
|
5917
5975
|
));
|
|
5918
5976
|
};
|
|
5919
5977
|
function useDialog() {
|
|
@@ -5932,7 +5990,7 @@ function useDialogContainsElement() {
|
|
|
5932
5990
|
|
|
5933
5991
|
// src/contexts/FloatingWindowContext.tsx
|
|
5934
5992
|
import { uuid } from "@noya-app/noya-utils";
|
|
5935
|
-
import
|
|
5993
|
+
import React22, { createContext as createContext4, useContext as useContext4, useMemo as useMemo9, useState as useState14 } from "react";
|
|
5936
5994
|
import { createPortal } from "react-dom";
|
|
5937
5995
|
var FloatingWindowContext = createContext4(void 0);
|
|
5938
5996
|
var CurrentWindowContext = createContext4(void 0);
|
|
@@ -5945,7 +6003,7 @@ var FloatingWindowProvider = ({
|
|
|
5945
6003
|
const id = uuid();
|
|
5946
6004
|
setWindows((windows2) => ({
|
|
5947
6005
|
...windows2,
|
|
5948
|
-
[id]: /* @__PURE__ */
|
|
6006
|
+
[id]: /* @__PURE__ */ React22.createElement(CurrentWindowContext.Provider, { value: { id } }, element)
|
|
5949
6007
|
}));
|
|
5950
6008
|
return id;
|
|
5951
6009
|
};
|
|
@@ -5957,7 +6015,7 @@ var FloatingWindowProvider = ({
|
|
|
5957
6015
|
};
|
|
5958
6016
|
return { createWindow, closeWindow };
|
|
5959
6017
|
}, []);
|
|
5960
|
-
return /* @__PURE__ */
|
|
6018
|
+
return /* @__PURE__ */ React22.createElement(FloatingWindowContext.Provider, { value: contextValue }, children2, Object.entries(windows).map(
|
|
5961
6019
|
([id, element]) => createPortal(element, document.body, id)
|
|
5962
6020
|
));
|
|
5963
6021
|
};
|
|
@@ -5982,7 +6040,7 @@ var useCurrentFloatingWindowInternal = () => {
|
|
|
5982
6040
|
var DesignSystemConfigurationContext = createContext5({
|
|
5983
6041
|
platform: "key"
|
|
5984
6042
|
});
|
|
5985
|
-
var DesignSystemConfigurationProvider =
|
|
6043
|
+
var DesignSystemConfigurationProvider = memo10(
|
|
5986
6044
|
function DesignSystemConfigurationProvider2({
|
|
5987
6045
|
children: children2,
|
|
5988
6046
|
platform
|
|
@@ -5991,8 +6049,7 @@ var DesignSystemConfigurationProvider = memo9(
|
|
|
5991
6049
|
platform ?? "key"
|
|
5992
6050
|
);
|
|
5993
6051
|
useEffect12(() => {
|
|
5994
|
-
if (platform !== void 0)
|
|
5995
|
-
return;
|
|
6052
|
+
if (platform !== void 0) return;
|
|
5996
6053
|
if (typeof navigator !== "undefined") {
|
|
5997
6054
|
setInternalPlatform(getCurrentPlatform(navigator));
|
|
5998
6055
|
}
|
|
@@ -6001,7 +6058,7 @@ var DesignSystemConfigurationProvider = memo9(
|
|
|
6001
6058
|
() => ({ platform: platform ?? internalPlatform }),
|
|
6002
6059
|
[platform, internalPlatform]
|
|
6003
6060
|
);
|
|
6004
|
-
return /* @__PURE__ */
|
|
6061
|
+
return /* @__PURE__ */ React23.createElement(DesignSystemConfigurationContext.Provider, { value: contextValue }, /* @__PURE__ */ React23.createElement(DialogProvider, null, /* @__PURE__ */ React23.createElement(ToastProvider, null, /* @__PURE__ */ React23.createElement(FloatingWindowProvider, null, children2))));
|
|
6005
6062
|
}
|
|
6006
6063
|
);
|
|
6007
6064
|
function useDesignSystemConfiguration() {
|
|
@@ -6009,19 +6066,34 @@ function useDesignSystemConfiguration() {
|
|
|
6009
6066
|
}
|
|
6010
6067
|
|
|
6011
6068
|
// src/utils/withSeparatorElements.ts
|
|
6012
|
-
import {
|
|
6069
|
+
import {
|
|
6070
|
+
Children as Children2,
|
|
6071
|
+
cloneElement,
|
|
6072
|
+
Fragment,
|
|
6073
|
+
isValidElement as isValidElement2
|
|
6074
|
+
} from "react";
|
|
6075
|
+
function flattenChildren(children2, traverseFragments) {
|
|
6076
|
+
return Children2.toArray(children2).flatMap((child) => {
|
|
6077
|
+
if (traverseFragments && isValidElement2(child) && child.type === Fragment) {
|
|
6078
|
+
return flattenChildren(child.props.children, traverseFragments);
|
|
6079
|
+
}
|
|
6080
|
+
return child;
|
|
6081
|
+
});
|
|
6082
|
+
}
|
|
6013
6083
|
function createKey(key) {
|
|
6014
6084
|
return `s-${key}`;
|
|
6015
6085
|
}
|
|
6016
|
-
function withSeparatorElements(elements2, separator) {
|
|
6017
|
-
const childrenArray =
|
|
6086
|
+
function withSeparatorElements(elements2, separator, options) {
|
|
6087
|
+
const childrenArray = flattenChildren(
|
|
6088
|
+
elements2,
|
|
6089
|
+
options?.traverseFragments ?? true
|
|
6090
|
+
);
|
|
6018
6091
|
for (let i = childrenArray.length - 1; i > 0; i--) {
|
|
6019
6092
|
let sep = typeof separator === "function" ? separator() : isValidElement2(separator) ? cloneElement(separator, { key: createKey(i) }) : separator;
|
|
6020
6093
|
if (isValidElement2(sep) && sep.key == null) {
|
|
6021
6094
|
sep = cloneElement(sep, { key: createKey(i) });
|
|
6022
6095
|
}
|
|
6023
|
-
if (!sep || typeof sep === "boolean")
|
|
6024
|
-
continue;
|
|
6096
|
+
if (!sep || typeof sep === "boolean") continue;
|
|
6025
6097
|
childrenArray.splice(i, 0, sep);
|
|
6026
6098
|
}
|
|
6027
6099
|
return childrenArray;
|
|
@@ -6060,12 +6132,9 @@ var styles = {
|
|
|
6060
6132
|
`
|
|
6061
6133
|
};
|
|
6062
6134
|
function getKeyboardShortcuts(item) {
|
|
6063
|
-
if (item === SEPARATOR_ITEM)
|
|
6064
|
-
|
|
6065
|
-
if (item.
|
|
6066
|
-
return item.items.flatMap(getKeyboardShortcuts);
|
|
6067
|
-
if (item.disabled || !item.value || !item.shortcut)
|
|
6068
|
-
return [];
|
|
6135
|
+
if (item === SEPARATOR_ITEM) return [];
|
|
6136
|
+
if (item.items) return item.items.flatMap(getKeyboardShortcuts);
|
|
6137
|
+
if (item.disabled || !item.value || !item.shortcut) return [];
|
|
6069
6138
|
return [[item.shortcut, item.value]];
|
|
6070
6139
|
}
|
|
6071
6140
|
function getKeyboardShortcutsForMenuItems(menuItems, onSelect) {
|
|
@@ -6073,13 +6142,13 @@ function getKeyboardShortcutsForMenuItems(menuItems, onSelect) {
|
|
|
6073
6142
|
menuItems.flatMap(getKeyboardShortcuts).map(([key, value]) => [key, () => onSelect(value)])
|
|
6074
6143
|
);
|
|
6075
6144
|
}
|
|
6076
|
-
var ShortcutElement = ({ children: children2, fixedWidth }) => /* @__PURE__ */
|
|
6077
|
-
var KeyboardShortcut =
|
|
6145
|
+
var ShortcutElement = ({ children: children2, fixedWidth }) => /* @__PURE__ */ React24.createElement("kbd", { className: cn(textStyles.small, "text-text-disabled", fixedWidth && "w-[0.9rem] text-center") }, children2);
|
|
6146
|
+
var KeyboardShortcut = memo11(function KeyboardShortcut2({
|
|
6078
6147
|
shortcut
|
|
6079
6148
|
}) {
|
|
6080
6149
|
const platform = useDesignSystemConfiguration().platform;
|
|
6081
6150
|
const { keys, separator } = getShortcutDisplayParts(shortcut, platform);
|
|
6082
|
-
const keyElements = keys.map((key) => /* @__PURE__ */
|
|
6151
|
+
const keyElements = keys.map((key) => /* @__PURE__ */ React24.createElement(
|
|
6083
6152
|
ShortcutElement,
|
|
6084
6153
|
{
|
|
6085
6154
|
key,
|
|
@@ -6087,14 +6156,14 @@ var KeyboardShortcut = memo10(function KeyboardShortcut2({
|
|
|
6087
6156
|
},
|
|
6088
6157
|
key
|
|
6089
6158
|
));
|
|
6090
|
-
return /* @__PURE__ */
|
|
6159
|
+
return /* @__PURE__ */ React24.createElement(React24.Fragment, null, separator ? withSeparatorElements(
|
|
6091
6160
|
keyElements,
|
|
6092
|
-
/* @__PURE__ */
|
|
6161
|
+
/* @__PURE__ */ React24.createElement(ShortcutElement, null, separator)
|
|
6093
6162
|
) : keyElements);
|
|
6094
6163
|
});
|
|
6095
6164
|
|
|
6096
6165
|
// src/components/ContextMenu.tsx
|
|
6097
|
-
var ContextMenuItem2 =
|
|
6166
|
+
var ContextMenuItem2 = memo12(function ContextMenuItem3({
|
|
6098
6167
|
value,
|
|
6099
6168
|
children: children2,
|
|
6100
6169
|
onSelect,
|
|
@@ -6110,12 +6179,11 @@ var ContextMenuItem2 = memo11(function ContextMenuItem3({
|
|
|
6110
6179
|
[]
|
|
6111
6180
|
);
|
|
6112
6181
|
const handleSelectItem = useCallback13(() => {
|
|
6113
|
-
if (!value)
|
|
6114
|
-
return;
|
|
6182
|
+
if (!value) return;
|
|
6115
6183
|
onSelect(value);
|
|
6116
6184
|
}, [onSelect, value]);
|
|
6117
6185
|
if (checked) {
|
|
6118
|
-
return /* @__PURE__ */
|
|
6186
|
+
return /* @__PURE__ */ React25.createElement(
|
|
6119
6187
|
RadixContextMenu.CheckboxItem,
|
|
6120
6188
|
{
|
|
6121
6189
|
checked,
|
|
@@ -6123,11 +6191,11 @@ var ContextMenuItem2 = memo11(function ContextMenuItem3({
|
|
|
6123
6191
|
onSelect: handleSelectItem,
|
|
6124
6192
|
className: styles.itemStyle({ disabled })
|
|
6125
6193
|
},
|
|
6126
|
-
/* @__PURE__ */
|
|
6194
|
+
/* @__PURE__ */ React25.createElement(RadixContextMenu.ItemIndicator, { className: styles.itemIndicatorStyle }, /* @__PURE__ */ React25.createElement(CheckIcon2, null)),
|
|
6127
6195
|
children2
|
|
6128
6196
|
);
|
|
6129
6197
|
}
|
|
6130
|
-
const element = /* @__PURE__ */
|
|
6198
|
+
const element = /* @__PURE__ */ React25.createElement(
|
|
6131
6199
|
RadixContextMenu.Item,
|
|
6132
6200
|
{
|
|
6133
6201
|
className: styles.itemStyle({ disabled }),
|
|
@@ -6135,14 +6203,14 @@ var ContextMenuItem2 = memo11(function ContextMenuItem3({
|
|
|
6135
6203
|
onSelect: handleSelectItem,
|
|
6136
6204
|
onPointerDown: handlePointerDown
|
|
6137
6205
|
},
|
|
6138
|
-
indented && /* @__PURE__ */
|
|
6139
|
-
icon && /* @__PURE__ */
|
|
6206
|
+
indented && /* @__PURE__ */ React25.createElement(Spacer.Horizontal, { size: CHECKBOX_WIDTH - CHECKBOX_RIGHT_INSET }),
|
|
6207
|
+
icon && /* @__PURE__ */ React25.createElement(React25.Fragment, null, renderIcon(icon), /* @__PURE__ */ React25.createElement(Spacer.Horizontal, { size: 8 })),
|
|
6140
6208
|
children2,
|
|
6141
|
-
shortcut && /* @__PURE__ */
|
|
6142
|
-
items && items.length > 0 && /* @__PURE__ */
|
|
6209
|
+
shortcut && /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement(Spacer.Horizontal, null), /* @__PURE__ */ React25.createElement(Spacer.Horizontal, { size: 24 }), /* @__PURE__ */ React25.createElement(KeyboardShortcut, { shortcut })),
|
|
6210
|
+
items && items.length > 0 && /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement(Spacer.Horizontal, null), /* @__PURE__ */ React25.createElement(Spacer.Horizontal, { size: 16 }), /* @__PURE__ */ React25.createElement(ChevronRightIcon2, null))
|
|
6143
6211
|
);
|
|
6144
6212
|
if (items && items.length > 0) {
|
|
6145
|
-
return /* @__PURE__ */
|
|
6213
|
+
return /* @__PURE__ */ React25.createElement(ContextMenuRoot, { isNested: true, items, onSelect }, element);
|
|
6146
6214
|
} else {
|
|
6147
6215
|
return element;
|
|
6148
6216
|
}
|
|
@@ -6169,8 +6237,8 @@ function ContextMenuRoot({
|
|
|
6169
6237
|
const RootComponent = isNested ? RadixContextMenu.Sub : RadixContextMenu.Root;
|
|
6170
6238
|
const TriggerComponent = isNested ? RadixContextMenu.SubTrigger : RadixContextMenu.Trigger;
|
|
6171
6239
|
const ContentComponent = isNested ? RadixContextMenu.SubContent : RadixContextMenu.Content;
|
|
6172
|
-
return /* @__PURE__ */
|
|
6173
|
-
(item, index) => item === SEPARATOR_ITEM ? /* @__PURE__ */
|
|
6240
|
+
return /* @__PURE__ */ React25.createElement(RootComponent, { onOpenChange }, /* @__PURE__ */ React25.createElement(TriggerComponent, { asChild: true, onPointerDown }, children2), /* @__PURE__ */ React25.createElement(RadixContextMenu.Portal, null, /* @__PURE__ */ React25.createElement(ContentComponent, { className: styles.contentStyle }, items.map(
|
|
6241
|
+
(item, index) => item === SEPARATOR_ITEM ? /* @__PURE__ */ React25.createElement(RadixContextMenu.Separator, { key: index, className: styles.separatorStyle }) : /* @__PURE__ */ React25.createElement(
|
|
6174
6242
|
ContextMenuItem2,
|
|
6175
6243
|
{
|
|
6176
6244
|
key: item.value ?? index,
|
|
@@ -6187,18 +6255,18 @@ function ContextMenuRoot({
|
|
|
6187
6255
|
)
|
|
6188
6256
|
))));
|
|
6189
6257
|
}
|
|
6190
|
-
var ContextMenu =
|
|
6258
|
+
var ContextMenu = memo12(ContextMenuRoot);
|
|
6191
6259
|
|
|
6192
6260
|
// src/components/Divider.tsx
|
|
6193
|
-
import
|
|
6194
|
-
var Divider =
|
|
6261
|
+
import React26, { memo as memo13 } from "react";
|
|
6262
|
+
var Divider = memo13(function Divider2({
|
|
6195
6263
|
variant = "normal",
|
|
6196
6264
|
overflow = 0,
|
|
6197
6265
|
className,
|
|
6198
6266
|
style: style5,
|
|
6199
6267
|
...props
|
|
6200
6268
|
}) {
|
|
6201
|
-
return /* @__PURE__ */
|
|
6269
|
+
return /* @__PURE__ */ React26.createElement(
|
|
6202
6270
|
"div",
|
|
6203
6271
|
{
|
|
6204
6272
|
className: `
|
|
@@ -6216,13 +6284,13 @@ var Divider = memo12(function Divider2({
|
|
|
6216
6284
|
}
|
|
6217
6285
|
);
|
|
6218
6286
|
});
|
|
6219
|
-
var DividerVertical =
|
|
6287
|
+
var DividerVertical = memo13(function DividerVertical2({
|
|
6220
6288
|
variant = "normal",
|
|
6221
6289
|
overflow = 0,
|
|
6222
6290
|
className,
|
|
6223
6291
|
...props
|
|
6224
6292
|
}) {
|
|
6225
|
-
return /* @__PURE__ */
|
|
6293
|
+
return /* @__PURE__ */ React26.createElement(
|
|
6226
6294
|
"div",
|
|
6227
6295
|
{
|
|
6228
6296
|
className: `
|
|
@@ -6239,8 +6307,8 @@ var DividerVertical = memo12(function DividerVertical2({
|
|
|
6239
6307
|
|
|
6240
6308
|
// src/components/DraggableMenuButton.tsx
|
|
6241
6309
|
import { DragHandleDots2Icon } from "@noya-app/noya-icons";
|
|
6242
|
-
import
|
|
6243
|
-
var DotButton =
|
|
6310
|
+
import React27, { forwardRef as forwardRef12, memo as memo14, useCallback as useCallback14, useState as useState16 } from "react";
|
|
6311
|
+
var DotButton = forwardRef12(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
|
6244
6312
|
"div",
|
|
6245
6313
|
{
|
|
6246
6314
|
ref,
|
|
@@ -6248,7 +6316,7 @@ var DotButton = forwardRef11(({ className, ...props }, ref) => /* @__PURE__ */ R
|
|
|
6248
6316
|
...props
|
|
6249
6317
|
}
|
|
6250
6318
|
));
|
|
6251
|
-
var Trigger5 =
|
|
6319
|
+
var Trigger5 = forwardRef12(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
|
6252
6320
|
"div",
|
|
6253
6321
|
{
|
|
6254
6322
|
ref,
|
|
@@ -6256,7 +6324,7 @@ var Trigger5 = forwardRef11(({ className, ...props }, ref) => /* @__PURE__ */ Re
|
|
|
6256
6324
|
...props
|
|
6257
6325
|
}
|
|
6258
6326
|
));
|
|
6259
|
-
var DraggableMenuButton =
|
|
6327
|
+
var DraggableMenuButton = memo14(function DraggableMenuButton2({
|
|
6260
6328
|
items,
|
|
6261
6329
|
onSelect,
|
|
6262
6330
|
isVisible = true
|
|
@@ -6294,12 +6362,11 @@ var DraggableMenuButton = memo13(function DraggableMenuButton2({
|
|
|
6294
6362
|
);
|
|
6295
6363
|
const handleOpenChange = useCallback14(
|
|
6296
6364
|
(isOpen) => {
|
|
6297
|
-
if (!isOpen)
|
|
6298
|
-
setOpen(false);
|
|
6365
|
+
if (!isOpen) setOpen(false);
|
|
6299
6366
|
},
|
|
6300
6367
|
[setOpen]
|
|
6301
6368
|
);
|
|
6302
|
-
return /* @__PURE__ */
|
|
6369
|
+
return /* @__PURE__ */ React27.createElement(
|
|
6303
6370
|
DotButton,
|
|
6304
6371
|
{
|
|
6305
6372
|
onPointerDownCapture: handlePointerDownCapture,
|
|
@@ -6309,7 +6376,7 @@ var DraggableMenuButton = memo13(function DraggableMenuButton2({
|
|
|
6309
6376
|
event.preventDefault();
|
|
6310
6377
|
}
|
|
6311
6378
|
},
|
|
6312
|
-
items && onSelect ? /* @__PURE__ */
|
|
6379
|
+
items && onSelect ? /* @__PURE__ */ React27.createElement(
|
|
6313
6380
|
DropdownMenu,
|
|
6314
6381
|
{
|
|
6315
6382
|
open,
|
|
@@ -6318,13 +6385,13 @@ var DraggableMenuButton = memo13(function DraggableMenuButton2({
|
|
|
6318
6385
|
onSelect,
|
|
6319
6386
|
shouldBindKeyboardShortcuts: false
|
|
6320
6387
|
},
|
|
6321
|
-
/* @__PURE__ */
|
|
6388
|
+
/* @__PURE__ */ React27.createElement(Trigger5, null, /* @__PURE__ */ React27.createElement(
|
|
6322
6389
|
DragHandleDots2Icon,
|
|
6323
6390
|
{
|
|
6324
6391
|
color: isVisible || open ? "var(--icon)" : "transparent"
|
|
6325
6392
|
}
|
|
6326
6393
|
))
|
|
6327
|
-
) : /* @__PURE__ */
|
|
6394
|
+
) : /* @__PURE__ */ React27.createElement(
|
|
6328
6395
|
DragHandleDots2Icon,
|
|
6329
6396
|
{
|
|
6330
6397
|
color: isVisible || open ? "var(--icon)" : "transparent"
|
|
@@ -6334,7 +6401,7 @@ var DraggableMenuButton = memo13(function DraggableMenuButton2({
|
|
|
6334
6401
|
});
|
|
6335
6402
|
|
|
6336
6403
|
// src/components/FillInputField.tsx
|
|
6337
|
-
import
|
|
6404
|
+
import React30, { forwardRef as forwardRef13, memo as memo17 } from "react";
|
|
6338
6405
|
|
|
6339
6406
|
// ../noya-file-format/src/types.ts
|
|
6340
6407
|
var types_exports = {};
|
|
@@ -6659,19 +6726,19 @@ var ClassValue = /* @__PURE__ */ ((ClassValue2) => {
|
|
|
6659
6726
|
})(ClassValue || {});
|
|
6660
6727
|
|
|
6661
6728
|
// src/components/FillPreviewBackground.tsx
|
|
6662
|
-
import
|
|
6729
|
+
import React29, { memo as memo16, useMemo as useMemo14 } from "react";
|
|
6663
6730
|
|
|
6664
6731
|
// src/contexts/ImageDataContext.tsx
|
|
6665
|
-
import
|
|
6732
|
+
import React28, {
|
|
6666
6733
|
createContext as createContext6,
|
|
6667
|
-
memo as
|
|
6734
|
+
memo as memo15,
|
|
6668
6735
|
useContext as useContext6,
|
|
6669
6736
|
useMemo as useMemo12
|
|
6670
6737
|
} from "react";
|
|
6671
6738
|
var ImageDataContext = createContext6(
|
|
6672
6739
|
void 0
|
|
6673
6740
|
);
|
|
6674
|
-
var ImageDataProvider =
|
|
6741
|
+
var ImageDataProvider = memo15(function ImageDataProvider2({
|
|
6675
6742
|
children: children2,
|
|
6676
6743
|
getImageData
|
|
6677
6744
|
}) {
|
|
@@ -6679,7 +6746,7 @@ var ImageDataProvider = memo14(function ImageDataProvider2({
|
|
|
6679
6746
|
() => ({ getImageData: getImageData ?? (() => void 0) }),
|
|
6680
6747
|
[getImageData]
|
|
6681
6748
|
);
|
|
6682
|
-
return /* @__PURE__ */
|
|
6749
|
+
return /* @__PURE__ */ React28.createElement(ImageDataContext.Provider, { value: contextValue }, children2);
|
|
6683
6750
|
});
|
|
6684
6751
|
function useImageData(ref) {
|
|
6685
6752
|
const value = useContext6(ImageDataContext);
|
|
@@ -6693,8 +6760,7 @@ function useImageData(ref) {
|
|
|
6693
6760
|
import { useLayoutEffect as useLayoutEffect5, useMemo as useMemo13 } from "react";
|
|
6694
6761
|
function useObjectURL(object) {
|
|
6695
6762
|
const objectURL = useMemo13(() => {
|
|
6696
|
-
if (object instanceof Blob)
|
|
6697
|
-
return URL.createObjectURL(object);
|
|
6763
|
+
if (object instanceof Blob) return URL.createObjectURL(object);
|
|
6698
6764
|
const bytes = object instanceof Uint8Array ? object : object !== void 0 ? new Uint8Array(object) : new Uint8Array();
|
|
6699
6765
|
return URL.createObjectURL(new Blob([bytes]));
|
|
6700
6766
|
}, [object]);
|
|
@@ -6753,8 +6819,8 @@ var dotsHorizontalSvg = (fillColor) => `
|
|
|
6753
6819
|
<path d='M3.625 7.5C3.625 8.12132 3.12132 8.625 2.5 8.625C1.87868 8.625 1.375 8.12132 1.375 7.5C1.375 6.87868 1.87868 6.375 2.5 6.375C3.12132 6.375 3.625 6.87868 3.625 7.5ZM8.625 7.5C8.625 8.12132 8.12132 8.625 7.5 8.625C6.87868 8.625 6.375 8.12132 6.375 7.5C6.375 6.87868 6.87868 6.375 7.5 6.375C8.12132 6.375 8.625 6.87868 8.625 7.5ZM12.5 8.625C13.1213 8.625 13.625 8.12132 13.625 7.5C13.625 6.87868 13.1213 6.375 12.5 6.375C11.8787 6.375 11.375 6.87868 11.375 7.5C11.375 8.12132 11.8787 8.625 12.5 8.625Z'></path>
|
|
6754
6820
|
</svg>
|
|
6755
6821
|
`;
|
|
6756
|
-
var Background =
|
|
6757
|
-
return /* @__PURE__ */
|
|
6822
|
+
var Background = memo16(function Background2({ background: background2 }) {
|
|
6823
|
+
return /* @__PURE__ */ React29.createElement(
|
|
6758
6824
|
"span",
|
|
6759
6825
|
{
|
|
6760
6826
|
className: cn(
|
|
@@ -6776,7 +6842,7 @@ function getPatternSizeAndPosition(fillType, tileScale) {
|
|
|
6776
6842
|
return "center / 100% 100%";
|
|
6777
6843
|
}
|
|
6778
6844
|
}
|
|
6779
|
-
var PatternPreviewBackground =
|
|
6845
|
+
var PatternPreviewBackground = memo16(function PatternPreviewBackground2({
|
|
6780
6846
|
fillType,
|
|
6781
6847
|
tileScale,
|
|
6782
6848
|
imageRef
|
|
@@ -6792,45 +6858,43 @@ var PatternPreviewBackground = memo15(function PatternPreviewBackground2({
|
|
|
6792
6858
|
].join(" "),
|
|
6793
6859
|
[fillType, size3, url]
|
|
6794
6860
|
);
|
|
6795
|
-
return /* @__PURE__ */
|
|
6861
|
+
return /* @__PURE__ */ React29.createElement(Background, { background: background2 });
|
|
6796
6862
|
});
|
|
6797
|
-
var ColorPreviewBackground =
|
|
6863
|
+
var ColorPreviewBackground = memo16(function ColorPreviewBackground2({
|
|
6798
6864
|
color
|
|
6799
6865
|
}) {
|
|
6800
6866
|
const background2 = useMemo14(() => sketchColorToRgbaString(color), [color]);
|
|
6801
|
-
return /* @__PURE__ */
|
|
6867
|
+
return /* @__PURE__ */ React29.createElement(Background, { background: background2 });
|
|
6802
6868
|
});
|
|
6803
|
-
var GradientPreviewBackground =
|
|
6869
|
+
var GradientPreviewBackground = memo16(function GradientPreviewBackground2({
|
|
6804
6870
|
gradient
|
|
6805
6871
|
}) {
|
|
6806
6872
|
const background2 = useMemo14(
|
|
6807
6873
|
() => getGradientBackground(gradient.stops, gradient.gradientType, 180),
|
|
6808
6874
|
[gradient.gradientType, gradient.stops]
|
|
6809
6875
|
);
|
|
6810
|
-
return /* @__PURE__ */
|
|
6876
|
+
return /* @__PURE__ */ React29.createElement(Background, { background: background2 });
|
|
6811
6877
|
});
|
|
6812
6878
|
var background = `center url("data:image/svg+xml;utf8,${dotsHorizontalSvg(
|
|
6813
6879
|
"var(--placeholder-dots)"
|
|
6814
6880
|
)}") no-repeat`;
|
|
6815
|
-
var FillPreviewBackground =
|
|
6881
|
+
var FillPreviewBackground = memo16(function FillPreviewBackground2({
|
|
6816
6882
|
value
|
|
6817
6883
|
}) {
|
|
6818
|
-
if (!value)
|
|
6819
|
-
|
|
6820
|
-
|
|
6821
|
-
|
|
6822
|
-
|
|
6823
|
-
|
|
6824
|
-
);
|
|
6884
|
+
if (!value) return /* @__PURE__ */ React29.createElement(
|
|
6885
|
+
Background,
|
|
6886
|
+
{
|
|
6887
|
+
background
|
|
6888
|
+
}
|
|
6889
|
+
);
|
|
6825
6890
|
switch (value._class) {
|
|
6826
6891
|
case "color":
|
|
6827
|
-
return /* @__PURE__ */
|
|
6892
|
+
return /* @__PURE__ */ React29.createElement(ColorPreviewBackground, { color: value });
|
|
6828
6893
|
case "gradient":
|
|
6829
|
-
return /* @__PURE__ */
|
|
6894
|
+
return /* @__PURE__ */ React29.createElement(GradientPreviewBackground, { gradient: value });
|
|
6830
6895
|
case "pattern":
|
|
6831
|
-
if (!value.image)
|
|
6832
|
-
|
|
6833
|
-
return /* @__PURE__ */ React28.createElement(
|
|
6896
|
+
if (!value.image) return null;
|
|
6897
|
+
return /* @__PURE__ */ React29.createElement(
|
|
6834
6898
|
PatternPreviewBackground,
|
|
6835
6899
|
{
|
|
6836
6900
|
fillType: value.patternFillType,
|
|
@@ -6842,7 +6906,7 @@ var FillPreviewBackground = memo15(function FillPreviewBackground2({
|
|
|
6842
6906
|
});
|
|
6843
6907
|
|
|
6844
6908
|
// src/components/FillInputField.tsx
|
|
6845
|
-
var FillButton =
|
|
6909
|
+
var FillButton = forwardRef13(({ className, ...props }, ref) => /* @__PURE__ */ React30.createElement(
|
|
6846
6910
|
"button",
|
|
6847
6911
|
{
|
|
6848
6912
|
ref,
|
|
@@ -6850,14 +6914,14 @@ var FillButton = forwardRef12(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
6850
6914
|
...props
|
|
6851
6915
|
}
|
|
6852
6916
|
));
|
|
6853
|
-
var FillInputField =
|
|
6854
|
-
|
|
6855
|
-
return /* @__PURE__ */
|
|
6917
|
+
var FillInputField = memo17(
|
|
6918
|
+
forwardRef13(function FillInputField2({ id, value, ...rest }, ref) {
|
|
6919
|
+
return /* @__PURE__ */ React30.createElement(FillButton, { ref, id, ...rest }, /* @__PURE__ */ React30.createElement(FillPreviewBackground, { value }));
|
|
6856
6920
|
})
|
|
6857
6921
|
);
|
|
6858
6922
|
|
|
6859
6923
|
// src/components/FloatingWindow.tsx
|
|
6860
|
-
import
|
|
6924
|
+
import React31, { useCallback as useCallback15, useRef as useRef14, useState as useState17 } from "react";
|
|
6861
6925
|
var styles2 = {
|
|
6862
6926
|
noSelect: {
|
|
6863
6927
|
userSelect: "none",
|
|
@@ -6950,7 +7014,7 @@ function defaultRenderToolbar({
|
|
|
6950
7014
|
toolbarContent,
|
|
6951
7015
|
onClose
|
|
6952
7016
|
}) {
|
|
6953
|
-
return /* @__PURE__ */
|
|
7017
|
+
return /* @__PURE__ */ React31.createElement(React31.Fragment, null, /* @__PURE__ */ React31.createElement(Small, { className: "flex-1 font-medium text-text" }, title), toolbarContent, /* @__PURE__ */ React31.createElement(
|
|
6954
7018
|
IconButton,
|
|
6955
7019
|
{
|
|
6956
7020
|
iconName: "Cross3Icon",
|
|
@@ -6993,8 +7057,7 @@ var FloatingWindow = ({
|
|
|
6993
7057
|
}
|
|
6994
7058
|
};
|
|
6995
7059
|
const handleMouseDown = useCallback15((e) => {
|
|
6996
|
-
if (!wrapperRef.current)
|
|
6997
|
-
return;
|
|
7060
|
+
if (!wrapperRef.current) return;
|
|
6998
7061
|
const rect = wrapperRef.current.getBoundingClientRect();
|
|
6999
7062
|
setDragOffset({
|
|
7000
7063
|
x: e.clientX - rect.left,
|
|
@@ -7071,7 +7134,7 @@ var FloatingWindow = ({
|
|
|
7071
7134
|
setResizeDirection(null);
|
|
7072
7135
|
toggleGlobalTextSelection(false);
|
|
7073
7136
|
}, []);
|
|
7074
|
-
|
|
7137
|
+
React31.useEffect(() => {
|
|
7075
7138
|
document.addEventListener("mousemove", handleMouseMove);
|
|
7076
7139
|
document.addEventListener("mouseup", handleMouseUp);
|
|
7077
7140
|
return () => {
|
|
@@ -7082,11 +7145,10 @@ var FloatingWindow = ({
|
|
|
7082
7145
|
const floatingWindowManager = useFloatingWindowManager();
|
|
7083
7146
|
const currentFloatingWindow = useCurrentFloatingWindowInternal();
|
|
7084
7147
|
const handleClose = useCallback15(() => {
|
|
7085
|
-
if (onClose)
|
|
7086
|
-
onClose();
|
|
7148
|
+
if (onClose) onClose();
|
|
7087
7149
|
floatingWindowManager.closeWindow(currentFloatingWindow.id);
|
|
7088
7150
|
}, [currentFloatingWindow.id, floatingWindowManager, onClose]);
|
|
7089
|
-
return /* @__PURE__ */
|
|
7151
|
+
return /* @__PURE__ */ React31.createElement(
|
|
7090
7152
|
"div",
|
|
7091
7153
|
{
|
|
7092
7154
|
ref: wrapperRef,
|
|
@@ -7100,7 +7162,7 @@ var FloatingWindow = ({
|
|
|
7100
7162
|
backgroundColor: "var(--canvas-background)"
|
|
7101
7163
|
}
|
|
7102
7164
|
},
|
|
7103
|
-
/* @__PURE__ */
|
|
7165
|
+
/* @__PURE__ */ React31.createElement(
|
|
7104
7166
|
"div",
|
|
7105
7167
|
{
|
|
7106
7168
|
style: {
|
|
@@ -7111,9 +7173,9 @@ var FloatingWindow = ({
|
|
|
7111
7173
|
},
|
|
7112
7174
|
renderToolbar({ title, toolbarContent, onClose: handleClose })
|
|
7113
7175
|
),
|
|
7114
|
-
/* @__PURE__ */
|
|
7115
|
-
/* @__PURE__ */
|
|
7116
|
-
Object.entries(resizeHandlePositions).map(([direction, style5]) => /* @__PURE__ */
|
|
7176
|
+
/* @__PURE__ */ React31.createElement(Divider, null),
|
|
7177
|
+
/* @__PURE__ */ React31.createElement("div", { style: styles2.content }, children2),
|
|
7178
|
+
Object.entries(resizeHandlePositions).map(([direction, style5]) => /* @__PURE__ */ React31.createElement(
|
|
7117
7179
|
"div",
|
|
7118
7180
|
{
|
|
7119
7181
|
key: direction,
|
|
@@ -7135,8 +7197,8 @@ import {
|
|
|
7135
7197
|
hsvaToRgba,
|
|
7136
7198
|
rgbaToHsva as rgbaToHsva2
|
|
7137
7199
|
} from "@noya-app/noya-colorpicker";
|
|
7138
|
-
import
|
|
7139
|
-
var GradientPicker =
|
|
7200
|
+
import React32, { memo as memo18, useCallback as useCallback16, useMemo as useMemo15 } from "react";
|
|
7201
|
+
var GradientPicker = memo18(function GradientPicker2({
|
|
7140
7202
|
value,
|
|
7141
7203
|
selectedStop,
|
|
7142
7204
|
onChangeColor,
|
|
@@ -7170,14 +7232,14 @@ var GradientPicker = memo17(function GradientPicker2({
|
|
|
7170
7232
|
},
|
|
7171
7233
|
[onAdd]
|
|
7172
7234
|
);
|
|
7173
|
-
return /* @__PURE__ */
|
|
7235
|
+
return /* @__PURE__ */ React32.createElement(
|
|
7174
7236
|
NoyaColorPicker,
|
|
7175
7237
|
{
|
|
7176
7238
|
onChange: handleChangeColor,
|
|
7177
7239
|
colorModel,
|
|
7178
7240
|
color: rgbaColor
|
|
7179
7241
|
},
|
|
7180
|
-
/* @__PURE__ */
|
|
7242
|
+
/* @__PURE__ */ React32.createElement(
|
|
7181
7243
|
Gradient,
|
|
7182
7244
|
{
|
|
7183
7245
|
gradients: value,
|
|
@@ -7188,20 +7250,20 @@ var GradientPicker = memo17(function GradientPicker2({
|
|
|
7188
7250
|
onDelete
|
|
7189
7251
|
}
|
|
7190
7252
|
),
|
|
7191
|
-
/* @__PURE__ */
|
|
7192
|
-
/* @__PURE__ */
|
|
7193
|
-
/* @__PURE__ */
|
|
7194
|
-
/* @__PURE__ */
|
|
7195
|
-
/* @__PURE__ */
|
|
7196
|
-
/* @__PURE__ */
|
|
7253
|
+
/* @__PURE__ */ React32.createElement(Spacer.Vertical, { size: 10 }),
|
|
7254
|
+
/* @__PURE__ */ React32.createElement(Saturation, null),
|
|
7255
|
+
/* @__PURE__ */ React32.createElement(Spacer.Vertical, { size: 12 }),
|
|
7256
|
+
/* @__PURE__ */ React32.createElement(Hue, null),
|
|
7257
|
+
/* @__PURE__ */ React32.createElement(Spacer.Vertical, { size: 5 }),
|
|
7258
|
+
/* @__PURE__ */ React32.createElement(Alpha, null)
|
|
7197
7259
|
);
|
|
7198
7260
|
});
|
|
7199
7261
|
|
|
7200
7262
|
// src/components/GridView.tsx
|
|
7201
|
-
import
|
|
7263
|
+
import React34, {
|
|
7202
7264
|
createContext as createContext7,
|
|
7203
|
-
forwardRef as
|
|
7204
|
-
memo as
|
|
7265
|
+
forwardRef as forwardRef14,
|
|
7266
|
+
memo as memo20,
|
|
7205
7267
|
useCallback as useCallback18,
|
|
7206
7268
|
useContext as useContext7,
|
|
7207
7269
|
useMemo as useMemo16
|
|
@@ -7209,10 +7271,10 @@ import React33, {
|
|
|
7209
7271
|
|
|
7210
7272
|
// src/components/ScrollArea.tsx
|
|
7211
7273
|
import * as RadixScrollArea from "@radix-ui/react-scroll-area";
|
|
7212
|
-
import
|
|
7213
|
-
var ScrollArea =
|
|
7274
|
+
import React33, { memo as memo19, useCallback as useCallback17, useState as useState18 } from "react";
|
|
7275
|
+
var ScrollArea = memo19(function ScrollArea2({ children: children2 }) {
|
|
7214
7276
|
const [scrollElementRef, setScrollElementRef] = useState18(null);
|
|
7215
|
-
return /* @__PURE__ */
|
|
7277
|
+
return /* @__PURE__ */ React33.createElement("div", { className: "flex-1 min-h-0" }, /* @__PURE__ */ React33.createElement(RadixScrollArea.Root, { style: { width: "100%", height: "100%" } }, /* @__PURE__ */ React33.createElement(
|
|
7216
7278
|
RadixScrollArea.Viewport,
|
|
7217
7279
|
{
|
|
7218
7280
|
className: "w-full h-full [&>div]:block",
|
|
@@ -7222,13 +7284,13 @@ var ScrollArea = memo18(function ScrollArea2({ children: children2 }) {
|
|
|
7222
7284
|
)
|
|
7223
7285
|
},
|
|
7224
7286
|
typeof children2 === "function" ? scrollElementRef ? children2(scrollElementRef) : null : children2
|
|
7225
|
-
), /* @__PURE__ */
|
|
7287
|
+
), /* @__PURE__ */ React33.createElement(
|
|
7226
7288
|
RadixScrollArea.Scrollbar,
|
|
7227
7289
|
{
|
|
7228
7290
|
orientation: "vertical",
|
|
7229
7291
|
className: "scroll-component flex p-[3px] data-[orientation=vertical]:w-[10px]"
|
|
7230
7292
|
},
|
|
7231
|
-
/* @__PURE__ */
|
|
7293
|
+
/* @__PURE__ */ React33.createElement(RadixScrollArea.Thumb, { className: "scroll-component flex-1 rounded-[10px] bg-scrollbar" })
|
|
7232
7294
|
)));
|
|
7233
7295
|
});
|
|
7234
7296
|
|
|
@@ -7266,7 +7328,7 @@ var sizes = {
|
|
|
7266
7328
|
}
|
|
7267
7329
|
};
|
|
7268
7330
|
var ItemTitle = ({ showBackground, children: children2 }) => {
|
|
7269
|
-
return /* @__PURE__ */
|
|
7331
|
+
return /* @__PURE__ */ React34.createElement(
|
|
7270
7332
|
"span",
|
|
7271
7333
|
{
|
|
7272
7334
|
className: `font-sans text-heading5 leading-[1] text-text font-medium select-none whitespace-pre overflow-hidden text-ellipsis ${showBackground && "bg-sidebar-background border border-dividerSubtle rounded-[2px] backdrop-blur-[4px] p-[2px_4px]"}`
|
|
@@ -7275,7 +7337,7 @@ var ItemTitle = ({ showBackground, children: children2 }) => {
|
|
|
7275
7337
|
);
|
|
7276
7338
|
};
|
|
7277
7339
|
var ItemDescription = ({ showBackground, children: children2 }) => {
|
|
7278
|
-
return /* @__PURE__ */
|
|
7340
|
+
return /* @__PURE__ */ React34.createElement(
|
|
7279
7341
|
"span",
|
|
7280
7342
|
{
|
|
7281
7343
|
className: `font-sans text-heading5 font-normal leading-[1] text-[0.7rem] text-text-muted select-none whitespace-pre overflow-hidden text-ellipsis ${showBackground && "bg-sidebar-background border border-dividerSubtle rounded-[2px] backdrop-blur-[4px] p-[2px_4px]"}`
|
|
@@ -7284,7 +7346,7 @@ var ItemDescription = ({ showBackground, children: children2 }) => {
|
|
|
7284
7346
|
);
|
|
7285
7347
|
};
|
|
7286
7348
|
var SectionTitle = ({ last = false, children: children2 }) => {
|
|
7287
|
-
return /* @__PURE__ */
|
|
7349
|
+
return /* @__PURE__ */ React34.createElement(
|
|
7288
7350
|
"span",
|
|
7289
7351
|
{
|
|
7290
7352
|
className: `font-sans text-heading3 font-medium user-select-none whitespace-pre overflow-hidden text-ellipsis ${last ? "text-text" : "text-text-muted"}`
|
|
@@ -7292,7 +7354,7 @@ var SectionTitle = ({ last = false, children: children2 }) => {
|
|
|
7292
7354
|
children2
|
|
7293
7355
|
);
|
|
7294
7356
|
};
|
|
7295
|
-
var GridViewItem =
|
|
7357
|
+
var GridViewItem = forwardRef14(function GridViewItem2({
|
|
7296
7358
|
id,
|
|
7297
7359
|
title,
|
|
7298
7360
|
subtitle,
|
|
@@ -7308,7 +7370,7 @@ var GridViewItem = forwardRef13(function GridViewItem2({
|
|
|
7308
7370
|
onContextMenu,
|
|
7309
7371
|
style: style5
|
|
7310
7372
|
}, forwardedRef) {
|
|
7311
|
-
const [hovered, setHovered] =
|
|
7373
|
+
const [hovered, setHovered] = React34.useState(false);
|
|
7312
7374
|
const { hoverProps } = useHover({
|
|
7313
7375
|
onHoverChange: (isHovering) => {
|
|
7314
7376
|
onHoverChange?.(isHovering);
|
|
@@ -7337,7 +7399,7 @@ var GridViewItem = forwardRef13(function GridViewItem2({
|
|
|
7337
7399
|
},
|
|
7338
7400
|
[onPress]
|
|
7339
7401
|
);
|
|
7340
|
-
let element = /* @__PURE__ */
|
|
7402
|
+
let element = /* @__PURE__ */ React34.createElement(
|
|
7341
7403
|
"div",
|
|
7342
7404
|
{
|
|
7343
7405
|
className: "flex flex-col relative focus:shadow-[0px_0px_0px_1px_var(--sidebar-background),_0px_0px_0px_3px_var(--primary)] focus:outline-none",
|
|
@@ -7347,7 +7409,7 @@ var GridViewItem = forwardRef13(function GridViewItem2({
|
|
|
7347
7409
|
tabIndex: disabled ? void 0 : 0,
|
|
7348
7410
|
onKeyDown: handleKeyDown
|
|
7349
7411
|
},
|
|
7350
|
-
/* @__PURE__ */
|
|
7412
|
+
/* @__PURE__ */ React34.createElement(
|
|
7351
7413
|
"div",
|
|
7352
7414
|
{
|
|
7353
7415
|
className: cn(
|
|
@@ -7364,18 +7426,18 @@ var GridViewItem = forwardRef13(function GridViewItem2({
|
|
|
7364
7426
|
},
|
|
7365
7427
|
children2
|
|
7366
7428
|
),
|
|
7367
|
-
textPosition === "below" && /* @__PURE__ */
|
|
7368
|
-
textPosition === "overlay" && hovered && (title || subtitle) && /* @__PURE__ */
|
|
7369
|
-
loading && /* @__PURE__ */
|
|
7429
|
+
textPosition === "below" && /* @__PURE__ */ React34.createElement(React34.Fragment, null, /* @__PURE__ */ React34.createElement(Spacer.Vertical, { size: 8 }), /* @__PURE__ */ React34.createElement(ItemTitle, null, title || " "), /* @__PURE__ */ React34.createElement(ItemDescription, null, subtitle || " ")),
|
|
7430
|
+
textPosition === "overlay" && hovered && (title || subtitle) && /* @__PURE__ */ React34.createElement("div", { className: "absolute inset-0 flex flex-col justify-end items-start p-1 pointer-events-none truncate g-0.5" }, title && /* @__PURE__ */ React34.createElement(ItemTitle, { showBackground: true }, title), subtitle && /* @__PURE__ */ React34.createElement(ItemDescription, { showBackground: true }, subtitle)),
|
|
7431
|
+
loading && /* @__PURE__ */ React34.createElement("div", { className: "flex flex-col justify-start items-end p-1 pointer-events-none animate-shimmer absolute inset-0 bg-gradient-to-r from-white/0 via-[rgb(226,232,240)]/50 to-white/0 bg-length:200%_100%]" }, /* @__PURE__ */ React34.createElement(ActivityIndicator, { opacity: 0.5, size: 13 }))
|
|
7370
7432
|
);
|
|
7371
7433
|
if (menuItems && onSelectMenuItem) {
|
|
7372
|
-
element = /* @__PURE__ */
|
|
7434
|
+
element = /* @__PURE__ */ React34.createElement(ContextMenu, { items: menuItems, onSelect: onSelectMenuItem }, element);
|
|
7373
7435
|
}
|
|
7374
7436
|
if (textPosition === "toolip") {
|
|
7375
|
-
element = /* @__PURE__ */
|
|
7437
|
+
element = /* @__PURE__ */ React34.createElement(
|
|
7376
7438
|
Tooltip,
|
|
7377
7439
|
{
|
|
7378
|
-
content: /* @__PURE__ */
|
|
7440
|
+
content: /* @__PURE__ */ React34.createElement("div", { className: "flex flex-col gap-0.5" }, /* @__PURE__ */ React34.createElement(ItemTitle, null, title), /* @__PURE__ */ React34.createElement(ItemDescription, null, subtitle))
|
|
7379
7441
|
},
|
|
7380
7442
|
element
|
|
7381
7443
|
);
|
|
@@ -7414,7 +7476,7 @@ function GridViewRoot({
|
|
|
7414
7476
|
}),
|
|
7415
7477
|
[bordered, disabled, size3, textPosition]
|
|
7416
7478
|
);
|
|
7417
|
-
return /* @__PURE__ */
|
|
7479
|
+
return /* @__PURE__ */ React34.createElement(GridViewContext.Provider, { value: contextValue }, /* @__PURE__ */ React34.createElement("div", { onClick: handleClick, className: `flex flex-col ${scrollable ? "flex-1" : "flex-[0_0_auto]"}` }, scrollable ? /* @__PURE__ */ React34.createElement(ScrollArea, null, children2) : children2));
|
|
7418
7480
|
}
|
|
7419
7481
|
function GridViewSection({
|
|
7420
7482
|
children: children2,
|
|
@@ -7422,28 +7484,28 @@ function GridViewSection({
|
|
|
7422
7484
|
}) {
|
|
7423
7485
|
const { size: size3 } = useContext7(GridViewContext);
|
|
7424
7486
|
const gapStyle = { gap: `${sizes[size3].gap}px` };
|
|
7425
|
-
return /* @__PURE__ */
|
|
7487
|
+
return /* @__PURE__ */ React34.createElement("div", { className: cn(className, "text-text grid", `grid-cols-[auto-fill,_minmax(${sizes[size3].itemWidth}px,_1fr)]`), style: gapStyle }, children2);
|
|
7426
7488
|
}
|
|
7427
7489
|
function GridViewSectionHeader({ title }) {
|
|
7428
7490
|
const grouped = title.split("/");
|
|
7429
|
-
return /* @__PURE__ */
|
|
7430
|
-
grouped.map((title2, index) => /* @__PURE__ */
|
|
7431
|
-
/* @__PURE__ */
|
|
7491
|
+
return /* @__PURE__ */ React34.createElement("div", { className: "px-5" }, /* @__PURE__ */ React34.createElement(Spacer.Vertical, { size: 24 }), withSeparatorElements(
|
|
7492
|
+
grouped.map((title2, index) => /* @__PURE__ */ React34.createElement(SectionTitle, { last: index === grouped.length - 1 }, title2)),
|
|
7493
|
+
/* @__PURE__ */ React34.createElement(SectionTitle, null, " / ")
|
|
7432
7494
|
));
|
|
7433
7495
|
}
|
|
7434
7496
|
var GridView;
|
|
7435
7497
|
((GridView2) => {
|
|
7436
|
-
GridView2.Root =
|
|
7437
|
-
GridView2.Item =
|
|
7438
|
-
GridView2.Section =
|
|
7439
|
-
GridView2.SectionHeader =
|
|
7498
|
+
GridView2.Root = memo20(GridViewRoot);
|
|
7499
|
+
GridView2.Item = memo20(GridViewItem);
|
|
7500
|
+
GridView2.Section = memo20(GridViewSection);
|
|
7501
|
+
GridView2.SectionHeader = memo20(GridViewSectionHeader);
|
|
7440
7502
|
})(GridView || (GridView = {}));
|
|
7441
7503
|
|
|
7442
7504
|
// src/components/InputFieldWithCompletions.tsx
|
|
7443
7505
|
import { chunkBy, partition } from "@noya-app/noya-utils";
|
|
7444
|
-
import
|
|
7445
|
-
forwardRef as
|
|
7446
|
-
memo as
|
|
7506
|
+
import React58, {
|
|
7507
|
+
forwardRef as forwardRef16,
|
|
7508
|
+
memo as memo23,
|
|
7447
7509
|
useCallback as useCallback21,
|
|
7448
7510
|
useEffect as useEffect14,
|
|
7449
7511
|
useImperativeHandle as useImperativeHandle3,
|
|
@@ -7469,8 +7531,7 @@ function fuzzyFilter({
|
|
|
7469
7531
|
...fuzzyScore({ item: text, query })
|
|
7470
7532
|
})
|
|
7471
7533
|
);
|
|
7472
|
-
if (!query)
|
|
7473
|
-
return scoredItems;
|
|
7534
|
+
if (!query) return scoredItems;
|
|
7474
7535
|
return scoredItems.filter(({ score }) => score > scoreThreshold).sort((a, b) => b.score - a.score);
|
|
7475
7536
|
}
|
|
7476
7537
|
function fuzzyTokenize({
|
|
@@ -7527,12 +7588,12 @@ function mergeRanges(ranges) {
|
|
|
7527
7588
|
// src/components/ListView.tsx
|
|
7528
7589
|
import { range } from "@noya-app/noya-utils";
|
|
7529
7590
|
import { composeRefs as composeRefs2 } from "@radix-ui/react-compose-refs";
|
|
7530
|
-
import
|
|
7591
|
+
import React57, {
|
|
7531
7592
|
Children as Children4,
|
|
7532
7593
|
createContext as createContext9,
|
|
7533
|
-
forwardRef as
|
|
7594
|
+
forwardRef as forwardRef15,
|
|
7534
7595
|
isValidElement as isValidElement3,
|
|
7535
|
-
memo as
|
|
7596
|
+
memo as memo22,
|
|
7536
7597
|
useCallback as useCallback20,
|
|
7537
7598
|
useContext as useContext9,
|
|
7538
7599
|
useImperativeHandle as useImperativeHandle2,
|
|
@@ -7549,7 +7610,7 @@ var import_getPrototypeOf2 = __toESM(require_getPrototypeOf());
|
|
|
7549
7610
|
var import_assertThisInitialized2 = __toESM(require_assertThisInitialized());
|
|
7550
7611
|
var import_inherits2 = __toESM(require_inherits());
|
|
7551
7612
|
var import_defineProperty4 = __toESM(require_defineProperty());
|
|
7552
|
-
import * as
|
|
7613
|
+
import * as React37 from "react";
|
|
7553
7614
|
|
|
7554
7615
|
// ../../node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js
|
|
7555
7616
|
function componentWillMount() {
|
|
@@ -7646,25 +7707,18 @@ var import_getPrototypeOf = __toESM(require_getPrototypeOf());
|
|
|
7646
7707
|
var import_assertThisInitialized = __toESM(require_assertThisInitialized());
|
|
7647
7708
|
var import_inherits = __toESM(require_inherits());
|
|
7648
7709
|
var import_defineProperty3 = __toESM(require_defineProperty());
|
|
7649
|
-
import * as
|
|
7710
|
+
import * as React36 from "react";
|
|
7650
7711
|
|
|
7651
7712
|
// ../../node_modules/clsx/dist/clsx.m.js
|
|
7652
7713
|
function r(e) {
|
|
7653
7714
|
var t, f, n = "";
|
|
7654
|
-
if ("string" == typeof e || "number" == typeof e)
|
|
7655
|
-
|
|
7656
|
-
else
|
|
7657
|
-
if (Array.isArray(e))
|
|
7658
|
-
for (t = 0; t < e.length; t++)
|
|
7659
|
-
e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
|
|
7660
|
-
else
|
|
7661
|
-
for (t in e)
|
|
7662
|
-
e[t] && (n && (n += " "), n += t);
|
|
7715
|
+
if ("string" == typeof e || "number" == typeof e) n += e;
|
|
7716
|
+
else if ("object" == typeof e) if (Array.isArray(e)) for (t = 0; t < e.length; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
|
|
7717
|
+
else for (t in e) e[t] && (n && (n += " "), n += t);
|
|
7663
7718
|
return n;
|
|
7664
7719
|
}
|
|
7665
7720
|
function clsx() {
|
|
7666
|
-
for (var e, t, f = 0, n = ""; f < arguments.length; )
|
|
7667
|
-
(e = arguments[f++]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
7721
|
+
for (var e, t, f = 0, n = ""; f < arguments.length; ) (e = arguments[f++]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
7668
7722
|
return n;
|
|
7669
7723
|
}
|
|
7670
7724
|
var clsx_m_default = clsx;
|
|
@@ -7692,7 +7746,7 @@ var import_createClass = __toESM(require_createClass());
|
|
|
7692
7746
|
var import_defineProperty = __toESM(require_defineProperty());
|
|
7693
7747
|
|
|
7694
7748
|
// ../../node_modules/react-virtualized/dist/es/Grid/types.js
|
|
7695
|
-
import * as
|
|
7749
|
+
import * as React35 from "react";
|
|
7696
7750
|
var import_prop_types = __toESM(require_prop_types());
|
|
7697
7751
|
var bpfrpt_proptype_CellPosition = process.env.NODE_ENV === "production" ? null : {
|
|
7698
7752
|
"columnIndex": import_prop_types.default.number.isRequired,
|
|
@@ -8397,10 +8451,9 @@ function ownKeys(object, enumerableOnly) {
|
|
|
8397
8451
|
var keys = Object.keys(object);
|
|
8398
8452
|
if (Object.getOwnPropertySymbols) {
|
|
8399
8453
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
8400
|
-
if (enumerableOnly)
|
|
8401
|
-
|
|
8402
|
-
|
|
8403
|
-
});
|
|
8454
|
+
if (enumerableOnly) symbols = symbols.filter(function(sym) {
|
|
8455
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
8456
|
+
});
|
|
8404
8457
|
keys.push.apply(keys, symbols);
|
|
8405
8458
|
}
|
|
8406
8459
|
return keys;
|
|
@@ -8853,7 +8906,7 @@ var Grid = (_temp = _class = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
8853
8906
|
gridStyle.overflowY = totalRowsHeight + horizontalScrollBarSize <= height ? "hidden" : "auto";
|
|
8854
8907
|
var childrenToDisplay = this._childrenToDisplay;
|
|
8855
8908
|
var showNoContentRenderer = childrenToDisplay.length === 0 && height > 0 && width > 0;
|
|
8856
|
-
return
|
|
8909
|
+
return React36.createElement("div", (0, import_extends.default)({
|
|
8857
8910
|
ref: this._setScrollingContainerRef
|
|
8858
8911
|
}, containerProps, {
|
|
8859
8912
|
"aria-label": this.props["aria-label"],
|
|
@@ -8864,7 +8917,7 @@ var Grid = (_temp = _class = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
8864
8917
|
role,
|
|
8865
8918
|
style: _objectSpread({}, gridStyle, {}, style5),
|
|
8866
8919
|
tabIndex
|
|
8867
|
-
}), childrenToDisplay.length > 0 &&
|
|
8920
|
+
}), childrenToDisplay.length > 0 && React36.createElement("div", {
|
|
8868
8921
|
className: "ReactVirtualized__Grid__innerScrollContainer",
|
|
8869
8922
|
role: containerRole,
|
|
8870
8923
|
style: _objectSpread({
|
|
@@ -9322,7 +9375,7 @@ var Grid = (_temp = _class = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
9322
9375
|
}
|
|
9323
9376
|
}]);
|
|
9324
9377
|
return Grid2;
|
|
9325
|
-
}(
|
|
9378
|
+
}(React36.PureComponent), (0, import_defineProperty3.default)(_class, "propTypes", process.env.NODE_ENV === "production" ? null : {
|
|
9326
9379
|
"aria-label": import_prop_types3.default.string.isRequired,
|
|
9327
9380
|
"aria-readonly": import_prop_types3.default.bool,
|
|
9328
9381
|
/**
|
|
@@ -9530,10 +9583,9 @@ function ownKeys2(object, enumerableOnly) {
|
|
|
9530
9583
|
var keys = Object.keys(object);
|
|
9531
9584
|
if (Object.getOwnPropertySymbols) {
|
|
9532
9585
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
9533
|
-
if (enumerableOnly)
|
|
9534
|
-
|
|
9535
|
-
|
|
9536
|
-
});
|
|
9586
|
+
if (enumerableOnly) symbols = symbols.filter(function(sym) {
|
|
9587
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
9588
|
+
});
|
|
9537
9589
|
keys.push.apply(keys, symbols);
|
|
9538
9590
|
}
|
|
9539
9591
|
return keys;
|
|
@@ -9629,7 +9681,7 @@ var ArrowKeyStepper = (_temp2 = _class2 = /* @__PURE__ */ function(_React$PureCo
|
|
|
9629
9681
|
value: function render() {
|
|
9630
9682
|
var _this$props2 = this.props, className = _this$props2.className, children2 = _this$props2.children;
|
|
9631
9683
|
var _this$_getScrollState3 = this._getScrollState(), scrollToColumn = _this$_getScrollState3.scrollToColumn, scrollToRow = _this$_getScrollState3.scrollToRow;
|
|
9632
|
-
return
|
|
9684
|
+
return React37.createElement("div", {
|
|
9633
9685
|
className,
|
|
9634
9686
|
onKeyDown: this._onKeyDown
|
|
9635
9687
|
}, children2({
|
|
@@ -9681,7 +9733,7 @@ var ArrowKeyStepper = (_temp2 = _class2 = /* @__PURE__ */ function(_React$PureCo
|
|
|
9681
9733
|
}
|
|
9682
9734
|
}]);
|
|
9683
9735
|
return ArrowKeyStepper2;
|
|
9684
|
-
}(
|
|
9736
|
+
}(React37.PureComponent), (0, import_defineProperty4.default)(_class2, "propTypes", process.env.NODE_ENV === "production" ? null : {
|
|
9685
9737
|
"children": import_prop_types5.default.func.isRequired,
|
|
9686
9738
|
"className": import_prop_types5.default.string,
|
|
9687
9739
|
"columnCount": import_prop_types5.default.number.isRequired,
|
|
@@ -9710,7 +9762,7 @@ var import_getPrototypeOf3 = __toESM(require_getPrototypeOf());
|
|
|
9710
9762
|
var import_assertThisInitialized3 = __toESM(require_assertThisInitialized());
|
|
9711
9763
|
var import_inherits3 = __toESM(require_inherits());
|
|
9712
9764
|
var import_defineProperty5 = __toESM(require_defineProperty());
|
|
9713
|
-
import * as
|
|
9765
|
+
import * as React38 from "react";
|
|
9714
9766
|
|
|
9715
9767
|
// ../../node_modules/react-virtualized/dist/es/vendor/detectElementResize.js
|
|
9716
9768
|
function createDetectElementResize(nonce, hostWindow) {
|
|
@@ -9881,10 +9933,9 @@ function ownKeys3(object, enumerableOnly) {
|
|
|
9881
9933
|
var keys = Object.keys(object);
|
|
9882
9934
|
if (Object.getOwnPropertySymbols) {
|
|
9883
9935
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
9884
|
-
if (enumerableOnly)
|
|
9885
|
-
|
|
9886
|
-
|
|
9887
|
-
});
|
|
9936
|
+
if (enumerableOnly) symbols = symbols.filter(function(sym) {
|
|
9937
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
9938
|
+
});
|
|
9888
9939
|
keys.push.apply(keys, symbols);
|
|
9889
9940
|
}
|
|
9890
9941
|
return keys;
|
|
@@ -9990,7 +10041,7 @@ var AutoSizer3 = (_temp3 = _class3 = /* @__PURE__ */ function(_React$Component)
|
|
|
9990
10041
|
outerStyle.width = 0;
|
|
9991
10042
|
childParams.width = width;
|
|
9992
10043
|
}
|
|
9993
|
-
return
|
|
10044
|
+
return React38.createElement("div", {
|
|
9994
10045
|
className,
|
|
9995
10046
|
ref: this._setRef,
|
|
9996
10047
|
style: _objectSpread3({}, outerStyle, {}, style5)
|
|
@@ -9998,7 +10049,7 @@ var AutoSizer3 = (_temp3 = _class3 = /* @__PURE__ */ function(_React$Component)
|
|
|
9998
10049
|
}
|
|
9999
10050
|
}]);
|
|
10000
10051
|
return AutoSizer4;
|
|
10001
|
-
}(
|
|
10052
|
+
}(React38.Component), (0, import_defineProperty5.default)(_class3, "propTypes", process.env.NODE_ENV === "production" ? null : {
|
|
10002
10053
|
/** Function responsible for rendering children.*/
|
|
10003
10054
|
"children": import_prop_types6.default.func.isRequired,
|
|
10004
10055
|
/** Optional custom CSS class name to attach to root AutoSizer element. */
|
|
@@ -10034,7 +10085,7 @@ var import_getPrototypeOf4 = __toESM(require_getPrototypeOf());
|
|
|
10034
10085
|
var import_assertThisInitialized4 = __toESM(require_assertThisInitialized());
|
|
10035
10086
|
var import_inherits4 = __toESM(require_inherits());
|
|
10036
10087
|
var import_defineProperty6 = __toESM(require_defineProperty());
|
|
10037
|
-
import * as
|
|
10088
|
+
import * as React39 from "react";
|
|
10038
10089
|
import { findDOMNode } from "react-dom";
|
|
10039
10090
|
|
|
10040
10091
|
// ../../node_modules/react-virtualized/dist/es/CellMeasurer/types.js
|
|
@@ -10156,7 +10207,7 @@ var CellMeasurer = (_temp4 = _class4 = /* @__PURE__ */ function(_React$PureCompo
|
|
|
10156
10207
|
}
|
|
10157
10208
|
}]);
|
|
10158
10209
|
return CellMeasurer2;
|
|
10159
|
-
}(
|
|
10210
|
+
}(React39.PureComponent), (0, import_defineProperty6.default)(_class4, "propTypes", process.env.NODE_ENV === "production" ? null : {
|
|
10160
10211
|
"cache": function cache() {
|
|
10161
10212
|
return (typeof bpfrpt_proptype_CellMeasureCache === "function" ? bpfrpt_proptype_CellMeasureCache.isRequired ? bpfrpt_proptype_CellMeasureCache.isRequired : bpfrpt_proptype_CellMeasureCache : import_prop_types8.default.shape(bpfrpt_proptype_CellMeasureCache).isRequired).apply(this, arguments);
|
|
10162
10213
|
},
|
|
@@ -10189,7 +10240,7 @@ var import_assertThisInitialized6 = __toESM(require_assertThisInitialized());
|
|
|
10189
10240
|
var import_inherits6 = __toESM(require_inherits());
|
|
10190
10241
|
var import_defineProperty9 = __toESM(require_defineProperty());
|
|
10191
10242
|
var import_prop_types11 = __toESM(require_prop_types());
|
|
10192
|
-
import * as
|
|
10243
|
+
import * as React41 from "react";
|
|
10193
10244
|
|
|
10194
10245
|
// ../../node_modules/react-virtualized/dist/es/Collection/CollectionView.js
|
|
10195
10246
|
var import_classCallCheck8 = __toESM(require_classCallCheck());
|
|
@@ -10200,15 +10251,14 @@ var import_assertThisInitialized5 = __toESM(require_assertThisInitialized());
|
|
|
10200
10251
|
var import_inherits5 = __toESM(require_inherits());
|
|
10201
10252
|
var import_defineProperty8 = __toESM(require_defineProperty());
|
|
10202
10253
|
var import_prop_types9 = __toESM(require_prop_types());
|
|
10203
|
-
import * as
|
|
10254
|
+
import * as React40 from "react";
|
|
10204
10255
|
function ownKeys4(object, enumerableOnly) {
|
|
10205
10256
|
var keys = Object.keys(object);
|
|
10206
10257
|
if (Object.getOwnPropertySymbols) {
|
|
10207
10258
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
10208
|
-
if (enumerableOnly)
|
|
10209
|
-
|
|
10210
|
-
|
|
10211
|
-
});
|
|
10259
|
+
if (enumerableOnly) symbols = symbols.filter(function(sym) {
|
|
10260
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
10261
|
+
});
|
|
10212
10262
|
keys.push.apply(keys, symbols);
|
|
10213
10263
|
}
|
|
10214
10264
|
return keys;
|
|
@@ -10421,7 +10471,7 @@ var CollectionView = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
10421
10471
|
var horizontalScrollBarSize = totalWidth > width ? this._scrollbarSize : 0;
|
|
10422
10472
|
collectionStyle.overflowX = totalWidth + verticalScrollBarSize <= width ? "hidden" : "auto";
|
|
10423
10473
|
collectionStyle.overflowY = totalHeight + horizontalScrollBarSize <= height ? "hidden" : "auto";
|
|
10424
|
-
return
|
|
10474
|
+
return React40.createElement("div", {
|
|
10425
10475
|
ref: this._setScrollingContainerRef,
|
|
10426
10476
|
"aria-label": this.props["aria-label"],
|
|
10427
10477
|
className: clsx_m_default("ReactVirtualized__Collection", className),
|
|
@@ -10430,7 +10480,7 @@ var CollectionView = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
10430
10480
|
role: "grid",
|
|
10431
10481
|
style: _objectSpread4({}, collectionStyle, {}, style5),
|
|
10432
10482
|
tabIndex: 0
|
|
10433
|
-
}, cellCount > 0 &&
|
|
10483
|
+
}, cellCount > 0 && React40.createElement("div", {
|
|
10434
10484
|
className: "ReactVirtualized__Collection__innerScrollContainer",
|
|
10435
10485
|
style: {
|
|
10436
10486
|
height: totalHeight,
|
|
@@ -10525,7 +10575,7 @@ var CollectionView = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
10525
10575
|
}
|
|
10526
10576
|
}]);
|
|
10527
10577
|
return CollectionView2;
|
|
10528
|
-
}(
|
|
10578
|
+
}(React40.PureComponent);
|
|
10529
10579
|
(0, import_defineProperty8.default)(CollectionView, "defaultProps", {
|
|
10530
10580
|
"aria-label": "grid",
|
|
10531
10581
|
horizontalOverscanSize: 0,
|
|
@@ -10868,7 +10918,7 @@ var Collection = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
10868
10918
|
key: "render",
|
|
10869
10919
|
value: function render() {
|
|
10870
10920
|
var props = (0, import_extends2.default)({}, this.props);
|
|
10871
|
-
return
|
|
10921
|
+
return React41.createElement(CollectionView_default, (0, import_extends2.default)({
|
|
10872
10922
|
cellLayoutManager: this,
|
|
10873
10923
|
isScrollingChange: this._isScrollingChange,
|
|
10874
10924
|
ref: this._setCollectionViewRef
|
|
@@ -10976,7 +11026,7 @@ var Collection = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
10976
11026
|
}
|
|
10977
11027
|
}]);
|
|
10978
11028
|
return Collection2;
|
|
10979
|
-
}(
|
|
11029
|
+
}(React41.PureComponent);
|
|
10980
11030
|
(0, import_defineProperty9.default)(Collection, "defaultProps", {
|
|
10981
11031
|
"aria-label": "grid",
|
|
10982
11032
|
cellGroupRenderer: defaultCellGroupRenderer
|
|
@@ -11050,7 +11100,7 @@ var import_getPrototypeOf7 = __toESM(require_getPrototypeOf());
|
|
|
11050
11100
|
var import_assertThisInitialized7 = __toESM(require_assertThisInitialized());
|
|
11051
11101
|
var import_inherits7 = __toESM(require_inherits());
|
|
11052
11102
|
var import_prop_types12 = __toESM(require_prop_types());
|
|
11053
|
-
import * as
|
|
11103
|
+
import * as React42 from "react";
|
|
11054
11104
|
var ColumnSizer = /* @__PURE__ */ function(_React$PureComponent) {
|
|
11055
11105
|
(0, import_inherits7.default)(ColumnSizer2, _React$PureComponent);
|
|
11056
11106
|
function ColumnSizer2(props, context) {
|
|
@@ -11103,7 +11153,7 @@ var ColumnSizer = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
11103
11153
|
}
|
|
11104
11154
|
}]);
|
|
11105
11155
|
return ColumnSizer2;
|
|
11106
|
-
}(
|
|
11156
|
+
}(React42.PureComponent);
|
|
11107
11157
|
ColumnSizer.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
11108
11158
|
/**
|
|
11109
11159
|
* Function responsible for rendering a virtualized Grid.
|
|
@@ -11135,7 +11185,7 @@ var import_assertThisInitialized8 = __toESM(require_assertThisInitialized());
|
|
|
11135
11185
|
var import_inherits8 = __toESM(require_inherits());
|
|
11136
11186
|
var import_defineProperty10 = __toESM(require_defineProperty());
|
|
11137
11187
|
var import_prop_types13 = __toESM(require_prop_types());
|
|
11138
|
-
import * as
|
|
11188
|
+
import * as React43 from "react";
|
|
11139
11189
|
var InfiniteLoader = /* @__PURE__ */ function(_React$PureComponent) {
|
|
11140
11190
|
(0, import_inherits8.default)(InfiniteLoader2, _React$PureComponent);
|
|
11141
11191
|
function InfiniteLoader2(props, context) {
|
|
@@ -11227,7 +11277,7 @@ var InfiniteLoader = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
11227
11277
|
}
|
|
11228
11278
|
}]);
|
|
11229
11279
|
return InfiniteLoader2;
|
|
11230
|
-
}(
|
|
11280
|
+
}(React43.PureComponent);
|
|
11231
11281
|
(0, import_defineProperty10.default)(InfiniteLoader, "defaultProps", {
|
|
11232
11282
|
minimumBatchSize: 10,
|
|
11233
11283
|
rowCount: 0,
|
|
@@ -11348,11 +11398,11 @@ var import_getPrototypeOf9 = __toESM(require_getPrototypeOf());
|
|
|
11348
11398
|
var import_assertThisInitialized9 = __toESM(require_assertThisInitialized());
|
|
11349
11399
|
var import_inherits9 = __toESM(require_inherits());
|
|
11350
11400
|
var import_defineProperty11 = __toESM(require_defineProperty());
|
|
11351
|
-
import * as
|
|
11401
|
+
import * as React45 from "react";
|
|
11352
11402
|
|
|
11353
11403
|
// ../../node_modules/react-virtualized/dist/es/List/types.js
|
|
11354
11404
|
var import_prop_types14 = __toESM(require_prop_types());
|
|
11355
|
-
import * as
|
|
11405
|
+
import * as React44 from "react";
|
|
11356
11406
|
var bpfrpt_proptype_RowRendererParams = process.env.NODE_ENV === "production" ? null : {
|
|
11357
11407
|
"index": import_prop_types14.default.number.isRequired,
|
|
11358
11408
|
"isScrolling": import_prop_types14.default.bool.isRequired,
|
|
@@ -11523,7 +11573,7 @@ var List = (_temp5 = _class5 = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
11523
11573
|
value: function render() {
|
|
11524
11574
|
var _this$props = this.props, className = _this$props.className, noRowsRenderer4 = _this$props.noRowsRenderer, scrollToIndex = _this$props.scrollToIndex, width = _this$props.width;
|
|
11525
11575
|
var classNames = clsx_m_default("ReactVirtualized__List", className);
|
|
11526
|
-
return
|
|
11576
|
+
return React45.createElement(Grid_default, (0, import_extends3.default)({}, this.props, {
|
|
11527
11577
|
autoContainerWidth: true,
|
|
11528
11578
|
cellRenderer: this._cellRenderer,
|
|
11529
11579
|
className: classNames,
|
|
@@ -11538,7 +11588,7 @@ var List = (_temp5 = _class5 = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
11538
11588
|
}
|
|
11539
11589
|
}]);
|
|
11540
11590
|
return List2;
|
|
11541
|
-
}(
|
|
11591
|
+
}(React45.PureComponent), (0, import_defineProperty11.default)(_class5, "propTypes", process.env.NODE_ENV === "production" ? null : {
|
|
11542
11592
|
"aria-label": import_prop_types15.default.string,
|
|
11543
11593
|
/**
|
|
11544
11594
|
* Removes fixed height from the scrollingContainer so that the total height
|
|
@@ -11624,7 +11674,7 @@ var import_getPrototypeOf10 = __toESM(require_getPrototypeOf());
|
|
|
11624
11674
|
var import_assertThisInitialized10 = __toESM(require_assertThisInitialized());
|
|
11625
11675
|
var import_inherits10 = __toESM(require_inherits());
|
|
11626
11676
|
var import_defineProperty13 = __toESM(require_defineProperty());
|
|
11627
|
-
import * as
|
|
11677
|
+
import * as React46 from "react";
|
|
11628
11678
|
|
|
11629
11679
|
// ../../node_modules/react-virtualized/dist/es/Masonry/PositionCache.js
|
|
11630
11680
|
var import_slicedToArray = __toESM(require_slicedToArray());
|
|
@@ -12227,10 +12277,9 @@ function ownKeys5(object, enumerableOnly) {
|
|
|
12227
12277
|
var keys = Object.keys(object);
|
|
12228
12278
|
if (Object.getOwnPropertySymbols) {
|
|
12229
12279
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
12230
|
-
if (enumerableOnly)
|
|
12231
|
-
|
|
12232
|
-
|
|
12233
|
-
});
|
|
12280
|
+
if (enumerableOnly) symbols = symbols.filter(function(sym) {
|
|
12281
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
12282
|
+
});
|
|
12234
12283
|
keys.push.apply(keys, symbols);
|
|
12235
12284
|
}
|
|
12236
12285
|
return keys;
|
|
@@ -12400,7 +12449,7 @@ var Masonry = (_temp6 = _class6 = /* @__PURE__ */ function(_React$PureComponent)
|
|
|
12400
12449
|
}
|
|
12401
12450
|
this._startIndex = startIndex;
|
|
12402
12451
|
this._stopIndex = stopIndex;
|
|
12403
|
-
return
|
|
12452
|
+
return React46.createElement("div", {
|
|
12404
12453
|
ref: this._setScrollingContainerRef,
|
|
12405
12454
|
"aria-label": this.props["aria-label"],
|
|
12406
12455
|
className: clsx_m_default("ReactVirtualized__Masonry", className),
|
|
@@ -12419,7 +12468,7 @@ var Masonry = (_temp6 = _class6 = /* @__PURE__ */ function(_React$PureComponent)
|
|
|
12419
12468
|
willChange: "transform"
|
|
12420
12469
|
}, style5),
|
|
12421
12470
|
tabIndex
|
|
12422
|
-
},
|
|
12471
|
+
}, React46.createElement("div", {
|
|
12423
12472
|
className: "ReactVirtualized__Masonry__innerScrollContainer",
|
|
12424
12473
|
style: {
|
|
12425
12474
|
width: "100%",
|
|
@@ -12509,7 +12558,7 @@ var Masonry = (_temp6 = _class6 = /* @__PURE__ */ function(_React$PureComponent)
|
|
|
12509
12558
|
}
|
|
12510
12559
|
}]);
|
|
12511
12560
|
return Masonry2;
|
|
12512
|
-
}(
|
|
12561
|
+
}(React46.PureComponent), (0, import_defineProperty13.default)(_class6, "propTypes", process.env.NODE_ENV === "production" ? null : {
|
|
12513
12562
|
"autoHeight": import_prop_types16.default.bool.isRequired,
|
|
12514
12563
|
"cellCount": import_prop_types16.default.number.isRequired,
|
|
12515
12564
|
"cellMeasurerCache": function cellMeasurerCache() {
|
|
@@ -12583,7 +12632,7 @@ var import_assertThisInitialized11 = __toESM(require_assertThisInitialized());
|
|
|
12583
12632
|
var import_inherits11 = __toESM(require_inherits());
|
|
12584
12633
|
var import_defineProperty15 = __toESM(require_defineProperty());
|
|
12585
12634
|
var import_prop_types17 = __toESM(require_prop_types());
|
|
12586
|
-
import * as
|
|
12635
|
+
import * as React47 from "react";
|
|
12587
12636
|
|
|
12588
12637
|
// ../../node_modules/react-virtualized/dist/es/MultiGrid/CellMeasurerCacheDecorator.js
|
|
12589
12638
|
var import_classCallCheck17 = __toESM(require_classCallCheck());
|
|
@@ -12676,10 +12725,9 @@ function ownKeys6(object, enumerableOnly) {
|
|
|
12676
12725
|
var keys = Object.keys(object);
|
|
12677
12726
|
if (Object.getOwnPropertySymbols) {
|
|
12678
12727
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
12679
|
-
if (enumerableOnly)
|
|
12680
|
-
|
|
12681
|
-
|
|
12682
|
-
});
|
|
12728
|
+
if (enumerableOnly) symbols = symbols.filter(function(sym) {
|
|
12729
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
12730
|
+
});
|
|
12683
12731
|
keys.push.apply(keys, symbols);
|
|
12684
12732
|
}
|
|
12685
12733
|
return keys;
|
|
@@ -12727,7 +12775,7 @@ var MultiGrid = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
12727
12775
|
var rowIndex = _ref.rowIndex, rest = (0, import_objectWithoutProperties2.default)(_ref, ["rowIndex"]);
|
|
12728
12776
|
var _this$props = _this.props, cellRenderer3 = _this$props.cellRenderer, fixedRowCount = _this$props.fixedRowCount, rowCount = _this$props.rowCount;
|
|
12729
12777
|
if (rowIndex === rowCount - fixedRowCount) {
|
|
12730
|
-
return
|
|
12778
|
+
return React47.createElement("div", {
|
|
12731
12779
|
key: rest.key,
|
|
12732
12780
|
style: _objectSpread6({}, rest.style, {
|
|
12733
12781
|
height: SCROLLBAR_SIZE_BUFFER
|
|
@@ -12753,7 +12801,7 @@ var MultiGrid = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
12753
12801
|
var columnIndex = _ref3.columnIndex, rest = (0, import_objectWithoutProperties2.default)(_ref3, ["columnIndex"]);
|
|
12754
12802
|
var _this$props3 = _this.props, cellRenderer3 = _this$props3.cellRenderer, columnCount = _this$props3.columnCount, fixedColumnCount = _this$props3.fixedColumnCount;
|
|
12755
12803
|
if (columnIndex === columnCount - fixedColumnCount) {
|
|
12756
|
-
return
|
|
12804
|
+
return React47.createElement("div", {
|
|
12757
12805
|
key: rest.key,
|
|
12758
12806
|
style: _objectSpread6({}, rest.style, {
|
|
12759
12807
|
width: SCROLLBAR_SIZE_BUFFER
|
|
@@ -12942,14 +12990,14 @@ var MultiGrid = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
12942
12990
|
return null;
|
|
12943
12991
|
}
|
|
12944
12992
|
var _this$state4 = this.state, scrollLeft = _this$state4.scrollLeft, scrollTop = _this$state4.scrollTop;
|
|
12945
|
-
return
|
|
12993
|
+
return React47.createElement("div", {
|
|
12946
12994
|
style: this._containerOuterStyle
|
|
12947
|
-
},
|
|
12995
|
+
}, React47.createElement("div", {
|
|
12948
12996
|
style: this._containerTopStyle
|
|
12949
12997
|
}, this._renderTopLeftGrid(rest), this._renderTopRightGrid(_objectSpread6({}, rest, {
|
|
12950
12998
|
onScroll: onScroll7,
|
|
12951
12999
|
scrollLeft
|
|
12952
|
-
}))),
|
|
13000
|
+
}))), React47.createElement("div", {
|
|
12953
13001
|
style: this._containerBottomStyle
|
|
12954
13002
|
}, this._renderBottomLeftGrid(_objectSpread6({}, rest, {
|
|
12955
13003
|
onScroll: onScroll7,
|
|
@@ -13131,7 +13179,7 @@ var MultiGrid = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
13131
13179
|
return null;
|
|
13132
13180
|
}
|
|
13133
13181
|
var additionalRowCount = showVerticalScrollbar ? 1 : 0, height = this._getBottomGridHeight(props), width = this._getLeftGridWidth(props), scrollbarSize2 = this.state.showVerticalScrollbar ? this.state.scrollbarSize : 0, gridWidth = hideBottomLeftGridScrollbar ? width + scrollbarSize2 : width;
|
|
13134
|
-
var bottomLeftGrid =
|
|
13182
|
+
var bottomLeftGrid = React47.createElement(Grid_default, (0, import_extends4.default)({}, props, {
|
|
13135
13183
|
cellRenderer: this._cellRendererBottomLeftGrid,
|
|
13136
13184
|
className: this.props.classNameBottomLeftGrid,
|
|
13137
13185
|
columnCount: fixedColumnCount,
|
|
@@ -13146,7 +13194,7 @@ var MultiGrid = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
13146
13194
|
width: gridWidth
|
|
13147
13195
|
}));
|
|
13148
13196
|
if (hideBottomLeftGridScrollbar) {
|
|
13149
|
-
return
|
|
13197
|
+
return React47.createElement("div", {
|
|
13150
13198
|
className: "BottomLeftGrid_ScrollWrapper",
|
|
13151
13199
|
style: _objectSpread6({}, this._bottomLeftGridStyle, {
|
|
13152
13200
|
height,
|
|
@@ -13161,7 +13209,7 @@ var MultiGrid = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
13161
13209
|
key: "_renderBottomRightGrid",
|
|
13162
13210
|
value: function _renderBottomRightGrid(props) {
|
|
13163
13211
|
var columnCount = props.columnCount, fixedColumnCount = props.fixedColumnCount, fixedRowCount = props.fixedRowCount, rowCount = props.rowCount, scrollToColumn = props.scrollToColumn, scrollToRow = props.scrollToRow;
|
|
13164
|
-
return
|
|
13212
|
+
return React47.createElement(Grid_default, (0, import_extends4.default)({}, props, {
|
|
13165
13213
|
cellRenderer: this._cellRendererBottomRightGrid,
|
|
13166
13214
|
className: this.props.classNameBottomRightGrid,
|
|
13167
13215
|
columnCount: Math.max(0, columnCount - fixedColumnCount),
|
|
@@ -13186,7 +13234,7 @@ var MultiGrid = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
13186
13234
|
if (!fixedColumnCount || !fixedRowCount) {
|
|
13187
13235
|
return null;
|
|
13188
13236
|
}
|
|
13189
|
-
return
|
|
13237
|
+
return React47.createElement(Grid_default, (0, import_extends4.default)({}, props, {
|
|
13190
13238
|
className: this.props.classNameTopLeftGrid,
|
|
13191
13239
|
columnCount: fixedColumnCount,
|
|
13192
13240
|
height: this._getTopGridHeight(props),
|
|
@@ -13213,7 +13261,7 @@ var MultiGrid = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
13213
13261
|
left: 0
|
|
13214
13262
|
});
|
|
13215
13263
|
}
|
|
13216
|
-
var topRightGrid =
|
|
13264
|
+
var topRightGrid = React47.createElement(Grid_default, (0, import_extends4.default)({}, props, {
|
|
13217
13265
|
cellRenderer: this._cellRendererTopRightGrid,
|
|
13218
13266
|
className: this.props.classNameTopRightGrid,
|
|
13219
13267
|
columnCount: Math.max(0, columnCount - fixedColumnCount) + additionalColumnCount,
|
|
@@ -13229,7 +13277,7 @@ var MultiGrid = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
13229
13277
|
width
|
|
13230
13278
|
}));
|
|
13231
13279
|
if (hideTopRightGridScrollbar) {
|
|
13232
|
-
return
|
|
13280
|
+
return React47.createElement("div", {
|
|
13233
13281
|
className: "TopRightGrid_ScrollWrapper",
|
|
13234
13282
|
style: _objectSpread6({}, this._topRightGridStyle, {
|
|
13235
13283
|
height,
|
|
@@ -13253,7 +13301,7 @@ var MultiGrid = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
13253
13301
|
}
|
|
13254
13302
|
}]);
|
|
13255
13303
|
return MultiGrid2;
|
|
13256
|
-
}(
|
|
13304
|
+
}(React47.PureComponent);
|
|
13257
13305
|
(0, import_defineProperty15.default)(MultiGrid, "defaultProps", {
|
|
13258
13306
|
classNameBottomLeftGrid: "",
|
|
13259
13307
|
classNameBottomRightGrid: "",
|
|
@@ -13301,7 +13349,7 @@ var import_getPrototypeOf12 = __toESM(require_getPrototypeOf());
|
|
|
13301
13349
|
var import_assertThisInitialized12 = __toESM(require_assertThisInitialized());
|
|
13302
13350
|
var import_inherits12 = __toESM(require_inherits());
|
|
13303
13351
|
var import_prop_types18 = __toESM(require_prop_types());
|
|
13304
|
-
import * as
|
|
13352
|
+
import * as React48 from "react";
|
|
13305
13353
|
var ScrollSync = /* @__PURE__ */ function(_React$PureComponent) {
|
|
13306
13354
|
(0, import_inherits12.default)(ScrollSync2, _React$PureComponent);
|
|
13307
13355
|
function ScrollSync2(props, context) {
|
|
@@ -13349,7 +13397,7 @@ var ScrollSync = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
13349
13397
|
}
|
|
13350
13398
|
}]);
|
|
13351
13399
|
return ScrollSync2;
|
|
13352
|
-
}(
|
|
13400
|
+
}(React48.PureComponent);
|
|
13353
13401
|
ScrollSync.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
13354
13402
|
/**
|
|
13355
13403
|
* Function responsible for rendering 2 or more virtualized components.
|
|
@@ -13449,11 +13497,11 @@ function defaultCellRenderer(_ref) {
|
|
|
13449
13497
|
}
|
|
13450
13498
|
|
|
13451
13499
|
// ../../node_modules/react-virtualized/dist/es/Table/defaultHeaderRowRenderer.js
|
|
13452
|
-
import * as
|
|
13500
|
+
import * as React49 from "react";
|
|
13453
13501
|
var import_prop_types20 = __toESM(require_prop_types());
|
|
13454
13502
|
function defaultHeaderRowRenderer(_ref) {
|
|
13455
13503
|
var className = _ref.className, columns = _ref.columns, style5 = _ref.style;
|
|
13456
|
-
return
|
|
13504
|
+
return React49.createElement("div", {
|
|
13457
13505
|
className,
|
|
13458
13506
|
role: "row",
|
|
13459
13507
|
style: style5
|
|
@@ -13462,11 +13510,11 @@ function defaultHeaderRowRenderer(_ref) {
|
|
|
13462
13510
|
defaultHeaderRowRenderer.propTypes = process.env.NODE_ENV === "production" ? null : bpfrpt_proptype_HeaderRowRendererParams === import_prop_types20.default.any ? {} : bpfrpt_proptype_HeaderRowRendererParams;
|
|
13463
13511
|
|
|
13464
13512
|
// ../../node_modules/react-virtualized/dist/es/Table/defaultHeaderRenderer.js
|
|
13465
|
-
import * as
|
|
13513
|
+
import * as React51 from "react";
|
|
13466
13514
|
|
|
13467
13515
|
// ../../node_modules/react-virtualized/dist/es/Table/SortIndicator.js
|
|
13468
13516
|
var import_prop_types21 = __toESM(require_prop_types());
|
|
13469
|
-
import * as
|
|
13517
|
+
import * as React50 from "react";
|
|
13470
13518
|
|
|
13471
13519
|
// ../../node_modules/react-virtualized/dist/es/Table/SortDirection.js
|
|
13472
13520
|
var SortDirection = {
|
|
@@ -13490,16 +13538,16 @@ function SortIndicator(_ref) {
|
|
|
13490
13538
|
"ReactVirtualized__Table__sortableHeaderIcon--ASC": sortDirection === SortDirection_default.ASC,
|
|
13491
13539
|
"ReactVirtualized__Table__sortableHeaderIcon--DESC": sortDirection === SortDirection_default.DESC
|
|
13492
13540
|
});
|
|
13493
|
-
return
|
|
13541
|
+
return React50.createElement("svg", {
|
|
13494
13542
|
className: classNames,
|
|
13495
13543
|
width: 18,
|
|
13496
13544
|
height: 18,
|
|
13497
13545
|
viewBox: "0 0 24 24"
|
|
13498
|
-
}, sortDirection === SortDirection_default.ASC ?
|
|
13546
|
+
}, sortDirection === SortDirection_default.ASC ? React50.createElement("path", {
|
|
13499
13547
|
d: "M7 14l5-5 5 5z"
|
|
13500
|
-
}) :
|
|
13548
|
+
}) : React50.createElement("path", {
|
|
13501
13549
|
d: "M7 10l5 5 5-5z"
|
|
13502
|
-
}),
|
|
13550
|
+
}), React50.createElement("path", {
|
|
13503
13551
|
d: "M0 0h24v24H0z",
|
|
13504
13552
|
fill: "none"
|
|
13505
13553
|
}));
|
|
@@ -13513,13 +13561,13 @@ var import_prop_types22 = __toESM(require_prop_types());
|
|
|
13513
13561
|
function defaultHeaderRenderer(_ref) {
|
|
13514
13562
|
var dataKey = _ref.dataKey, label = _ref.label, sortBy = _ref.sortBy, sortDirection = _ref.sortDirection;
|
|
13515
13563
|
var showSortIndicator = sortBy === dataKey;
|
|
13516
|
-
var children2 = [
|
|
13564
|
+
var children2 = [React51.createElement("span", {
|
|
13517
13565
|
className: "ReactVirtualized__Table__headerTruncatedText",
|
|
13518
13566
|
key: "label",
|
|
13519
13567
|
title: typeof label === "string" ? label : null
|
|
13520
13568
|
}, label)];
|
|
13521
13569
|
if (showSortIndicator) {
|
|
13522
|
-
children2.push(
|
|
13570
|
+
children2.push(React51.createElement(SortIndicator, {
|
|
13523
13571
|
key: "SortIndicator",
|
|
13524
13572
|
sortDirection
|
|
13525
13573
|
}));
|
|
@@ -13530,7 +13578,7 @@ defaultHeaderRenderer.propTypes = process.env.NODE_ENV === "production" ? null :
|
|
|
13530
13578
|
|
|
13531
13579
|
// ../../node_modules/react-virtualized/dist/es/Table/defaultRowRenderer.js
|
|
13532
13580
|
var import_extends5 = __toESM(require_extends());
|
|
13533
|
-
import * as
|
|
13581
|
+
import * as React52 from "react";
|
|
13534
13582
|
var import_prop_types23 = __toESM(require_prop_types());
|
|
13535
13583
|
function defaultRowRenderer(_ref) {
|
|
13536
13584
|
var className = _ref.className, columns = _ref.columns, index = _ref.index, key = _ref.key, onRowClick = _ref.onRowClick, onRowDoubleClick = _ref.onRowDoubleClick, onRowMouseOut = _ref.onRowMouseOut, onRowMouseOver = _ref.onRowMouseOver, onRowRightClick = _ref.onRowRightClick, rowData4 = _ref.rowData, style5 = _ref.style;
|
|
@@ -13586,7 +13634,7 @@ function defaultRowRenderer(_ref) {
|
|
|
13586
13634
|
};
|
|
13587
13635
|
}
|
|
13588
13636
|
}
|
|
13589
|
-
return
|
|
13637
|
+
return React52.createElement("div", (0, import_extends5.default)({}, a11yProps, {
|
|
13590
13638
|
className,
|
|
13591
13639
|
key,
|
|
13592
13640
|
role: "row",
|
|
@@ -13602,7 +13650,7 @@ var import_getPrototypeOf13 = __toESM(require_getPrototypeOf());
|
|
|
13602
13650
|
var import_inherits13 = __toESM(require_inherits());
|
|
13603
13651
|
var import_defineProperty16 = __toESM(require_defineProperty());
|
|
13604
13652
|
var import_prop_types24 = __toESM(require_prop_types());
|
|
13605
|
-
import * as
|
|
13653
|
+
import * as React53 from "react";
|
|
13606
13654
|
var Column = /* @__PURE__ */ function(_React$Component) {
|
|
13607
13655
|
(0, import_inherits13.default)(Column3, _React$Component);
|
|
13608
13656
|
function Column3() {
|
|
@@ -13610,7 +13658,7 @@ var Column = /* @__PURE__ */ function(_React$Component) {
|
|
|
13610
13658
|
return (0, import_possibleConstructorReturn13.default)(this, (0, import_getPrototypeOf13.default)(Column3).apply(this, arguments));
|
|
13611
13659
|
}
|
|
13612
13660
|
return Column3;
|
|
13613
|
-
}(
|
|
13661
|
+
}(React53.Component);
|
|
13614
13662
|
(0, import_defineProperty16.default)(Column, "defaultProps", {
|
|
13615
13663
|
cellDataGetter: defaultCellDataGetter,
|
|
13616
13664
|
cellRenderer: defaultCellRenderer,
|
|
@@ -13680,16 +13728,15 @@ var import_assertThisInitialized13 = __toESM(require_assertThisInitialized());
|
|
|
13680
13728
|
var import_inherits14 = __toESM(require_inherits());
|
|
13681
13729
|
var import_defineProperty17 = __toESM(require_defineProperty());
|
|
13682
13730
|
var import_prop_types25 = __toESM(require_prop_types());
|
|
13683
|
-
import * as
|
|
13731
|
+
import * as React54 from "react";
|
|
13684
13732
|
import { findDOMNode as findDOMNode2 } from "react-dom";
|
|
13685
13733
|
function ownKeys7(object, enumerableOnly) {
|
|
13686
13734
|
var keys = Object.keys(object);
|
|
13687
13735
|
if (Object.getOwnPropertySymbols) {
|
|
13688
13736
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
13689
|
-
if (enumerableOnly)
|
|
13690
|
-
|
|
13691
|
-
|
|
13692
|
-
});
|
|
13737
|
+
if (enumerableOnly) symbols = symbols.filter(function(sym) {
|
|
13738
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
13739
|
+
});
|
|
13693
13740
|
keys.push.apply(keys, symbols);
|
|
13694
13741
|
}
|
|
13695
13742
|
return keys;
|
|
@@ -13849,16 +13896,16 @@ var Table = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
13849
13896
|
index: -1
|
|
13850
13897
|
}) : rowStyle;
|
|
13851
13898
|
this._cachedColumnStyles = [];
|
|
13852
|
-
|
|
13899
|
+
React54.Children.toArray(children2).forEach(function(column, index) {
|
|
13853
13900
|
var flexStyles = _this2._getFlexStyleForColumn(column, column.props.style);
|
|
13854
13901
|
_this2._cachedColumnStyles[index] = _objectSpread7({
|
|
13855
13902
|
overflow: "hidden"
|
|
13856
13903
|
}, flexStyles);
|
|
13857
13904
|
});
|
|
13858
|
-
return
|
|
13905
|
+
return React54.createElement("div", {
|
|
13859
13906
|
"aria-label": this.props["aria-label"],
|
|
13860
13907
|
"aria-labelledby": this.props["aria-labelledby"],
|
|
13861
|
-
"aria-colcount":
|
|
13908
|
+
"aria-colcount": React54.Children.toArray(children2).length,
|
|
13862
13909
|
"aria-rowcount": this.props.rowCount,
|
|
13863
13910
|
className: clsx_m_default("ReactVirtualized__Table", className),
|
|
13864
13911
|
id,
|
|
@@ -13873,7 +13920,7 @@ var Table = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
13873
13920
|
paddingRight: scrollbarWidth,
|
|
13874
13921
|
width
|
|
13875
13922
|
}, rowStyleObject)
|
|
13876
|
-
}),
|
|
13923
|
+
}), React54.createElement(Grid_default, (0, import_extends6.default)({}, this.props, {
|
|
13877
13924
|
"aria-readonly": null,
|
|
13878
13925
|
autoContainerWidth: true,
|
|
13879
13926
|
className: clsx_m_default("ReactVirtualized__Table__Grid", gridClassName),
|
|
@@ -13924,7 +13971,7 @@ var Table = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
13924
13971
|
};
|
|
13925
13972
|
var style5 = this._cachedColumnStyles[columnIndex];
|
|
13926
13973
|
var title = typeof renderedCell === "string" ? renderedCell : null;
|
|
13927
|
-
return
|
|
13974
|
+
return React54.createElement("div", {
|
|
13928
13975
|
"aria-colindex": columnIndex + 1,
|
|
13929
13976
|
"aria-describedby": id,
|
|
13930
13977
|
className: clsx_m_default("ReactVirtualized__Table__rowColumn", className),
|
|
@@ -13985,7 +14032,7 @@ var Table = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
13985
14032
|
if (sortBy === dataKey) {
|
|
13986
14033
|
headerAriaSort = sortDirection === SortDirection_default.ASC ? "ascending" : "descending";
|
|
13987
14034
|
}
|
|
13988
|
-
return
|
|
14035
|
+
return React54.createElement("div", {
|
|
13989
14036
|
"aria-label": headerAriaLabel,
|
|
13990
14037
|
"aria-sort": headerAriaSort,
|
|
13991
14038
|
className: classNames,
|
|
@@ -14014,7 +14061,7 @@ var Table = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
14014
14061
|
var rowData4 = rowGetter({
|
|
14015
14062
|
index
|
|
14016
14063
|
});
|
|
14017
|
-
var columns =
|
|
14064
|
+
var columns = React54.Children.toArray(children2).map(function(column, columnIndex) {
|
|
14018
14065
|
return _this3._createColumn({
|
|
14019
14066
|
column,
|
|
14020
14067
|
columnIndex,
|
|
@@ -14072,7 +14119,7 @@ var Table = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
14072
14119
|
value: function _getHeaderColumns() {
|
|
14073
14120
|
var _this4 = this;
|
|
14074
14121
|
var _this$props4 = this.props, children2 = _this$props4.children, disableHeader = _this$props4.disableHeader;
|
|
14075
|
-
var items = disableHeader ? [] :
|
|
14122
|
+
var items = disableHeader ? [] : React54.Children.toArray(children2);
|
|
14076
14123
|
return items.map(function(column, index) {
|
|
14077
14124
|
return _this4._createHeader({
|
|
14078
14125
|
column,
|
|
@@ -14126,7 +14173,7 @@ var Table = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
14126
14173
|
}
|
|
14127
14174
|
}]);
|
|
14128
14175
|
return Table2;
|
|
14129
|
-
}(
|
|
14176
|
+
}(React54.PureComponent);
|
|
14130
14177
|
(0, import_defineProperty17.default)(Table, "defaultProps", {
|
|
14131
14178
|
disableHeader: false,
|
|
14132
14179
|
estimatedRowSize: 30,
|
|
@@ -14162,7 +14209,7 @@ Table.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
14162
14209
|
autoHeight: import_prop_types25.default.bool,
|
|
14163
14210
|
/** One or more Columns describing the data displayed in this row */
|
|
14164
14211
|
children: function children(props) {
|
|
14165
|
-
var children2 =
|
|
14212
|
+
var children2 = React54.Children.toArray(props.children);
|
|
14166
14213
|
for (var i = 0; i < children2.length; i++) {
|
|
14167
14214
|
var childType = children2[i].type;
|
|
14168
14215
|
if (childType !== Column && !(childType.prototype instanceof Column)) {
|
|
@@ -14329,7 +14376,7 @@ var import_getPrototypeOf15 = __toESM(require_getPrototypeOf());
|
|
|
14329
14376
|
var import_assertThisInitialized14 = __toESM(require_assertThisInitialized());
|
|
14330
14377
|
var import_inherits15 = __toESM(require_inherits());
|
|
14331
14378
|
var import_defineProperty18 = __toESM(require_defineProperty());
|
|
14332
|
-
import * as
|
|
14379
|
+
import * as React55 from "react";
|
|
14333
14380
|
import * as ReactDOM from "react-dom";
|
|
14334
14381
|
|
|
14335
14382
|
// ../../node_modules/react-virtualized/dist/es/WindowScroller/utils/onScroll.js
|
|
@@ -14458,10 +14505,9 @@ function ownKeys8(object, enumerableOnly) {
|
|
|
14458
14505
|
var keys = Object.keys(object);
|
|
14459
14506
|
if (Object.getOwnPropertySymbols) {
|
|
14460
14507
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
14461
|
-
if (enumerableOnly)
|
|
14462
|
-
|
|
14463
|
-
|
|
14464
|
-
});
|
|
14508
|
+
if (enumerableOnly) symbols = symbols.filter(function(sym) {
|
|
14509
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
14510
|
+
});
|
|
14465
14511
|
keys.push.apply(keys, symbols);
|
|
14466
14512
|
}
|
|
14467
14513
|
return keys;
|
|
@@ -14650,7 +14696,7 @@ var WindowScroller = (_temp7 = _class7 = /* @__PURE__ */ function(_React$PureCom
|
|
|
14650
14696
|
}
|
|
14651
14697
|
}]);
|
|
14652
14698
|
return WindowScroller2;
|
|
14653
|
-
}(
|
|
14699
|
+
}(React55.PureComponent), (0, import_defineProperty18.default)(_class7, "propTypes", process.env.NODE_ENV === "production" ? null : {
|
|
14654
14700
|
/**
|
|
14655
14701
|
* Function responsible for rendering children.
|
|
14656
14702
|
* This function should implement the following signature:
|
|
@@ -14725,9 +14771,9 @@ import {
|
|
|
14725
14771
|
useSortable,
|
|
14726
14772
|
verticalListSortingStrategy
|
|
14727
14773
|
} from "@dnd-kit/sortable";
|
|
14728
|
-
import
|
|
14774
|
+
import React56, {
|
|
14729
14775
|
createContext as createContext8,
|
|
14730
|
-
memo as
|
|
14776
|
+
memo as memo21,
|
|
14731
14777
|
useCallback as useCallback19,
|
|
14732
14778
|
useContext as useContext8,
|
|
14733
14779
|
useEffect as useEffect13,
|
|
@@ -14740,8 +14786,7 @@ var normalizeListDestinationIndex = (index, position) => {
|
|
|
14740
14786
|
return position === "above" ? index : index + 1;
|
|
14741
14787
|
};
|
|
14742
14788
|
var defaultAcceptsDrop = (sourceIndex, destinationIndex, position) => {
|
|
14743
|
-
if (position === "inside")
|
|
14744
|
-
return false;
|
|
14789
|
+
if (position === "inside") return false;
|
|
14745
14790
|
const normalized = normalizeListDestinationIndex(destinationIndex, position);
|
|
14746
14791
|
if (sourceIndex === normalized || sourceIndex + 1 === normalized) {
|
|
14747
14792
|
return false;
|
|
@@ -14856,8 +14901,7 @@ function SortableRoot({
|
|
|
14856
14901
|
axis === "x" ? over.rect.offsetLeft : over.rect.offsetTop,
|
|
14857
14902
|
axis === "x" ? over.rect.width : over.rect.height
|
|
14858
14903
|
);
|
|
14859
|
-
if (!indicator)
|
|
14860
|
-
return;
|
|
14904
|
+
if (!indicator) return;
|
|
14861
14905
|
onMoveItem?.(oldIndex, newIndex, indicator);
|
|
14862
14906
|
}
|
|
14863
14907
|
},
|
|
@@ -14867,7 +14911,7 @@ function SortableRoot({
|
|
|
14867
14911
|
useEffect13(() => {
|
|
14868
14912
|
setMounted(true);
|
|
14869
14913
|
}, []);
|
|
14870
|
-
return /* @__PURE__ */
|
|
14914
|
+
return /* @__PURE__ */ React56.createElement(
|
|
14871
14915
|
SortableItemContext.Provider,
|
|
14872
14916
|
{
|
|
14873
14917
|
value: useMemo17(
|
|
@@ -14881,7 +14925,7 @@ function SortableRoot({
|
|
|
14881
14925
|
[acceptsDrop, axis, keys, position, setActivatorEvent]
|
|
14882
14926
|
)
|
|
14883
14927
|
},
|
|
14884
|
-
/* @__PURE__ */
|
|
14928
|
+
/* @__PURE__ */ React56.createElement(
|
|
14885
14929
|
DndContext,
|
|
14886
14930
|
{
|
|
14887
14931
|
sensors,
|
|
@@ -14890,9 +14934,9 @@ function SortableRoot({
|
|
|
14890
14934
|
onDragMove: handleDragMove,
|
|
14891
14935
|
onDragEnd: handleDragEnd
|
|
14892
14936
|
},
|
|
14893
|
-
/* @__PURE__ */
|
|
14937
|
+
/* @__PURE__ */ React56.createElement(SortableContext, { items: keys, strategy: verticalListSortingStrategy }, children2),
|
|
14894
14938
|
mounted && renderOverlay && createPortal2(
|
|
14895
|
-
/* @__PURE__ */
|
|
14939
|
+
/* @__PURE__ */ React56.createElement(DragOverlay, { dropAnimation: null }, activeIndex !== void 0 && activeIndex >= 0 && renderOverlay(activeIndex)),
|
|
14896
14940
|
document.body
|
|
14897
14941
|
)
|
|
14898
14942
|
)
|
|
@@ -14900,8 +14944,8 @@ function SortableRoot({
|
|
|
14900
14944
|
}
|
|
14901
14945
|
var Sortable;
|
|
14902
14946
|
((Sortable2) => {
|
|
14903
|
-
Sortable2.Item =
|
|
14904
|
-
Sortable2.Root =
|
|
14947
|
+
Sortable2.Item = memo21(SortableItem);
|
|
14948
|
+
Sortable2.Root = memo21(SortableRoot);
|
|
14905
14949
|
})(Sortable || (Sortable = {}));
|
|
14906
14950
|
|
|
14907
14951
|
// src/components/ListView.tsx
|
|
@@ -14929,7 +14973,7 @@ var ListViewRowTitle = ({
|
|
|
14929
14973
|
className,
|
|
14930
14974
|
children: children2,
|
|
14931
14975
|
...props
|
|
14932
|
-
}) => /* @__PURE__ */
|
|
14976
|
+
}) => /* @__PURE__ */ React57.createElement(
|
|
14933
14977
|
"span",
|
|
14934
14978
|
{
|
|
14935
14979
|
className: `flex-1 overflow-hidden text-ellipsis whitespace-pre ${className ?? ""}`,
|
|
@@ -14937,8 +14981,8 @@ var ListViewRowTitle = ({
|
|
|
14937
14981
|
},
|
|
14938
14982
|
children2
|
|
14939
14983
|
);
|
|
14940
|
-
var ListViewEditableRowTitleElement =
|
|
14941
|
-
({ className, ...props }, forwardedRef) => /* @__PURE__ */
|
|
14984
|
+
var ListViewEditableRowTitleElement = forwardRef15(
|
|
14985
|
+
({ className, ...props }, forwardedRef) => /* @__PURE__ */ React57.createElement(
|
|
14942
14986
|
InputField.Input,
|
|
14943
14987
|
{
|
|
14944
14988
|
ref: forwardedRef,
|
|
@@ -14956,14 +15000,13 @@ function ListViewEditableRowTitle({
|
|
|
14956
15000
|
const inputRef = useRef16(null);
|
|
14957
15001
|
useLayoutEffect6(() => {
|
|
14958
15002
|
const element = inputRef.current;
|
|
14959
|
-
if (!element || !autoFocus)
|
|
14960
|
-
return;
|
|
15003
|
+
if (!element || !autoFocus) return;
|
|
14961
15004
|
element.focus();
|
|
14962
15005
|
setTimeout(() => {
|
|
14963
15006
|
element.select();
|
|
14964
15007
|
}, 0);
|
|
14965
15008
|
}, [autoFocus]);
|
|
14966
|
-
return /* @__PURE__ */
|
|
15009
|
+
return /* @__PURE__ */ React57.createElement(
|
|
14967
15010
|
ListViewEditableRowTitleElement,
|
|
14968
15011
|
{
|
|
14969
15012
|
ref: inputRef,
|
|
@@ -14996,7 +15039,7 @@ var theme = {
|
|
|
14996
15039
|
dividerSubtle: "var(--divider-subtle)"
|
|
14997
15040
|
}
|
|
14998
15041
|
};
|
|
14999
|
-
var RowContainer =
|
|
15042
|
+
var RowContainer = forwardRef15(
|
|
15000
15043
|
({
|
|
15001
15044
|
className,
|
|
15002
15045
|
$marginType,
|
|
@@ -15016,7 +15059,7 @@ var RowContainer = forwardRef14(
|
|
|
15016
15059
|
...props
|
|
15017
15060
|
}, ref) => {
|
|
15018
15061
|
const margin = getPositionMargin($marginType);
|
|
15019
|
-
return /* @__PURE__ */
|
|
15062
|
+
return /* @__PURE__ */ React57.createElement(
|
|
15020
15063
|
"div",
|
|
15021
15064
|
{
|
|
15022
15065
|
ref,
|
|
@@ -15092,7 +15135,7 @@ var RowContainer = forwardRef14(
|
|
|
15092
15135
|
);
|
|
15093
15136
|
}
|
|
15094
15137
|
);
|
|
15095
|
-
var ListViewDragIndicatorElement =
|
|
15138
|
+
var ListViewDragIndicatorElement = forwardRef15(
|
|
15096
15139
|
({
|
|
15097
15140
|
className,
|
|
15098
15141
|
$relativeDropPosition,
|
|
@@ -15102,7 +15145,7 @@ var ListViewDragIndicatorElement = forwardRef14(
|
|
|
15102
15145
|
style: style5,
|
|
15103
15146
|
...props
|
|
15104
15147
|
}, ref) => {
|
|
15105
|
-
return /* @__PURE__ */
|
|
15148
|
+
return /* @__PURE__ */ React57.createElement(
|
|
15106
15149
|
"div",
|
|
15107
15150
|
{
|
|
15108
15151
|
ref,
|
|
@@ -15131,7 +15174,7 @@ var ListViewDragIndicatorElement = forwardRef14(
|
|
|
15131
15174
|
);
|
|
15132
15175
|
}
|
|
15133
15176
|
);
|
|
15134
|
-
var ListViewRow =
|
|
15177
|
+
var ListViewRow = forwardRef15(function ListViewRow2({
|
|
15135
15178
|
id,
|
|
15136
15179
|
tabIndex = 0,
|
|
15137
15180
|
gap,
|
|
@@ -15174,8 +15217,7 @@ var ListViewRow = forwardRef14(function ListViewRow2({
|
|
|
15174
15217
|
const handlePress = useCallback20(
|
|
15175
15218
|
(event) => {
|
|
15176
15219
|
event.preventDefault();
|
|
15177
|
-
if (event.button !== 0)
|
|
15178
|
-
return;
|
|
15220
|
+
if (event.button !== 0) return;
|
|
15179
15221
|
onPress?.(event);
|
|
15180
15222
|
},
|
|
15181
15223
|
[onPress]
|
|
@@ -15200,7 +15242,7 @@ var ListViewRow = forwardRef14(function ListViewRow2({
|
|
|
15200
15242
|
...renderProps
|
|
15201
15243
|
}, ref) => {
|
|
15202
15244
|
const Component3 = RowContainer;
|
|
15203
|
-
const element = /* @__PURE__ */
|
|
15245
|
+
const element = /* @__PURE__ */ React57.createElement(
|
|
15204
15246
|
Component3,
|
|
15205
15247
|
{
|
|
15206
15248
|
ref,
|
|
@@ -15232,7 +15274,7 @@ var ListViewRow = forwardRef14(function ListViewRow2({
|
|
|
15232
15274
|
tabIndex,
|
|
15233
15275
|
className
|
|
15234
15276
|
},
|
|
15235
|
-
relativeDropPosition && /* @__PURE__ */
|
|
15277
|
+
relativeDropPosition && /* @__PURE__ */ React57.createElement(
|
|
15236
15278
|
ListViewDragIndicatorElement,
|
|
15237
15279
|
{
|
|
15238
15280
|
$colorScheme: colorScheme,
|
|
@@ -15246,11 +15288,11 @@ var ListViewRow = forwardRef14(function ListViewRow2({
|
|
|
15246
15288
|
}) : dragIndicatorStyle
|
|
15247
15289
|
}
|
|
15248
15290
|
),
|
|
15249
|
-
depth > 0 && /* @__PURE__ */
|
|
15291
|
+
depth > 0 && /* @__PURE__ */ React57.createElement(Spacer.Horizontal, { size: depth * indentation }),
|
|
15250
15292
|
children2
|
|
15251
15293
|
);
|
|
15252
15294
|
if (menuItems && onSelectMenuItem) {
|
|
15253
|
-
return /* @__PURE__ */
|
|
15295
|
+
return /* @__PURE__ */ React57.createElement(
|
|
15254
15296
|
ContextMenu,
|
|
15255
15297
|
{
|
|
15256
15298
|
items: menuItems,
|
|
@@ -15263,7 +15305,7 @@ var ListViewRow = forwardRef14(function ListViewRow2({
|
|
|
15263
15305
|
return element;
|
|
15264
15306
|
};
|
|
15265
15307
|
if (sortable && id) {
|
|
15266
|
-
return /* @__PURE__ */
|
|
15308
|
+
return /* @__PURE__ */ React57.createElement(Sortable.Item, { id, disabled: overrideSortable === false }, ({ ref: sortableRef, ...sortableProps }) => renderContent(
|
|
15267
15309
|
sortableProps,
|
|
15268
15310
|
composeRefs2(sortableRef, forwardedRef)
|
|
15269
15311
|
));
|
|
@@ -15274,14 +15316,14 @@ var RenderItemContext = createContext9(
|
|
|
15274
15316
|
() => null
|
|
15275
15317
|
);
|
|
15276
15318
|
RenderItemContext.displayName = "RenderItemContext";
|
|
15277
|
-
var VirtualizedListRow =
|
|
15319
|
+
var VirtualizedListRow = memo22(function VirtualizedListRow2({
|
|
15278
15320
|
index,
|
|
15279
15321
|
style: style5
|
|
15280
15322
|
}) {
|
|
15281
15323
|
const renderItem = useContext9(RenderItemContext);
|
|
15282
|
-
return /* @__PURE__ */
|
|
15324
|
+
return /* @__PURE__ */ React57.createElement("div", { key: index, style: style5 }, renderItem(index));
|
|
15283
15325
|
});
|
|
15284
|
-
var VirtualizedListInner =
|
|
15326
|
+
var VirtualizedListInner = forwardRef15(function VirtualizedListInner2({
|
|
15285
15327
|
size: size3,
|
|
15286
15328
|
scrollElement,
|
|
15287
15329
|
items,
|
|
@@ -15310,7 +15352,7 @@ var VirtualizedListInner = forwardRef14(function VirtualizedListInner2({
|
|
|
15310
15352
|
}),
|
|
15311
15353
|
[]
|
|
15312
15354
|
);
|
|
15313
|
-
return /* @__PURE__ */
|
|
15355
|
+
return /* @__PURE__ */ React57.createElement(RenderItemContext.Provider, { value: renderItem }, /* @__PURE__ */ React57.createElement(
|
|
15314
15356
|
WindowScroller,
|
|
15315
15357
|
{
|
|
15316
15358
|
scrollElement,
|
|
@@ -15321,7 +15363,7 @@ var VirtualizedListInner = forwardRef14(function VirtualizedListInner2({
|
|
|
15321
15363
|
registerChild,
|
|
15322
15364
|
onChildScroll,
|
|
15323
15365
|
scrollTop
|
|
15324
|
-
}) => /* @__PURE__ */
|
|
15366
|
+
}) => /* @__PURE__ */ React57.createElement("div", { ref: registerChild }, /* @__PURE__ */ React57.createElement(
|
|
15325
15367
|
VariableSizeList,
|
|
15326
15368
|
{
|
|
15327
15369
|
ref: listRef,
|
|
@@ -15351,10 +15393,10 @@ var VirtualizedListInner = forwardRef14(function VirtualizedListInner2({
|
|
|
15351
15393
|
)
|
|
15352
15394
|
));
|
|
15353
15395
|
});
|
|
15354
|
-
var VirtualizedList =
|
|
15396
|
+
var VirtualizedList = memo22(
|
|
15355
15397
|
VirtualizedListInner
|
|
15356
15398
|
);
|
|
15357
|
-
var ListViewRootInner =
|
|
15399
|
+
var ListViewRootInner = forwardRef15(function ListViewRootInner2({
|
|
15358
15400
|
id,
|
|
15359
15401
|
className,
|
|
15360
15402
|
style: style5,
|
|
@@ -15411,8 +15453,7 @@ var ListViewRootInner = forwardRef14(function ListViewRootInner2({
|
|
|
15411
15453
|
if (variant === "bare" || variant === "normal")
|
|
15412
15454
|
return defaultContextValue;
|
|
15413
15455
|
const current = renderChild(i);
|
|
15414
|
-
if (!isValidElement3(current))
|
|
15415
|
-
return;
|
|
15456
|
+
if (!isValidElement3(current)) return;
|
|
15416
15457
|
const prevChild = i - 1 >= 0 && renderChild(i - 1);
|
|
15417
15458
|
const nextChild = i + 1 < data.length && renderChild(i + 1);
|
|
15418
15459
|
const next = isValidElement3(nextChild) ? nextChild : void 0;
|
|
@@ -15474,21 +15515,20 @@ var ListViewRootInner = forwardRef14(function ListViewRootInner2({
|
|
|
15474
15515
|
[indentation]
|
|
15475
15516
|
);
|
|
15476
15517
|
const renderOverlay = useCallback20(
|
|
15477
|
-
(index) => /* @__PURE__ */
|
|
15518
|
+
(index) => /* @__PURE__ */ React57.createElement("div", { style: { opacity: 0.25 } }, /* @__PURE__ */ React57.createElement(ListViewDraggingContext.Provider, { value: draggingContextOverlayValue }, renderItem(data[index], index, { isDragging: true }))),
|
|
15478
15519
|
[draggingContextOverlayValue, renderItem, data]
|
|
15479
15520
|
);
|
|
15480
15521
|
const renderWrappedChild = useCallback20(
|
|
15481
15522
|
(index) => {
|
|
15482
15523
|
const contextValue = getItemContextValue(index);
|
|
15483
15524
|
const current = renderChild(index);
|
|
15484
|
-
if (!contextValue || !isValidElement3(current))
|
|
15485
|
-
|
|
15486
|
-
return /* @__PURE__ */ React56.createElement(ListRowContext.Provider, { key: current.key, value: contextValue }, current);
|
|
15525
|
+
if (!contextValue || !isValidElement3(current)) return null;
|
|
15526
|
+
return /* @__PURE__ */ React57.createElement(ListRowContext.Provider, { key: current.key, value: contextValue }, current);
|
|
15487
15527
|
},
|
|
15488
15528
|
[getItemContextValue, renderChild]
|
|
15489
15529
|
);
|
|
15490
15530
|
const ids = useMemo18(() => data.map(keyExtractor), [keyExtractor, data]);
|
|
15491
|
-
const withSortable = (children2) => sortable ? /* @__PURE__ */
|
|
15531
|
+
const withSortable = (children2) => sortable ? /* @__PURE__ */ React57.createElement(
|
|
15492
15532
|
Sortable.Root,
|
|
15493
15533
|
{
|
|
15494
15534
|
onMoveItem,
|
|
@@ -15498,7 +15538,7 @@ var ListViewRootInner = forwardRef14(function ListViewRootInner2({
|
|
|
15498
15538
|
},
|
|
15499
15539
|
children2
|
|
15500
15540
|
) : children2;
|
|
15501
|
-
const withScrollable = (children2) => scrollable ? /* @__PURE__ */
|
|
15541
|
+
const withScrollable = (children2) => scrollable ? /* @__PURE__ */ React57.createElement(ScrollArea, null, children2) : children2(null);
|
|
15502
15542
|
const getItemHeight = useCallback20(
|
|
15503
15543
|
(index) => {
|
|
15504
15544
|
const child = getItemContextValue(index);
|
|
@@ -15514,7 +15554,7 @@ var ListViewRootInner = forwardRef14(function ListViewRootInner2({
|
|
|
15514
15554
|
);
|
|
15515
15555
|
const draggingContextValue = useMemo18(() => ({ indentation }), [indentation]);
|
|
15516
15556
|
const gapStyle = useMemo18(() => ({ gap: `${gap}px` }), [gap]);
|
|
15517
|
-
return /* @__PURE__ */
|
|
15557
|
+
return /* @__PURE__ */ React57.createElement(ListViewDraggingContext.Provider, { value: draggingContextValue }, /* @__PURE__ */ React57.createElement(
|
|
15518
15558
|
"div",
|
|
15519
15559
|
{
|
|
15520
15560
|
id,
|
|
@@ -15526,7 +15566,7 @@ var ListViewRootInner = forwardRef14(function ListViewRootInner2({
|
|
|
15526
15566
|
},
|
|
15527
15567
|
withScrollable(
|
|
15528
15568
|
(scrollElementRef) => withSortable(
|
|
15529
|
-
virtualized ? /* @__PURE__ */
|
|
15569
|
+
virtualized ? /* @__PURE__ */ React57.createElement(
|
|
15530
15570
|
VirtualizedList,
|
|
15531
15571
|
{
|
|
15532
15572
|
ref: forwardedRef,
|
|
@@ -15542,15 +15582,15 @@ var ListViewRootInner = forwardRef14(function ListViewRootInner2({
|
|
|
15542
15582
|
)
|
|
15543
15583
|
));
|
|
15544
15584
|
});
|
|
15545
|
-
var ListViewRoot =
|
|
15546
|
-
var ChildrenListViewInner =
|
|
15585
|
+
var ListViewRoot = memo22(ListViewRootInner);
|
|
15586
|
+
var ChildrenListViewInner = forwardRef15(function ChildrenListViewInner2({ children: children2, ...rest }, forwardedRef) {
|
|
15547
15587
|
const items = useMemo18(
|
|
15548
15588
|
() => Children4.toArray(children2).flatMap(
|
|
15549
15589
|
(child) => isValidElement3(child) ? [child] : []
|
|
15550
15590
|
),
|
|
15551
15591
|
[children2]
|
|
15552
15592
|
);
|
|
15553
|
-
return /* @__PURE__ */
|
|
15593
|
+
return /* @__PURE__ */ React57.createElement(
|
|
15554
15594
|
ListViewRoot,
|
|
15555
15595
|
{
|
|
15556
15596
|
ref: forwardedRef,
|
|
@@ -15564,20 +15604,20 @@ var ChildrenListViewInner = forwardRef14(function ChildrenListViewInner2({ child
|
|
|
15564
15604
|
}
|
|
15565
15605
|
);
|
|
15566
15606
|
});
|
|
15567
|
-
var ChildrenListView =
|
|
15568
|
-
var SimpleListViewInner =
|
|
15607
|
+
var ChildrenListView = memo22(ChildrenListViewInner);
|
|
15608
|
+
var SimpleListViewInner = forwardRef15(function SimpleListViewInner2(props, forwardedRef) {
|
|
15569
15609
|
if ("children" in props) {
|
|
15570
|
-
return /* @__PURE__ */
|
|
15610
|
+
return /* @__PURE__ */ React57.createElement(ChildrenListView, { ref: forwardedRef, ...props });
|
|
15571
15611
|
} else {
|
|
15572
|
-
return /* @__PURE__ */
|
|
15612
|
+
return /* @__PURE__ */ React57.createElement(ListViewRoot, { ref: forwardedRef, ...props });
|
|
15573
15613
|
}
|
|
15574
15614
|
});
|
|
15575
|
-
var SimpleListView =
|
|
15615
|
+
var SimpleListView = memo22(SimpleListViewInner);
|
|
15576
15616
|
var ListView;
|
|
15577
15617
|
((ListView2) => {
|
|
15578
|
-
ListView2.RowTitle =
|
|
15579
|
-
ListView2.EditableRowTitle =
|
|
15580
|
-
ListView2.Row =
|
|
15618
|
+
ListView2.RowTitle = memo22(ListViewRowTitle);
|
|
15619
|
+
ListView2.EditableRowTitle = memo22(ListViewEditableRowTitle);
|
|
15620
|
+
ListView2.Row = memo22(ListViewRow);
|
|
15581
15621
|
ListView2.Root = SimpleListView;
|
|
15582
15622
|
ListView2.RowContext = ListRowContext;
|
|
15583
15623
|
ListView2.DragIndicator = ListViewDragIndicatorElement;
|
|
@@ -15610,20 +15650,19 @@ function filterWithGroupedSections(items, query) {
|
|
|
15610
15650
|
if (maxVisibleItems !== void 0) {
|
|
15611
15651
|
newItems = newItems.slice(0, maxVisibleItems);
|
|
15612
15652
|
}
|
|
15613
|
-
if (newItems.length === 0)
|
|
15614
|
-
return [];
|
|
15653
|
+
if (newItems.length === 0) return [];
|
|
15615
15654
|
return [...headers, ...newItems];
|
|
15616
15655
|
});
|
|
15617
15656
|
}
|
|
15618
|
-
var CompletionMenu =
|
|
15619
|
-
|
|
15657
|
+
var CompletionMenu = memo23(
|
|
15658
|
+
forwardRef16(function CompletionMenu2({
|
|
15620
15659
|
items,
|
|
15621
15660
|
selectedIndex,
|
|
15622
15661
|
onSelectItem,
|
|
15623
15662
|
onHoverIndex,
|
|
15624
15663
|
listSize
|
|
15625
15664
|
}, forwardedRef) {
|
|
15626
|
-
return /* @__PURE__ */
|
|
15665
|
+
return /* @__PURE__ */ React58.createElement(
|
|
15627
15666
|
ListView.Root,
|
|
15628
15667
|
{
|
|
15629
15668
|
ref: forwardedRef,
|
|
@@ -15635,13 +15674,13 @@ var CompletionMenu = memo22(
|
|
|
15635
15674
|
sectionHeaderVariant: "label",
|
|
15636
15675
|
renderItem: (item, i) => {
|
|
15637
15676
|
if (item.type === "sectionHeader") {
|
|
15638
|
-
return /* @__PURE__ */
|
|
15677
|
+
return /* @__PURE__ */ React58.createElement(ListView.Row, { key: item.id, isSectionHeader: true }, item.name);
|
|
15639
15678
|
}
|
|
15640
15679
|
const tokens = fuzzyTokenize({
|
|
15641
15680
|
item: item.name,
|
|
15642
15681
|
itemScore: item
|
|
15643
15682
|
});
|
|
15644
|
-
return /* @__PURE__ */
|
|
15683
|
+
return /* @__PURE__ */ React58.createElement(
|
|
15645
15684
|
ListView.Row,
|
|
15646
15685
|
{
|
|
15647
15686
|
key: item.id,
|
|
@@ -15653,7 +15692,7 @@ var CompletionMenu = memo22(
|
|
|
15653
15692
|
}
|
|
15654
15693
|
}
|
|
15655
15694
|
},
|
|
15656
|
-
tokens.map((token, j) => /* @__PURE__ */
|
|
15695
|
+
tokens.map((token, j) => /* @__PURE__ */ React58.createElement(
|
|
15657
15696
|
"span",
|
|
15658
15697
|
{
|
|
15659
15698
|
key: j,
|
|
@@ -15661,15 +15700,15 @@ var CompletionMenu = memo22(
|
|
|
15661
15700
|
},
|
|
15662
15701
|
token.text
|
|
15663
15702
|
)),
|
|
15664
|
-
item.icon && /* @__PURE__ */
|
|
15703
|
+
item.icon && /* @__PURE__ */ React58.createElement(React58.Fragment, null, /* @__PURE__ */ React58.createElement(Spacer.Horizontal, null), item.icon)
|
|
15665
15704
|
);
|
|
15666
15705
|
}
|
|
15667
15706
|
}
|
|
15668
15707
|
);
|
|
15669
15708
|
})
|
|
15670
15709
|
);
|
|
15671
|
-
var InputFieldWithCompletions =
|
|
15672
|
-
|
|
15710
|
+
var InputFieldWithCompletions = memo23(
|
|
15711
|
+
forwardRef16(function InputFieldWithCompletions2({
|
|
15673
15712
|
loading,
|
|
15674
15713
|
initialValue = "",
|
|
15675
15714
|
placeholder,
|
|
@@ -15724,13 +15763,12 @@ var InputFieldWithCompletions = memo22(
|
|
|
15724
15763
|
);
|
|
15725
15764
|
const initialValueRef = useRef17(initialValue);
|
|
15726
15765
|
useLayoutEffect7(() => {
|
|
15727
|
-
if (initialValueRef.current === initialValue)
|
|
15728
|
-
return;
|
|
15766
|
+
if (initialValueRef.current === initialValue) return;
|
|
15729
15767
|
initialValueRef.current = initialValue;
|
|
15730
15768
|
updateState({ filter: initialValue });
|
|
15731
15769
|
}, [initialValue, updateState]);
|
|
15732
15770
|
const { filter, selectedIndex } = state;
|
|
15733
|
-
const listRef =
|
|
15771
|
+
const listRef = React58.useRef(null);
|
|
15734
15772
|
const filteredItems = useMemo19(
|
|
15735
15773
|
() => filterWithGroupedSections(items, filter),
|
|
15736
15774
|
[items, filter]
|
|
@@ -15755,8 +15793,7 @@ var InputFieldWithCompletions = memo22(
|
|
|
15755
15793
|
const lastSubmittedValueRef = useRef17(void 0);
|
|
15756
15794
|
const selectItem = useCallback21(
|
|
15757
15795
|
(item) => {
|
|
15758
|
-
if (item.type === "sectionHeader")
|
|
15759
|
-
return;
|
|
15796
|
+
if (item.type === "sectionHeader") return;
|
|
15760
15797
|
lastSubmittedValueRef.current = {
|
|
15761
15798
|
filter,
|
|
15762
15799
|
itemName: item.name
|
|
@@ -15866,13 +15903,13 @@ var InputFieldWithCompletions = memo22(
|
|
|
15866
15903
|
ref.current?.setSelectionRange(0, ref.current.value.length);
|
|
15867
15904
|
}
|
|
15868
15905
|
}));
|
|
15869
|
-
return /* @__PURE__ */
|
|
15906
|
+
return /* @__PURE__ */ React58.createElement(
|
|
15870
15907
|
InputField.Root,
|
|
15871
15908
|
{
|
|
15872
15909
|
size: size3,
|
|
15873
15910
|
renderPopoverContent: ({ width }) => {
|
|
15874
15911
|
const listSize = { width, height };
|
|
15875
|
-
return /* @__PURE__ */
|
|
15912
|
+
return /* @__PURE__ */ React58.createElement(
|
|
15876
15913
|
"div",
|
|
15877
15914
|
{
|
|
15878
15915
|
className: `flex flex-col ${!filter && hideMenuWhenEmptyValue ? "none" : "flex"}`,
|
|
@@ -15880,7 +15917,7 @@ var InputFieldWithCompletions = memo22(
|
|
|
15880
15917
|
flex: `0 0 ${height}px`
|
|
15881
15918
|
}
|
|
15882
15919
|
},
|
|
15883
|
-
filteredItems.length > 0 ? /* @__PURE__ */
|
|
15920
|
+
filteredItems.length > 0 ? /* @__PURE__ */ React58.createElement(
|
|
15884
15921
|
CompletionMenu,
|
|
15885
15922
|
{
|
|
15886
15923
|
ref: listRef,
|
|
@@ -15890,11 +15927,11 @@ var InputFieldWithCompletions = memo22(
|
|
|
15890
15927
|
onHoverIndex: handleIndexChange,
|
|
15891
15928
|
listSize
|
|
15892
15929
|
}
|
|
15893
|
-
) : /* @__PURE__ */
|
|
15930
|
+
) : /* @__PURE__ */ React58.createElement("div", { className: "flex flex-col h-[100px] p-5 items-center justify-center" }, /* @__PURE__ */ React58.createElement(Small, { className: "text-text-disabled" }, loading ? "Loading" : "No results"))
|
|
15894
15931
|
);
|
|
15895
15932
|
}
|
|
15896
15933
|
},
|
|
15897
|
-
/* @__PURE__ */
|
|
15934
|
+
/* @__PURE__ */ React58.createElement(
|
|
15898
15935
|
InputField.Input,
|
|
15899
15936
|
{
|
|
15900
15937
|
ref,
|
|
@@ -15918,16 +15955,15 @@ var InputFieldWithCompletions = memo22(
|
|
|
15918
15955
|
"aria-controls": "component-listbox"
|
|
15919
15956
|
}
|
|
15920
15957
|
),
|
|
15921
|
-
filter && typeaheadValue && typeaheadValue.toLowerCase().startsWith(filter.toLowerCase()) && /* @__PURE__ */
|
|
15958
|
+
filter && typeaheadValue && typeaheadValue.toLowerCase().startsWith(filter.toLowerCase()) && /* @__PURE__ */ React58.createElement(InputField.Typeahead, { value: typeaheadValue, prefix: filter }),
|
|
15922
15959
|
(!isFocused || !hideChildrenWhenFocused) && children2,
|
|
15923
|
-
loading && isFocused && /* @__PURE__ */
|
|
15960
|
+
loading && isFocused && /* @__PURE__ */ React58.createElement(InputField.Label, null, /* @__PURE__ */ React58.createElement(ActivityIndicator, null))
|
|
15924
15961
|
);
|
|
15925
15962
|
})
|
|
15926
15963
|
);
|
|
15927
15964
|
function getNextIndex(items, currentIndex, direction, isDisabled) {
|
|
15928
15965
|
currentIndex = currentIndex < 0 ? 0 : currentIndex >= items.length ? items.length - 1 : currentIndex;
|
|
15929
|
-
if (items.every(isDisabled))
|
|
15930
|
-
return -1;
|
|
15966
|
+
if (items.every(isDisabled)) return -1;
|
|
15931
15967
|
let nextIndex = currentIndex;
|
|
15932
15968
|
do {
|
|
15933
15969
|
if (direction === "next") {
|
|
@@ -15935,16 +15971,15 @@ function getNextIndex(items, currentIndex, direction, isDisabled) {
|
|
|
15935
15971
|
} else {
|
|
15936
15972
|
nextIndex = (nextIndex - 1 + items.length) % items.length;
|
|
15937
15973
|
}
|
|
15938
|
-
if (nextIndex === currentIndex)
|
|
15939
|
-
return currentIndex;
|
|
15974
|
+
if (nextIndex === currentIndex) return currentIndex;
|
|
15940
15975
|
} while (isDisabled(items[nextIndex]));
|
|
15941
15976
|
return nextIndex;
|
|
15942
15977
|
}
|
|
15943
15978
|
|
|
15944
15979
|
// src/components/InspectorContainer.tsx
|
|
15945
|
-
import
|
|
15946
|
-
var InspectorContainer =
|
|
15947
|
-
|
|
15980
|
+
import React59, { forwardRef as forwardRef17, memo as memo24 } from "react";
|
|
15981
|
+
var InspectorContainer = memo24(
|
|
15982
|
+
forwardRef17(function InspectorContainer2({
|
|
15948
15983
|
header,
|
|
15949
15984
|
children: children2,
|
|
15950
15985
|
fallback,
|
|
@@ -15953,7 +15988,7 @@ var InspectorContainer = memo23(
|
|
|
15953
15988
|
className,
|
|
15954
15989
|
style: style5
|
|
15955
15990
|
}, forwardedRef) {
|
|
15956
|
-
return /* @__PURE__ */
|
|
15991
|
+
return /* @__PURE__ */ React59.createElement(
|
|
15957
15992
|
"div",
|
|
15958
15993
|
{
|
|
15959
15994
|
ref: forwardedRef,
|
|
@@ -15968,39 +16003,44 @@ var InspectorContainer = memo23(
|
|
|
15968
16003
|
}
|
|
15969
16004
|
},
|
|
15970
16005
|
header,
|
|
15971
|
-
children2 ? /* @__PURE__ */
|
|
16006
|
+
children2 ? /* @__PURE__ */ React59.createElement(ScrollArea, null, /* @__PURE__ */ React59.createElement("div", { className: "flex flex-col relative" }, showDividers ? withSeparatorElements(children2, /* @__PURE__ */ React59.createElement(Divider, null)) : children2)) : fallback ? /* @__PURE__ */ React59.createElement("div", { className: "flex flex-col relative h-full" }, fallback) : null
|
|
15972
16007
|
);
|
|
15973
16008
|
})
|
|
15974
16009
|
);
|
|
15975
16010
|
|
|
15976
16011
|
// src/components/Label.tsx
|
|
15977
|
-
import
|
|
15978
|
-
|
|
15979
|
-
|
|
15980
|
-
|
|
15981
|
-
|
|
15982
|
-
|
|
15983
|
-
|
|
15984
|
-
|
|
16012
|
+
import React60, { forwardRef as forwardRef18, memo as memo25 } from "react";
|
|
16013
|
+
var Label = memo25(
|
|
16014
|
+
forwardRef18(function Label2({ className, ...props }, ref) {
|
|
16015
|
+
return /* @__PURE__ */ React60.createElement(
|
|
16016
|
+
"label",
|
|
16017
|
+
{
|
|
16018
|
+
ref,
|
|
16019
|
+
className: `font-sans text-label uppercase flex items-center leading-[19px] select-none font-bold text-text-muted ${className ?? ""}`,
|
|
16020
|
+
...props
|
|
16021
|
+
}
|
|
16022
|
+
);
|
|
16023
|
+
})
|
|
16024
|
+
);
|
|
15985
16025
|
|
|
15986
16026
|
// src/components/LabeledElementView.tsx
|
|
15987
16027
|
import * as kiwi from "kiwi.js";
|
|
15988
|
-
import
|
|
16028
|
+
import React61, {
|
|
15989
16029
|
Children as Children5,
|
|
15990
16030
|
createRef,
|
|
15991
|
-
Fragment,
|
|
16031
|
+
Fragment as Fragment2,
|
|
15992
16032
|
isValidElement as isValidElement4,
|
|
15993
|
-
memo as
|
|
16033
|
+
memo as memo26,
|
|
15994
16034
|
useLayoutEffect as useLayoutEffect8,
|
|
15995
16035
|
useMemo as useMemo20,
|
|
15996
16036
|
useRef as useRef18
|
|
15997
16037
|
} from "react";
|
|
15998
|
-
var LabeledElementView =
|
|
16038
|
+
var LabeledElementView = memo26(function LabeledElementView2({
|
|
15999
16039
|
children: children2,
|
|
16000
16040
|
renderLabel
|
|
16001
16041
|
}) {
|
|
16002
16042
|
const elementIds = Children5.toArray(children2).flatMap(
|
|
16003
|
-
(child) => isValidElement4(child) && child.type ===
|
|
16043
|
+
(child) => isValidElement4(child) && child.type === Fragment2 ? child.props.children : [child]
|
|
16004
16044
|
).map(
|
|
16005
16045
|
(child) => isValidElement4(child) && "id" in child.props ? child.props.id : null
|
|
16006
16046
|
).filter((id) => !!id);
|
|
@@ -16012,7 +16052,7 @@ var LabeledElementView = memo25(function LabeledElementView2({
|
|
|
16012
16052
|
);
|
|
16013
16053
|
}, [serializedIds]);
|
|
16014
16054
|
const labelElements = useMemo20(() => {
|
|
16015
|
-
return serializedIds.split(",").map((id, index) => /* @__PURE__ */
|
|
16055
|
+
return serializedIds.split(",").map((id, index) => /* @__PURE__ */ React61.createElement(
|
|
16016
16056
|
"span",
|
|
16017
16057
|
{
|
|
16018
16058
|
key: id,
|
|
@@ -16026,15 +16066,13 @@ var LabeledElementView = memo25(function LabeledElementView2({
|
|
|
16026
16066
|
));
|
|
16027
16067
|
}, [refs, serializedIds, renderLabel]);
|
|
16028
16068
|
useLayoutEffect8(() => {
|
|
16029
|
-
if (!containerRef.current)
|
|
16030
|
-
return;
|
|
16069
|
+
if (!containerRef.current) return;
|
|
16031
16070
|
const containerRect = containerRef.current.getBoundingClientRect();
|
|
16032
16071
|
const solver = new kiwi.Solver();
|
|
16033
16072
|
const variables = [];
|
|
16034
16073
|
const heights = [];
|
|
16035
16074
|
Object.entries(refs).forEach(([id, ref], index, list) => {
|
|
16036
|
-
if (!ref.current)
|
|
16037
|
-
return;
|
|
16075
|
+
if (!ref.current) return;
|
|
16038
16076
|
const targetElement = document.getElementById(id);
|
|
16039
16077
|
const targetRect = targetElement.getBoundingClientRect();
|
|
16040
16078
|
targetRect.x = targetElement.offsetLeft;
|
|
@@ -16077,8 +16115,7 @@ var LabeledElementView = memo25(function LabeledElementView2({
|
|
|
16077
16115
|
});
|
|
16078
16116
|
solver.updateVariables();
|
|
16079
16117
|
Object.entries(refs).forEach(([id, ref], index) => {
|
|
16080
|
-
if (!ref.current)
|
|
16081
|
-
return;
|
|
16118
|
+
if (!ref.current) return;
|
|
16082
16119
|
const labelRect = ref.current.getBoundingClientRect();
|
|
16083
16120
|
ref.current.style.setProperty(
|
|
16084
16121
|
"--x-offset",
|
|
@@ -16090,13 +16127,13 @@ var LabeledElementView = memo25(function LabeledElementView2({
|
|
|
16090
16127
|
`${Math.max(...heights)}px`
|
|
16091
16128
|
);
|
|
16092
16129
|
}, [refs, labelElements]);
|
|
16093
|
-
return /* @__PURE__ */
|
|
16130
|
+
return /* @__PURE__ */ React61.createElement("div", { className: "flex flex-1 flex-col relative", ref: containerRef }, /* @__PURE__ */ React61.createElement("div", { className: "flex flex-1 items-center" }, children2), /* @__PURE__ */ React61.createElement("div", { className: "relative overflow-hidden select-none" }, labelElements));
|
|
16094
16131
|
});
|
|
16095
16132
|
|
|
16096
16133
|
// src/components/Progress.tsx
|
|
16097
16134
|
import { clamp } from "@noya-app/noya-utils";
|
|
16098
16135
|
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
16099
|
-
import
|
|
16136
|
+
import React62, { useMemo as useMemo21 } from "react";
|
|
16100
16137
|
function Progress({
|
|
16101
16138
|
value,
|
|
16102
16139
|
variant = "normal",
|
|
@@ -16106,14 +16143,14 @@ function Progress({
|
|
|
16106
16143
|
const transformStyles = useMemo21(() => ({
|
|
16107
16144
|
transform: `translateX(-${100 - clampedValue}%)`
|
|
16108
16145
|
}), [clampedValue]);
|
|
16109
|
-
return /* @__PURE__ */
|
|
16146
|
+
return /* @__PURE__ */ React62.createElement(
|
|
16110
16147
|
ProgressPrimitive.Root,
|
|
16111
16148
|
{
|
|
16112
16149
|
className: `relative hidden bg-input-background h-[5px] ${className ?? ""}`,
|
|
16113
16150
|
style: { transform: "translateZ(0)" },
|
|
16114
16151
|
value: clampedValue
|
|
16115
16152
|
},
|
|
16116
|
-
/* @__PURE__ */
|
|
16153
|
+
/* @__PURE__ */ React62.createElement(
|
|
16117
16154
|
ProgressPrimitive.Indicator,
|
|
16118
16155
|
{
|
|
16119
16156
|
className: cn(variant === "primary" ? "bg-primary" : variant === "secondary" ? "bg-secondary" : variant === "warning" ? "bg-warning" : "bg-text", "transition-[transform_660ms_cubic-bezier(0.65,0,0.35,1)", "w-full h-full"),
|
|
@@ -16125,17 +16162,17 @@ function Progress({
|
|
|
16125
16162
|
|
|
16126
16163
|
// src/components/RadioGroup.tsx
|
|
16127
16164
|
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
16128
|
-
import
|
|
16165
|
+
import React63, {
|
|
16129
16166
|
createContext as createContext10,
|
|
16130
|
-
forwardRef as
|
|
16131
|
-
memo as
|
|
16167
|
+
forwardRef as forwardRef19,
|
|
16168
|
+
memo as memo27,
|
|
16132
16169
|
useCallback as useCallback22,
|
|
16133
16170
|
useContext as useContext10,
|
|
16134
16171
|
useMemo as useMemo22
|
|
16135
16172
|
} from "react";
|
|
16136
|
-
var ToggleGroupItem =
|
|
16173
|
+
var ToggleGroupItem = forwardRef19(function ToggleGroupItem2({ value, tooltip, children: children2, disabled = false }, forwardedRef) {
|
|
16137
16174
|
const { colorScheme } = useContext10(RadioGroupContext);
|
|
16138
|
-
const itemElement = /* @__PURE__ */
|
|
16175
|
+
const itemElement = /* @__PURE__ */ React63.createElement(
|
|
16139
16176
|
ToggleGroupPrimitive.Item,
|
|
16140
16177
|
{
|
|
16141
16178
|
ref: forwardedRef,
|
|
@@ -16145,7 +16182,7 @@ var ToggleGroupItem = forwardRef17(function ToggleGroupItem2({ value, tooltip, c
|
|
|
16145
16182
|
},
|
|
16146
16183
|
children2
|
|
16147
16184
|
);
|
|
16148
|
-
return tooltip ? /* @__PURE__ */
|
|
16185
|
+
return tooltip ? /* @__PURE__ */ React63.createElement(Tooltip, { content: tooltip }, itemElement) : itemElement;
|
|
16149
16186
|
});
|
|
16150
16187
|
var RadioGroupContext = createContext10({
|
|
16151
16188
|
colorScheme: "primary"
|
|
@@ -16161,13 +16198,12 @@ function ToggleGroupRoot({
|
|
|
16161
16198
|
const contextValue = useMemo22(() => ({ colorScheme }), [colorScheme]);
|
|
16162
16199
|
const handleValueChange = useCallback22(
|
|
16163
16200
|
(value2) => {
|
|
16164
|
-
if (!allowEmpty && !value2)
|
|
16165
|
-
return;
|
|
16201
|
+
if (!allowEmpty && !value2) return;
|
|
16166
16202
|
onValueChange?.(value2);
|
|
16167
16203
|
},
|
|
16168
16204
|
[allowEmpty, onValueChange]
|
|
16169
16205
|
);
|
|
16170
|
-
return /* @__PURE__ */
|
|
16206
|
+
return /* @__PURE__ */ React63.createElement(RadioGroupContext.Provider, { value: contextValue }, /* @__PURE__ */ React63.createElement(
|
|
16171
16207
|
ToggleGroupPrimitive.Root,
|
|
16172
16208
|
{
|
|
16173
16209
|
id,
|
|
@@ -16181,23 +16217,33 @@ function ToggleGroupRoot({
|
|
|
16181
16217
|
}
|
|
16182
16218
|
var RadioGroup;
|
|
16183
16219
|
((RadioGroup2) => {
|
|
16184
|
-
RadioGroup2.Root =
|
|
16185
|
-
RadioGroup2.Item =
|
|
16220
|
+
RadioGroup2.Root = memo27(ToggleGroupRoot);
|
|
16221
|
+
RadioGroup2.Item = memo27(ToggleGroupItem);
|
|
16186
16222
|
})(RadioGroup || (RadioGroup = {}));
|
|
16187
16223
|
|
|
16188
16224
|
// src/components/SelectMenu.tsx
|
|
16189
|
-
import {
|
|
16225
|
+
import {
|
|
16226
|
+
ChevronDownIcon,
|
|
16227
|
+
ChevronUpIcon,
|
|
16228
|
+
DropdownChevronIcon
|
|
16229
|
+
} from "@noya-app/noya-icons";
|
|
16190
16230
|
import * as Select from "@radix-ui/react-select";
|
|
16191
|
-
import
|
|
16231
|
+
import React64, { memo as memo28, useMemo as useMemo23 } from "react";
|
|
16192
16232
|
var readOnlyStyle = {
|
|
16193
16233
|
justifyContent: "flex-start",
|
|
16194
16234
|
textAlign: "left"
|
|
16195
16235
|
};
|
|
16196
|
-
var
|
|
16197
|
-
|
|
16198
|
-
|
|
16199
|
-
|
|
16200
|
-
|
|
16236
|
+
var labelStyles = `font-sans text-label uppercase text-text-disabled leading-[19px] font-bold text-[60%] pointer-events-none flex items-center mr-1.5`;
|
|
16237
|
+
var scrollButtonStyles = `
|
|
16238
|
+
flex
|
|
16239
|
+
items-center
|
|
16240
|
+
justify-center
|
|
16241
|
+
h-[25px]
|
|
16242
|
+
cursor-default
|
|
16243
|
+
text-text-muted
|
|
16244
|
+
hover:text-text
|
|
16245
|
+
`;
|
|
16246
|
+
var SelectMenu = memo28(function SelectMenu2({
|
|
16201
16247
|
id,
|
|
16202
16248
|
style: style5,
|
|
16203
16249
|
className,
|
|
@@ -16215,7 +16261,7 @@ var SelectMenu = memo27(function SelectMenu2({
|
|
|
16215
16261
|
);
|
|
16216
16262
|
const icon = selectedItem?.icon;
|
|
16217
16263
|
const readOnlyButton = useMemo23(
|
|
16218
|
-
() => /* @__PURE__ */
|
|
16264
|
+
() => /* @__PURE__ */ React64.createElement(
|
|
16219
16265
|
Button,
|
|
16220
16266
|
{
|
|
16221
16267
|
id,
|
|
@@ -16224,59 +16270,62 @@ var SelectMenu = memo27(function SelectMenu2({
|
|
|
16224
16270
|
className: `${className ?? ""} flex-1`,
|
|
16225
16271
|
disabled
|
|
16226
16272
|
},
|
|
16227
|
-
icon && /* @__PURE__ */
|
|
16228
|
-
/* @__PURE__ */
|
|
16273
|
+
icon && /* @__PURE__ */ React64.createElement(React64.Fragment, null, renderIcon(icon), /* @__PURE__ */ React64.createElement(Spacer.Horizontal, { inline: true, size: 6 })),
|
|
16274
|
+
/* @__PURE__ */ React64.createElement("span", { className: "flex flex-1" }, selectedItem?.title ?? value)
|
|
16229
16275
|
),
|
|
16230
16276
|
[icon, id, style5, className, disabled, value, selectedItem]
|
|
16231
16277
|
);
|
|
16232
16278
|
const trigger = useMemo23(
|
|
16233
|
-
() => /* @__PURE__ */
|
|
16279
|
+
() => /* @__PURE__ */ React64.createElement(Select.SelectTrigger, { asChild: true }, /* @__PURE__ */ React64.createElement(
|
|
16234
16280
|
Button,
|
|
16235
16281
|
{
|
|
16236
16282
|
id,
|
|
16237
|
-
style:
|
|
16283
|
+
style: style5,
|
|
16238
16284
|
className: `${className ?? "w-full"} flex-1`,
|
|
16239
16285
|
disabled
|
|
16240
16286
|
},
|
|
16241
|
-
icon && /* @__PURE__ */
|
|
16242
|
-
/* @__PURE__ */
|
|
16243
|
-
/* @__PURE__ */
|
|
16244
|
-
/* @__PURE__ */
|
|
16287
|
+
icon && /* @__PURE__ */ React64.createElement(React64.Fragment, null, renderIcon(icon), /* @__PURE__ */ React64.createElement(Spacer.Horizontal, { inline: true, size: 6 })),
|
|
16288
|
+
/* @__PURE__ */ React64.createElement("span", { className: "flex flex-1 mr-1.5" }, /* @__PURE__ */ React64.createElement(Select.Value, { placeholder })),
|
|
16289
|
+
label && /* @__PURE__ */ React64.createElement("span", { className: labelStyles }, label),
|
|
16290
|
+
/* @__PURE__ */ React64.createElement(DropdownChevronIcon, null)
|
|
16245
16291
|
)),
|
|
16246
|
-
[
|
|
16292
|
+
[id, style5, className, disabled, icon, placeholder, label]
|
|
16247
16293
|
);
|
|
16248
16294
|
if (readOnly) {
|
|
16249
|
-
return label ? /* @__PURE__ */
|
|
16250
|
-
"label",
|
|
16251
|
-
{
|
|
16252
|
-
className: labelStyles,
|
|
16253
|
-
htmlFor: id
|
|
16254
|
-
},
|
|
16255
|
-
label
|
|
16256
|
-
)) : readOnlyButton;
|
|
16295
|
+
return label ? /* @__PURE__ */ React64.createElement("div", { className: "flex flex-col relative" }, readOnlyButton, /* @__PURE__ */ React64.createElement("label", { className: labelStyles, htmlFor: id }, label)) : readOnlyButton;
|
|
16257
16296
|
}
|
|
16258
|
-
return /* @__PURE__ */
|
|
16297
|
+
return /* @__PURE__ */ React64.createElement(Select.Root, { value, onValueChange: onSelect, open }, trigger, /* @__PURE__ */ React64.createElement(Select.Portal, null, /* @__PURE__ */ React64.createElement(Select.Content, { className: styles.contentStyle }, /* @__PURE__ */ React64.createElement(Select.ScrollUpButton, { className: scrollButtonStyles }, /* @__PURE__ */ React64.createElement(ChevronUpIcon, null)), /* @__PURE__ */ React64.createElement(Select.Viewport, null, menuItems.map((menuItem) => {
|
|
16259
16298
|
if (typeof menuItem === "string") {
|
|
16260
|
-
return /* @__PURE__ */
|
|
16299
|
+
return /* @__PURE__ */ React64.createElement(Select.Separator, { className: styles.separatorStyle });
|
|
16261
16300
|
}
|
|
16262
16301
|
const value2 = menuItem.value ?? "";
|
|
16263
|
-
return /* @__PURE__ */
|
|
16264
|
-
})))));
|
|
16302
|
+
return /* @__PURE__ */ React64.createElement(SelectItem, { key: value2, value: value2, icon: menuItem.icon }, menuItem.title ?? value2);
|
|
16303
|
+
})), /* @__PURE__ */ React64.createElement(Select.ScrollDownButton, { className: scrollButtonStyles }, /* @__PURE__ */ React64.createElement(ChevronDownIcon, null)))));
|
|
16265
16304
|
});
|
|
16266
|
-
var SelectItem =
|
|
16305
|
+
var SelectItem = React64.forwardRef(
|
|
16267
16306
|
({
|
|
16268
16307
|
children: children2,
|
|
16269
16308
|
icon,
|
|
16270
16309
|
disabled,
|
|
16271
16310
|
...props
|
|
16272
16311
|
}, forwardedRef) => {
|
|
16273
|
-
return /* @__PURE__ */
|
|
16312
|
+
return /* @__PURE__ */ React64.createElement(
|
|
16313
|
+
Select.Item,
|
|
16314
|
+
{
|
|
16315
|
+
className: styles.itemStyle({ disabled }),
|
|
16316
|
+
disabled,
|
|
16317
|
+
...props,
|
|
16318
|
+
ref: forwardedRef
|
|
16319
|
+
},
|
|
16320
|
+
icon && /* @__PURE__ */ React64.createElement(React64.Fragment, null, renderIcon(icon), /* @__PURE__ */ React64.createElement(Spacer.Horizontal, { size: 8 })),
|
|
16321
|
+
/* @__PURE__ */ React64.createElement(Select.ItemText, null, children2)
|
|
16322
|
+
);
|
|
16274
16323
|
}
|
|
16275
16324
|
);
|
|
16276
16325
|
|
|
16277
16326
|
// src/components/Slider.tsx
|
|
16278
16327
|
import * as RadixSlider from "@radix-ui/react-slider";
|
|
16279
|
-
import
|
|
16328
|
+
import React65, { useCallback as useCallback23, useMemo as useMemo24 } from "react";
|
|
16280
16329
|
var Slider = function Slider2({
|
|
16281
16330
|
id,
|
|
16282
16331
|
value,
|
|
@@ -16294,7 +16343,7 @@ var Slider = function Slider2({
|
|
|
16294
16343
|
},
|
|
16295
16344
|
[onValueChange]
|
|
16296
16345
|
);
|
|
16297
|
-
return /* @__PURE__ */
|
|
16346
|
+
return /* @__PURE__ */ React65.createElement(
|
|
16298
16347
|
RadixSlider.Root,
|
|
16299
16348
|
{
|
|
16300
16349
|
min,
|
|
@@ -16304,48 +16353,49 @@ var Slider = function Slider2({
|
|
|
16304
16353
|
onValueChange: handleValueChange,
|
|
16305
16354
|
className: "flex-1 flex relative items-center select-none touch-none h-4"
|
|
16306
16355
|
},
|
|
16307
|
-
/* @__PURE__ */
|
|
16308
|
-
/* @__PURE__ */
|
|
16356
|
+
/* @__PURE__ */ React65.createElement(RadixSlider.Track, { className: "bg-divider relative flex-grow h-[2px]" }, /* @__PURE__ */ React65.createElement(RadixSlider.Range, { className: "absolute bg-primary rounded-full h-full" })),
|
|
16357
|
+
/* @__PURE__ */ React65.createElement(RadixSlider.Thumb, { className: "block w-3 h-3 bg-slider-background border border-solid border-slider-border rounded-[20px] focus:outline-none" })
|
|
16309
16358
|
);
|
|
16310
16359
|
};
|
|
16311
16360
|
|
|
16312
16361
|
// src/components/Switch.tsx
|
|
16313
16362
|
import * as SwitchPrimitive from "@radix-ui/react-switch";
|
|
16314
|
-
import
|
|
16363
|
+
import React66 from "react";
|
|
16315
16364
|
var Switch = function Switch2({
|
|
16365
|
+
id,
|
|
16316
16366
|
value,
|
|
16317
16367
|
onChange,
|
|
16318
16368
|
colorScheme = "normal",
|
|
16319
16369
|
disabled
|
|
16320
16370
|
}) {
|
|
16321
|
-
return /* @__PURE__ */
|
|
16371
|
+
return /* @__PURE__ */ React66.createElement(
|
|
16322
16372
|
SwitchPrimitive.Root,
|
|
16323
16373
|
{
|
|
16374
|
+
id,
|
|
16324
16375
|
checked: value,
|
|
16325
16376
|
disabled,
|
|
16326
16377
|
onCheckedChange: (newValue) => {
|
|
16327
16378
|
onChange(newValue);
|
|
16328
16379
|
},
|
|
16329
|
-
className: `all-unset w-8 h-[19px] bg-active-background rounded-full relative cursor-pointer [webkit-tap-highlight-color:rgba(0,0,0,0)] focus:ring-2 focus:
|
|
16380
|
+
className: `all-unset w-8 h-[19px] bg-active-background rounded-full relative cursor-pointer [webkit-tap-highlight-color:rgba(0,0,0,0)] focus:ring-2 focus:ring-primary focus:ring-offset-[1px] outline-none data-[state=checked]:bg-primary ${colorScheme === "secondary" && "data-[state=checked]:bg-secondary"}`
|
|
16330
16381
|
},
|
|
16331
|
-
/* @__PURE__ */
|
|
16382
|
+
/* @__PURE__ */ React66.createElement(SwitchPrimitive.Thumb, { className: "block w-[15px] h-[15px] bg-white rounded-full transition-transform translate-x-[2px] data-[state=checked]:translate-x-[15px]" })
|
|
16332
16383
|
);
|
|
16333
16384
|
};
|
|
16334
16385
|
|
|
16335
16386
|
// src/components/TextArea.tsx
|
|
16336
|
-
import
|
|
16387
|
+
import React67, { forwardRef as forwardRef20, memo as memo29, useCallback as useCallback24, useEffect as useEffect15, useRef as useRef19 } from "react";
|
|
16337
16388
|
var useAutoResize = (value) => {
|
|
16338
16389
|
const textareaRef = useRef19(null);
|
|
16339
16390
|
useEffect15(() => {
|
|
16340
|
-
if (!textareaRef.current)
|
|
16341
|
-
return;
|
|
16391
|
+
if (!textareaRef.current) return;
|
|
16342
16392
|
textareaRef.current.style.height = "auto";
|
|
16343
16393
|
textareaRef.current.style.height = `${textareaRef.current.scrollHeight}px`;
|
|
16344
16394
|
}, [value]);
|
|
16345
16395
|
return textareaRef;
|
|
16346
16396
|
};
|
|
16347
|
-
var AutoResizingTextArea =
|
|
16348
|
-
|
|
16397
|
+
var AutoResizingTextArea = memo29(
|
|
16398
|
+
forwardRef20(function AutoResizingTextArea2({
|
|
16349
16399
|
value,
|
|
16350
16400
|
onChangeText,
|
|
16351
16401
|
className,
|
|
@@ -16363,7 +16413,7 @@ var AutoResizingTextArea = memo28(
|
|
|
16363
16413
|
},
|
|
16364
16414
|
[ref, forwardedRef]
|
|
16365
16415
|
);
|
|
16366
|
-
return /* @__PURE__ */
|
|
16416
|
+
return /* @__PURE__ */ React67.createElement(
|
|
16367
16417
|
"textarea",
|
|
16368
16418
|
{
|
|
16369
16419
|
className: `font-sans text-heading5 font-normal text-text bg-input-background w-0 flex-1 py-1 px-1.5 border-none outline-none h-[100px] rounded-4 resize-none placeholder:text-text-disabled focus:ring-2 focus:ring-primary focus:z-10 read-only:text-text-disabled ${className ?? ""}`,
|
|
@@ -16377,13 +16427,13 @@ var AutoResizingTextArea = memo28(
|
|
|
16377
16427
|
);
|
|
16378
16428
|
|
|
16379
16429
|
// src/components/TreeView.tsx
|
|
16380
|
-
import
|
|
16381
|
-
forwardRef as
|
|
16382
|
-
memo as
|
|
16430
|
+
import React68, {
|
|
16431
|
+
forwardRef as forwardRef21,
|
|
16432
|
+
memo as memo30,
|
|
16383
16433
|
useCallback as useCallback25,
|
|
16384
16434
|
useContext as useContext11
|
|
16385
16435
|
} from "react";
|
|
16386
|
-
var TreeRow =
|
|
16436
|
+
var TreeRow = forwardRef21(function TreeRow2({
|
|
16387
16437
|
icon,
|
|
16388
16438
|
expanded,
|
|
16389
16439
|
onClickChevron,
|
|
@@ -16398,27 +16448,27 @@ var TreeRow = forwardRef19(function TreeRow2({
|
|
|
16398
16448
|
},
|
|
16399
16449
|
[onClickChevron]
|
|
16400
16450
|
);
|
|
16401
|
-
return /* @__PURE__ */
|
|
16451
|
+
return /* @__PURE__ */ React68.createElement(ListView.Row, { ref: forwardedRef, ...rest }, expandable && /* @__PURE__ */ React68.createElement(React68.Fragment, null, expanded === void 0 ? /* @__PURE__ */ React68.createElement(Spacer.Horizontal, { size: 19 }) : /* @__PURE__ */ React68.createElement(
|
|
16402
16452
|
IconButton,
|
|
16403
16453
|
{
|
|
16404
16454
|
iconName: expanded ? "ChevronDownIcon2" : "ChevronRightIcon2",
|
|
16405
16455
|
onClick: handleClickChevron,
|
|
16406
16456
|
selected: rest.selected
|
|
16407
16457
|
}
|
|
16408
|
-
), /* @__PURE__ */
|
|
16458
|
+
), /* @__PURE__ */ React68.createElement(Spacer.Horizontal, { size: 6 })), icon && /* @__PURE__ */ React68.createElement(React68.Fragment, null, renderIcon(icon), /* @__PURE__ */ React68.createElement(Spacer.Horizontal, { size: 10 })), children2);
|
|
16409
16459
|
});
|
|
16410
16460
|
var TreeView;
|
|
16411
16461
|
((TreeView2) => {
|
|
16412
16462
|
TreeView2.Root = ListView.Root;
|
|
16413
16463
|
TreeView2.RowTitle = ListView.RowTitle;
|
|
16414
16464
|
TreeView2.EditableRowTitle = ListView.EditableRowTitle;
|
|
16415
|
-
TreeView2.Row =
|
|
16465
|
+
TreeView2.Row = memo30(TreeRow);
|
|
16416
16466
|
})(TreeView || (TreeView = {}));
|
|
16417
16467
|
|
|
16418
16468
|
// src/components/WorkspaceLayout.tsx
|
|
16419
16469
|
import { useKeyboardShortcuts as useKeyboardShortcuts3 } from "@noya-app/noya-keymap";
|
|
16420
|
-
import
|
|
16421
|
-
forwardRef as
|
|
16470
|
+
import React70, {
|
|
16471
|
+
forwardRef as forwardRef22,
|
|
16422
16472
|
useCallback as useCallback26,
|
|
16423
16473
|
useImperativeHandle as useImperativeHandle4,
|
|
16424
16474
|
useRef as useRef21,
|
|
@@ -16505,8 +16555,7 @@ function usePreservePanelSize(panelGroupRef, setPanelLayoutState) {
|
|
|
16505
16555
|
};
|
|
16506
16556
|
}, [panelGroupRef, setPanelLayoutState]);
|
|
16507
16557
|
useLayoutEffect9(() => {
|
|
16508
|
-
if (!layoutRef.current)
|
|
16509
|
-
return;
|
|
16558
|
+
if (!layoutRef.current) return;
|
|
16510
16559
|
const {
|
|
16511
16560
|
windowWidth: oldWindowWidth,
|
|
16512
16561
|
panelPercentages: oldPanelPercentages
|
|
@@ -16564,7 +16613,7 @@ function usePreservePanelSize(panelGroupRef, setPanelLayoutState) {
|
|
|
16564
16613
|
}
|
|
16565
16614
|
|
|
16566
16615
|
// src/components/WorkspaceLayout.tsx
|
|
16567
|
-
var WorkspaceLayoutWithTheme =
|
|
16616
|
+
var WorkspaceLayoutWithTheme = forwardRef22(function WorkspaceLayoutWithTheme2({
|
|
16568
16617
|
autoSavePrefix,
|
|
16569
16618
|
leftSidebarContent: leftPanelContent,
|
|
16570
16619
|
children: centerPanelContent,
|
|
@@ -16658,7 +16707,7 @@ var WorkspaceLayoutWithTheme = forwardRef20(function WorkspaceLayoutWithTheme2({
|
|
|
16658
16707
|
}
|
|
16659
16708
|
});
|
|
16660
16709
|
const centerPanelPercentage = 100 - (leftPanelContent ? leftSidebarPercentage : 0) - (rightPanelContent ? rightSidebarPercentage : 0);
|
|
16661
|
-
return /* @__PURE__ */
|
|
16710
|
+
return /* @__PURE__ */ React70.createElement(
|
|
16662
16711
|
"div",
|
|
16663
16712
|
{
|
|
16664
16713
|
id,
|
|
@@ -16670,7 +16719,7 @@ var WorkspaceLayoutWithTheme = forwardRef20(function WorkspaceLayoutWithTheme2({
|
|
|
16670
16719
|
...style5
|
|
16671
16720
|
}
|
|
16672
16721
|
},
|
|
16673
|
-
/* @__PURE__ */
|
|
16722
|
+
/* @__PURE__ */ React70.createElement(
|
|
16674
16723
|
PanelGroup,
|
|
16675
16724
|
{
|
|
16676
16725
|
ref: panelGroupRef,
|
|
@@ -16679,7 +16728,7 @@ var WorkspaceLayoutWithTheme = forwardRef20(function WorkspaceLayoutWithTheme2({
|
|
|
16679
16728
|
autoSaveId: autoSavePrefix ? `${autoSavePrefix}--${EDITOR_PANEL_GROUP_ID}` : void 0,
|
|
16680
16729
|
style: { flex: "1" }
|
|
16681
16730
|
},
|
|
16682
|
-
hasLeftSidebar && /* @__PURE__ */
|
|
16731
|
+
hasLeftSidebar && /* @__PURE__ */ React70.createElement(React70.Fragment, null, /* @__PURE__ */ React70.createElement(
|
|
16683
16732
|
Panel,
|
|
16684
16733
|
{
|
|
16685
16734
|
id: LEFT_SIDEBAR_ID,
|
|
@@ -16696,7 +16745,7 @@ var WorkspaceLayoutWithTheme = forwardRef20(function WorkspaceLayoutWithTheme2({
|
|
|
16696
16745
|
}
|
|
16697
16746
|
},
|
|
16698
16747
|
internalLayoutState?.leftSidebarCollapsed ? null : leftPanelContent
|
|
16699
|
-
), /* @__PURE__ */
|
|
16748
|
+
), /* @__PURE__ */ React70.createElement(
|
|
16700
16749
|
PanelResizeHandle,
|
|
16701
16750
|
{
|
|
16702
16751
|
style: {
|
|
@@ -16707,7 +16756,7 @@ var WorkspaceLayoutWithTheme = forwardRef20(function WorkspaceLayoutWithTheme2({
|
|
|
16707
16756
|
}
|
|
16708
16757
|
}
|
|
16709
16758
|
)),
|
|
16710
|
-
/* @__PURE__ */
|
|
16759
|
+
/* @__PURE__ */ React70.createElement(
|
|
16711
16760
|
Panel,
|
|
16712
16761
|
{
|
|
16713
16762
|
id: CONTENT_AREA_ID,
|
|
@@ -16722,7 +16771,7 @@ var WorkspaceLayoutWithTheme = forwardRef20(function WorkspaceLayoutWithTheme2({
|
|
|
16722
16771
|
},
|
|
16723
16772
|
centerPanelContent
|
|
16724
16773
|
),
|
|
16725
|
-
hasRightSidebar && /* @__PURE__ */
|
|
16774
|
+
hasRightSidebar && /* @__PURE__ */ React70.createElement(React70.Fragment, null, /* @__PURE__ */ React70.createElement(
|
|
16726
16775
|
PanelResizeHandle,
|
|
16727
16776
|
{
|
|
16728
16777
|
style: {
|
|
@@ -16732,7 +16781,7 @@ var WorkspaceLayoutWithTheme = forwardRef20(function WorkspaceLayoutWithTheme2({
|
|
|
16732
16781
|
backgroundColor: "var(--divider)"
|
|
16733
16782
|
}
|
|
16734
16783
|
}
|
|
16735
|
-
), /* @__PURE__ */
|
|
16784
|
+
), /* @__PURE__ */ React70.createElement(
|
|
16736
16785
|
Panel,
|
|
16737
16786
|
{
|
|
16738
16787
|
id: RIGHT_SIDEBAR_ID,
|
|
@@ -16752,8 +16801,8 @@ var WorkspaceLayoutWithTheme = forwardRef20(function WorkspaceLayoutWithTheme2({
|
|
|
16752
16801
|
)
|
|
16753
16802
|
);
|
|
16754
16803
|
});
|
|
16755
|
-
var WorkspaceLayout =
|
|
16756
|
-
return /* @__PURE__ */
|
|
16804
|
+
var WorkspaceLayout = forwardRef22(function WorkspaceLayout2(props, forwardedRef) {
|
|
16805
|
+
return /* @__PURE__ */ React70.createElement(WorkspaceLayoutWithTheme, { ...props, ref: forwardedRef });
|
|
16757
16806
|
});
|
|
16758
16807
|
|
|
16759
16808
|
// src/hooks/usePlatform.ts
|
|
@@ -16802,8 +16851,7 @@ import { useState as useState23, useEffect as useEffect17 } from "react";
|
|
|
16802
16851
|
function useDarkMode(elementRef) {
|
|
16803
16852
|
const [isDark, setIsDark] = useState23(false);
|
|
16804
16853
|
useEffect17(() => {
|
|
16805
|
-
if (!elementRef.current)
|
|
16806
|
-
return;
|
|
16854
|
+
if (!elementRef.current) return;
|
|
16807
16855
|
const hasDarkTheme = elementRef.current.closest('[data-theme="dark"]') !== null;
|
|
16808
16856
|
setIsDark(hasDarkTheme);
|
|
16809
16857
|
}, [elementRef]);
|
|
@@ -16825,11 +16873,11 @@ var SUPPORTED_CANVAS_UPLOAD_TYPES = [
|
|
|
16825
16873
|
|
|
16826
16874
|
// src/components/DimensionInput.tsx
|
|
16827
16875
|
import { round } from "@noya-app/noya-utils";
|
|
16828
|
-
import
|
|
16876
|
+
import React71, { memo as memo31, useCallback as useCallback27 } from "react";
|
|
16829
16877
|
function getNewValue(value, mode, delta) {
|
|
16830
16878
|
return delta === void 0 ? value : mode === "replace" ? delta : value + delta;
|
|
16831
16879
|
}
|
|
16832
|
-
var DimensionInput =
|
|
16880
|
+
var DimensionInput = memo31(function DimensionInput2({
|
|
16833
16881
|
id,
|
|
16834
16882
|
value,
|
|
16835
16883
|
onSetValue,
|
|
@@ -16847,7 +16895,7 @@ var DimensionInput = memo30(function DimensionInput2({
|
|
|
16847
16895
|
(value2) => onSetValue(value2, "replace"),
|
|
16848
16896
|
[onSetValue]
|
|
16849
16897
|
);
|
|
16850
|
-
return /* @__PURE__ */
|
|
16898
|
+
return /* @__PURE__ */ React71.createElement(InputField.Root, { id, width: size3 }, /* @__PURE__ */ React71.createElement(
|
|
16851
16899
|
InputField.NumberInput,
|
|
16852
16900
|
{
|
|
16853
16901
|
value: value === void 0 ? value : round(value, 2),
|
|
@@ -16856,13 +16904,13 @@ var DimensionInput = memo30(function DimensionInput2({
|
|
|
16856
16904
|
disabled,
|
|
16857
16905
|
...trigger === "change" ? { onChange: handleSetValue } : { onSubmit: handleSetValue }
|
|
16858
16906
|
}
|
|
16859
|
-
), label && /* @__PURE__ */
|
|
16907
|
+
), label && /* @__PURE__ */ React71.createElement(InputField.Label, null, label));
|
|
16860
16908
|
});
|
|
16861
16909
|
|
|
16862
16910
|
// src/components/InspectorPrimitives.tsx
|
|
16863
16911
|
var InspectorPrimitives_exports = {};
|
|
16864
16912
|
__export(InspectorPrimitives_exports, {
|
|
16865
|
-
Checkbox: () =>
|
|
16913
|
+
Checkbox: () => Checkbox3,
|
|
16866
16914
|
Column: () => Column2,
|
|
16867
16915
|
HorizontalSeparator: () => HorizontalSeparator,
|
|
16868
16916
|
LabeledRow: () => LabeledRow,
|
|
@@ -16874,8 +16922,8 @@ __export(InspectorPrimitives_exports, {
|
|
|
16874
16922
|
Title: () => Title3,
|
|
16875
16923
|
VerticalSeparator: () => VerticalSeparator
|
|
16876
16924
|
});
|
|
16877
|
-
import
|
|
16878
|
-
var Section2 =
|
|
16925
|
+
import React72, { memo as memo32, forwardRef as forwardRef23 } from "react";
|
|
16926
|
+
var Section2 = forwardRef23(({ className, ...props }, ref) => /* @__PURE__ */ React72.createElement(
|
|
16879
16927
|
"div",
|
|
16880
16928
|
{
|
|
16881
16929
|
ref,
|
|
@@ -16883,8 +16931,8 @@ var Section2 = forwardRef21(({ className, ...props }, ref) => /* @__PURE__ */ Re
|
|
|
16883
16931
|
...props
|
|
16884
16932
|
}
|
|
16885
16933
|
));
|
|
16886
|
-
var SectionHeader =
|
|
16887
|
-
var Title3 =
|
|
16934
|
+
var SectionHeader = forwardRef23(({ className, ...props }, ref) => /* @__PURE__ */ React72.createElement("div", { ref, className: cn("flex items-center", className), ...props }));
|
|
16935
|
+
var Title3 = forwardRef23(({ className, $textStyle, ...props }, ref) => /* @__PURE__ */ React72.createElement(
|
|
16888
16936
|
"div",
|
|
16889
16937
|
{
|
|
16890
16938
|
ref,
|
|
@@ -16892,7 +16940,7 @@ var Title3 = forwardRef21(({ className, $textStyle, ...props }, ref) => /* @__PU
|
|
|
16892
16940
|
...props
|
|
16893
16941
|
}
|
|
16894
16942
|
));
|
|
16895
|
-
var Row =
|
|
16943
|
+
var Row = forwardRef23(({ className, ...props }, ref) => /* @__PURE__ */ React72.createElement(
|
|
16896
16944
|
"div",
|
|
16897
16945
|
{
|
|
16898
16946
|
ref,
|
|
@@ -16900,7 +16948,7 @@ var Row = forwardRef21(({ className, ...props }, ref) => /* @__PURE__ */ React71
|
|
|
16900
16948
|
...props
|
|
16901
16949
|
}
|
|
16902
16950
|
));
|
|
16903
|
-
var Column2 =
|
|
16951
|
+
var Column2 = forwardRef23(({ className, ...props }, ref) => /* @__PURE__ */ React72.createElement(
|
|
16904
16952
|
"div",
|
|
16905
16953
|
{
|
|
16906
16954
|
ref,
|
|
@@ -16908,7 +16956,7 @@ var Column2 = forwardRef21(({ className, ...props }, ref) => /* @__PURE__ */ Rea
|
|
|
16908
16956
|
...props
|
|
16909
16957
|
}
|
|
16910
16958
|
));
|
|
16911
|
-
var
|
|
16959
|
+
var Checkbox3 = forwardRef23(({ className, ...props }, ref) => /* @__PURE__ */ React72.createElement(
|
|
16912
16960
|
"input",
|
|
16913
16961
|
{
|
|
16914
16962
|
ref,
|
|
@@ -16917,7 +16965,7 @@ var Checkbox = forwardRef21(({ className, ...props }, ref) => /* @__PURE__ */ Re
|
|
|
16917
16965
|
...props
|
|
16918
16966
|
}
|
|
16919
16967
|
));
|
|
16920
|
-
var Text3 =
|
|
16968
|
+
var Text3 = forwardRef23(({ className, ...props }, ref) => /* @__PURE__ */ React72.createElement(
|
|
16921
16969
|
"span",
|
|
16922
16970
|
{
|
|
16923
16971
|
ref,
|
|
@@ -16925,10 +16973,10 @@ var Text3 = forwardRef21(({ className, ...props }, ref) => /* @__PURE__ */ React
|
|
|
16925
16973
|
...props
|
|
16926
16974
|
}
|
|
16927
16975
|
));
|
|
16928
|
-
var VerticalSeparator = () => /* @__PURE__ */
|
|
16929
|
-
var HorizontalSeparator = () => /* @__PURE__ */
|
|
16930
|
-
var RowLabel =
|
|
16931
|
-
return /* @__PURE__ */
|
|
16976
|
+
var VerticalSeparator = () => /* @__PURE__ */ React72.createElement(Spacer.Vertical, { size: "inspector-v-separator" });
|
|
16977
|
+
var HorizontalSeparator = () => /* @__PURE__ */ React72.createElement(Spacer.Horizontal, { size: "inspector-h-separator" });
|
|
16978
|
+
var RowLabel = forwardRef23(function RowLabel2({ className, $textStyle, ...props }, ref) {
|
|
16979
|
+
return /* @__PURE__ */ React72.createElement(
|
|
16932
16980
|
"span",
|
|
16933
16981
|
{
|
|
16934
16982
|
ref,
|
|
@@ -16937,7 +16985,7 @@ var RowLabel = forwardRef21(function RowLabel2({ className, $textStyle, ...props
|
|
|
16937
16985
|
}
|
|
16938
16986
|
);
|
|
16939
16987
|
});
|
|
16940
|
-
var LabeledRow =
|
|
16988
|
+
var LabeledRow = memo32(function LabeledRow2({
|
|
16941
16989
|
id,
|
|
16942
16990
|
children: children2,
|
|
16943
16991
|
label,
|
|
@@ -16945,7 +16993,7 @@ var LabeledRow = memo31(function LabeledRow2({
|
|
|
16945
16993
|
right,
|
|
16946
16994
|
className
|
|
16947
16995
|
}) {
|
|
16948
|
-
return /* @__PURE__ */
|
|
16996
|
+
return /* @__PURE__ */ React72.createElement(Row, { id, className: className ?? "" }, /* @__PURE__ */ React72.createElement(Column2, null, /* @__PURE__ */ React72.createElement(RowLabel, { $textStyle: labelTextStyle }, label, right && /* @__PURE__ */ React72.createElement(Spacer.Horizontal, null), right), /* @__PURE__ */ React72.createElement(Row, null, children2)));
|
|
16949
16997
|
});
|
|
16950
16998
|
export {
|
|
16951
16999
|
ActivityIndicator,
|
|
@@ -16955,6 +17003,7 @@ export {
|
|
|
16955
17003
|
Body,
|
|
16956
17004
|
Button,
|
|
16957
17005
|
CONTENT_AREA_ID,
|
|
17006
|
+
Checkbox,
|
|
16958
17007
|
Chip,
|
|
16959
17008
|
CompletionMenu,
|
|
16960
17009
|
ContextMenu,
|