react-panel-layout 0.4.2 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/{FloatingPanelFrame-SOrLGjZd.js → FloatingPanelFrame-DDT6aING.js} +7 -8
  2. package/dist/FloatingPanelFrame-DDT6aING.js.map +1 -0
  3. package/dist/FloatingPanelFrame-DrYwgI9f.cjs +2 -0
  4. package/dist/FloatingPanelFrame-DrYwgI9f.cjs.map +1 -0
  5. package/dist/GridLayout-DC7fCmcI.cjs +2 -0
  6. package/dist/GridLayout-DC7fCmcI.cjs.map +1 -0
  7. package/dist/GridLayout-tpSM0iM-.js +1460 -0
  8. package/dist/GridLayout-tpSM0iM-.js.map +1 -0
  9. package/dist/components/grid/GridLayout.d.ts +5 -0
  10. package/dist/components/window/FloatingWindow.d.ts +15 -0
  11. package/dist/config/panelRouter.d.ts +2 -2
  12. package/dist/config.cjs +1 -1
  13. package/dist/config.cjs.map +1 -1
  14. package/dist/config.js +1 -1
  15. package/dist/config.js.map +1 -1
  16. package/dist/floating.cjs +1 -1
  17. package/dist/floating.js +1 -1
  18. package/dist/index.cjs +2 -2
  19. package/dist/index.cjs.map +1 -1
  20. package/dist/index.d.ts +4 -1
  21. package/dist/index.js +892 -822
  22. package/dist/index.js.map +1 -1
  23. package/dist/modules/grid/GridLayoutContext.d.ts +5 -0
  24. package/dist/modules/grid/resizeHandles.d.ts +14 -0
  25. package/dist/modules/grid/trackUtils.d.ts +29 -0
  26. package/dist/modules/grid/useGridTracks.d.ts +6 -15
  27. package/dist/modules/grid/useLayerInteractions.d.ts +2 -1
  28. package/dist/modules/window/useFloatingState.d.ts +9 -0
  29. package/dist/types.d.ts +79 -4
  30. package/dist/utils/css.d.ts +19 -0
  31. package/package.json +1 -1
  32. package/dist/FloatingPanelFrame-SOrLGjZd.js.map +0 -1
  33. package/dist/FloatingPanelFrame-XtBcHANI.cjs +0 -2
  34. package/dist/FloatingPanelFrame-XtBcHANI.cjs.map +0 -1
  35. package/dist/GridLayout-CLvW8jID.js +0 -1352
  36. package/dist/GridLayout-CLvW8jID.js.map +0 -1
  37. package/dist/GridLayout-qufTyOQM.cjs +0 -2
  38. package/dist/GridLayout-qufTyOQM.cjs.map +0 -1
@@ -27,6 +27,11 @@ export type GridLayoutContextValue = {
27
27
  handleLayerPointerDown: (event: React.PointerEvent<HTMLDivElement>) => void;
28
28
  getLayerRenderState: (layer: LayerDefinition) => GridLayerRenderState;
29
29
  getLayerHandleProps: (layerId: string) => GridLayerHandleProps;
30
+ /**
31
+ * Whether the GridLayout is mounted at root level.
32
+ * When true, scrollable layers should delegate to browser's native scroll.
33
+ */
34
+ isRootLevel: boolean;
30
35
  };
