@almadar/ui 6.3.0 → 6.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/avl/index.cjs +2214 -1519
- package/dist/avl/index.d.cts +206 -17
- package/dist/avl/index.d.ts +206 -17
- package/dist/avl/index.js +1198 -506
- package/dist/components/index.cjs +1965 -1455
- package/dist/components/index.d.cts +199 -3
- package/dist/components/index.d.ts +199 -3
- package/dist/components/index.js +967 -456
- package/dist/hooks/index.cjs +2 -0
- package/dist/hooks/index.js +2 -0
- package/dist/lib/drawable/three/index.cjs +4 -3
- package/dist/lib/drawable/three/index.js +4 -3
- package/dist/locales/index.cjs +6 -0
- package/dist/locales/index.js +6 -0
- package/dist/marketing/index.cjs +1 -1
- package/dist/marketing/index.js +1 -1
- package/dist/providers/index.cjs +1710 -1285
- package/dist/providers/index.d.cts +4 -1
- package/dist/providers/index.d.ts +4 -1
- package/dist/providers/index.js +771 -346
- package/dist/runtime/index.cjs +1675 -1250
- package/dist/runtime/index.js +775 -350
- package/locales/ar.json +2 -0
- package/locales/en.json +2 -0
- package/locales/sl.json +2 -0
- package/package.json +2 -1
package/dist/components/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
2
|
+
import * as React78 from 'react';
|
|
3
|
+
import React78__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, useState, useLayoutEffect, useId, Suspense, lazy, useSyncExternalStore } from 'react';
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
6
6
|
import { EventBusContext, useTraitScopeChain, useCurrentPagePath, useGameAudioContextOptional, useRenderSlot, useNavStack, useEntitySchemaOptional, RenderSlotProvider, useEntityBindingSnapshot, useTraitScope, TraitScopeProvider } from '@almadar/ui/providers';
|
|
@@ -262,7 +262,7 @@ var init_SvgFlow = __esm({
|
|
|
262
262
|
width = 100,
|
|
263
263
|
height = 100
|
|
264
264
|
}) => {
|
|
265
|
-
const markerId =
|
|
265
|
+
const markerId = React78__default.useMemo(() => {
|
|
266
266
|
flowIdCounter += 1;
|
|
267
267
|
return `almadar-flow-arrow-${flowIdCounter}`;
|
|
268
268
|
}, []);
|
|
@@ -855,7 +855,7 @@ var init_SvgRing = __esm({
|
|
|
855
855
|
width = 100,
|
|
856
856
|
height = 100
|
|
857
857
|
}) => {
|
|
858
|
-
const gradientId =
|
|
858
|
+
const gradientId = React78__default.useMemo(() => {
|
|
859
859
|
ringIdCounter += 1;
|
|
860
860
|
return `almadar-ring-glow-${ringIdCounter}`;
|
|
861
861
|
}, []);
|
|
@@ -1397,7 +1397,7 @@ var init_Icon = __esm({
|
|
|
1397
1397
|
const effectiveName = typeof icon === "string" && icon !== "" ? icon : name;
|
|
1398
1398
|
const effectiveStrokeWidth = strokeWidth != null && strokeWidth > 0 ? strokeWidth : void 0;
|
|
1399
1399
|
const family = useIconFamily();
|
|
1400
|
-
const RenderedComponent =
|
|
1400
|
+
const RenderedComponent = React78__default.useMemo(() => {
|
|
1401
1401
|
if (directIcon) return null;
|
|
1402
1402
|
return effectiveName ? resolveIconForFamily(effectiveName) : null;
|
|
1403
1403
|
}, [directIcon, effectiveName, family]);
|
|
@@ -1526,7 +1526,7 @@ var init_atlasSlice = __esm({
|
|
|
1526
1526
|
}
|
|
1527
1527
|
});
|
|
1528
1528
|
function useAtlasSliceDataUrl(asset) {
|
|
1529
|
-
const [, bump] =
|
|
1529
|
+
const [, bump] = React78.useReducer((x) => x + 1, 0);
|
|
1530
1530
|
if (!isAtlasAsset(asset)) return void 0;
|
|
1531
1531
|
const key = `${asset.atlas}#${asset.sprite}`;
|
|
1532
1532
|
const cached = sliceDataUrlCache.get(key);
|
|
@@ -1589,13 +1589,13 @@ function AtlasImage({
|
|
|
1589
1589
|
style,
|
|
1590
1590
|
"aria-hidden": ariaHidden
|
|
1591
1591
|
}) {
|
|
1592
|
-
const [, bump] =
|
|
1593
|
-
const canvasRef =
|
|
1592
|
+
const [, bump] = React78.useReducer((x) => x + 1, 0);
|
|
1593
|
+
const canvasRef = React78.useRef(null);
|
|
1594
1594
|
const sliced = isAtlasAsset(asset);
|
|
1595
1595
|
const atlas = sliced ? getAtlas(asset.atlas, bump) : void 0;
|
|
1596
1596
|
const img = sliced && asset?.url ? getSheetImage(asset.url, bump) : null;
|
|
1597
1597
|
const rect = sliced && atlas ? subRectFor(atlas, asset.sprite) : null;
|
|
1598
|
-
|
|
1598
|
+
React78.useEffect(() => {
|
|
1599
1599
|
const canvas = canvasRef.current;
|
|
1600
1600
|
if (!canvas || !img || !rect) return;
|
|
1601
1601
|
canvas.width = rect.sw;
|
|
@@ -1671,7 +1671,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
1671
1671
|
const IconComp = value;
|
|
1672
1672
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
1673
1673
|
}
|
|
1674
|
-
if (
|
|
1674
|
+
if (React78__default.isValidElement(value)) {
|
|
1675
1675
|
return value;
|
|
1676
1676
|
}
|
|
1677
1677
|
if (typeof value === "object" && value !== null && isIconLike(value)) {
|
|
@@ -1748,7 +1748,7 @@ var init_Button = __esm({
|
|
|
1748
1748
|
md: "h-icon-default w-icon-default",
|
|
1749
1749
|
lg: "h-icon-default w-icon-default"
|
|
1750
1750
|
};
|
|
1751
|
-
Button =
|
|
1751
|
+
Button = React78__default.forwardRef(
|
|
1752
1752
|
({
|
|
1753
1753
|
className,
|
|
1754
1754
|
variant = "primary",
|
|
@@ -1820,7 +1820,7 @@ var init_Input = __esm({
|
|
|
1820
1820
|
init_cn();
|
|
1821
1821
|
init_Icon();
|
|
1822
1822
|
init_useEventBus();
|
|
1823
|
-
Input =
|
|
1823
|
+
Input = React78__default.forwardRef(
|
|
1824
1824
|
({
|
|
1825
1825
|
className,
|
|
1826
1826
|
inputType,
|
|
@@ -1844,9 +1844,9 @@ var init_Input = __esm({
|
|
|
1844
1844
|
const eventBus = useEventBus();
|
|
1845
1845
|
const type = inputType || htmlType || "text";
|
|
1846
1846
|
const isDeclarative = typeof onChange === "string";
|
|
1847
|
-
const [localValue, setLocalValue] =
|
|
1848
|
-
const pendingEchoRef =
|
|
1849
|
-
|
|
1847
|
+
const [localValue, setLocalValue] = React78__default.useState(value);
|
|
1848
|
+
const pendingEchoRef = React78__default.useRef(/* @__PURE__ */ new Set());
|
|
1849
|
+
React78__default.useEffect(() => {
|
|
1850
1850
|
if (!isDeclarative) return;
|
|
1851
1851
|
const incoming = value == null ? "" : String(value);
|
|
1852
1852
|
if (pendingEchoRef.current.has(incoming)) {
|
|
@@ -2013,7 +2013,7 @@ var Label;
|
|
|
2013
2013
|
var init_Label = __esm({
|
|
2014
2014
|
"components/core/atoms/Label.tsx"() {
|
|
2015
2015
|
init_cn();
|
|
2016
|
-
Label =
|
|
2016
|
+
Label = React78__default.forwardRef(
|
|
2017
2017
|
({ className, required, children, ...props }, ref) => {
|
|
2018
2018
|
return /* @__PURE__ */ jsxs(
|
|
2019
2019
|
"label",
|
|
@@ -2040,7 +2040,7 @@ var init_Textarea = __esm({
|
|
|
2040
2040
|
"components/core/atoms/Textarea.tsx"() {
|
|
2041
2041
|
init_cn();
|
|
2042
2042
|
init_useEventBus();
|
|
2043
|
-
Textarea =
|
|
2043
|
+
Textarea = React78__default.forwardRef(
|
|
2044
2044
|
({ className, error, onChange, ...props }, ref) => {
|
|
2045
2045
|
const eventBus = useEventBus();
|
|
2046
2046
|
const handleChange = (e) => {
|
|
@@ -2290,7 +2290,7 @@ var init_Select = __esm({
|
|
|
2290
2290
|
init_cn();
|
|
2291
2291
|
init_Icon();
|
|
2292
2292
|
init_useEventBus();
|
|
2293
|
-
Select =
|
|
2293
|
+
Select = React78__default.forwardRef(
|
|
2294
2294
|
(props, _ref) => {
|
|
2295
2295
|
const { multiple, searchable, clearable } = props;
|
|
2296
2296
|
if (multiple || searchable || clearable) {
|
|
@@ -2307,7 +2307,7 @@ var init_Checkbox = __esm({
|
|
|
2307
2307
|
"components/core/atoms/Checkbox.tsx"() {
|
|
2308
2308
|
init_cn();
|
|
2309
2309
|
init_useEventBus();
|
|
2310
|
-
Checkbox =
|
|
2310
|
+
Checkbox = React78__default.forwardRef(
|
|
2311
2311
|
({ className, label, id, onChange, ...props }, ref) => {
|
|
2312
2312
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
2313
2313
|
const eventBus = useEventBus();
|
|
@@ -2361,7 +2361,7 @@ var init_Spinner = __esm({
|
|
|
2361
2361
|
md: "h-6 w-6",
|
|
2362
2362
|
lg: "h-8 w-8"
|
|
2363
2363
|
};
|
|
2364
|
-
Spinner =
|
|
2364
|
+
Spinner = React78__default.forwardRef(
|
|
2365
2365
|
({ className, size = "md", overlay, ...props }, ref) => {
|
|
2366
2366
|
if (overlay) {
|
|
2367
2367
|
return /* @__PURE__ */ jsx(
|
|
@@ -2451,7 +2451,7 @@ var init_Card = __esm({
|
|
|
2451
2451
|
chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
|
|
2452
2452
|
"tile-image-first": "p-0 overflow-hidden"
|
|
2453
2453
|
};
|
|
2454
|
-
Card =
|
|
2454
|
+
Card = React78__default.forwardRef(
|
|
2455
2455
|
({
|
|
2456
2456
|
className,
|
|
2457
2457
|
variant = "bordered",
|
|
@@ -2500,9 +2500,9 @@ var init_Card = __esm({
|
|
|
2500
2500
|
}
|
|
2501
2501
|
);
|
|
2502
2502
|
Card.displayName = "Card";
|
|
2503
|
-
CardHeader =
|
|
2503
|
+
CardHeader = React78__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
2504
2504
|
CardHeader.displayName = "CardHeader";
|
|
2505
|
-
CardTitle =
|
|
2505
|
+
CardTitle = React78__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2506
2506
|
"h3",
|
|
2507
2507
|
{
|
|
2508
2508
|
ref,
|
|
@@ -2515,11 +2515,11 @@ var init_Card = __esm({
|
|
|
2515
2515
|
}
|
|
2516
2516
|
));
|
|
2517
2517
|
CardTitle.displayName = "CardTitle";
|
|
2518
|
-
CardContent =
|
|
2518
|
+
CardContent = React78__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
2519
2519
|
CardContent.displayName = "CardContent";
|
|
2520
2520
|
CardBody = CardContent;
|
|
2521
2521
|
CardBody.displayName = "CardBody";
|
|
2522
|
-
CardFooter =
|
|
2522
|
+
CardFooter = React78__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2523
2523
|
"div",
|
|
2524
2524
|
{
|
|
2525
2525
|
ref,
|
|
@@ -2573,7 +2573,7 @@ var init_Badge = __esm({
|
|
|
2573
2573
|
md: "px-2.5 py-1 text-sm",
|
|
2574
2574
|
lg: "px-3 py-1.5 text-base"
|
|
2575
2575
|
};
|
|
2576
|
-
Badge =
|
|
2576
|
+
Badge = React78__default.forwardRef(
|
|
2577
2577
|
({ className, variant = "default", size = "sm", amount, label, icon, iconAsset, children, onRemove, removeLabel, ...props }, ref) => {
|
|
2578
2578
|
const iconSizes3 = {
|
|
2579
2579
|
sm: "h-icon-default w-icon-default",
|
|
@@ -2701,7 +2701,7 @@ var init_FilterPill = __esm({
|
|
|
2701
2701
|
md: "w-3.5 h-3.5",
|
|
2702
2702
|
lg: "w-4 h-4"
|
|
2703
2703
|
};
|
|
2704
|
-
FilterPill =
|
|
2704
|
+
FilterPill = React78__default.forwardRef(
|
|
2705
2705
|
({
|
|
2706
2706
|
className,
|
|
2707
2707
|
variant = "default",
|
|
@@ -2830,8 +2830,8 @@ var init_Avatar = __esm({
|
|
|
2830
2830
|
actionPayload
|
|
2831
2831
|
}) => {
|
|
2832
2832
|
const eventBus = useEventBus();
|
|
2833
|
-
const [imgFailed, setImgFailed] =
|
|
2834
|
-
|
|
2833
|
+
const [imgFailed, setImgFailed] = React78__default.useState(false);
|
|
2834
|
+
React78__default.useEffect(() => {
|
|
2835
2835
|
setImgFailed(false);
|
|
2836
2836
|
}, [src]);
|
|
2837
2837
|
const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
|
|
@@ -3083,7 +3083,7 @@ var init_Box = __esm({
|
|
|
3083
3083
|
fixed: "fixed",
|
|
3084
3084
|
sticky: "sticky"
|
|
3085
3085
|
};
|
|
3086
|
-
Box =
|
|
3086
|
+
Box = React78__default.forwardRef(
|
|
3087
3087
|
({
|
|
3088
3088
|
padding,
|
|
3089
3089
|
paddingX,
|
|
@@ -3148,7 +3148,7 @@ var init_Box = __esm({
|
|
|
3148
3148
|
onPointerDown?.(e);
|
|
3149
3149
|
}, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
|
|
3150
3150
|
const isClickable = action || onClick;
|
|
3151
|
-
return
|
|
3151
|
+
return React78__default.createElement(
|
|
3152
3152
|
Component,
|
|
3153
3153
|
{
|
|
3154
3154
|
ref,
|
|
@@ -3202,7 +3202,7 @@ var init_Center = __esm({
|
|
|
3202
3202
|
as: Component = "div"
|
|
3203
3203
|
}) => {
|
|
3204
3204
|
const mergedStyle = minHeight ? { minHeight, ...style } : style;
|
|
3205
|
-
return
|
|
3205
|
+
return React78__default.createElement(Component, {
|
|
3206
3206
|
className: cn(
|
|
3207
3207
|
inline ? "inline-flex" : "flex",
|
|
3208
3208
|
horizontal && "justify-center",
|
|
@@ -3470,7 +3470,7 @@ var init_Radio = __esm({
|
|
|
3470
3470
|
md: "w-2.5 h-2.5",
|
|
3471
3471
|
lg: "w-3 h-3"
|
|
3472
3472
|
};
|
|
3473
|
-
Radio =
|
|
3473
|
+
Radio = React78__default.forwardRef(
|
|
3474
3474
|
({
|
|
3475
3475
|
label,
|
|
3476
3476
|
helperText,
|
|
@@ -3487,12 +3487,12 @@ var init_Radio = __esm({
|
|
|
3487
3487
|
onChange,
|
|
3488
3488
|
...props
|
|
3489
3489
|
}, ref) => {
|
|
3490
|
-
const reactId =
|
|
3490
|
+
const reactId = React78__default.useId();
|
|
3491
3491
|
const baseId = id || `radio-${reactId}`;
|
|
3492
3492
|
const hasError = !!error;
|
|
3493
3493
|
const eventBus = useEventBus();
|
|
3494
|
-
const [selected, setSelected] =
|
|
3495
|
-
|
|
3494
|
+
const [selected, setSelected] = React78__default.useState(value);
|
|
3495
|
+
React78__default.useEffect(() => {
|
|
3496
3496
|
if (value !== void 0) setSelected(value);
|
|
3497
3497
|
}, [value]);
|
|
3498
3498
|
const pick = (next, e) => {
|
|
@@ -3674,7 +3674,7 @@ var init_Switch = __esm({
|
|
|
3674
3674
|
"components/core/atoms/Switch.tsx"() {
|
|
3675
3675
|
"use client";
|
|
3676
3676
|
init_cn();
|
|
3677
|
-
Switch =
|
|
3677
|
+
Switch = React78.forwardRef(
|
|
3678
3678
|
({
|
|
3679
3679
|
checked,
|
|
3680
3680
|
defaultChecked = false,
|
|
@@ -3685,10 +3685,10 @@ var init_Switch = __esm({
|
|
|
3685
3685
|
name,
|
|
3686
3686
|
className
|
|
3687
3687
|
}, ref) => {
|
|
3688
|
-
const [isChecked, setIsChecked] =
|
|
3688
|
+
const [isChecked, setIsChecked] = React78.useState(
|
|
3689
3689
|
checked !== void 0 ? checked : defaultChecked
|
|
3690
3690
|
);
|
|
3691
|
-
|
|
3691
|
+
React78.useEffect(() => {
|
|
3692
3692
|
if (checked !== void 0) {
|
|
3693
3693
|
setIsChecked(checked);
|
|
3694
3694
|
}
|
|
@@ -3851,7 +3851,7 @@ var init_Stack = __esm({
|
|
|
3851
3851
|
};
|
|
3852
3852
|
const isHorizontal = direction === "horizontal";
|
|
3853
3853
|
const directionClass = responsive && isHorizontal ? reverse ? "flex-col-reverse md:flex-row-reverse" : "flex-col md:flex-row" : isHorizontal ? reverse ? "flex-row-reverse" : "flex-row" : reverse ? "flex-col-reverse" : "flex-col";
|
|
3854
|
-
return
|
|
3854
|
+
return React78__default.createElement(
|
|
3855
3855
|
Component,
|
|
3856
3856
|
{
|
|
3857
3857
|
className: cn(
|
|
@@ -4140,7 +4140,7 @@ var init_Typography = __esm({
|
|
|
4140
4140
|
if (format !== void 0 && format !== "none" && (typeof body === "string" || typeof body === "number" || body instanceof Date)) {
|
|
4141
4141
|
body = formatValue(body, format);
|
|
4142
4142
|
}
|
|
4143
|
-
return
|
|
4143
|
+
return React78__default.createElement(
|
|
4144
4144
|
Component,
|
|
4145
4145
|
{
|
|
4146
4146
|
id,
|
|
@@ -4374,7 +4374,7 @@ var Dialog;
|
|
|
4374
4374
|
var init_Dialog = __esm({
|
|
4375
4375
|
"components/core/atoms/Dialog.tsx"() {
|
|
4376
4376
|
init_cn();
|
|
4377
|
-
Dialog =
|
|
4377
|
+
Dialog = React78__default.forwardRef(
|
|
4378
4378
|
({
|
|
4379
4379
|
role = "dialog",
|
|
4380
4380
|
"aria-modal": ariaModal = true,
|
|
@@ -4400,7 +4400,7 @@ var Aside;
|
|
|
4400
4400
|
var init_Aside = __esm({
|
|
4401
4401
|
"components/core/atoms/Aside.tsx"() {
|
|
4402
4402
|
init_cn();
|
|
4403
|
-
Aside =
|
|
4403
|
+
Aside = React78__default.forwardRef(
|
|
4404
4404
|
({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
|
|
4405
4405
|
);
|
|
4406
4406
|
Aside.displayName = "Aside";
|
|
@@ -4479,9 +4479,9 @@ var init_LawReferenceTooltip = __esm({
|
|
|
4479
4479
|
className
|
|
4480
4480
|
}) => {
|
|
4481
4481
|
const { t } = useTranslate();
|
|
4482
|
-
const [isVisible, setIsVisible] =
|
|
4483
|
-
const timeoutRef =
|
|
4484
|
-
const triggerRef =
|
|
4482
|
+
const [isVisible, setIsVisible] = React78__default.useState(false);
|
|
4483
|
+
const timeoutRef = React78__default.useRef(null);
|
|
4484
|
+
const triggerRef = React78__default.useRef(null);
|
|
4485
4485
|
const handleMouseEnter = () => {
|
|
4486
4486
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4487
4487
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -4492,7 +4492,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
4492
4492
|
};
|
|
4493
4493
|
const { revealed, triggerProps } = useTapReveal({ refs: [triggerRef] });
|
|
4494
4494
|
const open = isVisible || revealed;
|
|
4495
|
-
|
|
4495
|
+
React78__default.useEffect(() => {
|
|
4496
4496
|
return () => {
|
|
4497
4497
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
4498
4498
|
};
|
|
@@ -4702,7 +4702,7 @@ var init_StatusDot = __esm({
|
|
|
4702
4702
|
md: "w-2.5 h-2.5",
|
|
4703
4703
|
lg: "w-3 h-3"
|
|
4704
4704
|
};
|
|
4705
|
-
StatusDot =
|
|
4705
|
+
StatusDot = React78__default.forwardRef(
|
|
4706
4706
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
4707
4707
|
return /* @__PURE__ */ jsx(
|
|
4708
4708
|
"span",
|
|
@@ -4756,7 +4756,7 @@ var init_TrendIndicator = __esm({
|
|
|
4756
4756
|
down: "trending-down",
|
|
4757
4757
|
flat: "arrow-right"
|
|
4758
4758
|
};
|
|
4759
|
-
TrendIndicator =
|
|
4759
|
+
TrendIndicator = React78__default.forwardRef(
|
|
4760
4760
|
({
|
|
4761
4761
|
className,
|
|
4762
4762
|
value,
|
|
@@ -4825,7 +4825,7 @@ var init_RangeSlider = __esm({
|
|
|
4825
4825
|
md: "w-4 h-4",
|
|
4826
4826
|
lg: "w-5 h-5"
|
|
4827
4827
|
};
|
|
4828
|
-
RangeSlider =
|
|
4828
|
+
RangeSlider = React78__default.forwardRef(
|
|
4829
4829
|
({
|
|
4830
4830
|
className,
|
|
4831
4831
|
min = 0,
|
|
@@ -5482,7 +5482,7 @@ var init_ContentSection = __esm({
|
|
|
5482
5482
|
md: "py-16",
|
|
5483
5483
|
lg: "py-24"
|
|
5484
5484
|
};
|
|
5485
|
-
ContentSection =
|
|
5485
|
+
ContentSection = React78__default.forwardRef(
|
|
5486
5486
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
5487
5487
|
return /* @__PURE__ */ jsx(
|
|
5488
5488
|
Box,
|
|
@@ -6016,7 +6016,7 @@ var init_AnimatedReveal = __esm({
|
|
|
6016
6016
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
6017
6017
|
"none": {}
|
|
6018
6018
|
};
|
|
6019
|
-
AnimatedReveal =
|
|
6019
|
+
AnimatedReveal = React78__default.forwardRef(
|
|
6020
6020
|
({
|
|
6021
6021
|
trigger = "scroll",
|
|
6022
6022
|
animation = "fade-up",
|
|
@@ -6176,7 +6176,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
6176
6176
|
"components/marketing/atoms/AnimatedGraphic.tsx"() {
|
|
6177
6177
|
"use client";
|
|
6178
6178
|
init_cn();
|
|
6179
|
-
AnimatedGraphic =
|
|
6179
|
+
AnimatedGraphic = React78__default.forwardRef(
|
|
6180
6180
|
({
|
|
6181
6181
|
src,
|
|
6182
6182
|
svgContent,
|
|
@@ -6199,7 +6199,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
6199
6199
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
6200
6200
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
6201
6201
|
const prevAnimateRef = useRef(animate);
|
|
6202
|
-
const setRef =
|
|
6202
|
+
const setRef = React78__default.useCallback(
|
|
6203
6203
|
(node) => {
|
|
6204
6204
|
containerRef.current = node;
|
|
6205
6205
|
if (typeof ref === "function") ref(node);
|
|
@@ -6300,7 +6300,7 @@ function resolveMarkerExpression(expression, entity, config, state) {
|
|
|
6300
6300
|
function isPlainObject(value) {
|
|
6301
6301
|
if (value === null || value === void 0 || typeof value !== "object") return false;
|
|
6302
6302
|
if (Array.isArray(value)) return false;
|
|
6303
|
-
if (
|
|
6303
|
+
if (React78__default.isValidElement(value)) return false;
|
|
6304
6304
|
if (value instanceof Date) return false;
|
|
6305
6305
|
if (typeof value === "function") return false;
|
|
6306
6306
|
return true;
|
|
@@ -6309,7 +6309,7 @@ function isEvaluatorResolvedData(value) {
|
|
|
6309
6309
|
return evaluatorResolvedData.has(value);
|
|
6310
6310
|
}
|
|
6311
6311
|
function brandResolved(value) {
|
|
6312
|
-
if (value !== null && typeof value === "object" && !
|
|
6312
|
+
if (value !== null && typeof value === "object" && !React78__default.isValidElement(value) && !(value instanceof Date)) {
|
|
6313
6313
|
resolvedMarkerFree.add(value);
|
|
6314
6314
|
}
|
|
6315
6315
|
}
|
|
@@ -6342,7 +6342,7 @@ function walkValue(value, scopeTrait, entity, config, state) {
|
|
|
6342
6342
|
}
|
|
6343
6343
|
const resolved = resolveMarkerExpression(value.expression, entity, config, state);
|
|
6344
6344
|
markerResolutionCache.set(value, { entity, config, state, resolved });
|
|
6345
|
-
if (resolved !== null && typeof resolved === "object" && !
|
|
6345
|
+
if (resolved !== null && typeof resolved === "object" && !React78__default.isValidElement(resolved) && !(resolved instanceof Date)) {
|
|
6346
6346
|
resolvedMarkerFree.add(resolved);
|
|
6347
6347
|
evaluatorResolvedData.add(resolved);
|
|
6348
6348
|
}
|
|
@@ -6530,7 +6530,6 @@ var init_Modal = __esm({
|
|
|
6530
6530
|
),
|
|
6531
6531
|
style: { backgroundColor: "rgba(0, 0, 0, 0.6)" },
|
|
6532
6532
|
onClick: handleOverlayClick,
|
|
6533
|
-
"aria-hidden": "true",
|
|
6534
6533
|
children: /* @__PURE__ */ jsxs(
|
|
6535
6534
|
Dialog,
|
|
6536
6535
|
{
|
|
@@ -6724,7 +6723,7 @@ var init_Drawer = __esm({
|
|
|
6724
6723
|
};
|
|
6725
6724
|
const widthClass = width in sizeWidths ? sizeWidths[width] : "";
|
|
6726
6725
|
const widthStyle = width in sizeWidths ? void 0 : { width };
|
|
6727
|
-
const
|
|
6726
|
+
const positionClasses2 = position === "right" ? "right-0 border-l" : "left-0 border-r";
|
|
6728
6727
|
const drawerSign = position === "right" ? 1 : -1;
|
|
6729
6728
|
const slideTransform = position === "right" ? "translateX(100%)" : "translateX(-100%)";
|
|
6730
6729
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -6746,7 +6745,7 @@ var init_Drawer = __esm({
|
|
|
6746
6745
|
className: cn(
|
|
6747
6746
|
"fixed top-0 bottom-0 z-50",
|
|
6748
6747
|
"flex flex-col max-h-screen",
|
|
6749
|
-
|
|
6748
|
+
positionClasses2,
|
|
6750
6749
|
widthClass,
|
|
6751
6750
|
drawerAnim,
|
|
6752
6751
|
className
|
|
@@ -7000,7 +6999,7 @@ var init_ErrorBoundary = __esm({
|
|
|
7000
6999
|
}
|
|
7001
7000
|
);
|
|
7002
7001
|
};
|
|
7003
|
-
ErrorBoundary = class extends
|
|
7002
|
+
ErrorBoundary = class extends React78__default.Component {
|
|
7004
7003
|
constructor(props) {
|
|
7005
7004
|
super(props);
|
|
7006
7005
|
__publicField(this, "reset", () => {
|
|
@@ -7283,7 +7282,7 @@ var init_Container = __esm({
|
|
|
7283
7282
|
as: Component = "div"
|
|
7284
7283
|
}) => {
|
|
7285
7284
|
const resolvedSize = maxWidth ?? size ?? "lg";
|
|
7286
|
-
return
|
|
7285
|
+
return React78__default.createElement(
|
|
7287
7286
|
Component,
|
|
7288
7287
|
{
|
|
7289
7288
|
className: cn(
|
|
@@ -8307,7 +8306,7 @@ var init_FloatingActionButton = __esm({
|
|
|
8307
8306
|
document.addEventListener("mousedown", handleClickOutside);
|
|
8308
8307
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
8309
8308
|
}, [isExpanded, actions]);
|
|
8310
|
-
const
|
|
8309
|
+
const positionClasses2 = {
|
|
8311
8310
|
"bottom-right": "bottom-6 right-6",
|
|
8312
8311
|
"bottom-left": "bottom-6 left-6",
|
|
8313
8312
|
"bottom-center": "bottom-6 left-1/2 -translate-x-1/2",
|
|
@@ -8316,7 +8315,7 @@ var init_FloatingActionButton = __esm({
|
|
|
8316
8315
|
"top-center": "top-6 left-1/2 -translate-x-1/2"
|
|
8317
8316
|
};
|
|
8318
8317
|
if (resolvedAction && (!actions || actions.length === 0)) {
|
|
8319
|
-
return /* @__PURE__ */ jsx(Box, { className: cn("fixed z-50",
|
|
8318
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("fixed z-50", positionClasses2[position], className), children: /* @__PURE__ */ jsx(
|
|
8320
8319
|
Button,
|
|
8321
8320
|
{
|
|
8322
8321
|
variant: resolvedAction.variant || "primary",
|
|
@@ -8344,7 +8343,7 @@ var init_FloatingActionButton = __esm({
|
|
|
8344
8343
|
ref: fabRef,
|
|
8345
8344
|
className: cn(
|
|
8346
8345
|
"fixed z-50 flex flex-col items-end gap-3",
|
|
8347
|
-
|
|
8346
|
+
positionClasses2[position],
|
|
8348
8347
|
position.includes("left") && "items-start",
|
|
8349
8348
|
className
|
|
8350
8349
|
),
|
|
@@ -9621,7 +9620,7 @@ function proceduralShapes(view, pos, fade, progress) {
|
|
|
9621
9620
|
}
|
|
9622
9621
|
}
|
|
9623
9622
|
}
|
|
9624
|
-
function expandFxItem(view, node, epochNowMs, dim, projector) {
|
|
9623
|
+
function expandFxItem(view, node, epochNowMs, dim, projector, fontFamily) {
|
|
9625
9624
|
if (view.space === "screen") return [];
|
|
9626
9625
|
const tickMs = node.tickMs ?? DEFAULT_TICK_MS;
|
|
9627
9626
|
const { ageMs, progress, fade } = fxLifecycle(view, epochNowMs, tickMs);
|
|
@@ -9658,6 +9657,7 @@ function expandFxItem(view, node, epochNowMs, dim, projector) {
|
|
|
9658
9657
|
}
|
|
9659
9658
|
if (view.message) {
|
|
9660
9659
|
const pxSize = projector && view.size !== void 0 ? Math.max(10, Math.round(view.size * projector.tileWidth)) : void 0;
|
|
9660
|
+
const family = fontFamily ?? "system-ui, sans-serif";
|
|
9661
9661
|
const text = {
|
|
9662
9662
|
type: "draw-text",
|
|
9663
9663
|
text: view.message,
|
|
@@ -9665,18 +9665,18 @@ function expandFxItem(view, node, epochNowMs, dim, projector) {
|
|
|
9665
9665
|
offsetY: -(0.15 + 0.55 * progress),
|
|
9666
9666
|
color: view.color ?? node.textColor ?? DEFAULT_TEXT_COLOR,
|
|
9667
9667
|
opacity: fade,
|
|
9668
|
-
|
|
9668
|
+
font: `bold ${pxSize ?? 14}px ${family}`
|
|
9669
9669
|
};
|
|
9670
9670
|
out.push(text);
|
|
9671
9671
|
}
|
|
9672
9672
|
return out;
|
|
9673
9673
|
}
|
|
9674
|
-
function expandFxLayer(node, epochNowMs, dim, projector) {
|
|
9674
|
+
function expandFxLayer(node, epochNowMs, dim, projector, fontFamily) {
|
|
9675
9675
|
if (!Array.isArray(node.items)) return [];
|
|
9676
9676
|
const out = [];
|
|
9677
9677
|
for (const item of node.items) {
|
|
9678
9678
|
if (!item || typeof item.id !== "string") continue;
|
|
9679
|
-
out.push(...expandFxItem(resolveFxView(item, node.presets), node, epochNowMs, dim, projector));
|
|
9679
|
+
out.push(...expandFxItem(resolveFxView(item, node.presets), node, epochNowMs, dim, projector, fontFamily));
|
|
9680
9680
|
}
|
|
9681
9681
|
return out;
|
|
9682
9682
|
}
|
|
@@ -9743,7 +9743,7 @@ function paintDrawable(painter, node, dctx) {
|
|
|
9743
9743
|
break;
|
|
9744
9744
|
case "draw-fx-layer": {
|
|
9745
9745
|
const epochNow = dctx.time > 0 && typeof performance !== "undefined" ? performance.timeOrigin + dctx.time : 0;
|
|
9746
|
-
for (const child of expandFxLayer(node, epochNow, "2d", dctx.projector)) paintDrawable(painter, child, dctx);
|
|
9746
|
+
for (const child of expandFxLayer(node, epochNow, "2d", dctx.projector, dctx.fontFamily)) paintDrawable(painter, child, dctx);
|
|
9747
9747
|
break;
|
|
9748
9748
|
}
|
|
9749
9749
|
}
|
|
@@ -10204,7 +10204,7 @@ var init_LearningCanvas = __esm({
|
|
|
10204
10204
|
if (drawables?.length && projector) {
|
|
10205
10205
|
const painter = createWebPainter(ctx, invalidateRef.current);
|
|
10206
10206
|
const timeMs = needsAnim && typeof performance !== "undefined" ? performance.now() : 0;
|
|
10207
|
-
const dctx = { projector, time: timeMs, invalidate: invalidateRef.current };
|
|
10207
|
+
const dctx = { projector, time: timeMs, invalidate: invalidateRef.current, fontFamily: themeBodyFont(canvas) };
|
|
10208
10208
|
for (const node of drawables) {
|
|
10209
10209
|
paintDrawable(painter, node, dctx);
|
|
10210
10210
|
}
|
|
@@ -13063,9 +13063,11 @@ var init_Tabs = __esm({
|
|
|
13063
13063
|
}
|
|
13064
13064
|
};
|
|
13065
13065
|
const handleKeyDown = (e, index) => {
|
|
13066
|
-
|
|
13066
|
+
const prevKey = orientation === "vertical" ? "ArrowUp" : "ArrowLeft";
|
|
13067
|
+
const nextKey = orientation === "vertical" ? "ArrowDown" : "ArrowRight";
|
|
13068
|
+
if (e.key === prevKey || e.key === nextKey) {
|
|
13067
13069
|
e.preventDefault();
|
|
13068
|
-
const direction = e.key ===
|
|
13070
|
+
const direction = e.key === prevKey ? -1 : 1;
|
|
13069
13071
|
const nextIndex = (index + direction + safeItems.length) % safeItems.length;
|
|
13070
13072
|
const nextTab = safeItems[nextIndex];
|
|
13071
13073
|
if (nextTab && !nextTab.disabled) {
|
|
@@ -13640,7 +13642,7 @@ var init_CodeBlock = __esm({
|
|
|
13640
13642
|
DIFF_STYLE_FALLBACK = { bg: "", prefix: " ", text: "text-foreground" };
|
|
13641
13643
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
13642
13644
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
13643
|
-
CodeBlock =
|
|
13645
|
+
CodeBlock = React78__default.memo(
|
|
13644
13646
|
({
|
|
13645
13647
|
code: rawCode,
|
|
13646
13648
|
language = "text",
|
|
@@ -14223,14 +14225,77 @@ var init_CodeBlock = __esm({
|
|
|
14223
14225
|
CodeBlock.displayName = "CodeBlock";
|
|
14224
14226
|
}
|
|
14225
14227
|
});
|
|
14228
|
+
function loadMermaid() {
|
|
14229
|
+
mermaidModule ?? (mermaidModule = import('mermaid').then((m) => m.default));
|
|
14230
|
+
return mermaidModule;
|
|
14231
|
+
}
|
|
14232
|
+
var mermaidModule, MermaidDiagram;
|
|
14233
|
+
var init_MermaidDiagram = __esm({
|
|
14234
|
+
"components/core/molecules/markdown/MermaidDiagram.tsx"() {
|
|
14235
|
+
init_Box();
|
|
14236
|
+
init_Typography();
|
|
14237
|
+
init_CodeBlock();
|
|
14238
|
+
init_cn();
|
|
14239
|
+
mermaidModule = null;
|
|
14240
|
+
MermaidDiagram = React78__default.memo(
|
|
14241
|
+
({ code, className }) => {
|
|
14242
|
+
const { resolvedMode } = useTheme();
|
|
14243
|
+
const containerRef = useRef(null);
|
|
14244
|
+
const [error, setError] = useState(null);
|
|
14245
|
+
const reactId = useId();
|
|
14246
|
+
useEffect(() => {
|
|
14247
|
+
let active = true;
|
|
14248
|
+
void (async () => {
|
|
14249
|
+
try {
|
|
14250
|
+
const mermaid = await loadMermaid();
|
|
14251
|
+
mermaid.initialize({
|
|
14252
|
+
startOnLoad: false,
|
|
14253
|
+
securityLevel: "strict",
|
|
14254
|
+
theme: resolvedMode === "dark" ? "dark" : "default"
|
|
14255
|
+
});
|
|
14256
|
+
const domId = `mermaid-${reactId.replace(/[^a-zA-Z0-9]/g, "")}`;
|
|
14257
|
+
const { svg } = await mermaid.render(domId, code);
|
|
14258
|
+
if (!active || !containerRef.current) return;
|
|
14259
|
+
containerRef.current.innerHTML = svg;
|
|
14260
|
+
setError(null);
|
|
14261
|
+
} catch (err) {
|
|
14262
|
+
if (active) setError(err instanceof Error ? err.message : String(err));
|
|
14263
|
+
}
|
|
14264
|
+
})();
|
|
14265
|
+
return () => {
|
|
14266
|
+
active = false;
|
|
14267
|
+
};
|
|
14268
|
+
}, [code, resolvedMode, reactId]);
|
|
14269
|
+
return /* @__PURE__ */ jsxs(Box, { className: cn("not-prose my-4", className), children: [
|
|
14270
|
+
error !== null && /* @__PURE__ */ jsxs(Box, { className: "space-y-2 mb-2", children: [
|
|
14271
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-error whitespace-pre-wrap", children: error }),
|
|
14272
|
+
/* @__PURE__ */ jsx(CodeBlock, { code, language: "mermaid" })
|
|
14273
|
+
] }),
|
|
14274
|
+
/* @__PURE__ */ jsx(
|
|
14275
|
+
Box,
|
|
14276
|
+
{
|
|
14277
|
+
ref: containerRef,
|
|
14278
|
+
"data-testid": "mermaid-diagram",
|
|
14279
|
+
className: "overflow-x-auto",
|
|
14280
|
+
style: error !== null ? { display: "none" } : void 0
|
|
14281
|
+
}
|
|
14282
|
+
)
|
|
14283
|
+
] });
|
|
14284
|
+
},
|
|
14285
|
+
(prev, next) => prev.code === next.code && prev.className === next.className
|
|
14286
|
+
);
|
|
14287
|
+
MermaidDiagram.displayName = "MermaidDiagram";
|
|
14288
|
+
}
|
|
14289
|
+
});
|
|
14226
14290
|
var MarkdownContent;
|
|
14227
14291
|
var init_MarkdownContent = __esm({
|
|
14228
14292
|
"components/core/molecules/markdown/MarkdownContent.tsx"() {
|
|
14229
14293
|
init_katex_min();
|
|
14230
14294
|
init_Box();
|
|
14231
14295
|
init_CodeBlock();
|
|
14296
|
+
init_MermaidDiagram();
|
|
14232
14297
|
init_cn();
|
|
14233
|
-
MarkdownContent =
|
|
14298
|
+
MarkdownContent = React78__default.memo(
|
|
14234
14299
|
({ content, direction = "ltr", className }) => {
|
|
14235
14300
|
const { t: _t } = useTranslate();
|
|
14236
14301
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -14275,6 +14340,9 @@ var init_MarkdownContent = __esm({
|
|
|
14275
14340
|
if (!inline) {
|
|
14276
14341
|
const match = /language-(\w+)/.exec(codeClassName ?? "");
|
|
14277
14342
|
const code = String(children).replace(/\n$/, "");
|
|
14343
|
+
if (match?.[1] === "mermaid") {
|
|
14344
|
+
return /* @__PURE__ */ jsx(MermaidDiagram, { code });
|
|
14345
|
+
}
|
|
14278
14346
|
if (match) {
|
|
14279
14347
|
return /* @__PURE__ */ jsx(
|
|
14280
14348
|
CodeBlock,
|
|
@@ -15557,7 +15625,7 @@ var init_StateMachineView = __esm({
|
|
|
15557
15625
|
style: { top: title ? 30 : 0 },
|
|
15558
15626
|
children: [
|
|
15559
15627
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
15560
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
15628
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React78__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
15561
15629
|
StateNode,
|
|
15562
15630
|
{
|
|
15563
15631
|
state,
|
|
@@ -18198,8 +18266,8 @@ function MiniMap({
|
|
|
18198
18266
|
tileAssets,
|
|
18199
18267
|
unitAssets
|
|
18200
18268
|
}) {
|
|
18201
|
-
const canvasRef =
|
|
18202
|
-
const imgCacheRef =
|
|
18269
|
+
const canvasRef = React78.useRef(null);
|
|
18270
|
+
const imgCacheRef = React78.useRef(/* @__PURE__ */ new Map());
|
|
18203
18271
|
function loadImg(url) {
|
|
18204
18272
|
const cached = imgCacheRef.current.get(url);
|
|
18205
18273
|
if (cached) return cached.complete ? cached : null;
|
|
@@ -18215,7 +18283,7 @@ function MiniMap({
|
|
|
18215
18283
|
imgCacheRef.current.set(url, img);
|
|
18216
18284
|
return null;
|
|
18217
18285
|
}
|
|
18218
|
-
|
|
18286
|
+
React78.useEffect(() => {
|
|
18219
18287
|
const canvas = canvasRef.current;
|
|
18220
18288
|
if (!canvas) return;
|
|
18221
18289
|
const ctx = canvas.getContext("2d");
|
|
@@ -18796,7 +18864,7 @@ function Canvas2D({
|
|
|
18796
18864
|
const registerChildDrawable = useCallback((node) => {
|
|
18797
18865
|
childDrawablesRef.current.push(node);
|
|
18798
18866
|
}, []);
|
|
18799
|
-
const hasJsxChildren =
|
|
18867
|
+
const hasJsxChildren = React78.Children.count(children) > 0;
|
|
18800
18868
|
function isDrawableLayer(node) {
|
|
18801
18869
|
return node.type === "draw-sprite-layer" || node.type === "draw-shape-layer" || node.type === "draw-text-layer";
|
|
18802
18870
|
}
|
|
@@ -19354,7 +19422,7 @@ function Canvas({
|
|
|
19354
19422
|
if (mode !== "3d") return;
|
|
19355
19423
|
const next = childDrawablesRef.current;
|
|
19356
19424
|
canvasLog.debug("children:adopt", { registered: next.length, adopted: childDrawables.length });
|
|
19357
|
-
if (next.length === 0 &&
|
|
19425
|
+
if (next.length === 0 && React78.Children.count(children) > 0) return;
|
|
19358
19426
|
setChildDrawables(
|
|
19359
19427
|
(prev) => prev.length === next.length && JSON.stringify(prev) === JSON.stringify(next) ? prev : [...next]
|
|
19360
19428
|
);
|
|
@@ -19392,7 +19460,7 @@ function Canvas({
|
|
|
19392
19460
|
};
|
|
19393
19461
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
19394
19462
|
/* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(Canvas3DHost2, { ...props3d }) }),
|
|
19395
|
-
|
|
19463
|
+
React78.Children.count(children) > 0 && /* @__PURE__ */ jsx(DrawableRegistryContext.Provider, { value: registerChildDrawable, children: /* @__PURE__ */ jsx("div", { "aria-hidden": "true", style: { position: "absolute", width: 0, height: 0, overflow: "hidden" }, children }) })
|
|
19396
19464
|
] });
|
|
19397
19465
|
}
|
|
19398
19466
|
return /* @__PURE__ */ jsx(
|
|
@@ -21987,9 +22055,9 @@ function ControlButton({
|
|
|
21987
22055
|
className
|
|
21988
22056
|
}) {
|
|
21989
22057
|
const eventBus = useEventBus();
|
|
21990
|
-
const [isPressed, setIsPressed] =
|
|
22058
|
+
const [isPressed, setIsPressed] = React78.useState(false);
|
|
21991
22059
|
const actualPressed = pressed ?? isPressed;
|
|
21992
|
-
const handlePointerDown =
|
|
22060
|
+
const handlePointerDown = React78.useCallback(
|
|
21993
22061
|
(e) => {
|
|
21994
22062
|
e.preventDefault();
|
|
21995
22063
|
if (disabled) return;
|
|
@@ -21999,7 +22067,7 @@ function ControlButton({
|
|
|
21999
22067
|
},
|
|
22000
22068
|
[disabled, pressEvent, eventBus, onPress]
|
|
22001
22069
|
);
|
|
22002
|
-
const handlePointerUp =
|
|
22070
|
+
const handlePointerUp = React78.useCallback(
|
|
22003
22071
|
(e) => {
|
|
22004
22072
|
e.preventDefault();
|
|
22005
22073
|
if (disabled) return;
|
|
@@ -22009,7 +22077,7 @@ function ControlButton({
|
|
|
22009
22077
|
},
|
|
22010
22078
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
22011
22079
|
);
|
|
22012
|
-
const handlePointerLeave =
|
|
22080
|
+
const handlePointerLeave = React78.useCallback(
|
|
22013
22081
|
(e) => {
|
|
22014
22082
|
if (isPressed) {
|
|
22015
22083
|
setIsPressed(false);
|
|
@@ -22098,18 +22166,18 @@ function ControlGrid({
|
|
|
22098
22166
|
className
|
|
22099
22167
|
}) {
|
|
22100
22168
|
const eventBus = useEventBus();
|
|
22101
|
-
const [active, setActive] =
|
|
22102
|
-
const [coarse, setCoarse] =
|
|
22169
|
+
const [active, setActive] = React78.useState(/* @__PURE__ */ new Set());
|
|
22170
|
+
const [coarse, setCoarse] = React78.useState(
|
|
22103
22171
|
() => typeof window !== "undefined" && window.matchMedia("(pointer: coarse)").matches
|
|
22104
22172
|
);
|
|
22105
|
-
|
|
22173
|
+
React78.useEffect(() => {
|
|
22106
22174
|
if (visibility !== "auto" || typeof window === "undefined") return;
|
|
22107
22175
|
const mq = window.matchMedia("(pointer: coarse)");
|
|
22108
22176
|
const onChange = (e) => setCoarse(e.matches);
|
|
22109
22177
|
mq.addEventListener("change", onChange);
|
|
22110
22178
|
return () => mq.removeEventListener("change", onChange);
|
|
22111
22179
|
}, [visibility]);
|
|
22112
|
-
const handlePress =
|
|
22180
|
+
const handlePress = React78.useCallback(
|
|
22113
22181
|
(id) => {
|
|
22114
22182
|
setActive((prev) => new Set(prev).add(id));
|
|
22115
22183
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -22123,7 +22191,7 @@ function ControlGrid({
|
|
|
22123
22191
|
},
|
|
22124
22192
|
[kind, actionEvent, directionEvent, directionEvents, eventBus, onAction, onDirection]
|
|
22125
22193
|
);
|
|
22126
|
-
const handleRelease =
|
|
22194
|
+
const handleRelease = React78.useCallback(
|
|
22127
22195
|
(id) => {
|
|
22128
22196
|
setActive((prev) => {
|
|
22129
22197
|
const next = new Set(prev);
|
|
@@ -23379,7 +23447,7 @@ var init_Menu = __esm({
|
|
|
23379
23447
|
"bottom-end": "bottom-start"
|
|
23380
23448
|
};
|
|
23381
23449
|
const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
|
|
23382
|
-
const triggerElement =
|
|
23450
|
+
const triggerElement = React78__default.isValidElement(trigger) ? React78__default.cloneElement(trigger, {
|
|
23383
23451
|
ref: triggerRef,
|
|
23384
23452
|
onClick: handleToggle
|
|
23385
23453
|
}) : /* @__PURE__ */ jsx(
|
|
@@ -23482,14 +23550,14 @@ function useDataDnd(args) {
|
|
|
23482
23550
|
const isZone = Boolean(dragGroup || accepts || sortable);
|
|
23483
23551
|
const enabled = isZone || Boolean(dndRoot);
|
|
23484
23552
|
const eventBus = useEventBus();
|
|
23485
|
-
const parentRoot =
|
|
23553
|
+
const parentRoot = React78__default.useContext(RootCtx);
|
|
23486
23554
|
const isRoot = enabled && parentRoot === null;
|
|
23487
|
-
const zoneId =
|
|
23555
|
+
const zoneId = React78__default.useId();
|
|
23488
23556
|
const ownGroup = dragGroup ?? accepts ?? zoneId;
|
|
23489
|
-
const [optimisticOrders, setOptimisticOrders] =
|
|
23490
|
-
const optimisticOrdersRef =
|
|
23557
|
+
const [optimisticOrders, setOptimisticOrders] = React78__default.useState(() => /* @__PURE__ */ new Map());
|
|
23558
|
+
const optimisticOrdersRef = React78__default.useRef(optimisticOrders);
|
|
23491
23559
|
optimisticOrdersRef.current = optimisticOrders;
|
|
23492
|
-
const clearOptimisticOrder =
|
|
23560
|
+
const clearOptimisticOrder = React78__default.useCallback((group) => {
|
|
23493
23561
|
setOptimisticOrders((prev) => {
|
|
23494
23562
|
if (!prev.has(group)) return prev;
|
|
23495
23563
|
const next = new Map(prev);
|
|
@@ -23514,7 +23582,7 @@ function useDataDnd(args) {
|
|
|
23514
23582
|
const raw = it[dndItemIdField];
|
|
23515
23583
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
23516
23584
|
}).join("|");
|
|
23517
|
-
const itemIds =
|
|
23585
|
+
const itemIds = React78__default.useMemo(
|
|
23518
23586
|
() => orderedItems.map((it, idx) => {
|
|
23519
23587
|
const raw = it[dndItemIdField];
|
|
23520
23588
|
return raw != null ? String(raw) : `__idx_${idx}`;
|
|
@@ -23525,7 +23593,7 @@ function useDataDnd(args) {
|
|
|
23525
23593
|
const raw = it[dndItemIdField];
|
|
23526
23594
|
return raw != null ? String(raw) : `__${idx}`;
|
|
23527
23595
|
}).join("|");
|
|
23528
|
-
|
|
23596
|
+
React78__default.useEffect(() => {
|
|
23529
23597
|
const root = isRoot ? null : parentRoot;
|
|
23530
23598
|
if (root) {
|
|
23531
23599
|
root.clearOptimisticOrder(ownGroup);
|
|
@@ -23533,20 +23601,20 @@ function useDataDnd(args) {
|
|
|
23533
23601
|
clearOptimisticOrder(ownGroup);
|
|
23534
23602
|
}
|
|
23535
23603
|
}, [itemsContentSig, ownGroup]);
|
|
23536
|
-
const zonesRef =
|
|
23537
|
-
const registerZone =
|
|
23604
|
+
const zonesRef = React78__default.useRef(/* @__PURE__ */ new Map());
|
|
23605
|
+
const registerZone = React78__default.useCallback((zoneId2, meta2) => {
|
|
23538
23606
|
zonesRef.current.set(zoneId2, meta2);
|
|
23539
23607
|
}, []);
|
|
23540
|
-
const unregisterZone =
|
|
23608
|
+
const unregisterZone = React78__default.useCallback((zoneId2) => {
|
|
23541
23609
|
zonesRef.current.delete(zoneId2);
|
|
23542
23610
|
}, []);
|
|
23543
|
-
const [activeDrag, setActiveDrag] =
|
|
23544
|
-
const [overZoneGroup, setOverZoneGroup] =
|
|
23545
|
-
const meta =
|
|
23611
|
+
const [activeDrag, setActiveDrag] = React78__default.useState(null);
|
|
23612
|
+
const [overZoneGroup, setOverZoneGroup] = React78__default.useState(null);
|
|
23613
|
+
const meta = React78__default.useMemo(
|
|
23546
23614
|
() => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
|
|
23547
23615
|
[ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
|
|
23548
23616
|
);
|
|
23549
|
-
|
|
23617
|
+
React78__default.useEffect(() => {
|
|
23550
23618
|
const target = isRoot ? null : parentRoot;
|
|
23551
23619
|
if (!target) {
|
|
23552
23620
|
zonesRef.current.set(zoneId, meta);
|
|
@@ -23565,7 +23633,7 @@ function useDataDnd(args) {
|
|
|
23565
23633
|
}, [parentRoot, isRoot, zoneId, meta]);
|
|
23566
23634
|
const sensors = useAlmadarDndSensors(true);
|
|
23567
23635
|
const collisionDetection = almadarDndCollisionDetection;
|
|
23568
|
-
const findZoneByItem =
|
|
23636
|
+
const findZoneByItem = React78__default.useCallback(
|
|
23569
23637
|
(id) => {
|
|
23570
23638
|
for (const z of zonesRef.current.values()) {
|
|
23571
23639
|
if (z.itemIds.includes(id)) return z;
|
|
@@ -23574,7 +23642,7 @@ function useDataDnd(args) {
|
|
|
23574
23642
|
},
|
|
23575
23643
|
[]
|
|
23576
23644
|
);
|
|
23577
|
-
|
|
23645
|
+
React78__default.useCallback(
|
|
23578
23646
|
(group) => {
|
|
23579
23647
|
for (const z of zonesRef.current.values()) {
|
|
23580
23648
|
if (z.group === group) return z;
|
|
@@ -23583,7 +23651,7 @@ function useDataDnd(args) {
|
|
|
23583
23651
|
},
|
|
23584
23652
|
[]
|
|
23585
23653
|
);
|
|
23586
|
-
const handleDragEnd =
|
|
23654
|
+
const handleDragEnd = React78__default.useCallback(
|
|
23587
23655
|
(event) => {
|
|
23588
23656
|
const { active, over } = event;
|
|
23589
23657
|
const activeIdStr = String(active.id);
|
|
@@ -23674,8 +23742,8 @@ function useDataDnd(args) {
|
|
|
23674
23742
|
},
|
|
23675
23743
|
[eventBus]
|
|
23676
23744
|
);
|
|
23677
|
-
const sortableData =
|
|
23678
|
-
const SortableItem =
|
|
23745
|
+
const sortableData = React78__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
|
|
23746
|
+
const SortableItem = React78__default.useCallback(
|
|
23679
23747
|
({ id, children }) => {
|
|
23680
23748
|
const {
|
|
23681
23749
|
attributes,
|
|
@@ -23715,7 +23783,7 @@ function useDataDnd(args) {
|
|
|
23715
23783
|
id: droppableId,
|
|
23716
23784
|
data: sortableData
|
|
23717
23785
|
});
|
|
23718
|
-
const ctx =
|
|
23786
|
+
const ctx = React78__default.useContext(RootCtx);
|
|
23719
23787
|
const activeDrag2 = ctx?.activeDrag ?? null;
|
|
23720
23788
|
const overZoneGroup2 = ctx?.overZoneGroup ?? null;
|
|
23721
23789
|
const isThisZoneOver = overZoneGroup2 === ownGroup;
|
|
@@ -23730,7 +23798,7 @@ function useDataDnd(args) {
|
|
|
23730
23798
|
showForeignPlaceholder,
|
|
23731
23799
|
ctxAvailable: ctx != null
|
|
23732
23800
|
});
|
|
23733
|
-
|
|
23801
|
+
React78__default.useEffect(() => {
|
|
23734
23802
|
dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
|
|
23735
23803
|
}, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
|
|
23736
23804
|
return /* @__PURE__ */ jsx(
|
|
@@ -23744,11 +23812,11 @@ function useDataDnd(args) {
|
|
|
23744
23812
|
}
|
|
23745
23813
|
);
|
|
23746
23814
|
};
|
|
23747
|
-
const rootContextValue =
|
|
23815
|
+
const rootContextValue = React78__default.useMemo(
|
|
23748
23816
|
() => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
|
|
23749
23817
|
[registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
|
|
23750
23818
|
);
|
|
23751
|
-
const handleDragStart =
|
|
23819
|
+
const handleDragStart = React78__default.useCallback((event) => {
|
|
23752
23820
|
const sourceZone = findZoneByItem(event.active.id);
|
|
23753
23821
|
const rect = event.active.rect.current.initial;
|
|
23754
23822
|
const height = rect?.height && rect.height > 0 ? rect.height : 64;
|
|
@@ -23767,7 +23835,7 @@ function useDataDnd(args) {
|
|
|
23767
23835
|
isRoot
|
|
23768
23836
|
});
|
|
23769
23837
|
}, [findZoneByItem, isRoot, zoneId]);
|
|
23770
|
-
const handleDragOver =
|
|
23838
|
+
const handleDragOver = React78__default.useCallback((event) => {
|
|
23771
23839
|
const { active, over } = event;
|
|
23772
23840
|
const overData = over?.data?.current;
|
|
23773
23841
|
const overGroup = overData?.dndGroup ?? null;
|
|
@@ -23837,7 +23905,7 @@ function useDataDnd(args) {
|
|
|
23837
23905
|
return next;
|
|
23838
23906
|
});
|
|
23839
23907
|
}, []);
|
|
23840
|
-
const handleDragCancel =
|
|
23908
|
+
const handleDragCancel = React78__default.useCallback((event) => {
|
|
23841
23909
|
setActiveDrag(null);
|
|
23842
23910
|
setOverZoneGroup(null);
|
|
23843
23911
|
dndLog.warn("dragCancel", {
|
|
@@ -23845,12 +23913,12 @@ function useDataDnd(args) {
|
|
|
23845
23913
|
reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
|
|
23846
23914
|
});
|
|
23847
23915
|
}, []);
|
|
23848
|
-
const handleDragEndWithCleanup =
|
|
23916
|
+
const handleDragEndWithCleanup = React78__default.useCallback((event) => {
|
|
23849
23917
|
handleDragEnd(event);
|
|
23850
23918
|
setActiveDrag(null);
|
|
23851
23919
|
setOverZoneGroup(null);
|
|
23852
23920
|
}, [handleDragEnd]);
|
|
23853
|
-
const wrapContainer =
|
|
23921
|
+
const wrapContainer = React78__default.useCallback(
|
|
23854
23922
|
(children) => {
|
|
23855
23923
|
if (!enabled) return children;
|
|
23856
23924
|
const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
|
|
@@ -23904,7 +23972,7 @@ var init_useDataDnd = __esm({
|
|
|
23904
23972
|
init_useAlmadarDndCollision();
|
|
23905
23973
|
init_Box();
|
|
23906
23974
|
dndLog = createLogger("almadar:ui:dnd");
|
|
23907
|
-
RootCtx =
|
|
23975
|
+
RootCtx = React78__default.createContext(null);
|
|
23908
23976
|
}
|
|
23909
23977
|
});
|
|
23910
23978
|
function renderIconInput(icon, props) {
|
|
@@ -24419,7 +24487,7 @@ function DataList({
|
|
|
24419
24487
|
}) {
|
|
24420
24488
|
const eventBus = useEventBus();
|
|
24421
24489
|
const { t } = useTranslate();
|
|
24422
|
-
const [visibleCount, setVisibleCount] =
|
|
24490
|
+
const [visibleCount, setVisibleCount] = React78__default.useState(pageSize || Infinity);
|
|
24423
24491
|
const fieldDefs = fields ?? columns ?? [];
|
|
24424
24492
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
24425
24493
|
const dnd = useDataDnd({
|
|
@@ -24435,14 +24503,14 @@ function DataList({
|
|
|
24435
24503
|
dndRoot
|
|
24436
24504
|
});
|
|
24437
24505
|
const orderedData = dnd.orderedItems;
|
|
24438
|
-
const allData =
|
|
24506
|
+
const allData = React78__default.useMemo(
|
|
24439
24507
|
() => sortRows(orderedData, sortBy, sortDirection),
|
|
24440
24508
|
[orderedData, sortBy, sortDirection]
|
|
24441
24509
|
);
|
|
24442
24510
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
24443
24511
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
24444
24512
|
const hasRenderProp = typeof children === "function";
|
|
24445
|
-
|
|
24513
|
+
React78__default.useEffect(() => {
|
|
24446
24514
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
24447
24515
|
const childrenTypeOf = typeof children;
|
|
24448
24516
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -24562,7 +24630,7 @@ function DataList({
|
|
|
24562
24630
|
return v === void 0 || v === null || v === "" ? raw : String(v);
|
|
24563
24631
|
};
|
|
24564
24632
|
return /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: cn("py-2", className), children: [
|
|
24565
|
-
groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
24633
|
+
groups2.map((group, gi) => /* @__PURE__ */ jsxs(React78__default.Fragment, { children: [
|
|
24566
24634
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
24567
24635
|
group.items.map((itemData, index) => {
|
|
24568
24636
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -24778,7 +24846,7 @@ function DataList({
|
|
|
24778
24846
|
className
|
|
24779
24847
|
),
|
|
24780
24848
|
children: [
|
|
24781
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
24849
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React78__default.Fragment, { children: [
|
|
24782
24850
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
24783
24851
|
group.items.map(
|
|
24784
24852
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -24887,8 +24955,8 @@ function ScalarControl({
|
|
|
24887
24955
|
}
|
|
24888
24956
|
const numeric = typeof value === "number";
|
|
24889
24957
|
const initial = value === null ? "" : String(value);
|
|
24890
|
-
const [draft, setDraft] =
|
|
24891
|
-
|
|
24958
|
+
const [draft, setDraft] = React78__default.useState(initial);
|
|
24959
|
+
React78__default.useEffect(() => setDraft(initial), [initial]);
|
|
24892
24960
|
const commit = () => {
|
|
24893
24961
|
if (numeric) {
|
|
24894
24962
|
const n = draft.trim() === "" ? 0 : Number(draft);
|
|
@@ -24956,8 +25024,8 @@ function Row({
|
|
|
24956
25024
|
onRemove,
|
|
24957
25025
|
readonly
|
|
24958
25026
|
}) {
|
|
24959
|
-
const [keyDraft, setKeyDraft] =
|
|
24960
|
-
|
|
25027
|
+
const [keyDraft, setKeyDraft] = React78__default.useState(rowKey);
|
|
25028
|
+
React78__default.useEffect(() => setKeyDraft(rowKey), [rowKey]);
|
|
24961
25029
|
const container = isObj(value) || isArr(value);
|
|
24962
25030
|
return /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "group w-max min-w-full", children: [
|
|
24963
25031
|
/* @__PURE__ */ jsxs(HStack, { gap: "xs", align: "center", className: "py-0.5 w-max", children: [
|
|
@@ -25000,7 +25068,7 @@ function ContainerNode({
|
|
|
25000
25068
|
depth,
|
|
25001
25069
|
readonly
|
|
25002
25070
|
}) {
|
|
25003
|
-
const [open, setOpen] =
|
|
25071
|
+
const [open, setOpen] = React78__default.useState(depth < 2);
|
|
25004
25072
|
const array = isArr(value);
|
|
25005
25073
|
const entries = array ? value.map((v, i) => [String(i), v]) : Object.entries(value);
|
|
25006
25074
|
const setObjValue = (key, next) => {
|
|
@@ -25142,7 +25210,7 @@ var init_FormSection = __esm({
|
|
|
25142
25210
|
columns = 1,
|
|
25143
25211
|
className
|
|
25144
25212
|
}) => {
|
|
25145
|
-
const [collapsed, setCollapsed] =
|
|
25213
|
+
const [collapsed, setCollapsed] = React78__default.useState(defaultCollapsed);
|
|
25146
25214
|
const { t } = useTranslate();
|
|
25147
25215
|
const eventBus = useEventBus();
|
|
25148
25216
|
const gridClass = {
|
|
@@ -25150,7 +25218,7 @@ var init_FormSection = __esm({
|
|
|
25150
25218
|
2: "grid-cols-1 md:grid-cols-2",
|
|
25151
25219
|
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
|
|
25152
25220
|
}[columns];
|
|
25153
|
-
|
|
25221
|
+
React78__default.useCallback(() => {
|
|
25154
25222
|
if (collapsible) {
|
|
25155
25223
|
setCollapsed((prev) => !prev);
|
|
25156
25224
|
eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
|
|
@@ -25559,8 +25627,8 @@ function TextLikeControl({
|
|
|
25559
25627
|
onCommit
|
|
25560
25628
|
}) {
|
|
25561
25629
|
const initial = value === void 0 || value === null ? "" : String(value);
|
|
25562
|
-
const [draft, setDraft] =
|
|
25563
|
-
|
|
25630
|
+
const [draft, setDraft] = React78__default.useState(initial);
|
|
25631
|
+
React78__default.useEffect(() => setDraft(initial), [initial]);
|
|
25564
25632
|
const commit = () => {
|
|
25565
25633
|
if (numeric) {
|
|
25566
25634
|
const n = draft.trim() === "" ? 0 : Number(draft);
|
|
@@ -25749,14 +25817,14 @@ var init_NodeSlotEditor = __esm({
|
|
|
25749
25817
|
isObj2 = (v) => v !== null && v !== void 0 && typeof v === "object" && !Array.isArray(v);
|
|
25750
25818
|
NodeSlotEditor = ({ value, onChange, className }) => {
|
|
25751
25819
|
const { type, props, wasArray } = normalize(value);
|
|
25752
|
-
const patterns =
|
|
25820
|
+
const patterns = React78__default.useMemo(() => {
|
|
25753
25821
|
try {
|
|
25754
25822
|
return [...getKnownPatterns()].sort();
|
|
25755
25823
|
} catch {
|
|
25756
25824
|
return [];
|
|
25757
25825
|
}
|
|
25758
25826
|
}, []);
|
|
25759
|
-
const options =
|
|
25827
|
+
const options = React78__default.useMemo(
|
|
25760
25828
|
() => [{ value: "", label: "\u2014 none \u2014" }, ...patterns.map((p) => ({ value: p, label: p }))],
|
|
25761
25829
|
[patterns]
|
|
25762
25830
|
);
|
|
@@ -25768,7 +25836,7 @@ var init_NodeSlotEditor = __esm({
|
|
|
25768
25836
|
const pattern = { type: nextType, ...nextProps };
|
|
25769
25837
|
onChange(wasArray || value === void 0 ? [pattern] : pattern);
|
|
25770
25838
|
};
|
|
25771
|
-
const schemaEntries =
|
|
25839
|
+
const schemaEntries = React78__default.useMemo(() => {
|
|
25772
25840
|
if (!type) return [];
|
|
25773
25841
|
const def = getPatternDefinition(type);
|
|
25774
25842
|
if (!def?.propsSchema) return [];
|
|
@@ -25809,6 +25877,112 @@ var init_NodeSlotEditor = __esm({
|
|
|
25809
25877
|
};
|
|
25810
25878
|
}
|
|
25811
25879
|
});
|
|
25880
|
+
function useDraggable({ payload, disabled = false }) {
|
|
25881
|
+
const [isDragging, setIsDragging] = useState(false);
|
|
25882
|
+
const eventBus = useEventBus();
|
|
25883
|
+
const handleDragStart = useCallback(
|
|
25884
|
+
(e) => {
|
|
25885
|
+
if (disabled) {
|
|
25886
|
+
e.preventDefault();
|
|
25887
|
+
return;
|
|
25888
|
+
}
|
|
25889
|
+
e.dataTransfer.setData(ALMADAR_DND_MIME, JSON.stringify(payload));
|
|
25890
|
+
e.dataTransfer.effectAllowed = "copy";
|
|
25891
|
+
setIsDragging(true);
|
|
25892
|
+
eventBus.emit("UI:DRAG_START", { kind: payload.kind, data: payload.data });
|
|
25893
|
+
},
|
|
25894
|
+
[disabled, payload, eventBus]
|
|
25895
|
+
);
|
|
25896
|
+
const handleDragEnd = useCallback(
|
|
25897
|
+
(e) => {
|
|
25898
|
+
setIsDragging(false);
|
|
25899
|
+
eventBus.emit("UI:DRAG_END", { kind: payload.kind, data: payload.data });
|
|
25900
|
+
},
|
|
25901
|
+
[payload, eventBus]
|
|
25902
|
+
);
|
|
25903
|
+
const dragProps = useMemo(
|
|
25904
|
+
() => ({
|
|
25905
|
+
draggable: !disabled,
|
|
25906
|
+
onDragStart: handleDragStart,
|
|
25907
|
+
onDragEnd: handleDragEnd,
|
|
25908
|
+
"aria-grabbed": isDragging
|
|
25909
|
+
}),
|
|
25910
|
+
[disabled, handleDragStart, handleDragEnd, isDragging]
|
|
25911
|
+
);
|
|
25912
|
+
return { dragProps, isDragging };
|
|
25913
|
+
}
|
|
25914
|
+
var ALMADAR_DND_MIME;
|
|
25915
|
+
var init_useDraggable = __esm({
|
|
25916
|
+
"hooks/useDraggable.ts"() {
|
|
25917
|
+
"use client";
|
|
25918
|
+
init_useEventBus();
|
|
25919
|
+
ALMADAR_DND_MIME = "application/x-almadar-dnd";
|
|
25920
|
+
}
|
|
25921
|
+
});
|
|
25922
|
+
function parsePayload(e) {
|
|
25923
|
+
try {
|
|
25924
|
+
const raw = e.dataTransfer.getData(ALMADAR_DND_MIME);
|
|
25925
|
+
if (!raw) return null;
|
|
25926
|
+
const parsed = JSON.parse(raw);
|
|
25927
|
+
if (typeof parsed.kind !== "string" || !parsed.data) return null;
|
|
25928
|
+
return parsed;
|
|
25929
|
+
} catch {
|
|
25930
|
+
return null;
|
|
25931
|
+
}
|
|
25932
|
+
}
|
|
25933
|
+
function hasAlmadarPayload(e) {
|
|
25934
|
+
return e.dataTransfer.types.includes(ALMADAR_DND_MIME);
|
|
25935
|
+
}
|
|
25936
|
+
function useDropZone({ accepts, onDrop, disabled = false }) {
|
|
25937
|
+
const [isOver, setIsOver] = useState(false);
|
|
25938
|
+
const eventBus = useEventBus();
|
|
25939
|
+
const handleDragOver = useCallback(
|
|
25940
|
+
(e) => {
|
|
25941
|
+
if (disabled) return;
|
|
25942
|
+
if (!hasAlmadarPayload(e)) return;
|
|
25943
|
+
e.preventDefault();
|
|
25944
|
+
e.dataTransfer.dropEffect = "copy";
|
|
25945
|
+
setIsOver(true);
|
|
25946
|
+
},
|
|
25947
|
+
[disabled]
|
|
25948
|
+
);
|
|
25949
|
+
const handleDragLeave = useCallback(
|
|
25950
|
+
(e) => {
|
|
25951
|
+
setIsOver(false);
|
|
25952
|
+
},
|
|
25953
|
+
[]
|
|
25954
|
+
);
|
|
25955
|
+
const handleDrop = useCallback(
|
|
25956
|
+
(e) => {
|
|
25957
|
+
e.preventDefault();
|
|
25958
|
+
setIsOver(false);
|
|
25959
|
+
if (disabled) return;
|
|
25960
|
+
const payload = parsePayload(e);
|
|
25961
|
+
if (!payload) return;
|
|
25962
|
+
if (!accepts.includes(payload.kind)) return;
|
|
25963
|
+
const position = { x: e.clientX, y: e.clientY };
|
|
25964
|
+
onDrop(payload, position);
|
|
25965
|
+
eventBus.emit("UI:DROP", { kind: payload.kind, data: payload.data, ...position });
|
|
25966
|
+
},
|
|
25967
|
+
[disabled, accepts, onDrop, eventBus]
|
|
25968
|
+
);
|
|
25969
|
+
const dropProps = useMemo(
|
|
25970
|
+
() => ({
|
|
25971
|
+
onDragOver: handleDragOver,
|
|
25972
|
+
onDragLeave: handleDragLeave,
|
|
25973
|
+
onDrop: handleDrop
|
|
25974
|
+
}),
|
|
25975
|
+
[handleDragOver, handleDragLeave, handleDrop]
|
|
25976
|
+
);
|
|
25977
|
+
return { dropProps, isOver };
|
|
25978
|
+
}
|
|
25979
|
+
var init_useDropZone = __esm({
|
|
25980
|
+
"hooks/useDropZone.ts"() {
|
|
25981
|
+
"use client";
|
|
25982
|
+
init_useEventBus();
|
|
25983
|
+
init_useDraggable();
|
|
25984
|
+
}
|
|
25985
|
+
});
|
|
25812
25986
|
function fileIcon(name) {
|
|
25813
25987
|
const ext = name.split(".").pop()?.toLowerCase() ?? "";
|
|
25814
25988
|
switch (ext) {
|
|
@@ -25834,6 +26008,13 @@ function fileIcon(name) {
|
|
|
25834
26008
|
return "file";
|
|
25835
26009
|
}
|
|
25836
26010
|
}
|
|
26011
|
+
function siblingsOf(target, roots, childrenByParent) {
|
|
26012
|
+
if (target.parentId) {
|
|
26013
|
+
const parentSiblings = childrenByParent.get(target.parentId);
|
|
26014
|
+
if (parentSiblings?.some((sibling) => sibling.id === target.id)) return parentSiblings;
|
|
26015
|
+
}
|
|
26016
|
+
return roots;
|
|
26017
|
+
}
|
|
25837
26018
|
function ancestorsOf(id, byId) {
|
|
25838
26019
|
const out = /* @__PURE__ */ new Set();
|
|
25839
26020
|
if (!id) return out;
|
|
@@ -25851,6 +26032,8 @@ var init_FileTree = __esm({
|
|
|
25851
26032
|
init_Box();
|
|
25852
26033
|
init_Typography();
|
|
25853
26034
|
init_Icon();
|
|
26035
|
+
init_useDraggable();
|
|
26036
|
+
init_useDropZone();
|
|
25854
26037
|
TreeNodeItem = ({
|
|
25855
26038
|
node,
|
|
25856
26039
|
depth,
|
|
@@ -25934,10 +26117,12 @@ var init_FileTree = __esm({
|
|
|
25934
26117
|
depth,
|
|
25935
26118
|
indent,
|
|
25936
26119
|
childrenByParent,
|
|
26120
|
+
roots,
|
|
25937
26121
|
onNodeSelect,
|
|
25938
26122
|
onNodeAction,
|
|
25939
26123
|
nodeActionIcon,
|
|
25940
26124
|
nodeActionLabel,
|
|
26125
|
+
onNodeReorder,
|
|
25941
26126
|
selectedId,
|
|
25942
26127
|
look,
|
|
25943
26128
|
isExpanded,
|
|
@@ -25948,6 +26133,7 @@ var init_FileTree = __esm({
|
|
|
25948
26133
|
const expanded = hasChildren && isExpanded(item.id, depth);
|
|
25949
26134
|
const isSelected = selectedId !== void 0 && selectedId !== "" && item.id === selectedId;
|
|
25950
26135
|
const nav = look === "nav";
|
|
26136
|
+
const rowRef = useRef(null);
|
|
25951
26137
|
const handleClick = useCallback(() => {
|
|
25952
26138
|
if (hasChildren && !onNodeSelect) onToggle(item.id, expanded);
|
|
25953
26139
|
onNodeSelect?.(item.id);
|
|
@@ -25960,16 +26146,50 @@ var init_FileTree = __esm({
|
|
|
25960
26146
|
e.stopPropagation();
|
|
25961
26147
|
onNodeAction?.(item.id);
|
|
25962
26148
|
}, [item.id, onNodeAction]);
|
|
26149
|
+
const { dragProps } = useDraggable({
|
|
26150
|
+
payload: { kind: "tree-node", data: { id: item.id } },
|
|
26151
|
+
disabled: !onNodeReorder
|
|
26152
|
+
});
|
|
26153
|
+
const handleRowDrop = useCallback(
|
|
26154
|
+
(payload, position) => {
|
|
26155
|
+
if (!onNodeReorder) return;
|
|
26156
|
+
const draggedId = typeof payload.data.id === "string" ? payload.data.id : void 0;
|
|
26157
|
+
if (!draggedId || draggedId === item.id) return;
|
|
26158
|
+
const rect = rowRef.current?.getBoundingClientRect();
|
|
26159
|
+
if (!rect || rect.height === 0) return;
|
|
26160
|
+
const relY = position.y - rect.top;
|
|
26161
|
+
const third = rect.height / 3;
|
|
26162
|
+
if (relY >= third && relY <= third * 2) {
|
|
26163
|
+
const existingChildren = childrenByParent.get(item.id);
|
|
26164
|
+
onNodeReorder(draggedId, item.id, existingChildren ? existingChildren.length : 0);
|
|
26165
|
+
return;
|
|
26166
|
+
}
|
|
26167
|
+
const siblings = siblingsOf(item, roots, childrenByParent);
|
|
26168
|
+
const newParentId = siblings === roots ? null : item.parentId ?? null;
|
|
26169
|
+
const targetIndex = siblings.findIndex((sibling) => sibling.id === item.id);
|
|
26170
|
+
const index = relY < third ? targetIndex < 0 ? 0 : targetIndex : targetIndex < 0 ? siblings.length : targetIndex + 1;
|
|
26171
|
+
onNodeReorder(draggedId, newParentId, index);
|
|
26172
|
+
},
|
|
26173
|
+
[onNodeReorder, item, roots, childrenByParent]
|
|
26174
|
+
);
|
|
26175
|
+
const { dropProps } = useDropZone({
|
|
26176
|
+
accepts: ["tree-node"],
|
|
26177
|
+
onDrop: handleRowDrop,
|
|
26178
|
+
disabled: !onNodeReorder
|
|
26179
|
+
});
|
|
25963
26180
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
25964
26181
|
/* @__PURE__ */ jsxs(
|
|
25965
26182
|
Box,
|
|
25966
26183
|
{
|
|
26184
|
+
ref: rowRef,
|
|
25967
26185
|
className: `group/treerow flex items-center gap-1.5 px-2 cursor-pointer rounded-sm transition-colors ${nav ? "py-1" : "py-0.5"} ${isSelected ? "bg-primary text-primary-foreground" : nav ? "text-foreground hover:bg-muted" : "hover:bg-muted"}`,
|
|
25968
26186
|
style: { paddingLeft: depth * indent + 8 },
|
|
25969
26187
|
onClick: handleClick,
|
|
25970
26188
|
role: "treeitem",
|
|
25971
26189
|
"aria-selected": isSelected,
|
|
25972
26190
|
"aria-expanded": hasChildren ? expanded : void 0,
|
|
26191
|
+
...dragProps,
|
|
26192
|
+
...dropProps,
|
|
25973
26193
|
children: [
|
|
25974
26194
|
hasChildren ? /* @__PURE__ */ jsx(Box, { onClick: handleChevron, className: "flex items-center flex-shrink-0", role: "button", "aria-label": expanded ? "Collapse" : "Expand", children: /* @__PURE__ */ jsx(
|
|
25975
26195
|
Icon,
|
|
@@ -26016,10 +26236,12 @@ var init_FileTree = __esm({
|
|
|
26016
26236
|
depth: depth + 1,
|
|
26017
26237
|
indent,
|
|
26018
26238
|
childrenByParent,
|
|
26239
|
+
roots,
|
|
26019
26240
|
onNodeSelect,
|
|
26020
26241
|
onNodeAction,
|
|
26021
26242
|
nodeActionIcon,
|
|
26022
26243
|
nodeActionLabel,
|
|
26244
|
+
onNodeReorder,
|
|
26023
26245
|
selectedId,
|
|
26024
26246
|
look,
|
|
26025
26247
|
isExpanded,
|
|
@@ -26037,14 +26259,15 @@ var init_FileTree = __esm({
|
|
|
26037
26259
|
onNodeAction,
|
|
26038
26260
|
nodeActionIcon,
|
|
26039
26261
|
nodeActionLabel,
|
|
26262
|
+
onNodeReorder,
|
|
26040
26263
|
className,
|
|
26041
26264
|
indent = 16
|
|
26042
26265
|
}) => {
|
|
26043
26266
|
const [overrides, setOverrides] = useState(() => /* @__PURE__ */ new Map());
|
|
26044
|
-
const byId =
|
|
26045
|
-
const selectedAncestors =
|
|
26046
|
-
const lastSelectedRef =
|
|
26047
|
-
|
|
26267
|
+
const byId = React78__default.useMemo(() => new Map(items.map((node) => [node.id, node])), [items]);
|
|
26268
|
+
const selectedAncestors = React78__default.useMemo(() => ancestorsOf(selectedId, byId), [selectedId, byId]);
|
|
26269
|
+
const lastSelectedRef = React78__default.useRef(selectedId);
|
|
26270
|
+
React78__default.useEffect(() => {
|
|
26048
26271
|
if (selectedId === lastSelectedRef.current) return;
|
|
26049
26272
|
lastSelectedRef.current = selectedId;
|
|
26050
26273
|
setOverrides((prev) => {
|
|
@@ -26085,10 +26308,12 @@ var init_FileTree = __esm({
|
|
|
26085
26308
|
depth: 0,
|
|
26086
26309
|
indent,
|
|
26087
26310
|
childrenByParent,
|
|
26311
|
+
roots,
|
|
26088
26312
|
onNodeSelect,
|
|
26089
26313
|
onNodeAction,
|
|
26090
26314
|
nodeActionIcon,
|
|
26091
26315
|
nodeActionLabel,
|
|
26316
|
+
onNodeReorder,
|
|
26092
26317
|
selectedId,
|
|
26093
26318
|
look,
|
|
26094
26319
|
isExpanded,
|
|
@@ -26108,6 +26333,7 @@ var init_FileTree = __esm({
|
|
|
26108
26333
|
onNodeAction,
|
|
26109
26334
|
nodeActionIcon,
|
|
26110
26335
|
nodeActionLabel,
|
|
26336
|
+
onNodeReorder,
|
|
26111
26337
|
className,
|
|
26112
26338
|
indent = 16
|
|
26113
26339
|
}) => {
|
|
@@ -26122,6 +26348,7 @@ var init_FileTree = __esm({
|
|
|
26122
26348
|
onNodeAction,
|
|
26123
26349
|
nodeActionIcon,
|
|
26124
26350
|
nodeActionLabel,
|
|
26351
|
+
onNodeReorder,
|
|
26125
26352
|
className,
|
|
26126
26353
|
indent
|
|
26127
26354
|
}
|
|
@@ -26168,6 +26395,183 @@ var init_FormField = __esm({
|
|
|
26168
26395
|
FormField.displayName = "FormField";
|
|
26169
26396
|
}
|
|
26170
26397
|
});
|
|
26398
|
+
function matchesQuery(query, text) {
|
|
26399
|
+
if (!query) return true;
|
|
26400
|
+
let qi = 0;
|
|
26401
|
+
const q = query.toLowerCase();
|
|
26402
|
+
const t = text.toLowerCase();
|
|
26403
|
+
for (let ti = 0; ti < t.length && qi < q.length; ti++) {
|
|
26404
|
+
if (t[ti] === q[qi]) qi++;
|
|
26405
|
+
}
|
|
26406
|
+
return qi === q.length;
|
|
26407
|
+
}
|
|
26408
|
+
function commandMatches(command, query) {
|
|
26409
|
+
if (!query) return true;
|
|
26410
|
+
if (matchesQuery(query, command.label)) return true;
|
|
26411
|
+
return (command.keywords ?? []).some((keyword) => matchesQuery(query, keyword));
|
|
26412
|
+
}
|
|
26413
|
+
var UNGROUPED, CommandPalette;
|
|
26414
|
+
var init_CommandPalette = __esm({
|
|
26415
|
+
"components/core/molecules/CommandPalette.tsx"() {
|
|
26416
|
+
"use client";
|
|
26417
|
+
init_Box();
|
|
26418
|
+
init_Stack();
|
|
26419
|
+
init_Typography();
|
|
26420
|
+
init_Icon();
|
|
26421
|
+
init_Input();
|
|
26422
|
+
init_Badge();
|
|
26423
|
+
init_cn();
|
|
26424
|
+
init_useEventBus();
|
|
26425
|
+
init_Modal();
|
|
26426
|
+
UNGROUPED = /* @__PURE__ */ Symbol("command-palette-ungrouped");
|
|
26427
|
+
CommandPalette = ({
|
|
26428
|
+
open,
|
|
26429
|
+
onOpenChange,
|
|
26430
|
+
commands,
|
|
26431
|
+
onSelect,
|
|
26432
|
+
placeholder = "Type a command...",
|
|
26433
|
+
emptyLabel = "No matching commands",
|
|
26434
|
+
className
|
|
26435
|
+
}) => {
|
|
26436
|
+
const eventBus = useEventBus();
|
|
26437
|
+
const [query, setQuery] = useState("");
|
|
26438
|
+
const [highlightIndex, setHighlightIndex] = useState(0);
|
|
26439
|
+
const filtered = useMemo(
|
|
26440
|
+
() => commands.filter((command) => commandMatches(command, query)),
|
|
26441
|
+
[commands, query]
|
|
26442
|
+
);
|
|
26443
|
+
const groups = useMemo(() => {
|
|
26444
|
+
const order = [];
|
|
26445
|
+
const byGroup = /* @__PURE__ */ new Map();
|
|
26446
|
+
for (const command of filtered) {
|
|
26447
|
+
const key = command.group ?? UNGROUPED;
|
|
26448
|
+
if (!byGroup.has(key)) {
|
|
26449
|
+
byGroup.set(key, []);
|
|
26450
|
+
order.push(key);
|
|
26451
|
+
}
|
|
26452
|
+
byGroup.get(key).push(command);
|
|
26453
|
+
}
|
|
26454
|
+
return order.map((key) => ({ group: key === UNGROUPED ? void 0 : key, items: byGroup.get(key) }));
|
|
26455
|
+
}, [filtered]);
|
|
26456
|
+
const resetQuery = useCallback(() => {
|
|
26457
|
+
setQuery("");
|
|
26458
|
+
setHighlightIndex(0);
|
|
26459
|
+
}, []);
|
|
26460
|
+
const handleClose = useCallback(() => {
|
|
26461
|
+
resetQuery();
|
|
26462
|
+
onOpenChange(false);
|
|
26463
|
+
}, [onOpenChange, resetQuery]);
|
|
26464
|
+
const handleSelect = useCallback(
|
|
26465
|
+
(command) => {
|
|
26466
|
+
if (command.disabled) return;
|
|
26467
|
+
if (command.event) eventBus.emit(`UI:${command.event}`, { commandId: command.id });
|
|
26468
|
+
if (command.action) eventBus.emit(`UI:${command.action}`, command.actionPayload ?? {});
|
|
26469
|
+
onSelect?.(command);
|
|
26470
|
+
handleClose();
|
|
26471
|
+
},
|
|
26472
|
+
[eventBus, onSelect, handleClose]
|
|
26473
|
+
);
|
|
26474
|
+
const handleQueryChange = useCallback((e) => {
|
|
26475
|
+
setQuery(e.target.value);
|
|
26476
|
+
setHighlightIndex(0);
|
|
26477
|
+
}, []);
|
|
26478
|
+
const handleKeyDown = useCallback(
|
|
26479
|
+
(e) => {
|
|
26480
|
+
if (filtered.length === 0) return;
|
|
26481
|
+
if (e.key === "ArrowDown") {
|
|
26482
|
+
e.preventDefault();
|
|
26483
|
+
setHighlightIndex((prev) => prev < filtered.length - 1 ? prev + 1 : 0);
|
|
26484
|
+
} else if (e.key === "ArrowUp") {
|
|
26485
|
+
e.preventDefault();
|
|
26486
|
+
setHighlightIndex((prev) => prev > 0 ? prev - 1 : filtered.length - 1);
|
|
26487
|
+
} else if (e.key === "Enter") {
|
|
26488
|
+
e.preventDefault();
|
|
26489
|
+
const command = filtered[highlightIndex];
|
|
26490
|
+
if (command) handleSelect(command);
|
|
26491
|
+
}
|
|
26492
|
+
},
|
|
26493
|
+
[filtered, highlightIndex, handleSelect]
|
|
26494
|
+
);
|
|
26495
|
+
return /* @__PURE__ */ jsx(
|
|
26496
|
+
Modal,
|
|
26497
|
+
{
|
|
26498
|
+
isOpen: open,
|
|
26499
|
+
onClose: handleClose,
|
|
26500
|
+
onExited: resetQuery,
|
|
26501
|
+
showCloseButton: false,
|
|
26502
|
+
size: "md",
|
|
26503
|
+
className,
|
|
26504
|
+
children: /* @__PURE__ */ jsx(Box, { "data-testid": "command-palette", children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
26505
|
+
/* @__PURE__ */ jsx(
|
|
26506
|
+
Input,
|
|
26507
|
+
{
|
|
26508
|
+
inputType: "search",
|
|
26509
|
+
placeholder,
|
|
26510
|
+
value: query,
|
|
26511
|
+
onChange: handleQueryChange,
|
|
26512
|
+
onKeyDown: handleKeyDown,
|
|
26513
|
+
leftIcon: "search",
|
|
26514
|
+
clearable: query.length > 0,
|
|
26515
|
+
onClear: resetQuery,
|
|
26516
|
+
autoFocus: true,
|
|
26517
|
+
"data-testid": "command-palette-input"
|
|
26518
|
+
}
|
|
26519
|
+
),
|
|
26520
|
+
filtered.length === 0 ? /* @__PURE__ */ jsx(Box, { className: "px-2 py-6 text-center", "data-testid": "command-palette-empty", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "muted", children: emptyLabel }) }) : /* @__PURE__ */ jsx(
|
|
26521
|
+
Box,
|
|
26522
|
+
{
|
|
26523
|
+
className: "max-h-80 overflow-y-auto",
|
|
26524
|
+
role: "listbox",
|
|
26525
|
+
"aria-label": placeholder,
|
|
26526
|
+
children: /* @__PURE__ */ jsx(VStack, { gap: "none", children: groups.map(({ group, items }) => /* @__PURE__ */ jsxs(Box, { children: [
|
|
26527
|
+
group ? /* @__PURE__ */ jsx(
|
|
26528
|
+
Typography,
|
|
26529
|
+
{
|
|
26530
|
+
variant: "caption",
|
|
26531
|
+
color: "muted",
|
|
26532
|
+
className: "px-3 pt-2 pb-1 block",
|
|
26533
|
+
children: group
|
|
26534
|
+
}
|
|
26535
|
+
) : null,
|
|
26536
|
+
items.map((command) => {
|
|
26537
|
+
const index = filtered.indexOf(command);
|
|
26538
|
+
const isHighlighted = index === highlightIndex;
|
|
26539
|
+
return /* @__PURE__ */ jsxs(
|
|
26540
|
+
Box,
|
|
26541
|
+
{
|
|
26542
|
+
as: "button",
|
|
26543
|
+
role: "option",
|
|
26544
|
+
"aria-selected": isHighlighted,
|
|
26545
|
+
"aria-disabled": command.disabled || void 0,
|
|
26546
|
+
"data-testid": `command-palette-item-${command.id}`,
|
|
26547
|
+
onMouseEnter: () => !command.disabled && setHighlightIndex(index),
|
|
26548
|
+
onClick: () => handleSelect(command),
|
|
26549
|
+
className: cn(
|
|
26550
|
+
"w-full flex items-center gap-3 px-3 py-2 text-start rounded-sm",
|
|
26551
|
+
"text-sm transition-colors",
|
|
26552
|
+
"focus:outline-none",
|
|
26553
|
+
isHighlighted && "bg-muted",
|
|
26554
|
+
command.disabled && "opacity-50 cursor-not-allowed"
|
|
26555
|
+
),
|
|
26556
|
+
children: [
|
|
26557
|
+
command.icon ? /* @__PURE__ */ jsx(Icon, { icon: command.icon, size: "sm", className: "flex-shrink-0" }) : null,
|
|
26558
|
+
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "flex-1 truncate", children: command.label }),
|
|
26559
|
+
command.shortcut ? /* @__PURE__ */ jsx(Badge, { variant: "neutral", size: "sm", children: command.shortcut }) : null
|
|
26560
|
+
]
|
|
26561
|
+
},
|
|
26562
|
+
command.id
|
|
26563
|
+
);
|
|
26564
|
+
})
|
|
26565
|
+
] }, String(group ?? "__ungrouped__"))) })
|
|
26566
|
+
}
|
|
26567
|
+
)
|
|
26568
|
+
] }) })
|
|
26569
|
+
}
|
|
26570
|
+
);
|
|
26571
|
+
};
|
|
26572
|
+
CommandPalette.displayName = "CommandPalette";
|
|
26573
|
+
}
|
|
26574
|
+
});
|
|
26171
26575
|
function getOrCreateStore(query) {
|
|
26172
26576
|
if (!queryStores.has(query)) {
|
|
26173
26577
|
queryStores.set(query, {
|
|
@@ -26882,7 +27286,7 @@ var init_Flex = __esm({
|
|
|
26882
27286
|
flexStyle.flexBasis = typeof basis === "number" ? `${basis}px` : basis;
|
|
26883
27287
|
}
|
|
26884
27288
|
}
|
|
26885
|
-
return
|
|
27289
|
+
return React78__default.createElement(Component, {
|
|
26886
27290
|
className: cn(
|
|
26887
27291
|
inline ? "inline-flex" : "flex",
|
|
26888
27292
|
directionStyles[direction],
|
|
@@ -27001,7 +27405,7 @@ var init_Grid = __esm({
|
|
|
27001
27405
|
as: Component = "div"
|
|
27002
27406
|
}) => {
|
|
27003
27407
|
const mergedStyle = rows2 ? { gridTemplateRows: `repeat(${rows2}, minmax(0, 1fr))`, ...style } : style;
|
|
27004
|
-
return
|
|
27408
|
+
return React78__default.createElement(
|
|
27005
27409
|
Component,
|
|
27006
27410
|
{
|
|
27007
27411
|
className: cn(
|
|
@@ -27423,9 +27827,9 @@ var init_Popover = __esm({
|
|
|
27423
27827
|
onMouseLeave: handleClose,
|
|
27424
27828
|
onPointerDown: tapTriggerProps.onPointerDown
|
|
27425
27829
|
};
|
|
27426
|
-
const childElement =
|
|
27830
|
+
const childElement = React78__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
27427
27831
|
const childPointerDown = childElement.props.onPointerDown;
|
|
27428
|
-
const triggerElement =
|
|
27832
|
+
const triggerElement = React78__default.cloneElement(
|
|
27429
27833
|
childElement,
|
|
27430
27834
|
{
|
|
27431
27835
|
ref: triggerRef,
|
|
@@ -28289,9 +28693,9 @@ var init_Tooltip = __esm({
|
|
|
28289
28693
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
28290
28694
|
};
|
|
28291
28695
|
}, []);
|
|
28292
|
-
const triggerElement =
|
|
28696
|
+
const triggerElement = React78__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
28293
28697
|
const childPointerDown = triggerElement.props.onPointerDown;
|
|
28294
|
-
const trigger =
|
|
28698
|
+
const trigger = React78__default.cloneElement(triggerElement, {
|
|
28295
28699
|
ref: triggerRef,
|
|
28296
28700
|
onMouseEnter: handleMouseEnter,
|
|
28297
28701
|
onMouseLeave: handleMouseLeave,
|
|
@@ -28381,7 +28785,7 @@ var init_WizardProgress = __esm({
|
|
|
28381
28785
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
28382
28786
|
const isActive = index === currentStep;
|
|
28383
28787
|
const isCompleted = index < currentStep;
|
|
28384
|
-
return /* @__PURE__ */ jsxs(
|
|
28788
|
+
return /* @__PURE__ */ jsxs(React78__default.Fragment, { children: [
|
|
28385
28789
|
/* @__PURE__ */ jsx(
|
|
28386
28790
|
"button",
|
|
28387
28791
|
{
|
|
@@ -30065,7 +30469,7 @@ function GameMenu({
|
|
|
30065
30469
|
}) {
|
|
30066
30470
|
const resolvedOptions = (options?.length ? options : void 0) ?? (menuItems?.length ? menuItems : void 0) ?? DEFAULT_MENU_OPTIONS;
|
|
30067
30471
|
const eventBus = useEventBus();
|
|
30068
|
-
const handleOptionClick =
|
|
30472
|
+
const handleOptionClick = React78.useCallback(
|
|
30069
30473
|
(option) => {
|
|
30070
30474
|
if (option.event) {
|
|
30071
30475
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -30301,7 +30705,7 @@ function StateGraph({
|
|
|
30301
30705
|
}) {
|
|
30302
30706
|
const eventBus = useEventBus();
|
|
30303
30707
|
const nodes = states ?? [];
|
|
30304
|
-
const positions =
|
|
30708
|
+
const positions = React78.useMemo(() => layoutStates(nodes, width, height), [nodes, width, height]);
|
|
30305
30709
|
return /* @__PURE__ */ jsxs(
|
|
30306
30710
|
Box,
|
|
30307
30711
|
{
|
|
@@ -30838,7 +31242,7 @@ function LinearView({
|
|
|
30838
31242
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
30839
31243
|
const isDone = i < currentIdx;
|
|
30840
31244
|
const isCurrent = i === currentIdx;
|
|
30841
|
-
return /* @__PURE__ */ jsxs(
|
|
31245
|
+
return /* @__PURE__ */ jsxs(React78__default.Fragment, { children: [
|
|
30842
31246
|
i > 0 && /* @__PURE__ */ jsx(
|
|
30843
31247
|
Typography,
|
|
30844
31248
|
{
|
|
@@ -31471,7 +31875,7 @@ function SequenceBar({
|
|
|
31471
31875
|
else onSlotRemove?.(index);
|
|
31472
31876
|
}, [emit, slotRemoveEvent, onSlotRemove, playing]);
|
|
31473
31877
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
31474
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
31878
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React78__default.Fragment, { children: [
|
|
31475
31879
|
i > 0 && /* @__PURE__ */ jsx(
|
|
31476
31880
|
Typography,
|
|
31477
31881
|
{
|
|
@@ -31879,6 +32283,8 @@ var init_MathCanvas = __esm({
|
|
|
31879
32283
|
gridColor = "var(--color-border, #9ca3af)",
|
|
31880
32284
|
axisColor = "var(--color-muted-foreground, #374151)",
|
|
31881
32285
|
showTickLabels = false,
|
|
32286
|
+
tickLabelFontSize = 10,
|
|
32287
|
+
labelFontSize = 12,
|
|
31882
32288
|
showCurveLabels = false,
|
|
31883
32289
|
curves = [],
|
|
31884
32290
|
points = [],
|
|
@@ -31950,18 +32356,18 @@ var init_MathCanvas = __esm({
|
|
|
31950
32356
|
let kx = 0;
|
|
31951
32357
|
for (let x = Math.ceil(xMin / gridStep) * gridStep; x <= xMax; x += gridStep, kx++) {
|
|
31952
32358
|
if (kx % labelEveryX === 0 && x !== 0) {
|
|
31953
|
-
out.push({ type: "text", x: mapX(x), y: xAxisY + 12, text: formatTick(x), color: "#6b7280", fontSize:
|
|
32359
|
+
out.push({ type: "text", x: mapX(x), y: xAxisY + 12, text: formatTick(x), color: "#6b7280", fontSize: tickLabelFontSize, align: "center" });
|
|
31954
32360
|
}
|
|
31955
32361
|
}
|
|
31956
32362
|
const labelEveryY = Math.max(1, Math.ceil((yMax - yMin) / gridStep / Math.floor(plotH / 28)));
|
|
31957
32363
|
let ky = 0;
|
|
31958
32364
|
for (let y = Math.ceil(yMin / gridStep) * gridStep; y <= yMax; y += gridStep, ky++) {
|
|
31959
32365
|
if (ky % labelEveryY === 0 && y !== 0) {
|
|
31960
|
-
out.push({ type: "text", x: yAxisX - 6, y: mapY(y), text: formatTick(y), color: "#6b7280", fontSize:
|
|
32366
|
+
out.push({ type: "text", x: yAxisX - 6, y: mapY(y), text: formatTick(y), color: "#6b7280", fontSize: tickLabelFontSize, align: "right" });
|
|
31961
32367
|
}
|
|
31962
32368
|
}
|
|
31963
32369
|
if (xMin <= 0 && xMax >= 0 && yMin <= 0 && yMax >= 0) {
|
|
31964
|
-
out.push({ type: "text", x: yAxisX - 6, y: xAxisY + 12, text: "0", color: "#6b7280", fontSize:
|
|
32370
|
+
out.push({ type: "text", x: yAxisX - 6, y: xAxisY + 12, text: "0", color: "#6b7280", fontSize: tickLabelFontSize, align: "right" });
|
|
31965
32371
|
}
|
|
31966
32372
|
}
|
|
31967
32373
|
for (const region of regions) {
|
|
@@ -31992,7 +32398,7 @@ var init_MathCanvas = __esm({
|
|
|
31992
32398
|
y: (mapY(region.samples[mid].y) + mapY(baseline)) / 2,
|
|
31993
32399
|
text: region.label,
|
|
31994
32400
|
color,
|
|
31995
|
-
fontSize:
|
|
32401
|
+
fontSize: labelFontSize
|
|
31996
32402
|
});
|
|
31997
32403
|
}
|
|
31998
32404
|
}
|
|
@@ -32031,7 +32437,7 @@ var init_MathCanvas = __esm({
|
|
|
32031
32437
|
const py = mapY(guide.at);
|
|
32032
32438
|
out.push({ type: "line", x1: margin, y1: py, x2: width - margin, y2: py, color, dash });
|
|
32033
32439
|
if (guide.label) {
|
|
32034
|
-
out.push({ type: "text", x: width - margin - 4, y: py - 8, text: guide.label, color, fontSize:
|
|
32440
|
+
out.push({ type: "text", x: width - margin - 4, y: py - 8, text: guide.label, color, fontSize: labelFontSize, align: "right" });
|
|
32035
32441
|
}
|
|
32036
32442
|
}
|
|
32037
32443
|
}
|
|
@@ -32074,7 +32480,7 @@ var init_MathCanvas = __esm({
|
|
|
32074
32480
|
y: mapY(lastInRange.y) - 6,
|
|
32075
32481
|
text: curve.label,
|
|
32076
32482
|
color: curve.color ?? "#2563eb",
|
|
32077
|
-
fontSize:
|
|
32483
|
+
fontSize: labelFontSize
|
|
32078
32484
|
});
|
|
32079
32485
|
}
|
|
32080
32486
|
}
|
|
@@ -32111,7 +32517,7 @@ var init_MathCanvas = __esm({
|
|
|
32111
32517
|
y: xAxisY - peak - 8,
|
|
32112
32518
|
text: hop.label,
|
|
32113
32519
|
color,
|
|
32114
|
-
fontSize:
|
|
32520
|
+
fontSize: labelFontSize,
|
|
32115
32521
|
align: "center"
|
|
32116
32522
|
});
|
|
32117
32523
|
}
|
|
@@ -32138,7 +32544,7 @@ var init_MathCanvas = __esm({
|
|
|
32138
32544
|
y: mapY(angle.y + 1.35 * radius * Math.sin(rad)),
|
|
32139
32545
|
text: angle.label,
|
|
32140
32546
|
color,
|
|
32141
|
-
fontSize:
|
|
32547
|
+
fontSize: labelFontSize,
|
|
32142
32548
|
align: "center"
|
|
32143
32549
|
});
|
|
32144
32550
|
}
|
|
@@ -32155,7 +32561,7 @@ var init_MathCanvas = __esm({
|
|
|
32155
32561
|
fill: isOpen ? "#ffffff" : p.color ?? "#dc2626"
|
|
32156
32562
|
});
|
|
32157
32563
|
if (p.label) {
|
|
32158
|
-
out.push({ type: "text", x: mapX(p.x) + 8, y: mapY(p.y) - 8, text: p.label, color: p.color ?? "#111827", fontSize:
|
|
32564
|
+
out.push({ type: "text", x: mapX(p.x) + 8, y: mapY(p.y) - 8, text: p.label, color: p.color ?? "#111827", fontSize: labelFontSize });
|
|
32159
32565
|
}
|
|
32160
32566
|
}
|
|
32161
32567
|
for (const v of vectors) {
|
|
@@ -32166,7 +32572,7 @@ var init_MathCanvas = __esm({
|
|
|
32166
32572
|
const y2 = mapY(v.y + v.vy);
|
|
32167
32573
|
out.push({ type: "arrow", x1, y1, x2, y2, color: v.color ?? "#7c3aed", lineWidth: 2 });
|
|
32168
32574
|
if (v.label) {
|
|
32169
|
-
out.push({ type: "text", x: x2 + 6, y: y2 - 6, text: v.label, color: v.color ?? "#7c3aed", fontSize:
|
|
32575
|
+
out.push({ type: "text", x: x2 + 6, y: y2 - 6, text: v.label, color: v.color ?? "#7c3aed", fontSize: labelFontSize });
|
|
32170
32576
|
}
|
|
32171
32577
|
}
|
|
32172
32578
|
out.push(...shapes);
|
|
@@ -32185,6 +32591,8 @@ var init_MathCanvas = __esm({
|
|
|
32185
32591
|
gridColor,
|
|
32186
32592
|
axisColor,
|
|
32187
32593
|
showTickLabels,
|
|
32594
|
+
tickLabelFontSize,
|
|
32595
|
+
labelFontSize,
|
|
32188
32596
|
showCurveLabels,
|
|
32189
32597
|
curves,
|
|
32190
32598
|
points,
|
|
@@ -33472,13 +33880,13 @@ var init_MapView = __esm({
|
|
|
33472
33880
|
shadowSize: [41, 41]
|
|
33473
33881
|
});
|
|
33474
33882
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
33475
|
-
const { useEffect:
|
|
33883
|
+
const { useEffect: useEffect70, useRef: useRef67, useCallback: useCallback109, useState: useState109 } = React78__default;
|
|
33476
33884
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
33477
33885
|
const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
33478
33886
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
33479
33887
|
const map = useMap();
|
|
33480
|
-
const prevRef =
|
|
33481
|
-
|
|
33888
|
+
const prevRef = useRef67({ centerLat, centerLng, zoom });
|
|
33889
|
+
useEffect70(() => {
|
|
33482
33890
|
const prev = prevRef.current;
|
|
33483
33891
|
if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
|
|
33484
33892
|
map.setView([centerLat, centerLng], zoom);
|
|
@@ -33489,7 +33897,7 @@ var init_MapView = __esm({
|
|
|
33489
33897
|
}
|
|
33490
33898
|
function MapClickHandler({ onMapClick }) {
|
|
33491
33899
|
const map = useMap();
|
|
33492
|
-
|
|
33900
|
+
useEffect70(() => {
|
|
33493
33901
|
if (!onMapClick) return;
|
|
33494
33902
|
const handler = (e) => {
|
|
33495
33903
|
onMapClick(e.latlng.lat, e.latlng.lng);
|
|
@@ -33517,8 +33925,8 @@ var init_MapView = __esm({
|
|
|
33517
33925
|
showAttribution = true
|
|
33518
33926
|
}) {
|
|
33519
33927
|
const eventBus = useEventBus2();
|
|
33520
|
-
const [clickedPosition, setClickedPosition] =
|
|
33521
|
-
const handleMapClick =
|
|
33928
|
+
const [clickedPosition, setClickedPosition] = useState109(null);
|
|
33929
|
+
const handleMapClick = useCallback109((lat, lng) => {
|
|
33522
33930
|
if (showClickedPin) {
|
|
33523
33931
|
setClickedPosition({ lat, lng });
|
|
33524
33932
|
}
|
|
@@ -33527,7 +33935,7 @@ var init_MapView = __esm({
|
|
|
33527
33935
|
eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
|
|
33528
33936
|
}
|
|
33529
33937
|
}, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
|
|
33530
|
-
const handleMarkerClick =
|
|
33938
|
+
const handleMarkerClick = useCallback109((marker) => {
|
|
33531
33939
|
onMarkerClick?.(marker);
|
|
33532
33940
|
if (markerClickEvent) {
|
|
33533
33941
|
eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
|
|
@@ -34417,8 +34825,8 @@ function TableView({
|
|
|
34417
34825
|
}) {
|
|
34418
34826
|
const eventBus = useEventBus();
|
|
34419
34827
|
const { t } = useTranslate();
|
|
34420
|
-
const [visibleCount, setVisibleCount] =
|
|
34421
|
-
const [localSelected, setLocalSelected] =
|
|
34828
|
+
const [visibleCount, setVisibleCount] = React78__default.useState(pageSize > 0 ? pageSize : Infinity);
|
|
34829
|
+
const [localSelected, setLocalSelected] = React78__default.useState(/* @__PURE__ */ new Set());
|
|
34422
34830
|
const colDefs = (Array.isArray(columns) ? columns : void 0) ?? (Array.isArray(fields) ? fields : void 0) ?? [];
|
|
34423
34831
|
const actionDefs = Array.isArray(itemActions) ? itemActions : [];
|
|
34424
34832
|
const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
@@ -34439,7 +34847,7 @@ function TableView({
|
|
|
34439
34847
|
const hasMore = pageSize > 0 && visibleCount < ordered2.length;
|
|
34440
34848
|
const hasRenderProp = typeof children === "function";
|
|
34441
34849
|
const idField = dndItemIdField ?? "id";
|
|
34442
|
-
|
|
34850
|
+
React78__default.useEffect(() => {
|
|
34443
34851
|
tableViewLog.debug("render", {
|
|
34444
34852
|
rowCount: data.length,
|
|
34445
34853
|
colCount: colDefs.length,
|
|
@@ -34489,7 +34897,7 @@ function TableView({
|
|
|
34489
34897
|
};
|
|
34490
34898
|
eventBus.emit(`UI:${rowClickEvent}`, payload);
|
|
34491
34899
|
};
|
|
34492
|
-
const colFloors =
|
|
34900
|
+
const colFloors = React78__default.useMemo(
|
|
34493
34901
|
() => colDefs.map((col) => {
|
|
34494
34902
|
const longest = data.reduce((widest, row) => {
|
|
34495
34903
|
const cell = formatCell(asFieldValue(getNestedValue(row, col.field ?? col.key)), col.format);
|
|
@@ -34632,12 +35040,12 @@ function TableView({
|
|
|
34632
35040
|
]
|
|
34633
35041
|
}
|
|
34634
35042
|
);
|
|
34635
|
-
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(
|
|
35043
|
+
return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React78__default.Fragment, { children: rowInner }, id);
|
|
34636
35044
|
};
|
|
34637
35045
|
const items = Array.from(data);
|
|
34638
35046
|
const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
|
|
34639
35047
|
let runningIndex = 0;
|
|
34640
|
-
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
35048
|
+
const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React78__default.Fragment, { children: [
|
|
34641
35049
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
|
|
34642
35050
|
group.items.map((row) => renderRow(row, runningIndex++))
|
|
34643
35051
|
] }, gi)) });
|
|
@@ -36006,7 +36414,7 @@ var init_StepFlow = __esm({
|
|
|
36006
36414
|
className
|
|
36007
36415
|
}) => {
|
|
36008
36416
|
if (orientation === "vertical") {
|
|
36009
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
36417
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React78__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
36010
36418
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
36011
36419
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
36012
36420
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -36017,7 +36425,7 @@ var init_StepFlow = __esm({
|
|
|
36017
36425
|
] })
|
|
36018
36426
|
] }) }, index)) });
|
|
36019
36427
|
}
|
|
36020
|
-
return /* @__PURE__ */ jsx(Box, { className: cn("w-full flex flex-col md:flex-row items-start gap-0", className), children: steps.map((step, index) => /* @__PURE__ */ jsxs(
|
|
36428
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("w-full flex flex-col md:flex-row items-start gap-0", className), children: steps.map((step, index) => /* @__PURE__ */ jsxs(React78__default.Fragment, { children: [
|
|
36021
36429
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
36022
36430
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
36023
36431
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -37007,7 +37415,7 @@ var init_LikertScale = __esm({
|
|
|
37007
37415
|
md: "text-base",
|
|
37008
37416
|
lg: "text-lg"
|
|
37009
37417
|
};
|
|
37010
|
-
LikertScale =
|
|
37418
|
+
LikertScale = React78__default.forwardRef(
|
|
37011
37419
|
({
|
|
37012
37420
|
question,
|
|
37013
37421
|
options = DEFAULT_LIKERT_OPTIONS,
|
|
@@ -37019,7 +37427,7 @@ var init_LikertScale = __esm({
|
|
|
37019
37427
|
variant = "radios",
|
|
37020
37428
|
className
|
|
37021
37429
|
}, ref) => {
|
|
37022
|
-
const groupId =
|
|
37430
|
+
const groupId = React78__default.useId();
|
|
37023
37431
|
const eventBus = useEventBus();
|
|
37024
37432
|
const handleSelect = useCallback(
|
|
37025
37433
|
(next) => {
|
|
@@ -39442,7 +39850,7 @@ var init_DocBreadcrumb = __esm({
|
|
|
39442
39850
|
"aria-label": t("aria.breadcrumb"),
|
|
39443
39851
|
children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
|
|
39444
39852
|
const isLast = idx === items.length - 1;
|
|
39445
|
-
return /* @__PURE__ */ jsxs(
|
|
39853
|
+
return /* @__PURE__ */ jsxs(React78__default.Fragment, { children: [
|
|
39446
39854
|
idx > 0 && /* @__PURE__ */ jsx(
|
|
39447
39855
|
Icon,
|
|
39448
39856
|
{
|
|
@@ -40311,7 +40719,7 @@ var init_MiniStateMachine = __esm({
|
|
|
40311
40719
|
const x = 2 + i * (NODE_W + GAP2 + ARROW_W + GAP2);
|
|
40312
40720
|
const tc = transitionCounts[s.name] ?? 0;
|
|
40313
40721
|
const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
|
|
40314
|
-
return /* @__PURE__ */ jsxs(
|
|
40722
|
+
return /* @__PURE__ */ jsxs(React78__default.Fragment, { children: [
|
|
40315
40723
|
/* @__PURE__ */ jsx(
|
|
40316
40724
|
AvlState,
|
|
40317
40725
|
{
|
|
@@ -40516,7 +40924,7 @@ var init_PageHeader = __esm({
|
|
|
40516
40924
|
info: "bg-info/10 text-info"
|
|
40517
40925
|
};
|
|
40518
40926
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
40519
|
-
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx(Box, { as: "nav", className: "mb-4", children: /* @__PURE__ */ jsx(Box, { as: "ol", className: "flex items-center gap-2 text-sm", children: breadcrumbs.map((crumb, idx) => /* @__PURE__ */ jsxs(
|
|
40927
|
+
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx(Box, { as: "nav", className: "mb-4", children: /* @__PURE__ */ jsx(Box, { as: "ol", className: "flex items-center gap-2 text-sm", children: breadcrumbs.map((crumb, idx) => /* @__PURE__ */ jsxs(React78__default.Fragment, { children: [
|
|
40520
40928
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
40521
40929
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
40522
40930
|
"a",
|
|
@@ -40874,7 +41282,7 @@ var init_Section = __esm({
|
|
|
40874
41282
|
as: Component = "section"
|
|
40875
41283
|
}) => {
|
|
40876
41284
|
const hasHeader = title || description || action;
|
|
40877
|
-
return
|
|
41285
|
+
return React78__default.createElement(
|
|
40878
41286
|
Component,
|
|
40879
41287
|
{
|
|
40880
41288
|
className: cn(
|
|
@@ -41248,7 +41656,7 @@ var init_WizardContainer = __esm({
|
|
|
41248
41656
|
const isCompleted = index < currentStep;
|
|
41249
41657
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
41250
41658
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
41251
|
-
return /* @__PURE__ */ jsxs(
|
|
41659
|
+
return /* @__PURE__ */ jsxs(React78__default.Fragment, { children: [
|
|
41252
41660
|
/* @__PURE__ */ jsx(
|
|
41253
41661
|
Button,
|
|
41254
41662
|
{
|
|
@@ -43035,7 +43443,7 @@ var init_ImportPreviewTree = __esm({
|
|
|
43035
43443
|
const renderUnit = (unit, childrenByParent, depth) => {
|
|
43036
43444
|
const summary = fieldSummary(unit);
|
|
43037
43445
|
const children = childrenByParent.get(unit.ref) ?? [];
|
|
43038
|
-
return /* @__PURE__ */ jsxs(
|
|
43446
|
+
return /* @__PURE__ */ jsxs(React78__default.Fragment, { children: [
|
|
43039
43447
|
/* @__PURE__ */ jsxs(
|
|
43040
43448
|
Box,
|
|
43041
43449
|
{
|
|
@@ -43132,7 +43540,7 @@ var init_ImportProgress = __esm({
|
|
|
43132
43540
|
PIPELINE.map((key, index) => {
|
|
43133
43541
|
const isComplete = index < currentIndex;
|
|
43134
43542
|
const isActive = index === currentIndex;
|
|
43135
|
-
return /* @__PURE__ */ jsxs(
|
|
43543
|
+
return /* @__PURE__ */ jsxs(React78__default.Fragment, { children: [
|
|
43136
43544
|
index > 0 ? /* @__PURE__ */ jsx(Box, { className: "h-px w-4 bg-border" }) : null,
|
|
43137
43545
|
/* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-1", "data-testid": `import-progress-step-${key}`, children: [
|
|
43138
43546
|
/* @__PURE__ */ jsx(
|
|
@@ -43345,6 +43753,69 @@ var init_parseLessonSegments = __esm({
|
|
|
43345
43753
|
init_lessonSegmentUtils();
|
|
43346
43754
|
}
|
|
43347
43755
|
});
|
|
43756
|
+
var positionClasses, FloatingToolbar;
|
|
43757
|
+
var init_FloatingToolbar = __esm({
|
|
43758
|
+
"components/core/molecules/FloatingToolbar.tsx"() {
|
|
43759
|
+
"use client";
|
|
43760
|
+
init_Button();
|
|
43761
|
+
init_Box();
|
|
43762
|
+
init_Divider();
|
|
43763
|
+
init_Typography();
|
|
43764
|
+
init_ButtonGroup();
|
|
43765
|
+
init_cn();
|
|
43766
|
+
init_useEventBus();
|
|
43767
|
+
positionClasses = {
|
|
43768
|
+
"bottom-center": "bottom-6 left-1/2 -translate-x-1/2",
|
|
43769
|
+
"bottom-left": "bottom-6 left-6",
|
|
43770
|
+
"bottom-right": "bottom-6 right-6"
|
|
43771
|
+
};
|
|
43772
|
+
FloatingToolbar = ({
|
|
43773
|
+
items,
|
|
43774
|
+
position = "bottom-center",
|
|
43775
|
+
children,
|
|
43776
|
+
className
|
|
43777
|
+
}) => {
|
|
43778
|
+
const eventBus = useEventBus();
|
|
43779
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("fixed z-50", positionClasses[position]), children: /* @__PURE__ */ jsxs(
|
|
43780
|
+
ButtonGroup,
|
|
43781
|
+
{
|
|
43782
|
+
variant: "default",
|
|
43783
|
+
orientation: "horizontal",
|
|
43784
|
+
className: cn(
|
|
43785
|
+
"items-center gap-1 rounded-full border border-border",
|
|
43786
|
+
"bg-card/95 backdrop-blur-sm shadow-elevation-popover p-1",
|
|
43787
|
+
className
|
|
43788
|
+
),
|
|
43789
|
+
children: [
|
|
43790
|
+
items.map((item) => /* @__PURE__ */ jsx(
|
|
43791
|
+
Button,
|
|
43792
|
+
{
|
|
43793
|
+
variant: item.active ? "primary" : "ghost",
|
|
43794
|
+
size: "sm",
|
|
43795
|
+
icon: item.icon,
|
|
43796
|
+
action: item.action,
|
|
43797
|
+
actionPayload: item.actionPayload,
|
|
43798
|
+
disabled: item.disabled,
|
|
43799
|
+
"aria-pressed": item.active,
|
|
43800
|
+
"aria-label": item.label,
|
|
43801
|
+
className: "rounded-full",
|
|
43802
|
+
"data-testid": item.testId ?? `floating-toolbar-item-${item.id}`,
|
|
43803
|
+
onClick: () => {
|
|
43804
|
+
if (item.event) eventBus.emit(`UI:${item.event}`, { actionId: item.id });
|
|
43805
|
+
},
|
|
43806
|
+
children: /* @__PURE__ */ jsx(Typography, { as: "span", className: "sr-only", children: item.label })
|
|
43807
|
+
},
|
|
43808
|
+
item.id
|
|
43809
|
+
)),
|
|
43810
|
+
children && items.length > 0 && /* @__PURE__ */ jsx(Divider, { orientation: "vertical", className: "h-6 mx-1" }),
|
|
43811
|
+
children
|
|
43812
|
+
]
|
|
43813
|
+
}
|
|
43814
|
+
) });
|
|
43815
|
+
};
|
|
43816
|
+
FloatingToolbar.displayName = "FloatingToolbar";
|
|
43817
|
+
}
|
|
43818
|
+
});
|
|
43348
43819
|
|
|
43349
43820
|
// components/core/molecules/index.ts
|
|
43350
43821
|
var init_molecules2 = __esm({
|
|
@@ -43362,6 +43833,7 @@ var init_molecules2 = __esm({
|
|
|
43362
43833
|
init_Alert();
|
|
43363
43834
|
init_Breadcrumb();
|
|
43364
43835
|
init_ButtonGroup();
|
|
43836
|
+
init_CommandPalette();
|
|
43365
43837
|
init_FilterGroup();
|
|
43366
43838
|
init_Card2();
|
|
43367
43839
|
init_Container();
|
|
@@ -43495,6 +43967,7 @@ var init_molecules2 = __esm({
|
|
|
43495
43967
|
init_BloomQuizBlock();
|
|
43496
43968
|
init_parseLessonSegments();
|
|
43497
43969
|
init_lessonSegmentUtils();
|
|
43970
|
+
init_FloatingToolbar();
|
|
43498
43971
|
}
|
|
43499
43972
|
});
|
|
43500
43973
|
|
|
@@ -44237,7 +44710,7 @@ var init_DetailPanel = __esm({
|
|
|
44237
44710
|
}) => {
|
|
44238
44711
|
const eventBus = useEventBus();
|
|
44239
44712
|
const { t } = useTranslate();
|
|
44240
|
-
const [titleDraft, setTitleDraft] =
|
|
44713
|
+
const [titleDraft, setTitleDraft] = React78__default.useState(null);
|
|
44241
44714
|
const isFieldDefArray = (arr) => {
|
|
44242
44715
|
if (!arr || arr.length === 0) return false;
|
|
44243
44716
|
const first = arr[0];
|
|
@@ -44630,8 +45103,224 @@ var init_DetailPanel = __esm({
|
|
|
44630
45103
|
DetailPanel.displayName = "DetailPanel";
|
|
44631
45104
|
}
|
|
44632
45105
|
});
|
|
45106
|
+
var SplitPane;
|
|
45107
|
+
var init_SplitPane = __esm({
|
|
45108
|
+
"components/core/organisms/layout/SplitPane.tsx"() {
|
|
45109
|
+
"use client";
|
|
45110
|
+
init_cn();
|
|
45111
|
+
SplitPane = ({
|
|
45112
|
+
direction = "horizontal",
|
|
45113
|
+
ratio: ratioProp = 50,
|
|
45114
|
+
minSize = 100,
|
|
45115
|
+
resizable = true,
|
|
45116
|
+
left,
|
|
45117
|
+
right,
|
|
45118
|
+
className,
|
|
45119
|
+
leftClassName,
|
|
45120
|
+
rightClassName,
|
|
45121
|
+
onRatioChange
|
|
45122
|
+
}) => {
|
|
45123
|
+
const [uncontrolledRatio, setUncontrolledRatio] = useState(ratioProp);
|
|
45124
|
+
const ratio = onRatioChange ? ratioProp : uncontrolledRatio;
|
|
45125
|
+
const containerRef = useRef(null);
|
|
45126
|
+
const isDragging = useRef(false);
|
|
45127
|
+
const handlePointerDown = useCallback(
|
|
45128
|
+
(e) => {
|
|
45129
|
+
if (!resizable) return;
|
|
45130
|
+
e.preventDefault();
|
|
45131
|
+
isDragging.current = true;
|
|
45132
|
+
e.currentTarget.setPointerCapture(e.pointerId);
|
|
45133
|
+
const handlePointerMove = (ev) => {
|
|
45134
|
+
if (!isDragging.current || !containerRef.current) return;
|
|
45135
|
+
const rect = containerRef.current.getBoundingClientRect();
|
|
45136
|
+
let newRatio;
|
|
45137
|
+
if (direction === "horizontal") {
|
|
45138
|
+
const x = ev.clientX - rect.left;
|
|
45139
|
+
newRatio = x / rect.width * 100;
|
|
45140
|
+
} else {
|
|
45141
|
+
const y = ev.clientY - rect.top;
|
|
45142
|
+
newRatio = y / rect.height * 100;
|
|
45143
|
+
}
|
|
45144
|
+
const minRatio = minSize / (direction === "horizontal" ? rect.width : rect.height) * 100;
|
|
45145
|
+
const maxRatio = 100 - minRatio;
|
|
45146
|
+
newRatio = Math.max(minRatio, Math.min(maxRatio, newRatio));
|
|
45147
|
+
if (onRatioChange) {
|
|
45148
|
+
onRatioChange(newRatio);
|
|
45149
|
+
} else {
|
|
45150
|
+
setUncontrolledRatio(newRatio);
|
|
45151
|
+
}
|
|
45152
|
+
};
|
|
45153
|
+
const handlePointerUp = () => {
|
|
45154
|
+
isDragging.current = false;
|
|
45155
|
+
document.removeEventListener("pointermove", handlePointerMove);
|
|
45156
|
+
document.removeEventListener("pointerup", handlePointerUp);
|
|
45157
|
+
document.removeEventListener("pointercancel", handlePointerUp);
|
|
45158
|
+
};
|
|
45159
|
+
document.addEventListener("pointermove", handlePointerMove);
|
|
45160
|
+
document.addEventListener("pointerup", handlePointerUp);
|
|
45161
|
+
document.addEventListener("pointercancel", handlePointerUp);
|
|
45162
|
+
},
|
|
45163
|
+
[direction, minSize, resizable, onRatioChange]
|
|
45164
|
+
);
|
|
45165
|
+
const isHorizontal = direction === "horizontal";
|
|
45166
|
+
return /* @__PURE__ */ jsxs(
|
|
45167
|
+
"div",
|
|
45168
|
+
{
|
|
45169
|
+
ref: containerRef,
|
|
45170
|
+
className: cn(
|
|
45171
|
+
"flex w-full h-full",
|
|
45172
|
+
isHorizontal ? "flex-row" : "flex-col",
|
|
45173
|
+
className
|
|
45174
|
+
),
|
|
45175
|
+
children: [
|
|
45176
|
+
/* @__PURE__ */ jsx(
|
|
45177
|
+
"div",
|
|
45178
|
+
{
|
|
45179
|
+
className: cn("overflow-auto", leftClassName),
|
|
45180
|
+
style: {
|
|
45181
|
+
[isHorizontal ? "width" : "height"]: `${ratio}%`,
|
|
45182
|
+
flexShrink: 0
|
|
45183
|
+
},
|
|
45184
|
+
children: left
|
|
45185
|
+
}
|
|
45186
|
+
),
|
|
45187
|
+
resizable && /* @__PURE__ */ jsx(
|
|
45188
|
+
"div",
|
|
45189
|
+
{
|
|
45190
|
+
onPointerDown: handlePointerDown,
|
|
45191
|
+
className: cn(
|
|
45192
|
+
"flex-shrink-0 bg-border transition-colors touch-none",
|
|
45193
|
+
isHorizontal ? "w-1 cursor-col-resize hover:w-1.5 hover:bg-muted-foreground" : "h-1 cursor-row-resize hover:h-1.5 hover:bg-muted-foreground"
|
|
45194
|
+
)
|
|
45195
|
+
}
|
|
45196
|
+
),
|
|
45197
|
+
/* @__PURE__ */ jsx("div", { className: cn("flex-1 overflow-auto", rightClassName), children: right })
|
|
45198
|
+
]
|
|
45199
|
+
}
|
|
45200
|
+
);
|
|
45201
|
+
};
|
|
45202
|
+
SplitPane.displayName = "SplitPane";
|
|
45203
|
+
}
|
|
45204
|
+
});
|
|
45205
|
+
var DockLayout;
|
|
45206
|
+
var init_DockLayout = __esm({
|
|
45207
|
+
"components/core/organisms/layout/DockLayout.tsx"() {
|
|
45208
|
+
"use client";
|
|
45209
|
+
init_Box();
|
|
45210
|
+
init_Stack();
|
|
45211
|
+
init_cn();
|
|
45212
|
+
init_SplitPane();
|
|
45213
|
+
DockLayout = ({
|
|
45214
|
+
rail,
|
|
45215
|
+
sidebar,
|
|
45216
|
+
main,
|
|
45217
|
+
bottomPanel,
|
|
45218
|
+
statusBar,
|
|
45219
|
+
secondarySidebar,
|
|
45220
|
+
railWidth = 56,
|
|
45221
|
+
secondarySidebarWidth = 280,
|
|
45222
|
+
sidebarCollapsed = false,
|
|
45223
|
+
sidebarWidth = 20,
|
|
45224
|
+
onSidebarWidthChange,
|
|
45225
|
+
sidebarMinSize = 160,
|
|
45226
|
+
bottomPanelCollapsed = false,
|
|
45227
|
+
bottomPanelHeight = 30,
|
|
45228
|
+
onBottomPanelHeightChange,
|
|
45229
|
+
bottomPanelMinSize = 120,
|
|
45230
|
+
secondarySidebarCollapsed = false,
|
|
45231
|
+
className,
|
|
45232
|
+
railClassName,
|
|
45233
|
+
sidebarClassName,
|
|
45234
|
+
mainClassName,
|
|
45235
|
+
bottomPanelClassName,
|
|
45236
|
+
statusBarClassName,
|
|
45237
|
+
secondarySidebarClassName
|
|
45238
|
+
}) => {
|
|
45239
|
+
const showSidebar = Boolean(sidebar) && !sidebarCollapsed;
|
|
45240
|
+
const showBottomPanel = Boolean(bottomPanel) && !bottomPanelCollapsed;
|
|
45241
|
+
const showSecondarySidebar = Boolean(secondarySidebar) && !secondarySidebarCollapsed;
|
|
45242
|
+
const centerRow = /* @__PURE__ */ jsxs(HStack, { gap: "none", className: "flex-1 min-h-0 min-w-0", children: [
|
|
45243
|
+
/* @__PURE__ */ jsx(Box, { className: cn("flex-1 min-w-0 h-full overflow-auto", mainClassName), children: main }),
|
|
45244
|
+
showSecondarySidebar && /* @__PURE__ */ jsx(
|
|
45245
|
+
Box,
|
|
45246
|
+
{
|
|
45247
|
+
className: cn(
|
|
45248
|
+
"flex-shrink-0 h-full overflow-auto border-l border-border",
|
|
45249
|
+
secondarySidebarClassName
|
|
45250
|
+
),
|
|
45251
|
+
style: { width: secondarySidebarWidth },
|
|
45252
|
+
children: secondarySidebar
|
|
45253
|
+
}
|
|
45254
|
+
)
|
|
45255
|
+
] });
|
|
45256
|
+
const sidebarAndCenter = showSidebar ? /* @__PURE__ */ jsx(
|
|
45257
|
+
SplitPane,
|
|
45258
|
+
{
|
|
45259
|
+
direction: "horizontal",
|
|
45260
|
+
ratio: sidebarWidth,
|
|
45261
|
+
onRatioChange: onSidebarWidthChange,
|
|
45262
|
+
minSize: sidebarMinSize,
|
|
45263
|
+
resizable: true,
|
|
45264
|
+
left: /* @__PURE__ */ jsx(Box, { className: cn("h-full overflow-auto", sidebarClassName), children: sidebar }),
|
|
45265
|
+
right: centerRow,
|
|
45266
|
+
className: "flex-1 min-h-0 min-w-0"
|
|
45267
|
+
}
|
|
45268
|
+
) : centerRow;
|
|
45269
|
+
const body = /* @__PURE__ */ jsxs(HStack, { gap: "none", className: "flex-1 min-h-0 min-w-0", children: [
|
|
45270
|
+
rail && /* @__PURE__ */ jsx(
|
|
45271
|
+
Box,
|
|
45272
|
+
{
|
|
45273
|
+
className: cn(
|
|
45274
|
+
"flex-shrink-0 h-full overflow-auto border-r border-border",
|
|
45275
|
+
railClassName
|
|
45276
|
+
),
|
|
45277
|
+
style: { width: railWidth },
|
|
45278
|
+
children: rail
|
|
45279
|
+
}
|
|
45280
|
+
),
|
|
45281
|
+
sidebarAndCenter
|
|
45282
|
+
] });
|
|
45283
|
+
const bodyPlusBottom = showBottomPanel ? /* @__PURE__ */ jsx(
|
|
45284
|
+
SplitPane,
|
|
45285
|
+
{
|
|
45286
|
+
direction: "vertical",
|
|
45287
|
+
ratio: 100 - bottomPanelHeight,
|
|
45288
|
+
onRatioChange: (topRatio) => onBottomPanelHeightChange?.(100 - topRatio),
|
|
45289
|
+
minSize: bottomPanelMinSize,
|
|
45290
|
+
resizable: true,
|
|
45291
|
+
left: body,
|
|
45292
|
+
right: /* @__PURE__ */ jsx(
|
|
45293
|
+
Box,
|
|
45294
|
+
{
|
|
45295
|
+
className: cn(
|
|
45296
|
+
"h-full overflow-auto border-t border-border",
|
|
45297
|
+
bottomPanelClassName
|
|
45298
|
+
),
|
|
45299
|
+
children: bottomPanel
|
|
45300
|
+
}
|
|
45301
|
+
),
|
|
45302
|
+
className: "flex-1 min-h-0"
|
|
45303
|
+
}
|
|
45304
|
+
) : body;
|
|
45305
|
+
return /* @__PURE__ */ jsxs(VStack, { gap: "none", className: cn("w-full h-full overflow-hidden", className), children: [
|
|
45306
|
+
bodyPlusBottom,
|
|
45307
|
+
statusBar && /* @__PURE__ */ jsx(
|
|
45308
|
+
Box,
|
|
45309
|
+
{
|
|
45310
|
+
className: cn(
|
|
45311
|
+
"flex-shrink-0 border-t border-border bg-background",
|
|
45312
|
+
statusBarClassName
|
|
45313
|
+
),
|
|
45314
|
+
children: statusBar
|
|
45315
|
+
}
|
|
45316
|
+
)
|
|
45317
|
+
] });
|
|
45318
|
+
};
|
|
45319
|
+
DockLayout.displayName = "DockLayout";
|
|
45320
|
+
}
|
|
45321
|
+
});
|
|
44633
45322
|
function extractTitle(children) {
|
|
44634
|
-
if (!
|
|
45323
|
+
if (!React78__default.isValidElement(children)) return void 0;
|
|
44635
45324
|
const props = children.props;
|
|
44636
45325
|
if (typeof props.title === "string") {
|
|
44637
45326
|
return props.title;
|
|
@@ -44993,7 +45682,7 @@ var init_Form = __esm({
|
|
|
44993
45682
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
44994
45683
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
44995
45684
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
44996
|
-
const normalizedInitialData =
|
|
45685
|
+
const normalizedInitialData = React78__default.useMemo(() => {
|
|
44997
45686
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
44998
45687
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
44999
45688
|
const merged = entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
@@ -45012,7 +45701,7 @@ var init_Form = __esm({
|
|
|
45012
45701
|
}
|
|
45013
45702
|
return normalized;
|
|
45014
45703
|
}, [entity, initialData]);
|
|
45015
|
-
const entityDerivedFields =
|
|
45704
|
+
const entityDerivedFields = React78__default.useMemo(() => {
|
|
45016
45705
|
if (fields && fields.length > 0) return void 0;
|
|
45017
45706
|
if (!resolvedEntity) return void 0;
|
|
45018
45707
|
return resolvedEntity.fields.map(
|
|
@@ -45033,16 +45722,16 @@ var init_Form = __esm({
|
|
|
45033
45722
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
45034
45723
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
45035
45724
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
45036
|
-
const [formData, setFormData] =
|
|
45725
|
+
const [formData, setFormData] = React78__default.useState(
|
|
45037
45726
|
normalizedInitialData
|
|
45038
45727
|
);
|
|
45039
|
-
const [collapsedSections, setCollapsedSections] =
|
|
45728
|
+
const [collapsedSections, setCollapsedSections] = React78__default.useState(
|
|
45040
45729
|
/* @__PURE__ */ new Set()
|
|
45041
45730
|
);
|
|
45042
|
-
const [submitError, setSubmitError] =
|
|
45043
|
-
const formRef =
|
|
45731
|
+
const [submitError, setSubmitError] = React78__default.useState(null);
|
|
45732
|
+
const formRef = React78__default.useRef(null);
|
|
45044
45733
|
const formMode = props.mode;
|
|
45045
|
-
const mountedRef =
|
|
45734
|
+
const mountedRef = React78__default.useRef(false);
|
|
45046
45735
|
if (!mountedRef.current) {
|
|
45047
45736
|
mountedRef.current = true;
|
|
45048
45737
|
debug("forms", "mount", {
|
|
@@ -45055,7 +45744,7 @@ var init_Form = __esm({
|
|
|
45055
45744
|
});
|
|
45056
45745
|
}
|
|
45057
45746
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
45058
|
-
const evalContext =
|
|
45747
|
+
const evalContext = React78__default.useMemo(
|
|
45059
45748
|
() => ({
|
|
45060
45749
|
formValues: formData,
|
|
45061
45750
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -45064,7 +45753,7 @@ var init_Form = __esm({
|
|
|
45064
45753
|
}),
|
|
45065
45754
|
[formData, externalContext]
|
|
45066
45755
|
);
|
|
45067
|
-
|
|
45756
|
+
React78__default.useEffect(() => {
|
|
45068
45757
|
debug("forms", "initialData-sync", {
|
|
45069
45758
|
mode: formMode,
|
|
45070
45759
|
normalizedInitialData,
|
|
@@ -45075,7 +45764,7 @@ var init_Form = __esm({
|
|
|
45075
45764
|
setFormData(normalizedInitialData);
|
|
45076
45765
|
}
|
|
45077
45766
|
}, [normalizedInitialData]);
|
|
45078
|
-
const processCalculations =
|
|
45767
|
+
const processCalculations = React78__default.useCallback(
|
|
45079
45768
|
(changedFieldId, newFormData) => {
|
|
45080
45769
|
if (!hiddenCalculations.length) return;
|
|
45081
45770
|
const context = {
|
|
@@ -45100,7 +45789,7 @@ var init_Form = __esm({
|
|
|
45100
45789
|
},
|
|
45101
45790
|
[hiddenCalculations, externalContext, eventBus]
|
|
45102
45791
|
);
|
|
45103
|
-
const checkViolations =
|
|
45792
|
+
const checkViolations = React78__default.useCallback(
|
|
45104
45793
|
(changedFieldId, newFormData) => {
|
|
45105
45794
|
if (!violationTriggers.length) return;
|
|
45106
45795
|
const context = {
|
|
@@ -45138,7 +45827,7 @@ var init_Form = __esm({
|
|
|
45138
45827
|
processCalculations(name, newFormData);
|
|
45139
45828
|
checkViolations(name, newFormData);
|
|
45140
45829
|
};
|
|
45141
|
-
const isFieldVisible =
|
|
45830
|
+
const isFieldVisible = React78__default.useCallback(
|
|
45142
45831
|
(fieldName2) => {
|
|
45143
45832
|
const condition = conditionalFields[fieldName2];
|
|
45144
45833
|
if (!condition) return true;
|
|
@@ -45146,7 +45835,7 @@ var init_Form = __esm({
|
|
|
45146
45835
|
},
|
|
45147
45836
|
[conditionalFields, evalContext]
|
|
45148
45837
|
);
|
|
45149
|
-
const isSectionVisible =
|
|
45838
|
+
const isSectionVisible = React78__default.useCallback(
|
|
45150
45839
|
(section) => {
|
|
45151
45840
|
if (!section.condition) return true;
|
|
45152
45841
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -45222,7 +45911,7 @@ var init_Form = __esm({
|
|
|
45222
45911
|
eventBus.emit(`UI:${onCancel}`);
|
|
45223
45912
|
}
|
|
45224
45913
|
};
|
|
45225
|
-
const renderField =
|
|
45914
|
+
const renderField = React78__default.useCallback(
|
|
45226
45915
|
(field) => {
|
|
45227
45916
|
const fieldName2 = field.name || field.field;
|
|
45228
45917
|
if (!fieldName2) return null;
|
|
@@ -45244,7 +45933,7 @@ var init_Form = __esm({
|
|
|
45244
45933
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
45245
45934
|
);
|
|
45246
45935
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
45247
|
-
const normalizedFields =
|
|
45936
|
+
const normalizedFields = React78__default.useMemo(() => {
|
|
45248
45937
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
45249
45938
|
return effectiveFields.map((field) => {
|
|
45250
45939
|
if (typeof field === "string") {
|
|
@@ -45279,7 +45968,7 @@ var init_Form = __esm({
|
|
|
45279
45968
|
};
|
|
45280
45969
|
});
|
|
45281
45970
|
}, [effectiveFields, resolvedEntity, fieldOverrides]);
|
|
45282
|
-
const schemaFields =
|
|
45971
|
+
const schemaFields = React78__default.useMemo(() => {
|
|
45283
45972
|
if (normalizedFields.length === 0) return null;
|
|
45284
45973
|
if (isDebugEnabled()) {
|
|
45285
45974
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -45289,7 +45978,7 @@ var init_Form = __esm({
|
|
|
45289
45978
|
}
|
|
45290
45979
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
45291
45980
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
45292
|
-
const sectionElements =
|
|
45981
|
+
const sectionElements = React78__default.useMemo(() => {
|
|
45293
45982
|
if (!sections || sections.length === 0) return null;
|
|
45294
45983
|
return sections.map((section) => {
|
|
45295
45984
|
if (!isSectionVisible(section)) {
|
|
@@ -46125,7 +46814,7 @@ var init_List = __esm({
|
|
|
46125
46814
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
46126
46815
|
return [];
|
|
46127
46816
|
}, [entity]);
|
|
46128
|
-
const getItemActions =
|
|
46817
|
+
const getItemActions = React78__default.useCallback(
|
|
46129
46818
|
(item) => {
|
|
46130
46819
|
if (!itemActions) return [];
|
|
46131
46820
|
if (typeof itemActions === "function") {
|
|
@@ -46607,7 +47296,7 @@ var init_MediaGallery = __esm({
|
|
|
46607
47296
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
46608
47297
|
);
|
|
46609
47298
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
46610
|
-
const items =
|
|
47299
|
+
const items = React78__default.useMemo(() => {
|
|
46611
47300
|
if (propItems && propItems.length > 0) return propItems;
|
|
46612
47301
|
if (entityData.length === 0) return [];
|
|
46613
47302
|
return entityData.map((record, idx) => {
|
|
@@ -46772,7 +47461,7 @@ var init_MediaGallery = __esm({
|
|
|
46772
47461
|
}
|
|
46773
47462
|
});
|
|
46774
47463
|
function extractTitle2(children) {
|
|
46775
|
-
if (!
|
|
47464
|
+
if (!React78__default.isValidElement(children)) return void 0;
|
|
46776
47465
|
const props = children.props;
|
|
46777
47466
|
if (typeof props.title === "string") {
|
|
46778
47467
|
return props.title;
|
|
@@ -47027,7 +47716,7 @@ var init_debugRegistry = __esm({
|
|
|
47027
47716
|
}
|
|
47028
47717
|
});
|
|
47029
47718
|
function useDebugData() {
|
|
47030
|
-
const [data, setData] =
|
|
47719
|
+
const [data, setData] = React78.useState(() => ({
|
|
47031
47720
|
traits: [],
|
|
47032
47721
|
ticks: [],
|
|
47033
47722
|
guards: [],
|
|
@@ -47041,7 +47730,7 @@ function useDebugData() {
|
|
|
47041
47730
|
},
|
|
47042
47731
|
lastUpdate: Date.now()
|
|
47043
47732
|
}));
|
|
47044
|
-
|
|
47733
|
+
React78.useEffect(() => {
|
|
47045
47734
|
const updateData = () => {
|
|
47046
47735
|
setData({
|
|
47047
47736
|
traits: getAllTraits(),
|
|
@@ -47150,12 +47839,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
47150
47839
|
return positions;
|
|
47151
47840
|
}
|
|
47152
47841
|
function WalkMinimap() {
|
|
47153
|
-
const [walkStep, setWalkStep] =
|
|
47154
|
-
const [traits2, setTraits] =
|
|
47155
|
-
const [coveredEdges, setCoveredEdges] =
|
|
47156
|
-
const [completedTraits, setCompletedTraits] =
|
|
47157
|
-
const prevTraitRef =
|
|
47158
|
-
|
|
47842
|
+
const [walkStep, setWalkStep] = React78.useState(null);
|
|
47843
|
+
const [traits2, setTraits] = React78.useState([]);
|
|
47844
|
+
const [coveredEdges, setCoveredEdges] = React78.useState([]);
|
|
47845
|
+
const [completedTraits, setCompletedTraits] = React78.useState(/* @__PURE__ */ new Set());
|
|
47846
|
+
const prevTraitRef = React78.useRef(null);
|
|
47847
|
+
React78.useEffect(() => {
|
|
47159
47848
|
const interval = setInterval(() => {
|
|
47160
47849
|
const w = window;
|
|
47161
47850
|
const step = w.__orbitalWalkStep;
|
|
@@ -47591,15 +48280,15 @@ var init_EntitiesTab = __esm({
|
|
|
47591
48280
|
});
|
|
47592
48281
|
function EventFlowTab({ events: events2 }) {
|
|
47593
48282
|
const { t } = useTranslate();
|
|
47594
|
-
const [filter, setFilter] =
|
|
47595
|
-
const containerRef =
|
|
47596
|
-
const [autoScroll, setAutoScroll] =
|
|
47597
|
-
|
|
48283
|
+
const [filter, setFilter] = React78.useState("all");
|
|
48284
|
+
const containerRef = React78.useRef(null);
|
|
48285
|
+
const [autoScroll, setAutoScroll] = React78.useState(true);
|
|
48286
|
+
React78.useEffect(() => {
|
|
47598
48287
|
if (autoScroll && containerRef.current) {
|
|
47599
48288
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
47600
48289
|
}
|
|
47601
48290
|
}, [events2.length, autoScroll]);
|
|
47602
|
-
const filteredEvents =
|
|
48291
|
+
const filteredEvents = React78.useMemo(() => {
|
|
47603
48292
|
if (filter === "all") return events2;
|
|
47604
48293
|
return events2.filter((e) => e.type === filter);
|
|
47605
48294
|
}, [events2, filter]);
|
|
@@ -47715,7 +48404,7 @@ var init_EventFlowTab = __esm({
|
|
|
47715
48404
|
});
|
|
47716
48405
|
function GuardsPanel({ guards }) {
|
|
47717
48406
|
const { t } = useTranslate();
|
|
47718
|
-
const [filter, setFilter] =
|
|
48407
|
+
const [filter, setFilter] = React78.useState("all");
|
|
47719
48408
|
if (guards.length === 0) {
|
|
47720
48409
|
return /* @__PURE__ */ jsx(
|
|
47721
48410
|
EmptyState,
|
|
@@ -47728,7 +48417,7 @@ function GuardsPanel({ guards }) {
|
|
|
47728
48417
|
}
|
|
47729
48418
|
const passedCount = guards.filter((g) => g.result).length;
|
|
47730
48419
|
const failedCount = guards.length - passedCount;
|
|
47731
|
-
const filteredGuards =
|
|
48420
|
+
const filteredGuards = React78.useMemo(() => {
|
|
47732
48421
|
if (filter === "all") return guards;
|
|
47733
48422
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
47734
48423
|
return guards.filter((g) => !g.result);
|
|
@@ -47891,10 +48580,10 @@ function EffectBadge({ effect }) {
|
|
|
47891
48580
|
}
|
|
47892
48581
|
function TransitionTimeline({ transitions }) {
|
|
47893
48582
|
const { t } = useTranslate();
|
|
47894
|
-
const containerRef =
|
|
47895
|
-
const [autoScroll, setAutoScroll] =
|
|
47896
|
-
const [expandedId, setExpandedId] =
|
|
47897
|
-
|
|
48583
|
+
const containerRef = React78.useRef(null);
|
|
48584
|
+
const [autoScroll, setAutoScroll] = React78.useState(true);
|
|
48585
|
+
const [expandedId, setExpandedId] = React78.useState(null);
|
|
48586
|
+
React78.useEffect(() => {
|
|
47898
48587
|
if (autoScroll && containerRef.current) {
|
|
47899
48588
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
47900
48589
|
}
|
|
@@ -48174,9 +48863,9 @@ function getAllEvents(traits2) {
|
|
|
48174
48863
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
48175
48864
|
const eventBus = useEventBus();
|
|
48176
48865
|
const { t } = useTranslate();
|
|
48177
|
-
const [log19, setLog] =
|
|
48178
|
-
const prevStatesRef =
|
|
48179
|
-
|
|
48866
|
+
const [log19, setLog] = React78.useState([]);
|
|
48867
|
+
const prevStatesRef = React78.useRef(/* @__PURE__ */ new Map());
|
|
48868
|
+
React78.useEffect(() => {
|
|
48180
48869
|
for (const trait of traits2) {
|
|
48181
48870
|
const prev = prevStatesRef.current.get(trait.id);
|
|
48182
48871
|
if (prev && prev !== trait.currentState) {
|
|
@@ -48345,10 +49034,10 @@ function VerifyModePanel({
|
|
|
48345
49034
|
localCount
|
|
48346
49035
|
}) {
|
|
48347
49036
|
const { t } = useTranslate();
|
|
48348
|
-
const [expanded, setExpanded] =
|
|
48349
|
-
const scrollRef =
|
|
48350
|
-
const prevCountRef =
|
|
48351
|
-
|
|
49037
|
+
const [expanded, setExpanded] = React78.useState(true);
|
|
49038
|
+
const scrollRef = React78.useRef(null);
|
|
49039
|
+
const prevCountRef = React78.useRef(0);
|
|
49040
|
+
React78.useEffect(() => {
|
|
48352
49041
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
48353
49042
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
48354
49043
|
}
|
|
@@ -48405,10 +49094,10 @@ function RuntimeDebugger({
|
|
|
48405
49094
|
schema
|
|
48406
49095
|
}) {
|
|
48407
49096
|
const { t } = useTranslate();
|
|
48408
|
-
const [isCollapsed, setIsCollapsed] =
|
|
48409
|
-
const [isVisible, setIsVisible] =
|
|
49097
|
+
const [isCollapsed, setIsCollapsed] = React78.useState(mode === "verify" ? true : defaultCollapsed);
|
|
49098
|
+
const [isVisible, setIsVisible] = React78.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
48410
49099
|
const debugData = useDebugData();
|
|
48411
|
-
|
|
49100
|
+
React78.useEffect(() => {
|
|
48412
49101
|
if (mode === "inline") return;
|
|
48413
49102
|
return onDebugToggle((enabled) => {
|
|
48414
49103
|
setIsVisible(enabled);
|
|
@@ -48417,7 +49106,7 @@ function RuntimeDebugger({
|
|
|
48417
49106
|
}
|
|
48418
49107
|
});
|
|
48419
49108
|
}, [mode]);
|
|
48420
|
-
|
|
49109
|
+
React78.useEffect(() => {
|
|
48421
49110
|
if (mode === "inline") return;
|
|
48422
49111
|
const handleKeyDown = (e) => {
|
|
48423
49112
|
if (e.key === "`" && isVisible) {
|
|
@@ -48432,7 +49121,7 @@ function RuntimeDebugger({
|
|
|
48432
49121
|
if (!isVisible) {
|
|
48433
49122
|
return null;
|
|
48434
49123
|
}
|
|
48435
|
-
const
|
|
49124
|
+
const positionClasses2 = {
|
|
48436
49125
|
"bottom-right": "bottom-4 right-4",
|
|
48437
49126
|
"bottom-left": "bottom-4 left-4",
|
|
48438
49127
|
"top-right": "top-4 right-4",
|
|
@@ -48561,7 +49250,7 @@ function RuntimeDebugger({
|
|
|
48561
49250
|
className: cn(
|
|
48562
49251
|
"runtime-debugger",
|
|
48563
49252
|
"fixed",
|
|
48564
|
-
|
|
49253
|
+
positionClasses2[position],
|
|
48565
49254
|
isCollapsed ? "runtime-debugger--collapsed" : "runtime-debugger--expanded",
|
|
48566
49255
|
className
|
|
48567
49256
|
),
|
|
@@ -48643,6 +49332,7 @@ var init_SegmentRenderer = __esm({
|
|
|
48643
49332
|
"use client";
|
|
48644
49333
|
init_MarkdownContent();
|
|
48645
49334
|
init_CodeBlock();
|
|
49335
|
+
init_MermaidDiagram();
|
|
48646
49336
|
init_QuizBlock();
|
|
48647
49337
|
init_ActivationBlock();
|
|
48648
49338
|
init_ConnectionBlock();
|
|
@@ -48674,6 +49364,9 @@ var init_SegmentRenderer = __esm({
|
|
|
48674
49364
|
return /* @__PURE__ */ jsx(MarkdownContent, { content: segment.content }, `md-${index}`);
|
|
48675
49365
|
}
|
|
48676
49366
|
if (segment.type === "code") {
|
|
49367
|
+
if (segment.language === "mermaid") {
|
|
49368
|
+
return /* @__PURE__ */ jsx(MermaidDiagram, { code: segment.content }, `code-${index}`);
|
|
49369
|
+
}
|
|
48677
49370
|
if (segment.runnable && onRunCodeSimulation) {
|
|
48678
49371
|
return /* @__PURE__ */ jsx(
|
|
48679
49372
|
CodeRunnerPanel,
|
|
@@ -48806,99 +49499,6 @@ var init_ShowcaseOrganism = __esm({
|
|
|
48806
49499
|
ShowcaseOrganism.displayName = "ShowcaseOrganism";
|
|
48807
49500
|
}
|
|
48808
49501
|
});
|
|
48809
|
-
var SplitPane;
|
|
48810
|
-
var init_SplitPane = __esm({
|
|
48811
|
-
"components/core/organisms/layout/SplitPane.tsx"() {
|
|
48812
|
-
"use client";
|
|
48813
|
-
init_cn();
|
|
48814
|
-
SplitPane = ({
|
|
48815
|
-
direction = "horizontal",
|
|
48816
|
-
ratio: initialRatio = 50,
|
|
48817
|
-
minSize = 100,
|
|
48818
|
-
resizable = true,
|
|
48819
|
-
left,
|
|
48820
|
-
right,
|
|
48821
|
-
className,
|
|
48822
|
-
leftClassName,
|
|
48823
|
-
rightClassName
|
|
48824
|
-
}) => {
|
|
48825
|
-
const [ratio, setRatio] = useState(initialRatio);
|
|
48826
|
-
const containerRef = useRef(null);
|
|
48827
|
-
const isDragging = useRef(false);
|
|
48828
|
-
const handlePointerDown = useCallback(
|
|
48829
|
-
(e) => {
|
|
48830
|
-
if (!resizable) return;
|
|
48831
|
-
e.preventDefault();
|
|
48832
|
-
isDragging.current = true;
|
|
48833
|
-
e.currentTarget.setPointerCapture(e.pointerId);
|
|
48834
|
-
const handlePointerMove = (ev) => {
|
|
48835
|
-
if (!isDragging.current || !containerRef.current) return;
|
|
48836
|
-
const rect = containerRef.current.getBoundingClientRect();
|
|
48837
|
-
let newRatio;
|
|
48838
|
-
if (direction === "horizontal") {
|
|
48839
|
-
const x = ev.clientX - rect.left;
|
|
48840
|
-
newRatio = x / rect.width * 100;
|
|
48841
|
-
} else {
|
|
48842
|
-
const y = ev.clientY - rect.top;
|
|
48843
|
-
newRatio = y / rect.height * 100;
|
|
48844
|
-
}
|
|
48845
|
-
const minRatio = minSize / (direction === "horizontal" ? rect.width : rect.height) * 100;
|
|
48846
|
-
const maxRatio = 100 - minRatio;
|
|
48847
|
-
newRatio = Math.max(minRatio, Math.min(maxRatio, newRatio));
|
|
48848
|
-
setRatio(newRatio);
|
|
48849
|
-
};
|
|
48850
|
-
const handlePointerUp = () => {
|
|
48851
|
-
isDragging.current = false;
|
|
48852
|
-
document.removeEventListener("pointermove", handlePointerMove);
|
|
48853
|
-
document.removeEventListener("pointerup", handlePointerUp);
|
|
48854
|
-
document.removeEventListener("pointercancel", handlePointerUp);
|
|
48855
|
-
};
|
|
48856
|
-
document.addEventListener("pointermove", handlePointerMove);
|
|
48857
|
-
document.addEventListener("pointerup", handlePointerUp);
|
|
48858
|
-
document.addEventListener("pointercancel", handlePointerUp);
|
|
48859
|
-
},
|
|
48860
|
-
[direction, minSize, resizable]
|
|
48861
|
-
);
|
|
48862
|
-
const isHorizontal = direction === "horizontal";
|
|
48863
|
-
return /* @__PURE__ */ jsxs(
|
|
48864
|
-
"div",
|
|
48865
|
-
{
|
|
48866
|
-
ref: containerRef,
|
|
48867
|
-
className: cn(
|
|
48868
|
-
"flex w-full h-full",
|
|
48869
|
-
isHorizontal ? "flex-row" : "flex-col",
|
|
48870
|
-
className
|
|
48871
|
-
),
|
|
48872
|
-
children: [
|
|
48873
|
-
/* @__PURE__ */ jsx(
|
|
48874
|
-
"div",
|
|
48875
|
-
{
|
|
48876
|
-
className: cn("overflow-auto", leftClassName),
|
|
48877
|
-
style: {
|
|
48878
|
-
[isHorizontal ? "width" : "height"]: `${ratio}%`,
|
|
48879
|
-
flexShrink: 0
|
|
48880
|
-
},
|
|
48881
|
-
children: left
|
|
48882
|
-
}
|
|
48883
|
-
),
|
|
48884
|
-
resizable && /* @__PURE__ */ jsx(
|
|
48885
|
-
"div",
|
|
48886
|
-
{
|
|
48887
|
-
onPointerDown: handlePointerDown,
|
|
48888
|
-
className: cn(
|
|
48889
|
-
"flex-shrink-0 bg-border transition-colors touch-none",
|
|
48890
|
-
isHorizontal ? "w-1 cursor-col-resize hover:w-1.5 hover:bg-muted-foreground" : "h-1 cursor-row-resize hover:h-1.5 hover:bg-muted-foreground"
|
|
48891
|
-
)
|
|
48892
|
-
}
|
|
48893
|
-
),
|
|
48894
|
-
/* @__PURE__ */ jsx("div", { className: cn("flex-1 overflow-auto", rightClassName), children: right })
|
|
48895
|
-
]
|
|
48896
|
-
}
|
|
48897
|
-
);
|
|
48898
|
-
};
|
|
48899
|
-
SplitPane.displayName = "SplitPane";
|
|
48900
|
-
}
|
|
48901
|
-
});
|
|
48902
49502
|
var StatCard;
|
|
48903
49503
|
var init_StatCard = __esm({
|
|
48904
49504
|
"components/core/organisms/StatCard.tsx"() {
|
|
@@ -48937,7 +49537,7 @@ var init_StatCard = __esm({
|
|
|
48937
49537
|
const labelToUse = propLabel ?? propTitle;
|
|
48938
49538
|
const eventBus = useEventBus();
|
|
48939
49539
|
const { t } = useTranslate();
|
|
48940
|
-
const handleActionClick =
|
|
49540
|
+
const handleActionClick = React78__default.useCallback(() => {
|
|
48941
49541
|
if (action?.event) {
|
|
48942
49542
|
eventBus.emit(`UI:${action.event}`, {});
|
|
48943
49543
|
}
|
|
@@ -48948,7 +49548,7 @@ var init_StatCard = __esm({
|
|
|
48948
49548
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
48949
49549
|
const isLoading = externalLoading ?? false;
|
|
48950
49550
|
const error = externalError;
|
|
48951
|
-
const computeMetricValue =
|
|
49551
|
+
const computeMetricValue = React78__default.useCallback(
|
|
48952
49552
|
(metric, items) => {
|
|
48953
49553
|
if (metric.value !== void 0) {
|
|
48954
49554
|
return metric.value;
|
|
@@ -48987,7 +49587,7 @@ var init_StatCard = __esm({
|
|
|
48987
49587
|
},
|
|
48988
49588
|
[]
|
|
48989
49589
|
);
|
|
48990
|
-
const schemaStats =
|
|
49590
|
+
const schemaStats = React78__default.useMemo(() => {
|
|
48991
49591
|
if (!metrics || metrics.length === 0) return null;
|
|
48992
49592
|
return metrics.map((metric) => ({
|
|
48993
49593
|
label: metric.label,
|
|
@@ -48995,7 +49595,7 @@ var init_StatCard = __esm({
|
|
|
48995
49595
|
format: metric.format
|
|
48996
49596
|
}));
|
|
48997
49597
|
}, [metrics, data, computeMetricValue]);
|
|
48998
|
-
const calculatedTrend =
|
|
49598
|
+
const calculatedTrend = React78__default.useMemo(() => {
|
|
48999
49599
|
if (manualTrend !== void 0) return manualTrend;
|
|
49000
49600
|
if (previousValue === void 0 || currentValue2 === void 0)
|
|
49001
49601
|
return void 0;
|
|
@@ -49635,8 +50235,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
49635
50235
|
] });
|
|
49636
50236
|
};
|
|
49637
50237
|
InlineActivityStream = ({ activities, autoScroll = true, className }) => {
|
|
49638
|
-
const endRef =
|
|
49639
|
-
|
|
50238
|
+
const endRef = React78__default.useRef(null);
|
|
50239
|
+
React78__default.useEffect(() => {
|
|
49640
50240
|
if (!autoScroll) return;
|
|
49641
50241
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
49642
50242
|
}, [activities.length, autoScroll]);
|
|
@@ -49730,7 +50330,7 @@ var init_SubagentTracePanel = __esm({
|
|
|
49730
50330
|
};
|
|
49731
50331
|
SubagentRichCard = ({ subagent }) => {
|
|
49732
50332
|
const { t } = useTranslate();
|
|
49733
|
-
const activities =
|
|
50333
|
+
const activities = React78__default.useMemo(
|
|
49734
50334
|
() => subagentMessagesToActivities(subagent.messages),
|
|
49735
50335
|
[subagent.messages]
|
|
49736
50336
|
);
|
|
@@ -49807,8 +50407,8 @@ var init_SubagentTracePanel = __esm({
|
|
|
49807
50407
|
] });
|
|
49808
50408
|
};
|
|
49809
50409
|
CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
|
|
49810
|
-
const endRef =
|
|
49811
|
-
|
|
50410
|
+
const endRef = React78__default.useRef(null);
|
|
50411
|
+
React78__default.useEffect(() => {
|
|
49812
50412
|
if (!autoScroll) return;
|
|
49813
50413
|
endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
|
|
49814
50414
|
}, [messages.length, autoScroll]);
|
|
@@ -50243,7 +50843,7 @@ var init_Timeline = __esm({
|
|
|
50243
50843
|
}) => {
|
|
50244
50844
|
const { t } = useTranslate();
|
|
50245
50845
|
const entityData = entity ?? [];
|
|
50246
|
-
const items =
|
|
50846
|
+
const items = React78__default.useMemo(() => {
|
|
50247
50847
|
if (propItems) return propItems;
|
|
50248
50848
|
if (entityData.length === 0) return [];
|
|
50249
50849
|
return entityData.map((record, idx) => {
|
|
@@ -50345,7 +50945,7 @@ var init_Timeline = __esm({
|
|
|
50345
50945
|
}
|
|
50346
50946
|
});
|
|
50347
50947
|
function extractToastProps(children) {
|
|
50348
|
-
if (!
|
|
50948
|
+
if (!React78__default.isValidElement(children)) {
|
|
50349
50949
|
if (typeof children === "string") {
|
|
50350
50950
|
return { message: children };
|
|
50351
50951
|
}
|
|
@@ -50387,7 +50987,7 @@ var init_ToastSlot = __esm({
|
|
|
50387
50987
|
eventBus.emit(`${prefix}CLOSE`);
|
|
50388
50988
|
};
|
|
50389
50989
|
if (!isVisible) return null;
|
|
50390
|
-
const isCustomContent =
|
|
50990
|
+
const isCustomContent = React78__default.isValidElement(children) && !message;
|
|
50391
50991
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
50392
50992
|
Toast,
|
|
50393
50993
|
{
|
|
@@ -50482,6 +51082,7 @@ var init_component_registry_generated = __esm({
|
|
|
50482
51082
|
init_DocSearch();
|
|
50483
51083
|
init_DocSidebar();
|
|
50484
51084
|
init_DocTOC();
|
|
51085
|
+
init_DockLayout();
|
|
50485
51086
|
init_DocumentDetails();
|
|
50486
51087
|
init_DocumentPanel();
|
|
50487
51088
|
init_DocumentViewer();
|
|
@@ -50512,6 +51113,7 @@ var init_component_registry_generated = __esm({
|
|
|
50512
51113
|
init_FlipCard();
|
|
50513
51114
|
init_FlipContainer();
|
|
50514
51115
|
init_FloatingActionButton();
|
|
51116
|
+
init_FloatingToolbar();
|
|
50515
51117
|
init_Form();
|
|
50516
51118
|
init_FormField();
|
|
50517
51119
|
init_FormSection();
|
|
@@ -50756,6 +51358,7 @@ var init_component_registry_generated = __esm({
|
|
|
50756
51358
|
"DocSearch": DocSearch,
|
|
50757
51359
|
"DocSidebar": DocSidebar,
|
|
50758
51360
|
"DocTOC": DocTOC,
|
|
51361
|
+
"DockLayout": DockLayout,
|
|
50759
51362
|
"DocumentDetails": DocumentDetails,
|
|
50760
51363
|
"DocumentPanel": DocumentPanel,
|
|
50761
51364
|
"DocumentViewer": DocumentViewer,
|
|
@@ -50786,6 +51389,7 @@ var init_component_registry_generated = __esm({
|
|
|
50786
51389
|
"FlipCard": FlipCard,
|
|
50787
51390
|
"FlipContainer": FlipContainer,
|
|
50788
51391
|
"FloatingActionButton": FloatingActionButton,
|
|
51392
|
+
"FloatingToolbar": FloatingToolbar,
|
|
50789
51393
|
"Form": Form,
|
|
50790
51394
|
"FormField": FormField,
|
|
50791
51395
|
"FormLayout": FormLayout,
|
|
@@ -50973,7 +51577,7 @@ function SuspenseConfigProvider({
|
|
|
50973
51577
|
config,
|
|
50974
51578
|
children
|
|
50975
51579
|
}) {
|
|
50976
|
-
return
|
|
51580
|
+
return React78__default.createElement(
|
|
50977
51581
|
SuspenseConfigContext.Provider,
|
|
50978
51582
|
{ value: config },
|
|
50979
51583
|
children
|
|
@@ -51021,7 +51625,7 @@ function enrichFormFields(fields, entityDef) {
|
|
|
51021
51625
|
}
|
|
51022
51626
|
return { name: field, label: humanizeFieldName(field) };
|
|
51023
51627
|
}
|
|
51024
|
-
if (field && typeof field === "object" && !Array.isArray(field) && !
|
|
51628
|
+
if (field && typeof field === "object" && !Array.isArray(field) && !React78__default.isValidElement(field) && !(field instanceof Date)) {
|
|
51025
51629
|
const obj = field;
|
|
51026
51630
|
const fieldName2 = typeof obj.name === "string" ? obj.name : typeof obj.field === "string" ? obj.field : void 0;
|
|
51027
51631
|
if (!fieldName2) return field;
|
|
@@ -51074,7 +51678,7 @@ function enrichDetailFields(fields, entityDef) {
|
|
|
51074
51678
|
const meta = metaFor(field);
|
|
51075
51679
|
return meta ? { key: field, ...meta } : field;
|
|
51076
51680
|
}
|
|
51077
|
-
if (field && typeof field === "object" && !Array.isArray(field) && !
|
|
51681
|
+
if (field && typeof field === "object" && !Array.isArray(field) && !React78__default.isValidElement(field) && !(field instanceof Date)) {
|
|
51078
51682
|
const obj = field;
|
|
51079
51683
|
const fieldName2 = typeof obj.key === "string" ? obj.key : typeof obj.name === "string" ? obj.name : void 0;
|
|
51080
51684
|
if (!fieldName2 || obj.type) return field;
|
|
@@ -51533,7 +52137,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
51533
52137
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
51534
52138
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
51535
52139
|
}
|
|
51536
|
-
return /* @__PURE__ */ jsx(
|
|
52140
|
+
return /* @__PURE__ */ jsx(React78__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
51537
52141
|
}
|
|
51538
52142
|
if (!child || typeof child !== "object") return null;
|
|
51539
52143
|
const childId = `${parentId}-${index}`;
|
|
@@ -51590,7 +52194,7 @@ function isPatternConfig(value) {
|
|
|
51590
52194
|
if (value === null || value === void 0) return false;
|
|
51591
52195
|
if (typeof value !== "object") return false;
|
|
51592
52196
|
if (Array.isArray(value)) return false;
|
|
51593
|
-
if (
|
|
52197
|
+
if (React78__default.isValidElement(value)) return false;
|
|
51594
52198
|
if (value instanceof Date) return false;
|
|
51595
52199
|
if (typeof value === "function") return false;
|
|
51596
52200
|
const record = value;
|
|
@@ -51603,9 +52207,9 @@ function renderPatternValue(value) {
|
|
|
51603
52207
|
if (typeof value === "string") return renderPatternChildren(value, () => {
|
|
51604
52208
|
});
|
|
51605
52209
|
if (value instanceof Date) return value.toLocaleString();
|
|
51606
|
-
if (
|
|
52210
|
+
if (React78__default.isValidElement(value)) return value;
|
|
51607
52211
|
if (Array.isArray(value)) {
|
|
51608
|
-
return value.map((item, index) => /* @__PURE__ */ jsx(
|
|
52212
|
+
return value.map((item, index) => /* @__PURE__ */ jsx(React78__default.Fragment, { children: renderPatternValue(item) }, index));
|
|
51609
52213
|
}
|
|
51610
52214
|
if (isPatternConfig(value)) {
|
|
51611
52215
|
const { type, ...props } = value;
|
|
@@ -51615,7 +52219,7 @@ function renderPatternValue(value) {
|
|
|
51615
52219
|
return null;
|
|
51616
52220
|
}
|
|
51617
52221
|
function isPlainConfigObject(value) {
|
|
51618
|
-
if (
|
|
52222
|
+
if (React78__default.isValidElement(value)) return false;
|
|
51619
52223
|
if (value instanceof Date) return false;
|
|
51620
52224
|
const proto = Object.getPrototypeOf(value);
|
|
51621
52225
|
return proto === Object.prototype || proto === null;
|
|
@@ -51789,7 +52393,7 @@ function SlotContentRenderer({
|
|
|
51789
52393
|
for (const slotKey of CONTENT_NODE_SLOTS) {
|
|
51790
52394
|
const slotVal = restProps[slotKey];
|
|
51791
52395
|
if (slotVal === void 0 || slotVal === null) continue;
|
|
51792
|
-
if (
|
|
52396
|
+
if (React78__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
|
|
51793
52397
|
const typelessChildren = !Array.isArray(slotVal) && typeof slotVal === "object" && !("type" in slotVal) && Array.isArray(slotVal.children) ? slotVal.children : void 0;
|
|
51794
52398
|
if (typelessChildren !== void 0 || Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
|
|
51795
52399
|
nodeSlotOverrides[slotKey] = renderPatternChildren(
|
|
@@ -51843,7 +52447,7 @@ function SlotContentRenderer({
|
|
|
51843
52447
|
const resolvedItems = Array.isArray(entityVal) && entityVal[0] !== "fn" ? entityVal : null;
|
|
51844
52448
|
if (resolvedItems && resolvedItems.length > 0 && !finalProps.fields && !finalProps.columns) {
|
|
51845
52449
|
const sample = resolvedItems[0];
|
|
51846
|
-
if (sample && typeof sample === "object" && !Array.isArray(sample) && !
|
|
52450
|
+
if (sample && typeof sample === "object" && !Array.isArray(sample) && !React78__default.isValidElement(sample) && !(sample instanceof Date)) {
|
|
51847
52451
|
const keys = Object.keys(sample).filter((k) => k !== "id" && k !== "_id");
|
|
51848
52452
|
finalProps.fields = keys.map((k, i) => ({ name: k, variant: i === 0 ? "h4" : "body" }));
|
|
51849
52453
|
}
|
|
@@ -52176,6 +52780,7 @@ init_SplitPane();
|
|
|
52176
52780
|
init_MasterDetailLayout();
|
|
52177
52781
|
init_DashboardGrid();
|
|
52178
52782
|
init_TabbedContainer();
|
|
52783
|
+
init_DockLayout();
|
|
52179
52784
|
|
|
52180
52785
|
// components/core/organisms/index.ts
|
|
52181
52786
|
init_molecules();
|
|
@@ -53176,7 +53781,7 @@ function expressionEqual(a, b) {
|
|
|
53176
53781
|
function isPlainSlotObject(value) {
|
|
53177
53782
|
if (value === null || value === void 0 || typeof value !== "object") return false;
|
|
53178
53783
|
if (Array.isArray(value)) return false;
|
|
53179
|
-
if (
|
|
53784
|
+
if (React78__default.isValidElement(value)) return false;
|
|
53180
53785
|
if (value instanceof Date) return false;
|
|
53181
53786
|
if (isRenderBindingMarker(value)) return false;
|
|
53182
53787
|
return true;
|
|
@@ -53195,7 +53800,7 @@ function shareValue(prev, next) {
|
|
|
53195
53800
|
return prev instanceof Date && next instanceof Date && prev.getTime() === next.getTime() ? { value: prev, equal: true } : { value: next, equal: false };
|
|
53196
53801
|
}
|
|
53197
53802
|
if (typeof prev === "function" || typeof next === "function") return { value: next, equal: false };
|
|
53198
|
-
if (
|
|
53803
|
+
if (React78__default.isValidElement(prev) || React78__default.isValidElement(next)) return { value: next, equal: false };
|
|
53199
53804
|
if (Array.isArray(prev) && Array.isArray(next)) {
|
|
53200
53805
|
let equal = prev.length === next.length;
|
|
53201
53806
|
const out = new Array(next.length);
|
|
@@ -54104,6 +54709,8 @@ var en_default = {
|
|
|
54104
54709
|
"orbInspector.tokenGroup.shadows": "Shadows",
|
|
54105
54710
|
"orbInspector.tab.inspector": "Inspector",
|
|
54106
54711
|
"orbInspector.tab.styles": "Styles",
|
|
54712
|
+
"orbInspector.tab.design": "Design",
|
|
54713
|
+
"orbInspector.tab.prototype": "Prototype",
|
|
54107
54714
|
"orbInspector.tab.code": "Code",
|
|
54108
54715
|
"canvas.goBackToOverview": "Go back to overview",
|
|
54109
54716
|
"canvas.overview": "Overview",
|
|
@@ -54343,104 +54950,8 @@ init_useInfiniteScroll();
|
|
|
54343
54950
|
init_usePullToRefresh();
|
|
54344
54951
|
init_useCanvasGestures();
|
|
54345
54952
|
init_useTapReveal();
|
|
54346
|
-
|
|
54347
|
-
|
|
54348
|
-
init_useEventBus();
|
|
54349
|
-
var ALMADAR_DND_MIME = "application/x-almadar-dnd";
|
|
54350
|
-
function useDraggable({ payload, disabled = false }) {
|
|
54351
|
-
const [isDragging, setIsDragging] = useState(false);
|
|
54352
|
-
const eventBus = useEventBus();
|
|
54353
|
-
const handleDragStart = useCallback(
|
|
54354
|
-
(e) => {
|
|
54355
|
-
if (disabled) {
|
|
54356
|
-
e.preventDefault();
|
|
54357
|
-
return;
|
|
54358
|
-
}
|
|
54359
|
-
e.dataTransfer.setData(ALMADAR_DND_MIME, JSON.stringify(payload));
|
|
54360
|
-
e.dataTransfer.effectAllowed = "copy";
|
|
54361
|
-
setIsDragging(true);
|
|
54362
|
-
eventBus.emit("UI:DRAG_START", { kind: payload.kind, data: payload.data });
|
|
54363
|
-
},
|
|
54364
|
-
[disabled, payload, eventBus]
|
|
54365
|
-
);
|
|
54366
|
-
const handleDragEnd = useCallback(
|
|
54367
|
-
(e) => {
|
|
54368
|
-
setIsDragging(false);
|
|
54369
|
-
eventBus.emit("UI:DRAG_END", { kind: payload.kind, data: payload.data });
|
|
54370
|
-
},
|
|
54371
|
-
[payload, eventBus]
|
|
54372
|
-
);
|
|
54373
|
-
const dragProps = useMemo(
|
|
54374
|
-
() => ({
|
|
54375
|
-
draggable: !disabled,
|
|
54376
|
-
onDragStart: handleDragStart,
|
|
54377
|
-
onDragEnd: handleDragEnd,
|
|
54378
|
-
"aria-grabbed": isDragging
|
|
54379
|
-
}),
|
|
54380
|
-
[disabled, handleDragStart, handleDragEnd, isDragging]
|
|
54381
|
-
);
|
|
54382
|
-
return { dragProps, isDragging };
|
|
54383
|
-
}
|
|
54384
|
-
|
|
54385
|
-
// hooks/useDropZone.ts
|
|
54386
|
-
init_useEventBus();
|
|
54387
|
-
function parsePayload(e) {
|
|
54388
|
-
try {
|
|
54389
|
-
const raw = e.dataTransfer.getData(ALMADAR_DND_MIME);
|
|
54390
|
-
if (!raw) return null;
|
|
54391
|
-
const parsed = JSON.parse(raw);
|
|
54392
|
-
if (typeof parsed.kind !== "string" || !parsed.data) return null;
|
|
54393
|
-
return parsed;
|
|
54394
|
-
} catch {
|
|
54395
|
-
return null;
|
|
54396
|
-
}
|
|
54397
|
-
}
|
|
54398
|
-
function hasAlmadarPayload(e) {
|
|
54399
|
-
return e.dataTransfer.types.includes(ALMADAR_DND_MIME);
|
|
54400
|
-
}
|
|
54401
|
-
function useDropZone({ accepts, onDrop, disabled = false }) {
|
|
54402
|
-
const [isOver, setIsOver] = useState(false);
|
|
54403
|
-
const eventBus = useEventBus();
|
|
54404
|
-
const handleDragOver = useCallback(
|
|
54405
|
-
(e) => {
|
|
54406
|
-
if (disabled) return;
|
|
54407
|
-
if (!hasAlmadarPayload(e)) return;
|
|
54408
|
-
e.preventDefault();
|
|
54409
|
-
e.dataTransfer.dropEffect = "copy";
|
|
54410
|
-
setIsOver(true);
|
|
54411
|
-
},
|
|
54412
|
-
[disabled]
|
|
54413
|
-
);
|
|
54414
|
-
const handleDragLeave = useCallback(
|
|
54415
|
-
(e) => {
|
|
54416
|
-
setIsOver(false);
|
|
54417
|
-
},
|
|
54418
|
-
[]
|
|
54419
|
-
);
|
|
54420
|
-
const handleDrop = useCallback(
|
|
54421
|
-
(e) => {
|
|
54422
|
-
e.preventDefault();
|
|
54423
|
-
setIsOver(false);
|
|
54424
|
-
if (disabled) return;
|
|
54425
|
-
const payload = parsePayload(e);
|
|
54426
|
-
if (!payload) return;
|
|
54427
|
-
if (!accepts.includes(payload.kind)) return;
|
|
54428
|
-
const position = { x: e.clientX, y: e.clientY };
|
|
54429
|
-
onDrop(payload, position);
|
|
54430
|
-
eventBus.emit("UI:DROP", { kind: payload.kind, data: payload.data, ...position });
|
|
54431
|
-
},
|
|
54432
|
-
[disabled, accepts, onDrop, eventBus]
|
|
54433
|
-
);
|
|
54434
|
-
const dropProps = useMemo(
|
|
54435
|
-
() => ({
|
|
54436
|
-
onDragOver: handleDragOver,
|
|
54437
|
-
onDragLeave: handleDragLeave,
|
|
54438
|
-
onDrop: handleDrop
|
|
54439
|
-
}),
|
|
54440
|
-
[handleDragOver, handleDragLeave, handleDrop]
|
|
54441
|
-
);
|
|
54442
|
-
return { dropProps, isOver };
|
|
54443
|
-
}
|
|
54953
|
+
init_useDraggable();
|
|
54954
|
+
init_useDropZone();
|
|
54444
54955
|
function useRenderInterpolation(options = {}) {
|
|
54445
54956
|
const tickIntervalMs = options.tickIntervalMs ?? 1e3 / 30;
|
|
54446
54957
|
const prevRef = useRef(null);
|
|
@@ -54584,4 +55095,4 @@ function useGitHubBranches(owner, repo, enabled = true) {
|
|
|
54584
55095
|
});
|
|
54585
55096
|
}
|
|
54586
55097
|
|
|
54587
|
-
export { ALL_PRESETS, ALMADAR_DND_MIME, AR_BOOK_FIELDS, AboutPageTemplate, Accordion, Card2 as ActionCard, ActionPalette, ActionTile, ActivationBlock, Alert, AlgoGraphCanvas, AlgorithmCanvas, AnimatedCounter, AnimatedGraphic, AnimatedReveal, ArticleSection, Aside, AssetPicker, AtlasImage, AtlasPanel, AuthLayout, Avatar, Badge, BehaviorView, BiologyCanvas, BloomQuizBlock, BookChapterView, BookCoverPage, BookNavBar, BookTableOfContents, BookViewer, Box, BranchingLogicBuilder, Breadcrumb, Button, ButtonGroup, CTABanner, CalendarGrid, Canvas, Canvas2D, Card, CardBody, CardContent, CardFooter, CardGrid, CardHeader, CardTitle, Carousel, CaseStudyCard, CaseStudyOrganism, Center, Chart, ChartLegend, ChatBar, Checkbox, ChemistryCanvas, ChoiceButton, Coachmark, CodeBlock, CodeRunnerPanel, CollapsibleSection, CommunityLinks, ConditionalWrapper, ConfettiEffect, ConfirmDialog, ConnectionBlock, Container, ContentRenderer, ContentSection, ControlButton, ControlGrid, CounterTemplate, DEFAULT_LIKERT_OPTIONS, DEFAULT_MATRIX_COLUMNS, DEFAULT_SLOTS, DIAMOND_TOP_Y, DashboardGrid, DashboardLayout, DataGrid, DataList, DataTable, DateRangePicker, DateRangeSelector, DayCell, DetailPanel, Dialog, DialogueBubble, Divider, DocBreadcrumb, DocPagination, DocSearch, DocSidebar, DocTOC, DocumentDetails, DocumentPanel, DocumentViewer, StateMachineView as DomStateMachineVisualizer, Drawer, DrawerSlot, ELEMENT_SELECTED_EVENT, EdgeDecoration, EditorCheckbox, EditorSelect, EditorSlider, EditorTextInput, EditorToolbar, EmojiPicker, EmptyState, EntityDisplayEvents, ErrorBoundary, ErrorState, FEATURE_COLORS, FEATURE_TYPES, FLOOR_HEIGHT, FeatureCard, FeatureDetailPageTemplate, FeatureGrid, FeatureGridOrganism, FileTree, FilterGroup, FilterPill, Flex, FlipCard, FlipContainer, FloatingActionButton, Form, FormActions, FormField, FormLayout, FormSection, FormSectionHeader, FxOverlay, GameAudioToggle, GameHud, GameIcon, GameMenu, GameShell, GenericAppTemplate, GeometricPattern, GradientDivider, GraphCanvas, GraphView, Grid, GridPicker, HStack, Header, HealthBar, HeroOrganism, HeroSection, I18nProvider, IDENTITY_BOOK_FIELDS, Icon, IconPicker, ImportPreviewTree, ImportProgress, ImportSourcePicker, InfiniteScrollSentinel, Input, InputGroup, InstallBox, JazariStateMachine, JsonTreeEditor, Label, LandingPageTemplate, LawReferenceTooltip, LearningCanvas, LearningScene3D, Lightbox, LikertScale, LineChart2 as LineChart, List3 as List, LoadingState, MapView, MarkdownContent, MarketingFooter, MarketingStatCard, MasterDetail, MasterDetailLayout, MathCanvas, MatrixQuestion, MediaGallery, Menu, Meter, Modal, ModalSlot, ModuleCard, Navigation, NodeSlotEditor, NotifyListener, NumberStepper, OnboardingSpotlight, OptionConstraintGroup, StateMachineView as OrbitalStateMachineView, OrbitalVisualization, Overlay, PageHeader, PageTransition, Pagination, PatternTile, PhysicsCanvas, Popover, PositionedCanvas, Presence, PricingCard, PricingGrid, PricingOrganism, PricingPageTemplate, ProgressBar, ProgressDots, PropertyInspector, PullQuote, PullToRefresh, QrScanner, QuizBlock, Radio, RangeSlider, ReflectionBlock, RelationSelect, RepeatableFormSection, ReplyTree, RichTextEditor, RuntimeDebugger, SHEET_COLUMNS, SPRITE_SHEET_LAYOUT, ScaledDiagram, ScoreDisplay, SearchInput, Section, SectionHeader, SegmentRenderer, Select, SequenceBar, ServiceCatalog, SharedEntityStoreContext, ShowcaseCard, ShowcaseOrganism, SidePanel, Sidebar, SignaturePad, SimpleGrid, Skeleton, SlotContentRenderer, SocialProof, SortableList, Spacer, Sparkline, Spinner, Split, SplitPane, SplitSection, Stack, StarRating, StatBadge, StatCard, StatDisplay, StateGraph, StateJsonView, StateMachineView, StateNode2 as StateNode, StatsGrid, StatsOrganism, StatusBar, StatusDot, StepFlow, StepFlowOrganism, SubagentTracePanel, SvgBranch, SvgConnection, SvgFlow, SvgGrid, SvgLobe, SvgMesh, SvgMorph, SvgNode, SvgPulse, SvgRing, SvgShield, SvgStack, SwipeableRow, Switch, TERRAIN_COLORS, TILE_HEIGHT, TILE_WIDTH, TabbedContainer, TableView, Tabs, TagCloud, TagInput, TeamCard, TeamOrganism, TerrainPalette, TextHighlight, Textarea, ThemeToggle, TimeSlotCell, Timeline, TimerDisplay, Toast, ToastSlot, Tooltip, TraitFrame, TraitSlot, TraitStateViewer, TransitionArrow, TrendIndicator, TypewriterText, Typography, UISlotComponent, UISlotRenderer, UploadDropZone, VStack, VersionDiff, ViolationAlert, VoteStack, WizardContainer, WizardNavigation, WizardProgress, arrowBetween, billboardLabel, boardEntity, bool, calculateAttackTargets, calculateValidMoves, cn, createInitialGameState, createSharedEntityStore, createTranslate, createUnitAnimationState, cylinderBetween, get3DClickPayload, getCurrentFrame, getTileDimensions, inferDirection, isoToScreen, makeAsset, makeAssetMap, mapBookData, meshSphere, num, objAvailableActions, objAvailableEvents, objCurrentState, objIcon, objId, objMaxRules, objName, objRules, objStates, parseEditFocus, parseLessonSegments, parseMarkdownWithCodeBlocks, parseQueryBinding, pendulum, projectileMotion, registerCodeLanguageLoader, renderPatternValue, resolveFieldMap, resolveFrame, resolveSheetDirection, rows, runTickFrame, sanitizeRichHtml, screenToIso, springOscillator, str, tickAnimationState, toCodeLanguage, transitionAnimation, unitHealth, unitPosition, unitTeam, useAgentChat, useAnchorRect, useAtlasSliceDataUrl, useAuthContext, useCamera, useCanvasGestures, useCompile, useConnectGitHub, useDeepAgentGeneration, useDisconnectGitHub, useDragReorder, useDraggable, useDropZone, useEmitEvent, useEventBus, useEventListener, useExtensions, useFileEditor, useFileSystem, useGameAudio, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useImageCache, useInfiniteScroll, useLongPress, useMediaQuery, useOrbitalHistory, usePresence, usePreview, usePullToRefresh, useQuerySingleton, useRenderInterpolation, useSharedEntitySnapshot, useSharedEntityStore, useSharedEntityStoreContext, useSwipeGesture, useTapReveal, useTraitListens, useTranslate116 as useTranslate, useUIEvents, useUISlotManager, useUnitSpriteAtlas, useValidation, vec2 };
|
|
55098
|
+
export { ALL_PRESETS, ALMADAR_DND_MIME, AR_BOOK_FIELDS, AboutPageTemplate, Accordion, Card2 as ActionCard, ActionPalette, ActionTile, ActivationBlock, Alert, AlgoGraphCanvas, AlgorithmCanvas, AnimatedCounter, AnimatedGraphic, AnimatedReveal, ArticleSection, Aside, AssetPicker, AtlasImage, AtlasPanel, AuthLayout, Avatar, Badge, BehaviorView, BiologyCanvas, BloomQuizBlock, BookChapterView, BookCoverPage, BookNavBar, BookTableOfContents, BookViewer, Box, BranchingLogicBuilder, Breadcrumb, Button, ButtonGroup, CTABanner, CalendarGrid, Canvas, Canvas2D, Card, CardBody, CardContent, CardFooter, CardGrid, CardHeader, CardTitle, Carousel, CaseStudyCard, CaseStudyOrganism, Center, Chart, ChartLegend, ChatBar, Checkbox, ChemistryCanvas, ChoiceButton, Coachmark, CodeBlock, CodeRunnerPanel, CollapsibleSection, CommandPalette, CommunityLinks, ConditionalWrapper, ConfettiEffect, ConfirmDialog, ConnectionBlock, Container, ContentRenderer, ContentSection, ControlButton, ControlGrid, CounterTemplate, DEFAULT_LIKERT_OPTIONS, DEFAULT_MATRIX_COLUMNS, DEFAULT_SLOTS, DIAMOND_TOP_Y, DashboardGrid, DashboardLayout, DataGrid, DataList, DataTable, DateRangePicker, DateRangeSelector, DayCell, DetailPanel, Dialog, DialogueBubble, Divider, DocBreadcrumb, DocPagination, DocSearch, DocSidebar, DocTOC, DockLayout, DocumentDetails, DocumentPanel, DocumentViewer, StateMachineView as DomStateMachineVisualizer, Drawer, DrawerSlot, ELEMENT_SELECTED_EVENT, EdgeDecoration, EditorCheckbox, EditorSelect, EditorSlider, EditorTextInput, EditorToolbar, EmojiPicker, EmptyState, EntityDisplayEvents, ErrorBoundary, ErrorState, FEATURE_COLORS, FEATURE_TYPES, FLOOR_HEIGHT, FeatureCard, FeatureDetailPageTemplate, FeatureGrid, FeatureGridOrganism, FileTree, FilterGroup, FilterPill, Flex, FlipCard, FlipContainer, FloatingActionButton, FloatingToolbar, Form, FormActions, FormField, FormLayout, FormSection, FormSectionHeader, FxOverlay, GameAudioToggle, GameHud, GameIcon, GameMenu, GameShell, GenericAppTemplate, GeometricPattern, GradientDivider, GraphCanvas, GraphView, Grid, GridPicker, HStack, Header, HealthBar, HeroOrganism, HeroSection, I18nProvider, IDENTITY_BOOK_FIELDS, Icon, IconPicker, ImportPreviewTree, ImportProgress, ImportSourcePicker, InfiniteScrollSentinel, Input, InputGroup, InstallBox, JazariStateMachine, JsonTreeEditor, Label, LandingPageTemplate, LawReferenceTooltip, LearningCanvas, LearningScene3D, Lightbox, LikertScale, LineChart2 as LineChart, List3 as List, LoadingState, MapView, MarkdownContent, MarketingFooter, MarketingStatCard, MasterDetail, MasterDetailLayout, MathCanvas, MatrixQuestion, MediaGallery, Menu, Meter, Modal, ModalSlot, ModuleCard, Navigation, NodeSlotEditor, NotifyListener, NumberStepper, OnboardingSpotlight, OptionConstraintGroup, StateMachineView as OrbitalStateMachineView, OrbitalVisualization, Overlay, PageHeader, PageTransition, Pagination, PatternTile, PhysicsCanvas, Popover, PositionedCanvas, Presence, PricingCard, PricingGrid, PricingOrganism, PricingPageTemplate, ProgressBar, ProgressDots, PropertyInspector, PullQuote, PullToRefresh, QrScanner, QuizBlock, Radio, RangeSlider, ReflectionBlock, RelationSelect, RepeatableFormSection, ReplyTree, RichTextEditor, RuntimeDebugger, SHEET_COLUMNS, SPRITE_SHEET_LAYOUT, ScaledDiagram, ScoreDisplay, SearchInput, Section, SectionHeader, SegmentRenderer, Select, SequenceBar, ServiceCatalog, SharedEntityStoreContext, ShowcaseCard, ShowcaseOrganism, SidePanel, Sidebar, SignaturePad, SimpleGrid, Skeleton, SlotContentRenderer, SocialProof, SortableList, Spacer, Sparkline, Spinner, Split, SplitPane, SplitSection, Stack, StarRating, StatBadge, StatCard, StatDisplay, StateGraph, StateJsonView, StateMachineView, StateNode2 as StateNode, StatsGrid, StatsOrganism, StatusBar, StatusDot, StepFlow, StepFlowOrganism, SubagentTracePanel, SvgBranch, SvgConnection, SvgFlow, SvgGrid, SvgLobe, SvgMesh, SvgMorph, SvgNode, SvgPulse, SvgRing, SvgShield, SvgStack, SwipeableRow, Switch, TERRAIN_COLORS, TILE_HEIGHT, TILE_WIDTH, TabbedContainer, TableView, Tabs, TagCloud, TagInput, TeamCard, TeamOrganism, TerrainPalette, TextHighlight, Textarea, ThemeToggle, TimeSlotCell, Timeline, TimerDisplay, Toast, ToastSlot, Tooltip, TraitFrame, TraitSlot, TraitStateViewer, TransitionArrow, TrendIndicator, TypewriterText, Typography, UISlotComponent, UISlotRenderer, UploadDropZone, VStack, VersionDiff, ViolationAlert, VoteStack, WizardContainer, WizardNavigation, WizardProgress, arrowBetween, billboardLabel, boardEntity, bool, calculateAttackTargets, calculateValidMoves, cn, createInitialGameState, createSharedEntityStore, createTranslate, createUnitAnimationState, cylinderBetween, get3DClickPayload, getCurrentFrame, getTileDimensions, inferDirection, isoToScreen, makeAsset, makeAssetMap, mapBookData, meshSphere, num, objAvailableActions, objAvailableEvents, objCurrentState, objIcon, objId, objMaxRules, objName, objRules, objStates, parseEditFocus, parseLessonSegments, parseMarkdownWithCodeBlocks, parseQueryBinding, pendulum, projectileMotion, registerCodeLanguageLoader, renderPatternValue, resolveFieldMap, resolveFrame, resolveSheetDirection, rows, runTickFrame, sanitizeRichHtml, screenToIso, springOscillator, str, tickAnimationState, toCodeLanguage, transitionAnimation, unitHealth, unitPosition, unitTeam, useAgentChat, useAnchorRect, useAtlasSliceDataUrl, useAuthContext, useCamera, useCanvasGestures, useCompile, useConnectGitHub, useDeepAgentGeneration, useDisconnectGitHub, useDragReorder, useDraggable, useDropZone, useEmitEvent, useEventBus, useEventListener, useExtensions, useFileEditor, useFileSystem, useGameAudio, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useImageCache, useInfiniteScroll, useLongPress, useMediaQuery, useOrbitalHistory, usePresence, usePreview, usePullToRefresh, useQuerySingleton, useRenderInterpolation, useSharedEntitySnapshot, useSharedEntityStore, useSharedEntityStoreContext, useSwipeGesture, useTapReveal, useTraitListens, useTranslate116 as useTranslate, useUIEvents, useUISlotManager, useUnitSpriteAtlas, useValidation, vec2 };
|