File tree Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 11export { onRenderCallback } from "./profilerCallback" ;
2- export { FileProvider } from "./fileContext" ;
2+ export { FileProvider , FileContext } from "./fileContext" ;
33export { OutlineContext , OutlineProvider } from "./outlineContext" ;
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ export { TabContainer } from "./Tabs/tabContainer";
3636export { DynamicTabs } from "./Tabs/dynamicTabs" ;
3737export { XYPlot } from "./XYPlot/xyPlot" ;
3838export { Webcam } from "./Webcam/webcam" ;
39+ export { executeAction } from "./widgetActions" ;
3940
4041// By importing and calling this function you ensure all the
4142// above widgets are imported and thus registered.
Original file line number Diff line number Diff line change @@ -120,14 +120,15 @@ export const getActionDescription = (action: WidgetAction): string => {
120120export const openPage = (
121121 action : DynamicAction ,
122122 fileContext ?: FileContextType ,
123- parentMacros ?: MacroMap
123+ parentMacros ?: MacroMap ,
124+ pathname ?: string
124125) : void => {
125126 const { location, file } = action . dynamicInfo ;
126127 file . macros = {
127128 ...( parentMacros ?? { } ) ,
128129 ...file . macros
129130 } ;
130- fileContext ?. addPage ( location , file ) ;
131+ fileContext ?. addPage ( location , file , pathname ) ;
131132} ;
132133
133134export const closePage = (
@@ -163,12 +164,13 @@ export const executeAction = (
163164 action : WidgetAction ,
164165 files ?: FileContextType ,
165166 exitContext ?: ExitContextType ,
166- parentMacros ?: MacroMap
167+ parentMacros ?: MacroMap ,
168+ pathname ?: string
167169) : void => {
168170 switch ( action . type ) {
169171 case OPEN_PAGE :
170172 if ( files ) {
171- openPage ( action , files , parentMacros ) ;
173+ openPage ( action , files , parentMacros , pathname ) ;
172174 } else {
173175 log . error ( "Tried to open a page but no file context passed" ) ;
174176 }
You can’t perform that action at this time.
0 commit comments