@@ -44,6 +44,7 @@ async function compileWidgetSource(source: string): Promise<Result<string, strin
4444 __STACK_WIDGET_RESOLVE(widget);
4545 ` ,
4646 } , {
47+ format : 'iife' ,
4748 externalPackages : {
4849 'react' : 'module.exports = React;' ,
4950 'react/jsx-runtime' : 'module.exports = jsxRuntime;' ,
@@ -803,7 +804,7 @@ const widgets: Widget<any, any>[] = [
803804 isSingleColumnMode = { isSingleColumnMode ? "auto" : false }
804805 gridRef = { widgetGridRef }
805806 allowVariableHeight = { false }
806- isStatic = { true }
807+ isStatic = { false }
807808 />
808809 </ div >
809810 ) ;
@@ -994,15 +995,15 @@ function SingleWidget(props: {
994995 ( widgetInstance ) => {
995996 return WidgetInstanceGrid . fromSingleWidgetInstance ( widgetInstance ) ;
996997 } ,
997- ( widgetInstance , grid ) => grid . getInstanceById ( widgetInstance . id ) ?? throwErr ( `Widget instance ${ widgetInstance . id } not found in grid` , { widgetInstance } ) ,
998+ ( widgetInstance , grid ) => grid . getInstanceById ( widgetInstance . id ) ?? /* widget deleted, let's reset to last known state */ widgetInstance ,
998999 ) ;
9991000
10001001 return (
10011002 < SwappableWidgetInstanceGrid
10021003 gridRef = { widgetGridRef }
10031004 isSingleColumnMode = { true }
10041005 allowVariableHeight = { true }
1005- isStatic = { false }
1006+ isStatic = { true }
10061007 />
10071008 ) ;
10081009}
@@ -1219,6 +1220,14 @@ function SwappableWidgetInstanceGrid(props: { gridRef: RefState<WidgetInstanceGr
12191220 event . over . rect . width ,
12201221 event . over . rect . height ,
12211222 ] ] ) ;
1223+ console . log ( "newHoverElementSwap" , [
1224+ event . over . rect . left - event . active . rect . current . initial . left ,
1225+ event . over . rect . top - event . active . rect . current . initial . top ,
1226+ event . active . rect . current . initial . width ,
1227+ event . active . rect . current . initial . height ,
1228+ event . over . rect . width ,
1229+ event . over . rect . height ,
1230+ ] ) ;
12221231 } else {
12231232 setHoverElementSwap ( null ) ;
12241233 }
@@ -1233,6 +1242,7 @@ function SwappableWidgetInstanceGrid(props: { gridRef: RefState<WidgetInstanceGr
12331242 { props . gridRef . current . elements ( ) . map ( ( { instance, x, y, width, height } ) => {
12341243 const isHoverSwap = ! ! hoverElementSwap && ! ! instance && ( hoverElementSwap [ 0 ] === instance . id ) ;
12351244
1245+
12361246 if ( isSingleColumnMode && ! instance ) {
12371247 if ( hasAlreadyRenderedEmpty ) return null ;
12381248 hasAlreadyRenderedEmpty = true ;
0 commit comments