@almadar/ui 4.54.4 → 4.54.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/avl/index.cjs +384 -284
- package/dist/avl/index.d.cts +48 -2
- package/dist/avl/index.js +384 -284
- package/dist/components/index.cjs +29 -28
- package/dist/components/index.js +29 -28
- package/dist/components/molecules/avl/TraitCardNode.d.ts +31 -0
- package/dist/components/molecules/avl/avl-preview-converter.d.ts +18 -0
- package/dist/components/molecules/avl/avl-preview-types.d.ts +41 -1
- package/dist/components/organisms/avl/FlowCanvas.d.ts +1 -1
- package/dist/components/organisms/avl/avl-zoom-state.d.ts +12 -0
- package/dist/components/organisms/game/three/index.cjs +18 -1
- package/dist/components/organisms/game/three/index.js +18 -1
- package/dist/providers/index.cjs +29 -28
- package/dist/providers/index.js +29 -28
- package/dist/runtime/index.cjs +29 -28
- package/dist/runtime/index.js +29 -28
- package/package.json +1 -1
|
@@ -7344,36 +7344,37 @@ var init_Popover = __esm({
|
|
|
7344
7344
|
...triggerProps
|
|
7345
7345
|
}
|
|
7346
7346
|
);
|
|
7347
|
+
const panel = isOpen && triggerRect ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7348
|
+
"div",
|
|
7349
|
+
{
|
|
7350
|
+
ref: popoverRef,
|
|
7351
|
+
className: cn(
|
|
7352
|
+
"fixed z-50 p-4",
|
|
7353
|
+
"bg-card border-2 border-border shadow-lg",
|
|
7354
|
+
positionClasses2[position],
|
|
7355
|
+
className
|
|
7356
|
+
),
|
|
7357
|
+
style: computePopoverStyle(position, triggerRect, popoverWidth),
|
|
7358
|
+
role: "dialog",
|
|
7359
|
+
onMouseEnter: trigger === "hover" ? handleOpen : void 0,
|
|
7360
|
+
onMouseLeave: trigger === "hover" ? handleClose : void 0,
|
|
7361
|
+
children: [
|
|
7362
|
+
typeof content === "string" ? /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "body", children: content }) : content,
|
|
7363
|
+
showArrow && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7364
|
+
"div",
|
|
7365
|
+
{
|
|
7366
|
+
className: cn(
|
|
7367
|
+
"absolute w-0 h-0 border-4",
|
|
7368
|
+
arrowClasses2[position]
|
|
7369
|
+
)
|
|
7370
|
+
}
|
|
7371
|
+
)
|
|
7372
|
+
]
|
|
7373
|
+
}
|
|
7374
|
+
) : null;
|
|
7347
7375
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
7348
7376
|
triggerElement,
|
|
7349
|
-
|
|
7350
|
-
"div",
|
|
7351
|
-
{
|
|
7352
|
-
ref: popoverRef,
|
|
7353
|
-
className: cn(
|
|
7354
|
-
"fixed z-50 p-4",
|
|
7355
|
-
"bg-card border-2 border-border shadow-lg",
|
|
7356
|
-
positionClasses2[position],
|
|
7357
|
-
className
|
|
7358
|
-
),
|
|
7359
|
-
style: computePopoverStyle(position, triggerRect, popoverWidth),
|
|
7360
|
-
role: "dialog",
|
|
7361
|
-
onMouseEnter: trigger === "hover" ? handleOpen : void 0,
|
|
7362
|
-
onMouseLeave: trigger === "hover" ? handleClose : void 0,
|
|
7363
|
-
children: [
|
|
7364
|
-
typeof content === "string" ? /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "body", children: content }) : content,
|
|
7365
|
-
showArrow && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7366
|
-
"div",
|
|
7367
|
-
{
|
|
7368
|
-
className: cn(
|
|
7369
|
-
"absolute w-0 h-0 border-4",
|
|
7370
|
-
arrowClasses2[position]
|
|
7371
|
-
)
|
|
7372
|
-
}
|
|
7373
|
-
)
|
|
7374
|
-
]
|
|
7375
|
-
}
|
|
7376
|
-
)
|
|
7377
|
+
panel && typeof document !== "undefined" ? reactDom.createPortal(panel, document.body) : panel
|
|
7377
7378
|
] });
|
|
7378
7379
|
};
|
|
7379
7380
|
exports.Popover.displayName = "Popover";
|
package/dist/components/index.js
CHANGED
|
@@ -7298,36 +7298,37 @@ var init_Popover = __esm({
|
|
|
7298
7298
|
...triggerProps
|
|
7299
7299
|
}
|
|
7300
7300
|
);
|
|
7301
|
+
const panel = isOpen && triggerRect ? /* @__PURE__ */ jsxs(
|
|
7302
|
+
"div",
|
|
7303
|
+
{
|
|
7304
|
+
ref: popoverRef,
|
|
7305
|
+
className: cn(
|
|
7306
|
+
"fixed z-50 p-4",
|
|
7307
|
+
"bg-card border-2 border-border shadow-lg",
|
|
7308
|
+
positionClasses2[position],
|
|
7309
|
+
className
|
|
7310
|
+
),
|
|
7311
|
+
style: computePopoverStyle(position, triggerRect, popoverWidth),
|
|
7312
|
+
role: "dialog",
|
|
7313
|
+
onMouseEnter: trigger === "hover" ? handleOpen : void 0,
|
|
7314
|
+
onMouseLeave: trigger === "hover" ? handleClose : void 0,
|
|
7315
|
+
children: [
|
|
7316
|
+
typeof content === "string" ? /* @__PURE__ */ jsx(Typography, { variant: "body", children: content }) : content,
|
|
7317
|
+
showArrow && /* @__PURE__ */ jsx(
|
|
7318
|
+
"div",
|
|
7319
|
+
{
|
|
7320
|
+
className: cn(
|
|
7321
|
+
"absolute w-0 h-0 border-4",
|
|
7322
|
+
arrowClasses2[position]
|
|
7323
|
+
)
|
|
7324
|
+
}
|
|
7325
|
+
)
|
|
7326
|
+
]
|
|
7327
|
+
}
|
|
7328
|
+
) : null;
|
|
7301
7329
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
7302
7330
|
triggerElement,
|
|
7303
|
-
|
|
7304
|
-
"div",
|
|
7305
|
-
{
|
|
7306
|
-
ref: popoverRef,
|
|
7307
|
-
className: cn(
|
|
7308
|
-
"fixed z-50 p-4",
|
|
7309
|
-
"bg-card border-2 border-border shadow-lg",
|
|
7310
|
-
positionClasses2[position],
|
|
7311
|
-
className
|
|
7312
|
-
),
|
|
7313
|
-
style: computePopoverStyle(position, triggerRect, popoverWidth),
|
|
7314
|
-
role: "dialog",
|
|
7315
|
-
onMouseEnter: trigger === "hover" ? handleOpen : void 0,
|
|
7316
|
-
onMouseLeave: trigger === "hover" ? handleClose : void 0,
|
|
7317
|
-
children: [
|
|
7318
|
-
typeof content === "string" ? /* @__PURE__ */ jsx(Typography, { variant: "body", children: content }) : content,
|
|
7319
|
-
showArrow && /* @__PURE__ */ jsx(
|
|
7320
|
-
"div",
|
|
7321
|
-
{
|
|
7322
|
-
className: cn(
|
|
7323
|
-
"absolute w-0 h-0 border-4",
|
|
7324
|
-
arrowClasses2[position]
|
|
7325
|
-
)
|
|
7326
|
-
}
|
|
7327
|
-
)
|
|
7328
|
-
]
|
|
7329
|
-
}
|
|
7330
|
-
)
|
|
7331
|
+
panel && typeof document !== "undefined" ? createPortal(panel, document.body) : panel
|
|
7331
7332
|
] });
|
|
7332
7333
|
};
|
|
7333
7334
|
Popover.displayName = "Popover";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TraitCardNode — React Flow node for the `trait-expanded` view level.
|
|
3
|
+
*
|
|
4
|
+
* Renders one card per trait of a single orbital. Header shows the trait
|
|
5
|
+
* name + linked entity badge; body lists the trait's transitions as
|
|
6
|
+
* clickable rows that drill into L4 transition detail; left edge has
|
|
7
|
+
* one target handle per `listens[]` event; right edge has one source
|
|
8
|
+
* handle per `emits[]` event. The edges produced by
|
|
9
|
+
* `orbitalToTraitGraph` connect emit handles to listen handles where
|
|
10
|
+
* the event names match.
|
|
11
|
+
*
|
|
12
|
+
* Transition-row clicks bubble through `TraitCardSelectionContext`
|
|
13
|
+
* (mirrors `PatternSelectionContext` in `OrbPreviewNode`). FlowCanvas
|
|
14
|
+
* wraps the canvas in a provider that translates the context callback
|
|
15
|
+
* into its `onNodeClick({ level: 'transition', ... })` prop.
|
|
16
|
+
*/
|
|
17
|
+
import React from 'react';
|
|
18
|
+
import { type NodeProps } from '@xyflow/react';
|
|
19
|
+
export interface TraitCardTransitionClick {
|
|
20
|
+
orbitalName: string;
|
|
21
|
+
traitName: string;
|
|
22
|
+
transitionEvent: string;
|
|
23
|
+
fromState: string;
|
|
24
|
+
toState: string;
|
|
25
|
+
index: number;
|
|
26
|
+
}
|
|
27
|
+
export interface TraitCardSelectionContextValue {
|
|
28
|
+
selectTransition: (sel: TraitCardTransitionClick) => void;
|
|
29
|
+
}
|
|
30
|
+
export declare const TraitCardSelectionContext: React.Context<TraitCardSelectionContextValue>;
|
|
31
|
+
export declare const TraitCardNode: React.NamedExoticComponent<NodeProps>;
|
|
@@ -51,3 +51,21 @@ export declare function orbitalAliasToExpandedGraph(schema: OrbitalSchema, orbit
|
|
|
51
51
|
nodes: Node<PreviewNodeData>[];
|
|
52
52
|
edges: Edge<EventEdgeData>[];
|
|
53
53
|
};
|
|
54
|
+
/**
|
|
55
|
+
* Build a React Flow graph for the `trait-expanded` level: one node per
|
|
56
|
+
* trait of `orbitalName`, with intra-orbital `emits → listens` edges
|
|
57
|
+
* between trait cards (an emit on trait A connects to a listen for the
|
|
58
|
+
* same event on trait B in the same orbital).
|
|
59
|
+
*
|
|
60
|
+
* Used by the cosmic tab at L3 (after the user drills into an orbital
|
|
61
|
+
* from the L1 grid). The canvas tab does not call this today; the new
|
|
62
|
+
* level is opt-in via `initialLevel="trait-expanded"`.
|
|
63
|
+
*
|
|
64
|
+
* Layout: grid (`ceil(sqrt(N))` cols). Nodes are `type: 'traitCard'`
|
|
65
|
+
* with `data.kind === 'trait-card'` so `FlowCanvas`'s NODE_TYPES routes
|
|
66
|
+
* them to `TraitCardNode`.
|
|
67
|
+
*/
|
|
68
|
+
export declare function orbitalToTraitGraph(schema: OrbitalSchema, orbitalName: string, _mockData?: Record<string, unknown[]>): {
|
|
69
|
+
nodes: Node<PreviewNodeData>[];
|
|
70
|
+
edges: Edge<EventEdgeData>[];
|
|
71
|
+
};
|
|
@@ -18,8 +18,12 @@ import type { Expression, UISlot } from '@almadar/core';
|
|
|
18
18
|
* - `behavior-expanded` (L3) — drilled into a single imported behavior at
|
|
19
19
|
* L2: one card per transition of THAT behavior. Used to inspect what an
|
|
20
20
|
* import contributes without leaving the canvas.
|
|
21
|
+
* - `trait-expanded` — one card per trait of a single orbital, connected
|
|
22
|
+
* by intra-orbital `emits → listens` edges. Used by the cosmic tab to
|
|
23
|
+
* render the trait-level circuit when the user drills into an orbital
|
|
24
|
+
* from the L1 grid. Not used by the canvas tab today.
|
|
21
25
|
*/
|
|
22
|
-
export type ViewLevel = 'overview' | 'expanded' | 'behavior-expanded';
|
|
26
|
+
export type ViewLevel = 'overview' | 'expanded' | 'behavior-expanded' | 'trait-expanded';
|
|
23
27
|
/**
|
|
24
28
|
* Screen size preset for OrbPreview rendering inside nodes.
|
|
25
29
|
*
|
|
@@ -162,6 +166,42 @@ export interface PreviewNodeData extends Record<string, unknown> {
|
|
|
162
166
|
* card. Renderer can surface it as a "+N screens" badge.
|
|
163
167
|
*/
|
|
164
168
|
transitionCount?: number;
|
|
169
|
+
/**
|
|
170
|
+
* Discriminator for the node variant. Absent on overview/expanded/
|
|
171
|
+
* behavior-expanded cards (those use field-presence-based discrimination
|
|
172
|
+
* via `behaviorAlias`/`transitionEvent`). Set to `'trait-card'` for nodes
|
|
173
|
+
* produced by `orbitalToTraitGraph` so renderers can branch cleanly.
|
|
174
|
+
*/
|
|
175
|
+
kind?: 'trait-card';
|
|
176
|
+
/**
|
|
177
|
+
* Trait-card transitions (`kind === 'trait-card'` only). One row per
|
|
178
|
+
* transition; each row is clickable and drills to L4 transition detail
|
|
179
|
+
* in cosmic. `event` is the trigger; `fromState` / `toState` mirror the
|
|
180
|
+
* underlying state-machine edge.
|
|
181
|
+
*/
|
|
182
|
+
transitions?: Array<{
|
|
183
|
+
event: string;
|
|
184
|
+
fromState: string;
|
|
185
|
+
toState: string;
|
|
186
|
+
}>;
|
|
187
|
+
/**
|
|
188
|
+
* Trait-card `emits` event names (`kind === 'trait-card'` only). One
|
|
189
|
+
* source handle per entry on the right edge of the card. Drives the
|
|
190
|
+
* outgoing wire endpoints in `orbitalToTraitGraph`.
|
|
191
|
+
*/
|
|
192
|
+
emits?: string[];
|
|
193
|
+
/**
|
|
194
|
+
* Trait-card `listens` event names (`kind === 'trait-card'` only). One
|
|
195
|
+
* target handle per entry on the left edge of the card. Drives the
|
|
196
|
+
* incoming wire endpoints in `orbitalToTraitGraph`.
|
|
197
|
+
*/
|
|
198
|
+
listens?: string[];
|
|
199
|
+
/**
|
|
200
|
+
* Trait-card `linkedEntity` (`kind === 'trait-card'` only). Surfaced as a
|
|
201
|
+
* subtitle/badge next to the trait name so users can see what entity the
|
|
202
|
+
* trait operates on. Mirrors `Trait.linkedEntity` from the resolved schema.
|
|
203
|
+
*/
|
|
204
|
+
linkedEntity?: string;
|
|
165
205
|
}
|
|
166
206
|
/** Data for event flow edges. */
|
|
167
207
|
export interface EventEdgeData extends Record<string, unknown> {
|
|
@@ -4,6 +4,12 @@
|
|
|
4
4
|
* useReducer-based state machine managing which zoom level is displayed,
|
|
5
5
|
* what is selected, and animation state.
|
|
6
6
|
*
|
|
7
|
+
* Shared by AvlOrbitalsCosmicZoom (2D) and Avl3DViewer (3D). The 3D
|
|
8
|
+
* viewer drills through every level (`application → orbital → trait →
|
|
9
|
+
* transition`); the 2D cosmic view skips the `'orbital'` level after
|
|
10
|
+
* COSMIC-1 (no Orbital-View screen) by dispatching `JUMP_TO_TRAIT_CIRCUIT`
|
|
11
|
+
* to land directly at `'trait'`.
|
|
12
|
+
*
|
|
7
13
|
* @packageDocumentation
|
|
8
14
|
*/
|
|
9
15
|
export type ZoomLevel = 'application' | 'orbital' | 'trait' | 'transition';
|
|
@@ -50,6 +56,12 @@ export type ZoomAction = {
|
|
|
50
56
|
} | {
|
|
51
57
|
type: 'SWITCH_TRAIT';
|
|
52
58
|
trait: string;
|
|
59
|
+
} | {
|
|
60
|
+
type: 'JUMP_TO_TRAIT_CIRCUIT';
|
|
61
|
+
orbital: string;
|
|
62
|
+
} | {
|
|
63
|
+
type: 'SELECT_TRAIT';
|
|
64
|
+
trait: string;
|
|
53
65
|
};
|
|
54
66
|
export declare const initialZoomState: ZoomState;
|
|
55
67
|
export declare function zoomReducer(state: ZoomState, action: ZoomAction): ZoomState;
|
|
@@ -3707,6 +3707,22 @@ function zoomReducer(state, action) {
|
|
|
3707
3707
|
selectedTransition: action.transitionIndex
|
|
3708
3708
|
};
|
|
3709
3709
|
}
|
|
3710
|
+
case "JUMP_TO_TRAIT_CIRCUIT": {
|
|
3711
|
+
if (state.level !== "application" || state.animating) return state;
|
|
3712
|
+
return {
|
|
3713
|
+
...state,
|
|
3714
|
+
level: "trait",
|
|
3715
|
+
selectedOrbital: action.orbital,
|
|
3716
|
+
selectedTrait: null,
|
|
3717
|
+
selectedTransition: null,
|
|
3718
|
+
animating: false,
|
|
3719
|
+
animationDirection: "in",
|
|
3720
|
+
animationTarget: null
|
|
3721
|
+
};
|
|
3722
|
+
}
|
|
3723
|
+
case "SELECT_TRAIT": {
|
|
3724
|
+
return { ...state, selectedTrait: action.trait };
|
|
3725
|
+
}
|
|
3710
3726
|
case "ZOOM_OUT": {
|
|
3711
3727
|
if (state.level === "application" || state.animating) return state;
|
|
3712
3728
|
return {
|
|
@@ -3739,7 +3755,8 @@ function zoomReducer(state, action) {
|
|
|
3739
3755
|
if (state.level === "trait") {
|
|
3740
3756
|
return {
|
|
3741
3757
|
...state,
|
|
3742
|
-
level: "
|
|
3758
|
+
level: "application",
|
|
3759
|
+
selectedOrbital: null,
|
|
3743
3760
|
selectedTrait: null,
|
|
3744
3761
|
animating: false,
|
|
3745
3762
|
animationTarget: null
|
|
@@ -3683,6 +3683,22 @@ function zoomReducer(state, action) {
|
|
|
3683
3683
|
selectedTransition: action.transitionIndex
|
|
3684
3684
|
};
|
|
3685
3685
|
}
|
|
3686
|
+
case "JUMP_TO_TRAIT_CIRCUIT": {
|
|
3687
|
+
if (state.level !== "application" || state.animating) return state;
|
|
3688
|
+
return {
|
|
3689
|
+
...state,
|
|
3690
|
+
level: "trait",
|
|
3691
|
+
selectedOrbital: action.orbital,
|
|
3692
|
+
selectedTrait: null,
|
|
3693
|
+
selectedTransition: null,
|
|
3694
|
+
animating: false,
|
|
3695
|
+
animationDirection: "in",
|
|
3696
|
+
animationTarget: null
|
|
3697
|
+
};
|
|
3698
|
+
}
|
|
3699
|
+
case "SELECT_TRAIT": {
|
|
3700
|
+
return { ...state, selectedTrait: action.trait };
|
|
3701
|
+
}
|
|
3686
3702
|
case "ZOOM_OUT": {
|
|
3687
3703
|
if (state.level === "application" || state.animating) return state;
|
|
3688
3704
|
return {
|
|
@@ -3715,7 +3731,8 @@ function zoomReducer(state, action) {
|
|
|
3715
3731
|
if (state.level === "trait") {
|
|
3716
3732
|
return {
|
|
3717
3733
|
...state,
|
|
3718
|
-
level: "
|
|
3734
|
+
level: "application",
|
|
3735
|
+
selectedOrbital: null,
|
|
3719
3736
|
selectedTrait: null,
|
|
3720
3737
|
animating: false,
|
|
3721
3738
|
animationTarget: null
|
package/dist/providers/index.cjs
CHANGED
|
@@ -8912,36 +8912,37 @@ var init_Popover = __esm({
|
|
|
8912
8912
|
...triggerProps
|
|
8913
8913
|
}
|
|
8914
8914
|
);
|
|
8915
|
+
const panel = isOpen && triggerRect ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8916
|
+
"div",
|
|
8917
|
+
{
|
|
8918
|
+
ref: popoverRef,
|
|
8919
|
+
className: cn(
|
|
8920
|
+
"fixed z-50 p-4",
|
|
8921
|
+
"bg-card border-2 border-border shadow-lg",
|
|
8922
|
+
positionClasses2[position],
|
|
8923
|
+
className
|
|
8924
|
+
),
|
|
8925
|
+
style: computePopoverStyle(position, triggerRect, popoverWidth),
|
|
8926
|
+
role: "dialog",
|
|
8927
|
+
onMouseEnter: trigger === "hover" ? handleOpen : void 0,
|
|
8928
|
+
onMouseLeave: trigger === "hover" ? handleClose : void 0,
|
|
8929
|
+
children: [
|
|
8930
|
+
typeof content === "string" ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", children: content }) : content,
|
|
8931
|
+
showArrow && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8932
|
+
"div",
|
|
8933
|
+
{
|
|
8934
|
+
className: cn(
|
|
8935
|
+
"absolute w-0 h-0 border-4",
|
|
8936
|
+
arrowClasses2[position]
|
|
8937
|
+
)
|
|
8938
|
+
}
|
|
8939
|
+
)
|
|
8940
|
+
]
|
|
8941
|
+
}
|
|
8942
|
+
) : null;
|
|
8915
8943
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8916
8944
|
triggerElement,
|
|
8917
|
-
|
|
8918
|
-
"div",
|
|
8919
|
-
{
|
|
8920
|
-
ref: popoverRef,
|
|
8921
|
-
className: cn(
|
|
8922
|
-
"fixed z-50 p-4",
|
|
8923
|
-
"bg-card border-2 border-border shadow-lg",
|
|
8924
|
-
positionClasses2[position],
|
|
8925
|
-
className
|
|
8926
|
-
),
|
|
8927
|
-
style: computePopoverStyle(position, triggerRect, popoverWidth),
|
|
8928
|
-
role: "dialog",
|
|
8929
|
-
onMouseEnter: trigger === "hover" ? handleOpen : void 0,
|
|
8930
|
-
onMouseLeave: trigger === "hover" ? handleClose : void 0,
|
|
8931
|
-
children: [
|
|
8932
|
-
typeof content === "string" ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", children: content }) : content,
|
|
8933
|
-
showArrow && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8934
|
-
"div",
|
|
8935
|
-
{
|
|
8936
|
-
className: cn(
|
|
8937
|
-
"absolute w-0 h-0 border-4",
|
|
8938
|
-
arrowClasses2[position]
|
|
8939
|
-
)
|
|
8940
|
-
}
|
|
8941
|
-
)
|
|
8942
|
-
]
|
|
8943
|
-
}
|
|
8944
|
-
)
|
|
8945
|
+
panel && typeof document !== "undefined" ? reactDom.createPortal(panel, document.body) : panel
|
|
8945
8946
|
] });
|
|
8946
8947
|
};
|
|
8947
8948
|
Popover.displayName = "Popover";
|
package/dist/providers/index.js
CHANGED
|
@@ -8866,36 +8866,37 @@ var init_Popover = __esm({
|
|
|
8866
8866
|
...triggerProps
|
|
8867
8867
|
}
|
|
8868
8868
|
);
|
|
8869
|
+
const panel = isOpen && triggerRect ? /* @__PURE__ */ jsxs(
|
|
8870
|
+
"div",
|
|
8871
|
+
{
|
|
8872
|
+
ref: popoverRef,
|
|
8873
|
+
className: cn(
|
|
8874
|
+
"fixed z-50 p-4",
|
|
8875
|
+
"bg-card border-2 border-border shadow-lg",
|
|
8876
|
+
positionClasses2[position],
|
|
8877
|
+
className
|
|
8878
|
+
),
|
|
8879
|
+
style: computePopoverStyle(position, triggerRect, popoverWidth),
|
|
8880
|
+
role: "dialog",
|
|
8881
|
+
onMouseEnter: trigger === "hover" ? handleOpen : void 0,
|
|
8882
|
+
onMouseLeave: trigger === "hover" ? handleClose : void 0,
|
|
8883
|
+
children: [
|
|
8884
|
+
typeof content === "string" ? /* @__PURE__ */ jsx(Typography, { variant: "body", children: content }) : content,
|
|
8885
|
+
showArrow && /* @__PURE__ */ jsx(
|
|
8886
|
+
"div",
|
|
8887
|
+
{
|
|
8888
|
+
className: cn(
|
|
8889
|
+
"absolute w-0 h-0 border-4",
|
|
8890
|
+
arrowClasses2[position]
|
|
8891
|
+
)
|
|
8892
|
+
}
|
|
8893
|
+
)
|
|
8894
|
+
]
|
|
8895
|
+
}
|
|
8896
|
+
) : null;
|
|
8869
8897
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
8870
8898
|
triggerElement,
|
|
8871
|
-
|
|
8872
|
-
"div",
|
|
8873
|
-
{
|
|
8874
|
-
ref: popoverRef,
|
|
8875
|
-
className: cn(
|
|
8876
|
-
"fixed z-50 p-4",
|
|
8877
|
-
"bg-card border-2 border-border shadow-lg",
|
|
8878
|
-
positionClasses2[position],
|
|
8879
|
-
className
|
|
8880
|
-
),
|
|
8881
|
-
style: computePopoverStyle(position, triggerRect, popoverWidth),
|
|
8882
|
-
role: "dialog",
|
|
8883
|
-
onMouseEnter: trigger === "hover" ? handleOpen : void 0,
|
|
8884
|
-
onMouseLeave: trigger === "hover" ? handleClose : void 0,
|
|
8885
|
-
children: [
|
|
8886
|
-
typeof content === "string" ? /* @__PURE__ */ jsx(Typography, { variant: "body", children: content }) : content,
|
|
8887
|
-
showArrow && /* @__PURE__ */ jsx(
|
|
8888
|
-
"div",
|
|
8889
|
-
{
|
|
8890
|
-
className: cn(
|
|
8891
|
-
"absolute w-0 h-0 border-4",
|
|
8892
|
-
arrowClasses2[position]
|
|
8893
|
-
)
|
|
8894
|
-
}
|
|
8895
|
-
)
|
|
8896
|
-
]
|
|
8897
|
-
}
|
|
8898
|
-
)
|
|
8899
|
+
panel && typeof document !== "undefined" ? createPortal(panel, document.body) : panel
|
|
8899
8900
|
] });
|
|
8900
8901
|
};
|
|
8901
8902
|
Popover.displayName = "Popover";
|
package/dist/runtime/index.cjs
CHANGED
|
@@ -8800,36 +8800,37 @@ var init_Popover = __esm({
|
|
|
8800
8800
|
...triggerProps
|
|
8801
8801
|
}
|
|
8802
8802
|
);
|
|
8803
|
+
const panel = isOpen && triggerRect ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8804
|
+
"div",
|
|
8805
|
+
{
|
|
8806
|
+
ref: popoverRef,
|
|
8807
|
+
className: cn(
|
|
8808
|
+
"fixed z-50 p-4",
|
|
8809
|
+
"bg-card border-2 border-border shadow-lg",
|
|
8810
|
+
positionClasses2[position],
|
|
8811
|
+
className
|
|
8812
|
+
),
|
|
8813
|
+
style: computePopoverStyle(position, triggerRect, popoverWidth),
|
|
8814
|
+
role: "dialog",
|
|
8815
|
+
onMouseEnter: trigger === "hover" ? handleOpen : void 0,
|
|
8816
|
+
onMouseLeave: trigger === "hover" ? handleClose : void 0,
|
|
8817
|
+
children: [
|
|
8818
|
+
typeof content === "string" ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", children: content }) : content,
|
|
8819
|
+
showArrow && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8820
|
+
"div",
|
|
8821
|
+
{
|
|
8822
|
+
className: cn(
|
|
8823
|
+
"absolute w-0 h-0 border-4",
|
|
8824
|
+
arrowClasses2[position]
|
|
8825
|
+
)
|
|
8826
|
+
}
|
|
8827
|
+
)
|
|
8828
|
+
]
|
|
8829
|
+
}
|
|
8830
|
+
) : null;
|
|
8803
8831
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8804
8832
|
triggerElement,
|
|
8805
|
-
|
|
8806
|
-
"div",
|
|
8807
|
-
{
|
|
8808
|
-
ref: popoverRef,
|
|
8809
|
-
className: cn(
|
|
8810
|
-
"fixed z-50 p-4",
|
|
8811
|
-
"bg-card border-2 border-border shadow-lg",
|
|
8812
|
-
positionClasses2[position],
|
|
8813
|
-
className
|
|
8814
|
-
),
|
|
8815
|
-
style: computePopoverStyle(position, triggerRect, popoverWidth),
|
|
8816
|
-
role: "dialog",
|
|
8817
|
-
onMouseEnter: trigger === "hover" ? handleOpen : void 0,
|
|
8818
|
-
onMouseLeave: trigger === "hover" ? handleClose : void 0,
|
|
8819
|
-
children: [
|
|
8820
|
-
typeof content === "string" ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", children: content }) : content,
|
|
8821
|
-
showArrow && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8822
|
-
"div",
|
|
8823
|
-
{
|
|
8824
|
-
className: cn(
|
|
8825
|
-
"absolute w-0 h-0 border-4",
|
|
8826
|
-
arrowClasses2[position]
|
|
8827
|
-
)
|
|
8828
|
-
}
|
|
8829
|
-
)
|
|
8830
|
-
]
|
|
8831
|
-
}
|
|
8832
|
-
)
|
|
8833
|
+
panel && typeof document !== "undefined" ? reactDom.createPortal(panel, document.body) : panel
|
|
8833
8834
|
] });
|
|
8834
8835
|
};
|
|
8835
8836
|
Popover.displayName = "Popover";
|
package/dist/runtime/index.js
CHANGED
|
@@ -8754,36 +8754,37 @@ var init_Popover = __esm({
|
|
|
8754
8754
|
...triggerProps
|
|
8755
8755
|
}
|
|
8756
8756
|
);
|
|
8757
|
+
const panel = isOpen && triggerRect ? /* @__PURE__ */ jsxs(
|
|
8758
|
+
"div",
|
|
8759
|
+
{
|
|
8760
|
+
ref: popoverRef,
|
|
8761
|
+
className: cn(
|
|
8762
|
+
"fixed z-50 p-4",
|
|
8763
|
+
"bg-card border-2 border-border shadow-lg",
|
|
8764
|
+
positionClasses2[position],
|
|
8765
|
+
className
|
|
8766
|
+
),
|
|
8767
|
+
style: computePopoverStyle(position, triggerRect, popoverWidth),
|
|
8768
|
+
role: "dialog",
|
|
8769
|
+
onMouseEnter: trigger === "hover" ? handleOpen : void 0,
|
|
8770
|
+
onMouseLeave: trigger === "hover" ? handleClose : void 0,
|
|
8771
|
+
children: [
|
|
8772
|
+
typeof content === "string" ? /* @__PURE__ */ jsx(Typography, { variant: "body", children: content }) : content,
|
|
8773
|
+
showArrow && /* @__PURE__ */ jsx(
|
|
8774
|
+
"div",
|
|
8775
|
+
{
|
|
8776
|
+
className: cn(
|
|
8777
|
+
"absolute w-0 h-0 border-4",
|
|
8778
|
+
arrowClasses2[position]
|
|
8779
|
+
)
|
|
8780
|
+
}
|
|
8781
|
+
)
|
|
8782
|
+
]
|
|
8783
|
+
}
|
|
8784
|
+
) : null;
|
|
8757
8785
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
8758
8786
|
triggerElement,
|
|
8759
|
-
|
|
8760
|
-
"div",
|
|
8761
|
-
{
|
|
8762
|
-
ref: popoverRef,
|
|
8763
|
-
className: cn(
|
|
8764
|
-
"fixed z-50 p-4",
|
|
8765
|
-
"bg-card border-2 border-border shadow-lg",
|
|
8766
|
-
positionClasses2[position],
|
|
8767
|
-
className
|
|
8768
|
-
),
|
|
8769
|
-
style: computePopoverStyle(position, triggerRect, popoverWidth),
|
|
8770
|
-
role: "dialog",
|
|
8771
|
-
onMouseEnter: trigger === "hover" ? handleOpen : void 0,
|
|
8772
|
-
onMouseLeave: trigger === "hover" ? handleClose : void 0,
|
|
8773
|
-
children: [
|
|
8774
|
-
typeof content === "string" ? /* @__PURE__ */ jsx(Typography, { variant: "body", children: content }) : content,
|
|
8775
|
-
showArrow && /* @__PURE__ */ jsx(
|
|
8776
|
-
"div",
|
|
8777
|
-
{
|
|
8778
|
-
className: cn(
|
|
8779
|
-
"absolute w-0 h-0 border-4",
|
|
8780
|
-
arrowClasses2[position]
|
|
8781
|
-
)
|
|
8782
|
-
}
|
|
8783
|
-
)
|
|
8784
|
-
]
|
|
8785
|
-
}
|
|
8786
|
-
)
|
|
8787
|
+
panel && typeof document !== "undefined" ? createPortal(panel, document.body) : panel
|
|
8787
8788
|
] });
|
|
8788
8789
|
};
|
|
8789
8790
|
Popover.displayName = "Popover";
|