@jsenv/navi 0.20.9 → 0.20.11
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/jsenv_navi.js +80 -19
- package/dist/jsenv_navi.js.map +7 -5
- package/package.json +1 -1
package/dist/jsenv_navi.js
CHANGED
|
@@ -9347,18 +9347,9 @@ const createRoutePattern = (pattern, { searchParams = {} } = {}) => {
|
|
|
9347
9347
|
([, value]) => value === literalValue,
|
|
9348
9348
|
);
|
|
9349
9349
|
|
|
9350
|
-
// Check if any signal
|
|
9351
|
-
//
|
|
9352
|
-
|
|
9353
|
-
const signals = [];
|
|
9354
|
-
let current = pattern;
|
|
9355
|
-
while (current) {
|
|
9356
|
-
signals.push(...current.connections);
|
|
9357
|
-
current = current.parent;
|
|
9358
|
-
}
|
|
9359
|
-
return signals;
|
|
9360
|
-
};
|
|
9361
|
-
|
|
9350
|
+
// Check if any descendant signal can provide this literal
|
|
9351
|
+
// (ancestor signals are excluded since they operate on different path positions
|
|
9352
|
+
// that the current pattern has already "passed")
|
|
9362
9353
|
const getDescendantSignals = (pattern) => {
|
|
9363
9354
|
const signals = [...pattern.connections];
|
|
9364
9355
|
for (const child of pattern.children) {
|
|
@@ -9367,12 +9358,9 @@ const createRoutePattern = (pattern, { searchParams = {} } = {}) => {
|
|
|
9367
9358
|
return signals;
|
|
9368
9359
|
};
|
|
9369
9360
|
|
|
9370
|
-
const
|
|
9371
|
-
...getAncestorSignals(patternObject),
|
|
9372
|
-
...getDescendantSignals(patternObject),
|
|
9373
|
-
];
|
|
9361
|
+
const descendantSignals = getDescendantSignals(patternObject);
|
|
9374
9362
|
|
|
9375
|
-
const systemCanProvide =
|
|
9363
|
+
const systemCanProvide = descendantSignals.some((conn) => {
|
|
9376
9364
|
const signalValue = conn.signal.value;
|
|
9377
9365
|
return signalValue === literalValue && conn.isCustomValue(signalValue);
|
|
9378
9366
|
});
|
|
@@ -9956,8 +9944,12 @@ const createRoutePattern = (pattern, { searchParams = {} } = {}) => {
|
|
|
9956
9944
|
|
|
9957
9945
|
const parentPatternObj = currentPatternObj.parent;
|
|
9958
9946
|
|
|
9959
|
-
// Add parent's signal parameters
|
|
9947
|
+
// Add parent's signal parameters (query params only, not path params)
|
|
9948
|
+
// Path params from ancestors are structural path segments, not inheritable
|
|
9960
9949
|
for (const connection of parentPatternObj.connections) {
|
|
9950
|
+
if (connection.paramType === "path") {
|
|
9951
|
+
continue;
|
|
9952
|
+
}
|
|
9961
9953
|
const { paramName } = connection;
|
|
9962
9954
|
|
|
9963
9955
|
// Skip if child route already handles this parameter
|
|
@@ -10934,7 +10926,12 @@ const createRoutePattern = (pattern, { searchParams = {} } = {}) => {
|
|
|
10934
10926
|
// Traverse up the parent chain to inherit parameters
|
|
10935
10927
|
while (currentParent) {
|
|
10936
10928
|
// Check parent's signal connections for non-default values to inherit
|
|
10929
|
+
// Only inherit query (search) parameters, not path parameters
|
|
10930
|
+
// Path parameters are structural and correspond to specific path segments
|
|
10937
10931
|
for (const parentConnection of currentParent.connections) {
|
|
10932
|
+
if (parentConnection.paramType === "path") {
|
|
10933
|
+
continue;
|
|
10934
|
+
}
|
|
10938
10935
|
const { paramName } = parentConnection;
|
|
10939
10936
|
if (paramName in finalParams) {
|
|
10940
10937
|
continue; // Already have this parameter
|
|
@@ -30147,6 +30144,70 @@ const Address = ({
|
|
|
30147
30144
|
});
|
|
30148
30145
|
};
|
|
30149
30146
|
|
|
30147
|
+
installImportMetaCss(import.meta);import.meta.css = /* css */`
|
|
30148
|
+
@layer navi {
|
|
30149
|
+
}
|
|
30150
|
+
.navi_badge {
|
|
30151
|
+
--font-size: 0.7em;
|
|
30152
|
+
--x-background: var(--background);
|
|
30153
|
+
--x-background-color: var(--background-color, var(--x-background));
|
|
30154
|
+
--x-color-contrasting: var(--navi-color-black);
|
|
30155
|
+
--x-color: var(--color, var(--x-color-contrasting));
|
|
30156
|
+
--padding-x: 0.8em;
|
|
30157
|
+
--padding-y: 0.4em;
|
|
30158
|
+
position: relative;
|
|
30159
|
+
display: inline-block;
|
|
30160
|
+
padding-top: var(--padding-y);
|
|
30161
|
+
padding-right: var(--padding-x);
|
|
30162
|
+
padding-bottom: var(--padding-y);
|
|
30163
|
+
padding-left: var(--padding-x);
|
|
30164
|
+
color: var(--x-color);
|
|
30165
|
+
font-size: var(--font-size);
|
|
30166
|
+
line-height: normal;
|
|
30167
|
+
background: var(--x-background);
|
|
30168
|
+
background-color: var(--x-background-color);
|
|
30169
|
+
border-radius: 1em;
|
|
30170
|
+
|
|
30171
|
+
&[data-dark-background] {
|
|
30172
|
+
--x-color-contrasting: var(--navi-color-white);
|
|
30173
|
+
}
|
|
30174
|
+
}
|
|
30175
|
+
`;
|
|
30176
|
+
const BadgeStyleCSSVars$1 = {
|
|
30177
|
+
borderWidth: "--border-width",
|
|
30178
|
+
borderRadius: "--border-radius",
|
|
30179
|
+
paddingRight: "--padding-right",
|
|
30180
|
+
paddingLeft: "--padding-left",
|
|
30181
|
+
backgroundColor: "--background-color",
|
|
30182
|
+
background: "--background",
|
|
30183
|
+
borderColor: "--border-color",
|
|
30184
|
+
color: "--color",
|
|
30185
|
+
fontSize: "--font-size"
|
|
30186
|
+
};
|
|
30187
|
+
const Badge = ({
|
|
30188
|
+
children,
|
|
30189
|
+
...props
|
|
30190
|
+
}) => {
|
|
30191
|
+
const defaultRef = useRef();
|
|
30192
|
+
const ref = props.ref || defaultRef;
|
|
30193
|
+
useDarkBackgroundAttribute(ref);
|
|
30194
|
+
return jsxs(Text, {
|
|
30195
|
+
ref: ref,
|
|
30196
|
+
className: "navi_badge",
|
|
30197
|
+
bold: true,
|
|
30198
|
+
...props,
|
|
30199
|
+
styleCSSVars: BadgeStyleCSSVars$1,
|
|
30200
|
+
spacing: "pre",
|
|
30201
|
+
children: [jsx("span", {
|
|
30202
|
+
style: "user-select: none",
|
|
30203
|
+
children: "\u200B"
|
|
30204
|
+
}), children, jsx("span", {
|
|
30205
|
+
style: "user-select: none",
|
|
30206
|
+
children: "\u200B"
|
|
30207
|
+
})]
|
|
30208
|
+
});
|
|
30209
|
+
};
|
|
30210
|
+
|
|
30150
30211
|
const LoadingDots = () => {
|
|
30151
30212
|
return jsxs("svg", {
|
|
30152
30213
|
viewBox: "0 0 200 200",
|
|
@@ -31956,5 +32017,5 @@ const UserSvg = () => jsx("svg", {
|
|
|
31956
32017
|
})
|
|
31957
32018
|
});
|
|
31958
32019
|
|
|
31959
|
-
export { ActionRenderer, ActiveKeyboardShortcuts, Address, BadgeCount, Box, Button, ButtonCopyToClipboard, Caption, CheckSvg, Checkbox, CheckboxList, Code, Col, Colgroup, ConstructionSvg, Details, DialogLayout, Editable, ErrorBoundary, ErrorBoundaryContext, ExclamationSvg, EyeClosedSvg, EyeSvg, Form, Group, Head, HeartSvg, HomeSvg, Icon, Image, Input, Label, Link, LinkAnchorSvg, LinkBlankTargetSvg, LinkCurrentSvg, Loading, MessageBox, Meter, Nav, Paragraph, Quantity, QuantityIntl, Radio, RadioList, Route, RowNumberCol, RowNumberTableCell, SINGLE_SPACE_CONSTRAINT, SVGMaskOverlay, SearchSvg, Select, SelectionContext, Separator, SettingsSvg, SidePanel, StarSvg, SummaryMarker, Svg, Table, TableCell, Tbody, Text, TextPlaceholder, Thead, Title, Tr, UITransition, UserSvg, ViewportLayout, actionIntegratedVia, actionRunEffect, addCustomMessage, arraySignalMembership, compareTwoJsValues, createAction, createAvailableConstraint, createIntl, createRequestCanceller, createSelectionKeyboardShortcuts, enableDebugActions, enableDebugOnDocumentLoading, filterTableSelection, forwardActionRequested, installCustomConstraintValidation, isCellSelected, isColumnSelected, isRowSelected, localStorageSignal, navBack, navForward, navTo, openCallout, rawUrlPart, reload, removeCustomMessage, requestAction, rerunActions, resource, route, routeAction, setBaseUrl, setupRoutes, stateSignal, stopLoad, stringifyTableSelectionValue, syncOwnedResourceToSignals, syncResourceToSignals, updateActions, useActionStatus, useArraySignalMembership, useAsyncData, useCalloutClose, useCancelPrevious, useCellGridFromRows, useConstraintValidityState, useDarkBackgroundAttribute, useDependenciesDiff, useDocumentResource, useDocumentState, useDocumentUrl, useEditionController, useFocusGroup, useKeyboardShortcuts, useNavState$1 as useNavState, useOrderedColumns, useRouteStatus, useRunOnMount, useSelectableElement, useSelectionController, useSidePanelClose, useSignalSync, useStateArray, useTitleLevel, useUrlSearchParam, valueInLocalStorage };
|
|
32020
|
+
export { ActionRenderer, ActiveKeyboardShortcuts, Address, Badge, BadgeCount, Box, Button, ButtonCopyToClipboard, Caption, CheckSvg, Checkbox, CheckboxList, Code, Col, Colgroup, ConstructionSvg, Details, DialogLayout, Editable, ErrorBoundary, ErrorBoundaryContext, ExclamationSvg, EyeClosedSvg, EyeSvg, Form, Group, Head, HeartSvg, HomeSvg, Icon, Image, Input, Label, Link, LinkAnchorSvg, LinkBlankTargetSvg, LinkCurrentSvg, Loading, MessageBox, Meter, Nav, Paragraph, Quantity, QuantityIntl, Radio, RadioList, Route, RowNumberCol, RowNumberTableCell, SINGLE_SPACE_CONSTRAINT, SVGMaskOverlay, SearchSvg, Select, SelectionContext, Separator, SettingsSvg, SidePanel, StarSvg, SummaryMarker, Svg, Table, TableCell, Tbody, Text, TextPlaceholder, Thead, Title, Tr, UITransition, UserSvg, ViewportLayout, actionIntegratedVia, actionRunEffect, addCustomMessage, arraySignalMembership, compareTwoJsValues, createAction, createAvailableConstraint, createIntl, createRequestCanceller, createSelectionKeyboardShortcuts, enableDebugActions, enableDebugOnDocumentLoading, filterTableSelection, forwardActionRequested, installCustomConstraintValidation, isCellSelected, isColumnSelected, isRowSelected, localStorageSignal, navBack, navForward, navTo, openCallout, rawUrlPart, reload, removeCustomMessage, requestAction, rerunActions, resource, route, routeAction, setBaseUrl, setupRoutes, stateSignal, stopLoad, stringifyTableSelectionValue, syncOwnedResourceToSignals, syncResourceToSignals, updateActions, useActionStatus, useArraySignalMembership, useAsyncData, useCalloutClose, useCancelPrevious, useCellGridFromRows, useConstraintValidityState, useDarkBackgroundAttribute, useDependenciesDiff, useDocumentResource, useDocumentState, useDocumentUrl, useEditionController, useFocusGroup, useKeyboardShortcuts, useNavState$1 as useNavState, useOrderedColumns, useRouteStatus, useRunOnMount, useSelectableElement, useSelectionController, useSidePanelClose, useSignalSync, useStateArray, useTitleLevel, useUrlSearchParam, valueInLocalStorage };
|
|
31960
32021
|
//# sourceMappingURL=jsenv_navi.js.map
|