@noya-app/noya-designsystem 0.1.36 → 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 +8 -8
- package/CHANGELOG.md +6 -0
- package/dist/index.css +1 -1
- package/dist/index.d.mts +15 -10
- package/dist/index.d.ts +15 -10
- package/dist/index.js +843 -738
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +620 -507
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- 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 +1 -1
package/dist/index.mjs
CHANGED
|
@@ -473,7 +473,7 @@ var require_react_is_development = __commonJS({
|
|
|
473
473
|
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
474
474
|
var Element2 = REACT_ELEMENT_TYPE;
|
|
475
475
|
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
476
|
-
var
|
|
476
|
+
var Fragment3 = REACT_FRAGMENT_TYPE;
|
|
477
477
|
var Lazy = REACT_LAZY_TYPE;
|
|
478
478
|
var Memo = REACT_MEMO_TYPE;
|
|
479
479
|
var Portal6 = REACT_PORTAL_TYPE;
|
|
@@ -532,7 +532,7 @@ var require_react_is_development = __commonJS({
|
|
|
532
532
|
exports.ContextProvider = ContextProvider;
|
|
533
533
|
exports.Element = Element2;
|
|
534
534
|
exports.ForwardRef = ForwardRef;
|
|
535
|
-
exports.Fragment =
|
|
535
|
+
exports.Fragment = Fragment3;
|
|
536
536
|
exports.Lazy = Lazy;
|
|
537
537
|
exports.Memo = Memo;
|
|
538
538
|
exports.Portal = Portal6;
|
|
@@ -4116,12 +4116,88 @@ var Button = forwardRef3(function Button2({
|
|
|
4116
4116
|
return tooltip ? /* @__PURE__ */ React5.createElement(Tooltip, { content: tooltip }, buttonElement) : buttonElement;
|
|
4117
4117
|
});
|
|
4118
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
|
+
|
|
4119
4195
|
// src/components/Chip.tsx
|
|
4120
4196
|
import { Cross1Icon, PlusIcon } from "@noya-app/noya-icons";
|
|
4121
|
-
import
|
|
4197
|
+
import React8, { forwardRef as forwardRef5, memo as memo4 } from "react";
|
|
4122
4198
|
|
|
4123
4199
|
// src/hooks/useHover.ts
|
|
4124
|
-
import * as
|
|
4200
|
+
import * as React7 from "react";
|
|
4125
4201
|
var globalIgnoreEmulatedMouseEvents = false;
|
|
4126
4202
|
var hoverCount = 0;
|
|
4127
4203
|
function setGlobalIgnoreEmulatedMouseEvents() {
|
|
@@ -4151,13 +4227,13 @@ function setupGlobalTouchEvents() {
|
|
|
4151
4227
|
}
|
|
4152
4228
|
function useHover(props = {}) {
|
|
4153
4229
|
const { onHoverStart, onHoverChange, onHoverEnd, isDisabled } = props;
|
|
4154
|
-
const [isHovered, setHovered] =
|
|
4155
|
-
const state =
|
|
4230
|
+
const [isHovered, setHovered] = React7.useState(false);
|
|
4231
|
+
const state = React7.useRef({
|
|
4156
4232
|
isHovered: false,
|
|
4157
4233
|
ignoreEmulatedMouseEvents: false
|
|
4158
4234
|
}).current;
|
|
4159
|
-
|
|
4160
|
-
const hoverProps =
|
|
4235
|
+
React7.useEffect(setupGlobalTouchEvents, []);
|
|
4236
|
+
const hoverProps = React7.useMemo(
|
|
4161
4237
|
function getHoverProps() {
|
|
4162
4238
|
function triggerHoverStart(event, pointerType) {
|
|
4163
4239
|
if (isDisabled || pointerType === "touch" || state.isHovered) {
|
|
@@ -4295,8 +4371,8 @@ function getIconStyles(size3, isAdd) {
|
|
|
4295
4371
|
scale-60
|
|
4296
4372
|
`;
|
|
4297
4373
|
}
|
|
4298
|
-
var Chip =
|
|
4299
|
-
|
|
4374
|
+
var Chip = memo4(
|
|
4375
|
+
forwardRef5(function Chip2({
|
|
4300
4376
|
colorScheme,
|
|
4301
4377
|
children: children2,
|
|
4302
4378
|
deletable,
|
|
@@ -4319,7 +4395,7 @@ var Chip = memo3(
|
|
|
4319
4395
|
});
|
|
4320
4396
|
const handleClick = !children2 && !deletable && addable ? onAdd : onClick;
|
|
4321
4397
|
const color = colorScheme === "primary" ? "var(--primary)" : colorScheme === "secondary" ? "var(--secondary)" : "var(--text)";
|
|
4322
|
-
return /* @__PURE__ */
|
|
4398
|
+
return /* @__PURE__ */ React8.createElement(
|
|
4323
4399
|
"span",
|
|
4324
4400
|
{
|
|
4325
4401
|
ref: forwardedRef,
|
|
@@ -4338,7 +4414,7 @@ var Chip = memo3(
|
|
|
4338
4414
|
tabIndex,
|
|
4339
4415
|
...rest
|
|
4340
4416
|
},
|
|
4341
|
-
addable && /* @__PURE__ */
|
|
4417
|
+
addable && /* @__PURE__ */ React8.createElement(
|
|
4342
4418
|
PlusIcon,
|
|
4343
4419
|
{
|
|
4344
4420
|
className: getIconStyles(size3, true),
|
|
@@ -4350,7 +4426,7 @@ var Chip = memo3(
|
|
|
4350
4426
|
}
|
|
4351
4427
|
),
|
|
4352
4428
|
children2,
|
|
4353
|
-
deletable && /* @__PURE__ */
|
|
4429
|
+
deletable && /* @__PURE__ */ React8.createElement(
|
|
4354
4430
|
Cross1Icon,
|
|
4355
4431
|
{
|
|
4356
4432
|
className: getIconStyles(size3, false),
|
|
@@ -4370,31 +4446,31 @@ var Chip = memo3(
|
|
|
4370
4446
|
import { CheckIcon as CheckIcon2, ChevronRightIcon as ChevronRightIcon2 } from "@noya-app/noya-icons";
|
|
4371
4447
|
import { useKeyboardShortcuts as useKeyboardShortcuts2 } from "@noya-app/noya-keymap";
|
|
4372
4448
|
import * as RadixContextMenu from "@radix-ui/react-context-menu";
|
|
4373
|
-
import
|
|
4449
|
+
import React25, { memo as memo12, useCallback as useCallback13, useMemo as useMemo11 } from "react";
|
|
4374
4450
|
|
|
4375
4451
|
// src/components/Icons.tsx
|
|
4376
4452
|
import * as Icons from "@noya-app/noya-icons";
|
|
4377
|
-
import
|
|
4453
|
+
import React9 from "react";
|
|
4378
4454
|
function renderIcon(iconName) {
|
|
4379
4455
|
if (typeof iconName === "string") {
|
|
4380
4456
|
const Icon = Icons[iconName];
|
|
4381
|
-
return /* @__PURE__ */
|
|
4457
|
+
return /* @__PURE__ */ React9.createElement(Icon, null);
|
|
4382
4458
|
}
|
|
4383
4459
|
return iconName;
|
|
4384
4460
|
}
|
|
4385
4461
|
|
|
4386
4462
|
// src/components/Spacer.tsx
|
|
4387
|
-
import
|
|
4388
|
-
var SpacerVertical =
|
|
4463
|
+
import React10, { forwardRef as forwardRef6 } from "react";
|
|
4464
|
+
var SpacerVertical = forwardRef6(
|
|
4389
4465
|
({ size: size3, inline, ...props }, ref) => {
|
|
4390
|
-
return /* @__PURE__ */
|
|
4466
|
+
return /* @__PURE__ */ React10.createElement("span", { className: `${inline ? "inline-block" : "block"} ${size3 === void 0 ? "flex flex-1" : ""}`, style: size3 ? {
|
|
4391
4467
|
minHeight: `${size3}px`
|
|
4392
4468
|
} : void 0, ...props, ref });
|
|
4393
4469
|
}
|
|
4394
4470
|
);
|
|
4395
|
-
var SpacerHorizontal =
|
|
4471
|
+
var SpacerHorizontal = forwardRef6(
|
|
4396
4472
|
({ size: size3, inline, ...props }, ref) => {
|
|
4397
|
-
return /* @__PURE__ */
|
|
4473
|
+
return /* @__PURE__ */ React10.createElement("span", { className: `${inline ? "inline-block" : "block"} ${size3 === void 0 ? "flex flex-1" : ""}`, style: size3 ? {
|
|
4398
4474
|
minWidth: `${size3}px`
|
|
4399
4475
|
} : void 0, ...props, ref });
|
|
4400
4476
|
}
|
|
@@ -4407,13 +4483,13 @@ var Spacer;
|
|
|
4407
4483
|
|
|
4408
4484
|
// src/components/internal/Menu.tsx
|
|
4409
4485
|
import { getShortcutDisplayParts } from "@noya-app/noya-keymap";
|
|
4410
|
-
import
|
|
4486
|
+
import React24, { memo as memo11 } from "react";
|
|
4411
4487
|
|
|
4412
4488
|
// src/contexts/DesignSystemConfiguration.tsx
|
|
4413
4489
|
import { getCurrentPlatform } from "@noya-app/noya-keymap";
|
|
4414
|
-
import
|
|
4490
|
+
import React23, {
|
|
4415
4491
|
createContext as createContext5,
|
|
4416
|
-
memo as
|
|
4492
|
+
memo as memo10,
|
|
4417
4493
|
useContext as useContext5,
|
|
4418
4494
|
useEffect as useEffect12,
|
|
4419
4495
|
useMemo as useMemo10,
|
|
@@ -4422,16 +4498,16 @@ import React22, {
|
|
|
4422
4498
|
|
|
4423
4499
|
// src/components/Toast.tsx
|
|
4424
4500
|
import * as ToastPrimitive from "@radix-ui/react-toast";
|
|
4425
|
-
import
|
|
4501
|
+
import React12 from "react";
|
|
4426
4502
|
|
|
4427
4503
|
// src/components/IconButton.tsx
|
|
4428
|
-
import
|
|
4429
|
-
forwardRef as
|
|
4430
|
-
memo as
|
|
4504
|
+
import React11, {
|
|
4505
|
+
forwardRef as forwardRef7,
|
|
4506
|
+
memo as memo5,
|
|
4431
4507
|
useMemo as useMemo2
|
|
4432
4508
|
} from "react";
|
|
4433
|
-
var IconButton =
|
|
4434
|
-
|
|
4509
|
+
var IconButton = memo5(
|
|
4510
|
+
forwardRef7(function IconButton2({ selected, iconName, color, size: size3, contentStyle, ...props }, forwardedRef) {
|
|
4435
4511
|
const Icon = Icons[iconName];
|
|
4436
4512
|
const style5 = useMemo2(() => {
|
|
4437
4513
|
return {
|
|
@@ -4440,7 +4516,7 @@ var IconButton = memo4(
|
|
|
4440
4516
|
...contentStyle
|
|
4441
4517
|
};
|
|
4442
4518
|
}, [contentStyle, size3]);
|
|
4443
|
-
return /* @__PURE__ */
|
|
4519
|
+
return /* @__PURE__ */ React11.createElement(Button, { ref: forwardedRef, ...props, variant: "none", contentStyle: style5 }, /* @__PURE__ */ React11.createElement(
|
|
4444
4520
|
Icon,
|
|
4445
4521
|
{
|
|
4446
4522
|
color: color ?? (selected ? "var(--icon-selected)" : "var(--icon)"),
|
|
@@ -4457,22 +4533,22 @@ var Toast = ({
|
|
|
4457
4533
|
children: children2,
|
|
4458
4534
|
...props
|
|
4459
4535
|
}) => {
|
|
4460
|
-
return /* @__PURE__ */
|
|
4536
|
+
return /* @__PURE__ */ React12.createElement(
|
|
4461
4537
|
ToastPrimitive.Root,
|
|
4462
4538
|
{
|
|
4463
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",
|
|
4464
4540
|
...props
|
|
4465
4541
|
},
|
|
4466
|
-
title && /* @__PURE__ */
|
|
4467
|
-
/* @__PURE__ */
|
|
4468
|
-
children2 && /* @__PURE__ */
|
|
4469
|
-
/* @__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" }))
|
|
4470
4546
|
);
|
|
4471
4547
|
};
|
|
4472
|
-
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" }));
|
|
4473
4549
|
|
|
4474
4550
|
// src/contexts/DialogContext.tsx
|
|
4475
|
-
import
|
|
4551
|
+
import React21, {
|
|
4476
4552
|
createContext as createContext3,
|
|
4477
4553
|
useCallback as useCallback12,
|
|
4478
4554
|
useContext as useContext3,
|
|
@@ -4483,12 +4559,12 @@ import React20, {
|
|
|
4483
4559
|
|
|
4484
4560
|
// src/components/Dialog.tsx
|
|
4485
4561
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
4486
|
-
import
|
|
4487
|
-
forwardRef as
|
|
4562
|
+
import React13, {
|
|
4563
|
+
forwardRef as forwardRef8,
|
|
4488
4564
|
useImperativeHandle,
|
|
4489
4565
|
useRef as useRef2
|
|
4490
4566
|
} from "react";
|
|
4491
|
-
var StyledOverlay =
|
|
4567
|
+
var StyledOverlay = forwardRef8(({ className, ...props }, ref) => /* @__PURE__ */ React13.createElement(
|
|
4492
4568
|
DialogPrimitive.Overlay,
|
|
4493
4569
|
{
|
|
4494
4570
|
ref,
|
|
@@ -4496,7 +4572,7 @@ var StyledOverlay = forwardRef7(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
4496
4572
|
...props
|
|
4497
4573
|
}
|
|
4498
4574
|
));
|
|
4499
|
-
var StyledContent =
|
|
4575
|
+
var StyledContent = forwardRef8(({ className, ...props }, ref) => /* @__PURE__ */ React13.createElement(
|
|
4500
4576
|
DialogPrimitive.Content,
|
|
4501
4577
|
{
|
|
4502
4578
|
ref,
|
|
@@ -4511,7 +4587,7 @@ var StyledContent = forwardRef7(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
4511
4587
|
...props
|
|
4512
4588
|
}
|
|
4513
4589
|
));
|
|
4514
|
-
var StyledTitle =
|
|
4590
|
+
var StyledTitle = forwardRef8(({ className, ...props }, ref) => /* @__PURE__ */ React13.createElement(
|
|
4515
4591
|
DialogPrimitive.Title,
|
|
4516
4592
|
{
|
|
4517
4593
|
ref,
|
|
@@ -4522,7 +4598,7 @@ var StyledTitle = forwardRef7(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
4522
4598
|
...props
|
|
4523
4599
|
}
|
|
4524
4600
|
));
|
|
4525
|
-
var StyledDescription =
|
|
4601
|
+
var StyledDescription = forwardRef8(({ className, ...props }, ref) => /* @__PURE__ */ React13.createElement(
|
|
4526
4602
|
DialogPrimitive.Description,
|
|
4527
4603
|
{
|
|
4528
4604
|
ref,
|
|
@@ -4533,7 +4609,7 @@ var StyledDescription = forwardRef7(({ className, ...props }, ref) => /* @__PURE
|
|
|
4533
4609
|
...props
|
|
4534
4610
|
}
|
|
4535
4611
|
));
|
|
4536
|
-
var CloseButtonContainer =
|
|
4612
|
+
var CloseButtonContainer = forwardRef8(({ className, ...props }, ref) => /* @__PURE__ */ React13.createElement(
|
|
4537
4613
|
"div",
|
|
4538
4614
|
{
|
|
4539
4615
|
ref,
|
|
@@ -4541,7 +4617,7 @@ var CloseButtonContainer = forwardRef7(({ className, ...props }, ref) => /* @__P
|
|
|
4541
4617
|
...props
|
|
4542
4618
|
}
|
|
4543
4619
|
));
|
|
4544
|
-
var Dialog =
|
|
4620
|
+
var Dialog = forwardRef8(function Dialog2({
|
|
4545
4621
|
children: children2,
|
|
4546
4622
|
title,
|
|
4547
4623
|
description,
|
|
@@ -4558,7 +4634,7 @@ var Dialog = forwardRef7(function Dialog2({
|
|
|
4558
4634
|
return contentRef.current.contains(element);
|
|
4559
4635
|
}
|
|
4560
4636
|
}));
|
|
4561
|
-
return /* @__PURE__ */
|
|
4637
|
+
return /* @__PURE__ */ React13.createElement(DialogPrimitive.Root, { open, onOpenChange }, /* @__PURE__ */ React13.createElement(StyledOverlay, null), /* @__PURE__ */ React13.createElement(
|
|
4562
4638
|
StyledContent,
|
|
4563
4639
|
{
|
|
4564
4640
|
ref: contentRef,
|
|
@@ -4569,14 +4645,14 @@ var Dialog = forwardRef7(function Dialog2({
|
|
|
4569
4645
|
onInteractOutside: (event) => event.preventDefault()
|
|
4570
4646
|
}
|
|
4571
4647
|
},
|
|
4572
|
-
/* @__PURE__ */
|
|
4573
|
-
title && /* @__PURE__ */
|
|
4574
|
-
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 })),
|
|
4575
4651
|
children2
|
|
4576
4652
|
));
|
|
4577
4653
|
});
|
|
4578
|
-
var FullscreenDialog =
|
|
4579
|
-
return /* @__PURE__ */
|
|
4654
|
+
var FullscreenDialog = forwardRef8(function FullscreenDialog2({ style: style5, ...rest }, forwardedRef) {
|
|
4655
|
+
return /* @__PURE__ */ React13.createElement(
|
|
4580
4656
|
Dialog,
|
|
4581
4657
|
{
|
|
4582
4658
|
ref: forwardedRef,
|
|
@@ -4602,13 +4678,13 @@ var FullscreenDialog = forwardRef7(function FullscreenDialog2({ style: style5, .
|
|
|
4602
4678
|
import { CaretDownIcon } from "@noya-app/noya-icons";
|
|
4603
4679
|
|
|
4604
4680
|
// ../noya-react-utils/src/components/AutoSizer.tsx
|
|
4605
|
-
import
|
|
4681
|
+
import React15, { memo as memo6, useRef as useRef3 } from "react";
|
|
4606
4682
|
|
|
4607
4683
|
// ../noya-react-utils/src/hooks/useSize.ts
|
|
4608
|
-
import * as
|
|
4684
|
+
import * as React14 from "react";
|
|
4609
4685
|
function useSize(refToObserve, dimensions = "both") {
|
|
4610
|
-
const [size3, setSize] =
|
|
4611
|
-
|
|
4686
|
+
const [size3, setSize] = React14.useState(void 0);
|
|
4687
|
+
React14.useEffect(() => {
|
|
4612
4688
|
if (refToObserve.current) {
|
|
4613
4689
|
const elementToObserve = refToObserve.current;
|
|
4614
4690
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
@@ -4655,26 +4731,26 @@ var style = {
|
|
|
4655
4731
|
flex: "1 0 0",
|
|
4656
4732
|
flexDirection: "column"
|
|
4657
4733
|
};
|
|
4658
|
-
var AutoSizer =
|
|
4734
|
+
var AutoSizer = memo6(function AutoSizer2({
|
|
4659
4735
|
children: children2,
|
|
4660
4736
|
className
|
|
4661
4737
|
}) {
|
|
4662
4738
|
const containerRef = useRef3(null);
|
|
4663
4739
|
const containerSize = useSize(containerRef);
|
|
4664
|
-
return /* @__PURE__ */
|
|
4740
|
+
return /* @__PURE__ */ React15.createElement("div", { ref: containerRef, style, className }, containerSize && containerSize.width > 0 && containerSize.height > 0 && children2(containerSize));
|
|
4665
4741
|
});
|
|
4666
|
-
var SingleDimensionAutoSizer =
|
|
4742
|
+
var SingleDimensionAutoSizer = memo6(function SingleDimensionAutoSizer2({
|
|
4667
4743
|
children: children2,
|
|
4668
4744
|
dimension,
|
|
4669
4745
|
className
|
|
4670
4746
|
}) {
|
|
4671
4747
|
const containerRef = useRef3(null);
|
|
4672
4748
|
const containerSize = useSize(containerRef, dimension);
|
|
4673
|
-
return /* @__PURE__ */
|
|
4749
|
+
return /* @__PURE__ */ React15.createElement("div", { ref: containerRef, style, className }, containerSize && containerSize[dimension] > 0 && children2(containerSize[dimension]));
|
|
4674
4750
|
});
|
|
4675
4751
|
|
|
4676
4752
|
// ../noya-react-utils/src/components/FileDropTarget.tsx
|
|
4677
|
-
import
|
|
4753
|
+
import React16, { memo as memo7, useCallback as useCallback3, useRef as useRef4 } from "react";
|
|
4678
4754
|
|
|
4679
4755
|
// ../noya-react-utils/src/hooks/useFileDropTarget.ts
|
|
4680
4756
|
import { useCallback as useCallback2, useState as useState3 } from "react";
|
|
@@ -4724,7 +4800,7 @@ function useFileDropTarget(ref, dropEvent) {
|
|
|
4724
4800
|
function isSupportedFile(file, supportedFileTypes) {
|
|
4725
4801
|
return supportedFileTypes.includes(file.type) || file.type === "" && file.name.endsWith(".sketch");
|
|
4726
4802
|
}
|
|
4727
|
-
var FileDropTarget =
|
|
4803
|
+
var FileDropTarget = memo7(function FileDropTarget2({
|
|
4728
4804
|
children: children2,
|
|
4729
4805
|
onDropFiles,
|
|
4730
4806
|
supportedFileTypes,
|
|
@@ -4767,7 +4843,7 @@ var FileDropTarget = memo6(function FileDropTarget2({
|
|
|
4767
4843
|
ref,
|
|
4768
4844
|
handleFile
|
|
4769
4845
|
);
|
|
4770
|
-
return /* @__PURE__ */
|
|
4846
|
+
return /* @__PURE__ */ React16.createElement("div", { ref, ...dropTargetProps, ...props }, typeof children2 === "function" ? children2(isDropTargetActive) : children2);
|
|
4771
4847
|
});
|
|
4772
4848
|
|
|
4773
4849
|
// ../noya-react-utils/src/hooks/useDeepArray.ts
|
|
@@ -4906,12 +4982,12 @@ function assignRef(ref, value) {
|
|
|
4906
4982
|
}
|
|
4907
4983
|
|
|
4908
4984
|
// src/components/InputField.tsx
|
|
4909
|
-
import
|
|
4985
|
+
import React20, {
|
|
4910
4986
|
Children,
|
|
4911
4987
|
createContext as createContext2,
|
|
4912
|
-
forwardRef as
|
|
4988
|
+
forwardRef as forwardRef11,
|
|
4913
4989
|
isValidElement,
|
|
4914
|
-
memo as
|
|
4990
|
+
memo as memo9,
|
|
4915
4991
|
useCallback as useCallback11,
|
|
4916
4992
|
useContext as useContext2,
|
|
4917
4993
|
useEffect as useEffect11,
|
|
@@ -4948,13 +5024,13 @@ function handleNudge(e) {
|
|
|
4948
5024
|
import { CheckIcon, ChevronRightIcon } from "@noya-app/noya-icons";
|
|
4949
5025
|
import { useKeyboardShortcuts } from "@noya-app/noya-keymap";
|
|
4950
5026
|
import * as RadixDropdownMenu from "@radix-ui/react-dropdown-menu";
|
|
4951
|
-
import
|
|
4952
|
-
forwardRef as
|
|
4953
|
-
memo as
|
|
5027
|
+
import React17, {
|
|
5028
|
+
forwardRef as forwardRef9,
|
|
5029
|
+
memo as memo8,
|
|
4954
5030
|
useCallback as useCallback9,
|
|
4955
5031
|
useMemo as useMemo6
|
|
4956
5032
|
} from "react";
|
|
4957
|
-
var DropdownMenuItem =
|
|
5033
|
+
var DropdownMenuItem = memo8(function ContextMenuItem({
|
|
4958
5034
|
value,
|
|
4959
5035
|
children: children2,
|
|
4960
5036
|
onSelect,
|
|
@@ -4970,7 +5046,7 @@ var DropdownMenuItem = memo7(function ContextMenuItem({
|
|
|
4970
5046
|
onSelect(value);
|
|
4971
5047
|
}, [onSelect, value]);
|
|
4972
5048
|
if (checked) {
|
|
4973
|
-
return /* @__PURE__ */
|
|
5049
|
+
return /* @__PURE__ */ React17.createElement(
|
|
4974
5050
|
RadixDropdownMenu.CheckboxItem,
|
|
4975
5051
|
{
|
|
4976
5052
|
checked,
|
|
@@ -4978,26 +5054,26 @@ var DropdownMenuItem = memo7(function ContextMenuItem({
|
|
|
4978
5054
|
onSelect: handleSelectItem,
|
|
4979
5055
|
className: styles.itemStyle({ disabled })
|
|
4980
5056
|
},
|
|
4981
|
-
/* @__PURE__ */
|
|
4982
|
-
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 })),
|
|
4983
5059
|
children2
|
|
4984
5060
|
);
|
|
4985
5061
|
}
|
|
4986
|
-
const element = /* @__PURE__ */
|
|
5062
|
+
const element = /* @__PURE__ */ React17.createElement(
|
|
4987
5063
|
RadixDropdownMenu.Item,
|
|
4988
5064
|
{
|
|
4989
5065
|
disabled,
|
|
4990
5066
|
onSelect: handleSelectItem,
|
|
4991
5067
|
className: styles.itemStyle({ disabled })
|
|
4992
5068
|
},
|
|
4993
|
-
indented && /* @__PURE__ */
|
|
4994
|
-
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 })),
|
|
4995
5071
|
children2,
|
|
4996
|
-
shortcut && /* @__PURE__ */
|
|
4997
|
-
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))
|
|
4998
5074
|
);
|
|
4999
5075
|
if (items && items.length > 0) {
|
|
5000
|
-
return /* @__PURE__ */
|
|
5076
|
+
return /* @__PURE__ */ React17.createElement(
|
|
5001
5077
|
DropdownMenuRoot,
|
|
5002
5078
|
{
|
|
5003
5079
|
isNested: true,
|
|
@@ -5011,7 +5087,7 @@ var DropdownMenuItem = memo7(function ContextMenuItem({
|
|
|
5011
5087
|
return element;
|
|
5012
5088
|
}
|
|
5013
5089
|
});
|
|
5014
|
-
var DropdownMenuRoot =
|
|
5090
|
+
var DropdownMenuRoot = forwardRef9(function DropdownMenuRoot2({
|
|
5015
5091
|
items,
|
|
5016
5092
|
children: children2,
|
|
5017
5093
|
onSelect,
|
|
@@ -5039,7 +5115,7 @@ var DropdownMenuRoot = forwardRef8(function DropdownMenuRoot2({
|
|
|
5039
5115
|
const TriggerComponent = isNested ? RadixDropdownMenu.SubTrigger : RadixDropdownMenu.Trigger;
|
|
5040
5116
|
const ContentComponent = isNested ? RadixDropdownMenu.SubContent : RadixDropdownMenu.Content;
|
|
5041
5117
|
const contentStyle = useMemo6(() => ({ zIndex: 1e3 }), []);
|
|
5042
|
-
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(
|
|
5043
5119
|
ContentComponent,
|
|
5044
5120
|
{
|
|
5045
5121
|
className: styles.contentStyle,
|
|
@@ -5053,13 +5129,13 @@ var DropdownMenuRoot = forwardRef8(function DropdownMenuRoot2({
|
|
|
5053
5129
|
},
|
|
5054
5130
|
items.length === 0 ? emptyState : null,
|
|
5055
5131
|
items.map(
|
|
5056
|
-
(item, index) => item === SEPARATOR_ITEM ? /* @__PURE__ */
|
|
5132
|
+
(item, index) => item === SEPARATOR_ITEM ? /* @__PURE__ */ React17.createElement(
|
|
5057
5133
|
RadixDropdownMenu.Separator,
|
|
5058
5134
|
{
|
|
5059
5135
|
key: index,
|
|
5060
5136
|
className: styles.separatorStyle
|
|
5061
5137
|
}
|
|
5062
|
-
) : /* @__PURE__ */
|
|
5138
|
+
) : /* @__PURE__ */ React17.createElement(
|
|
5063
5139
|
DropdownMenuItem,
|
|
5064
5140
|
{
|
|
5065
5141
|
key: item.value ?? index,
|
|
@@ -5077,12 +5153,12 @@ var DropdownMenuRoot = forwardRef8(function DropdownMenuRoot2({
|
|
|
5077
5153
|
)
|
|
5078
5154
|
)));
|
|
5079
5155
|
});
|
|
5080
|
-
var DropdownMenu =
|
|
5156
|
+
var DropdownMenu = memo8(DropdownMenuRoot);
|
|
5081
5157
|
|
|
5082
5158
|
// src/components/internal/TextInput.tsx
|
|
5083
5159
|
import { composeRefs } from "@radix-ui/react-compose-refs";
|
|
5084
|
-
import
|
|
5085
|
-
forwardRef as
|
|
5160
|
+
import React18, {
|
|
5161
|
+
forwardRef as forwardRef10,
|
|
5086
5162
|
useCallback as useCallback10,
|
|
5087
5163
|
useEffect as useEffect10,
|
|
5088
5164
|
useLayoutEffect as useLayoutEffect3,
|
|
@@ -5130,8 +5206,8 @@ function useGlobalInputBlurTrigger() {
|
|
|
5130
5206
|
}
|
|
5131
5207
|
|
|
5132
5208
|
// src/components/internal/TextInput.tsx
|
|
5133
|
-
var ReadOnlyTextInput =
|
|
5134
|
-
return /* @__PURE__ */
|
|
5209
|
+
var ReadOnlyTextInput = forwardRef10(function ReadOnlyTextInput2({ onKeyDown, onFocusChange, value, ...rest }, forwardedRef) {
|
|
5210
|
+
return /* @__PURE__ */ React18.createElement(
|
|
5135
5211
|
"input",
|
|
5136
5212
|
{
|
|
5137
5213
|
ref: forwardedRef,
|
|
@@ -5142,7 +5218,7 @@ var ReadOnlyTextInput = forwardRef9(function ReadOnlyTextInput2({ onKeyDown, onF
|
|
|
5142
5218
|
}
|
|
5143
5219
|
);
|
|
5144
5220
|
});
|
|
5145
|
-
var ControlledTextInput =
|
|
5221
|
+
var ControlledTextInput = forwardRef10(function ControlledTextInput2({
|
|
5146
5222
|
onKeyDown,
|
|
5147
5223
|
value,
|
|
5148
5224
|
onChange,
|
|
@@ -5165,7 +5241,7 @@ var ControlledTextInput = forwardRef9(function ControlledTextInput2({
|
|
|
5165
5241
|
},
|
|
5166
5242
|
[onFocusCapture, onFocusChange]
|
|
5167
5243
|
);
|
|
5168
|
-
return /* @__PURE__ */
|
|
5244
|
+
return /* @__PURE__ */ React18.createElement(
|
|
5169
5245
|
"input",
|
|
5170
5246
|
{
|
|
5171
5247
|
ref: forwardedRef,
|
|
@@ -5181,7 +5257,7 @@ var ControlledTextInput = forwardRef9(function ControlledTextInput2({
|
|
|
5181
5257
|
}
|
|
5182
5258
|
);
|
|
5183
5259
|
});
|
|
5184
|
-
var SubmittableTextInput =
|
|
5260
|
+
var SubmittableTextInput = forwardRef10(function SubmittableTextInput2({
|
|
5185
5261
|
onKeyDown,
|
|
5186
5262
|
value,
|
|
5187
5263
|
onSubmit,
|
|
@@ -5192,7 +5268,7 @@ var SubmittableTextInput = forwardRef9(function SubmittableTextInput2({
|
|
|
5192
5268
|
submitAutomaticallyAfterDelay,
|
|
5193
5269
|
...rest
|
|
5194
5270
|
}, forwardedRef) {
|
|
5195
|
-
const ref =
|
|
5271
|
+
const ref = React18.useRef(null);
|
|
5196
5272
|
const latestValue = useRef11(value);
|
|
5197
5273
|
latestValue.current = value;
|
|
5198
5274
|
const userDidEdit = useRef11(false);
|
|
@@ -5273,7 +5349,7 @@ var SubmittableTextInput = forwardRef9(function SubmittableTextInput2({
|
|
|
5273
5349
|
}
|
|
5274
5350
|
};
|
|
5275
5351
|
}, [internalValue, submitAutomaticallyAfterDelay]);
|
|
5276
|
-
return /* @__PURE__ */
|
|
5352
|
+
return /* @__PURE__ */ React18.createElement(
|
|
5277
5353
|
"input",
|
|
5278
5354
|
{
|
|
5279
5355
|
ref: composeRefs(ref, forwardedRef),
|
|
@@ -5286,7 +5362,7 @@ var SubmittableTextInput = forwardRef9(function SubmittableTextInput2({
|
|
|
5286
5362
|
}
|
|
5287
5363
|
);
|
|
5288
5364
|
});
|
|
5289
|
-
var TextInput_default =
|
|
5365
|
+
var TextInput_default = forwardRef10(function TextInput(props, forwardedRef) {
|
|
5290
5366
|
const commonProps = {
|
|
5291
5367
|
onPointerDown: useCallback10(
|
|
5292
5368
|
(event) => event.stopPropagation(),
|
|
@@ -5305,17 +5381,17 @@ var TextInput_default = forwardRef9(function TextInput(props, forwardedRef) {
|
|
|
5305
5381
|
...props
|
|
5306
5382
|
};
|
|
5307
5383
|
if ("readOnly" in commonProps) {
|
|
5308
|
-
return /* @__PURE__ */
|
|
5384
|
+
return /* @__PURE__ */ React18.createElement(ReadOnlyTextInput, { ref: forwardedRef, ...commonProps, readOnly: true });
|
|
5309
5385
|
} else if ("onChange" in commonProps) {
|
|
5310
|
-
return /* @__PURE__ */
|
|
5386
|
+
return /* @__PURE__ */ React18.createElement(ControlledTextInput, { ref: forwardedRef, ...commonProps });
|
|
5311
5387
|
} else {
|
|
5312
|
-
return /* @__PURE__ */
|
|
5388
|
+
return /* @__PURE__ */ React18.createElement(SubmittableTextInput, { ref: forwardedRef, ...commonProps });
|
|
5313
5389
|
}
|
|
5314
5390
|
});
|
|
5315
5391
|
|
|
5316
5392
|
// src/components/Popover.tsx
|
|
5317
5393
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
5318
|
-
import
|
|
5394
|
+
import React19 from "react";
|
|
5319
5395
|
var closeStyles = {
|
|
5320
5396
|
all: "unset",
|
|
5321
5397
|
fontFamily: "inherit"
|
|
@@ -5337,7 +5413,7 @@ function Popover({
|
|
|
5337
5413
|
onFocusOutside,
|
|
5338
5414
|
onClickClose
|
|
5339
5415
|
}) {
|
|
5340
|
-
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(
|
|
5341
5417
|
PopoverPrimitive.Content,
|
|
5342
5418
|
{
|
|
5343
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]" : ""}`,
|
|
@@ -5353,14 +5429,14 @@ function Popover({
|
|
|
5353
5429
|
arrowPadding: 2
|
|
5354
5430
|
},
|
|
5355
5431
|
children2,
|
|
5356
|
-
showArrow && /* @__PURE__ */
|
|
5357
|
-
closable && /* @__PURE__ */
|
|
5432
|
+
showArrow && /* @__PURE__ */ React19.createElement(PopoverPrimitive.Arrow, { className: "fill-popover-background" }),
|
|
5433
|
+
closable && /* @__PURE__ */ React19.createElement(
|
|
5358
5434
|
PopoverPrimitive.Close,
|
|
5359
5435
|
{
|
|
5360
5436
|
className: "rounded-full h-[25px] w-[25px] inline-flex items-center justify-center absolute top-[5px] right-[5px]",
|
|
5361
5437
|
style: closeStyles
|
|
5362
5438
|
},
|
|
5363
|
-
/* @__PURE__ */
|
|
5439
|
+
/* @__PURE__ */ React19.createElement(IconButton, { iconName: "Cross2Icon", onClick: onClickClose })
|
|
5364
5440
|
)
|
|
5365
5441
|
)));
|
|
5366
5442
|
}
|
|
@@ -5376,13 +5452,13 @@ var InputFieldContext = createContext2({
|
|
|
5376
5452
|
onFocusChange: () => {
|
|
5377
5453
|
}
|
|
5378
5454
|
});
|
|
5379
|
-
var LabelContainer =
|
|
5455
|
+
var LabelContainer = forwardRef11(
|
|
5380
5456
|
({ pointerEvents, $labelPosition, $hasDropdown, $size, className, style: style5, ...props }, ref) => {
|
|
5381
5457
|
const memoizedStyles = useMemo7(() => ({
|
|
5382
5458
|
left: $labelPosition === "start" ? $size === "large" ? "6px" : $size === "medium" ? "2px" : "0px" : "",
|
|
5383
5459
|
right: $labelPosition === "end" ? $size === "large" ? "6px" : $size === "medium" ? "2px" : "0px" : ""
|
|
5384
5460
|
}), [$labelPosition, $size]);
|
|
5385
|
-
return /* @__PURE__ */
|
|
5461
|
+
return /* @__PURE__ */ React20.createElement(
|
|
5386
5462
|
"label",
|
|
5387
5463
|
{
|
|
5388
5464
|
ref,
|
|
@@ -5393,8 +5469,8 @@ var LabelContainer = forwardRef10(
|
|
|
5393
5469
|
);
|
|
5394
5470
|
}
|
|
5395
5471
|
);
|
|
5396
|
-
var InputFieldLabel =
|
|
5397
|
-
|
|
5472
|
+
var InputFieldLabel = memo9(
|
|
5473
|
+
forwardRef11(function InputFieldLabel2({
|
|
5398
5474
|
children: children2 = false,
|
|
5399
5475
|
pointerEvents = "none",
|
|
5400
5476
|
style: style5,
|
|
@@ -5408,7 +5484,7 @@ var InputFieldLabel = memo8(
|
|
|
5408
5484
|
if (!width) return;
|
|
5409
5485
|
setLabelWidth(width);
|
|
5410
5486
|
}, [setLabelWidth]);
|
|
5411
|
-
return /* @__PURE__ */
|
|
5487
|
+
return /* @__PURE__ */ React20.createElement(
|
|
5412
5488
|
LabelContainer,
|
|
5413
5489
|
{
|
|
5414
5490
|
$size: size3,
|
|
@@ -5426,7 +5502,7 @@ var InputFieldLabel = memo8(
|
|
|
5426
5502
|
);
|
|
5427
5503
|
})
|
|
5428
5504
|
);
|
|
5429
|
-
var DropdownContainer =
|
|
5505
|
+
var DropdownContainer = forwardRef11(({ className, ...props }, ref) => /* @__PURE__ */ React20.createElement(
|
|
5430
5506
|
"span",
|
|
5431
5507
|
{
|
|
5432
5508
|
ref,
|
|
@@ -5434,7 +5510,7 @@ var DropdownContainer = forwardRef10(({ className, ...props }, ref) => /* @__PUR
|
|
|
5434
5510
|
...props
|
|
5435
5511
|
}
|
|
5436
5512
|
));
|
|
5437
|
-
var InputFieldDropdownMenu =
|
|
5513
|
+
var InputFieldDropdownMenu = memo9(function InputFieldDropdownMenu2({ id, items, onSelect, children: children2 }) {
|
|
5438
5514
|
const { size: size3 } = useContext2(InputFieldContext);
|
|
5439
5515
|
const contentStyle = useMemo7(
|
|
5440
5516
|
() => ({
|
|
@@ -5443,7 +5519,7 @@ var InputFieldDropdownMenu = memo8(function InputFieldDropdownMenu2({ id, items,
|
|
|
5443
5519
|
}),
|
|
5444
5520
|
[size3]
|
|
5445
5521
|
);
|
|
5446
|
-
return /* @__PURE__ */
|
|
5522
|
+
return /* @__PURE__ */ React20.createElement(DropdownContainer, null, /* @__PURE__ */ React20.createElement(DropdownMenu, { items, onSelect }, children2 || /* @__PURE__ */ React20.createElement(
|
|
5447
5523
|
Button,
|
|
5448
5524
|
{
|
|
5449
5525
|
id,
|
|
@@ -5451,10 +5527,10 @@ var InputFieldDropdownMenu = memo8(function InputFieldDropdownMenu2({ id, items,
|
|
|
5451
5527
|
className: "flex flex-1",
|
|
5452
5528
|
contentStyle
|
|
5453
5529
|
},
|
|
5454
|
-
/* @__PURE__ */
|
|
5530
|
+
/* @__PURE__ */ React20.createElement(CaretDownIcon, null)
|
|
5455
5531
|
)));
|
|
5456
5532
|
});
|
|
5457
|
-
var ButtonContainer =
|
|
5533
|
+
var ButtonContainer = forwardRef11(({ $size, className, ...props }, ref) => /* @__PURE__ */ React20.createElement(
|
|
5458
5534
|
"span",
|
|
5459
5535
|
{
|
|
5460
5536
|
ref,
|
|
@@ -5462,8 +5538,8 @@ var ButtonContainer = forwardRef10(({ $size, className, ...props }, ref) => /* @
|
|
|
5462
5538
|
...props
|
|
5463
5539
|
}
|
|
5464
5540
|
));
|
|
5465
|
-
var InputFieldButton =
|
|
5466
|
-
|
|
5541
|
+
var InputFieldButton = memo9(
|
|
5542
|
+
forwardRef11(function InputFieldButton2(props, forwardedRef) {
|
|
5467
5543
|
const { children: children2, onClick, ...rest } = props;
|
|
5468
5544
|
const { size: size3, inputRef, setButtonWidth } = useContext2(InputFieldContext);
|
|
5469
5545
|
const ref = useRef12(null);
|
|
@@ -5491,7 +5567,7 @@ var InputFieldButton = memo8(
|
|
|
5491
5567
|
},
|
|
5492
5568
|
[]
|
|
5493
5569
|
);
|
|
5494
|
-
return /* @__PURE__ */
|
|
5570
|
+
return /* @__PURE__ */ React20.createElement(ButtonContainer, { $size: size3 }, /* @__PURE__ */ React20.createElement(
|
|
5495
5571
|
Button,
|
|
5496
5572
|
{
|
|
5497
5573
|
ref: (element) => {
|
|
@@ -5509,7 +5585,7 @@ var InputFieldButton = memo8(
|
|
|
5509
5585
|
));
|
|
5510
5586
|
})
|
|
5511
5587
|
);
|
|
5512
|
-
var InputElement =
|
|
5588
|
+
var InputElement = forwardRef11(
|
|
5513
5589
|
({
|
|
5514
5590
|
disabled,
|
|
5515
5591
|
readOnly,
|
|
@@ -5531,7 +5607,7 @@ var InputElement = forwardRef10(
|
|
|
5531
5607
|
paddingLeft: `${paddingLeft}px`,
|
|
5532
5608
|
paddingRight: `${paddingRight}px`
|
|
5533
5609
|
}), [paddingLeft, paddingRight]);
|
|
5534
|
-
return /* @__PURE__ */
|
|
5610
|
+
return /* @__PURE__ */ React20.createElement(
|
|
5535
5611
|
TextInput_default,
|
|
5536
5612
|
{
|
|
5537
5613
|
value: value ?? "",
|
|
@@ -5545,7 +5621,7 @@ var InputElement = forwardRef10(
|
|
|
5545
5621
|
);
|
|
5546
5622
|
}
|
|
5547
5623
|
);
|
|
5548
|
-
var InputFieldInput =
|
|
5624
|
+
var InputFieldInput = forwardRef11(function InputFieldInput2({ textAlign, variant, ...rest }, forwardedRef) {
|
|
5549
5625
|
const {
|
|
5550
5626
|
labelPosition,
|
|
5551
5627
|
labelSize,
|
|
@@ -5564,7 +5640,7 @@ var InputFieldInput = forwardRef10(function InputFieldInput2({ textAlign, varian
|
|
|
5564
5640
|
useLayoutEffect4(() => {
|
|
5565
5641
|
setInputRef?.(forwardedRef);
|
|
5566
5642
|
}, [forwardedRef, setInputRef]);
|
|
5567
|
-
return /* @__PURE__ */
|
|
5643
|
+
return /* @__PURE__ */ React20.createElement(
|
|
5568
5644
|
InputElement,
|
|
5569
5645
|
{
|
|
5570
5646
|
ref: forwardedRef,
|
|
@@ -5587,7 +5663,7 @@ var InputFieldTypeahead = (props) => {
|
|
|
5587
5663
|
size: size3
|
|
5588
5664
|
// onFocusChange,
|
|
5589
5665
|
} = useContext2(InputFieldContext);
|
|
5590
|
-
return /* @__PURE__ */
|
|
5666
|
+
return /* @__PURE__ */ React20.createElement(
|
|
5591
5667
|
InputElement,
|
|
5592
5668
|
{
|
|
5593
5669
|
$labelPosition: labelPosition,
|
|
@@ -5598,8 +5674,8 @@ var InputFieldTypeahead = (props) => {
|
|
|
5598
5674
|
value: "",
|
|
5599
5675
|
className: "absolute inset-0 w-full h-full pointer-events-none bg-transparent shadow-none"
|
|
5600
5676
|
},
|
|
5601
|
-
/* @__PURE__ */
|
|
5602
|
-
/* @__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))
|
|
5603
5679
|
);
|
|
5604
5680
|
};
|
|
5605
5681
|
function parseNumber(value) {
|
|
@@ -5655,7 +5731,7 @@ function InputFieldNumberInput(props) {
|
|
|
5655
5731
|
},
|
|
5656
5732
|
[onBlur]
|
|
5657
5733
|
);
|
|
5658
|
-
return /* @__PURE__ */
|
|
5734
|
+
return /* @__PURE__ */ React20.createElement(
|
|
5659
5735
|
InputFieldInput,
|
|
5660
5736
|
{
|
|
5661
5737
|
...rest,
|
|
@@ -5667,7 +5743,7 @@ function InputFieldNumberInput(props) {
|
|
|
5667
5743
|
}
|
|
5668
5744
|
);
|
|
5669
5745
|
}
|
|
5670
|
-
var RootContainer =
|
|
5746
|
+
var RootContainer = forwardRef11(({ $width, $flex, className, ...props }, ref) => /* @__PURE__ */ React20.createElement(
|
|
5671
5747
|
"div",
|
|
5672
5748
|
{
|
|
5673
5749
|
ref,
|
|
@@ -5692,10 +5768,10 @@ function InputFieldRoot({
|
|
|
5692
5768
|
const hasDropdown = childrenArray.some(
|
|
5693
5769
|
(child) => isValidElement(child) && child.type === InputFieldDropdownMenu
|
|
5694
5770
|
);
|
|
5695
|
-
const [isFocused, setIsFocused] =
|
|
5696
|
-
const [measuredLabelSize, setMeasuredLabelSize] =
|
|
5697
|
-
const [measuredButtonSize, setMeasuredButtonSize] =
|
|
5698
|
-
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();
|
|
5699
5775
|
const handleFocusChange = useCallback11(
|
|
5700
5776
|
(isFocused2) => {
|
|
5701
5777
|
setIsFocused(isFocused2);
|
|
@@ -5703,7 +5779,7 @@ function InputFieldRoot({
|
|
|
5703
5779
|
},
|
|
5704
5780
|
[onFocusChange]
|
|
5705
5781
|
);
|
|
5706
|
-
const [inputRef, setInputRef] =
|
|
5782
|
+
const [inputRef, setInputRef] = React20.useState();
|
|
5707
5783
|
useEffect11(() => {
|
|
5708
5784
|
if (inputRef && typeof inputRef !== "function") {
|
|
5709
5785
|
setMeasuredWidth?.(
|
|
@@ -5737,7 +5813,7 @@ function InputFieldRoot({
|
|
|
5737
5813
|
inputRef
|
|
5738
5814
|
]
|
|
5739
5815
|
);
|
|
5740
|
-
const rootElement = /* @__PURE__ */
|
|
5816
|
+
const rootElement = /* @__PURE__ */ React20.createElement(
|
|
5741
5817
|
RootContainer,
|
|
5742
5818
|
{
|
|
5743
5819
|
id,
|
|
@@ -5748,7 +5824,7 @@ function InputFieldRoot({
|
|
|
5748
5824
|
},
|
|
5749
5825
|
children2
|
|
5750
5826
|
);
|
|
5751
|
-
return /* @__PURE__ */
|
|
5827
|
+
return /* @__PURE__ */ React20.createElement(InputFieldContext.Provider, { value: contextValue }, renderPopoverContent ? /* @__PURE__ */ React20.createElement(
|
|
5752
5828
|
Popover,
|
|
5753
5829
|
{
|
|
5754
5830
|
open: true,
|
|
@@ -5764,7 +5840,7 @@ function InputFieldRoot({
|
|
|
5764
5840
|
event.stopPropagation();
|
|
5765
5841
|
}
|
|
5766
5842
|
},
|
|
5767
|
-
measuredWidth && /* @__PURE__ */
|
|
5843
|
+
measuredWidth && /* @__PURE__ */ React20.createElement("div", { className: `flex flex-col w-[${measuredWidth}] hidden` }, renderPopoverContent({ width: measuredWidth }))
|
|
5768
5844
|
) : rootElement);
|
|
5769
5845
|
}
|
|
5770
5846
|
var PrimitiveInputField = ({
|
|
@@ -5772,7 +5848,7 @@ var PrimitiveInputField = ({
|
|
|
5772
5848
|
disabled,
|
|
5773
5849
|
className,
|
|
5774
5850
|
...props
|
|
5775
|
-
}) => /* @__PURE__ */
|
|
5851
|
+
}) => /* @__PURE__ */ React20.createElement(
|
|
5776
5852
|
"input",
|
|
5777
5853
|
{
|
|
5778
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 ?? ""}`,
|
|
@@ -5781,10 +5857,10 @@ var PrimitiveInputField = ({
|
|
|
5781
5857
|
);
|
|
5782
5858
|
var InputField;
|
|
5783
5859
|
((InputField2) => {
|
|
5784
|
-
InputField2.Root =
|
|
5785
|
-
InputField2.Input =
|
|
5786
|
-
InputField2.Typeahead =
|
|
5787
|
-
InputField2.NumberInput =
|
|
5860
|
+
InputField2.Root = memo9(InputFieldRoot);
|
|
5861
|
+
InputField2.Input = memo9(InputFieldInput);
|
|
5862
|
+
InputField2.Typeahead = memo9(InputFieldTypeahead);
|
|
5863
|
+
InputField2.NumberInput = memo9(InputFieldNumberInput);
|
|
5788
5864
|
InputField2.DropdownMenu = InputFieldDropdownMenu;
|
|
5789
5865
|
InputField2.Button = InputFieldButton;
|
|
5790
5866
|
InputField2.Label = InputFieldLabel;
|
|
@@ -5848,7 +5924,7 @@ var DialogProvider = function DialogProvider2({
|
|
|
5848
5924
|
if (!dialogRef.current) return false;
|
|
5849
5925
|
return dialogRef.current.containsElement(element);
|
|
5850
5926
|
}, []);
|
|
5851
|
-
return /* @__PURE__ */
|
|
5927
|
+
return /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement(
|
|
5852
5928
|
DialogContext.Provider,
|
|
5853
5929
|
{
|
|
5854
5930
|
value: useMemo8(
|
|
@@ -5857,7 +5933,7 @@ var DialogProvider = function DialogProvider2({
|
|
|
5857
5933
|
)
|
|
5858
5934
|
},
|
|
5859
5935
|
children2
|
|
5860
|
-
), /* @__PURE__ */
|
|
5936
|
+
), /* @__PURE__ */ React21.createElement(
|
|
5861
5937
|
Dialog,
|
|
5862
5938
|
{
|
|
5863
5939
|
ref: dialogRef,
|
|
@@ -5878,7 +5954,7 @@ var DialogProvider = function DialogProvider2({
|
|
|
5878
5954
|
inputRef.current?.setSelectionRange(0, inputRef.current.value.length);
|
|
5879
5955
|
}, [])
|
|
5880
5956
|
},
|
|
5881
|
-
/* @__PURE__ */
|
|
5957
|
+
/* @__PURE__ */ React21.createElement(InputField.Root, null, /* @__PURE__ */ React21.createElement(
|
|
5882
5958
|
InputField.Input,
|
|
5883
5959
|
{
|
|
5884
5960
|
ref: inputRef,
|
|
@@ -5894,8 +5970,8 @@ var DialogProvider = function DialogProvider2({
|
|
|
5894
5970
|
onKeyDown: handleKeyDown
|
|
5895
5971
|
}
|
|
5896
5972
|
)),
|
|
5897
|
-
/* @__PURE__ */
|
|
5898
|
-
/* @__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"))
|
|
5899
5975
|
));
|
|
5900
5976
|
};
|
|
5901
5977
|
function useDialog() {
|
|
@@ -5914,7 +5990,7 @@ function useDialogContainsElement() {
|
|
|
5914
5990
|
|
|
5915
5991
|
// src/contexts/FloatingWindowContext.tsx
|
|
5916
5992
|
import { uuid } from "@noya-app/noya-utils";
|
|
5917
|
-
import
|
|
5993
|
+
import React22, { createContext as createContext4, useContext as useContext4, useMemo as useMemo9, useState as useState14 } from "react";
|
|
5918
5994
|
import { createPortal } from "react-dom";
|
|
5919
5995
|
var FloatingWindowContext = createContext4(void 0);
|
|
5920
5996
|
var CurrentWindowContext = createContext4(void 0);
|
|
@@ -5927,7 +6003,7 @@ var FloatingWindowProvider = ({
|
|
|
5927
6003
|
const id = uuid();
|
|
5928
6004
|
setWindows((windows2) => ({
|
|
5929
6005
|
...windows2,
|
|
5930
|
-
[id]: /* @__PURE__ */
|
|
6006
|
+
[id]: /* @__PURE__ */ React22.createElement(CurrentWindowContext.Provider, { value: { id } }, element)
|
|
5931
6007
|
}));
|
|
5932
6008
|
return id;
|
|
5933
6009
|
};
|
|
@@ -5939,7 +6015,7 @@ var FloatingWindowProvider = ({
|
|
|
5939
6015
|
};
|
|
5940
6016
|
return { createWindow, closeWindow };
|
|
5941
6017
|
}, []);
|
|
5942
|
-
return /* @__PURE__ */
|
|
6018
|
+
return /* @__PURE__ */ React22.createElement(FloatingWindowContext.Provider, { value: contextValue }, children2, Object.entries(windows).map(
|
|
5943
6019
|
([id, element]) => createPortal(element, document.body, id)
|
|
5944
6020
|
));
|
|
5945
6021
|
};
|
|
@@ -5964,7 +6040,7 @@ var useCurrentFloatingWindowInternal = () => {
|
|
|
5964
6040
|
var DesignSystemConfigurationContext = createContext5({
|
|
5965
6041
|
platform: "key"
|
|
5966
6042
|
});
|
|
5967
|
-
var DesignSystemConfigurationProvider =
|
|
6043
|
+
var DesignSystemConfigurationProvider = memo10(
|
|
5968
6044
|
function DesignSystemConfigurationProvider2({
|
|
5969
6045
|
children: children2,
|
|
5970
6046
|
platform
|
|
@@ -5982,7 +6058,7 @@ var DesignSystemConfigurationProvider = memo9(
|
|
|
5982
6058
|
() => ({ platform: platform ?? internalPlatform }),
|
|
5983
6059
|
[platform, internalPlatform]
|
|
5984
6060
|
);
|
|
5985
|
-
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))));
|
|
5986
6062
|
}
|
|
5987
6063
|
);
|
|
5988
6064
|
function useDesignSystemConfiguration() {
|
|
@@ -5990,12 +6066,28 @@ function useDesignSystemConfiguration() {
|
|
|
5990
6066
|
}
|
|
5991
6067
|
|
|
5992
6068
|
// src/utils/withSeparatorElements.ts
|
|
5993
|
-
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
|
+
}
|
|
5994
6083
|
function createKey(key) {
|
|
5995
6084
|
return `s-${key}`;
|
|
5996
6085
|
}
|
|
5997
|
-
function withSeparatorElements(elements2, separator) {
|
|
5998
|
-
const childrenArray =
|
|
6086
|
+
function withSeparatorElements(elements2, separator, options) {
|
|
6087
|
+
const childrenArray = flattenChildren(
|
|
6088
|
+
elements2,
|
|
6089
|
+
options?.traverseFragments ?? true
|
|
6090
|
+
);
|
|
5999
6091
|
for (let i = childrenArray.length - 1; i > 0; i--) {
|
|
6000
6092
|
let sep = typeof separator === "function" ? separator() : isValidElement2(separator) ? cloneElement(separator, { key: createKey(i) }) : separator;
|
|
6001
6093
|
if (isValidElement2(sep) && sep.key == null) {
|
|
@@ -6050,13 +6142,13 @@ function getKeyboardShortcutsForMenuItems(menuItems, onSelect) {
|
|
|
6050
6142
|
menuItems.flatMap(getKeyboardShortcuts).map(([key, value]) => [key, () => onSelect(value)])
|
|
6051
6143
|
);
|
|
6052
6144
|
}
|
|
6053
|
-
var ShortcutElement = ({ children: children2, fixedWidth }) => /* @__PURE__ */
|
|
6054
|
-
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({
|
|
6055
6147
|
shortcut
|
|
6056
6148
|
}) {
|
|
6057
6149
|
const platform = useDesignSystemConfiguration().platform;
|
|
6058
6150
|
const { keys, separator } = getShortcutDisplayParts(shortcut, platform);
|
|
6059
|
-
const keyElements = keys.map((key) => /* @__PURE__ */
|
|
6151
|
+
const keyElements = keys.map((key) => /* @__PURE__ */ React24.createElement(
|
|
6060
6152
|
ShortcutElement,
|
|
6061
6153
|
{
|
|
6062
6154
|
key,
|
|
@@ -6064,14 +6156,14 @@ var KeyboardShortcut = memo10(function KeyboardShortcut2({
|
|
|
6064
6156
|
},
|
|
6065
6157
|
key
|
|
6066
6158
|
));
|
|
6067
|
-
return /* @__PURE__ */
|
|
6159
|
+
return /* @__PURE__ */ React24.createElement(React24.Fragment, null, separator ? withSeparatorElements(
|
|
6068
6160
|
keyElements,
|
|
6069
|
-
/* @__PURE__ */
|
|
6161
|
+
/* @__PURE__ */ React24.createElement(ShortcutElement, null, separator)
|
|
6070
6162
|
) : keyElements);
|
|
6071
6163
|
});
|
|
6072
6164
|
|
|
6073
6165
|
// src/components/ContextMenu.tsx
|
|
6074
|
-
var ContextMenuItem2 =
|
|
6166
|
+
var ContextMenuItem2 = memo12(function ContextMenuItem3({
|
|
6075
6167
|
value,
|
|
6076
6168
|
children: children2,
|
|
6077
6169
|
onSelect,
|
|
@@ -6091,7 +6183,7 @@ var ContextMenuItem2 = memo11(function ContextMenuItem3({
|
|
|
6091
6183
|
onSelect(value);
|
|
6092
6184
|
}, [onSelect, value]);
|
|
6093
6185
|
if (checked) {
|
|
6094
|
-
return /* @__PURE__ */
|
|
6186
|
+
return /* @__PURE__ */ React25.createElement(
|
|
6095
6187
|
RadixContextMenu.CheckboxItem,
|
|
6096
6188
|
{
|
|
6097
6189
|
checked,
|
|
@@ -6099,11 +6191,11 @@ var ContextMenuItem2 = memo11(function ContextMenuItem3({
|
|
|
6099
6191
|
onSelect: handleSelectItem,
|
|
6100
6192
|
className: styles.itemStyle({ disabled })
|
|
6101
6193
|
},
|
|
6102
|
-
/* @__PURE__ */
|
|
6194
|
+
/* @__PURE__ */ React25.createElement(RadixContextMenu.ItemIndicator, { className: styles.itemIndicatorStyle }, /* @__PURE__ */ React25.createElement(CheckIcon2, null)),
|
|
6103
6195
|
children2
|
|
6104
6196
|
);
|
|
6105
6197
|
}
|
|
6106
|
-
const element = /* @__PURE__ */
|
|
6198
|
+
const element = /* @__PURE__ */ React25.createElement(
|
|
6107
6199
|
RadixContextMenu.Item,
|
|
6108
6200
|
{
|
|
6109
6201
|
className: styles.itemStyle({ disabled }),
|
|
@@ -6111,14 +6203,14 @@ var ContextMenuItem2 = memo11(function ContextMenuItem3({
|
|
|
6111
6203
|
onSelect: handleSelectItem,
|
|
6112
6204
|
onPointerDown: handlePointerDown
|
|
6113
6205
|
},
|
|
6114
|
-
indented && /* @__PURE__ */
|
|
6115
|
-
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 })),
|
|
6116
6208
|
children2,
|
|
6117
|
-
shortcut && /* @__PURE__ */
|
|
6118
|
-
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))
|
|
6119
6211
|
);
|
|
6120
6212
|
if (items && items.length > 0) {
|
|
6121
|
-
return /* @__PURE__ */
|
|
6213
|
+
return /* @__PURE__ */ React25.createElement(ContextMenuRoot, { isNested: true, items, onSelect }, element);
|
|
6122
6214
|
} else {
|
|
6123
6215
|
return element;
|
|
6124
6216
|
}
|
|
@@ -6145,8 +6237,8 @@ function ContextMenuRoot({
|
|
|
6145
6237
|
const RootComponent = isNested ? RadixContextMenu.Sub : RadixContextMenu.Root;
|
|
6146
6238
|
const TriggerComponent = isNested ? RadixContextMenu.SubTrigger : RadixContextMenu.Trigger;
|
|
6147
6239
|
const ContentComponent = isNested ? RadixContextMenu.SubContent : RadixContextMenu.Content;
|
|
6148
|
-
return /* @__PURE__ */
|
|
6149
|
-
(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(
|
|
6150
6242
|
ContextMenuItem2,
|
|
6151
6243
|
{
|
|
6152
6244
|
key: item.value ?? index,
|
|
@@ -6163,18 +6255,18 @@ function ContextMenuRoot({
|
|
|
6163
6255
|
)
|
|
6164
6256
|
))));
|
|
6165
6257
|
}
|
|
6166
|
-
var ContextMenu =
|
|
6258
|
+
var ContextMenu = memo12(ContextMenuRoot);
|
|
6167
6259
|
|
|
6168
6260
|
// src/components/Divider.tsx
|
|
6169
|
-
import
|
|
6170
|
-
var Divider =
|
|
6261
|
+
import React26, { memo as memo13 } from "react";
|
|
6262
|
+
var Divider = memo13(function Divider2({
|
|
6171
6263
|
variant = "normal",
|
|
6172
6264
|
overflow = 0,
|
|
6173
6265
|
className,
|
|
6174
6266
|
style: style5,
|
|
6175
6267
|
...props
|
|
6176
6268
|
}) {
|
|
6177
|
-
return /* @__PURE__ */
|
|
6269
|
+
return /* @__PURE__ */ React26.createElement(
|
|
6178
6270
|
"div",
|
|
6179
6271
|
{
|
|
6180
6272
|
className: `
|
|
@@ -6192,13 +6284,13 @@ var Divider = memo12(function Divider2({
|
|
|
6192
6284
|
}
|
|
6193
6285
|
);
|
|
6194
6286
|
});
|
|
6195
|
-
var DividerVertical =
|
|
6287
|
+
var DividerVertical = memo13(function DividerVertical2({
|
|
6196
6288
|
variant = "normal",
|
|
6197
6289
|
overflow = 0,
|
|
6198
6290
|
className,
|
|
6199
6291
|
...props
|
|
6200
6292
|
}) {
|
|
6201
|
-
return /* @__PURE__ */
|
|
6293
|
+
return /* @__PURE__ */ React26.createElement(
|
|
6202
6294
|
"div",
|
|
6203
6295
|
{
|
|
6204
6296
|
className: `
|
|
@@ -6215,8 +6307,8 @@ var DividerVertical = memo12(function DividerVertical2({
|
|
|
6215
6307
|
|
|
6216
6308
|
// src/components/DraggableMenuButton.tsx
|
|
6217
6309
|
import { DragHandleDots2Icon } from "@noya-app/noya-icons";
|
|
6218
|
-
import
|
|
6219
|
-
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(
|
|
6220
6312
|
"div",
|
|
6221
6313
|
{
|
|
6222
6314
|
ref,
|
|
@@ -6224,7 +6316,7 @@ var DotButton = forwardRef11(({ className, ...props }, ref) => /* @__PURE__ */ R
|
|
|
6224
6316
|
...props
|
|
6225
6317
|
}
|
|
6226
6318
|
));
|
|
6227
|
-
var Trigger5 =
|
|
6319
|
+
var Trigger5 = forwardRef12(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
|
6228
6320
|
"div",
|
|
6229
6321
|
{
|
|
6230
6322
|
ref,
|
|
@@ -6232,7 +6324,7 @@ var Trigger5 = forwardRef11(({ className, ...props }, ref) => /* @__PURE__ */ Re
|
|
|
6232
6324
|
...props
|
|
6233
6325
|
}
|
|
6234
6326
|
));
|
|
6235
|
-
var DraggableMenuButton =
|
|
6327
|
+
var DraggableMenuButton = memo14(function DraggableMenuButton2({
|
|
6236
6328
|
items,
|
|
6237
6329
|
onSelect,
|
|
6238
6330
|
isVisible = true
|
|
@@ -6274,7 +6366,7 @@ var DraggableMenuButton = memo13(function DraggableMenuButton2({
|
|
|
6274
6366
|
},
|
|
6275
6367
|
[setOpen]
|
|
6276
6368
|
);
|
|
6277
|
-
return /* @__PURE__ */
|
|
6369
|
+
return /* @__PURE__ */ React27.createElement(
|
|
6278
6370
|
DotButton,
|
|
6279
6371
|
{
|
|
6280
6372
|
onPointerDownCapture: handlePointerDownCapture,
|
|
@@ -6284,7 +6376,7 @@ var DraggableMenuButton = memo13(function DraggableMenuButton2({
|
|
|
6284
6376
|
event.preventDefault();
|
|
6285
6377
|
}
|
|
6286
6378
|
},
|
|
6287
|
-
items && onSelect ? /* @__PURE__ */
|
|
6379
|
+
items && onSelect ? /* @__PURE__ */ React27.createElement(
|
|
6288
6380
|
DropdownMenu,
|
|
6289
6381
|
{
|
|
6290
6382
|
open,
|
|
@@ -6293,13 +6385,13 @@ var DraggableMenuButton = memo13(function DraggableMenuButton2({
|
|
|
6293
6385
|
onSelect,
|
|
6294
6386
|
shouldBindKeyboardShortcuts: false
|
|
6295
6387
|
},
|
|
6296
|
-
/* @__PURE__ */
|
|
6388
|
+
/* @__PURE__ */ React27.createElement(Trigger5, null, /* @__PURE__ */ React27.createElement(
|
|
6297
6389
|
DragHandleDots2Icon,
|
|
6298
6390
|
{
|
|
6299
6391
|
color: isVisible || open ? "var(--icon)" : "transparent"
|
|
6300
6392
|
}
|
|
6301
6393
|
))
|
|
6302
|
-
) : /* @__PURE__ */
|
|
6394
|
+
) : /* @__PURE__ */ React27.createElement(
|
|
6303
6395
|
DragHandleDots2Icon,
|
|
6304
6396
|
{
|
|
6305
6397
|
color: isVisible || open ? "var(--icon)" : "transparent"
|
|
@@ -6309,7 +6401,7 @@ var DraggableMenuButton = memo13(function DraggableMenuButton2({
|
|
|
6309
6401
|
});
|
|
6310
6402
|
|
|
6311
6403
|
// src/components/FillInputField.tsx
|
|
6312
|
-
import
|
|
6404
|
+
import React30, { forwardRef as forwardRef13, memo as memo17 } from "react";
|
|
6313
6405
|
|
|
6314
6406
|
// ../noya-file-format/src/types.ts
|
|
6315
6407
|
var types_exports = {};
|
|
@@ -6634,19 +6726,19 @@ var ClassValue = /* @__PURE__ */ ((ClassValue2) => {
|
|
|
6634
6726
|
})(ClassValue || {});
|
|
6635
6727
|
|
|
6636
6728
|
// src/components/FillPreviewBackground.tsx
|
|
6637
|
-
import
|
|
6729
|
+
import React29, { memo as memo16, useMemo as useMemo14 } from "react";
|
|
6638
6730
|
|
|
6639
6731
|
// src/contexts/ImageDataContext.tsx
|
|
6640
|
-
import
|
|
6732
|
+
import React28, {
|
|
6641
6733
|
createContext as createContext6,
|
|
6642
|
-
memo as
|
|
6734
|
+
memo as memo15,
|
|
6643
6735
|
useContext as useContext6,
|
|
6644
6736
|
useMemo as useMemo12
|
|
6645
6737
|
} from "react";
|
|
6646
6738
|
var ImageDataContext = createContext6(
|
|
6647
6739
|
void 0
|
|
6648
6740
|
);
|
|
6649
|
-
var ImageDataProvider =
|
|
6741
|
+
var ImageDataProvider = memo15(function ImageDataProvider2({
|
|
6650
6742
|
children: children2,
|
|
6651
6743
|
getImageData
|
|
6652
6744
|
}) {
|
|
@@ -6654,7 +6746,7 @@ var ImageDataProvider = memo14(function ImageDataProvider2({
|
|
|
6654
6746
|
() => ({ getImageData: getImageData ?? (() => void 0) }),
|
|
6655
6747
|
[getImageData]
|
|
6656
6748
|
);
|
|
6657
|
-
return /* @__PURE__ */
|
|
6749
|
+
return /* @__PURE__ */ React28.createElement(ImageDataContext.Provider, { value: contextValue }, children2);
|
|
6658
6750
|
});
|
|
6659
6751
|
function useImageData(ref) {
|
|
6660
6752
|
const value = useContext6(ImageDataContext);
|
|
@@ -6727,8 +6819,8 @@ var dotsHorizontalSvg = (fillColor) => `
|
|
|
6727
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>
|
|
6728
6820
|
</svg>
|
|
6729
6821
|
`;
|
|
6730
|
-
var Background =
|
|
6731
|
-
return /* @__PURE__ */
|
|
6822
|
+
var Background = memo16(function Background2({ background: background2 }) {
|
|
6823
|
+
return /* @__PURE__ */ React29.createElement(
|
|
6732
6824
|
"span",
|
|
6733
6825
|
{
|
|
6734
6826
|
className: cn(
|
|
@@ -6750,7 +6842,7 @@ function getPatternSizeAndPosition(fillType, tileScale) {
|
|
|
6750
6842
|
return "center / 100% 100%";
|
|
6751
6843
|
}
|
|
6752
6844
|
}
|
|
6753
|
-
var PatternPreviewBackground =
|
|
6845
|
+
var PatternPreviewBackground = memo16(function PatternPreviewBackground2({
|
|
6754
6846
|
fillType,
|
|
6755
6847
|
tileScale,
|
|
6756
6848
|
imageRef
|
|
@@ -6766,30 +6858,30 @@ var PatternPreviewBackground = memo15(function PatternPreviewBackground2({
|
|
|
6766
6858
|
].join(" "),
|
|
6767
6859
|
[fillType, size3, url]
|
|
6768
6860
|
);
|
|
6769
|
-
return /* @__PURE__ */
|
|
6861
|
+
return /* @__PURE__ */ React29.createElement(Background, { background: background2 });
|
|
6770
6862
|
});
|
|
6771
|
-
var ColorPreviewBackground =
|
|
6863
|
+
var ColorPreviewBackground = memo16(function ColorPreviewBackground2({
|
|
6772
6864
|
color
|
|
6773
6865
|
}) {
|
|
6774
6866
|
const background2 = useMemo14(() => sketchColorToRgbaString(color), [color]);
|
|
6775
|
-
return /* @__PURE__ */
|
|
6867
|
+
return /* @__PURE__ */ React29.createElement(Background, { background: background2 });
|
|
6776
6868
|
});
|
|
6777
|
-
var GradientPreviewBackground =
|
|
6869
|
+
var GradientPreviewBackground = memo16(function GradientPreviewBackground2({
|
|
6778
6870
|
gradient
|
|
6779
6871
|
}) {
|
|
6780
6872
|
const background2 = useMemo14(
|
|
6781
6873
|
() => getGradientBackground(gradient.stops, gradient.gradientType, 180),
|
|
6782
6874
|
[gradient.gradientType, gradient.stops]
|
|
6783
6875
|
);
|
|
6784
|
-
return /* @__PURE__ */
|
|
6876
|
+
return /* @__PURE__ */ React29.createElement(Background, { background: background2 });
|
|
6785
6877
|
});
|
|
6786
6878
|
var background = `center url("data:image/svg+xml;utf8,${dotsHorizontalSvg(
|
|
6787
6879
|
"var(--placeholder-dots)"
|
|
6788
6880
|
)}") no-repeat`;
|
|
6789
|
-
var FillPreviewBackground =
|
|
6881
|
+
var FillPreviewBackground = memo16(function FillPreviewBackground2({
|
|
6790
6882
|
value
|
|
6791
6883
|
}) {
|
|
6792
|
-
if (!value) return /* @__PURE__ */
|
|
6884
|
+
if (!value) return /* @__PURE__ */ React29.createElement(
|
|
6793
6885
|
Background,
|
|
6794
6886
|
{
|
|
6795
6887
|
background
|
|
@@ -6797,12 +6889,12 @@ var FillPreviewBackground = memo15(function FillPreviewBackground2({
|
|
|
6797
6889
|
);
|
|
6798
6890
|
switch (value._class) {
|
|
6799
6891
|
case "color":
|
|
6800
|
-
return /* @__PURE__ */
|
|
6892
|
+
return /* @__PURE__ */ React29.createElement(ColorPreviewBackground, { color: value });
|
|
6801
6893
|
case "gradient":
|
|
6802
|
-
return /* @__PURE__ */
|
|
6894
|
+
return /* @__PURE__ */ React29.createElement(GradientPreviewBackground, { gradient: value });
|
|
6803
6895
|
case "pattern":
|
|
6804
6896
|
if (!value.image) return null;
|
|
6805
|
-
return /* @__PURE__ */
|
|
6897
|
+
return /* @__PURE__ */ React29.createElement(
|
|
6806
6898
|
PatternPreviewBackground,
|
|
6807
6899
|
{
|
|
6808
6900
|
fillType: value.patternFillType,
|
|
@@ -6814,7 +6906,7 @@ var FillPreviewBackground = memo15(function FillPreviewBackground2({
|
|
|
6814
6906
|
});
|
|
6815
6907
|
|
|
6816
6908
|
// src/components/FillInputField.tsx
|
|
6817
|
-
var FillButton =
|
|
6909
|
+
var FillButton = forwardRef13(({ className, ...props }, ref) => /* @__PURE__ */ React30.createElement(
|
|
6818
6910
|
"button",
|
|
6819
6911
|
{
|
|
6820
6912
|
ref,
|
|
@@ -6822,14 +6914,14 @@ var FillButton = forwardRef12(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
6822
6914
|
...props
|
|
6823
6915
|
}
|
|
6824
6916
|
));
|
|
6825
|
-
var FillInputField =
|
|
6826
|
-
|
|
6827
|
-
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 }));
|
|
6828
6920
|
})
|
|
6829
6921
|
);
|
|
6830
6922
|
|
|
6831
6923
|
// src/components/FloatingWindow.tsx
|
|
6832
|
-
import
|
|
6924
|
+
import React31, { useCallback as useCallback15, useRef as useRef14, useState as useState17 } from "react";
|
|
6833
6925
|
var styles2 = {
|
|
6834
6926
|
noSelect: {
|
|
6835
6927
|
userSelect: "none",
|
|
@@ -6922,7 +7014,7 @@ function defaultRenderToolbar({
|
|
|
6922
7014
|
toolbarContent,
|
|
6923
7015
|
onClose
|
|
6924
7016
|
}) {
|
|
6925
|
-
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(
|
|
6926
7018
|
IconButton,
|
|
6927
7019
|
{
|
|
6928
7020
|
iconName: "Cross3Icon",
|
|
@@ -7042,7 +7134,7 @@ var FloatingWindow = ({
|
|
|
7042
7134
|
setResizeDirection(null);
|
|
7043
7135
|
toggleGlobalTextSelection(false);
|
|
7044
7136
|
}, []);
|
|
7045
|
-
|
|
7137
|
+
React31.useEffect(() => {
|
|
7046
7138
|
document.addEventListener("mousemove", handleMouseMove);
|
|
7047
7139
|
document.addEventListener("mouseup", handleMouseUp);
|
|
7048
7140
|
return () => {
|
|
@@ -7056,7 +7148,7 @@ var FloatingWindow = ({
|
|
|
7056
7148
|
if (onClose) onClose();
|
|
7057
7149
|
floatingWindowManager.closeWindow(currentFloatingWindow.id);
|
|
7058
7150
|
}, [currentFloatingWindow.id, floatingWindowManager, onClose]);
|
|
7059
|
-
return /* @__PURE__ */
|
|
7151
|
+
return /* @__PURE__ */ React31.createElement(
|
|
7060
7152
|
"div",
|
|
7061
7153
|
{
|
|
7062
7154
|
ref: wrapperRef,
|
|
@@ -7070,7 +7162,7 @@ var FloatingWindow = ({
|
|
|
7070
7162
|
backgroundColor: "var(--canvas-background)"
|
|
7071
7163
|
}
|
|
7072
7164
|
},
|
|
7073
|
-
/* @__PURE__ */
|
|
7165
|
+
/* @__PURE__ */ React31.createElement(
|
|
7074
7166
|
"div",
|
|
7075
7167
|
{
|
|
7076
7168
|
style: {
|
|
@@ -7081,9 +7173,9 @@ var FloatingWindow = ({
|
|
|
7081
7173
|
},
|
|
7082
7174
|
renderToolbar({ title, toolbarContent, onClose: handleClose })
|
|
7083
7175
|
),
|
|
7084
|
-
/* @__PURE__ */
|
|
7085
|
-
/* @__PURE__ */
|
|
7086
|
-
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(
|
|
7087
7179
|
"div",
|
|
7088
7180
|
{
|
|
7089
7181
|
key: direction,
|
|
@@ -7105,8 +7197,8 @@ import {
|
|
|
7105
7197
|
hsvaToRgba,
|
|
7106
7198
|
rgbaToHsva as rgbaToHsva2
|
|
7107
7199
|
} from "@noya-app/noya-colorpicker";
|
|
7108
|
-
import
|
|
7109
|
-
var GradientPicker =
|
|
7200
|
+
import React32, { memo as memo18, useCallback as useCallback16, useMemo as useMemo15 } from "react";
|
|
7201
|
+
var GradientPicker = memo18(function GradientPicker2({
|
|
7110
7202
|
value,
|
|
7111
7203
|
selectedStop,
|
|
7112
7204
|
onChangeColor,
|
|
@@ -7140,14 +7232,14 @@ var GradientPicker = memo17(function GradientPicker2({
|
|
|
7140
7232
|
},
|
|
7141
7233
|
[onAdd]
|
|
7142
7234
|
);
|
|
7143
|
-
return /* @__PURE__ */
|
|
7235
|
+
return /* @__PURE__ */ React32.createElement(
|
|
7144
7236
|
NoyaColorPicker,
|
|
7145
7237
|
{
|
|
7146
7238
|
onChange: handleChangeColor,
|
|
7147
7239
|
colorModel,
|
|
7148
7240
|
color: rgbaColor
|
|
7149
7241
|
},
|
|
7150
|
-
/* @__PURE__ */
|
|
7242
|
+
/* @__PURE__ */ React32.createElement(
|
|
7151
7243
|
Gradient,
|
|
7152
7244
|
{
|
|
7153
7245
|
gradients: value,
|
|
@@ -7158,20 +7250,20 @@ var GradientPicker = memo17(function GradientPicker2({
|
|
|
7158
7250
|
onDelete
|
|
7159
7251
|
}
|
|
7160
7252
|
),
|
|
7161
|
-
/* @__PURE__ */
|
|
7162
|
-
/* @__PURE__ */
|
|
7163
|
-
/* @__PURE__ */
|
|
7164
|
-
/* @__PURE__ */
|
|
7165
|
-
/* @__PURE__ */
|
|
7166
|
-
/* @__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)
|
|
7167
7259
|
);
|
|
7168
7260
|
});
|
|
7169
7261
|
|
|
7170
7262
|
// src/components/GridView.tsx
|
|
7171
|
-
import
|
|
7263
|
+
import React34, {
|
|
7172
7264
|
createContext as createContext7,
|
|
7173
|
-
forwardRef as
|
|
7174
|
-
memo as
|
|
7265
|
+
forwardRef as forwardRef14,
|
|
7266
|
+
memo as memo20,
|
|
7175
7267
|
useCallback as useCallback18,
|
|
7176
7268
|
useContext as useContext7,
|
|
7177
7269
|
useMemo as useMemo16
|
|
@@ -7179,10 +7271,10 @@ import React33, {
|
|
|
7179
7271
|
|
|
7180
7272
|
// src/components/ScrollArea.tsx
|
|
7181
7273
|
import * as RadixScrollArea from "@radix-ui/react-scroll-area";
|
|
7182
|
-
import
|
|
7183
|
-
var ScrollArea =
|
|
7274
|
+
import React33, { memo as memo19, useCallback as useCallback17, useState as useState18 } from "react";
|
|
7275
|
+
var ScrollArea = memo19(function ScrollArea2({ children: children2 }) {
|
|
7184
7276
|
const [scrollElementRef, setScrollElementRef] = useState18(null);
|
|
7185
|
-
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(
|
|
7186
7278
|
RadixScrollArea.Viewport,
|
|
7187
7279
|
{
|
|
7188
7280
|
className: "w-full h-full [&>div]:block",
|
|
@@ -7192,13 +7284,13 @@ var ScrollArea = memo18(function ScrollArea2({ children: children2 }) {
|
|
|
7192
7284
|
)
|
|
7193
7285
|
},
|
|
7194
7286
|
typeof children2 === "function" ? scrollElementRef ? children2(scrollElementRef) : null : children2
|
|
7195
|
-
), /* @__PURE__ */
|
|
7287
|
+
), /* @__PURE__ */ React33.createElement(
|
|
7196
7288
|
RadixScrollArea.Scrollbar,
|
|
7197
7289
|
{
|
|
7198
7290
|
orientation: "vertical",
|
|
7199
7291
|
className: "scroll-component flex p-[3px] data-[orientation=vertical]:w-[10px]"
|
|
7200
7292
|
},
|
|
7201
|
-
/* @__PURE__ */
|
|
7293
|
+
/* @__PURE__ */ React33.createElement(RadixScrollArea.Thumb, { className: "scroll-component flex-1 rounded-[10px] bg-scrollbar" })
|
|
7202
7294
|
)));
|
|
7203
7295
|
});
|
|
7204
7296
|
|
|
@@ -7236,7 +7328,7 @@ var sizes = {
|
|
|
7236
7328
|
}
|
|
7237
7329
|
};
|
|
7238
7330
|
var ItemTitle = ({ showBackground, children: children2 }) => {
|
|
7239
|
-
return /* @__PURE__ */
|
|
7331
|
+
return /* @__PURE__ */ React34.createElement(
|
|
7240
7332
|
"span",
|
|
7241
7333
|
{
|
|
7242
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]"}`
|
|
@@ -7245,7 +7337,7 @@ var ItemTitle = ({ showBackground, children: children2 }) => {
|
|
|
7245
7337
|
);
|
|
7246
7338
|
};
|
|
7247
7339
|
var ItemDescription = ({ showBackground, children: children2 }) => {
|
|
7248
|
-
return /* @__PURE__ */
|
|
7340
|
+
return /* @__PURE__ */ React34.createElement(
|
|
7249
7341
|
"span",
|
|
7250
7342
|
{
|
|
7251
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]"}`
|
|
@@ -7254,7 +7346,7 @@ var ItemDescription = ({ showBackground, children: children2 }) => {
|
|
|
7254
7346
|
);
|
|
7255
7347
|
};
|
|
7256
7348
|
var SectionTitle = ({ last = false, children: children2 }) => {
|
|
7257
|
-
return /* @__PURE__ */
|
|
7349
|
+
return /* @__PURE__ */ React34.createElement(
|
|
7258
7350
|
"span",
|
|
7259
7351
|
{
|
|
7260
7352
|
className: `font-sans text-heading3 font-medium user-select-none whitespace-pre overflow-hidden text-ellipsis ${last ? "text-text" : "text-text-muted"}`
|
|
@@ -7262,7 +7354,7 @@ var SectionTitle = ({ last = false, children: children2 }) => {
|
|
|
7262
7354
|
children2
|
|
7263
7355
|
);
|
|
7264
7356
|
};
|
|
7265
|
-
var GridViewItem =
|
|
7357
|
+
var GridViewItem = forwardRef14(function GridViewItem2({
|
|
7266
7358
|
id,
|
|
7267
7359
|
title,
|
|
7268
7360
|
subtitle,
|
|
@@ -7278,7 +7370,7 @@ var GridViewItem = forwardRef13(function GridViewItem2({
|
|
|
7278
7370
|
onContextMenu,
|
|
7279
7371
|
style: style5
|
|
7280
7372
|
}, forwardedRef) {
|
|
7281
|
-
const [hovered, setHovered] =
|
|
7373
|
+
const [hovered, setHovered] = React34.useState(false);
|
|
7282
7374
|
const { hoverProps } = useHover({
|
|
7283
7375
|
onHoverChange: (isHovering) => {
|
|
7284
7376
|
onHoverChange?.(isHovering);
|
|
@@ -7307,7 +7399,7 @@ var GridViewItem = forwardRef13(function GridViewItem2({
|
|
|
7307
7399
|
},
|
|
7308
7400
|
[onPress]
|
|
7309
7401
|
);
|
|
7310
|
-
let element = /* @__PURE__ */
|
|
7402
|
+
let element = /* @__PURE__ */ React34.createElement(
|
|
7311
7403
|
"div",
|
|
7312
7404
|
{
|
|
7313
7405
|
className: "flex flex-col relative focus:shadow-[0px_0px_0px_1px_var(--sidebar-background),_0px_0px_0px_3px_var(--primary)] focus:outline-none",
|
|
@@ -7317,7 +7409,7 @@ var GridViewItem = forwardRef13(function GridViewItem2({
|
|
|
7317
7409
|
tabIndex: disabled ? void 0 : 0,
|
|
7318
7410
|
onKeyDown: handleKeyDown
|
|
7319
7411
|
},
|
|
7320
|
-
/* @__PURE__ */
|
|
7412
|
+
/* @__PURE__ */ React34.createElement(
|
|
7321
7413
|
"div",
|
|
7322
7414
|
{
|
|
7323
7415
|
className: cn(
|
|
@@ -7334,18 +7426,18 @@ var GridViewItem = forwardRef13(function GridViewItem2({
|
|
|
7334
7426
|
},
|
|
7335
7427
|
children2
|
|
7336
7428
|
),
|
|
7337
|
-
textPosition === "below" && /* @__PURE__ */
|
|
7338
|
-
textPosition === "overlay" && hovered && (title || subtitle) && /* @__PURE__ */
|
|
7339
|
-
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 }))
|
|
7340
7432
|
);
|
|
7341
7433
|
if (menuItems && onSelectMenuItem) {
|
|
7342
|
-
element = /* @__PURE__ */
|
|
7434
|
+
element = /* @__PURE__ */ React34.createElement(ContextMenu, { items: menuItems, onSelect: onSelectMenuItem }, element);
|
|
7343
7435
|
}
|
|
7344
7436
|
if (textPosition === "toolip") {
|
|
7345
|
-
element = /* @__PURE__ */
|
|
7437
|
+
element = /* @__PURE__ */ React34.createElement(
|
|
7346
7438
|
Tooltip,
|
|
7347
7439
|
{
|
|
7348
|
-
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))
|
|
7349
7441
|
},
|
|
7350
7442
|
element
|
|
7351
7443
|
);
|
|
@@ -7384,7 +7476,7 @@ function GridViewRoot({
|
|
|
7384
7476
|
}),
|
|
7385
7477
|
[bordered, disabled, size3, textPosition]
|
|
7386
7478
|
);
|
|
7387
|
-
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));
|
|
7388
7480
|
}
|
|
7389
7481
|
function GridViewSection({
|
|
7390
7482
|
children: children2,
|
|
@@ -7392,28 +7484,28 @@ function GridViewSection({
|
|
|
7392
7484
|
}) {
|
|
7393
7485
|
const { size: size3 } = useContext7(GridViewContext);
|
|
7394
7486
|
const gapStyle = { gap: `${sizes[size3].gap}px` };
|
|
7395
|
-
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);
|
|
7396
7488
|
}
|
|
7397
7489
|
function GridViewSectionHeader({ title }) {
|
|
7398
7490
|
const grouped = title.split("/");
|
|
7399
|
-
return /* @__PURE__ */
|
|
7400
|
-
grouped.map((title2, index) => /* @__PURE__ */
|
|
7401
|
-
/* @__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, " / ")
|
|
7402
7494
|
));
|
|
7403
7495
|
}
|
|
7404
7496
|
var GridView;
|
|
7405
7497
|
((GridView2) => {
|
|
7406
|
-
GridView2.Root =
|
|
7407
|
-
GridView2.Item =
|
|
7408
|
-
GridView2.Section =
|
|
7409
|
-
GridView2.SectionHeader =
|
|
7498
|
+
GridView2.Root = memo20(GridViewRoot);
|
|
7499
|
+
GridView2.Item = memo20(GridViewItem);
|
|
7500
|
+
GridView2.Section = memo20(GridViewSection);
|
|
7501
|
+
GridView2.SectionHeader = memo20(GridViewSectionHeader);
|
|
7410
7502
|
})(GridView || (GridView = {}));
|
|
7411
7503
|
|
|
7412
7504
|
// src/components/InputFieldWithCompletions.tsx
|
|
7413
7505
|
import { chunkBy, partition } from "@noya-app/noya-utils";
|
|
7414
|
-
import
|
|
7415
|
-
forwardRef as
|
|
7416
|
-
memo as
|
|
7506
|
+
import React58, {
|
|
7507
|
+
forwardRef as forwardRef16,
|
|
7508
|
+
memo as memo23,
|
|
7417
7509
|
useCallback as useCallback21,
|
|
7418
7510
|
useEffect as useEffect14,
|
|
7419
7511
|
useImperativeHandle as useImperativeHandle3,
|
|
@@ -7496,12 +7588,12 @@ function mergeRanges(ranges) {
|
|
|
7496
7588
|
// src/components/ListView.tsx
|
|
7497
7589
|
import { range } from "@noya-app/noya-utils";
|
|
7498
7590
|
import { composeRefs as composeRefs2 } from "@radix-ui/react-compose-refs";
|
|
7499
|
-
import
|
|
7591
|
+
import React57, {
|
|
7500
7592
|
Children as Children4,
|
|
7501
7593
|
createContext as createContext9,
|
|
7502
|
-
forwardRef as
|
|
7594
|
+
forwardRef as forwardRef15,
|
|
7503
7595
|
isValidElement as isValidElement3,
|
|
7504
|
-
memo as
|
|
7596
|
+
memo as memo22,
|
|
7505
7597
|
useCallback as useCallback20,
|
|
7506
7598
|
useContext as useContext9,
|
|
7507
7599
|
useImperativeHandle as useImperativeHandle2,
|
|
@@ -7518,7 +7610,7 @@ var import_getPrototypeOf2 = __toESM(require_getPrototypeOf());
|
|
|
7518
7610
|
var import_assertThisInitialized2 = __toESM(require_assertThisInitialized());
|
|
7519
7611
|
var import_inherits2 = __toESM(require_inherits());
|
|
7520
7612
|
var import_defineProperty4 = __toESM(require_defineProperty());
|
|
7521
|
-
import * as
|
|
7613
|
+
import * as React37 from "react";
|
|
7522
7614
|
|
|
7523
7615
|
// ../../node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js
|
|
7524
7616
|
function componentWillMount() {
|
|
@@ -7615,7 +7707,7 @@ var import_getPrototypeOf = __toESM(require_getPrototypeOf());
|
|
|
7615
7707
|
var import_assertThisInitialized = __toESM(require_assertThisInitialized());
|
|
7616
7708
|
var import_inherits = __toESM(require_inherits());
|
|
7617
7709
|
var import_defineProperty3 = __toESM(require_defineProperty());
|
|
7618
|
-
import * as
|
|
7710
|
+
import * as React36 from "react";
|
|
7619
7711
|
|
|
7620
7712
|
// ../../node_modules/clsx/dist/clsx.m.js
|
|
7621
7713
|
function r(e) {
|
|
@@ -7654,7 +7746,7 @@ var import_createClass = __toESM(require_createClass());
|
|
|
7654
7746
|
var import_defineProperty = __toESM(require_defineProperty());
|
|
7655
7747
|
|
|
7656
7748
|
// ../../node_modules/react-virtualized/dist/es/Grid/types.js
|
|
7657
|
-
import * as
|
|
7749
|
+
import * as React35 from "react";
|
|
7658
7750
|
var import_prop_types = __toESM(require_prop_types());
|
|
7659
7751
|
var bpfrpt_proptype_CellPosition = process.env.NODE_ENV === "production" ? null : {
|
|
7660
7752
|
"columnIndex": import_prop_types.default.number.isRequired,
|
|
@@ -8814,7 +8906,7 @@ var Grid = (_temp = _class = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
8814
8906
|
gridStyle.overflowY = totalRowsHeight + horizontalScrollBarSize <= height ? "hidden" : "auto";
|
|
8815
8907
|
var childrenToDisplay = this._childrenToDisplay;
|
|
8816
8908
|
var showNoContentRenderer = childrenToDisplay.length === 0 && height > 0 && width > 0;
|
|
8817
|
-
return
|
|
8909
|
+
return React36.createElement("div", (0, import_extends.default)({
|
|
8818
8910
|
ref: this._setScrollingContainerRef
|
|
8819
8911
|
}, containerProps, {
|
|
8820
8912
|
"aria-label": this.props["aria-label"],
|
|
@@ -8825,7 +8917,7 @@ var Grid = (_temp = _class = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
8825
8917
|
role,
|
|
8826
8918
|
style: _objectSpread({}, gridStyle, {}, style5),
|
|
8827
8919
|
tabIndex
|
|
8828
|
-
}), childrenToDisplay.length > 0 &&
|
|
8920
|
+
}), childrenToDisplay.length > 0 && React36.createElement("div", {
|
|
8829
8921
|
className: "ReactVirtualized__Grid__innerScrollContainer",
|
|
8830
8922
|
role: containerRole,
|
|
8831
8923
|
style: _objectSpread({
|
|
@@ -9283,7 +9375,7 @@ var Grid = (_temp = _class = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
9283
9375
|
}
|
|
9284
9376
|
}]);
|
|
9285
9377
|
return Grid2;
|
|
9286
|
-
}(
|
|
9378
|
+
}(React36.PureComponent), (0, import_defineProperty3.default)(_class, "propTypes", process.env.NODE_ENV === "production" ? null : {
|
|
9287
9379
|
"aria-label": import_prop_types3.default.string.isRequired,
|
|
9288
9380
|
"aria-readonly": import_prop_types3.default.bool,
|
|
9289
9381
|
/**
|
|
@@ -9589,7 +9681,7 @@ var ArrowKeyStepper = (_temp2 = _class2 = /* @__PURE__ */ function(_React$PureCo
|
|
|
9589
9681
|
value: function render() {
|
|
9590
9682
|
var _this$props2 = this.props, className = _this$props2.className, children2 = _this$props2.children;
|
|
9591
9683
|
var _this$_getScrollState3 = this._getScrollState(), scrollToColumn = _this$_getScrollState3.scrollToColumn, scrollToRow = _this$_getScrollState3.scrollToRow;
|
|
9592
|
-
return
|
|
9684
|
+
return React37.createElement("div", {
|
|
9593
9685
|
className,
|
|
9594
9686
|
onKeyDown: this._onKeyDown
|
|
9595
9687
|
}, children2({
|
|
@@ -9641,7 +9733,7 @@ var ArrowKeyStepper = (_temp2 = _class2 = /* @__PURE__ */ function(_React$PureCo
|
|
|
9641
9733
|
}
|
|
9642
9734
|
}]);
|
|
9643
9735
|
return ArrowKeyStepper2;
|
|
9644
|
-
}(
|
|
9736
|
+
}(React37.PureComponent), (0, import_defineProperty4.default)(_class2, "propTypes", process.env.NODE_ENV === "production" ? null : {
|
|
9645
9737
|
"children": import_prop_types5.default.func.isRequired,
|
|
9646
9738
|
"className": import_prop_types5.default.string,
|
|
9647
9739
|
"columnCount": import_prop_types5.default.number.isRequired,
|
|
@@ -9670,7 +9762,7 @@ var import_getPrototypeOf3 = __toESM(require_getPrototypeOf());
|
|
|
9670
9762
|
var import_assertThisInitialized3 = __toESM(require_assertThisInitialized());
|
|
9671
9763
|
var import_inherits3 = __toESM(require_inherits());
|
|
9672
9764
|
var import_defineProperty5 = __toESM(require_defineProperty());
|
|
9673
|
-
import * as
|
|
9765
|
+
import * as React38 from "react";
|
|
9674
9766
|
|
|
9675
9767
|
// ../../node_modules/react-virtualized/dist/es/vendor/detectElementResize.js
|
|
9676
9768
|
function createDetectElementResize(nonce, hostWindow) {
|
|
@@ -9949,7 +10041,7 @@ var AutoSizer3 = (_temp3 = _class3 = /* @__PURE__ */ function(_React$Component)
|
|
|
9949
10041
|
outerStyle.width = 0;
|
|
9950
10042
|
childParams.width = width;
|
|
9951
10043
|
}
|
|
9952
|
-
return
|
|
10044
|
+
return React38.createElement("div", {
|
|
9953
10045
|
className,
|
|
9954
10046
|
ref: this._setRef,
|
|
9955
10047
|
style: _objectSpread3({}, outerStyle, {}, style5)
|
|
@@ -9957,7 +10049,7 @@ var AutoSizer3 = (_temp3 = _class3 = /* @__PURE__ */ function(_React$Component)
|
|
|
9957
10049
|
}
|
|
9958
10050
|
}]);
|
|
9959
10051
|
return AutoSizer4;
|
|
9960
|
-
}(
|
|
10052
|
+
}(React38.Component), (0, import_defineProperty5.default)(_class3, "propTypes", process.env.NODE_ENV === "production" ? null : {
|
|
9961
10053
|
/** Function responsible for rendering children.*/
|
|
9962
10054
|
"children": import_prop_types6.default.func.isRequired,
|
|
9963
10055
|
/** Optional custom CSS class name to attach to root AutoSizer element. */
|
|
@@ -9993,7 +10085,7 @@ var import_getPrototypeOf4 = __toESM(require_getPrototypeOf());
|
|
|
9993
10085
|
var import_assertThisInitialized4 = __toESM(require_assertThisInitialized());
|
|
9994
10086
|
var import_inherits4 = __toESM(require_inherits());
|
|
9995
10087
|
var import_defineProperty6 = __toESM(require_defineProperty());
|
|
9996
|
-
import * as
|
|
10088
|
+
import * as React39 from "react";
|
|
9997
10089
|
import { findDOMNode } from "react-dom";
|
|
9998
10090
|
|
|
9999
10091
|
// ../../node_modules/react-virtualized/dist/es/CellMeasurer/types.js
|
|
@@ -10115,7 +10207,7 @@ var CellMeasurer = (_temp4 = _class4 = /* @__PURE__ */ function(_React$PureCompo
|
|
|
10115
10207
|
}
|
|
10116
10208
|
}]);
|
|
10117
10209
|
return CellMeasurer2;
|
|
10118
|
-
}(
|
|
10210
|
+
}(React39.PureComponent), (0, import_defineProperty6.default)(_class4, "propTypes", process.env.NODE_ENV === "production" ? null : {
|
|
10119
10211
|
"cache": function cache() {
|
|
10120
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);
|
|
10121
10213
|
},
|
|
@@ -10148,7 +10240,7 @@ var import_assertThisInitialized6 = __toESM(require_assertThisInitialized());
|
|
|
10148
10240
|
var import_inherits6 = __toESM(require_inherits());
|
|
10149
10241
|
var import_defineProperty9 = __toESM(require_defineProperty());
|
|
10150
10242
|
var import_prop_types11 = __toESM(require_prop_types());
|
|
10151
|
-
import * as
|
|
10243
|
+
import * as React41 from "react";
|
|
10152
10244
|
|
|
10153
10245
|
// ../../node_modules/react-virtualized/dist/es/Collection/CollectionView.js
|
|
10154
10246
|
var import_classCallCheck8 = __toESM(require_classCallCheck());
|
|
@@ -10159,7 +10251,7 @@ var import_assertThisInitialized5 = __toESM(require_assertThisInitialized());
|
|
|
10159
10251
|
var import_inherits5 = __toESM(require_inherits());
|
|
10160
10252
|
var import_defineProperty8 = __toESM(require_defineProperty());
|
|
10161
10253
|
var import_prop_types9 = __toESM(require_prop_types());
|
|
10162
|
-
import * as
|
|
10254
|
+
import * as React40 from "react";
|
|
10163
10255
|
function ownKeys4(object, enumerableOnly) {
|
|
10164
10256
|
var keys = Object.keys(object);
|
|
10165
10257
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -10379,7 +10471,7 @@ var CollectionView = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
10379
10471
|
var horizontalScrollBarSize = totalWidth > width ? this._scrollbarSize : 0;
|
|
10380
10472
|
collectionStyle.overflowX = totalWidth + verticalScrollBarSize <= width ? "hidden" : "auto";
|
|
10381
10473
|
collectionStyle.overflowY = totalHeight + horizontalScrollBarSize <= height ? "hidden" : "auto";
|
|
10382
|
-
return
|
|
10474
|
+
return React40.createElement("div", {
|
|
10383
10475
|
ref: this._setScrollingContainerRef,
|
|
10384
10476
|
"aria-label": this.props["aria-label"],
|
|
10385
10477
|
className: clsx_m_default("ReactVirtualized__Collection", className),
|
|
@@ -10388,7 +10480,7 @@ var CollectionView = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
10388
10480
|
role: "grid",
|
|
10389
10481
|
style: _objectSpread4({}, collectionStyle, {}, style5),
|
|
10390
10482
|
tabIndex: 0
|
|
10391
|
-
}, cellCount > 0 &&
|
|
10483
|
+
}, cellCount > 0 && React40.createElement("div", {
|
|
10392
10484
|
className: "ReactVirtualized__Collection__innerScrollContainer",
|
|
10393
10485
|
style: {
|
|
10394
10486
|
height: totalHeight,
|
|
@@ -10483,7 +10575,7 @@ var CollectionView = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
10483
10575
|
}
|
|
10484
10576
|
}]);
|
|
10485
10577
|
return CollectionView2;
|
|
10486
|
-
}(
|
|
10578
|
+
}(React40.PureComponent);
|
|
10487
10579
|
(0, import_defineProperty8.default)(CollectionView, "defaultProps", {
|
|
10488
10580
|
"aria-label": "grid",
|
|
10489
10581
|
horizontalOverscanSize: 0,
|
|
@@ -10826,7 +10918,7 @@ var Collection = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
10826
10918
|
key: "render",
|
|
10827
10919
|
value: function render() {
|
|
10828
10920
|
var props = (0, import_extends2.default)({}, this.props);
|
|
10829
|
-
return
|
|
10921
|
+
return React41.createElement(CollectionView_default, (0, import_extends2.default)({
|
|
10830
10922
|
cellLayoutManager: this,
|
|
10831
10923
|
isScrollingChange: this._isScrollingChange,
|
|
10832
10924
|
ref: this._setCollectionViewRef
|
|
@@ -10934,7 +11026,7 @@ var Collection = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
10934
11026
|
}
|
|
10935
11027
|
}]);
|
|
10936
11028
|
return Collection2;
|
|
10937
|
-
}(
|
|
11029
|
+
}(React41.PureComponent);
|
|
10938
11030
|
(0, import_defineProperty9.default)(Collection, "defaultProps", {
|
|
10939
11031
|
"aria-label": "grid",
|
|
10940
11032
|
cellGroupRenderer: defaultCellGroupRenderer
|
|
@@ -11008,7 +11100,7 @@ var import_getPrototypeOf7 = __toESM(require_getPrototypeOf());
|
|
|
11008
11100
|
var import_assertThisInitialized7 = __toESM(require_assertThisInitialized());
|
|
11009
11101
|
var import_inherits7 = __toESM(require_inherits());
|
|
11010
11102
|
var import_prop_types12 = __toESM(require_prop_types());
|
|
11011
|
-
import * as
|
|
11103
|
+
import * as React42 from "react";
|
|
11012
11104
|
var ColumnSizer = /* @__PURE__ */ function(_React$PureComponent) {
|
|
11013
11105
|
(0, import_inherits7.default)(ColumnSizer2, _React$PureComponent);
|
|
11014
11106
|
function ColumnSizer2(props, context) {
|
|
@@ -11061,7 +11153,7 @@ var ColumnSizer = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
11061
11153
|
}
|
|
11062
11154
|
}]);
|
|
11063
11155
|
return ColumnSizer2;
|
|
11064
|
-
}(
|
|
11156
|
+
}(React42.PureComponent);
|
|
11065
11157
|
ColumnSizer.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
11066
11158
|
/**
|
|
11067
11159
|
* Function responsible for rendering a virtualized Grid.
|
|
@@ -11093,7 +11185,7 @@ var import_assertThisInitialized8 = __toESM(require_assertThisInitialized());
|
|
|
11093
11185
|
var import_inherits8 = __toESM(require_inherits());
|
|
11094
11186
|
var import_defineProperty10 = __toESM(require_defineProperty());
|
|
11095
11187
|
var import_prop_types13 = __toESM(require_prop_types());
|
|
11096
|
-
import * as
|
|
11188
|
+
import * as React43 from "react";
|
|
11097
11189
|
var InfiniteLoader = /* @__PURE__ */ function(_React$PureComponent) {
|
|
11098
11190
|
(0, import_inherits8.default)(InfiniteLoader2, _React$PureComponent);
|
|
11099
11191
|
function InfiniteLoader2(props, context) {
|
|
@@ -11185,7 +11277,7 @@ var InfiniteLoader = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
11185
11277
|
}
|
|
11186
11278
|
}]);
|
|
11187
11279
|
return InfiniteLoader2;
|
|
11188
|
-
}(
|
|
11280
|
+
}(React43.PureComponent);
|
|
11189
11281
|
(0, import_defineProperty10.default)(InfiniteLoader, "defaultProps", {
|
|
11190
11282
|
minimumBatchSize: 10,
|
|
11191
11283
|
rowCount: 0,
|
|
@@ -11306,11 +11398,11 @@ var import_getPrototypeOf9 = __toESM(require_getPrototypeOf());
|
|
|
11306
11398
|
var import_assertThisInitialized9 = __toESM(require_assertThisInitialized());
|
|
11307
11399
|
var import_inherits9 = __toESM(require_inherits());
|
|
11308
11400
|
var import_defineProperty11 = __toESM(require_defineProperty());
|
|
11309
|
-
import * as
|
|
11401
|
+
import * as React45 from "react";
|
|
11310
11402
|
|
|
11311
11403
|
// ../../node_modules/react-virtualized/dist/es/List/types.js
|
|
11312
11404
|
var import_prop_types14 = __toESM(require_prop_types());
|
|
11313
|
-
import * as
|
|
11405
|
+
import * as React44 from "react";
|
|
11314
11406
|
var bpfrpt_proptype_RowRendererParams = process.env.NODE_ENV === "production" ? null : {
|
|
11315
11407
|
"index": import_prop_types14.default.number.isRequired,
|
|
11316
11408
|
"isScrolling": import_prop_types14.default.bool.isRequired,
|
|
@@ -11481,7 +11573,7 @@ var List = (_temp5 = _class5 = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
11481
11573
|
value: function render() {
|
|
11482
11574
|
var _this$props = this.props, className = _this$props.className, noRowsRenderer4 = _this$props.noRowsRenderer, scrollToIndex = _this$props.scrollToIndex, width = _this$props.width;
|
|
11483
11575
|
var classNames = clsx_m_default("ReactVirtualized__List", className);
|
|
11484
|
-
return
|
|
11576
|
+
return React45.createElement(Grid_default, (0, import_extends3.default)({}, this.props, {
|
|
11485
11577
|
autoContainerWidth: true,
|
|
11486
11578
|
cellRenderer: this._cellRenderer,
|
|
11487
11579
|
className: classNames,
|
|
@@ -11496,7 +11588,7 @@ var List = (_temp5 = _class5 = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
11496
11588
|
}
|
|
11497
11589
|
}]);
|
|
11498
11590
|
return List2;
|
|
11499
|
-
}(
|
|
11591
|
+
}(React45.PureComponent), (0, import_defineProperty11.default)(_class5, "propTypes", process.env.NODE_ENV === "production" ? null : {
|
|
11500
11592
|
"aria-label": import_prop_types15.default.string,
|
|
11501
11593
|
/**
|
|
11502
11594
|
* Removes fixed height from the scrollingContainer so that the total height
|
|
@@ -11582,7 +11674,7 @@ var import_getPrototypeOf10 = __toESM(require_getPrototypeOf());
|
|
|
11582
11674
|
var import_assertThisInitialized10 = __toESM(require_assertThisInitialized());
|
|
11583
11675
|
var import_inherits10 = __toESM(require_inherits());
|
|
11584
11676
|
var import_defineProperty13 = __toESM(require_defineProperty());
|
|
11585
|
-
import * as
|
|
11677
|
+
import * as React46 from "react";
|
|
11586
11678
|
|
|
11587
11679
|
// ../../node_modules/react-virtualized/dist/es/Masonry/PositionCache.js
|
|
11588
11680
|
var import_slicedToArray = __toESM(require_slicedToArray());
|
|
@@ -12357,7 +12449,7 @@ var Masonry = (_temp6 = _class6 = /* @__PURE__ */ function(_React$PureComponent)
|
|
|
12357
12449
|
}
|
|
12358
12450
|
this._startIndex = startIndex;
|
|
12359
12451
|
this._stopIndex = stopIndex;
|
|
12360
|
-
return
|
|
12452
|
+
return React46.createElement("div", {
|
|
12361
12453
|
ref: this._setScrollingContainerRef,
|
|
12362
12454
|
"aria-label": this.props["aria-label"],
|
|
12363
12455
|
className: clsx_m_default("ReactVirtualized__Masonry", className),
|
|
@@ -12376,7 +12468,7 @@ var Masonry = (_temp6 = _class6 = /* @__PURE__ */ function(_React$PureComponent)
|
|
|
12376
12468
|
willChange: "transform"
|
|
12377
12469
|
}, style5),
|
|
12378
12470
|
tabIndex
|
|
12379
|
-
},
|
|
12471
|
+
}, React46.createElement("div", {
|
|
12380
12472
|
className: "ReactVirtualized__Masonry__innerScrollContainer",
|
|
12381
12473
|
style: {
|
|
12382
12474
|
width: "100%",
|
|
@@ -12466,7 +12558,7 @@ var Masonry = (_temp6 = _class6 = /* @__PURE__ */ function(_React$PureComponent)
|
|
|
12466
12558
|
}
|
|
12467
12559
|
}]);
|
|
12468
12560
|
return Masonry2;
|
|
12469
|
-
}(
|
|
12561
|
+
}(React46.PureComponent), (0, import_defineProperty13.default)(_class6, "propTypes", process.env.NODE_ENV === "production" ? null : {
|
|
12470
12562
|
"autoHeight": import_prop_types16.default.bool.isRequired,
|
|
12471
12563
|
"cellCount": import_prop_types16.default.number.isRequired,
|
|
12472
12564
|
"cellMeasurerCache": function cellMeasurerCache() {
|
|
@@ -12540,7 +12632,7 @@ var import_assertThisInitialized11 = __toESM(require_assertThisInitialized());
|
|
|
12540
12632
|
var import_inherits11 = __toESM(require_inherits());
|
|
12541
12633
|
var import_defineProperty15 = __toESM(require_defineProperty());
|
|
12542
12634
|
var import_prop_types17 = __toESM(require_prop_types());
|
|
12543
|
-
import * as
|
|
12635
|
+
import * as React47 from "react";
|
|
12544
12636
|
|
|
12545
12637
|
// ../../node_modules/react-virtualized/dist/es/MultiGrid/CellMeasurerCacheDecorator.js
|
|
12546
12638
|
var import_classCallCheck17 = __toESM(require_classCallCheck());
|
|
@@ -12683,7 +12775,7 @@ var MultiGrid = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
12683
12775
|
var rowIndex = _ref.rowIndex, rest = (0, import_objectWithoutProperties2.default)(_ref, ["rowIndex"]);
|
|
12684
12776
|
var _this$props = _this.props, cellRenderer3 = _this$props.cellRenderer, fixedRowCount = _this$props.fixedRowCount, rowCount = _this$props.rowCount;
|
|
12685
12777
|
if (rowIndex === rowCount - fixedRowCount) {
|
|
12686
|
-
return
|
|
12778
|
+
return React47.createElement("div", {
|
|
12687
12779
|
key: rest.key,
|
|
12688
12780
|
style: _objectSpread6({}, rest.style, {
|
|
12689
12781
|
height: SCROLLBAR_SIZE_BUFFER
|
|
@@ -12709,7 +12801,7 @@ var MultiGrid = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
12709
12801
|
var columnIndex = _ref3.columnIndex, rest = (0, import_objectWithoutProperties2.default)(_ref3, ["columnIndex"]);
|
|
12710
12802
|
var _this$props3 = _this.props, cellRenderer3 = _this$props3.cellRenderer, columnCount = _this$props3.columnCount, fixedColumnCount = _this$props3.fixedColumnCount;
|
|
12711
12803
|
if (columnIndex === columnCount - fixedColumnCount) {
|
|
12712
|
-
return
|
|
12804
|
+
return React47.createElement("div", {
|
|
12713
12805
|
key: rest.key,
|
|
12714
12806
|
style: _objectSpread6({}, rest.style, {
|
|
12715
12807
|
width: SCROLLBAR_SIZE_BUFFER
|
|
@@ -12898,14 +12990,14 @@ var MultiGrid = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
12898
12990
|
return null;
|
|
12899
12991
|
}
|
|
12900
12992
|
var _this$state4 = this.state, scrollLeft = _this$state4.scrollLeft, scrollTop = _this$state4.scrollTop;
|
|
12901
|
-
return
|
|
12993
|
+
return React47.createElement("div", {
|
|
12902
12994
|
style: this._containerOuterStyle
|
|
12903
|
-
},
|
|
12995
|
+
}, React47.createElement("div", {
|
|
12904
12996
|
style: this._containerTopStyle
|
|
12905
12997
|
}, this._renderTopLeftGrid(rest), this._renderTopRightGrid(_objectSpread6({}, rest, {
|
|
12906
12998
|
onScroll: onScroll7,
|
|
12907
12999
|
scrollLeft
|
|
12908
|
-
}))),
|
|
13000
|
+
}))), React47.createElement("div", {
|
|
12909
13001
|
style: this._containerBottomStyle
|
|
12910
13002
|
}, this._renderBottomLeftGrid(_objectSpread6({}, rest, {
|
|
12911
13003
|
onScroll: onScroll7,
|
|
@@ -13087,7 +13179,7 @@ var MultiGrid = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
13087
13179
|
return null;
|
|
13088
13180
|
}
|
|
13089
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;
|
|
13090
|
-
var bottomLeftGrid =
|
|
13182
|
+
var bottomLeftGrid = React47.createElement(Grid_default, (0, import_extends4.default)({}, props, {
|
|
13091
13183
|
cellRenderer: this._cellRendererBottomLeftGrid,
|
|
13092
13184
|
className: this.props.classNameBottomLeftGrid,
|
|
13093
13185
|
columnCount: fixedColumnCount,
|
|
@@ -13102,7 +13194,7 @@ var MultiGrid = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
13102
13194
|
width: gridWidth
|
|
13103
13195
|
}));
|
|
13104
13196
|
if (hideBottomLeftGridScrollbar) {
|
|
13105
|
-
return
|
|
13197
|
+
return React47.createElement("div", {
|
|
13106
13198
|
className: "BottomLeftGrid_ScrollWrapper",
|
|
13107
13199
|
style: _objectSpread6({}, this._bottomLeftGridStyle, {
|
|
13108
13200
|
height,
|
|
@@ -13117,7 +13209,7 @@ var MultiGrid = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
13117
13209
|
key: "_renderBottomRightGrid",
|
|
13118
13210
|
value: function _renderBottomRightGrid(props) {
|
|
13119
13211
|
var columnCount = props.columnCount, fixedColumnCount = props.fixedColumnCount, fixedRowCount = props.fixedRowCount, rowCount = props.rowCount, scrollToColumn = props.scrollToColumn, scrollToRow = props.scrollToRow;
|
|
13120
|
-
return
|
|
13212
|
+
return React47.createElement(Grid_default, (0, import_extends4.default)({}, props, {
|
|
13121
13213
|
cellRenderer: this._cellRendererBottomRightGrid,
|
|
13122
13214
|
className: this.props.classNameBottomRightGrid,
|
|
13123
13215
|
columnCount: Math.max(0, columnCount - fixedColumnCount),
|
|
@@ -13142,7 +13234,7 @@ var MultiGrid = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
13142
13234
|
if (!fixedColumnCount || !fixedRowCount) {
|
|
13143
13235
|
return null;
|
|
13144
13236
|
}
|
|
13145
|
-
return
|
|
13237
|
+
return React47.createElement(Grid_default, (0, import_extends4.default)({}, props, {
|
|
13146
13238
|
className: this.props.classNameTopLeftGrid,
|
|
13147
13239
|
columnCount: fixedColumnCount,
|
|
13148
13240
|
height: this._getTopGridHeight(props),
|
|
@@ -13169,7 +13261,7 @@ var MultiGrid = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
13169
13261
|
left: 0
|
|
13170
13262
|
});
|
|
13171
13263
|
}
|
|
13172
|
-
var topRightGrid =
|
|
13264
|
+
var topRightGrid = React47.createElement(Grid_default, (0, import_extends4.default)({}, props, {
|
|
13173
13265
|
cellRenderer: this._cellRendererTopRightGrid,
|
|
13174
13266
|
className: this.props.classNameTopRightGrid,
|
|
13175
13267
|
columnCount: Math.max(0, columnCount - fixedColumnCount) + additionalColumnCount,
|
|
@@ -13185,7 +13277,7 @@ var MultiGrid = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
13185
13277
|
width
|
|
13186
13278
|
}));
|
|
13187
13279
|
if (hideTopRightGridScrollbar) {
|
|
13188
|
-
return
|
|
13280
|
+
return React47.createElement("div", {
|
|
13189
13281
|
className: "TopRightGrid_ScrollWrapper",
|
|
13190
13282
|
style: _objectSpread6({}, this._topRightGridStyle, {
|
|
13191
13283
|
height,
|
|
@@ -13209,7 +13301,7 @@ var MultiGrid = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
13209
13301
|
}
|
|
13210
13302
|
}]);
|
|
13211
13303
|
return MultiGrid2;
|
|
13212
|
-
}(
|
|
13304
|
+
}(React47.PureComponent);
|
|
13213
13305
|
(0, import_defineProperty15.default)(MultiGrid, "defaultProps", {
|
|
13214
13306
|
classNameBottomLeftGrid: "",
|
|
13215
13307
|
classNameBottomRightGrid: "",
|
|
@@ -13257,7 +13349,7 @@ var import_getPrototypeOf12 = __toESM(require_getPrototypeOf());
|
|
|
13257
13349
|
var import_assertThisInitialized12 = __toESM(require_assertThisInitialized());
|
|
13258
13350
|
var import_inherits12 = __toESM(require_inherits());
|
|
13259
13351
|
var import_prop_types18 = __toESM(require_prop_types());
|
|
13260
|
-
import * as
|
|
13352
|
+
import * as React48 from "react";
|
|
13261
13353
|
var ScrollSync = /* @__PURE__ */ function(_React$PureComponent) {
|
|
13262
13354
|
(0, import_inherits12.default)(ScrollSync2, _React$PureComponent);
|
|
13263
13355
|
function ScrollSync2(props, context) {
|
|
@@ -13305,7 +13397,7 @@ var ScrollSync = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
13305
13397
|
}
|
|
13306
13398
|
}]);
|
|
13307
13399
|
return ScrollSync2;
|
|
13308
|
-
}(
|
|
13400
|
+
}(React48.PureComponent);
|
|
13309
13401
|
ScrollSync.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
13310
13402
|
/**
|
|
13311
13403
|
* Function responsible for rendering 2 or more virtualized components.
|
|
@@ -13405,11 +13497,11 @@ function defaultCellRenderer(_ref) {
|
|
|
13405
13497
|
}
|
|
13406
13498
|
|
|
13407
13499
|
// ../../node_modules/react-virtualized/dist/es/Table/defaultHeaderRowRenderer.js
|
|
13408
|
-
import * as
|
|
13500
|
+
import * as React49 from "react";
|
|
13409
13501
|
var import_prop_types20 = __toESM(require_prop_types());
|
|
13410
13502
|
function defaultHeaderRowRenderer(_ref) {
|
|
13411
13503
|
var className = _ref.className, columns = _ref.columns, style5 = _ref.style;
|
|
13412
|
-
return
|
|
13504
|
+
return React49.createElement("div", {
|
|
13413
13505
|
className,
|
|
13414
13506
|
role: "row",
|
|
13415
13507
|
style: style5
|
|
@@ -13418,11 +13510,11 @@ function defaultHeaderRowRenderer(_ref) {
|
|
|
13418
13510
|
defaultHeaderRowRenderer.propTypes = process.env.NODE_ENV === "production" ? null : bpfrpt_proptype_HeaderRowRendererParams === import_prop_types20.default.any ? {} : bpfrpt_proptype_HeaderRowRendererParams;
|
|
13419
13511
|
|
|
13420
13512
|
// ../../node_modules/react-virtualized/dist/es/Table/defaultHeaderRenderer.js
|
|
13421
|
-
import * as
|
|
13513
|
+
import * as React51 from "react";
|
|
13422
13514
|
|
|
13423
13515
|
// ../../node_modules/react-virtualized/dist/es/Table/SortIndicator.js
|
|
13424
13516
|
var import_prop_types21 = __toESM(require_prop_types());
|
|
13425
|
-
import * as
|
|
13517
|
+
import * as React50 from "react";
|
|
13426
13518
|
|
|
13427
13519
|
// ../../node_modules/react-virtualized/dist/es/Table/SortDirection.js
|
|
13428
13520
|
var SortDirection = {
|
|
@@ -13446,16 +13538,16 @@ function SortIndicator(_ref) {
|
|
|
13446
13538
|
"ReactVirtualized__Table__sortableHeaderIcon--ASC": sortDirection === SortDirection_default.ASC,
|
|
13447
13539
|
"ReactVirtualized__Table__sortableHeaderIcon--DESC": sortDirection === SortDirection_default.DESC
|
|
13448
13540
|
});
|
|
13449
|
-
return
|
|
13541
|
+
return React50.createElement("svg", {
|
|
13450
13542
|
className: classNames,
|
|
13451
13543
|
width: 18,
|
|
13452
13544
|
height: 18,
|
|
13453
13545
|
viewBox: "0 0 24 24"
|
|
13454
|
-
}, sortDirection === SortDirection_default.ASC ?
|
|
13546
|
+
}, sortDirection === SortDirection_default.ASC ? React50.createElement("path", {
|
|
13455
13547
|
d: "M7 14l5-5 5 5z"
|
|
13456
|
-
}) :
|
|
13548
|
+
}) : React50.createElement("path", {
|
|
13457
13549
|
d: "M7 10l5 5 5-5z"
|
|
13458
|
-
}),
|
|
13550
|
+
}), React50.createElement("path", {
|
|
13459
13551
|
d: "M0 0h24v24H0z",
|
|
13460
13552
|
fill: "none"
|
|
13461
13553
|
}));
|
|
@@ -13469,13 +13561,13 @@ var import_prop_types22 = __toESM(require_prop_types());
|
|
|
13469
13561
|
function defaultHeaderRenderer(_ref) {
|
|
13470
13562
|
var dataKey = _ref.dataKey, label = _ref.label, sortBy = _ref.sortBy, sortDirection = _ref.sortDirection;
|
|
13471
13563
|
var showSortIndicator = sortBy === dataKey;
|
|
13472
|
-
var children2 = [
|
|
13564
|
+
var children2 = [React51.createElement("span", {
|
|
13473
13565
|
className: "ReactVirtualized__Table__headerTruncatedText",
|
|
13474
13566
|
key: "label",
|
|
13475
13567
|
title: typeof label === "string" ? label : null
|
|
13476
13568
|
}, label)];
|
|
13477
13569
|
if (showSortIndicator) {
|
|
13478
|
-
children2.push(
|
|
13570
|
+
children2.push(React51.createElement(SortIndicator, {
|
|
13479
13571
|
key: "SortIndicator",
|
|
13480
13572
|
sortDirection
|
|
13481
13573
|
}));
|
|
@@ -13486,7 +13578,7 @@ defaultHeaderRenderer.propTypes = process.env.NODE_ENV === "production" ? null :
|
|
|
13486
13578
|
|
|
13487
13579
|
// ../../node_modules/react-virtualized/dist/es/Table/defaultRowRenderer.js
|
|
13488
13580
|
var import_extends5 = __toESM(require_extends());
|
|
13489
|
-
import * as
|
|
13581
|
+
import * as React52 from "react";
|
|
13490
13582
|
var import_prop_types23 = __toESM(require_prop_types());
|
|
13491
13583
|
function defaultRowRenderer(_ref) {
|
|
13492
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;
|
|
@@ -13542,7 +13634,7 @@ function defaultRowRenderer(_ref) {
|
|
|
13542
13634
|
};
|
|
13543
13635
|
}
|
|
13544
13636
|
}
|
|
13545
|
-
return
|
|
13637
|
+
return React52.createElement("div", (0, import_extends5.default)({}, a11yProps, {
|
|
13546
13638
|
className,
|
|
13547
13639
|
key,
|
|
13548
13640
|
role: "row",
|
|
@@ -13558,7 +13650,7 @@ var import_getPrototypeOf13 = __toESM(require_getPrototypeOf());
|
|
|
13558
13650
|
var import_inherits13 = __toESM(require_inherits());
|
|
13559
13651
|
var import_defineProperty16 = __toESM(require_defineProperty());
|
|
13560
13652
|
var import_prop_types24 = __toESM(require_prop_types());
|
|
13561
|
-
import * as
|
|
13653
|
+
import * as React53 from "react";
|
|
13562
13654
|
var Column = /* @__PURE__ */ function(_React$Component) {
|
|
13563
13655
|
(0, import_inherits13.default)(Column3, _React$Component);
|
|
13564
13656
|
function Column3() {
|
|
@@ -13566,7 +13658,7 @@ var Column = /* @__PURE__ */ function(_React$Component) {
|
|
|
13566
13658
|
return (0, import_possibleConstructorReturn13.default)(this, (0, import_getPrototypeOf13.default)(Column3).apply(this, arguments));
|
|
13567
13659
|
}
|
|
13568
13660
|
return Column3;
|
|
13569
|
-
}(
|
|
13661
|
+
}(React53.Component);
|
|
13570
13662
|
(0, import_defineProperty16.default)(Column, "defaultProps", {
|
|
13571
13663
|
cellDataGetter: defaultCellDataGetter,
|
|
13572
13664
|
cellRenderer: defaultCellRenderer,
|
|
@@ -13636,7 +13728,7 @@ var import_assertThisInitialized13 = __toESM(require_assertThisInitialized());
|
|
|
13636
13728
|
var import_inherits14 = __toESM(require_inherits());
|
|
13637
13729
|
var import_defineProperty17 = __toESM(require_defineProperty());
|
|
13638
13730
|
var import_prop_types25 = __toESM(require_prop_types());
|
|
13639
|
-
import * as
|
|
13731
|
+
import * as React54 from "react";
|
|
13640
13732
|
import { findDOMNode as findDOMNode2 } from "react-dom";
|
|
13641
13733
|
function ownKeys7(object, enumerableOnly) {
|
|
13642
13734
|
var keys = Object.keys(object);
|
|
@@ -13804,16 +13896,16 @@ var Table = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
13804
13896
|
index: -1
|
|
13805
13897
|
}) : rowStyle;
|
|
13806
13898
|
this._cachedColumnStyles = [];
|
|
13807
|
-
|
|
13899
|
+
React54.Children.toArray(children2).forEach(function(column, index) {
|
|
13808
13900
|
var flexStyles = _this2._getFlexStyleForColumn(column, column.props.style);
|
|
13809
13901
|
_this2._cachedColumnStyles[index] = _objectSpread7({
|
|
13810
13902
|
overflow: "hidden"
|
|
13811
13903
|
}, flexStyles);
|
|
13812
13904
|
});
|
|
13813
|
-
return
|
|
13905
|
+
return React54.createElement("div", {
|
|
13814
13906
|
"aria-label": this.props["aria-label"],
|
|
13815
13907
|
"aria-labelledby": this.props["aria-labelledby"],
|
|
13816
|
-
"aria-colcount":
|
|
13908
|
+
"aria-colcount": React54.Children.toArray(children2).length,
|
|
13817
13909
|
"aria-rowcount": this.props.rowCount,
|
|
13818
13910
|
className: clsx_m_default("ReactVirtualized__Table", className),
|
|
13819
13911
|
id,
|
|
@@ -13828,7 +13920,7 @@ var Table = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
13828
13920
|
paddingRight: scrollbarWidth,
|
|
13829
13921
|
width
|
|
13830
13922
|
}, rowStyleObject)
|
|
13831
|
-
}),
|
|
13923
|
+
}), React54.createElement(Grid_default, (0, import_extends6.default)({}, this.props, {
|
|
13832
13924
|
"aria-readonly": null,
|
|
13833
13925
|
autoContainerWidth: true,
|
|
13834
13926
|
className: clsx_m_default("ReactVirtualized__Table__Grid", gridClassName),
|
|
@@ -13879,7 +13971,7 @@ var Table = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
13879
13971
|
};
|
|
13880
13972
|
var style5 = this._cachedColumnStyles[columnIndex];
|
|
13881
13973
|
var title = typeof renderedCell === "string" ? renderedCell : null;
|
|
13882
|
-
return
|
|
13974
|
+
return React54.createElement("div", {
|
|
13883
13975
|
"aria-colindex": columnIndex + 1,
|
|
13884
13976
|
"aria-describedby": id,
|
|
13885
13977
|
className: clsx_m_default("ReactVirtualized__Table__rowColumn", className),
|
|
@@ -13940,7 +14032,7 @@ var Table = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
13940
14032
|
if (sortBy === dataKey) {
|
|
13941
14033
|
headerAriaSort = sortDirection === SortDirection_default.ASC ? "ascending" : "descending";
|
|
13942
14034
|
}
|
|
13943
|
-
return
|
|
14035
|
+
return React54.createElement("div", {
|
|
13944
14036
|
"aria-label": headerAriaLabel,
|
|
13945
14037
|
"aria-sort": headerAriaSort,
|
|
13946
14038
|
className: classNames,
|
|
@@ -13969,7 +14061,7 @@ var Table = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
13969
14061
|
var rowData4 = rowGetter({
|
|
13970
14062
|
index
|
|
13971
14063
|
});
|
|
13972
|
-
var columns =
|
|
14064
|
+
var columns = React54.Children.toArray(children2).map(function(column, columnIndex) {
|
|
13973
14065
|
return _this3._createColumn({
|
|
13974
14066
|
column,
|
|
13975
14067
|
columnIndex,
|
|
@@ -14027,7 +14119,7 @@ var Table = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
14027
14119
|
value: function _getHeaderColumns() {
|
|
14028
14120
|
var _this4 = this;
|
|
14029
14121
|
var _this$props4 = this.props, children2 = _this$props4.children, disableHeader = _this$props4.disableHeader;
|
|
14030
|
-
var items = disableHeader ? [] :
|
|
14122
|
+
var items = disableHeader ? [] : React54.Children.toArray(children2);
|
|
14031
14123
|
return items.map(function(column, index) {
|
|
14032
14124
|
return _this4._createHeader({
|
|
14033
14125
|
column,
|
|
@@ -14081,7 +14173,7 @@ var Table = /* @__PURE__ */ function(_React$PureComponent) {
|
|
|
14081
14173
|
}
|
|
14082
14174
|
}]);
|
|
14083
14175
|
return Table2;
|
|
14084
|
-
}(
|
|
14176
|
+
}(React54.PureComponent);
|
|
14085
14177
|
(0, import_defineProperty17.default)(Table, "defaultProps", {
|
|
14086
14178
|
disableHeader: false,
|
|
14087
14179
|
estimatedRowSize: 30,
|
|
@@ -14117,7 +14209,7 @@ Table.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
14117
14209
|
autoHeight: import_prop_types25.default.bool,
|
|
14118
14210
|
/** One or more Columns describing the data displayed in this row */
|
|
14119
14211
|
children: function children(props) {
|
|
14120
|
-
var children2 =
|
|
14212
|
+
var children2 = React54.Children.toArray(props.children);
|
|
14121
14213
|
for (var i = 0; i < children2.length; i++) {
|
|
14122
14214
|
var childType = children2[i].type;
|
|
14123
14215
|
if (childType !== Column && !(childType.prototype instanceof Column)) {
|
|
@@ -14284,7 +14376,7 @@ var import_getPrototypeOf15 = __toESM(require_getPrototypeOf());
|
|
|
14284
14376
|
var import_assertThisInitialized14 = __toESM(require_assertThisInitialized());
|
|
14285
14377
|
var import_inherits15 = __toESM(require_inherits());
|
|
14286
14378
|
var import_defineProperty18 = __toESM(require_defineProperty());
|
|
14287
|
-
import * as
|
|
14379
|
+
import * as React55 from "react";
|
|
14288
14380
|
import * as ReactDOM from "react-dom";
|
|
14289
14381
|
|
|
14290
14382
|
// ../../node_modules/react-virtualized/dist/es/WindowScroller/utils/onScroll.js
|
|
@@ -14604,7 +14696,7 @@ var WindowScroller = (_temp7 = _class7 = /* @__PURE__ */ function(_React$PureCom
|
|
|
14604
14696
|
}
|
|
14605
14697
|
}]);
|
|
14606
14698
|
return WindowScroller2;
|
|
14607
|
-
}(
|
|
14699
|
+
}(React55.PureComponent), (0, import_defineProperty18.default)(_class7, "propTypes", process.env.NODE_ENV === "production" ? null : {
|
|
14608
14700
|
/**
|
|
14609
14701
|
* Function responsible for rendering children.
|
|
14610
14702
|
* This function should implement the following signature:
|
|
@@ -14679,9 +14771,9 @@ import {
|
|
|
14679
14771
|
useSortable,
|
|
14680
14772
|
verticalListSortingStrategy
|
|
14681
14773
|
} from "@dnd-kit/sortable";
|
|
14682
|
-
import
|
|
14774
|
+
import React56, {
|
|
14683
14775
|
createContext as createContext8,
|
|
14684
|
-
memo as
|
|
14776
|
+
memo as memo21,
|
|
14685
14777
|
useCallback as useCallback19,
|
|
14686
14778
|
useContext as useContext8,
|
|
14687
14779
|
useEffect as useEffect13,
|
|
@@ -14819,7 +14911,7 @@ function SortableRoot({
|
|
|
14819
14911
|
useEffect13(() => {
|
|
14820
14912
|
setMounted(true);
|
|
14821
14913
|
}, []);
|
|
14822
|
-
return /* @__PURE__ */
|
|
14914
|
+
return /* @__PURE__ */ React56.createElement(
|
|
14823
14915
|
SortableItemContext.Provider,
|
|
14824
14916
|
{
|
|
14825
14917
|
value: useMemo17(
|
|
@@ -14833,7 +14925,7 @@ function SortableRoot({
|
|
|
14833
14925
|
[acceptsDrop, axis, keys, position, setActivatorEvent]
|
|
14834
14926
|
)
|
|
14835
14927
|
},
|
|
14836
|
-
/* @__PURE__ */
|
|
14928
|
+
/* @__PURE__ */ React56.createElement(
|
|
14837
14929
|
DndContext,
|
|
14838
14930
|
{
|
|
14839
14931
|
sensors,
|
|
@@ -14842,9 +14934,9 @@ function SortableRoot({
|
|
|
14842
14934
|
onDragMove: handleDragMove,
|
|
14843
14935
|
onDragEnd: handleDragEnd
|
|
14844
14936
|
},
|
|
14845
|
-
/* @__PURE__ */
|
|
14937
|
+
/* @__PURE__ */ React56.createElement(SortableContext, { items: keys, strategy: verticalListSortingStrategy }, children2),
|
|
14846
14938
|
mounted && renderOverlay && createPortal2(
|
|
14847
|
-
/* @__PURE__ */
|
|
14939
|
+
/* @__PURE__ */ React56.createElement(DragOverlay, { dropAnimation: null }, activeIndex !== void 0 && activeIndex >= 0 && renderOverlay(activeIndex)),
|
|
14848
14940
|
document.body
|
|
14849
14941
|
)
|
|
14850
14942
|
)
|
|
@@ -14852,8 +14944,8 @@ function SortableRoot({
|
|
|
14852
14944
|
}
|
|
14853
14945
|
var Sortable;
|
|
14854
14946
|
((Sortable2) => {
|
|
14855
|
-
Sortable2.Item =
|
|
14856
|
-
Sortable2.Root =
|
|
14947
|
+
Sortable2.Item = memo21(SortableItem);
|
|
14948
|
+
Sortable2.Root = memo21(SortableRoot);
|
|
14857
14949
|
})(Sortable || (Sortable = {}));
|
|
14858
14950
|
|
|
14859
14951
|
// src/components/ListView.tsx
|
|
@@ -14881,7 +14973,7 @@ var ListViewRowTitle = ({
|
|
|
14881
14973
|
className,
|
|
14882
14974
|
children: children2,
|
|
14883
14975
|
...props
|
|
14884
|
-
}) => /* @__PURE__ */
|
|
14976
|
+
}) => /* @__PURE__ */ React57.createElement(
|
|
14885
14977
|
"span",
|
|
14886
14978
|
{
|
|
14887
14979
|
className: `flex-1 overflow-hidden text-ellipsis whitespace-pre ${className ?? ""}`,
|
|
@@ -14889,8 +14981,8 @@ var ListViewRowTitle = ({
|
|
|
14889
14981
|
},
|
|
14890
14982
|
children2
|
|
14891
14983
|
);
|
|
14892
|
-
var ListViewEditableRowTitleElement =
|
|
14893
|
-
({ className, ...props }, forwardedRef) => /* @__PURE__ */
|
|
14984
|
+
var ListViewEditableRowTitleElement = forwardRef15(
|
|
14985
|
+
({ className, ...props }, forwardedRef) => /* @__PURE__ */ React57.createElement(
|
|
14894
14986
|
InputField.Input,
|
|
14895
14987
|
{
|
|
14896
14988
|
ref: forwardedRef,
|
|
@@ -14914,7 +15006,7 @@ function ListViewEditableRowTitle({
|
|
|
14914
15006
|
element.select();
|
|
14915
15007
|
}, 0);
|
|
14916
15008
|
}, [autoFocus]);
|
|
14917
|
-
return /* @__PURE__ */
|
|
15009
|
+
return /* @__PURE__ */ React57.createElement(
|
|
14918
15010
|
ListViewEditableRowTitleElement,
|
|
14919
15011
|
{
|
|
14920
15012
|
ref: inputRef,
|
|
@@ -14947,7 +15039,7 @@ var theme = {
|
|
|
14947
15039
|
dividerSubtle: "var(--divider-subtle)"
|
|
14948
15040
|
}
|
|
14949
15041
|
};
|
|
14950
|
-
var RowContainer =
|
|
15042
|
+
var RowContainer = forwardRef15(
|
|
14951
15043
|
({
|
|
14952
15044
|
className,
|
|
14953
15045
|
$marginType,
|
|
@@ -14967,7 +15059,7 @@ var RowContainer = forwardRef14(
|
|
|
14967
15059
|
...props
|
|
14968
15060
|
}, ref) => {
|
|
14969
15061
|
const margin = getPositionMargin($marginType);
|
|
14970
|
-
return /* @__PURE__ */
|
|
15062
|
+
return /* @__PURE__ */ React57.createElement(
|
|
14971
15063
|
"div",
|
|
14972
15064
|
{
|
|
14973
15065
|
ref,
|
|
@@ -15043,7 +15135,7 @@ var RowContainer = forwardRef14(
|
|
|
15043
15135
|
);
|
|
15044
15136
|
}
|
|
15045
15137
|
);
|
|
15046
|
-
var ListViewDragIndicatorElement =
|
|
15138
|
+
var ListViewDragIndicatorElement = forwardRef15(
|
|
15047
15139
|
({
|
|
15048
15140
|
className,
|
|
15049
15141
|
$relativeDropPosition,
|
|
@@ -15053,7 +15145,7 @@ var ListViewDragIndicatorElement = forwardRef14(
|
|
|
15053
15145
|
style: style5,
|
|
15054
15146
|
...props
|
|
15055
15147
|
}, ref) => {
|
|
15056
|
-
return /* @__PURE__ */
|
|
15148
|
+
return /* @__PURE__ */ React57.createElement(
|
|
15057
15149
|
"div",
|
|
15058
15150
|
{
|
|
15059
15151
|
ref,
|
|
@@ -15082,7 +15174,7 @@ var ListViewDragIndicatorElement = forwardRef14(
|
|
|
15082
15174
|
);
|
|
15083
15175
|
}
|
|
15084
15176
|
);
|
|
15085
|
-
var ListViewRow =
|
|
15177
|
+
var ListViewRow = forwardRef15(function ListViewRow2({
|
|
15086
15178
|
id,
|
|
15087
15179
|
tabIndex = 0,
|
|
15088
15180
|
gap,
|
|
@@ -15150,7 +15242,7 @@ var ListViewRow = forwardRef14(function ListViewRow2({
|
|
|
15150
15242
|
...renderProps
|
|
15151
15243
|
}, ref) => {
|
|
15152
15244
|
const Component3 = RowContainer;
|
|
15153
|
-
const element = /* @__PURE__ */
|
|
15245
|
+
const element = /* @__PURE__ */ React57.createElement(
|
|
15154
15246
|
Component3,
|
|
15155
15247
|
{
|
|
15156
15248
|
ref,
|
|
@@ -15182,7 +15274,7 @@ var ListViewRow = forwardRef14(function ListViewRow2({
|
|
|
15182
15274
|
tabIndex,
|
|
15183
15275
|
className
|
|
15184
15276
|
},
|
|
15185
|
-
relativeDropPosition && /* @__PURE__ */
|
|
15277
|
+
relativeDropPosition && /* @__PURE__ */ React57.createElement(
|
|
15186
15278
|
ListViewDragIndicatorElement,
|
|
15187
15279
|
{
|
|
15188
15280
|
$colorScheme: colorScheme,
|
|
@@ -15196,11 +15288,11 @@ var ListViewRow = forwardRef14(function ListViewRow2({
|
|
|
15196
15288
|
}) : dragIndicatorStyle
|
|
15197
15289
|
}
|
|
15198
15290
|
),
|
|
15199
|
-
depth > 0 && /* @__PURE__ */
|
|
15291
|
+
depth > 0 && /* @__PURE__ */ React57.createElement(Spacer.Horizontal, { size: depth * indentation }),
|
|
15200
15292
|
children2
|
|
15201
15293
|
);
|
|
15202
15294
|
if (menuItems && onSelectMenuItem) {
|
|
15203
|
-
return /* @__PURE__ */
|
|
15295
|
+
return /* @__PURE__ */ React57.createElement(
|
|
15204
15296
|
ContextMenu,
|
|
15205
15297
|
{
|
|
15206
15298
|
items: menuItems,
|
|
@@ -15213,7 +15305,7 @@ var ListViewRow = forwardRef14(function ListViewRow2({
|
|
|
15213
15305
|
return element;
|
|
15214
15306
|
};
|
|
15215
15307
|
if (sortable && id) {
|
|
15216
|
-
return /* @__PURE__ */
|
|
15308
|
+
return /* @__PURE__ */ React57.createElement(Sortable.Item, { id, disabled: overrideSortable === false }, ({ ref: sortableRef, ...sortableProps }) => renderContent(
|
|
15217
15309
|
sortableProps,
|
|
15218
15310
|
composeRefs2(sortableRef, forwardedRef)
|
|
15219
15311
|
));
|
|
@@ -15224,14 +15316,14 @@ var RenderItemContext = createContext9(
|
|
|
15224
15316
|
() => null
|
|
15225
15317
|
);
|
|
15226
15318
|
RenderItemContext.displayName = "RenderItemContext";
|
|
15227
|
-
var VirtualizedListRow =
|
|
15319
|
+
var VirtualizedListRow = memo22(function VirtualizedListRow2({
|
|
15228
15320
|
index,
|
|
15229
15321
|
style: style5
|
|
15230
15322
|
}) {
|
|
15231
15323
|
const renderItem = useContext9(RenderItemContext);
|
|
15232
|
-
return /* @__PURE__ */
|
|
15324
|
+
return /* @__PURE__ */ React57.createElement("div", { key: index, style: style5 }, renderItem(index));
|
|
15233
15325
|
});
|
|
15234
|
-
var VirtualizedListInner =
|
|
15326
|
+
var VirtualizedListInner = forwardRef15(function VirtualizedListInner2({
|
|
15235
15327
|
size: size3,
|
|
15236
15328
|
scrollElement,
|
|
15237
15329
|
items,
|
|
@@ -15260,7 +15352,7 @@ var VirtualizedListInner = forwardRef14(function VirtualizedListInner2({
|
|
|
15260
15352
|
}),
|
|
15261
15353
|
[]
|
|
15262
15354
|
);
|
|
15263
|
-
return /* @__PURE__ */
|
|
15355
|
+
return /* @__PURE__ */ React57.createElement(RenderItemContext.Provider, { value: renderItem }, /* @__PURE__ */ React57.createElement(
|
|
15264
15356
|
WindowScroller,
|
|
15265
15357
|
{
|
|
15266
15358
|
scrollElement,
|
|
@@ -15271,7 +15363,7 @@ var VirtualizedListInner = forwardRef14(function VirtualizedListInner2({
|
|
|
15271
15363
|
registerChild,
|
|
15272
15364
|
onChildScroll,
|
|
15273
15365
|
scrollTop
|
|
15274
|
-
}) => /* @__PURE__ */
|
|
15366
|
+
}) => /* @__PURE__ */ React57.createElement("div", { ref: registerChild }, /* @__PURE__ */ React57.createElement(
|
|
15275
15367
|
VariableSizeList,
|
|
15276
15368
|
{
|
|
15277
15369
|
ref: listRef,
|
|
@@ -15301,10 +15393,10 @@ var VirtualizedListInner = forwardRef14(function VirtualizedListInner2({
|
|
|
15301
15393
|
)
|
|
15302
15394
|
));
|
|
15303
15395
|
});
|
|
15304
|
-
var VirtualizedList =
|
|
15396
|
+
var VirtualizedList = memo22(
|
|
15305
15397
|
VirtualizedListInner
|
|
15306
15398
|
);
|
|
15307
|
-
var ListViewRootInner =
|
|
15399
|
+
var ListViewRootInner = forwardRef15(function ListViewRootInner2({
|
|
15308
15400
|
id,
|
|
15309
15401
|
className,
|
|
15310
15402
|
style: style5,
|
|
@@ -15423,7 +15515,7 @@ var ListViewRootInner = forwardRef14(function ListViewRootInner2({
|
|
|
15423
15515
|
[indentation]
|
|
15424
15516
|
);
|
|
15425
15517
|
const renderOverlay = useCallback20(
|
|
15426
|
-
(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 }))),
|
|
15427
15519
|
[draggingContextOverlayValue, renderItem, data]
|
|
15428
15520
|
);
|
|
15429
15521
|
const renderWrappedChild = useCallback20(
|
|
@@ -15431,12 +15523,12 @@ var ListViewRootInner = forwardRef14(function ListViewRootInner2({
|
|
|
15431
15523
|
const contextValue = getItemContextValue(index);
|
|
15432
15524
|
const current = renderChild(index);
|
|
15433
15525
|
if (!contextValue || !isValidElement3(current)) return null;
|
|
15434
|
-
return /* @__PURE__ */
|
|
15526
|
+
return /* @__PURE__ */ React57.createElement(ListRowContext.Provider, { key: current.key, value: contextValue }, current);
|
|
15435
15527
|
},
|
|
15436
15528
|
[getItemContextValue, renderChild]
|
|
15437
15529
|
);
|
|
15438
15530
|
const ids = useMemo18(() => data.map(keyExtractor), [keyExtractor, data]);
|
|
15439
|
-
const withSortable = (children2) => sortable ? /* @__PURE__ */
|
|
15531
|
+
const withSortable = (children2) => sortable ? /* @__PURE__ */ React57.createElement(
|
|
15440
15532
|
Sortable.Root,
|
|
15441
15533
|
{
|
|
15442
15534
|
onMoveItem,
|
|
@@ -15446,7 +15538,7 @@ var ListViewRootInner = forwardRef14(function ListViewRootInner2({
|
|
|
15446
15538
|
},
|
|
15447
15539
|
children2
|
|
15448
15540
|
) : children2;
|
|
15449
|
-
const withScrollable = (children2) => scrollable ? /* @__PURE__ */
|
|
15541
|
+
const withScrollable = (children2) => scrollable ? /* @__PURE__ */ React57.createElement(ScrollArea, null, children2) : children2(null);
|
|
15450
15542
|
const getItemHeight = useCallback20(
|
|
15451
15543
|
(index) => {
|
|
15452
15544
|
const child = getItemContextValue(index);
|
|
@@ -15462,7 +15554,7 @@ var ListViewRootInner = forwardRef14(function ListViewRootInner2({
|
|
|
15462
15554
|
);
|
|
15463
15555
|
const draggingContextValue = useMemo18(() => ({ indentation }), [indentation]);
|
|
15464
15556
|
const gapStyle = useMemo18(() => ({ gap: `${gap}px` }), [gap]);
|
|
15465
|
-
return /* @__PURE__ */
|
|
15557
|
+
return /* @__PURE__ */ React57.createElement(ListViewDraggingContext.Provider, { value: draggingContextValue }, /* @__PURE__ */ React57.createElement(
|
|
15466
15558
|
"div",
|
|
15467
15559
|
{
|
|
15468
15560
|
id,
|
|
@@ -15474,7 +15566,7 @@ var ListViewRootInner = forwardRef14(function ListViewRootInner2({
|
|
|
15474
15566
|
},
|
|
15475
15567
|
withScrollable(
|
|
15476
15568
|
(scrollElementRef) => withSortable(
|
|
15477
|
-
virtualized ? /* @__PURE__ */
|
|
15569
|
+
virtualized ? /* @__PURE__ */ React57.createElement(
|
|
15478
15570
|
VirtualizedList,
|
|
15479
15571
|
{
|
|
15480
15572
|
ref: forwardedRef,
|
|
@@ -15490,15 +15582,15 @@ var ListViewRootInner = forwardRef14(function ListViewRootInner2({
|
|
|
15490
15582
|
)
|
|
15491
15583
|
));
|
|
15492
15584
|
});
|
|
15493
|
-
var ListViewRoot =
|
|
15494
|
-
var ChildrenListViewInner =
|
|
15585
|
+
var ListViewRoot = memo22(ListViewRootInner);
|
|
15586
|
+
var ChildrenListViewInner = forwardRef15(function ChildrenListViewInner2({ children: children2, ...rest }, forwardedRef) {
|
|
15495
15587
|
const items = useMemo18(
|
|
15496
15588
|
() => Children4.toArray(children2).flatMap(
|
|
15497
15589
|
(child) => isValidElement3(child) ? [child] : []
|
|
15498
15590
|
),
|
|
15499
15591
|
[children2]
|
|
15500
15592
|
);
|
|
15501
|
-
return /* @__PURE__ */
|
|
15593
|
+
return /* @__PURE__ */ React57.createElement(
|
|
15502
15594
|
ListViewRoot,
|
|
15503
15595
|
{
|
|
15504
15596
|
ref: forwardedRef,
|
|
@@ -15512,20 +15604,20 @@ var ChildrenListViewInner = forwardRef14(function ChildrenListViewInner2({ child
|
|
|
15512
15604
|
}
|
|
15513
15605
|
);
|
|
15514
15606
|
});
|
|
15515
|
-
var ChildrenListView =
|
|
15516
|
-
var SimpleListViewInner =
|
|
15607
|
+
var ChildrenListView = memo22(ChildrenListViewInner);
|
|
15608
|
+
var SimpleListViewInner = forwardRef15(function SimpleListViewInner2(props, forwardedRef) {
|
|
15517
15609
|
if ("children" in props) {
|
|
15518
|
-
return /* @__PURE__ */
|
|
15610
|
+
return /* @__PURE__ */ React57.createElement(ChildrenListView, { ref: forwardedRef, ...props });
|
|
15519
15611
|
} else {
|
|
15520
|
-
return /* @__PURE__ */
|
|
15612
|
+
return /* @__PURE__ */ React57.createElement(ListViewRoot, { ref: forwardedRef, ...props });
|
|
15521
15613
|
}
|
|
15522
15614
|
});
|
|
15523
|
-
var SimpleListView =
|
|
15615
|
+
var SimpleListView = memo22(SimpleListViewInner);
|
|
15524
15616
|
var ListView;
|
|
15525
15617
|
((ListView2) => {
|
|
15526
|
-
ListView2.RowTitle =
|
|
15527
|
-
ListView2.EditableRowTitle =
|
|
15528
|
-
ListView2.Row =
|
|
15618
|
+
ListView2.RowTitle = memo22(ListViewRowTitle);
|
|
15619
|
+
ListView2.EditableRowTitle = memo22(ListViewEditableRowTitle);
|
|
15620
|
+
ListView2.Row = memo22(ListViewRow);
|
|
15529
15621
|
ListView2.Root = SimpleListView;
|
|
15530
15622
|
ListView2.RowContext = ListRowContext;
|
|
15531
15623
|
ListView2.DragIndicator = ListViewDragIndicatorElement;
|
|
@@ -15562,15 +15654,15 @@ function filterWithGroupedSections(items, query) {
|
|
|
15562
15654
|
return [...headers, ...newItems];
|
|
15563
15655
|
});
|
|
15564
15656
|
}
|
|
15565
|
-
var CompletionMenu =
|
|
15566
|
-
|
|
15657
|
+
var CompletionMenu = memo23(
|
|
15658
|
+
forwardRef16(function CompletionMenu2({
|
|
15567
15659
|
items,
|
|
15568
15660
|
selectedIndex,
|
|
15569
15661
|
onSelectItem,
|
|
15570
15662
|
onHoverIndex,
|
|
15571
15663
|
listSize
|
|
15572
15664
|
}, forwardedRef) {
|
|
15573
|
-
return /* @__PURE__ */
|
|
15665
|
+
return /* @__PURE__ */ React58.createElement(
|
|
15574
15666
|
ListView.Root,
|
|
15575
15667
|
{
|
|
15576
15668
|
ref: forwardedRef,
|
|
@@ -15582,13 +15674,13 @@ var CompletionMenu = memo22(
|
|
|
15582
15674
|
sectionHeaderVariant: "label",
|
|
15583
15675
|
renderItem: (item, i) => {
|
|
15584
15676
|
if (item.type === "sectionHeader") {
|
|
15585
|
-
return /* @__PURE__ */
|
|
15677
|
+
return /* @__PURE__ */ React58.createElement(ListView.Row, { key: item.id, isSectionHeader: true }, item.name);
|
|
15586
15678
|
}
|
|
15587
15679
|
const tokens = fuzzyTokenize({
|
|
15588
15680
|
item: item.name,
|
|
15589
15681
|
itemScore: item
|
|
15590
15682
|
});
|
|
15591
|
-
return /* @__PURE__ */
|
|
15683
|
+
return /* @__PURE__ */ React58.createElement(
|
|
15592
15684
|
ListView.Row,
|
|
15593
15685
|
{
|
|
15594
15686
|
key: item.id,
|
|
@@ -15600,7 +15692,7 @@ var CompletionMenu = memo22(
|
|
|
15600
15692
|
}
|
|
15601
15693
|
}
|
|
15602
15694
|
},
|
|
15603
|
-
tokens.map((token, j) => /* @__PURE__ */
|
|
15695
|
+
tokens.map((token, j) => /* @__PURE__ */ React58.createElement(
|
|
15604
15696
|
"span",
|
|
15605
15697
|
{
|
|
15606
15698
|
key: j,
|
|
@@ -15608,15 +15700,15 @@ var CompletionMenu = memo22(
|
|
|
15608
15700
|
},
|
|
15609
15701
|
token.text
|
|
15610
15702
|
)),
|
|
15611
|
-
item.icon && /* @__PURE__ */
|
|
15703
|
+
item.icon && /* @__PURE__ */ React58.createElement(React58.Fragment, null, /* @__PURE__ */ React58.createElement(Spacer.Horizontal, null), item.icon)
|
|
15612
15704
|
);
|
|
15613
15705
|
}
|
|
15614
15706
|
}
|
|
15615
15707
|
);
|
|
15616
15708
|
})
|
|
15617
15709
|
);
|
|
15618
|
-
var InputFieldWithCompletions =
|
|
15619
|
-
|
|
15710
|
+
var InputFieldWithCompletions = memo23(
|
|
15711
|
+
forwardRef16(function InputFieldWithCompletions2({
|
|
15620
15712
|
loading,
|
|
15621
15713
|
initialValue = "",
|
|
15622
15714
|
placeholder,
|
|
@@ -15676,7 +15768,7 @@ var InputFieldWithCompletions = memo22(
|
|
|
15676
15768
|
updateState({ filter: initialValue });
|
|
15677
15769
|
}, [initialValue, updateState]);
|
|
15678
15770
|
const { filter, selectedIndex } = state;
|
|
15679
|
-
const listRef =
|
|
15771
|
+
const listRef = React58.useRef(null);
|
|
15680
15772
|
const filteredItems = useMemo19(
|
|
15681
15773
|
() => filterWithGroupedSections(items, filter),
|
|
15682
15774
|
[items, filter]
|
|
@@ -15811,13 +15903,13 @@ var InputFieldWithCompletions = memo22(
|
|
|
15811
15903
|
ref.current?.setSelectionRange(0, ref.current.value.length);
|
|
15812
15904
|
}
|
|
15813
15905
|
}));
|
|
15814
|
-
return /* @__PURE__ */
|
|
15906
|
+
return /* @__PURE__ */ React58.createElement(
|
|
15815
15907
|
InputField.Root,
|
|
15816
15908
|
{
|
|
15817
15909
|
size: size3,
|
|
15818
15910
|
renderPopoverContent: ({ width }) => {
|
|
15819
15911
|
const listSize = { width, height };
|
|
15820
|
-
return /* @__PURE__ */
|
|
15912
|
+
return /* @__PURE__ */ React58.createElement(
|
|
15821
15913
|
"div",
|
|
15822
15914
|
{
|
|
15823
15915
|
className: `flex flex-col ${!filter && hideMenuWhenEmptyValue ? "none" : "flex"}`,
|
|
@@ -15825,7 +15917,7 @@ var InputFieldWithCompletions = memo22(
|
|
|
15825
15917
|
flex: `0 0 ${height}px`
|
|
15826
15918
|
}
|
|
15827
15919
|
},
|
|
15828
|
-
filteredItems.length > 0 ? /* @__PURE__ */
|
|
15920
|
+
filteredItems.length > 0 ? /* @__PURE__ */ React58.createElement(
|
|
15829
15921
|
CompletionMenu,
|
|
15830
15922
|
{
|
|
15831
15923
|
ref: listRef,
|
|
@@ -15835,11 +15927,11 @@ var InputFieldWithCompletions = memo22(
|
|
|
15835
15927
|
onHoverIndex: handleIndexChange,
|
|
15836
15928
|
listSize
|
|
15837
15929
|
}
|
|
15838
|
-
) : /* @__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"))
|
|
15839
15931
|
);
|
|
15840
15932
|
}
|
|
15841
15933
|
},
|
|
15842
|
-
/* @__PURE__ */
|
|
15934
|
+
/* @__PURE__ */ React58.createElement(
|
|
15843
15935
|
InputField.Input,
|
|
15844
15936
|
{
|
|
15845
15937
|
ref,
|
|
@@ -15863,9 +15955,9 @@ var InputFieldWithCompletions = memo22(
|
|
|
15863
15955
|
"aria-controls": "component-listbox"
|
|
15864
15956
|
}
|
|
15865
15957
|
),
|
|
15866
|
-
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 }),
|
|
15867
15959
|
(!isFocused || !hideChildrenWhenFocused) && children2,
|
|
15868
|
-
loading && isFocused && /* @__PURE__ */
|
|
15960
|
+
loading && isFocused && /* @__PURE__ */ React58.createElement(InputField.Label, null, /* @__PURE__ */ React58.createElement(ActivityIndicator, null))
|
|
15869
15961
|
);
|
|
15870
15962
|
})
|
|
15871
15963
|
);
|
|
@@ -15885,9 +15977,9 @@ function getNextIndex(items, currentIndex, direction, isDisabled) {
|
|
|
15885
15977
|
}
|
|
15886
15978
|
|
|
15887
15979
|
// src/components/InspectorContainer.tsx
|
|
15888
|
-
import
|
|
15889
|
-
var InspectorContainer =
|
|
15890
|
-
|
|
15980
|
+
import React59, { forwardRef as forwardRef17, memo as memo24 } from "react";
|
|
15981
|
+
var InspectorContainer = memo24(
|
|
15982
|
+
forwardRef17(function InspectorContainer2({
|
|
15891
15983
|
header,
|
|
15892
15984
|
children: children2,
|
|
15893
15985
|
fallback,
|
|
@@ -15896,7 +15988,7 @@ var InspectorContainer = memo23(
|
|
|
15896
15988
|
className,
|
|
15897
15989
|
style: style5
|
|
15898
15990
|
}, forwardedRef) {
|
|
15899
|
-
return /* @__PURE__ */
|
|
15991
|
+
return /* @__PURE__ */ React59.createElement(
|
|
15900
15992
|
"div",
|
|
15901
15993
|
{
|
|
15902
15994
|
ref: forwardedRef,
|
|
@@ -15911,39 +16003,44 @@ var InspectorContainer = memo23(
|
|
|
15911
16003
|
}
|
|
15912
16004
|
},
|
|
15913
16005
|
header,
|
|
15914
|
-
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
|
|
15915
16007
|
);
|
|
15916
16008
|
})
|
|
15917
16009
|
);
|
|
15918
16010
|
|
|
15919
16011
|
// src/components/Label.tsx
|
|
15920
|
-
import
|
|
15921
|
-
|
|
15922
|
-
|
|
15923
|
-
|
|
15924
|
-
|
|
15925
|
-
|
|
15926
|
-
|
|
15927
|
-
|
|
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
|
+
);
|
|
15928
16025
|
|
|
15929
16026
|
// src/components/LabeledElementView.tsx
|
|
15930
16027
|
import * as kiwi from "kiwi.js";
|
|
15931
|
-
import
|
|
16028
|
+
import React61, {
|
|
15932
16029
|
Children as Children5,
|
|
15933
16030
|
createRef,
|
|
15934
|
-
Fragment,
|
|
16031
|
+
Fragment as Fragment2,
|
|
15935
16032
|
isValidElement as isValidElement4,
|
|
15936
|
-
memo as
|
|
16033
|
+
memo as memo26,
|
|
15937
16034
|
useLayoutEffect as useLayoutEffect8,
|
|
15938
16035
|
useMemo as useMemo20,
|
|
15939
16036
|
useRef as useRef18
|
|
15940
16037
|
} from "react";
|
|
15941
|
-
var LabeledElementView =
|
|
16038
|
+
var LabeledElementView = memo26(function LabeledElementView2({
|
|
15942
16039
|
children: children2,
|
|
15943
16040
|
renderLabel
|
|
15944
16041
|
}) {
|
|
15945
16042
|
const elementIds = Children5.toArray(children2).flatMap(
|
|
15946
|
-
(child) => isValidElement4(child) && child.type ===
|
|
16043
|
+
(child) => isValidElement4(child) && child.type === Fragment2 ? child.props.children : [child]
|
|
15947
16044
|
).map(
|
|
15948
16045
|
(child) => isValidElement4(child) && "id" in child.props ? child.props.id : null
|
|
15949
16046
|
).filter((id) => !!id);
|
|
@@ -15955,7 +16052,7 @@ var LabeledElementView = memo25(function LabeledElementView2({
|
|
|
15955
16052
|
);
|
|
15956
16053
|
}, [serializedIds]);
|
|
15957
16054
|
const labelElements = useMemo20(() => {
|
|
15958
|
-
return serializedIds.split(",").map((id, index) => /* @__PURE__ */
|
|
16055
|
+
return serializedIds.split(",").map((id, index) => /* @__PURE__ */ React61.createElement(
|
|
15959
16056
|
"span",
|
|
15960
16057
|
{
|
|
15961
16058
|
key: id,
|
|
@@ -16030,13 +16127,13 @@ var LabeledElementView = memo25(function LabeledElementView2({
|
|
|
16030
16127
|
`${Math.max(...heights)}px`
|
|
16031
16128
|
);
|
|
16032
16129
|
}, [refs, labelElements]);
|
|
16033
|
-
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));
|
|
16034
16131
|
});
|
|
16035
16132
|
|
|
16036
16133
|
// src/components/Progress.tsx
|
|
16037
16134
|
import { clamp } from "@noya-app/noya-utils";
|
|
16038
16135
|
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
16039
|
-
import
|
|
16136
|
+
import React62, { useMemo as useMemo21 } from "react";
|
|
16040
16137
|
function Progress({
|
|
16041
16138
|
value,
|
|
16042
16139
|
variant = "normal",
|
|
@@ -16046,14 +16143,14 @@ function Progress({
|
|
|
16046
16143
|
const transformStyles = useMemo21(() => ({
|
|
16047
16144
|
transform: `translateX(-${100 - clampedValue}%)`
|
|
16048
16145
|
}), [clampedValue]);
|
|
16049
|
-
return /* @__PURE__ */
|
|
16146
|
+
return /* @__PURE__ */ React62.createElement(
|
|
16050
16147
|
ProgressPrimitive.Root,
|
|
16051
16148
|
{
|
|
16052
16149
|
className: `relative hidden bg-input-background h-[5px] ${className ?? ""}`,
|
|
16053
16150
|
style: { transform: "translateZ(0)" },
|
|
16054
16151
|
value: clampedValue
|
|
16055
16152
|
},
|
|
16056
|
-
/* @__PURE__ */
|
|
16153
|
+
/* @__PURE__ */ React62.createElement(
|
|
16057
16154
|
ProgressPrimitive.Indicator,
|
|
16058
16155
|
{
|
|
16059
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"),
|
|
@@ -16065,17 +16162,17 @@ function Progress({
|
|
|
16065
16162
|
|
|
16066
16163
|
// src/components/RadioGroup.tsx
|
|
16067
16164
|
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
16068
|
-
import
|
|
16165
|
+
import React63, {
|
|
16069
16166
|
createContext as createContext10,
|
|
16070
|
-
forwardRef as
|
|
16071
|
-
memo as
|
|
16167
|
+
forwardRef as forwardRef19,
|
|
16168
|
+
memo as memo27,
|
|
16072
16169
|
useCallback as useCallback22,
|
|
16073
16170
|
useContext as useContext10,
|
|
16074
16171
|
useMemo as useMemo22
|
|
16075
16172
|
} from "react";
|
|
16076
|
-
var ToggleGroupItem =
|
|
16173
|
+
var ToggleGroupItem = forwardRef19(function ToggleGroupItem2({ value, tooltip, children: children2, disabled = false }, forwardedRef) {
|
|
16077
16174
|
const { colorScheme } = useContext10(RadioGroupContext);
|
|
16078
|
-
const itemElement = /* @__PURE__ */
|
|
16175
|
+
const itemElement = /* @__PURE__ */ React63.createElement(
|
|
16079
16176
|
ToggleGroupPrimitive.Item,
|
|
16080
16177
|
{
|
|
16081
16178
|
ref: forwardedRef,
|
|
@@ -16085,7 +16182,7 @@ var ToggleGroupItem = forwardRef17(function ToggleGroupItem2({ value, tooltip, c
|
|
|
16085
16182
|
},
|
|
16086
16183
|
children2
|
|
16087
16184
|
);
|
|
16088
|
-
return tooltip ? /* @__PURE__ */
|
|
16185
|
+
return tooltip ? /* @__PURE__ */ React63.createElement(Tooltip, { content: tooltip }, itemElement) : itemElement;
|
|
16089
16186
|
});
|
|
16090
16187
|
var RadioGroupContext = createContext10({
|
|
16091
16188
|
colorScheme: "primary"
|
|
@@ -16106,7 +16203,7 @@ function ToggleGroupRoot({
|
|
|
16106
16203
|
},
|
|
16107
16204
|
[allowEmpty, onValueChange]
|
|
16108
16205
|
);
|
|
16109
|
-
return /* @__PURE__ */
|
|
16206
|
+
return /* @__PURE__ */ React63.createElement(RadioGroupContext.Provider, { value: contextValue }, /* @__PURE__ */ React63.createElement(
|
|
16110
16207
|
ToggleGroupPrimitive.Root,
|
|
16111
16208
|
{
|
|
16112
16209
|
id,
|
|
@@ -16120,23 +16217,33 @@ function ToggleGroupRoot({
|
|
|
16120
16217
|
}
|
|
16121
16218
|
var RadioGroup;
|
|
16122
16219
|
((RadioGroup2) => {
|
|
16123
|
-
RadioGroup2.Root =
|
|
16124
|
-
RadioGroup2.Item =
|
|
16220
|
+
RadioGroup2.Root = memo27(ToggleGroupRoot);
|
|
16221
|
+
RadioGroup2.Item = memo27(ToggleGroupItem);
|
|
16125
16222
|
})(RadioGroup || (RadioGroup = {}));
|
|
16126
16223
|
|
|
16127
16224
|
// src/components/SelectMenu.tsx
|
|
16128
|
-
import {
|
|
16225
|
+
import {
|
|
16226
|
+
ChevronDownIcon,
|
|
16227
|
+
ChevronUpIcon,
|
|
16228
|
+
DropdownChevronIcon
|
|
16229
|
+
} from "@noya-app/noya-icons";
|
|
16129
16230
|
import * as Select from "@radix-ui/react-select";
|
|
16130
|
-
import
|
|
16231
|
+
import React64, { memo as memo28, useMemo as useMemo23 } from "react";
|
|
16131
16232
|
var readOnlyStyle = {
|
|
16132
16233
|
justifyContent: "flex-start",
|
|
16133
16234
|
textAlign: "left"
|
|
16134
16235
|
};
|
|
16135
|
-
var
|
|
16136
|
-
|
|
16137
|
-
|
|
16138
|
-
|
|
16139
|
-
|
|
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({
|
|
16140
16247
|
id,
|
|
16141
16248
|
style: style5,
|
|
16142
16249
|
className,
|
|
@@ -16154,7 +16261,7 @@ var SelectMenu = memo27(function SelectMenu2({
|
|
|
16154
16261
|
);
|
|
16155
16262
|
const icon = selectedItem?.icon;
|
|
16156
16263
|
const readOnlyButton = useMemo23(
|
|
16157
|
-
() => /* @__PURE__ */
|
|
16264
|
+
() => /* @__PURE__ */ React64.createElement(
|
|
16158
16265
|
Button,
|
|
16159
16266
|
{
|
|
16160
16267
|
id,
|
|
@@ -16163,59 +16270,62 @@ var SelectMenu = memo27(function SelectMenu2({
|
|
|
16163
16270
|
className: `${className ?? ""} flex-1`,
|
|
16164
16271
|
disabled
|
|
16165
16272
|
},
|
|
16166
|
-
icon && /* @__PURE__ */
|
|
16167
|
-
/* @__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)
|
|
16168
16275
|
),
|
|
16169
16276
|
[icon, id, style5, className, disabled, value, selectedItem]
|
|
16170
16277
|
);
|
|
16171
16278
|
const trigger = useMemo23(
|
|
16172
|
-
() => /* @__PURE__ */
|
|
16279
|
+
() => /* @__PURE__ */ React64.createElement(Select.SelectTrigger, { asChild: true }, /* @__PURE__ */ React64.createElement(
|
|
16173
16280
|
Button,
|
|
16174
16281
|
{
|
|
16175
16282
|
id,
|
|
16176
|
-
style:
|
|
16283
|
+
style: style5,
|
|
16177
16284
|
className: `${className ?? "w-full"} flex-1`,
|
|
16178
16285
|
disabled
|
|
16179
16286
|
},
|
|
16180
|
-
icon && /* @__PURE__ */
|
|
16181
|
-
/* @__PURE__ */
|
|
16182
|
-
/* @__PURE__ */
|
|
16183
|
-
/* @__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)
|
|
16184
16291
|
)),
|
|
16185
|
-
[
|
|
16292
|
+
[id, style5, className, disabled, icon, placeholder, label]
|
|
16186
16293
|
);
|
|
16187
16294
|
if (readOnly) {
|
|
16188
|
-
return label ? /* @__PURE__ */
|
|
16189
|
-
"label",
|
|
16190
|
-
{
|
|
16191
|
-
className: labelStyles,
|
|
16192
|
-
htmlFor: id
|
|
16193
|
-
},
|
|
16194
|
-
label
|
|
16195
|
-
)) : readOnlyButton;
|
|
16295
|
+
return label ? /* @__PURE__ */ React64.createElement("div", { className: "flex flex-col relative" }, readOnlyButton, /* @__PURE__ */ React64.createElement("label", { className: labelStyles, htmlFor: id }, label)) : readOnlyButton;
|
|
16196
16296
|
}
|
|
16197
|
-
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) => {
|
|
16198
16298
|
if (typeof menuItem === "string") {
|
|
16199
|
-
return /* @__PURE__ */
|
|
16299
|
+
return /* @__PURE__ */ React64.createElement(Select.Separator, { className: styles.separatorStyle });
|
|
16200
16300
|
}
|
|
16201
16301
|
const value2 = menuItem.value ?? "";
|
|
16202
|
-
return /* @__PURE__ */
|
|
16203
|
-
})))));
|
|
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)))));
|
|
16204
16304
|
});
|
|
16205
|
-
var SelectItem =
|
|
16305
|
+
var SelectItem = React64.forwardRef(
|
|
16206
16306
|
({
|
|
16207
16307
|
children: children2,
|
|
16208
16308
|
icon,
|
|
16209
16309
|
disabled,
|
|
16210
16310
|
...props
|
|
16211
16311
|
}, forwardedRef) => {
|
|
16212
|
-
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
|
+
);
|
|
16213
16323
|
}
|
|
16214
16324
|
);
|
|
16215
16325
|
|
|
16216
16326
|
// src/components/Slider.tsx
|
|
16217
16327
|
import * as RadixSlider from "@radix-ui/react-slider";
|
|
16218
|
-
import
|
|
16328
|
+
import React65, { useCallback as useCallback23, useMemo as useMemo24 } from "react";
|
|
16219
16329
|
var Slider = function Slider2({
|
|
16220
16330
|
id,
|
|
16221
16331
|
value,
|
|
@@ -16233,7 +16343,7 @@ var Slider = function Slider2({
|
|
|
16233
16343
|
},
|
|
16234
16344
|
[onValueChange]
|
|
16235
16345
|
);
|
|
16236
|
-
return /* @__PURE__ */
|
|
16346
|
+
return /* @__PURE__ */ React65.createElement(
|
|
16237
16347
|
RadixSlider.Root,
|
|
16238
16348
|
{
|
|
16239
16349
|
min,
|
|
@@ -16243,36 +16353,38 @@ var Slider = function Slider2({
|
|
|
16243
16353
|
onValueChange: handleValueChange,
|
|
16244
16354
|
className: "flex-1 flex relative items-center select-none touch-none h-4"
|
|
16245
16355
|
},
|
|
16246
|
-
/* @__PURE__ */
|
|
16247
|
-
/* @__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" })
|
|
16248
16358
|
);
|
|
16249
16359
|
};
|
|
16250
16360
|
|
|
16251
16361
|
// src/components/Switch.tsx
|
|
16252
16362
|
import * as SwitchPrimitive from "@radix-ui/react-switch";
|
|
16253
|
-
import
|
|
16363
|
+
import React66 from "react";
|
|
16254
16364
|
var Switch = function Switch2({
|
|
16365
|
+
id,
|
|
16255
16366
|
value,
|
|
16256
16367
|
onChange,
|
|
16257
16368
|
colorScheme = "normal",
|
|
16258
16369
|
disabled
|
|
16259
16370
|
}) {
|
|
16260
|
-
return /* @__PURE__ */
|
|
16371
|
+
return /* @__PURE__ */ React66.createElement(
|
|
16261
16372
|
SwitchPrimitive.Root,
|
|
16262
16373
|
{
|
|
16374
|
+
id,
|
|
16263
16375
|
checked: value,
|
|
16264
16376
|
disabled,
|
|
16265
16377
|
onCheckedChange: (newValue) => {
|
|
16266
16378
|
onChange(newValue);
|
|
16267
16379
|
},
|
|
16268
|
-
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"}`
|
|
16269
16381
|
},
|
|
16270
|
-
/* @__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]" })
|
|
16271
16383
|
);
|
|
16272
16384
|
};
|
|
16273
16385
|
|
|
16274
16386
|
// src/components/TextArea.tsx
|
|
16275
|
-
import
|
|
16387
|
+
import React67, { forwardRef as forwardRef20, memo as memo29, useCallback as useCallback24, useEffect as useEffect15, useRef as useRef19 } from "react";
|
|
16276
16388
|
var useAutoResize = (value) => {
|
|
16277
16389
|
const textareaRef = useRef19(null);
|
|
16278
16390
|
useEffect15(() => {
|
|
@@ -16282,8 +16394,8 @@ var useAutoResize = (value) => {
|
|
|
16282
16394
|
}, [value]);
|
|
16283
16395
|
return textareaRef;
|
|
16284
16396
|
};
|
|
16285
|
-
var AutoResizingTextArea =
|
|
16286
|
-
|
|
16397
|
+
var AutoResizingTextArea = memo29(
|
|
16398
|
+
forwardRef20(function AutoResizingTextArea2({
|
|
16287
16399
|
value,
|
|
16288
16400
|
onChangeText,
|
|
16289
16401
|
className,
|
|
@@ -16301,7 +16413,7 @@ var AutoResizingTextArea = memo28(
|
|
|
16301
16413
|
},
|
|
16302
16414
|
[ref, forwardedRef]
|
|
16303
16415
|
);
|
|
16304
|
-
return /* @__PURE__ */
|
|
16416
|
+
return /* @__PURE__ */ React67.createElement(
|
|
16305
16417
|
"textarea",
|
|
16306
16418
|
{
|
|
16307
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 ?? ""}`,
|
|
@@ -16315,13 +16427,13 @@ var AutoResizingTextArea = memo28(
|
|
|
16315
16427
|
);
|
|
16316
16428
|
|
|
16317
16429
|
// src/components/TreeView.tsx
|
|
16318
|
-
import
|
|
16319
|
-
forwardRef as
|
|
16320
|
-
memo as
|
|
16430
|
+
import React68, {
|
|
16431
|
+
forwardRef as forwardRef21,
|
|
16432
|
+
memo as memo30,
|
|
16321
16433
|
useCallback as useCallback25,
|
|
16322
16434
|
useContext as useContext11
|
|
16323
16435
|
} from "react";
|
|
16324
|
-
var TreeRow =
|
|
16436
|
+
var TreeRow = forwardRef21(function TreeRow2({
|
|
16325
16437
|
icon,
|
|
16326
16438
|
expanded,
|
|
16327
16439
|
onClickChevron,
|
|
@@ -16336,27 +16448,27 @@ var TreeRow = forwardRef19(function TreeRow2({
|
|
|
16336
16448
|
},
|
|
16337
16449
|
[onClickChevron]
|
|
16338
16450
|
);
|
|
16339
|
-
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(
|
|
16340
16452
|
IconButton,
|
|
16341
16453
|
{
|
|
16342
16454
|
iconName: expanded ? "ChevronDownIcon2" : "ChevronRightIcon2",
|
|
16343
16455
|
onClick: handleClickChevron,
|
|
16344
16456
|
selected: rest.selected
|
|
16345
16457
|
}
|
|
16346
|
-
), /* @__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);
|
|
16347
16459
|
});
|
|
16348
16460
|
var TreeView;
|
|
16349
16461
|
((TreeView2) => {
|
|
16350
16462
|
TreeView2.Root = ListView.Root;
|
|
16351
16463
|
TreeView2.RowTitle = ListView.RowTitle;
|
|
16352
16464
|
TreeView2.EditableRowTitle = ListView.EditableRowTitle;
|
|
16353
|
-
TreeView2.Row =
|
|
16465
|
+
TreeView2.Row = memo30(TreeRow);
|
|
16354
16466
|
})(TreeView || (TreeView = {}));
|
|
16355
16467
|
|
|
16356
16468
|
// src/components/WorkspaceLayout.tsx
|
|
16357
16469
|
import { useKeyboardShortcuts as useKeyboardShortcuts3 } from "@noya-app/noya-keymap";
|
|
16358
|
-
import
|
|
16359
|
-
forwardRef as
|
|
16470
|
+
import React70, {
|
|
16471
|
+
forwardRef as forwardRef22,
|
|
16360
16472
|
useCallback as useCallback26,
|
|
16361
16473
|
useImperativeHandle as useImperativeHandle4,
|
|
16362
16474
|
useRef as useRef21,
|
|
@@ -16501,7 +16613,7 @@ function usePreservePanelSize(panelGroupRef, setPanelLayoutState) {
|
|
|
16501
16613
|
}
|
|
16502
16614
|
|
|
16503
16615
|
// src/components/WorkspaceLayout.tsx
|
|
16504
|
-
var WorkspaceLayoutWithTheme =
|
|
16616
|
+
var WorkspaceLayoutWithTheme = forwardRef22(function WorkspaceLayoutWithTheme2({
|
|
16505
16617
|
autoSavePrefix,
|
|
16506
16618
|
leftSidebarContent: leftPanelContent,
|
|
16507
16619
|
children: centerPanelContent,
|
|
@@ -16595,7 +16707,7 @@ var WorkspaceLayoutWithTheme = forwardRef20(function WorkspaceLayoutWithTheme2({
|
|
|
16595
16707
|
}
|
|
16596
16708
|
});
|
|
16597
16709
|
const centerPanelPercentage = 100 - (leftPanelContent ? leftSidebarPercentage : 0) - (rightPanelContent ? rightSidebarPercentage : 0);
|
|
16598
|
-
return /* @__PURE__ */
|
|
16710
|
+
return /* @__PURE__ */ React70.createElement(
|
|
16599
16711
|
"div",
|
|
16600
16712
|
{
|
|
16601
16713
|
id,
|
|
@@ -16607,7 +16719,7 @@ var WorkspaceLayoutWithTheme = forwardRef20(function WorkspaceLayoutWithTheme2({
|
|
|
16607
16719
|
...style5
|
|
16608
16720
|
}
|
|
16609
16721
|
},
|
|
16610
|
-
/* @__PURE__ */
|
|
16722
|
+
/* @__PURE__ */ React70.createElement(
|
|
16611
16723
|
PanelGroup,
|
|
16612
16724
|
{
|
|
16613
16725
|
ref: panelGroupRef,
|
|
@@ -16616,7 +16728,7 @@ var WorkspaceLayoutWithTheme = forwardRef20(function WorkspaceLayoutWithTheme2({
|
|
|
16616
16728
|
autoSaveId: autoSavePrefix ? `${autoSavePrefix}--${EDITOR_PANEL_GROUP_ID}` : void 0,
|
|
16617
16729
|
style: { flex: "1" }
|
|
16618
16730
|
},
|
|
16619
|
-
hasLeftSidebar && /* @__PURE__ */
|
|
16731
|
+
hasLeftSidebar && /* @__PURE__ */ React70.createElement(React70.Fragment, null, /* @__PURE__ */ React70.createElement(
|
|
16620
16732
|
Panel,
|
|
16621
16733
|
{
|
|
16622
16734
|
id: LEFT_SIDEBAR_ID,
|
|
@@ -16633,7 +16745,7 @@ var WorkspaceLayoutWithTheme = forwardRef20(function WorkspaceLayoutWithTheme2({
|
|
|
16633
16745
|
}
|
|
16634
16746
|
},
|
|
16635
16747
|
internalLayoutState?.leftSidebarCollapsed ? null : leftPanelContent
|
|
16636
|
-
), /* @__PURE__ */
|
|
16748
|
+
), /* @__PURE__ */ React70.createElement(
|
|
16637
16749
|
PanelResizeHandle,
|
|
16638
16750
|
{
|
|
16639
16751
|
style: {
|
|
@@ -16644,7 +16756,7 @@ var WorkspaceLayoutWithTheme = forwardRef20(function WorkspaceLayoutWithTheme2({
|
|
|
16644
16756
|
}
|
|
16645
16757
|
}
|
|
16646
16758
|
)),
|
|
16647
|
-
/* @__PURE__ */
|
|
16759
|
+
/* @__PURE__ */ React70.createElement(
|
|
16648
16760
|
Panel,
|
|
16649
16761
|
{
|
|
16650
16762
|
id: CONTENT_AREA_ID,
|
|
@@ -16659,7 +16771,7 @@ var WorkspaceLayoutWithTheme = forwardRef20(function WorkspaceLayoutWithTheme2({
|
|
|
16659
16771
|
},
|
|
16660
16772
|
centerPanelContent
|
|
16661
16773
|
),
|
|
16662
|
-
hasRightSidebar && /* @__PURE__ */
|
|
16774
|
+
hasRightSidebar && /* @__PURE__ */ React70.createElement(React70.Fragment, null, /* @__PURE__ */ React70.createElement(
|
|
16663
16775
|
PanelResizeHandle,
|
|
16664
16776
|
{
|
|
16665
16777
|
style: {
|
|
@@ -16669,7 +16781,7 @@ var WorkspaceLayoutWithTheme = forwardRef20(function WorkspaceLayoutWithTheme2({
|
|
|
16669
16781
|
backgroundColor: "var(--divider)"
|
|
16670
16782
|
}
|
|
16671
16783
|
}
|
|
16672
|
-
), /* @__PURE__ */
|
|
16784
|
+
), /* @__PURE__ */ React70.createElement(
|
|
16673
16785
|
Panel,
|
|
16674
16786
|
{
|
|
16675
16787
|
id: RIGHT_SIDEBAR_ID,
|
|
@@ -16689,8 +16801,8 @@ var WorkspaceLayoutWithTheme = forwardRef20(function WorkspaceLayoutWithTheme2({
|
|
|
16689
16801
|
)
|
|
16690
16802
|
);
|
|
16691
16803
|
});
|
|
16692
|
-
var WorkspaceLayout =
|
|
16693
|
-
return /* @__PURE__ */
|
|
16804
|
+
var WorkspaceLayout = forwardRef22(function WorkspaceLayout2(props, forwardedRef) {
|
|
16805
|
+
return /* @__PURE__ */ React70.createElement(WorkspaceLayoutWithTheme, { ...props, ref: forwardedRef });
|
|
16694
16806
|
});
|
|
16695
16807
|
|
|
16696
16808
|
// src/hooks/usePlatform.ts
|
|
@@ -16761,11 +16873,11 @@ var SUPPORTED_CANVAS_UPLOAD_TYPES = [
|
|
|
16761
16873
|
|
|
16762
16874
|
// src/components/DimensionInput.tsx
|
|
16763
16875
|
import { round } from "@noya-app/noya-utils";
|
|
16764
|
-
import
|
|
16876
|
+
import React71, { memo as memo31, useCallback as useCallback27 } from "react";
|
|
16765
16877
|
function getNewValue(value, mode, delta) {
|
|
16766
16878
|
return delta === void 0 ? value : mode === "replace" ? delta : value + delta;
|
|
16767
16879
|
}
|
|
16768
|
-
var DimensionInput =
|
|
16880
|
+
var DimensionInput = memo31(function DimensionInput2({
|
|
16769
16881
|
id,
|
|
16770
16882
|
value,
|
|
16771
16883
|
onSetValue,
|
|
@@ -16783,7 +16895,7 @@ var DimensionInput = memo30(function DimensionInput2({
|
|
|
16783
16895
|
(value2) => onSetValue(value2, "replace"),
|
|
16784
16896
|
[onSetValue]
|
|
16785
16897
|
);
|
|
16786
|
-
return /* @__PURE__ */
|
|
16898
|
+
return /* @__PURE__ */ React71.createElement(InputField.Root, { id, width: size3 }, /* @__PURE__ */ React71.createElement(
|
|
16787
16899
|
InputField.NumberInput,
|
|
16788
16900
|
{
|
|
16789
16901
|
value: value === void 0 ? value : round(value, 2),
|
|
@@ -16792,13 +16904,13 @@ var DimensionInput = memo30(function DimensionInput2({
|
|
|
16792
16904
|
disabled,
|
|
16793
16905
|
...trigger === "change" ? { onChange: handleSetValue } : { onSubmit: handleSetValue }
|
|
16794
16906
|
}
|
|
16795
|
-
), label && /* @__PURE__ */
|
|
16907
|
+
), label && /* @__PURE__ */ React71.createElement(InputField.Label, null, label));
|
|
16796
16908
|
});
|
|
16797
16909
|
|
|
16798
16910
|
// src/components/InspectorPrimitives.tsx
|
|
16799
16911
|
var InspectorPrimitives_exports = {};
|
|
16800
16912
|
__export(InspectorPrimitives_exports, {
|
|
16801
|
-
Checkbox: () =>
|
|
16913
|
+
Checkbox: () => Checkbox3,
|
|
16802
16914
|
Column: () => Column2,
|
|
16803
16915
|
HorizontalSeparator: () => HorizontalSeparator,
|
|
16804
16916
|
LabeledRow: () => LabeledRow,
|
|
@@ -16810,8 +16922,8 @@ __export(InspectorPrimitives_exports, {
|
|
|
16810
16922
|
Title: () => Title3,
|
|
16811
16923
|
VerticalSeparator: () => VerticalSeparator
|
|
16812
16924
|
});
|
|
16813
|
-
import
|
|
16814
|
-
var Section2 =
|
|
16925
|
+
import React72, { memo as memo32, forwardRef as forwardRef23 } from "react";
|
|
16926
|
+
var Section2 = forwardRef23(({ className, ...props }, ref) => /* @__PURE__ */ React72.createElement(
|
|
16815
16927
|
"div",
|
|
16816
16928
|
{
|
|
16817
16929
|
ref,
|
|
@@ -16819,8 +16931,8 @@ var Section2 = forwardRef21(({ className, ...props }, ref) => /* @__PURE__ */ Re
|
|
|
16819
16931
|
...props
|
|
16820
16932
|
}
|
|
16821
16933
|
));
|
|
16822
|
-
var SectionHeader =
|
|
16823
|
-
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(
|
|
16824
16936
|
"div",
|
|
16825
16937
|
{
|
|
16826
16938
|
ref,
|
|
@@ -16828,7 +16940,7 @@ var Title3 = forwardRef21(({ className, $textStyle, ...props }, ref) => /* @__PU
|
|
|
16828
16940
|
...props
|
|
16829
16941
|
}
|
|
16830
16942
|
));
|
|
16831
|
-
var Row =
|
|
16943
|
+
var Row = forwardRef23(({ className, ...props }, ref) => /* @__PURE__ */ React72.createElement(
|
|
16832
16944
|
"div",
|
|
16833
16945
|
{
|
|
16834
16946
|
ref,
|
|
@@ -16836,7 +16948,7 @@ var Row = forwardRef21(({ className, ...props }, ref) => /* @__PURE__ */ React71
|
|
|
16836
16948
|
...props
|
|
16837
16949
|
}
|
|
16838
16950
|
));
|
|
16839
|
-
var Column2 =
|
|
16951
|
+
var Column2 = forwardRef23(({ className, ...props }, ref) => /* @__PURE__ */ React72.createElement(
|
|
16840
16952
|
"div",
|
|
16841
16953
|
{
|
|
16842
16954
|
ref,
|
|
@@ -16844,7 +16956,7 @@ var Column2 = forwardRef21(({ className, ...props }, ref) => /* @__PURE__ */ Rea
|
|
|
16844
16956
|
...props
|
|
16845
16957
|
}
|
|
16846
16958
|
));
|
|
16847
|
-
var
|
|
16959
|
+
var Checkbox3 = forwardRef23(({ className, ...props }, ref) => /* @__PURE__ */ React72.createElement(
|
|
16848
16960
|
"input",
|
|
16849
16961
|
{
|
|
16850
16962
|
ref,
|
|
@@ -16853,7 +16965,7 @@ var Checkbox = forwardRef21(({ className, ...props }, ref) => /* @__PURE__ */ Re
|
|
|
16853
16965
|
...props
|
|
16854
16966
|
}
|
|
16855
16967
|
));
|
|
16856
|
-
var Text3 =
|
|
16968
|
+
var Text3 = forwardRef23(({ className, ...props }, ref) => /* @__PURE__ */ React72.createElement(
|
|
16857
16969
|
"span",
|
|
16858
16970
|
{
|
|
16859
16971
|
ref,
|
|
@@ -16861,10 +16973,10 @@ var Text3 = forwardRef21(({ className, ...props }, ref) => /* @__PURE__ */ React
|
|
|
16861
16973
|
...props
|
|
16862
16974
|
}
|
|
16863
16975
|
));
|
|
16864
|
-
var VerticalSeparator = () => /* @__PURE__ */
|
|
16865
|
-
var HorizontalSeparator = () => /* @__PURE__ */
|
|
16866
|
-
var RowLabel =
|
|
16867
|
-
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(
|
|
16868
16980
|
"span",
|
|
16869
16981
|
{
|
|
16870
16982
|
ref,
|
|
@@ -16873,7 +16985,7 @@ var RowLabel = forwardRef21(function RowLabel2({ className, $textStyle, ...props
|
|
|
16873
16985
|
}
|
|
16874
16986
|
);
|
|
16875
16987
|
});
|
|
16876
|
-
var LabeledRow =
|
|
16988
|
+
var LabeledRow = memo32(function LabeledRow2({
|
|
16877
16989
|
id,
|
|
16878
16990
|
children: children2,
|
|
16879
16991
|
label,
|
|
@@ -16881,7 +16993,7 @@ var LabeledRow = memo31(function LabeledRow2({
|
|
|
16881
16993
|
right,
|
|
16882
16994
|
className
|
|
16883
16995
|
}) {
|
|
16884
|
-
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)));
|
|
16885
16997
|
});
|
|
16886
16998
|
export {
|
|
16887
16999
|
ActivityIndicator,
|
|
@@ -16891,6 +17003,7 @@ export {
|
|
|
16891
17003
|
Body,
|
|
16892
17004
|
Button,
|
|
16893
17005
|
CONTENT_AREA_ID,
|
|
17006
|
+
Checkbox,
|
|
16894
17007
|
Chip,
|
|
16895
17008
|
CompletionMenu,
|
|
16896
17009
|
ContextMenu,
|