@norskvideo/norsk-studio-alpha 1.27.0-2026-01-10-23683704 → 1.27.0-2026-01-14-d7f304fc
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/client/info.js +274 -191
- package/client/style.css +25 -0
- package/lib/processor.hardSourceSwitch/_gen/types.d.ts +1 -1
- package/lib/processor.hardSourceSwitch/_gen/zod.js +1 -1
- package/lib/processor.hardSourceSwitch/_gen/zod.js.map +1 -1
- package/lib/processor.hardSourceSwitch/info.d.ts +1 -1
- package/lib/processor.hardSourceSwitch/info.js +40 -3
- package/lib/processor.hardSourceSwitch/info.js.map +1 -1
- package/lib/processor.hardSourceSwitch/inline-view.d.ts +1 -1
- package/lib/processor.hardSourceSwitch/inline-view.js +14 -2
- package/lib/processor.hardSourceSwitch/inline-view.js.map +1 -1
- package/lib/processor.hardSourceSwitch/runtime.d.ts +1 -0
- package/lib/processor.hardSourceSwitch/runtime.js +12 -0
- package/lib/processor.hardSourceSwitch/runtime.js.map +1 -1
- package/lib/processor.hardSourceSwitch/source-selection.d.ts +7 -0
- package/lib/processor.hardSourceSwitch/source-selection.js +35 -0
- package/lib/processor.hardSourceSwitch/source-selection.js.map +1 -0
- package/lib/processor.hardSourceSwitch/types.yaml +3 -3
- package/lib/test/hard-source-switch.d.ts +1 -0
- package/lib/test/hard-source-switch.js +504 -0
- package/lib/test/hard-source-switch.js.map +1 -0
- package/package.json +5 -5
package/client/info.js
CHANGED
|
@@ -41393,13 +41393,13 @@ var require_dist3 = __commonJS({
|
|
|
41393
41393
|
});
|
|
41394
41394
|
module.exports = __toCommonJS2(index_exports);
|
|
41395
41395
|
var React3 = __toESM2(require_react());
|
|
41396
|
-
var
|
|
41396
|
+
var import_jsx_runtime15 = require_jsx_runtime();
|
|
41397
41397
|
function createContext2(rootComponentName, defaultContext) {
|
|
41398
41398
|
const Context = React3.createContext(defaultContext);
|
|
41399
41399
|
const Provider = (props) => {
|
|
41400
41400
|
const { children, ...context } = props;
|
|
41401
41401
|
const value = React3.useMemo(() => context, Object.values(context));
|
|
41402
|
-
return /* @__PURE__ */ (0,
|
|
41402
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Context.Provider, { value, children });
|
|
41403
41403
|
};
|
|
41404
41404
|
Provider.displayName = rootComponentName + "Provider";
|
|
41405
41405
|
function useContext2(consumerName) {
|
|
@@ -41420,7 +41420,7 @@ var require_dist3 = __commonJS({
|
|
|
41420
41420
|
const { scope, children, ...context } = props;
|
|
41421
41421
|
const Context = scope?.[scopeName]?.[index3] || BaseContext;
|
|
41422
41422
|
const value = React3.useMemo(() => context, Object.values(context));
|
|
41423
|
-
return /* @__PURE__ */ (0,
|
|
41423
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Context.Provider, { value, children });
|
|
41424
41424
|
};
|
|
41425
41425
|
Provider.displayName = rootComponentName + "Provider";
|
|
41426
41426
|
function useContext2(consumerName, scope) {
|
|
@@ -41587,7 +41587,7 @@ var require_dist5 = __commonJS({
|
|
|
41587
41587
|
module.exports = __toCommonJS2(index_exports);
|
|
41588
41588
|
var React3 = __toESM2(require_react());
|
|
41589
41589
|
var import_react_compose_refs = require_dist4();
|
|
41590
|
-
var
|
|
41590
|
+
var import_jsx_runtime15 = require_jsx_runtime();
|
|
41591
41591
|
// @__NO_SIDE_EFFECTS__
|
|
41592
41592
|
function createSlot(ownerName) {
|
|
41593
41593
|
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
@@ -41605,9 +41605,9 @@ var require_dist5 = __commonJS({
|
|
|
41605
41605
|
return child;
|
|
41606
41606
|
}
|
|
41607
41607
|
});
|
|
41608
|
-
return /* @__PURE__ */ (0,
|
|
41608
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React3.isValidElement(newElement) ? React3.cloneElement(newElement, void 0, newChildren) : null });
|
|
41609
41609
|
}
|
|
41610
|
-
return /* @__PURE__ */ (0,
|
|
41610
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
41611
41611
|
});
|
|
41612
41612
|
Slot2.displayName = `${ownerName}.Slot`;
|
|
41613
41613
|
return Slot2;
|
|
@@ -41634,7 +41634,7 @@ var require_dist5 = __commonJS({
|
|
|
41634
41634
|
// @__NO_SIDE_EFFECTS__
|
|
41635
41635
|
function createSlottable(ownerName) {
|
|
41636
41636
|
const Slottable2 = ({ children }) => {
|
|
41637
|
-
return /* @__PURE__ */ (0,
|
|
41637
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jsx_runtime15.Fragment, { children });
|
|
41638
41638
|
};
|
|
41639
41639
|
Slottable2.displayName = `${ownerName}.Slottable`;
|
|
41640
41640
|
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
|
@@ -41722,11 +41722,11 @@ var require_dist6 = __commonJS({
|
|
|
41722
41722
|
unstable_createCollection: () => createCollection2
|
|
41723
41723
|
});
|
|
41724
41724
|
module.exports = __toCommonJS2(index_exports);
|
|
41725
|
-
var
|
|
41725
|
+
var import_react14 = __toESM2(require_react());
|
|
41726
41726
|
var import_react_context = require_dist3();
|
|
41727
41727
|
var import_react_compose_refs = require_dist4();
|
|
41728
41728
|
var import_react_slot = require_dist5();
|
|
41729
|
-
var
|
|
41729
|
+
var import_jsx_runtime15 = require_jsx_runtime();
|
|
41730
41730
|
function createCollection(name) {
|
|
41731
41731
|
const PROVIDER_NAME = name + "CollectionProvider";
|
|
41732
41732
|
const [createCollectionContext, createCollectionScope] = (0, import_react_context.createContextScope)(PROVIDER_NAME);
|
|
@@ -41736,42 +41736,42 @@ var require_dist6 = __commonJS({
|
|
|
41736
41736
|
);
|
|
41737
41737
|
const CollectionProvider = (props) => {
|
|
41738
41738
|
const { scope, children } = props;
|
|
41739
|
-
const ref =
|
|
41740
|
-
const itemMap =
|
|
41741
|
-
return /* @__PURE__ */ (0,
|
|
41739
|
+
const ref = import_react14.default.useRef(null);
|
|
41740
|
+
const itemMap = import_react14.default.useRef(/* @__PURE__ */ new Map()).current;
|
|
41741
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
41742
41742
|
};
|
|
41743
41743
|
CollectionProvider.displayName = PROVIDER_NAME;
|
|
41744
41744
|
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
41745
41745
|
const CollectionSlotImpl = (0, import_react_slot.createSlot)(COLLECTION_SLOT_NAME);
|
|
41746
|
-
const CollectionSlot =
|
|
41746
|
+
const CollectionSlot = import_react14.default.forwardRef(
|
|
41747
41747
|
(props, forwardedRef) => {
|
|
41748
41748
|
const { scope, children } = props;
|
|
41749
41749
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
41750
41750
|
const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, context.collectionRef);
|
|
41751
|
-
return /* @__PURE__ */ (0,
|
|
41751
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CollectionSlotImpl, { ref: composedRefs, children });
|
|
41752
41752
|
}
|
|
41753
41753
|
);
|
|
41754
41754
|
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
41755
41755
|
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
41756
41756
|
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
41757
41757
|
const CollectionItemSlotImpl = (0, import_react_slot.createSlot)(ITEM_SLOT_NAME);
|
|
41758
|
-
const CollectionItemSlot =
|
|
41758
|
+
const CollectionItemSlot = import_react14.default.forwardRef(
|
|
41759
41759
|
(props, forwardedRef) => {
|
|
41760
41760
|
const { scope, children, ...itemData } = props;
|
|
41761
|
-
const ref =
|
|
41761
|
+
const ref = import_react14.default.useRef(null);
|
|
41762
41762
|
const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, ref);
|
|
41763
41763
|
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
41764
|
-
|
|
41764
|
+
import_react14.default.useEffect(() => {
|
|
41765
41765
|
context.itemMap.set(ref, { ref, ...itemData });
|
|
41766
41766
|
return () => void context.itemMap.delete(ref);
|
|
41767
41767
|
});
|
|
41768
|
-
return /* @__PURE__ */ (0,
|
|
41768
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children });
|
|
41769
41769
|
}
|
|
41770
41770
|
);
|
|
41771
41771
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
41772
41772
|
function useCollection(scope) {
|
|
41773
41773
|
const context = useCollectionContext(name + "CollectionConsumer", scope);
|
|
41774
|
-
const getItems =
|
|
41774
|
+
const getItems = import_react14.default.useCallback(() => {
|
|
41775
41775
|
const collectionNode = context.collectionRef.current;
|
|
41776
41776
|
if (!collectionNode) return [];
|
|
41777
41777
|
const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
|
|
@@ -42295,11 +42295,11 @@ var require_dist7 = __commonJS({
|
|
|
42295
42295
|
});
|
|
42296
42296
|
module.exports = __toCommonJS2(index_exports);
|
|
42297
42297
|
var React3 = __toESM2(require_react());
|
|
42298
|
-
var
|
|
42298
|
+
var import_jsx_runtime15 = require_jsx_runtime();
|
|
42299
42299
|
var DirectionContext = React3.createContext(void 0);
|
|
42300
42300
|
var DirectionProvider = (props) => {
|
|
42301
42301
|
const { dir, children } = props;
|
|
42302
|
-
return /* @__PURE__ */ (0,
|
|
42302
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DirectionContext.Provider, { value: dir, children });
|
|
42303
42303
|
};
|
|
42304
42304
|
function useDirection(localDir) {
|
|
42305
42305
|
const globalDir = React3.useContext(DirectionContext);
|
|
@@ -42351,7 +42351,7 @@ var require_dist8 = __commonJS({
|
|
|
42351
42351
|
module.exports = __toCommonJS2(index_exports);
|
|
42352
42352
|
var React3 = __toESM2(require_react());
|
|
42353
42353
|
var import_react_compose_refs = require_dist4();
|
|
42354
|
-
var
|
|
42354
|
+
var import_jsx_runtime15 = require_jsx_runtime();
|
|
42355
42355
|
// @__NO_SIDE_EFFECTS__
|
|
42356
42356
|
function createSlot(ownerName) {
|
|
42357
42357
|
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
@@ -42369,9 +42369,9 @@ var require_dist8 = __commonJS({
|
|
|
42369
42369
|
return child;
|
|
42370
42370
|
}
|
|
42371
42371
|
});
|
|
42372
|
-
return /* @__PURE__ */ (0,
|
|
42372
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React3.isValidElement(newElement) ? React3.cloneElement(newElement, void 0, newChildren) : null });
|
|
42373
42373
|
}
|
|
42374
|
-
return /* @__PURE__ */ (0,
|
|
42374
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
42375
42375
|
});
|
|
42376
42376
|
Slot2.displayName = `${ownerName}.Slot`;
|
|
42377
42377
|
return Slot2;
|
|
@@ -42398,7 +42398,7 @@ var require_dist8 = __commonJS({
|
|
|
42398
42398
|
// @__NO_SIDE_EFFECTS__
|
|
42399
42399
|
function createSlottable(ownerName) {
|
|
42400
42400
|
const Slottable2 = ({ children }) => {
|
|
42401
|
-
return /* @__PURE__ */ (0,
|
|
42401
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jsx_runtime15.Fragment, { children });
|
|
42402
42402
|
};
|
|
42403
42403
|
Slottable2.displayName = `${ownerName}.Slottable`;
|
|
42404
42404
|
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
|
@@ -42489,7 +42489,7 @@ var require_dist9 = __commonJS({
|
|
|
42489
42489
|
var React3 = __toESM2(require_react());
|
|
42490
42490
|
var ReactDOM2 = __toESM2(require_react_dom());
|
|
42491
42491
|
var import_react_slot = require_dist8();
|
|
42492
|
-
var
|
|
42492
|
+
var import_jsx_runtime15 = require_jsx_runtime();
|
|
42493
42493
|
var NODES = [
|
|
42494
42494
|
"a",
|
|
42495
42495
|
"button",
|
|
@@ -42517,7 +42517,7 @@ var require_dist9 = __commonJS({
|
|
|
42517
42517
|
if (typeof window !== "undefined") {
|
|
42518
42518
|
window[Symbol.for("radix-ui")] = true;
|
|
42519
42519
|
}
|
|
42520
|
-
return /* @__PURE__ */ (0,
|
|
42520
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
42521
42521
|
});
|
|
42522
42522
|
Node2.displayName = `Primitive.${node}`;
|
|
42523
42523
|
return { ...primitive, [node]: Node2 };
|
|
@@ -42675,7 +42675,7 @@ var require_dist12 = __commonJS({
|
|
|
42675
42675
|
var import_react_compose_refs = require_dist4();
|
|
42676
42676
|
var import_react_use_callback_ref = require_dist10();
|
|
42677
42677
|
var import_react_use_escape_keydown = require_dist11();
|
|
42678
|
-
var
|
|
42678
|
+
var import_jsx_runtime15 = require_jsx_runtime();
|
|
42679
42679
|
var DISMISSABLE_LAYER_NAME = "DismissableLayer";
|
|
42680
42680
|
var CONTEXT_UPDATE = "dismissableLayer.update";
|
|
42681
42681
|
var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
|
|
@@ -42763,7 +42763,7 @@ var require_dist12 = __commonJS({
|
|
|
42763
42763
|
document.addEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
42764
42764
|
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
42765
42765
|
}, []);
|
|
42766
|
-
return /* @__PURE__ */ (0,
|
|
42766
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
42767
42767
|
import_react_primitive.Primitive.div,
|
|
42768
42768
|
{
|
|
42769
42769
|
...layerProps,
|
|
@@ -42797,7 +42797,7 @@ var require_dist12 = __commonJS({
|
|
|
42797
42797
|
};
|
|
42798
42798
|
}
|
|
42799
42799
|
}, [context.branches]);
|
|
42800
|
-
return /* @__PURE__ */ (0,
|
|
42800
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_primitive.Primitive.div, { ...props, ref: composedRefs });
|
|
42801
42801
|
});
|
|
42802
42802
|
DismissableLayerBranch.displayName = BRANCH_NAME;
|
|
42803
42803
|
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
|
|
@@ -42997,7 +42997,7 @@ var require_dist14 = __commonJS({
|
|
|
42997
42997
|
var import_react_compose_refs = require_dist4();
|
|
42998
42998
|
var import_react_primitive = require_dist9();
|
|
42999
42999
|
var import_react_use_callback_ref = require_dist10();
|
|
43000
|
-
var
|
|
43000
|
+
var import_jsx_runtime15 = require_jsx_runtime();
|
|
43001
43001
|
var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
|
|
43002
43002
|
var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
|
|
43003
43003
|
var EVENT_OPTIONS = { bubbles: false, cancelable: true };
|
|
@@ -43116,7 +43116,7 @@ var require_dist14 = __commonJS({
|
|
|
43116
43116
|
},
|
|
43117
43117
|
[loop, trapped, focusScope.paused]
|
|
43118
43118
|
);
|
|
43119
|
-
return /* @__PURE__ */ (0,
|
|
43119
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_primitive.Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
|
|
43120
43120
|
});
|
|
43121
43121
|
FocusScope.displayName = FOCUS_SCOPE_NAME;
|
|
43122
43122
|
function focusFirst(candidates, { select = false } = {}) {
|
|
@@ -45501,11 +45501,11 @@ var require_dist17 = __commonJS({
|
|
|
45501
45501
|
module.exports = __toCommonJS2(index_exports);
|
|
45502
45502
|
var React3 = __toESM2(require_react());
|
|
45503
45503
|
var import_react_primitive = require_dist9();
|
|
45504
|
-
var
|
|
45504
|
+
var import_jsx_runtime15 = require_jsx_runtime();
|
|
45505
45505
|
var NAME = "Arrow";
|
|
45506
45506
|
var Arrow = React3.forwardRef((props, forwardedRef) => {
|
|
45507
45507
|
const { children, width = 10, height = 5, ...arrowProps } = props;
|
|
45508
|
-
return /* @__PURE__ */ (0,
|
|
45508
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
45509
45509
|
import_react_primitive.Primitive.svg,
|
|
45510
45510
|
{
|
|
45511
45511
|
...arrowProps,
|
|
@@ -45514,7 +45514,7 @@ var require_dist17 = __commonJS({
|
|
|
45514
45514
|
height,
|
|
45515
45515
|
viewBox: "0 0 30 10",
|
|
45516
45516
|
preserveAspectRatio: "none",
|
|
45517
|
-
children: props.asChild ? children : /* @__PURE__ */ (0,
|
|
45517
|
+
children: props.asChild ? children : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("polygon", { points: "0,0 30,0 15,10" })
|
|
45518
45518
|
}
|
|
45519
45519
|
);
|
|
45520
45520
|
});
|
|
@@ -45654,7 +45654,7 @@ var require_dist19 = __commonJS({
|
|
|
45654
45654
|
var import_react_use_callback_ref = require_dist10();
|
|
45655
45655
|
var import_react_use_layout_effect = require_dist15();
|
|
45656
45656
|
var import_react_use_size = require_dist18();
|
|
45657
|
-
var
|
|
45657
|
+
var import_jsx_runtime15 = require_jsx_runtime();
|
|
45658
45658
|
var SIDE_OPTIONS = ["top", "right", "bottom", "left"];
|
|
45659
45659
|
var ALIGN_OPTIONS = ["start", "center", "end"];
|
|
45660
45660
|
var POPPER_NAME = "Popper";
|
|
@@ -45663,7 +45663,7 @@ var require_dist19 = __commonJS({
|
|
|
45663
45663
|
var Popper = (props) => {
|
|
45664
45664
|
const { __scopePopper, children } = props;
|
|
45665
45665
|
const [anchor, setAnchor] = React3.useState(null);
|
|
45666
|
-
return /* @__PURE__ */ (0,
|
|
45666
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });
|
|
45667
45667
|
};
|
|
45668
45668
|
Popper.displayName = POPPER_NAME;
|
|
45669
45669
|
var ANCHOR_NAME = "PopperAnchor";
|
|
@@ -45681,7 +45681,7 @@ var require_dist19 = __commonJS({
|
|
|
45681
45681
|
context.onAnchorChange(anchorRef.current);
|
|
45682
45682
|
}
|
|
45683
45683
|
});
|
|
45684
|
-
return virtualRef ? null : /* @__PURE__ */ (0,
|
|
45684
|
+
return virtualRef ? null : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_primitive.Primitive.div, { ...anchorProps, ref: composedRefs });
|
|
45685
45685
|
}
|
|
45686
45686
|
);
|
|
45687
45687
|
PopperAnchor.displayName = ANCHOR_NAME;
|
|
@@ -45774,7 +45774,7 @@ var require_dist19 = __commonJS({
|
|
|
45774
45774
|
(0, import_react_use_layout_effect.useLayoutEffect)(() => {
|
|
45775
45775
|
if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
45776
45776
|
}, [content]);
|
|
45777
|
-
return /* @__PURE__ */ (0,
|
|
45777
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
45778
45778
|
"div",
|
|
45779
45779
|
{
|
|
45780
45780
|
ref: refs.setFloating,
|
|
@@ -45798,7 +45798,7 @@ var require_dist19 = __commonJS({
|
|
|
45798
45798
|
}
|
|
45799
45799
|
},
|
|
45800
45800
|
dir: props.dir,
|
|
45801
|
-
children: /* @__PURE__ */ (0,
|
|
45801
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
45802
45802
|
PopperContentProvider,
|
|
45803
45803
|
{
|
|
45804
45804
|
scope: __scopePopper,
|
|
@@ -45807,7 +45807,7 @@ var require_dist19 = __commonJS({
|
|
|
45807
45807
|
arrowX,
|
|
45808
45808
|
arrowY,
|
|
45809
45809
|
shouldHideArrow: cannotCenterArrow,
|
|
45810
|
-
children: /* @__PURE__ */ (0,
|
|
45810
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
45811
45811
|
import_react_primitive.Primitive.div,
|
|
45812
45812
|
{
|
|
45813
45813
|
"data-side": placedSide,
|
|
@@ -45844,7 +45844,7 @@ var require_dist19 = __commonJS({
|
|
|
45844
45844
|
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
45845
45845
|
// doesn't report size as we'd expect on SVG elements.
|
|
45846
45846
|
// it reports their bounding box which is effectively the largest path inside the SVG.
|
|
45847
|
-
/* @__PURE__ */ (0,
|
|
45847
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
45848
45848
|
"span",
|
|
45849
45849
|
{
|
|
45850
45850
|
ref: contentContext.onArrowChange,
|
|
@@ -45867,7 +45867,7 @@ var require_dist19 = __commonJS({
|
|
|
45867
45867
|
}[contentContext.placedSide],
|
|
45868
45868
|
visibility: contentContext.shouldHideArrow ? "hidden" : void 0
|
|
45869
45869
|
},
|
|
45870
|
-
children: /* @__PURE__ */ (0,
|
|
45870
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
45871
45871
|
ArrowPrimitive.Root,
|
|
45872
45872
|
{
|
|
45873
45873
|
...arrowProps,
|
|
@@ -45971,14 +45971,14 @@ var require_dist20 = __commonJS({
|
|
|
45971
45971
|
var import_react_dom = __toESM2(require_react_dom());
|
|
45972
45972
|
var import_react_primitive = require_dist9();
|
|
45973
45973
|
var import_react_use_layout_effect = require_dist15();
|
|
45974
|
-
var
|
|
45974
|
+
var import_jsx_runtime15 = require_jsx_runtime();
|
|
45975
45975
|
var PORTAL_NAME = "Portal";
|
|
45976
45976
|
var Portal = React3.forwardRef((props, forwardedRef) => {
|
|
45977
45977
|
const { container: containerProp, ...portalProps } = props;
|
|
45978
45978
|
const [mounted, setMounted] = React3.useState(false);
|
|
45979
45979
|
(0, import_react_use_layout_effect.useLayoutEffect)(() => setMounted(true), []);
|
|
45980
45980
|
const container = containerProp || mounted && globalThis?.document?.body;
|
|
45981
|
-
return container ? import_react_dom.default.createPortal(/* @__PURE__ */ (0,
|
|
45981
|
+
return container ? import_react_dom.default.createPortal(/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_primitive.Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
|
45982
45982
|
});
|
|
45983
45983
|
Portal.displayName = PORTAL_NAME;
|
|
45984
45984
|
var Root = Portal;
|
|
@@ -46027,7 +46027,7 @@ var require_dist21 = __commonJS({
|
|
|
46027
46027
|
module.exports = __toCommonJS2(index_exports);
|
|
46028
46028
|
var React3 = __toESM2(require_react());
|
|
46029
46029
|
var import_react_compose_refs = require_dist4();
|
|
46030
|
-
var
|
|
46030
|
+
var import_jsx_runtime15 = require_jsx_runtime();
|
|
46031
46031
|
// @__NO_SIDE_EFFECTS__
|
|
46032
46032
|
function createSlot(ownerName) {
|
|
46033
46033
|
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
@@ -46045,9 +46045,9 @@ var require_dist21 = __commonJS({
|
|
|
46045
46045
|
return child;
|
|
46046
46046
|
}
|
|
46047
46047
|
});
|
|
46048
|
-
return /* @__PURE__ */ (0,
|
|
46048
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React3.isValidElement(newElement) ? React3.cloneElement(newElement, void 0, newChildren) : null });
|
|
46049
46049
|
}
|
|
46050
|
-
return /* @__PURE__ */ (0,
|
|
46050
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
46051
46051
|
});
|
|
46052
46052
|
Slot2.displayName = `${ownerName}.Slot`;
|
|
46053
46053
|
return Slot2;
|
|
@@ -46074,7 +46074,7 @@ var require_dist21 = __commonJS({
|
|
|
46074
46074
|
// @__NO_SIDE_EFFECTS__
|
|
46075
46075
|
function createSlottable(ownerName) {
|
|
46076
46076
|
const Slottable2 = ({ children }) => {
|
|
46077
|
-
return /* @__PURE__ */ (0,
|
|
46077
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jsx_runtime15.Fragment, { children });
|
|
46078
46078
|
};
|
|
46079
46079
|
Slottable2.displayName = `${ownerName}.Slottable`;
|
|
46080
46080
|
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
|
@@ -46443,7 +46443,7 @@ var require_dist25 = __commonJS({
|
|
|
46443
46443
|
module.exports = __toCommonJS2(index_exports);
|
|
46444
46444
|
var React3 = __toESM2(require_react());
|
|
46445
46445
|
var import_react_primitive = require_dist9();
|
|
46446
|
-
var
|
|
46446
|
+
var import_jsx_runtime15 = require_jsx_runtime();
|
|
46447
46447
|
var VISUALLY_HIDDEN_STYLES = Object.freeze({
|
|
46448
46448
|
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
46449
46449
|
position: "absolute",
|
|
@@ -46460,7 +46460,7 @@ var require_dist25 = __commonJS({
|
|
|
46460
46460
|
var NAME = "VisuallyHidden";
|
|
46461
46461
|
var VisuallyHidden = React3.forwardRef(
|
|
46462
46462
|
(props, forwardedRef) => {
|
|
46463
|
-
return /* @__PURE__ */ (0,
|
|
46463
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
46464
46464
|
import_react_primitive.Primitive.span,
|
|
46465
46465
|
{
|
|
46466
46466
|
...props,
|
|
@@ -48542,7 +48542,7 @@ var require_dist26 = __commonJS({
|
|
|
48542
48542
|
var import_react_visually_hidden = require_dist25();
|
|
48543
48543
|
var import_aria_hidden = require_es5();
|
|
48544
48544
|
var import_react_remove_scroll = require_es57();
|
|
48545
|
-
var
|
|
48545
|
+
var import_jsx_runtime15 = require_jsx_runtime();
|
|
48546
48546
|
var OPEN_KEYS = [" ", "Enter", "ArrowUp", "ArrowDown"];
|
|
48547
48547
|
var SELECTION_KEYS = [" ", "Enter"];
|
|
48548
48548
|
var SELECT_NAME = "Select";
|
|
@@ -48592,7 +48592,7 @@ var require_dist26 = __commonJS({
|
|
|
48592
48592
|
const isFormControl = trigger ? form || !!trigger.closest("form") : true;
|
|
48593
48593
|
const [nativeOptionsSet, setNativeOptionsSet] = React3.useState(/* @__PURE__ */ new Set());
|
|
48594
48594
|
const nativeSelectKey = Array.from(nativeOptionsSet).map((option) => option.props.value).join(";");
|
|
48595
|
-
return /* @__PURE__ */ (0,
|
|
48595
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
48596
48596
|
SelectProvider,
|
|
48597
48597
|
{
|
|
48598
48598
|
required,
|
|
@@ -48612,7 +48612,7 @@ var require_dist26 = __commonJS({
|
|
|
48612
48612
|
triggerPointerDownPosRef,
|
|
48613
48613
|
disabled,
|
|
48614
48614
|
children: [
|
|
48615
|
-
/* @__PURE__ */ (0,
|
|
48615
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Collection.Provider, { scope: __scopeSelect, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
48616
48616
|
SelectNativeOptionsProvider,
|
|
48617
48617
|
{
|
|
48618
48618
|
scope: props.__scopeSelect,
|
|
@@ -48629,7 +48629,7 @@ var require_dist26 = __commonJS({
|
|
|
48629
48629
|
children
|
|
48630
48630
|
}
|
|
48631
48631
|
) }),
|
|
48632
|
-
isFormControl ? /* @__PURE__ */ (0,
|
|
48632
|
+
isFormControl ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
48633
48633
|
SelectBubbleInput,
|
|
48634
48634
|
{
|
|
48635
48635
|
"aria-hidden": true,
|
|
@@ -48642,7 +48642,7 @@ var require_dist26 = __commonJS({
|
|
|
48642
48642
|
disabled,
|
|
48643
48643
|
form,
|
|
48644
48644
|
children: [
|
|
48645
|
-
value === void 0 ? /* @__PURE__ */ (0,
|
|
48645
|
+
value === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: "" }) : null,
|
|
48646
48646
|
Array.from(nativeOptionsSet)
|
|
48647
48647
|
]
|
|
48648
48648
|
},
|
|
@@ -48683,7 +48683,7 @@ var require_dist26 = __commonJS({
|
|
|
48683
48683
|
};
|
|
48684
48684
|
}
|
|
48685
48685
|
};
|
|
48686
|
-
return /* @__PURE__ */ (0,
|
|
48686
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
48687
48687
|
import_react_primitive.Primitive.button,
|
|
48688
48688
|
{
|
|
48689
48689
|
type: "button",
|
|
@@ -48742,13 +48742,13 @@ var require_dist26 = __commonJS({
|
|
|
48742
48742
|
(0, import_react_use_layout_effect.useLayoutEffect)(() => {
|
|
48743
48743
|
onValueNodeHasChildrenChange(hasChildren);
|
|
48744
48744
|
}, [onValueNodeHasChildrenChange, hasChildren]);
|
|
48745
|
-
return /* @__PURE__ */ (0,
|
|
48745
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
48746
48746
|
import_react_primitive.Primitive.span,
|
|
48747
48747
|
{
|
|
48748
48748
|
...valueProps,
|
|
48749
48749
|
ref: composedRefs,
|
|
48750
48750
|
style: { pointerEvents: "none" },
|
|
48751
|
-
children: shouldShowPlaceholder(context.value) ? /* @__PURE__ */ (0,
|
|
48751
|
+
children: shouldShowPlaceholder(context.value) ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jsx_runtime15.Fragment, { children: placeholder }) : children
|
|
48752
48752
|
}
|
|
48753
48753
|
);
|
|
48754
48754
|
}
|
|
@@ -48758,13 +48758,13 @@ var require_dist26 = __commonJS({
|
|
|
48758
48758
|
var SelectIcon = React3.forwardRef(
|
|
48759
48759
|
(props, forwardedRef) => {
|
|
48760
48760
|
const { __scopeSelect, children, ...iconProps } = props;
|
|
48761
|
-
return /* @__PURE__ */ (0,
|
|
48761
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_primitive.Primitive.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "\u25BC" });
|
|
48762
48762
|
}
|
|
48763
48763
|
);
|
|
48764
48764
|
SelectIcon.displayName = ICON_NAME;
|
|
48765
48765
|
var PORTAL_NAME = "SelectPortal";
|
|
48766
48766
|
var SelectPortal = (props) => {
|
|
48767
|
-
return /* @__PURE__ */ (0,
|
|
48767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_portal.Portal, { asChild: true, ...props });
|
|
48768
48768
|
};
|
|
48769
48769
|
SelectPortal.displayName = PORTAL_NAME;
|
|
48770
48770
|
var CONTENT_NAME = "SelectContent";
|
|
@@ -48778,11 +48778,11 @@ var require_dist26 = __commonJS({
|
|
|
48778
48778
|
if (!context.open) {
|
|
48779
48779
|
const frag = fragment;
|
|
48780
48780
|
return frag ? ReactDOM2.createPortal(
|
|
48781
|
-
/* @__PURE__ */ (0,
|
|
48781
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SelectContentProvider, { scope: props.__scopeSelect, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Collection.Slot, { scope: props.__scopeSelect, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { children: props.children }) }) }),
|
|
48782
48782
|
frag
|
|
48783
48783
|
) : null;
|
|
48784
48784
|
}
|
|
48785
|
-
return /* @__PURE__ */ (0,
|
|
48785
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SelectContentImpl, { ...props, ref: forwardedRef });
|
|
48786
48786
|
}
|
|
48787
48787
|
);
|
|
48788
48788
|
SelectContent.displayName = CONTENT_NAME;
|
|
@@ -48936,7 +48936,7 @@ var require_dist26 = __commonJS({
|
|
|
48936
48936
|
hideWhenDetached,
|
|
48937
48937
|
avoidCollisions
|
|
48938
48938
|
} : {};
|
|
48939
|
-
return /* @__PURE__ */ (0,
|
|
48939
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
48940
48940
|
SelectContentProvider,
|
|
48941
48941
|
{
|
|
48942
48942
|
scope: __scopeSelect,
|
|
@@ -48952,7 +48952,7 @@ var require_dist26 = __commonJS({
|
|
|
48952
48952
|
position,
|
|
48953
48953
|
isPositioned,
|
|
48954
48954
|
searchRef,
|
|
48955
|
-
children: /* @__PURE__ */ (0,
|
|
48955
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_remove_scroll.RemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
48956
48956
|
import_react_focus_scope.FocusScope,
|
|
48957
48957
|
{
|
|
48958
48958
|
asChild: true,
|
|
@@ -48964,7 +48964,7 @@ var require_dist26 = __commonJS({
|
|
|
48964
48964
|
context.trigger?.focus({ preventScroll: true });
|
|
48965
48965
|
event.preventDefault();
|
|
48966
48966
|
}),
|
|
48967
|
-
children: /* @__PURE__ */ (0,
|
|
48967
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
48968
48968
|
import_react_dismissable_layer.DismissableLayer,
|
|
48969
48969
|
{
|
|
48970
48970
|
asChild: true,
|
|
@@ -48973,7 +48973,7 @@ var require_dist26 = __commonJS({
|
|
|
48973
48973
|
onPointerDownOutside,
|
|
48974
48974
|
onFocusOutside: (event) => event.preventDefault(),
|
|
48975
48975
|
onDismiss: () => context.onOpenChange(false),
|
|
48976
|
-
children: /* @__PURE__ */ (0,
|
|
48976
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
48977
48977
|
SelectPosition,
|
|
48978
48978
|
{
|
|
48979
48979
|
role: "listbox",
|
|
@@ -49149,14 +49149,14 @@ var require_dist26 = __commonJS({
|
|
|
49149
49149
|
},
|
|
49150
49150
|
[position, focusSelectedItem]
|
|
49151
49151
|
);
|
|
49152
|
-
return /* @__PURE__ */ (0,
|
|
49152
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
49153
49153
|
SelectViewportProvider,
|
|
49154
49154
|
{
|
|
49155
49155
|
scope: __scopeSelect,
|
|
49156
49156
|
contentWrapper,
|
|
49157
49157
|
shouldExpandOnScrollRef,
|
|
49158
49158
|
onScrollButtonChange: handleScrollButtonChange,
|
|
49159
|
-
children: /* @__PURE__ */ (0,
|
|
49159
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
49160
49160
|
"div",
|
|
49161
49161
|
{
|
|
49162
49162
|
ref: setContentWrapper,
|
|
@@ -49166,7 +49166,7 @@ var require_dist26 = __commonJS({
|
|
|
49166
49166
|
position: "fixed",
|
|
49167
49167
|
zIndex: contentZIndex
|
|
49168
49168
|
},
|
|
49169
|
-
children: /* @__PURE__ */ (0,
|
|
49169
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
49170
49170
|
import_react_primitive.Primitive.div,
|
|
49171
49171
|
{
|
|
49172
49172
|
...popperProps,
|
|
@@ -49196,7 +49196,7 @@ var require_dist26 = __commonJS({
|
|
|
49196
49196
|
...popperProps
|
|
49197
49197
|
} = props;
|
|
49198
49198
|
const popperScope = usePopperScope(__scopeSelect);
|
|
49199
|
-
return /* @__PURE__ */ (0,
|
|
49199
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
49200
49200
|
PopperPrimitive.Content,
|
|
49201
49201
|
{
|
|
49202
49202
|
...popperScope,
|
|
@@ -49230,8 +49230,8 @@ var require_dist26 = __commonJS({
|
|
|
49230
49230
|
const viewportContext = useSelectViewportContext(VIEWPORT_NAME, __scopeSelect);
|
|
49231
49231
|
const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, contentContext.onViewportChange);
|
|
49232
49232
|
const prevScrollTopRef = React3.useRef(0);
|
|
49233
|
-
return /* @__PURE__ */ (0,
|
|
49234
|
-
/* @__PURE__ */ (0,
|
|
49233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
49234
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
49235
49235
|
"style",
|
|
49236
49236
|
{
|
|
49237
49237
|
dangerouslySetInnerHTML: {
|
|
@@ -49240,7 +49240,7 @@ var require_dist26 = __commonJS({
|
|
|
49240
49240
|
nonce
|
|
49241
49241
|
}
|
|
49242
49242
|
),
|
|
49243
|
-
/* @__PURE__ */ (0,
|
|
49243
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Collection.Slot, { scope: __scopeSelect, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
49244
49244
|
import_react_primitive.Primitive.div,
|
|
49245
49245
|
{
|
|
49246
49246
|
"data-radix-select-viewport": "",
|
|
@@ -49296,7 +49296,7 @@ var require_dist26 = __commonJS({
|
|
|
49296
49296
|
(props, forwardedRef) => {
|
|
49297
49297
|
const { __scopeSelect, ...groupProps } = props;
|
|
49298
49298
|
const groupId = (0, import_react_id.useId)();
|
|
49299
|
-
return /* @__PURE__ */ (0,
|
|
49299
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_primitive.Primitive.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) });
|
|
49300
49300
|
}
|
|
49301
49301
|
);
|
|
49302
49302
|
SelectGroup.displayName = GROUP_NAME;
|
|
@@ -49305,7 +49305,7 @@ var require_dist26 = __commonJS({
|
|
|
49305
49305
|
(props, forwardedRef) => {
|
|
49306
49306
|
const { __scopeSelect, ...labelProps } = props;
|
|
49307
49307
|
const groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect);
|
|
49308
|
-
return /* @__PURE__ */ (0,
|
|
49308
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_primitive.Primitive.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
|
|
49309
49309
|
}
|
|
49310
49310
|
);
|
|
49311
49311
|
SelectLabel.displayName = LABEL_NAME;
|
|
@@ -49342,7 +49342,7 @@ var require_dist26 = __commonJS({
|
|
|
49342
49342
|
"A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder."
|
|
49343
49343
|
);
|
|
49344
49344
|
}
|
|
49345
|
-
return /* @__PURE__ */ (0,
|
|
49345
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
49346
49346
|
SelectItemContextProvider,
|
|
49347
49347
|
{
|
|
49348
49348
|
scope: __scopeSelect,
|
|
@@ -49353,14 +49353,14 @@ var require_dist26 = __commonJS({
|
|
|
49353
49353
|
onItemTextChange: React3.useCallback((node) => {
|
|
49354
49354
|
setTextValue((prevTextValue) => prevTextValue || (node?.textContent ?? "").trim());
|
|
49355
49355
|
}, []),
|
|
49356
|
-
children: /* @__PURE__ */ (0,
|
|
49356
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
49357
49357
|
Collection.ItemSlot,
|
|
49358
49358
|
{
|
|
49359
49359
|
scope: __scopeSelect,
|
|
49360
49360
|
value,
|
|
49361
49361
|
disabled,
|
|
49362
49362
|
textValue,
|
|
49363
|
-
children: /* @__PURE__ */ (0,
|
|
49363
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
49364
49364
|
import_react_primitive.Primitive.div,
|
|
49365
49365
|
{
|
|
49366
49366
|
role: "option",
|
|
@@ -49429,7 +49429,7 @@ var require_dist26 = __commonJS({
|
|
|
49429
49429
|
);
|
|
49430
49430
|
const textContent = itemTextNode?.textContent;
|
|
49431
49431
|
const nativeOption = React3.useMemo(
|
|
49432
|
-
() => /* @__PURE__ */ (0,
|
|
49432
|
+
() => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("option", { value: itemContext.value, disabled: itemContext.disabled, children: textContent }, itemContext.value),
|
|
49433
49433
|
[itemContext.disabled, itemContext.value, textContent]
|
|
49434
49434
|
);
|
|
49435
49435
|
const { onNativeOptionAdd, onNativeOptionRemove } = nativeOptionsContext;
|
|
@@ -49437,8 +49437,8 @@ var require_dist26 = __commonJS({
|
|
|
49437
49437
|
onNativeOptionAdd(nativeOption);
|
|
49438
49438
|
return () => onNativeOptionRemove(nativeOption);
|
|
49439
49439
|
}, [onNativeOptionAdd, onNativeOptionRemove, nativeOption]);
|
|
49440
|
-
return /* @__PURE__ */ (0,
|
|
49441
|
-
/* @__PURE__ */ (0,
|
|
49440
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
49441
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_primitive.Primitive.span, { id: itemContext.textId, ...itemTextProps, ref: composedRefs }),
|
|
49442
49442
|
itemContext.isSelected && context.valueNode && !context.valueNodeHasChildren ? ReactDOM2.createPortal(itemTextProps.children, context.valueNode) : null
|
|
49443
49443
|
] });
|
|
49444
49444
|
}
|
|
@@ -49449,7 +49449,7 @@ var require_dist26 = __commonJS({
|
|
|
49449
49449
|
(props, forwardedRef) => {
|
|
49450
49450
|
const { __scopeSelect, ...itemIndicatorProps } = props;
|
|
49451
49451
|
const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME, __scopeSelect);
|
|
49452
|
-
return itemContext.isSelected ? /* @__PURE__ */ (0,
|
|
49452
|
+
return itemContext.isSelected ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_primitive.Primitive.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null;
|
|
49453
49453
|
}
|
|
49454
49454
|
);
|
|
49455
49455
|
SelectItemIndicator.displayName = ITEM_INDICATOR_NAME;
|
|
@@ -49472,7 +49472,7 @@ var require_dist26 = __commonJS({
|
|
|
49472
49472
|
return () => viewport.removeEventListener("scroll", handleScroll2);
|
|
49473
49473
|
}
|
|
49474
49474
|
}, [contentContext.viewport, contentContext.isPositioned]);
|
|
49475
|
-
return canScrollUp ? /* @__PURE__ */ (0,
|
|
49475
|
+
return canScrollUp ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
49476
49476
|
SelectScrollButtonImpl,
|
|
49477
49477
|
{
|
|
49478
49478
|
...props,
|
|
@@ -49507,7 +49507,7 @@ var require_dist26 = __commonJS({
|
|
|
49507
49507
|
return () => viewport.removeEventListener("scroll", handleScroll2);
|
|
49508
49508
|
}
|
|
49509
49509
|
}, [contentContext.viewport, contentContext.isPositioned]);
|
|
49510
|
-
return canScrollDown ? /* @__PURE__ */ (0,
|
|
49510
|
+
return canScrollDown ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
49511
49511
|
SelectScrollButtonImpl,
|
|
49512
49512
|
{
|
|
49513
49513
|
...props,
|
|
@@ -49540,7 +49540,7 @@ var require_dist26 = __commonJS({
|
|
|
49540
49540
|
const activeItem = getItems().find((item) => item.ref.current === document.activeElement);
|
|
49541
49541
|
activeItem?.ref.current?.scrollIntoView({ block: "nearest" });
|
|
49542
49542
|
}, [getItems]);
|
|
49543
|
-
return /* @__PURE__ */ (0,
|
|
49543
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
49544
49544
|
import_react_primitive.Primitive.div,
|
|
49545
49545
|
{
|
|
49546
49546
|
"aria-hidden": true,
|
|
@@ -49568,7 +49568,7 @@ var require_dist26 = __commonJS({
|
|
|
49568
49568
|
var SelectSeparator = React3.forwardRef(
|
|
49569
49569
|
(props, forwardedRef) => {
|
|
49570
49570
|
const { __scopeSelect, ...separatorProps } = props;
|
|
49571
|
-
return /* @__PURE__ */ (0,
|
|
49571
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_primitive.Primitive.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
|
|
49572
49572
|
}
|
|
49573
49573
|
);
|
|
49574
49574
|
SelectSeparator.displayName = SEPARATOR_NAME;
|
|
@@ -49579,7 +49579,7 @@ var require_dist26 = __commonJS({
|
|
|
49579
49579
|
const popperScope = usePopperScope(__scopeSelect);
|
|
49580
49580
|
const context = useSelectContext(ARROW_NAME, __scopeSelect);
|
|
49581
49581
|
const contentContext = useSelectContentContext(ARROW_NAME, __scopeSelect);
|
|
49582
|
-
return context.open && contentContext.position === "popper" ? /* @__PURE__ */ (0,
|
|
49582
|
+
return context.open && contentContext.position === "popper" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef }) : null;
|
|
49583
49583
|
}
|
|
49584
49584
|
);
|
|
49585
49585
|
SelectArrow.displayName = ARROW_NAME;
|
|
@@ -49604,7 +49604,7 @@ var require_dist26 = __commonJS({
|
|
|
49604
49604
|
select.dispatchEvent(event);
|
|
49605
49605
|
}
|
|
49606
49606
|
}, [prevValue, value]);
|
|
49607
|
-
return /* @__PURE__ */ (0,
|
|
49607
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
49608
49608
|
import_react_primitive.Primitive.select,
|
|
49609
49609
|
{
|
|
49610
49610
|
...props,
|
|
@@ -49809,14 +49809,14 @@ var require_dist27 = __commonJS({
|
|
|
49809
49809
|
var import_react_dom = __toESM2(require_react_dom());
|
|
49810
49810
|
var import_react_primitive = require_dist9();
|
|
49811
49811
|
var import_react_use_layout_effect = require_dist15();
|
|
49812
|
-
var
|
|
49812
|
+
var import_jsx_runtime15 = require_jsx_runtime();
|
|
49813
49813
|
var PORTAL_NAME = "Portal";
|
|
49814
49814
|
var Portal = React3.forwardRef((props, forwardedRef) => {
|
|
49815
49815
|
const { container: containerProp, ...portalProps } = props;
|
|
49816
49816
|
const [mounted, setMounted] = React3.useState(false);
|
|
49817
49817
|
(0, import_react_use_layout_effect.useLayoutEffect)(() => setMounted(true), []);
|
|
49818
49818
|
const container = containerProp || mounted && globalThis?.document?.body;
|
|
49819
|
-
return container ? import_react_dom.default.createPortal(/* @__PURE__ */ (0,
|
|
49819
|
+
return container ? import_react_dom.default.createPortal(/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_primitive.Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
|
49820
49820
|
});
|
|
49821
49821
|
Portal.displayName = PORTAL_NAME;
|
|
49822
49822
|
var Root = Portal;
|
|
@@ -50033,7 +50033,7 @@ var require_dist29 = __commonJS({
|
|
|
50033
50033
|
module.exports = __toCommonJS2(index_exports);
|
|
50034
50034
|
var React3 = __toESM2(require_react());
|
|
50035
50035
|
var import_react_compose_refs = require_dist4();
|
|
50036
|
-
var
|
|
50036
|
+
var import_jsx_runtime15 = require_jsx_runtime();
|
|
50037
50037
|
// @__NO_SIDE_EFFECTS__
|
|
50038
50038
|
function createSlot(ownerName) {
|
|
50039
50039
|
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
@@ -50051,9 +50051,9 @@ var require_dist29 = __commonJS({
|
|
|
50051
50051
|
return child;
|
|
50052
50052
|
}
|
|
50053
50053
|
});
|
|
50054
|
-
return /* @__PURE__ */ (0,
|
|
50054
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React3.isValidElement(newElement) ? React3.cloneElement(newElement, void 0, newChildren) : null });
|
|
50055
50055
|
}
|
|
50056
|
-
return /* @__PURE__ */ (0,
|
|
50056
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
50057
50057
|
});
|
|
50058
50058
|
Slot2.displayName = `${ownerName}.Slot`;
|
|
50059
50059
|
return Slot2;
|
|
@@ -50080,7 +50080,7 @@ var require_dist29 = __commonJS({
|
|
|
50080
50080
|
// @__NO_SIDE_EFFECTS__
|
|
50081
50081
|
function createSlottable(ownerName) {
|
|
50082
50082
|
const Slottable2 = ({ children }) => {
|
|
50083
|
-
return /* @__PURE__ */ (0,
|
|
50083
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jsx_runtime15.Fragment, { children });
|
|
50084
50084
|
};
|
|
50085
50085
|
Slottable2.displayName = `${ownerName}.Slottable`;
|
|
50086
50086
|
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
|
@@ -50198,7 +50198,7 @@ var require_dist30 = __commonJS({
|
|
|
50198
50198
|
var import_react_use_controllable_state = require_dist23();
|
|
50199
50199
|
var import_aria_hidden = require_es5();
|
|
50200
50200
|
var import_react_remove_scroll = require_es57();
|
|
50201
|
-
var
|
|
50201
|
+
var import_jsx_runtime15 = require_jsx_runtime();
|
|
50202
50202
|
var POPOVER_NAME = "Popover";
|
|
50203
50203
|
var [createPopoverContext, createPopoverScope] = (0, import_react_context.createContextScope)(POPOVER_NAME, [
|
|
50204
50204
|
import_react_popper.createPopperScope
|
|
@@ -50223,7 +50223,7 @@ var require_dist30 = __commonJS({
|
|
|
50223
50223
|
onChange: onOpenChange,
|
|
50224
50224
|
caller: POPOVER_NAME
|
|
50225
50225
|
});
|
|
50226
|
-
return /* @__PURE__ */ (0,
|
|
50226
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
50227
50227
|
PopoverProvider,
|
|
50228
50228
|
{
|
|
50229
50229
|
scope: __scopePopover,
|
|
@@ -50252,7 +50252,7 @@ var require_dist30 = __commonJS({
|
|
|
50252
50252
|
onCustomAnchorAdd();
|
|
50253
50253
|
return () => onCustomAnchorRemove();
|
|
50254
50254
|
}, [onCustomAnchorAdd, onCustomAnchorRemove]);
|
|
50255
|
-
return /* @__PURE__ */ (0,
|
|
50255
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(PopperPrimitive.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });
|
|
50256
50256
|
}
|
|
50257
50257
|
);
|
|
50258
50258
|
PopoverAnchor.displayName = ANCHOR_NAME;
|
|
@@ -50263,7 +50263,7 @@ var require_dist30 = __commonJS({
|
|
|
50263
50263
|
const context = usePopoverContext(TRIGGER_NAME, __scopePopover);
|
|
50264
50264
|
const popperScope = usePopperScope(__scopePopover);
|
|
50265
50265
|
const composedTriggerRef = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, context.triggerRef);
|
|
50266
|
-
const trigger = /* @__PURE__ */ (0,
|
|
50266
|
+
const trigger = /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
50267
50267
|
import_react_primitive.Primitive.button,
|
|
50268
50268
|
{
|
|
50269
50269
|
type: "button",
|
|
@@ -50276,7 +50276,7 @@ var require_dist30 = __commonJS({
|
|
|
50276
50276
|
onClick: (0, import_primitive.composeEventHandlers)(props.onClick, context.onOpenToggle)
|
|
50277
50277
|
}
|
|
50278
50278
|
);
|
|
50279
|
-
return context.hasCustomAnchor ? trigger : /* @__PURE__ */ (0,
|
|
50279
|
+
return context.hasCustomAnchor ? trigger : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: trigger });
|
|
50280
50280
|
}
|
|
50281
50281
|
);
|
|
50282
50282
|
PopoverTrigger.displayName = TRIGGER_NAME;
|
|
@@ -50287,7 +50287,7 @@ var require_dist30 = __commonJS({
|
|
|
50287
50287
|
var PopoverPortal = (props) => {
|
|
50288
50288
|
const { __scopePopover, forceMount, children, container } = props;
|
|
50289
50289
|
const context = usePopoverContext(PORTAL_NAME, __scopePopover);
|
|
50290
|
-
return /* @__PURE__ */ (0,
|
|
50290
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(PortalProvider, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_presence.Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_portal.Portal, { asChild: true, container, children }) }) });
|
|
50291
50291
|
};
|
|
50292
50292
|
PopoverPortal.displayName = PORTAL_NAME;
|
|
50293
50293
|
var CONTENT_NAME = "PopoverContent";
|
|
@@ -50296,7 +50296,7 @@ var require_dist30 = __commonJS({
|
|
|
50296
50296
|
const portalContext = usePortalContext(CONTENT_NAME, props.__scopePopover);
|
|
50297
50297
|
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
|
50298
50298
|
const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);
|
|
50299
|
-
return /* @__PURE__ */ (0,
|
|
50299
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_presence.Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(PopoverContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(PopoverContentNonModal, { ...contentProps, ref: forwardedRef }) });
|
|
50300
50300
|
}
|
|
50301
50301
|
);
|
|
50302
50302
|
PopoverContent.displayName = CONTENT_NAME;
|
|
@@ -50311,7 +50311,7 @@ var require_dist30 = __commonJS({
|
|
|
50311
50311
|
const content = contentRef.current;
|
|
50312
50312
|
if (content) return (0, import_aria_hidden.hideOthers)(content);
|
|
50313
50313
|
}, []);
|
|
50314
|
-
return /* @__PURE__ */ (0,
|
|
50314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_remove_scroll.RemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
50315
50315
|
PopoverContentImpl,
|
|
50316
50316
|
{
|
|
50317
50317
|
...props,
|
|
@@ -50346,7 +50346,7 @@ var require_dist30 = __commonJS({
|
|
|
50346
50346
|
const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);
|
|
50347
50347
|
const hasInteractedOutsideRef = React3.useRef(false);
|
|
50348
50348
|
const hasPointerDownOutsideRef = React3.useRef(false);
|
|
50349
|
-
return /* @__PURE__ */ (0,
|
|
50349
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
50350
50350
|
PopoverContentImpl,
|
|
50351
50351
|
{
|
|
50352
50352
|
...props,
|
|
@@ -50398,7 +50398,7 @@ var require_dist30 = __commonJS({
|
|
|
50398
50398
|
const context = usePopoverContext(CONTENT_NAME, __scopePopover);
|
|
50399
50399
|
const popperScope = usePopperScope(__scopePopover);
|
|
50400
50400
|
(0, import_react_focus_guards.useFocusGuards)();
|
|
50401
|
-
return /* @__PURE__ */ (0,
|
|
50401
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
50402
50402
|
import_react_focus_scope.FocusScope,
|
|
50403
50403
|
{
|
|
50404
50404
|
asChild: true,
|
|
@@ -50406,7 +50406,7 @@ var require_dist30 = __commonJS({
|
|
|
50406
50406
|
trapped: trapFocus,
|
|
50407
50407
|
onMountAutoFocus: onOpenAutoFocus,
|
|
50408
50408
|
onUnmountAutoFocus: onCloseAutoFocus,
|
|
50409
|
-
children: /* @__PURE__ */ (0,
|
|
50409
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
50410
50410
|
import_react_dismissable_layer.DismissableLayer,
|
|
50411
50411
|
{
|
|
50412
50412
|
asChild: true,
|
|
@@ -50416,7 +50416,7 @@ var require_dist30 = __commonJS({
|
|
|
50416
50416
|
onPointerDownOutside,
|
|
50417
50417
|
onFocusOutside,
|
|
50418
50418
|
onDismiss: () => context.onOpenChange(false),
|
|
50419
|
-
children: /* @__PURE__ */ (0,
|
|
50419
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
50420
50420
|
PopperPrimitive.Content,
|
|
50421
50421
|
{
|
|
50422
50422
|
"data-state": getState(context.open),
|
|
@@ -50449,7 +50449,7 @@ var require_dist30 = __commonJS({
|
|
|
50449
50449
|
(props, forwardedRef) => {
|
|
50450
50450
|
const { __scopePopover, ...closeProps } = props;
|
|
50451
50451
|
const context = usePopoverContext(CLOSE_NAME, __scopePopover);
|
|
50452
|
-
return /* @__PURE__ */ (0,
|
|
50452
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
50453
50453
|
import_react_primitive.Primitive.button,
|
|
50454
50454
|
{
|
|
50455
50455
|
type: "button",
|
|
@@ -50466,7 +50466,7 @@ var require_dist30 = __commonJS({
|
|
|
50466
50466
|
(props, forwardedRef) => {
|
|
50467
50467
|
const { __scopePopover, ...arrowProps } = props;
|
|
50468
50468
|
const popperScope = usePopperScope(__scopePopover);
|
|
50469
|
-
return /* @__PURE__ */ (0,
|
|
50469
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });
|
|
50470
50470
|
}
|
|
50471
50471
|
);
|
|
50472
50472
|
PopoverArrow.displayName = ARROW_NAME;
|
|
@@ -50589,14 +50589,14 @@ var require_dist31 = __commonJS({
|
|
|
50589
50589
|
var import_react_dom = __toESM2(require_react_dom());
|
|
50590
50590
|
var import_react_primitive = require_dist9();
|
|
50591
50591
|
var import_react_use_layout_effect = require_dist15();
|
|
50592
|
-
var
|
|
50592
|
+
var import_jsx_runtime15 = require_jsx_runtime();
|
|
50593
50593
|
var PORTAL_NAME = "Portal";
|
|
50594
50594
|
var Portal = React3.forwardRef((props, forwardedRef) => {
|
|
50595
50595
|
const { container: containerProp, ...portalProps } = props;
|
|
50596
50596
|
const [mounted, setMounted] = React3.useState(false);
|
|
50597
50597
|
(0, import_react_use_layout_effect.useLayoutEffect)(() => setMounted(true), []);
|
|
50598
50598
|
const container = containerProp || mounted && globalThis?.document?.body;
|
|
50599
|
-
return container ? import_react_dom.default.createPortal(/* @__PURE__ */ (0,
|
|
50599
|
+
return container ? import_react_dom.default.createPortal(/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_primitive.Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
|
50600
50600
|
});
|
|
50601
50601
|
Portal.displayName = PORTAL_NAME;
|
|
50602
50602
|
var Root = Portal;
|
|
@@ -50645,7 +50645,7 @@ var require_dist32 = __commonJS({
|
|
|
50645
50645
|
module.exports = __toCommonJS2(index_exports);
|
|
50646
50646
|
var React3 = __toESM2(require_react());
|
|
50647
50647
|
var import_react_compose_refs = require_dist4();
|
|
50648
|
-
var
|
|
50648
|
+
var import_jsx_runtime15 = require_jsx_runtime();
|
|
50649
50649
|
// @__NO_SIDE_EFFECTS__
|
|
50650
50650
|
function createSlot(ownerName) {
|
|
50651
50651
|
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
@@ -50663,9 +50663,9 @@ var require_dist32 = __commonJS({
|
|
|
50663
50663
|
return child;
|
|
50664
50664
|
}
|
|
50665
50665
|
});
|
|
50666
|
-
return /* @__PURE__ */ (0,
|
|
50666
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React3.isValidElement(newElement) ? React3.cloneElement(newElement, void 0, newChildren) : null });
|
|
50667
50667
|
}
|
|
50668
|
-
return /* @__PURE__ */ (0,
|
|
50668
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
50669
50669
|
});
|
|
50670
50670
|
Slot2.displayName = `${ownerName}.Slot`;
|
|
50671
50671
|
return Slot2;
|
|
@@ -50692,7 +50692,7 @@ var require_dist32 = __commonJS({
|
|
|
50692
50692
|
// @__NO_SIDE_EFFECTS__
|
|
50693
50693
|
function createSlottable(ownerName) {
|
|
50694
50694
|
const Slottable2 = ({ children }) => {
|
|
50695
|
-
return /* @__PURE__ */ (0,
|
|
50695
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jsx_runtime15.Fragment, { children });
|
|
50696
50696
|
};
|
|
50697
50697
|
Slottable2.displayName = `${ownerName}.Slottable`;
|
|
50698
50698
|
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
|
@@ -50811,7 +50811,7 @@ var require_dist33 = __commonJS({
|
|
|
50811
50811
|
var import_react_remove_scroll = require_es57();
|
|
50812
50812
|
var import_aria_hidden = require_es5();
|
|
50813
50813
|
var import_react_slot = require_dist32();
|
|
50814
|
-
var
|
|
50814
|
+
var import_jsx_runtime15 = require_jsx_runtime();
|
|
50815
50815
|
var DIALOG_NAME = "Dialog";
|
|
50816
50816
|
var [createDialogContext, createDialogScope] = (0, import_react_context.createContextScope)(DIALOG_NAME);
|
|
50817
50817
|
var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
|
|
@@ -50832,7 +50832,7 @@ var require_dist33 = __commonJS({
|
|
|
50832
50832
|
onChange: onOpenChange,
|
|
50833
50833
|
caller: DIALOG_NAME
|
|
50834
50834
|
});
|
|
50835
|
-
return /* @__PURE__ */ (0,
|
|
50835
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
50836
50836
|
DialogProvider,
|
|
50837
50837
|
{
|
|
50838
50838
|
scope: __scopeDialog,
|
|
@@ -50856,7 +50856,7 @@ var require_dist33 = __commonJS({
|
|
|
50856
50856
|
const { __scopeDialog, ...triggerProps } = props;
|
|
50857
50857
|
const context = useDialogContext(TRIGGER_NAME, __scopeDialog);
|
|
50858
50858
|
const composedTriggerRef = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, context.triggerRef);
|
|
50859
|
-
return /* @__PURE__ */ (0,
|
|
50859
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
50860
50860
|
import_react_primitive.Primitive.button,
|
|
50861
50861
|
{
|
|
50862
50862
|
type: "button",
|
|
@@ -50879,7 +50879,7 @@ var require_dist33 = __commonJS({
|
|
|
50879
50879
|
var DialogPortal = (props) => {
|
|
50880
50880
|
const { __scopeDialog, forceMount, children, container } = props;
|
|
50881
50881
|
const context = useDialogContext(PORTAL_NAME, __scopeDialog);
|
|
50882
|
-
return /* @__PURE__ */ (0,
|
|
50882
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(PortalProvider, { scope: __scopeDialog, forceMount, children: React3.Children.map(children, (child) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_presence.Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_portal.Portal, { asChild: true, container, children: child }) })) });
|
|
50883
50883
|
};
|
|
50884
50884
|
DialogPortal.displayName = PORTAL_NAME;
|
|
50885
50885
|
var OVERLAY_NAME = "DialogOverlay";
|
|
@@ -50888,7 +50888,7 @@ var require_dist33 = __commonJS({
|
|
|
50888
50888
|
const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);
|
|
50889
50889
|
const { forceMount = portalContext.forceMount, ...overlayProps } = props;
|
|
50890
50890
|
const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);
|
|
50891
|
-
return context.modal ? /* @__PURE__ */ (0,
|
|
50891
|
+
return context.modal ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_presence.Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;
|
|
50892
50892
|
}
|
|
50893
50893
|
);
|
|
50894
50894
|
DialogOverlay.displayName = OVERLAY_NAME;
|
|
@@ -50900,7 +50900,7 @@ var require_dist33 = __commonJS({
|
|
|
50900
50900
|
return (
|
|
50901
50901
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
50902
50902
|
// ie. when `Overlay` and `Content` are siblings
|
|
50903
|
-
/* @__PURE__ */ (0,
|
|
50903
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_remove_scroll.RemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
50904
50904
|
import_react_primitive.Primitive.div,
|
|
50905
50905
|
{
|
|
50906
50906
|
"data-state": getState(context.open),
|
|
@@ -50918,7 +50918,7 @@ var require_dist33 = __commonJS({
|
|
|
50918
50918
|
const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);
|
|
50919
50919
|
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
|
50920
50920
|
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
|
50921
|
-
return /* @__PURE__ */ (0,
|
|
50921
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_presence.Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });
|
|
50922
50922
|
}
|
|
50923
50923
|
);
|
|
50924
50924
|
DialogContent.displayName = CONTENT_NAME;
|
|
@@ -50931,7 +50931,7 @@ var require_dist33 = __commonJS({
|
|
|
50931
50931
|
const content = contentRef.current;
|
|
50932
50932
|
if (content) return (0, import_aria_hidden.hideOthers)(content);
|
|
50933
50933
|
}, []);
|
|
50934
|
-
return /* @__PURE__ */ (0,
|
|
50934
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
50935
50935
|
DialogContentImpl,
|
|
50936
50936
|
{
|
|
50937
50937
|
...props,
|
|
@@ -50961,7 +50961,7 @@ var require_dist33 = __commonJS({
|
|
|
50961
50961
|
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
|
50962
50962
|
const hasInteractedOutsideRef = React3.useRef(false);
|
|
50963
50963
|
const hasPointerDownOutsideRef = React3.useRef(false);
|
|
50964
|
-
return /* @__PURE__ */ (0,
|
|
50964
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
50965
50965
|
DialogContentImpl,
|
|
50966
50966
|
{
|
|
50967
50967
|
...props,
|
|
@@ -51003,8 +51003,8 @@ var require_dist33 = __commonJS({
|
|
|
51003
51003
|
const contentRef = React3.useRef(null);
|
|
51004
51004
|
const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, contentRef);
|
|
51005
51005
|
(0, import_react_focus_guards.useFocusGuards)();
|
|
51006
|
-
return /* @__PURE__ */ (0,
|
|
51007
|
-
/* @__PURE__ */ (0,
|
|
51006
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
51007
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
51008
51008
|
import_react_focus_scope.FocusScope,
|
|
51009
51009
|
{
|
|
51010
51010
|
asChild: true,
|
|
@@ -51012,7 +51012,7 @@ var require_dist33 = __commonJS({
|
|
|
51012
51012
|
trapped: trapFocus,
|
|
51013
51013
|
onMountAutoFocus: onOpenAutoFocus,
|
|
51014
51014
|
onUnmountAutoFocus: onCloseAutoFocus,
|
|
51015
|
-
children: /* @__PURE__ */ (0,
|
|
51015
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
51016
51016
|
import_react_dismissable_layer.DismissableLayer,
|
|
51017
51017
|
{
|
|
51018
51018
|
role: "dialog",
|
|
@@ -51027,9 +51027,9 @@ var require_dist33 = __commonJS({
|
|
|
51027
51027
|
)
|
|
51028
51028
|
}
|
|
51029
51029
|
),
|
|
51030
|
-
/* @__PURE__ */ (0,
|
|
51031
|
-
/* @__PURE__ */ (0,
|
|
51032
|
-
/* @__PURE__ */ (0,
|
|
51030
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
51031
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(TitleWarning, { titleId: context.titleId }),
|
|
51032
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
|
|
51033
51033
|
] })
|
|
51034
51034
|
] });
|
|
51035
51035
|
}
|
|
@@ -51039,7 +51039,7 @@ var require_dist33 = __commonJS({
|
|
|
51039
51039
|
(props, forwardedRef) => {
|
|
51040
51040
|
const { __scopeDialog, ...titleProps } = props;
|
|
51041
51041
|
const context = useDialogContext(TITLE_NAME, __scopeDialog);
|
|
51042
|
-
return /* @__PURE__ */ (0,
|
|
51042
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_primitive.Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
|
|
51043
51043
|
}
|
|
51044
51044
|
);
|
|
51045
51045
|
DialogTitle.displayName = TITLE_NAME;
|
|
@@ -51048,7 +51048,7 @@ var require_dist33 = __commonJS({
|
|
|
51048
51048
|
(props, forwardedRef) => {
|
|
51049
51049
|
const { __scopeDialog, ...descriptionProps } = props;
|
|
51050
51050
|
const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
|
|
51051
|
-
return /* @__PURE__ */ (0,
|
|
51051
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_primitive.Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
|
|
51052
51052
|
}
|
|
51053
51053
|
);
|
|
51054
51054
|
DialogDescription.displayName = DESCRIPTION_NAME;
|
|
@@ -51057,7 +51057,7 @@ var require_dist33 = __commonJS({
|
|
|
51057
51057
|
(props, forwardedRef) => {
|
|
51058
51058
|
const { __scopeDialog, ...closeProps } = props;
|
|
51059
51059
|
const context = useDialogContext(CLOSE_NAME, __scopeDialog);
|
|
51060
|
-
return /* @__PURE__ */ (0,
|
|
51060
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
51061
51061
|
import_react_primitive.Primitive.button,
|
|
51062
51062
|
{
|
|
51063
51063
|
type: "button",
|
|
@@ -56590,7 +56590,7 @@ var require_dist39 = __commonJS({
|
|
|
56590
56590
|
module.exports = __toCommonJS2(index_exports);
|
|
56591
56591
|
var React3 = __toESM2(require_react());
|
|
56592
56592
|
var import_react_compose_refs = require_dist4();
|
|
56593
|
-
var
|
|
56593
|
+
var import_jsx_runtime15 = require_jsx_runtime();
|
|
56594
56594
|
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
56595
56595
|
var use = React3[" use ".trim().toString()];
|
|
56596
56596
|
function isPromiseLike(value) {
|
|
@@ -56619,9 +56619,9 @@ var require_dist39 = __commonJS({
|
|
|
56619
56619
|
return child;
|
|
56620
56620
|
}
|
|
56621
56621
|
});
|
|
56622
|
-
return /* @__PURE__ */ (0,
|
|
56622
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React3.isValidElement(newElement) ? React3.cloneElement(newElement, void 0, newChildren) : null });
|
|
56623
56623
|
}
|
|
56624
|
-
return /* @__PURE__ */ (0,
|
|
56624
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
56625
56625
|
});
|
|
56626
56626
|
Slot2.displayName = `${ownerName}.Slot`;
|
|
56627
56627
|
return Slot2;
|
|
@@ -56651,7 +56651,7 @@ var require_dist39 = __commonJS({
|
|
|
56651
56651
|
// @__NO_SIDE_EFFECTS__
|
|
56652
56652
|
function createSlottable(ownerName) {
|
|
56653
56653
|
const Slottable2 = ({ children }) => {
|
|
56654
|
-
return /* @__PURE__ */ (0,
|
|
56654
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jsx_runtime15.Fragment, { children });
|
|
56655
56655
|
};
|
|
56656
56656
|
Slottable2.displayName = `${ownerName}.Slottable`;
|
|
56657
56657
|
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
|
@@ -56742,7 +56742,7 @@ var require_dist40 = __commonJS({
|
|
|
56742
56742
|
var React3 = __toESM2(require_react());
|
|
56743
56743
|
var ReactDOM2 = __toESM2(require_react_dom());
|
|
56744
56744
|
var import_react_slot = require_dist39();
|
|
56745
|
-
var
|
|
56745
|
+
var import_jsx_runtime15 = require_jsx_runtime();
|
|
56746
56746
|
var NODES = [
|
|
56747
56747
|
"a",
|
|
56748
56748
|
"button",
|
|
@@ -56770,7 +56770,7 @@ var require_dist40 = __commonJS({
|
|
|
56770
56770
|
if (typeof window !== "undefined") {
|
|
56771
56771
|
window[Symbol.for("radix-ui")] = true;
|
|
56772
56772
|
}
|
|
56773
|
-
return /* @__PURE__ */ (0,
|
|
56773
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
56774
56774
|
});
|
|
56775
56775
|
Node2.displayName = `Primitive.${node}`;
|
|
56776
56776
|
return { ...primitive, [node]: Node2 };
|
|
@@ -56824,14 +56824,14 @@ var require_dist41 = __commonJS({
|
|
|
56824
56824
|
var import_react_dom = __toESM2(require_react_dom());
|
|
56825
56825
|
var import_react_primitive = require_dist40();
|
|
56826
56826
|
var import_react_use_layout_effect = require_dist15();
|
|
56827
|
-
var
|
|
56827
|
+
var import_jsx_runtime15 = require_jsx_runtime();
|
|
56828
56828
|
var PORTAL_NAME = "Portal";
|
|
56829
56829
|
var Portal = React3.forwardRef((props, forwardedRef) => {
|
|
56830
56830
|
const { container: containerProp, ...portalProps } = props;
|
|
56831
56831
|
const [mounted, setMounted] = React3.useState(false);
|
|
56832
56832
|
(0, import_react_use_layout_effect.useLayoutEffect)(() => setMounted(true), []);
|
|
56833
56833
|
const container = containerProp || mounted && globalThis?.document?.body;
|
|
56834
|
-
return container ? import_react_dom.default.createPortal(/* @__PURE__ */ (0,
|
|
56834
|
+
return container ? import_react_dom.default.createPortal(/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_primitive.Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
|
56835
56835
|
});
|
|
56836
56836
|
Portal.displayName = PORTAL_NAME;
|
|
56837
56837
|
var Root = Portal;
|
|
@@ -70287,25 +70287,37 @@ var import_jsx_runtime7 = __toESM(require_jsx_runtime());
|
|
|
70287
70287
|
var import_FaTimes = __toESM(require_FaTimes());
|
|
70288
70288
|
var import_FaPlay = __toESM(require_FaPlay());
|
|
70289
70289
|
var import_FaCircle = __toESM(require_FaCircle());
|
|
70290
|
-
|
|
70290
|
+
var import_react7 = __toESM(require_react());
|
|
70291
|
+
function InlineView3({ state, config, sendCommand }) {
|
|
70291
70292
|
const sourcePriority = state.sourcePriority || [];
|
|
70293
|
+
const handlePriorityChange = (0, import_react7.useCallback)((newOrder) => {
|
|
70294
|
+
sendCommand({ type: "set-priority-order", sources: newOrder });
|
|
70295
|
+
}, [sendCommand]);
|
|
70292
70296
|
const availableSourceNames = state.availableSources.map((s) => s.sourceName);
|
|
70293
70297
|
return (0, import_jsx_runtime7.jsx)("div", { className: "flex flex-col h-full justify-between p-2 text-gray-900 dark:text-white", children: (0, import_jsx_runtime7.jsxs)("div", { children: [(0, import_jsx_runtime7.jsxs)("p", { className: "text-sm font-medium", children: ["Active: ", (0, import_jsx_runtime7.jsx)("span", { className: "font-normal", children: state.activeSource || "None" })] }), (0, import_jsx_runtime7.jsxs)("p", { className: "text-sm font-medium", children: ["Available: ", (0, import_jsx_runtime7.jsx)("span", { className: "font-normal", children: state.availableSources.length })] }), sourcePriority.length > 0 && (0, import_jsx_runtime7.jsxs)("div", { className: "mt-2 space-y-2", children: [sourcePriority.map((sourceName, index3) => {
|
|
70294
70298
|
const isActive = state.activeSource === sourceName;
|
|
70295
70299
|
const isAvailable = availableSourceNames.includes(sourceName);
|
|
70296
70300
|
const priorityRank = index3 + 1;
|
|
70297
|
-
return (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center gap-2", children: [(0, import_jsx_runtime7.jsx)("div", { className: "relative w-4 h-4 flex items-center justify-center flex-shrink-0", children: !isAvailable ? (0, import_jsx_runtime7.jsx)(import_FaTimes.FaTimes, { className: "w-4 h-4 text-red-500" }) : isActive ? (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [(0, import_jsx_runtime7.jsx)(import_FaPlay.FaPlay, { className: "w-3 h-3 text-green-500" }), (0, import_jsx_runtime7.jsx)("div", { className: "absolute inset-0 flex items-center justify-center opacity-30", children: (0, import_jsx_runtime7.jsx)("div", { className: "w-4 h-4 bg-green-500 animate-ping duration-150" }) })] }) : (0, import_jsx_runtime7.jsx)(import_FaCircle.FaCircle, { className: "w-2 h-2 text-green-500" }) }), (0, import_jsx_runtime7.jsx)("span", { className: "text-gray-900 dark:text-white flex-1 text-xs", children: sourceName }), (0, import_jsx_runtime7.
|
|
70301
|
+
return (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center gap-2", children: [(0, import_jsx_runtime7.jsx)("div", { className: "relative w-4 h-4 flex items-center justify-center flex-shrink-0", children: !isAvailable ? (0, import_jsx_runtime7.jsx)(import_FaTimes.FaTimes, { className: "w-4 h-4 text-red-500" }) : isActive ? (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [(0, import_jsx_runtime7.jsx)(import_FaPlay.FaPlay, { className: "w-3 h-3 text-green-500" }), (0, import_jsx_runtime7.jsx)("div", { className: "absolute inset-0 flex items-center justify-center opacity-30", children: (0, import_jsx_runtime7.jsx)("div", { className: "w-4 h-4 bg-green-500 animate-ping duration-150" }) })] }) : (0, import_jsx_runtime7.jsx)(import_FaCircle.FaCircle, { className: "w-2 h-2 text-green-500" }) }), (0, import_jsx_runtime7.jsx)("span", { className: "text-gray-900 dark:text-white flex-1 text-xs", children: sourceName }), (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center gap-1", children: [index3 > 0 && (0, import_jsx_runtime7.jsx)("button", { onClick: () => {
|
|
70302
|
+
const newOrder = [...sourcePriority];
|
|
70303
|
+
[newOrder[index3], newOrder[index3 - 1]] = [newOrder[index3 - 1], newOrder[index3]];
|
|
70304
|
+
handlePriorityChange(newOrder);
|
|
70305
|
+
}, className: "w-4 h-4 flex items-center justify-center text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200", title: "Move up", children: (0, import_jsx_runtime7.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 2, stroke: "currentColor", className: "w-3 h-3", children: (0, import_jsx_runtime7.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4.5 15.75l7.5-7.5 7.5 7.5" }) }) }), index3 < sourcePriority.length - 1 && (0, import_jsx_runtime7.jsx)("button", { onClick: () => {
|
|
70306
|
+
const newOrder = [...sourcePriority];
|
|
70307
|
+
[newOrder[index3], newOrder[index3 + 1]] = [newOrder[index3 + 1], newOrder[index3]];
|
|
70308
|
+
handlePriorityChange(newOrder);
|
|
70309
|
+
}, className: "w-4 h-4 flex items-center justify-center text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200", title: "Move down", children: (0, import_jsx_runtime7.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 2, stroke: "currentColor", className: "w-3 h-3", children: (0, import_jsx_runtime7.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19.5 8.25l-7.5 7.5-7.5-7.5" }) }) }), (0, import_jsx_runtime7.jsx)("span", { className: "text-gray-500 dark:text-gray-400 text-sm w-4 text-center", children: priorityRank })] })] }, sourceName);
|
|
70298
70310
|
}), config.fallbackFilePath && (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center gap-2", children: [(0, import_jsx_runtime7.jsx)("div", { className: "relative w-4 h-4 flex items-center justify-center flex-shrink-0", children: state.activeSource === "fallback" ? (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [(0, import_jsx_runtime7.jsx)(import_FaPlay.FaPlay, { className: "w-3 h-3 text-green-500" }), (0, import_jsx_runtime7.jsx)("div", { className: "absolute inset-0 flex items-center justify-center opacity-30", children: (0, import_jsx_runtime7.jsx)("div", { className: "w-4 h-4 bg-green-500 animate-ping duration-150" }) })] }) : (0, import_jsx_runtime7.jsx)(import_FaCircle.FaCircle, { className: "w-2 h-2 text-green-500" }) }), (0, import_jsx_runtime7.jsx)("span", { className: "text-gray-900 dark:text-white flex-1 text-xs", children: "fallback" }), (0, import_jsx_runtime7.jsx)("span", { className: "text-gray-500 dark:text-gray-400 text-sm", children: "-" })] })] })] }) });
|
|
70299
70311
|
}
|
|
70300
70312
|
|
|
70301
70313
|
// build/client/processor.hardSourceSwitch/fullscreen.js
|
|
70302
70314
|
var import_jsx_runtime8 = __toESM(require_jsx_runtime());
|
|
70303
|
-
var
|
|
70315
|
+
var import_react8 = __toESM(require_react());
|
|
70304
70316
|
function FullscreenView({ state, config: _config, sendCommand }) {
|
|
70305
|
-
const handleSwitch = (0,
|
|
70317
|
+
const handleSwitch = (0, import_react8.useCallback)((sourceName) => {
|
|
70306
70318
|
sendCommand({ type: "switch-to-source", source: sourceName });
|
|
70307
70319
|
}, [sendCommand]);
|
|
70308
|
-
const handlePriorityChange = (0,
|
|
70320
|
+
const handlePriorityChange = (0, import_react8.useCallback)((newOrder) => {
|
|
70309
70321
|
sendCommand({ type: "set-priority-order", sources: newOrder });
|
|
70310
70322
|
}, [sendCommand]);
|
|
70311
70323
|
return (0, import_jsx_runtime8.jsxs)("div", { className: "h-full w-full flex flex-col p-4 bg-gray-900 text-white", children: [(0, import_jsx_runtime8.jsxs)("div", { className: "flex-1 flex gap-4", children: [(0, import_jsx_runtime8.jsxs)("div", { className: "flex-1", children: [(0, import_jsx_runtime8.jsx)("h3", { className: "text-lg font-semibold mb-3", children: "Sources" }), (0, import_jsx_runtime8.jsx)("div", { className: "grid grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4", children: state.availableSources.map((source) => {
|
|
@@ -70336,8 +70348,61 @@ function FullscreenView({ state, config: _config, sendCommand }) {
|
|
|
70336
70348
|
}, className: "px-2 py-1 bg-gray-700 hover:bg-gray-600 rounded text-xs", title: "Move down", children: "\u2193" })] })] }, source)) })] })] })] }), state.formatWarnings && state.formatWarnings.length > 0 && (0, import_jsx_runtime8.jsxs)("div", { className: "mt-4 bg-yellow-900/50 border border-yellow-600 rounded-lg p-3", children: [(0, import_jsx_runtime8.jsxs)("h4", { className: "text-yellow-400 font-semibold mb-2 flex items-center gap-2", children: [(0, import_jsx_runtime8.jsx)("span", { children: "\u26A0\uFE0F" }), "Format Warnings"] }), (0, import_jsx_runtime8.jsx)("div", { className: "space-y-1 max-h-32 overflow-y-auto", children: state.formatWarnings.map((warning, idx) => (0, import_jsx_runtime8.jsxs)("div", { className: "text-sm text-yellow-200", children: ["\u2022 ", warning] }, idx)) })] })] });
|
|
70337
70349
|
}
|
|
70338
70350
|
|
|
70351
|
+
// build/client/processor.hardSourceSwitch/source-selection.js
|
|
70352
|
+
var import_jsx_runtime9 = __toESM(require_jsx_runtime());
|
|
70353
|
+
var import_react9 = __toESM(require_react());
|
|
70354
|
+
function OrderInput(props) {
|
|
70355
|
+
const { onChanged } = props;
|
|
70356
|
+
const [value, setValue] = (0, import_react9.useState)(props.defaultValue ?? []);
|
|
70357
|
+
(0, import_react9.useEffect)(() => {
|
|
70358
|
+
onChanged(value);
|
|
70359
|
+
}, [value, onChanged]);
|
|
70360
|
+
if (value.length == 0) {
|
|
70361
|
+
return (0, import_jsx_runtime9.jsx)("p", { className: "node-editor-helper-text", children: "Sources will appear here when subscriptions have been added to this node" });
|
|
70362
|
+
} else {
|
|
70363
|
+
return (0, import_jsx_runtime9.jsx)("div", { id: props.id, children: (0, import_jsx_runtime9.jsx)("ul", { children: value.map((v, ix2) => {
|
|
70364
|
+
return (0, import_jsx_runtime9.jsxs)("li", { className: "flex", children: [(0, import_jsx_runtime9.jsx)("span", { className: "node-editor-label flex-grow", children: v }), ix2 == 0 ? (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, {}) : (0, import_jsx_runtime9.jsx)("svg", { onClick: moveUp(ix2), xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, className: "w-4 h-6 shrink cursor-pointer stroke-gray-700 dark:stroke-gray-50", children: (0, import_jsx_runtime9.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8.25 6.75L12 3m0 0l3.75 3.75M12 3v18" }) }), ix2 == value.length - 1 ? (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, {}) : (0, import_jsx_runtime9.jsx)("svg", { onClick: moveDown(ix2), xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, className: "w-4 h-6 shrink cursor-pointer stroke-gray-700 dark:stroke-gray-50", children: (0, import_jsx_runtime9.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15.75 17.25L12 21m0 0l-3.75-3.75M12 21V3" }) })] }, v);
|
|
70365
|
+
}) }) });
|
|
70366
|
+
}
|
|
70367
|
+
function moveUp(ix2) {
|
|
70368
|
+
return () => {
|
|
70369
|
+
const nv2 = [...value];
|
|
70370
|
+
nv2[ix2] = value[ix2 - 1];
|
|
70371
|
+
nv2[ix2 - 1] = value[ix2];
|
|
70372
|
+
setValue(nv2);
|
|
70373
|
+
};
|
|
70374
|
+
}
|
|
70375
|
+
function moveDown(ix2) {
|
|
70376
|
+
return () => {
|
|
70377
|
+
const nv2 = [...value];
|
|
70378
|
+
nv2[ix2 + 1] = value[ix2];
|
|
70379
|
+
nv2[ix2] = value[ix2 + 1];
|
|
70380
|
+
setValue(nv2);
|
|
70381
|
+
};
|
|
70382
|
+
}
|
|
70383
|
+
}
|
|
70384
|
+
var source_selection_default = OrderInput;
|
|
70385
|
+
|
|
70339
70386
|
// build/client/processor.hardSourceSwitch/info.js
|
|
70340
70387
|
function info_default7({ defineComponent, Av: Av2, validation: { Z: Z3, SourceName } }) {
|
|
70388
|
+
function configFromSubscription(cfg, sub) {
|
|
70389
|
+
if (!cfg.sourcePriority) {
|
|
70390
|
+
cfg.sourcePriority = [];
|
|
70391
|
+
}
|
|
70392
|
+
const potentiallyNewSources = sub.expectedStreams.map((s) => s.sourceName).filter((s) => !!s);
|
|
70393
|
+
potentiallyNewSources.forEach((s) => {
|
|
70394
|
+
if (!cfg.sourcePriority.includes(s)) {
|
|
70395
|
+
cfg.sourcePriority.push(s);
|
|
70396
|
+
}
|
|
70397
|
+
});
|
|
70398
|
+
}
|
|
70399
|
+
function missingSubscriptions(config, subscriptions) {
|
|
70400
|
+
if (!config.sourcePriority) {
|
|
70401
|
+
config.sourcePriority = [];
|
|
70402
|
+
}
|
|
70403
|
+
const allSourceNames = subscriptions.flatMap((s) => s.expectedStreams).map((s) => s.sourceName).filter((s) => !!s);
|
|
70404
|
+
config.sourcePriority = config.sourcePriority.filter((s) => allSourceNames.includes(s));
|
|
70405
|
+
}
|
|
70341
70406
|
return defineComponent({
|
|
70342
70407
|
identifier: "processor.hardSourceSwitch",
|
|
70343
70408
|
category: "processor",
|
|
@@ -70377,6 +70442,24 @@ function info_default7({ defineComponent, Av: Av2, validation: { Z: Z3, SourceNa
|
|
|
70377
70442
|
fallback: desc.config.fallbackFilePath ? "MP4 File" : "None"
|
|
70378
70443
|
};
|
|
70379
70444
|
},
|
|
70445
|
+
designtime: {
|
|
70446
|
+
uiEvents: {
|
|
70447
|
+
onSubscriptionAdded: function(sub) {
|
|
70448
|
+
configFromSubscription(this.config, sub);
|
|
70449
|
+
},
|
|
70450
|
+
onSubscriptionRemoved: function() {
|
|
70451
|
+
missingSubscriptions(this.config, this.subscriptions);
|
|
70452
|
+
},
|
|
70453
|
+
onNodeUpdated: function() {
|
|
70454
|
+
this.subscriptions.forEach((s) => configFromSubscription(this.config, s));
|
|
70455
|
+
missingSubscriptions(this.config, this.subscriptions);
|
|
70456
|
+
},
|
|
70457
|
+
onSubscriptionUpdated: function(sub) {
|
|
70458
|
+
configFromSubscription(this.config, sub);
|
|
70459
|
+
missingSubscriptions(this.config, this.subscriptions);
|
|
70460
|
+
}
|
|
70461
|
+
}
|
|
70462
|
+
},
|
|
70380
70463
|
runtime: {
|
|
70381
70464
|
initialState: () => ({
|
|
70382
70465
|
activeSource: "",
|
|
@@ -70493,10 +70576,10 @@ function info_default7({ defineComponent, Av: Av2, validation: { Z: Z3, SourceNa
|
|
|
70493
70576
|
}
|
|
70494
70577
|
},
|
|
70495
70578
|
sourcePriority: {
|
|
70496
|
-
help: "
|
|
70497
|
-
advanced: true,
|
|
70579
|
+
help: "The priority order in which the sources will be chosen when available",
|
|
70498
70580
|
hint: {
|
|
70499
|
-
type: "
|
|
70581
|
+
type: "custom",
|
|
70582
|
+
component: source_selection_default,
|
|
70500
70583
|
defaultValue: []
|
|
70501
70584
|
}
|
|
70502
70585
|
},
|
|
@@ -70560,10 +70643,10 @@ function info_default8({ defineComponent, validation: { Z: Z3 } }) {
|
|
|
70560
70643
|
}
|
|
70561
70644
|
|
|
70562
70645
|
// build/client/util.agent/summary-view.js
|
|
70563
|
-
var
|
|
70564
|
-
var
|
|
70646
|
+
var import_jsx_runtime10 = __toESM(require_jsx_runtime());
|
|
70647
|
+
var import_react10 = __toESM(require_react());
|
|
70565
70648
|
function SummaryView4({ state, config, sendCommand }) {
|
|
70566
|
-
const [showDetailedActions, setShowDetailedActions] = (0,
|
|
70649
|
+
const [showDetailedActions, setShowDetailedActions] = (0, import_react10.useState)(false);
|
|
70567
70650
|
const getStatusColor = (status, isRunning) => {
|
|
70568
70651
|
if (!isRunning)
|
|
70569
70652
|
return "text-gray-500 dark:text-gray-400";
|
|
@@ -70618,23 +70701,23 @@ function SummaryView4({ state, config, sendCommand }) {
|
|
|
70618
70701
|
return structured?.decision;
|
|
70619
70702
|
});
|
|
70620
70703
|
const buttonClass = "mt-2 mb-3 text-white w-full justify-center bg-primary-700 hover:bg-primary-800 focus:ring-4 focus:outline-none focus:ring-primary-300 font-medium rounded-lg text-sm px-4 py-2 text-center dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800";
|
|
70621
|
-
return (0,
|
|
70704
|
+
return (0, import_jsx_runtime10.jsxs)("div", { className: "space-y-4 mb-5", children: [(0, import_jsx_runtime10.jsx)("h2", { className: "text-xl font-bold text-gray-900 dark:text-white", children: "Agent Status" }), (0, import_jsx_runtime10.jsxs)("div", { className: "space-y-2", children: [(0, import_jsx_runtime10.jsxs)("div", { className: `flex items-center gap-2 ${getStatusColor(state.status, state.isRunning)}`, children: [(0, import_jsx_runtime10.jsx)("span", { className: "text-lg", children: getStatusIcon(state.status, state.isRunning) }), (0, import_jsx_runtime10.jsx)("span", { className: "font-medium capitalize", children: state.isRunning ? state.status : "stopped" })] }), (0, import_jsx_runtime10.jsxs)("div", { className: "text-sm text-gray-600 dark:text-gray-400", children: [(0, import_jsx_runtime10.jsxs)("div", { children: ["Cycles: ", state.cyclesThisMinute, "/min \u2022 ", state.totalCycles, " total"] }), (0, import_jsx_runtime10.jsxs)("div", { children: ["Components: ", state.discoveredComponents.length, " discovered"] })] })] }), (0, import_jsx_runtime10.jsxs)("div", { children: [(0, import_jsx_runtime10.jsx)("label", { className: "text-sm font-medium text-gray-900 dark:text-white", children: "Goal:" }), (0, import_jsx_runtime10.jsx)("div", { className: "text-sm text-gray-700 dark:text-gray-300 mt-1 p-2 bg-gray-50 dark:bg-gray-800 rounded border", children: config.goal })] }), recentDecision && (0, import_jsx_runtime10.jsxs)("div", { children: [(0, import_jsx_runtime10.jsx)("label", { className: "text-sm font-medium text-gray-900 dark:text-white", children: "Recent Decision:" }), (0, import_jsx_runtime10.jsx)("div", { className: "text-sm text-gray-700 dark:text-gray-300 mt-1 p-2 bg-gray-50 dark:bg-gray-800 rounded border", children: parseStructuredResponse(recentDecision)?.decision || recentDecision.description })] }), state.currentTask && (0, import_jsx_runtime10.jsxs)("div", { children: [(0, import_jsx_runtime10.jsx)("label", { className: "text-sm font-medium text-gray-900 dark:text-white", children: "Current Task:" }), (0, import_jsx_runtime10.jsxs)("div", { className: "mt-1 p-2 bg-gray-50 dark:bg-gray-800 rounded border", children: [(0, import_jsx_runtime10.jsx)("div", { className: "text-sm font-medium text-gray-900 dark:text-gray-100", children: state.currentTask.description }), (0, import_jsx_runtime10.jsx)("div", { className: `inline-flex px-2 py-1 mt-1 text-xs font-semibold rounded-full ${state.currentTask.status === "completed" ? "bg-green-100 text-green-800 dark:bg-green-900/20 dark:text-green-300" : state.currentTask.status === "failed" ? "bg-red-100 text-red-800 dark:bg-red-900/20 dark:text-red-300" : state.currentTask.status === "in_progress" ? "bg-blue-100 text-blue-800 dark:bg-blue-900/20 dark:text-blue-300" : "bg-gray-100 text-gray-800 dark:bg-gray-900/20 dark:text-gray-300"}`, children: state.currentTask.status.replace("_", " ") })] })] }), state.lastError && (0, import_jsx_runtime10.jsxs)("div", { className: "p-2 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded", children: [(0, import_jsx_runtime10.jsx)("div", { className: "text-sm font-medium text-red-800 dark:text-red-200", children: "Error:" }), (0, import_jsx_runtime10.jsx)("div", { className: "text-sm text-red-700 dark:text-red-300", children: state.lastError })] }), (0, import_jsx_runtime10.jsxs)("div", { className: "space-y-2", children: [(0, import_jsx_runtime10.jsx)("button", { type: "button", className: buttonClass, onClick: () => {
|
|
70622
70705
|
if (state.isRunning) {
|
|
70623
70706
|
sendCommand({ type: "stop_agent" });
|
|
70624
70707
|
} else {
|
|
70625
70708
|
sendCommand({ type: "start_agent" });
|
|
70626
70709
|
}
|
|
70627
|
-
}, children: state.isRunning ? "Stop Agent" : "Start Agent" }), state.isRunning && (0,
|
|
70710
|
+
}, children: state.isRunning ? "Stop Agent" : "Start Agent" }), state.isRunning && (0, import_jsx_runtime10.jsx)("button", { type: "button", className: "text-gray-900 dark:text-white w-full bg-white border border-gray-300 focus:outline-none hover:bg-gray-100 focus:ring-4 focus:ring-gray-100 font-medium rounded-lg text-sm px-4 py-2 dark:bg-gray-800 dark:border-gray-600 dark:hover:bg-gray-700 dark:hover:border-gray-600 dark:focus:ring-gray-700", onClick: () => {
|
|
70628
70711
|
sendCommand({ type: "pause_agent" });
|
|
70629
|
-
}, children: "Pause Agent" })] }), (0,
|
|
70712
|
+
}, children: "Pause Agent" })] }), (0, import_jsx_runtime10.jsxs)("div", { children: [(0, import_jsx_runtime10.jsxs)("button", { type: "button", className: "text-sm text-blue-600 dark:text-blue-400 hover:underline", onClick: () => setShowDetailedActions(!showDetailedActions), children: [showDetailedActions ? "Hide" : "Show", " Recent Actions (", state.recentActions.length, ")"] }), showDetailedActions && (0, import_jsx_runtime10.jsx)("div", { className: "mt-2 space-y-2 max-h-60 overflow-y-auto", children: state.recentActions.slice(0, 10).map((action, index3) => {
|
|
70630
70713
|
const structured = parseStructuredResponse(action);
|
|
70631
|
-
return (0,
|
|
70714
|
+
return (0, import_jsx_runtime10.jsxs)("div", { className: "text-xs p-2 bg-gray-50 dark:bg-gray-800 rounded border", children: [(0, import_jsx_runtime10.jsx)("div", { className: `font-medium ${action.success ? "text-green-700 dark:text-green-300" : "text-red-700 dark:text-red-300"}`, children: structured?.decision || action.description }), (0, import_jsx_runtime10.jsx)("div", { className: "text-gray-600 dark:text-gray-400 mt-1", children: new Date(action.timestamp).toLocaleTimeString() }), action.error && (0, import_jsx_runtime10.jsx)("div", { className: "text-red-600 dark:text-red-400 mt-1", children: action.error })] }, `${action.id}-${index3}`);
|
|
70632
70715
|
}) })] })] });
|
|
70633
70716
|
}
|
|
70634
70717
|
var summary_view_default3 = SummaryView4;
|
|
70635
70718
|
|
|
70636
70719
|
// build/client/util.agent/inline-view.js
|
|
70637
|
-
var
|
|
70720
|
+
var import_jsx_runtime11 = __toESM(require_jsx_runtime());
|
|
70638
70721
|
function InlineView4({ state, config }) {
|
|
70639
70722
|
const recentDecision = state.recentActions.find((action) => {
|
|
70640
70723
|
if (action.type === "analysis" && action.result && typeof action.result === "object") {
|
|
@@ -70679,18 +70762,18 @@ function InlineView4({ state, config }) {
|
|
|
70679
70762
|
return "\u{1F916}";
|
|
70680
70763
|
}
|
|
70681
70764
|
};
|
|
70682
|
-
return (0,
|
|
70765
|
+
return (0, import_jsx_runtime11.jsx)("div", { id: `agent-${config.id}`, className: "p-3 space-y-2", children: (0, import_jsx_runtime11.jsxs)("div", { className: "w-80 grid grid-cols-[min-content,1fr] gap-x-3 gap-y-1 text-sm", children: [(0, import_jsx_runtime11.jsx)("div", { className: "font-medium", children: "Status:" }), (0, import_jsx_runtime11.jsxs)("div", { className: `flex items-center gap-2 ${getStatusColor(state.status, state.isRunning)}`, children: [(0, import_jsx_runtime11.jsx)("span", { children: getStatusIcon(state.status, state.isRunning) }), (0, import_jsx_runtime11.jsx)("span", { className: "capitalize", children: state.isRunning ? state.status : "stopped" })] }), (0, import_jsx_runtime11.jsx)("div", { className: "font-medium", children: "Cycles:" }), (0, import_jsx_runtime11.jsxs)("div", { className: "text-slate-700 dark:text-slate-300", children: [state.cyclesThisMinute, "/min \u2022 ", state.totalCycles, " total"] }), (0, import_jsx_runtime11.jsx)("div", { className: "font-medium", children: "Goal:" }), (0, import_jsx_runtime11.jsx)("div", { className: "text-slate-700 dark:text-slate-300 truncate", title: config.goal, children: config.goal }), recentDecision && (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [(0, import_jsx_runtime11.jsx)("div", { className: "font-medium", children: "Recent:" }), (0, import_jsx_runtime11.jsx)("div", { className: "text-slate-700 dark:text-slate-300 truncate", title: recentDecision.result && typeof recentDecision.result === "object" ? recentDecision.result.structured_response?.decision : recentDecision.description, children: recentDecision.result && typeof recentDecision.result === "object" ? recentDecision.result.structured_response?.decision : recentDecision.description })] }), (0, import_jsx_runtime11.jsx)("div", { className: "font-medium", children: "Components:" }), (0, import_jsx_runtime11.jsxs)("div", { className: "text-slate-700 dark:text-slate-300", children: [state.discoveredComponents.length, " discovered"] }), state.lastError && (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [(0, import_jsx_runtime11.jsx)("div", { className: "font-medium text-red-600", children: "Error:" }), (0, import_jsx_runtime11.jsx)("div", { className: "text-red-600 dark:text-red-400 truncate text-xs", title: state.lastError, children: state.lastError })] })] }) });
|
|
70683
70766
|
}
|
|
70684
70767
|
var inline_view_default3 = InlineView4;
|
|
70685
70768
|
|
|
70686
70769
|
// build/client/util.agent/fullscreen-view.js
|
|
70687
|
-
var
|
|
70770
|
+
var import_jsx_runtime12 = __toESM(require_jsx_runtime());
|
|
70688
70771
|
var React2 = __toESM(require_react());
|
|
70689
|
-
var
|
|
70772
|
+
var import_react11 = __toESM(require_react());
|
|
70690
70773
|
function FullscreenView2({ state, config, sendCommand, urls }) {
|
|
70691
|
-
const [memoryData, setMemoryData] = (0,
|
|
70692
|
-
const [loading, setLoading] = (0,
|
|
70693
|
-
const [activeTab, setActiveTab] = (0,
|
|
70774
|
+
const [memoryData, setMemoryData] = (0, import_react11.useState)({});
|
|
70775
|
+
const [loading, setLoading] = (0, import_react11.useState)(false);
|
|
70776
|
+
const [activeTab, setActiveTab] = (0, import_react11.useState)("status");
|
|
70694
70777
|
const fetchMemoryData = async () => {
|
|
70695
70778
|
setLoading(true);
|
|
70696
70779
|
try {
|
|
@@ -70744,43 +70827,43 @@ function FullscreenView2({ state, config, sendCommand, urls }) {
|
|
|
70744
70827
|
};
|
|
70745
70828
|
const formatValue = (value) => {
|
|
70746
70829
|
if (value === null || value === void 0) {
|
|
70747
|
-
return (0,
|
|
70830
|
+
return (0, import_jsx_runtime12.jsx)("div", { className: "text-sm text-gray-500 dark:text-gray-400 bg-white dark:bg-gray-800 p-2 rounded border", children: value === null ? "null" : "undefined" });
|
|
70748
70831
|
}
|
|
70749
70832
|
if (typeof value === "object") {
|
|
70750
|
-
return (0,
|
|
70833
|
+
return (0, import_jsx_runtime12.jsx)("pre", { className: "whitespace-pre-wrap text-sm text-gray-900 dark:text-gray-100 bg-white dark:bg-gray-800 p-2 rounded border", children: JSON.stringify(value, null, 2) });
|
|
70751
70834
|
}
|
|
70752
70835
|
if (typeof value === "string") {
|
|
70753
70836
|
const trimmed = value.trim();
|
|
70754
70837
|
if (trimmed.startsWith("{") || trimmed.startsWith("[")) {
|
|
70755
70838
|
try {
|
|
70756
70839
|
const parsed = JSON.parse(trimmed);
|
|
70757
|
-
return (0,
|
|
70840
|
+
return (0, import_jsx_runtime12.jsx)("pre", { className: "whitespace-pre-wrap text-sm text-gray-900 dark:text-gray-100 bg-white dark:bg-gray-800 p-2 rounded border", children: JSON.stringify(parsed, null, 2) });
|
|
70758
70841
|
} catch {
|
|
70759
70842
|
}
|
|
70760
70843
|
}
|
|
70761
|
-
return (0,
|
|
70844
|
+
return (0, import_jsx_runtime12.jsx)("div", { className: "text-sm text-gray-900 dark:text-gray-100 bg-white dark:bg-gray-800 p-2 rounded border whitespace-pre-wrap", children: value });
|
|
70762
70845
|
}
|
|
70763
|
-
return (0,
|
|
70846
|
+
return (0, import_jsx_runtime12.jsx)("div", { className: "text-sm text-gray-900 dark:text-gray-100 bg-white dark:bg-gray-800 p-2 rounded border", children: typeof value === "object" && value !== null ? JSON.stringify(value) : String(value) });
|
|
70764
70847
|
};
|
|
70765
70848
|
const renderMemoryData = (memoryObject) => {
|
|
70766
70849
|
if (!memoryObject || Object.keys(memoryObject).length === 0) {
|
|
70767
|
-
return (0,
|
|
70850
|
+
return (0, import_jsx_runtime12.jsx)("div", { className: "text-sm text-gray-600 dark:text-gray-400", children: "No memory data" });
|
|
70768
70851
|
}
|
|
70769
|
-
return (0,
|
|
70852
|
+
return (0, import_jsx_runtime12.jsx)("div", { className: "space-y-3", children: Object.entries(memoryObject).map(([key, value]) => (0, import_jsx_runtime12.jsxs)("div", { className: "border-b border-gray-200 dark:border-gray-700 pb-3", children: [(0, import_jsx_runtime12.jsx)("div", { className: "text-xs font-medium text-gray-600 dark:text-gray-400 mb-2", children: key }), (0, import_jsx_runtime12.jsx)("div", { className: "pl-2", children: formatValue(value) })] }, key)) });
|
|
70770
70853
|
};
|
|
70771
|
-
return (0,
|
|
70854
|
+
return (0, import_jsx_runtime12.jsxs)("div", { className: "h-full w-full bg-gray-50 dark:bg-gray-900 overflow-hidden flex flex-col", children: [(0, import_jsx_runtime12.jsxs)("div", { className: "bg-white dark:bg-gray-800 shadow-sm border-b border-gray-200 dark:border-gray-700 p-6", children: [(0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center justify-between", children: [(0, import_jsx_runtime12.jsxs)("div", { children: [(0, import_jsx_runtime12.jsxs)("h1", { className: "text-2xl font-bold text-gray-900 dark:text-gray-100", children: ["Agent: ", config.displayName] }), (0, import_jsx_runtime12.jsx)("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: config.goal })] }), (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center gap-4", children: [(0, import_jsx_runtime12.jsx)("div", { className: `px-4 py-2 rounded-lg font-medium ${getStatusColor(state.status, state.isRunning)}`, children: state.isRunning ? state.status : "stopped" }), (0, import_jsx_runtime12.jsxs)("div", { className: "flex gap-2", children: [(0, import_jsx_runtime12.jsx)("button", { onClick: () => {
|
|
70772
70855
|
if (state.isRunning) {
|
|
70773
70856
|
sendCommand({ type: "stop_agent" });
|
|
70774
70857
|
} else {
|
|
70775
70858
|
sendCommand({ type: "start_agent" });
|
|
70776
70859
|
}
|
|
70777
|
-
}, className: `px-4 py-2 rounded-lg font-medium text-white ${state.isRunning ? "bg-red-600 hover:bg-red-700" : "bg-green-600 hover:bg-green-700"}`, children: state.isRunning ? "Stop Agent" : "Start Agent" }), state.isRunning && (0,
|
|
70860
|
+
}, className: `px-4 py-2 rounded-lg font-medium text-white ${state.isRunning ? "bg-red-600 hover:bg-red-700" : "bg-green-600 hover:bg-green-700"}`, children: state.isRunning ? "Stop Agent" : "Start Agent" }), state.isRunning && (0, import_jsx_runtime12.jsx)("button", { onClick: () => sendCommand({ type: "pause_agent" }), className: "px-4 py-2 bg-yellow-600 hover:bg-yellow-700 text-white rounded-lg font-medium", children: "Pause" })] })] })] }), (0, import_jsx_runtime12.jsx)("div", { className: "mt-6 border-b border-gray-200 dark:border-gray-700", children: (0, import_jsx_runtime12.jsx)("nav", { className: "-mb-px flex space-x-8", children: ["status", "memory", "actions", "components"].map((tab) => (0, import_jsx_runtime12.jsx)("button", { onClick: () => setActiveTab(tab), className: `py-2 px-1 border-b-2 font-medium text-sm capitalize ${activeTab === tab ? "border-blue-500 text-blue-600 dark:text-blue-400" : "border-transparent text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"}`, children: tab }, tab)) }) })] }), (0, import_jsx_runtime12.jsxs)("div", { className: "flex-1 overflow-auto p-6", children: [activeTab === "status" && (0, import_jsx_runtime12.jsx)("div", { className: "max-w-6xl mx-auto", children: (0, import_jsx_runtime12.jsxs)("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6", children: [(0, import_jsx_runtime12.jsxs)("div", { className: "bg-white dark:bg-gray-800 rounded-lg p-6 shadow-sm border border-gray-200 dark:border-gray-700", children: [(0, import_jsx_runtime12.jsx)("h3", { className: "font-semibold text-lg mb-4 text-gray-900 dark:text-gray-100", children: "Agent Status" }), (0, import_jsx_runtime12.jsxs)("div", { className: "space-y-3", children: [(0, import_jsx_runtime12.jsxs)("div", { className: "grid grid-cols-2 gap-4", children: [(0, import_jsx_runtime12.jsxs)("div", { children: [(0, import_jsx_runtime12.jsx)("span", { className: "text-sm text-gray-600 dark:text-gray-400", children: "Running:" }), (0, import_jsx_runtime12.jsx)("div", { className: "font-medium", children: state.isRunning ? "\u2705 Yes" : "\u274C No" })] }), (0, import_jsx_runtime12.jsxs)("div", { children: [(0, import_jsx_runtime12.jsx)("span", { className: "text-sm text-gray-600 dark:text-gray-400", children: "Status:" }), (0, import_jsx_runtime12.jsx)("div", { className: "font-medium capitalize", children: state.status })] }), (0, import_jsx_runtime12.jsxs)("div", { children: [(0, import_jsx_runtime12.jsx)("span", { className: "text-sm text-gray-600 dark:text-gray-400", children: "Cycles/Min:" }), (0, import_jsx_runtime12.jsx)("div", { className: "font-medium", children: state.cyclesThisMinute })] }), (0, import_jsx_runtime12.jsxs)("div", { children: [(0, import_jsx_runtime12.jsx)("span", { className: "text-sm text-gray-600 dark:text-gray-400", children: "Total Cycles:" }), (0, import_jsx_runtime12.jsx)("div", { className: "font-medium", children: state.totalCycles })] })] }), state.lastError && (0, import_jsx_runtime12.jsxs)("div", { className: "mt-4 p-3 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded", children: [(0, import_jsx_runtime12.jsx)("span", { className: "text-sm font-medium text-red-800 dark:text-red-200", children: "Last Error:" }), (0, import_jsx_runtime12.jsx)("div", { className: "text-sm text-red-700 dark:text-red-300 mt-1", children: state.lastError })] })] })] }), (0, import_jsx_runtime12.jsxs)("div", { className: "bg-white dark:bg-gray-800 rounded-lg p-6 shadow-sm border border-gray-200 dark:border-gray-700", children: [(0, import_jsx_runtime12.jsx)("h3", { className: "font-semibold text-lg mb-4 text-gray-900 dark:text-gray-100", children: "Current Task" }), state.currentTask ? (0, import_jsx_runtime12.jsxs)("div", { className: "space-y-2", children: [(0, import_jsx_runtime12.jsx)("div", { className: "font-medium text-gray-900 dark:text-gray-100", children: state.currentTask.description }), (0, import_jsx_runtime12.jsx)("div", { className: `inline-flex px-2 py-1 text-xs font-semibold rounded-full ${state.currentTask.status === "completed" ? "bg-green-100 text-green-800 dark:bg-green-900/20 dark:text-green-300" : state.currentTask.status === "failed" ? "bg-red-100 text-red-800 dark:bg-red-900/20 dark:text-red-300" : state.currentTask.status === "in_progress" ? "bg-blue-100 text-blue-800 dark:bg-blue-900/20 dark:text-blue-300" : "bg-gray-100 text-gray-800 dark:bg-gray-900/20 dark:text-gray-300"}`, children: state.currentTask.status.replace("_", " ") }), (0, import_jsx_runtime12.jsxs)("div", { className: "text-sm text-gray-600 dark:text-gray-400", children: ["Created: ", new Date(state.currentTask.createdAt).toLocaleString()] })] }) : (0, import_jsx_runtime12.jsx)("div", { className: "text-gray-600 dark:text-gray-400", children: "No active task" })] })] }) }), activeTab === "memory" && (0, import_jsx_runtime12.jsxs)("div", { className: "max-w-6xl mx-auto space-y-6", children: [(0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center justify-between", children: [(0, import_jsx_runtime12.jsx)("h3", { className: "font-semibold text-lg text-gray-900 dark:text-gray-100", children: "Memory State" }), (0, import_jsx_runtime12.jsx)("button", { onClick: () => void fetchMemoryData(), disabled: loading, className: "px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg disabled:opacity-50", children: loading ? "Loading..." : "Refresh Memory" })] }), (0, import_jsx_runtime12.jsxs)("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6", children: [(0, import_jsx_runtime12.jsxs)("div", { className: "bg-white dark:bg-gray-800 rounded-lg p-6 shadow-sm border border-gray-200 dark:border-gray-700", children: [(0, import_jsx_runtime12.jsx)("h4", { className: "font-medium text-lg mb-3 text-gray-900 dark:text-gray-100", children: "Working Memory" }), (0, import_jsx_runtime12.jsx)("div", { className: "bg-gray-50 dark:bg-gray-900 p-4 rounded border max-h-96 overflow-y-auto", children: renderMemoryData(memoryData.working) })] }), (0, import_jsx_runtime12.jsxs)("div", { className: "bg-white dark:bg-gray-800 rounded-lg p-6 shadow-sm border border-gray-200 dark:border-gray-700", children: [(0, import_jsx_runtime12.jsx)("h4", { className: "font-medium text-lg mb-3 text-gray-900 dark:text-gray-100", children: "Persistent Memory" }), (0, import_jsx_runtime12.jsx)("div", { className: "bg-gray-50 dark:bg-gray-900 p-4 rounded border max-h-96 overflow-y-auto", children: renderMemoryData(memoryData.persistent) })] })] })] }), activeTab === "actions" && (0, import_jsx_runtime12.jsxs)("div", { className: "max-w-6xl mx-auto space-y-4", children: [(0, import_jsx_runtime12.jsx)("h3", { className: "font-semibold text-lg text-gray-900 dark:text-gray-100", children: "Recent Actions" }), (0, import_jsx_runtime12.jsx)("div", { className: "space-y-3", children: state.recentActions.slice(0, 20).map((action, index3) => {
|
|
70778
70861
|
const structured = parseStructuredResponse(action);
|
|
70779
70862
|
const isCycleStart = action.type === "analysis" && (action.description?.includes("cycle") || action.description?.includes("Initialization"));
|
|
70780
70863
|
const prevAction = index3 > 0 ? state.recentActions[index3 - 1] : null;
|
|
70781
70864
|
const showCycleBoundary = isCycleStart && prevAction;
|
|
70782
|
-
return (0,
|
|
70783
|
-
}) })] }), activeTab === "components" && (0,
|
|
70865
|
+
return (0, import_jsx_runtime12.jsxs)("div", { children: [showCycleBoundary && (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center my-6", children: [(0, import_jsx_runtime12.jsx)("div", { className: "flex-1 border-t border-gray-300 dark:border-gray-600" }), (0, import_jsx_runtime12.jsx)("div", { className: "px-4 text-sm font-medium text-gray-600 dark:text-gray-400 bg-gray-50 dark:bg-gray-800 rounded-full border border-gray-300 dark:border-gray-600", children: action.description?.includes("Initialization") ? "INITIALIZATION CYCLE" : "NEW DECISION CYCLE" }), (0, import_jsx_runtime12.jsx)("div", { className: "flex-1 border-t border-gray-300 dark:border-gray-600" })] }), (0, import_jsx_runtime12.jsxs)("div", { className: `bg-white dark:bg-gray-800 rounded-lg p-4 shadow-sm border border-gray-200 dark:border-gray-700 ${isCycleStart ? "border-l-4 border-l-blue-500 dark:border-l-blue-400" : ""}`, children: [(0, import_jsx_runtime12.jsx)("div", { className: "flex items-start justify-between mb-2", children: (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center gap-3", children: [(0, import_jsx_runtime12.jsx)("span", { className: `inline-flex px-2 py-1 text-xs font-semibold rounded-full ${action.success ? "bg-green-100 text-green-800 dark:bg-green-900/20 dark:text-green-300" : "bg-red-100 text-red-800 dark:bg-red-900/20 dark:text-red-300"}`, children: action.type.replace("_", " ") }), (0, import_jsx_runtime12.jsx)("span", { className: "text-sm text-gray-600 dark:text-gray-400", children: new Date(action.timestamp).toLocaleString() }), isCycleStart && (0, import_jsx_runtime12.jsx)("span", { className: "inline-flex px-2 py-1 text-xs font-semibold rounded-full bg-blue-100 text-blue-800 dark:bg-blue-900/20 dark:text-blue-300", children: "CYCLE START" })] }) }), (0, import_jsx_runtime12.jsx)("div", { className: "text-gray-900 dark:text-gray-100 font-medium mb-1", children: structured?.decision || action.description }), structured?.why && (0, import_jsx_runtime12.jsxs)("div", { className: "text-sm text-gray-600 dark:text-gray-400 mb-2", children: [(0, import_jsx_runtime12.jsx)("strong", { children: "Why:" }), " ", structured.why] }), action.parameters && Object.keys(action.parameters).length > 0 && (0, import_jsx_runtime12.jsxs)("div", { className: "text-sm text-gray-600 dark:text-gray-400 mb-2", children: [(0, import_jsx_runtime12.jsx)("strong", { children: "Parameters:" }), (0, import_jsx_runtime12.jsx)("div", { className: "mt-1 pl-2", children: formatValue(action.parameters) })] }), action.result && (0, import_jsx_runtime12.jsxs)("div", { className: "text-sm text-gray-600 dark:text-gray-400 mb-2", children: [(0, import_jsx_runtime12.jsx)("strong", { children: "Result:" }), (0, import_jsx_runtime12.jsx)("div", { className: "mt-1 pl-2", children: formatValue(action.result) })] }), action.error && (0, import_jsx_runtime12.jsxs)("div", { className: "text-sm text-red-600 dark:text-red-400 bg-red-50 dark:bg-red-900/20 p-2 rounded mt-2", children: [(0, import_jsx_runtime12.jsx)("strong", { children: "Error:" }), " ", action.error] })] })] }, `${action.id}-${index3}`);
|
|
70866
|
+
}) })] }), activeTab === "components" && (0, import_jsx_runtime12.jsxs)("div", { className: "max-w-6xl mx-auto space-y-4", children: [(0, import_jsx_runtime12.jsx)("h3", { className: "font-semibold text-lg text-gray-900 dark:text-gray-100", children: "Discovered Components" }), (0, import_jsx_runtime12.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4", children: [state.discoveredComponents.map((component) => (0, import_jsx_runtime12.jsxs)("div", { className: "bg-white dark:bg-gray-800 rounded-lg p-4 shadow-sm border border-gray-200 dark:border-gray-700", children: [(0, import_jsx_runtime12.jsx)("div", { className: "font-medium text-gray-900 dark:text-gray-100", children: component.id }), (0, import_jsx_runtime12.jsx)("div", { className: "text-sm text-gray-600 dark:text-gray-400 mb-2", children: component.type }), (0, import_jsx_runtime12.jsxs)("div", { className: "text-xs", children: [(0, import_jsx_runtime12.jsx)("span", { className: "text-gray-600 dark:text-gray-400", children: "Capabilities:" }), (0, import_jsx_runtime12.jsx)("div", { className: "flex flex-wrap gap-1 mt-1", children: component.capabilities.map((capability, index3) => (0, import_jsx_runtime12.jsx)("span", { className: "inline-flex px-1 py-0.5 bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 rounded text-xs", children: capability }, index3)) })] })] }, component.id)), state.discoveredComponents.length === 0 && (0, import_jsx_runtime12.jsx)("div", { className: "col-span-full text-center text-gray-600 dark:text-gray-400 py-8", children: "No components discovered yet" })] })] })] })] });
|
|
70784
70867
|
}
|
|
70785
70868
|
var fullscreen_view_default = FullscreenView2;
|
|
70786
70869
|
|
|
@@ -70922,17 +71005,17 @@ function assertUnreachable4(_) {
|
|
|
70922
71005
|
}
|
|
70923
71006
|
|
|
70924
71007
|
// build/client/util.aiChat/summary-view.js
|
|
70925
|
-
var
|
|
70926
|
-
var
|
|
71008
|
+
var import_jsx_runtime13 = __toESM(require_jsx_runtime());
|
|
71009
|
+
var import_react12 = __toESM(require_react());
|
|
70927
71010
|
function SummaryView5({ state, config: _config, sendCommand }) {
|
|
70928
|
-
const [inputMessage, setInputMessage] = (0,
|
|
70929
|
-
const [isSubmitting, setIsSubmitting] = (0,
|
|
70930
|
-
const messagesEndRef = (0,
|
|
70931
|
-
const inputRef = (0,
|
|
70932
|
-
(0,
|
|
71011
|
+
const [inputMessage, setInputMessage] = (0, import_react12.useState)("");
|
|
71012
|
+
const [isSubmitting, setIsSubmitting] = (0, import_react12.useState)(false);
|
|
71013
|
+
const messagesEndRef = (0, import_react12.useRef)(null);
|
|
71014
|
+
const inputRef = (0, import_react12.useRef)(null);
|
|
71015
|
+
(0, import_react12.useEffect)(() => {
|
|
70933
71016
|
messagesEndRef.current?.scrollIntoView({ behavior: "smooth" });
|
|
70934
71017
|
}, [state.messages]);
|
|
70935
|
-
(0,
|
|
71018
|
+
(0, import_react12.useEffect)(() => {
|
|
70936
71019
|
inputRef.current?.focus();
|
|
70937
71020
|
}, []);
|
|
70938
71021
|
const handleSendMessage = () => {
|
|
@@ -70961,10 +71044,10 @@ function SummaryView5({ state, config: _config, sendCommand }) {
|
|
|
70961
71044
|
const isUser = message.role === "user";
|
|
70962
71045
|
const isSystem = message.role === "system";
|
|
70963
71046
|
const hasError = !!message.error;
|
|
70964
|
-
return (0,
|
|
71047
|
+
return (0, import_jsx_runtime13.jsxs)("div", { className: `message ${isUser ? "user" : isSystem ? "system" : "assistant"} ${hasError ? "error" : ""}`, children: [(0, import_jsx_runtime13.jsxs)("div", { className: "message-header", children: [(0, import_jsx_runtime13.jsx)("span", { className: "message-role", children: message.role }), (0, import_jsx_runtime13.jsx)("span", { className: "message-time", children: formatTimestamp(message.timestamp) })] }), (0, import_jsx_runtime13.jsx)("div", { className: "message-content", children: message.content }), message.toolCalls && message.toolCalls.length > 0 && (0, import_jsx_runtime13.jsxs)("div", { className: "tool-calls", children: [(0, import_jsx_runtime13.jsx)("div", { className: "tool-calls-header", children: "Tool Calls:" }), message.toolCalls.map((call, index3) => (0, import_jsx_runtime13.jsxs)("div", { className: "tool-call", children: [(0, import_jsx_runtime13.jsx)("span", { className: "tool-name", children: call.name }), (0, import_jsx_runtime13.jsx)("pre", { className: "tool-args", children: JSON.stringify(call.arguments, null, 2) })] }, index3))] }), hasError && (0, import_jsx_runtime13.jsxs)("div", { className: "message-error", children: ["Error: ", message.error] })] }, message.id);
|
|
70965
71048
|
};
|
|
70966
71049
|
const visibleMessages = state.messages?.filter((msg) => msg.role !== "system") || [];
|
|
70967
|
-
return (0,
|
|
71050
|
+
return (0, import_jsx_runtime13.jsx)("div", { className: "util-aiChat", children: (0, import_jsx_runtime13.jsxs)("div", { className: "chat-container", children: [(0, import_jsx_runtime13.jsxs)("div", { className: "chat-header", children: [(0, import_jsx_runtime13.jsxs)("div", { className: "provider-info", children: [(0, import_jsx_runtime13.jsxs)("span", { className: `provider-status ${state.providerAvailable ? "available" : "unavailable"}`, children: [state.currentProvider, " ", state.providerAvailable ? "\u25CF" : "\u25CB"] }), state.lastError && (0, import_jsx_runtime13.jsx)("span", { className: "error-indicator", title: state.lastError, children: "\u26A0\uFE0F" })] }), (0, import_jsx_runtime13.jsx)("div", { className: "chat-controls", children: (0, import_jsx_runtime13.jsx)("button", { className: "reset-button", onClick: () => void handleReset(), disabled: state.isThinking || visibleMessages.length === 0, children: "Reset" }) })] }), (0, import_jsx_runtime13.jsxs)("div", { className: "messages-container", children: [!state.providerAvailable && (0, import_jsx_runtime13.jsx)("div", { className: "system-notice", children: (0, import_jsx_runtime13.jsxs)("div", { className: "notice-content", children: [(0, import_jsx_runtime13.jsx)("h3", { children: "LLM Service Unavailable" }), (0, import_jsx_runtime13.jsx)("p", { children: "The AI chat service is not configured or unavailable." }), (0, import_jsx_runtime13.jsxs)("p", { children: ["Provider: ", (0, import_jsx_runtime13.jsx)("code", { children: state.currentProvider })] }), (0, import_jsx_runtime13.jsx)("p", { children: "Please check your LLM configuration." })] }) }), visibleMessages.length === 0 && state.providerAvailable && (0, import_jsx_runtime13.jsx)("div", { className: "empty-state", children: (0, import_jsx_runtime13.jsx)("p", { children: "No messages yet. Start a conversation below!" }) }), visibleMessages.map(renderMessage), state.isThinking && (0, import_jsx_runtime13.jsx)("div", { className: "thinking-indicator", children: (0, import_jsx_runtime13.jsxs)("div", { className: "message assistant thinking", children: [(0, import_jsx_runtime13.jsx)("div", { className: "message-header", children: (0, import_jsx_runtime13.jsx)("span", { className: "message-role", children: "assistant" }) }), (0, import_jsx_runtime13.jsx)("div", { className: "message-content", children: (0, import_jsx_runtime13.jsxs)("div", { className: "typing-dots", children: [(0, import_jsx_runtime13.jsx)("span", {}), (0, import_jsx_runtime13.jsx)("span", {}), (0, import_jsx_runtime13.jsx)("span", {})] }) })] }) }), (0, import_jsx_runtime13.jsx)("div", { ref: messagesEndRef })] }), (0, import_jsx_runtime13.jsx)("div", { className: "chat-input-container", children: (0, import_jsx_runtime13.jsxs)("div", { className: "input-wrapper", children: [(0, import_jsx_runtime13.jsx)("textarea", { ref: inputRef, className: "message-input", value: inputMessage, onChange: (e) => setInputMessage(e.target.value), onKeyDown: handleKeyDown, placeholder: state.providerAvailable ? "Type your message... (Enter to send, Shift+Enter for new line)" : "LLM service unavailable", disabled: !state.providerAvailable || state.isThinking || isSubmitting, rows: 1 }), (0, import_jsx_runtime13.jsx)("button", { className: "send-button", onClick: handleSendMessage, disabled: !inputMessage.trim() || !state.providerAvailable || state.isThinking || isSubmitting, children: "Send" })] }) })] }) });
|
|
70968
71051
|
}
|
|
70969
71052
|
var summary_view_default4 = SummaryView5;
|
|
70970
71053
|
|
|
@@ -71057,8 +71140,8 @@ function assertUnreachable5(_) {
|
|
|
71057
71140
|
}
|
|
71058
71141
|
|
|
71059
71142
|
// build/client/util.timestamps/inline-view.js
|
|
71060
|
-
var
|
|
71061
|
-
var
|
|
71143
|
+
var import_jsx_runtime14 = __toESM(require_jsx_runtime());
|
|
71144
|
+
var import_react13 = __toESM(require_react());
|
|
71062
71145
|
|
|
71063
71146
|
// ../../node_modules/@kurkle/color/dist/color.esm.js
|
|
71064
71147
|
function round2(v) {
|
|
@@ -85532,9 +85615,9 @@ var auto_default = Chart;
|
|
|
85532
85615
|
|
|
85533
85616
|
// build/client/util.timestamps/inline-view.js
|
|
85534
85617
|
function InlineView5({ state, config: _2 }) {
|
|
85535
|
-
const chartContainer = (0,
|
|
85536
|
-
const [chartControl, setChartControl] = (0,
|
|
85537
|
-
(0,
|
|
85618
|
+
const chartContainer = (0, import_react13.useRef)(null);
|
|
85619
|
+
const [chartControl, setChartControl] = (0, import_react13.useState)(void 0);
|
|
85620
|
+
(0, import_react13.useEffect)(() => {
|
|
85538
85621
|
if (!chartContainer.current)
|
|
85539
85622
|
return;
|
|
85540
85623
|
if (state.timestamps.length < 2)
|
|
@@ -85596,7 +85679,7 @@ function InlineView5({ state, config: _2 }) {
|
|
|
85596
85679
|
chart.update();
|
|
85597
85680
|
}, 100);
|
|
85598
85681
|
}, [chartContainer]);
|
|
85599
|
-
(0,
|
|
85682
|
+
(0, import_react13.useEffect)(() => {
|
|
85600
85683
|
if (!chartControl)
|
|
85601
85684
|
return;
|
|
85602
85685
|
chartControl.data = {
|
|
@@ -85621,7 +85704,7 @@ function InlineView5({ state, config: _2 }) {
|
|
|
85621
85704
|
}, [state]);
|
|
85622
85705
|
{
|
|
85623
85706
|
}
|
|
85624
|
-
return (0,
|
|
85707
|
+
return (0, import_jsx_runtime14.jsx)("div", { className: "util-timestamp", children: (0, import_jsx_runtime14.jsx)("div", { className: "bg-gray-50 dark:bg-gray-700 rounded", style: { width: "360px", height: "200px", padding: "10px" }, children: (0, import_jsx_runtime14.jsx)("canvas", { className: "bg-gray-50 dark:bg-gray-700 rounded", ref: chartContainer }) }) });
|
|
85625
85708
|
}
|
|
85626
85709
|
var inline_view_default4 = InlineView5;
|
|
85627
85710
|
|