31
36
  export declare const GridLayoutProvider: React.FC<React.PropsWithChildren<{
32
37
  value: GridLayoutContextValue;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @file Resize handle configuration computation for grid tracks.
3
+ */
4
+ import type { GridTrack } from "../../types";
5
+ export type TrackHandleConfig = {
6
+ trackIndex: number;
7
+ align: "start" | "end";
8
+ span: {
9
+ start: number;
10
+ end: number;
11
+ };
12
+ };
13
+ export declare const computeColumnResizeHandles: (tracks: GridTrack[], areas: string[][]) => TrackHandleConfig[];
14
+ export declare const computeRowResizeHandles: (tracks: GridTrack[], areas: string[][]) => TrackHandleConfig[];
@@ -0,0 +1,29 @@
1
+ /**
2
+ * @file Grid track sizing utilities.
3
+ */
4
+ import type * as React from "react";
5
+ import type { GridTrack } from "../../types";
6
+ import { type GridDirection, type ParsedGap } from "../../utils/css";
7
+ export type TrackDirection = GridDirection;
8
+ export declare const createTrackKey: (direction: TrackDirection, index: number) => string;
9
+ export declare const getTrackSize: (track: GridTrack, trackSizes: Record<string, number>, direction: TrackDirection, index: number) => string;
10
+ export declare const buildTrackTemplateString: (tracks: GridTrack[], trackSizes: Record<string, number>, direction: TrackDirection) => string;
11
+ export declare const extractInitialTrackSizes: (tracks: GridTrack[], direction: TrackDirection) => Record<string, number>;
12
+ export type ResolveTrackSizeParams = {
13
+ trackSizes: Record<string, number>;
14
+ track: GridTrack;
15
+ direction: TrackDirection;
16
+ trackIndex: number;
17
+ containerRef: React.RefObject<HTMLElement | null> | undefined;
18
+ };
19
+ export declare const resolveCurrentTrackSize: ({ trackSizes, track, direction, trackIndex, containerRef, }: ResolveTrackSizeParams) => number;
20
+ export type EffectiveMaxSizeParams = {
21
+ track: GridTrack;
22
+ tracks: GridTrack[];
23
+ trackIndex: number;
24
+ direction: TrackDirection;
25
+ containerRef: React.RefObject<HTMLElement | null> | undefined;
26
+ gapSizes: ParsedGap;
27
+ };
28
+ export declare const calculateEffectiveMaxSize: ({ track, tracks, trackIndex, direction, containerRef, gapSizes, }: EffectiveMaxSizeParams) => number | undefined;
29
+ export declare const applyTrackConstraints: (size: number, minSize?: number, maxSize?: number) => number;
@@ -3,24 +3,15 @@
3
3
  */
4
4
  import * as React from "react";
5
5
  import type { PanelLayoutConfig } from "../../types";
6
- export type TrackHandleConfig = {
7
- trackIndex: number;
8
- align: "start" | "end";
9
- span: {
10
- start: number;
11
- end: number;
12
- };
13
- };
14
- type ParsedGap = {
15
- rowGap: number;
16
- columnGap: number;
17
- };
18
- type TrackDirection = "row" | "col";
19
- export declare const useGridTracks: (config: PanelLayoutConfig, styleProp?: React.CSSProperties) => {
6
+ import { type ParsedGap } from "../../utils/css";
7
+ import { type TrackDirection } from "./trackUtils";
8
+ import { type TrackHandleConfig } from "./resizeHandles";
9
+ export type { TrackHandleConfig } from "./resizeHandles";
10
+ export type { TrackDirection } from "./trackUtils";
11
+ export declare const useGridTracks: (config: PanelLayoutConfig, styleProp?: React.CSSProperties, containerRef?: React.RefObject<HTMLElement | null>) => {
20
12
  columnHandles: TrackHandleConfig[];
21
13
  rowHandles: TrackHandleConfig[];
22
14
  gapSizes: ParsedGap;
23
15
  gridStyle: React.CSSProperties;
24
16
  handleResize: (direction: TrackDirection, trackIndex: number, delta: number) => void;
25
17
  };
26
- export {};
@@ -3,8 +3,9 @@ import type { GridLayoutContextValue } from "./GridLayoutContext";
3
3
  type UseLayerInteractionsArgs = {
4
4
  layers: LayerDefinition[];
5
5
  layerById: Map<string, LayerDefinition>;
6
+ isRootLevel: boolean;
6
7
  };
7
- export declare const useLayerInteractions: ({ layers, layerById, }: UseLayerInteractionsArgs) => {
8
+ export declare const useLayerInteractions: ({ layers, layerById, isRootLevel, }: UseLayerInteractionsArgs) => {
8
9
  providerValue: GridLayoutContextValue;
9
10
  draggingLayerId: string | null;
10
11
  resizingLayerId: string | null;
@@ -0,0 +1,9 @@
1
+ import type { LayerDefinition, WindowPosition, WindowSize } from "../../types";
2
+ export declare const useFloatingState: (layers: LayerDefinition[]) => {
3
+ getPosition: (layerId: string) => WindowPosition;
4
+ getSize: (layerId: string) => WindowSize;
5
+ getZIndex: (layerId: string) => number | undefined;
6
+ updatePosition: (layerId: string, position: WindowPosition) => void;
7
+ updateSize: (layerId: string, size: WindowSize) => void;
8
+ close: (layerId: string) => void;
9
+ };
package/dist/types.d.ts CHANGED
@@ -49,13 +49,61 @@ export type PopupWindowFactoryConfig = {
49
49
  bounds: WindowBounds;
50
50
  };
51
51
  export type FloatingWindowMode = "embedded" | "popup";
52
- export type FloatingWindowConfig = {
53
- mode?: FloatingWindowMode;
52
+ export type FloatingHeaderConfig = {
53
+ /** Header title text */
54
+ title?: string;
55
+ /** Show close button (requires onClose callback) */
56
+ showCloseButton?: boolean;
57
+ };
58
+ export type FloatingBehavior = {
59
+ /** Controlled position - when defined, component uses this value directly */
60
+ position?: WindowPosition;
61
+ /** Initial position for uncontrolled mode */
62
+ defaultPosition?: WindowPosition;
63
+ /** Controlled size - when defined, component uses this value directly */
64
+ size?: WindowSize;
65
+ /** Initial size for uncontrolled mode */
66
+ defaultSize?: WindowSize;
67
+ /** Z-index for stacking order */
68
+ zIndex?: number;
69
+ /** Enable drag-to-move functionality */
54
70
  draggable?: boolean;
71
+ /** Enable resize handles */
55
72
  resizable?: boolean;
73
+ /** Size constraints for resizing */
56
74
  constraints?: WindowConstraints;
75
+ /** Called when position changes (drag/move) */
57
76
  onMove?: (position: WindowPosition) => void;
77
+ /** Called when size changes (resize) */
58
78
  onResize?: (size: WindowSize) => void;
79
+ /** Called when close button is clicked */
80
+ onClose?: () => void;
81
+ /**
82
+ * Use built-in chrome (FloatingPanelFrame with border, shadow, background).
83
+ * When true and header is provided, header auto-enables drag handle.
84
+ * Defaults to false.
85
+ */
86
+ chrome?: boolean;
87
+ /**
88
+ * Header configuration (renders header when provided).
89
+ * When chrome is true and header is provided, header becomes the drag handle.
90
+ */
91
+ header?: FloatingHeaderConfig;
92
+ /** Accessible label when header.title is not provided */
93
+ ariaLabel?: string;
94
+ /**
95
+ * Transition mode for position/size changes.
96
+ * - "css" uses CSS transitions.
97
+ * - "none" disables transitions.
98
+ */
99
+ transitionMode?: "css" | "none";
100
+ /** Override transition duration (e.g., "200ms") */
101
+ transitionDuration?: string;
102
+ /** Override transition easing (e.g., "ease-out") */
103
+ transitionEasing?: string;
104
+ /** Display mode: "embedded" (default) or "popup" (browser window) */
105
+ mode?: FloatingWindowMode;
106
+ /** Popup-specific options when mode is "popup" */
59
107
  popup?: PopupWindowOptions;
60
108
  };
61
109
  export type PivotBehaviorItem = {
@@ -90,6 +138,12 @@ export type DrawerBehavior = {
90
138
  open?: boolean;
91
139
  /** Whether clicking backdrop dismisses the drawer */
92
140
  dismissible?: boolean;
141
+ /**
142
+ * Anchor edge for the drawer.
143
+ * - "left", "right", "top", "bottom"
144
+ * - When not specified, inferred from position prop
145
+ */
146
+ anchor?: "left" | "right" | "top" | "bottom";
93
147
  /**
94
148
  * Transition mode for drawer visibility.
95
149
  * - "css" (default) uses CSS transform transitions.
@@ -143,18 +197,39 @@ export type LayerDefinition = {
143
197
  * If `floating` is present, behaves as absolute (embedded) or relative (popup).
144
198
  */
145
199
  positionMode?: LayerPositionMode;
146
- /** Absolute/fixed offsets when positionMode !== 'grid'. */
200
+ /**
201
+ * Position offsets for non-floating layers (drawer, absolute positioned).
202
+ * For floating layers, use `floating.position` or `floating.defaultPosition` instead.
203
+ */
147
204
  position?: WindowPosition;
205
+ /**
206
+ * Stacking order for non-floating layers.
207
+ * For floating layers, use `floating.zIndex` instead.
208
+ */
148
209
  zIndex?: number;
210
+ /**
211
+ * Width for non-floating layers.
212
+ * For floating layers, use `floating.size` or `floating.defaultSize` instead.
213
+ */
149
214
  width?: string | number;
215
+ /**
216
+ * Height for non-floating layers.
217
+ * For floating layers, use `floating.size` or `floating.defaultSize` instead.
218
+ */
150
219
  height?: string | number;
151
220
  pointerEvents?: boolean | "auto" | "none";
152
221
  /** Optional backdrop style (used by DrawerBehaviour) */
153
222
  backdropStyle?: React.CSSProperties;
154
223
  drawer?: DrawerBehavior;
155
- floating?: FloatingWindowConfig;
224
+ /** Floating window behavior configuration */
225
+ floating?: FloatingBehavior;
156
226
  pivot?: PivotBehavior;
157
227
  style?: React.CSSProperties;
228
+ /**
229
+ * When true, enables scrolling within this panel (overflow: auto).
230
+ * When false or omitted, content overflow is hidden (default behavior).
231
+ */
232
+ scrollable?: boolean;
158
233
  };
159
234
  export type PanelLayoutProps = {
160
235
  config: PanelLayoutConfig;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @file Generic CSS parsing and measurement utilities.
3
+ */
4
+ export type ParsedGap = {
5
+ rowGap: number;
6
+ columnGap: number;
7
+ };
8
+ /**
9
+ * Parses a CSS gap value string into row and column gap numbers.
10
+ * Supports single value (applied to both) or two values (row column).
11
+ * Only handles px units; other units return 0.
12
+ */
13
+ export declare const parseGapValue: (gapValue?: string) => ParsedGap;
14
+ export type GridDirection = "col" | "row";
15
+ /**
16
+ * Measures actual rendered grid track sizes from computed style.
17
+ * Returns pixel values parsed from gridTemplateColumns or gridTemplateRows.
18
+ */
19
+ export declare const measureGridTrackSizes: (containerEl: HTMLElement | null, direction: GridDirection) => number[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-panel-layout",
3
- "version": "0.4.2",
3
+ "version": "0.5.0",
4
4
  "license": "Unlicense",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -1 +0,0 @@
1
- {"version":3,"file":"FloatingPanelFrame-SOrLGjZd.js","sources":["../src/components/paneling/FloatingPanelFrame.tsx"],"sourcesContent":["/**\n * @file Shared floating panel frame components for reusable overlay styling\n */\nimport * as React from \"react\";\nimport {\n FLOATING_PANEL_BORDER_RADIUS,\n FLOATING_PANEL_GAP,\n FLOATING_PANEL_HEADER_PADDING_Y,\n FLOATING_PANEL_HEADER_PADDING_X,\n FLOATING_PANEL_CONTENT_PADDING,\n FLOATING_PANEL_META_FONT_SIZE,\n FLOATING_PANEL_CONTROLS_GAP,\n FLOATING_PANEL_SURFACE_COLOR,\n FLOATING_PANEL_SURFACE_2_COLOR,\n FLOATING_PANEL_BORDER_COLOR,\n FLOATING_PANEL_MUTED_FG_COLOR,\n FLOATING_PANEL_SHADOW,\n} from \"../../constants/styles\";\n\nconst frameStyle: React.CSSProperties = {\n display: \"flex\",\n flexDirection: \"column\",\n borderRadius: FLOATING_PANEL_BORDER_RADIUS,\n border: `1px solid ${FLOATING_PANEL_BORDER_COLOR}`,\n background: FLOATING_PANEL_SURFACE_COLOR,\n overflow: \"hidden\",\n boxShadow: FLOATING_PANEL_SHADOW,\n};\n\nconst headerStyle: React.CSSProperties = {\n display: \"flex\",\n alignItems: \"center\",\n gap: FLOATING_PANEL_GAP,\n padding: `${FLOATING_PANEL_HEADER_PADDING_Y} ${FLOATING_PANEL_HEADER_PADDING_X}`,\n borderBottom: `1px solid ${FLOATING_PANEL_BORDER_COLOR}`,\n background: FLOATING_PANEL_SURFACE_2_COLOR,\n};\n\nconst titleStyle: React.CSSProperties = {\n fontWeight: 600,\n};\n\nconst metaStyle: React.CSSProperties = {\n marginLeft: \"auto\",\n color: FLOATING_PANEL_MUTED_FG_COLOR,\n fontSize: FLOATING_PANEL_META_FONT_SIZE,\n};\n\nconst controlsStyle: React.CSSProperties = {\n display: \"flex\",\n alignItems: \"center\",\n gap: FLOATING_PANEL_CONTROLS_GAP,\n};\n\nconst contentStyle: React.CSSProperties = {\n padding: FLOATING_PANEL_CONTENT_PADDING,\n overflow: \"auto\",\n};\n\nexport type FloatingPanelFrameProps = Omit<React.HTMLAttributes<HTMLDivElement>, \"className\" | \"style\"> & {\n style?: React.CSSProperties;\n};\n\nexport const FloatingPanelFrame = React.forwardRef<HTMLDivElement, FloatingPanelFrameProps>(function FloatingPanelFrame(\n { style: propStyle, ...props },\n ref,\n) {\n const combinedStyle = React.useMemo(() => ({ ...frameStyle, ...propStyle }), [propStyle]);\n return <div ref={ref} style={combinedStyle} {...props} />;\n});\n\nexport type FloatingPanelHeaderProps = Omit<React.HTMLAttributes<HTMLDivElement>, \"className\" | \"style\"> & {\n style?: React.CSSProperties;\n};\n\nexport const FloatingPanelHeader: React.FC<FloatingPanelHeaderProps> = ({ style: propStyle, ...props }) => {\n const combinedStyle = React.useMemo(() => ({ ...headerStyle, ...propStyle }), [propStyle]);\n return <div style={combinedStyle} {...props} />;\n};\n\nexport type FloatingPanelTitleProps = Omit<React.HTMLAttributes<HTMLSpanElement>, \"className\" | \"style\"> & {\n style?: React.CSSProperties;\n};\n\nexport const FloatingPanelTitle: React.FC<FloatingPanelTitleProps> = ({ style: propStyle, ...props }) => {\n const combinedStyle = React.useMemo(() => ({ ...titleStyle, ...propStyle }), [propStyle]);\n return <span style={combinedStyle} {...props} />;\n};\n\nexport type FloatingPanelMetaProps = Omit<React.HTMLAttributes<HTMLSpanElement>, \"className\" | \"style\"> & {\n style?: React.CSSProperties;\n};\n\nexport const FloatingPanelMeta: React.FC<FloatingPanelMetaProps> = ({ style: propStyle, ...props }) => {\n const combinedStyle = React.useMemo(() => ({ ...metaStyle, ...propStyle }), [propStyle]);\n return <span style={combinedStyle} {...props} />;\n};\n\nexport type FloatingPanelControlsProps = Omit<React.HTMLAttributes<HTMLDivElement>, \"className\" | \"style\"> & {\n style?: React.CSSProperties;\n};\n\nexport const FloatingPanelControls: React.FC<FloatingPanelControlsProps> = ({ style: propStyle, ...props }) => {\n const combinedStyle = React.useMemo(() => ({ ...controlsStyle, ...propStyle }), [propStyle]);\n return <div style={combinedStyle} {...props} />;\n};\n\nexport type FloatingPanelContentProps = Omit<React.HTMLAttributes<HTMLDivElement>, \"className\" | \"style\"> & {\n style?: React.CSSProperties;\n};\n\nexport const FloatingPanelContent = React.forwardRef<HTMLDivElement, FloatingPanelContentProps>(\n function FloatingPanelContent({ style: propStyle, ...props }, ref) {\n const combinedStyle = React.useMemo(() => ({ ...contentStyle, ...propStyle }), [propStyle]);\n return <div ref={ref} style={combinedStyle} {...props} />;\n },\n);\n\nFloatingPanelFrame.displayName = \"FloatingPanelFrame\";\nFloatingPanelHeader.displayName = \"FloatingPanelHeader\";\nFloatingPanelTitle.displayName = \"FloatingPanelTitle\";\nFloatingPanelMeta.displayName = \"FloatingPanelMeta\";\nFloatingPanelControls.displayName = \"FloatingPanelControls\";\nFloatingPanelContent.displayName = \"FloatingPanelContent\";\n\n"],"names":["frameStyle","FLOATING_PANEL_BORDER_RADIUS","FLOATING_PANEL_BORDER_COLOR","FLOATING_PANEL_SURFACE_COLOR","FLOATING_PANEL_SHADOW","headerStyle","FLOATING_PANEL_GAP","FLOATING_PANEL_HEADER_PADDING_Y","FLOATING_PANEL_HEADER_PADDING_X","FLOATING_PANEL_SURFACE_2_COLOR","titleStyle","metaStyle","FLOATING_PANEL_MUTED_FG_COLOR","FLOATING_PANEL_META_FONT_SIZE","controlsStyle","FLOATING_PANEL_CONTROLS_GAP","contentStyle","FLOATING_PANEL_CONTENT_PADDING","FloatingPanelFrame","React","propStyle","props","ref","combinedStyle","FloatingPanelHeader","jsx","FloatingPanelTitle","FloatingPanelMeta","FloatingPanelControls","FloatingPanelContent"],"mappings":";;;AAmBA,MAAMA,IAAkC;AAAA,EACtC,SAAS;AAAA,EACT,eAAe;AAAA,EACf,cAAcC;AAAA,EACd,QAAQ,aAAaC,CAA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AAY;AACrG,QAAME,IAAgBJ,EAAM,QAAQ,OAAO,EAAE,GAAGR,GAAW,GAAGS,EAAA,IAAc,CAACA,CAAS,CAAC;AACvF,SAAO,gBAAAK,EAAC,QAAA,EAAK,OAAOF,GAAgB,GAAGF,GAAO;AAChD,GAMaO,IAA8D,CAAC,EAAE,OAAOR,GAAW,GAAGC,QAAY;AAC7G,QAAME,IAAgBJ,EAAM,QAAQ,OAAO,EAAE,GAAGL,GAAe,GAAGM,EAAA,IAAc,CAACA,CAAS,CAAC;AAC3F,SAAO,gBAAAK,EAAC,OAAA,EAAI,OAAOF,GAAgB,GAAGF,GAAO;AAC/C,GAMaQ,IAAuBV,EAAM;AAAA,EACxC,SAA8B,EAAE,OAAOC,GAAW,GAAGC,EAAA,GAASC,GAAK;AACjE,UAAMC,IAAgBJ,EAAM,QAAQ,OAAO,EAAE,GAAGH,GAAc,GAAGI,EAAA,IAAc,CAACA,CAAS,CAAC;AAC1F,6BAAQ,OAAA,EAAI,KAAAE,GAAU,OAAOC,GAAgB,GAAGF,GAAO;AAAA,EACzD;AACF;AAEAH,EAAmB,cAAc;AACjCM,EAAoB,cAAc;AAClCE,EAAmB,cAAc;AACjCC,EAAkB,cAAc;AAChCC,EAAsB,cAAc;AACpCC,EAAqB,cAAc;"}
@@ -1,2 +0,0 @@
1
- "use strict";const s=require("react/jsx-runtime"),P=require("react"),o=require("./styles-DcG3aIFx.cjs");function A(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const l=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,l.get?l:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const a=A(P),O={display:"flex",flexDirection:"column",borderRadius:o.FLOATING_PANEL_BORDER_RADIUS,border:`1px solid ${o.FLOATING_PANEL_BORDER_COLOR}`,background:o.FLOATING_PANEL_SURFACE_COLOR,overflow:"hidden",boxShadow:o.FLOATING_PANEL_SHADOW},g={display:"flex",alignItems:"center",gap:o.FLOATING_PANEL_GAP,padding:`${o.FLOATING_PANEL_HEADER_PADDING_Y} ${o.FLOATING_PANEL_HEADER_PADDING_X}`,borderBottom:`1px solid ${o.FLOATING_PANEL_BORDER_COLOR}`,background:o.FLOATING_PANEL_SURFACE_2_COLOR},u={fontWeight:600},m={marginLeft:"auto",color:o.FLOATING_PANEL_MUTED_FG_COLOR,fontSize:o.FLOATING_PANEL_META_FONT_SIZE},L={display:"flex",alignItems:"center",gap:o.FLOATING_PANEL_CONTROLS_GAP},y={padding:o.FLOATING_PANEL_CONTENT_PADDING,overflow:"auto"},r=a.forwardRef(function({style:t,...n},l){const i=a.useMemo(()=>({...O,...t}),[t]);return s.jsx("div",{ref:l,style:i,...n})}),c=({style:e,...t})=>{const n=a.useMemo(()=>({...g,...e}),[e]);return s.jsx("div",{style:n,...t})},d=({style:e,...t})=>{const n=a.useMemo(()=>({...u,...e}),[e]);return s.jsx("span",{style:n,...t})},_=({style:e,...t})=>{const n=a.useMemo(()=>({...m,...e}),[e]);return s.jsx("span",{style:n,...t})},F=({style:e,...t})=>{const n=a.useMemo(()=>({...L,...e}),[e]);return s.jsx("div",{style:n,...t})},N=a.forwardRef(function({style:t,...n},l){const i=a.useMemo(()=>({...y,...t}),[t]);return s.jsx("div",{ref:l,style:i,...n})});r.displayName="FloatingPanelFrame";c.displayName="FloatingPanelHeader";d.displayName="FloatingPanelTitle";_.displayName="FloatingPanelMeta";F.displayName="FloatingPanelControls";N.displayName="FloatingPanelContent";exports.FloatingPanelContent=N;exports.FloatingPanelControls=F;exports.FloatingPanelFrame=r;exports.FloatingPanelHeader=c;exports.FloatingPanelMeta=_;exports.FloatingPanelTitle=d;
2
- //# sourceMappingURL=FloatingPanelFrame-XtBcHANI.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FloatingPanelFrame-XtBcHANI.cjs","sources":["../src/components/paneling/FloatingPanelFrame.tsx"],"sourcesContent":["/**\n * @file Shared floating panel frame components for reusable overlay styling\n */\nimport * as React from \"react\";\nimport {\n FLOATING_PANEL_BORDER_RADIUS,\n FLOATING_PANEL_GAP,\n FLOATING_PANEL_HEADER_PADDING_Y,\n FLOATING_PANEL_HEADER_PADDING_X,\n FLOATING_PANEL_CONTENT_PADDING,\n FLOATING_PANEL_META_FONT_SIZE,\n FLOATING_PANEL_CONTROLS_GAP,\n FLOATING_PANEL_SURFACE_COLOR,\n FLOATING_PANEL_SURFACE_2_COLOR,\n FLOATING_PANEL_BORDER_COLOR,\n FLOATING_PANEL_MUTED_FG_COLOR,\n FLOATING_PANEL_SHADOW,\n} from \"../../constants/styles\";\n\nconst frameStyle: React.CSSProperties = {\n display: \"flex\",\n flexDirection: \"column\",\n borderRadius: FLOATING_PANEL_BORDER_RADIUS,\n border: `1px solid ${FLOATING_PANEL_BORDER_COLOR}`,\n background: FLOATING_PANEL_SURFACE_COLOR,\n overflow: \"hidden\",\n boxShadow: FLOATING_PANEL_SHADOW,\n};\n\nconst headerStyle: React.CSSProperties = {\n display: \"flex\",\n alignItems: \"center\",\n gap: FLOATING_PANEL_GAP,\n padding: `${FLOATING_PANEL_HEADER_PADDING_Y} ${FLOATING_PANEL_HEADER_PADDING_X}`,\n borderBottom: `1px solid ${FLOATING_PANEL_BORDER_COLOR}`,\n background: FLOATING_PANEL_SURFACE_2_COLOR,\n};\n\nconst titleStyle: React.CSSProperties = {\n fontWeight: 600,\n};\n\nconst metaStyle: React.CSSProperties = {\n marginLeft: \"auto\",\n color: FLOATING_PANEL_MUTED_FG_COLOR,\n fontSize: FLOATING_PANEL_META_FONT_SIZE,\n};\n\nconst controlsStyle: React.CSSProperties = {\n display: \"flex\",\n alignItems: \"center\",\n gap: FLOATING_PANEL_CONTROLS_GAP,\n};\n\nconst contentStyle: React.CSSProperties = {\n padding: FLOATING_PANEL_CONTENT_PADDING,\n overflow: \"auto\",\n};\n\nexport type FloatingPanelFrameProps = Omit<React.HTMLAttributes<HTMLDivElement>, \"className\" | \"style\"> & {\n style?: React.CSSProperties;\n};\n\nexport const FloatingPanelFrame = React.forwardRef<HTMLDivElement, FloatingPanelFrameProps>(function FloatingPanelFrame(\n { style: propStyle, ...props },\n ref,\n) {\n const combinedStyle = React.useMemo(() => ({ ...frameStyle, ...propStyle }), [propStyle]);\n return <div ref={ref} style={combinedStyle} {...props} />;\n});\n\nexport type FloatingPanelHeaderProps = Omit<React.HTMLAttributes<HTMLDivElement>, \"className\" | \"style\"> & {\n style?: React.CSSProperties;\n};\n\nexport const FloatingPanelHeader: React.FC<FloatingPanelHeaderProps> = ({ style: propStyle, ...props }) => {\n const combinedStyle = React.useMemo(() => ({ ...headerStyle, ...propStyle }), [propStyle]);\n return <div style={combinedStyle} {...props} />;\n};\n\nexport type FloatingPanelTitleProps = Omit<React.HTMLAttributes<HTMLSpanElement>, \"className\" | \"style\"> & {\n style?: React.CSSProperties;\n};\n\nexport const FloatingPanelTitle: React.FC<FloatingPanelTitleProps> = ({ style: propStyle, ...props }) => {\n const combinedStyle = React.useMemo(() => ({ ...titleStyle, ...propStyle }), [propStyle]);\n return <span style={combinedStyle} {...props} />;\n};\n\nexport type FloatingPanelMetaProps = Omit<React.HTMLAttributes<HTMLSpanElement>, \"className\" | \"style\"> & {\n style?: React.CSSProperties;\n};\n\nexport const FloatingPanelMeta: React.FC<FloatingPanelMetaProps> = ({ style: propStyle, ...props }) => {\n const combinedStyle = React.useMemo(() => ({ ...metaStyle, ...propStyle }), [propStyle]);\n return <span style={combinedStyle} {...props} />;\n};\n\nexport type FloatingPanelControlsProps = Omit<React.HTMLAttributes<HTMLDivElement>, \"className\" | \"style\"> & {\n style?: React.CSSProperties;\n};\n\nexport const FloatingPanelControls: React.FC<FloatingPanelControlsProps> = ({ style: propStyle, ...props }) => {\n const combinedStyle = React.useMemo(() => ({ ...controlsStyle, ...propStyle }), [propStyle]);\n return <div style={combinedStyle} {...props} />;\n};\n\nexport type FloatingPanelContentProps = Omit<React.HTMLAttributes<HTMLDivElement>, \"className\" | \"style\"> & {\n style?: React.CSSProperties;\n};\n\nexport const FloatingPanelContent = React.forwardRef<HTMLDivElement, FloatingPanelContentProps>(\n function FloatingPanelContent({ style: propStyle, ...props }, ref) {\n const combinedStyle = React.useMemo(() => ({ ...contentStyle, ...propStyle }), [propStyle]);\n return <div ref={ref} style={combinedStyle} {...props} />;\n },\n);\n\nFloatingPanelFrame.displayName = \"FloatingPanelFrame\";\nFloatingPanelHeader.displayName = \"FloatingPanelHeader\";\nFloatingPanelTitle.displayName = \"FloatingPanelTitle\";\nFloatingPanelMeta.displayName = \"FloatingPanelMeta\";\nFloatingPanelControls.displayName = \"FloatingPanelControls\";\nFloatingPanelContent.displayName = \"FloatingPanelContent\";\n\n"],"names":["frameStyle","FLOATING_PANEL_BORDER_RADIUS","FLOATING_PANEL_BORDER_COLOR","FLOATING_PANEL_SURFACE_COLOR","FLOATING_PANEL_SHADOW","headerStyle","FLOATING_PANEL_GAP","FLOATING_PANEL_HEADER_PADDING_Y","FLOATING_PANEL_HEADER_PADDING_X","FLOATING_PANEL_SURFACE_2_COLOR","titleStyle","metaStyle","FLOATING_PANEL_MUTED_FG_COLOR","FLOATING_PANEL_META_FONT_SIZE","controlsStyle","FLOATING_PANEL_CONTROLS_GAP","contentStyle","FLOATING_PANEL_CONTENT_PADDING","FloatingPanelFrame","React","propStyle","props","ref","combinedStyle","FloatingPanelHeader","jsx","FloatingPanelTitle","FloatingPanelMeta","FloatingPanelControls","FloatingPanelContent"],"mappings":"kYAmBMA,EAAkC,CACtC,QAAS,OACT,cAAe,SACf,aAAcC,EAAAA,6BACd,OAAQ,aAAaC,EAAAA,2BAA2B,GAChD,WAAYC,EAAAA,6BACZ,SAAU,SACV,UAAWC,EAAAA,qBACb,EAEMC,EAAmC,CACvC,QAAS,OACT,WAAY,SACZ,IAAKC,EAAAA,mBACL,QAAS,GAAGC,EAAAA,+BAA+B,IAAIC,EAAAA,+BAA+B,GAC9E,aAAc,aAAaN,EAAAA,2BAA2B,GACtD,WAAYO,EAAAA,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