@jsenv/navi 0.29.438 → 0.29.439
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/dev/jsenv_navi.js +44 -6
- package/dist/dev/jsenv_navi.js.map +2 -2
- package/dist/jsenv_navi.js +44 -6
- package/dist/jsenv_navi.js.map +2 -2
- package/docs/dynamic_import.md +3 -1
- package/docs/resource.md +3 -2
- package/package.json +1 -1
package/dist/dev/jsenv_navi.js
CHANGED
|
@@ -39265,13 +39265,10 @@ let activeRouteActionsPrevious = new Set();
|
|
|
39265
39265
|
* The route actions asking something for the page on screen: their route
|
|
39266
39266
|
* matches and their params getter returns something — the running ones, not
|
|
39267
39267
|
* every matching one, so an action bound to every page that asks only when a
|
|
39268
|
-
* popup is open over it counts while it is open.
|
|
39269
|
-
*
|
|
39268
|
+
* popup is open over it counts while it is open. The page's code included (see
|
|
39269
|
+
* `activeRouteReadsSignal` for the set to rerun). Read by `keepPageOnScreen`.
|
|
39270
39270
|
* The set is handed out again only when its members change.
|
|
39271
39271
|
*
|
|
39272
|
-
* A page's code is declared as a route action too; `action.meta.verb` says
|
|
39273
|
-
* which ones read data.
|
|
39274
|
-
*
|
|
39275
39272
|
* @type {import("@preact/signals").ReadonlySignal<Set<object>>}
|
|
39276
39273
|
*/
|
|
39277
39274
|
const activeRouteActionsSignal = computed(() => {
|
|
@@ -39288,6 +39285,36 @@ const activeRouteActionsSignal = computed(() => {
|
|
|
39288
39285
|
return active;
|
|
39289
39286
|
});
|
|
39290
39287
|
|
|
39288
|
+
let activeRouteReadsPrevious = new Set();
|
|
39289
|
+
/**
|
|
39290
|
+
* `activeRouteActionsSignal` without the page's code: what to rerun to read
|
|
39291
|
+
* the page on screen again, the app back from the background. A page's code
|
|
39292
|
+
* has nothing to read again — a module does not change until a deploy — and
|
|
39293
|
+
* rerunning it is not free: a page reading its code the delegated way
|
|
39294
|
+
* (`useAsyncData(CODE)` under a `<Loading>`) leaves the document for the frame
|
|
39295
|
+
* the import takes, and its lists lose their scroll position.
|
|
39296
|
+
*
|
|
39297
|
+
* Code is told by its answer: a function (the page component) or a module
|
|
39298
|
+
* namespace. An import that failed has none and stays in the set; rerun, it
|
|
39299
|
+
* fails again at once, since the document refuses a module it failed to fetch.
|
|
39300
|
+
*
|
|
39301
|
+
* @type {import("@preact/signals").ReadonlySignal<Set<object>>}
|
|
39302
|
+
*/
|
|
39303
|
+
const activeRouteReadsSignal = computed(() => {
|
|
39304
|
+
const reads = new Set();
|
|
39305
|
+
for (const routeAction of activeRouteActionsSignal.value) {
|
|
39306
|
+
if (isCode(routeAction.valueSignal.value)) {
|
|
39307
|
+
continue;
|
|
39308
|
+
}
|
|
39309
|
+
reads.add(routeAction);
|
|
39310
|
+
}
|
|
39311
|
+
if (haveSameMembers(reads, activeRouteReadsPrevious)) {
|
|
39312
|
+
return activeRouteReadsPrevious;
|
|
39313
|
+
}
|
|
39314
|
+
activeRouteReadsPrevious = reads;
|
|
39315
|
+
return reads;
|
|
39316
|
+
});
|
|
39317
|
+
|
|
39291
39318
|
/**
|
|
39292
39319
|
* Binds an action to a route: it runs when the route matches, with the params
|
|
39293
39320
|
* the effect reads off the address, runs again on a `reload()`, and is aborted
|
|
@@ -39444,6 +39471,17 @@ const anyMatchingRouteSignal = (routes) => {
|
|
|
39444
39471
|
return anyMatchingSignal;
|
|
39445
39472
|
};
|
|
39446
39473
|
|
|
39474
|
+
const isCode = (value) => {
|
|
39475
|
+
if (typeof value === "function") {
|
|
39476
|
+
return true;
|
|
39477
|
+
}
|
|
39478
|
+
return (
|
|
39479
|
+
value !== null &&
|
|
39480
|
+
typeof value === "object" &&
|
|
39481
|
+
value[Symbol.toStringTag] === "Module"
|
|
39482
|
+
);
|
|
39483
|
+
};
|
|
39484
|
+
|
|
39447
39485
|
const rootActionOf = (action) => {
|
|
39448
39486
|
if (action.isProxy) {
|
|
39449
39487
|
return rootActionOf(getActionPrivateProperties(action).currentAction);
|
|
@@ -96592,5 +96630,5 @@ const UserSvg = () => jsx("svg", {
|
|
|
96592
96630
|
})
|
|
96593
96631
|
});
|
|
96594
96632
|
|
|
96595
|
-
export { ActionRenderer, ActiveKeyboardShortcuts, Address, Badge, BadgeCount, BadgeList, Binder, Box, Button, ButtonCopyToClipboard, CalloutStatusIcon, Caption, CardLayout, CheckSvg, CheckboxGroup, CloseSvg, Code, Col, Colgroup, Color, ConstructionSvg, ControlGroup, ControlSwap, DaySpin, Details, Dialog, Editable, ErrorBoundary, ErrorBoundaryContext, ExclamationSvg, Expandable, EyeClosedSvg, EyeSvg, Field, FixedBar, Form, Group, Head, HeartSvg, HomeSvg, Icon, Image, InfoSvg, Input, InputDuration, Interpolate, Label, Link, LinkAnchorSvg, LinkBlankTargetSvg, LinkCurrentSvg, List, ListItem, ListItemGroup, ListItems, Loading, LoadingDotsSvg, LoadingIndicator, LoadingIndicatorFluid, LoadingOutline, MessageBox, Meter, Nav, NaviDebug, NetworkPolicyError, NumberSpin, Paragraph, Picker, Popover, Popup, Quantity, RadioGroup, Route, RouteTransitionArea, RouteTravel, RowNumberCol, RowNumberTableCell, SVGMaskOverlay, SearchSvg, Select, SelectableInput, SelectionContext, Separator, SettingsSvg, SidePanel, Slide, SlideContainer, Spin, SpinGroup, SplitButton, StarSvg, Step, StepList, SummaryMarker, Svg, Table, TableCell, Tbody, Text, TextBox, Textarea, TextareaCharCount, Thead, Time, TimeRange, TimeRangeSpin, TimeRangeWheel, TimeSpin, TimeWheel, Title, Tr, UITransition, Unit, UserSvg, ViewportLayout, Wheel, WheelGroup, WheelItem, actionRunEffect, activeRouteActionsSignal, anyMatchingRouteSignal, applySearch, arraySignalMembership, canNavBackSignal, canNavForwardSignal, coarsePointerSignal, compareTwoJsValues, constraintFromValidityRule, createAction, createAvailableConstraint, createRequestCanceller, createSearch, createSelectionKeyboardShortcuts, createSlot, defineInteractionDetector, defineRouteDefaultTransition, defineRouteTransition, detectHorizontalOverflow, dispatchRequestSetUIState, enableDebugActions, enableDebugOnDocumentLoading, enableVirtualKeyboardOverlay, ensureDocumentStartViewTransition, errorIsDisplayed, filterTableSelection, getNowHours, getNowHoursRoundedToStep, isCellSelected, isColumnSelected, isNetworkPolicyError, isRowSelected, isScrolling, isToday, keepPageOnScreen, languagesSignal, localStorageSignal, markAsOutsideTextFlow, markErrorAsDisplayedBy, moveArrayItemByIndex, moveFocusTo, navBack, navForward, navIntegratedVia, navTo, naviI18n, openCallout, preloadUrl, rawUrlPart, registerGlobalConstraint, reload, rerunActions, resource, route, routeAction, routeFallback, scrollActivitySignal, setBaseUrl, setNetworkPolicy, setPreferredLanguage, setSupportedLanguages, setUrlTargetOptions, setupRoutes, smallTouchScreenSignal, stateSignal, stopLoad, stringifyTableSelectionValue, swapArrayItemByIndex, syncOwnedResourceToSignals, syncResourceToSignals, triggerNaviCommand, updateActions, useActionStatus, useArraySignalMembership, useAsyncData, useCalloutElement, useCalloutRequestClose, useCanNavBack, useCanNavForward, useCancelPrevious, useCellGridFromRows, useConstraintValidityState, useDependenciesDiff, useDisplayedLayoutEffect, useDocumentResource, useDocumentState, useDocumentUrl, useEditionController, useFocusGroup, useInputGroup, useKeyboardShortcuts, useNavState, useNetworkPolicyReason, useOrderedColumns, usePickerState, usePopupMode, useRouteStatus, useSearchText, useSelectableElement, useSelectionController, useSignalSync, useSlideContainer, useSlideValue, useStateArray, useTitleLevel, useTransitionCover, useUrlSearchParam, useUrlTargetId, valueInLocalStorage, windowWidthSignal };
|
|
96633
|
+
export { ActionRenderer, ActiveKeyboardShortcuts, Address, Badge, BadgeCount, BadgeList, Binder, Box, Button, ButtonCopyToClipboard, CalloutStatusIcon, Caption, CardLayout, CheckSvg, CheckboxGroup, CloseSvg, Code, Col, Colgroup, Color, ConstructionSvg, ControlGroup, ControlSwap, DaySpin, Details, Dialog, Editable, ErrorBoundary, ErrorBoundaryContext, ExclamationSvg, Expandable, EyeClosedSvg, EyeSvg, Field, FixedBar, Form, Group, Head, HeartSvg, HomeSvg, Icon, Image, InfoSvg, Input, InputDuration, Interpolate, Label, Link, LinkAnchorSvg, LinkBlankTargetSvg, LinkCurrentSvg, List, ListItem, ListItemGroup, ListItems, Loading, LoadingDotsSvg, LoadingIndicator, LoadingIndicatorFluid, LoadingOutline, MessageBox, Meter, Nav, NaviDebug, NetworkPolicyError, NumberSpin, Paragraph, Picker, Popover, Popup, Quantity, RadioGroup, Route, RouteTransitionArea, RouteTravel, RowNumberCol, RowNumberTableCell, SVGMaskOverlay, SearchSvg, Select, SelectableInput, SelectionContext, Separator, SettingsSvg, SidePanel, Slide, SlideContainer, Spin, SpinGroup, SplitButton, StarSvg, Step, StepList, SummaryMarker, Svg, Table, TableCell, Tbody, Text, TextBox, Textarea, TextareaCharCount, Thead, Time, TimeRange, TimeRangeSpin, TimeRangeWheel, TimeSpin, TimeWheel, Title, Tr, UITransition, Unit, UserSvg, ViewportLayout, Wheel, WheelGroup, WheelItem, actionRunEffect, activeRouteActionsSignal, activeRouteReadsSignal, anyMatchingRouteSignal, applySearch, arraySignalMembership, canNavBackSignal, canNavForwardSignal, coarsePointerSignal, compareTwoJsValues, constraintFromValidityRule, createAction, createAvailableConstraint, createRequestCanceller, createSearch, createSelectionKeyboardShortcuts, createSlot, defineInteractionDetector, defineRouteDefaultTransition, defineRouteTransition, detectHorizontalOverflow, dispatchRequestSetUIState, enableDebugActions, enableDebugOnDocumentLoading, enableVirtualKeyboardOverlay, ensureDocumentStartViewTransition, errorIsDisplayed, filterTableSelection, getNowHours, getNowHoursRoundedToStep, isCellSelected, isColumnSelected, isNetworkPolicyError, isRowSelected, isScrolling, isToday, keepPageOnScreen, languagesSignal, localStorageSignal, markAsOutsideTextFlow, markErrorAsDisplayedBy, moveArrayItemByIndex, moveFocusTo, navBack, navForward, navIntegratedVia, navTo, naviI18n, openCallout, preloadUrl, rawUrlPart, registerGlobalConstraint, reload, rerunActions, resource, route, routeAction, routeFallback, scrollActivitySignal, setBaseUrl, setNetworkPolicy, setPreferredLanguage, setSupportedLanguages, setUrlTargetOptions, setupRoutes, smallTouchScreenSignal, stateSignal, stopLoad, stringifyTableSelectionValue, swapArrayItemByIndex, syncOwnedResourceToSignals, syncResourceToSignals, triggerNaviCommand, updateActions, useActionStatus, useArraySignalMembership, useAsyncData, useCalloutElement, useCalloutRequestClose, useCanNavBack, useCanNavForward, useCancelPrevious, useCellGridFromRows, useConstraintValidityState, useDependenciesDiff, useDisplayedLayoutEffect, useDocumentResource, useDocumentState, useDocumentUrl, useEditionController, useFocusGroup, useInputGroup, useKeyboardShortcuts, useNavState, useNetworkPolicyReason, useOrderedColumns, usePickerState, usePopupMode, useRouteStatus, useSearchText, useSelectableElement, useSelectionController, useSignalSync, useSlideContainer, useSlideValue, useStateArray, useTitleLevel, useTransitionCover, useUrlSearchParam, useUrlTargetId, valueInLocalStorage, windowWidthSignal };
|
|
96596
96634
|
//# sourceMappingURL=jsenv_navi.js.map
|