@jsenv/navi 0.26.9 → 0.26.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.
@@ -6279,11 +6279,15 @@ const FLOW_PROPS = {
6279
6279
  inline: () => {},
6280
6280
  block: () => {},
6281
6281
  flex: () => {},
6282
+ flexWrap: applyToCssPropWhenTruthy("flexWrap", "wrap", "nowrap"),
6282
6283
  grid: () => {},
6283
6284
  gridTemplateColumns: PASS_THROUGH,
6284
6285
  display: PASS_THROUGH, // in case people write "display: none" (even if hidden prop is recommended)
6285
6286
  row: () => {},
6286
6287
  column: () => {},
6288
+
6289
+ // not really related to flow but should be on the container element if any
6290
+ pointerEvents: PASS_THROUGH,
6287
6291
  };
6288
6292
  const OUTER_SPACING_PROPS = {
6289
6293
  margin: PASS_THROUGH,
@@ -6567,6 +6571,7 @@ const TYPO_PROPS = {
6567
6571
  capitalize: applyToCssPropWhenTruthy("textTransform", "capitalize", "none"),
6568
6572
  uppercase: applyToCssPropWhenTruthy("textTransform", "uppercase", "none"),
6569
6573
  lowercase: applyToCssPropWhenTruthy("textTransform", "lowercase", "none"),
6574
+ letterSpacing: PASS_THROUGH,
6570
6575
  };
6571
6576
  const VISUAL_PROPS = {
6572
6577
  outline: PASS_THROUGH,
@@ -6585,10 +6590,15 @@ const VISUAL_PROPS = {
6585
6590
  borderRight: PASS_THROUGH,
6586
6591
  borderBottom: PASS_THROUGH,
6587
6592
  borderWidth: PASS_THROUGH,
6588
- borderRadius: PASS_THROUGH,
6589
6593
  borderColor: PASS_THROUGH,
6590
6594
  borderStyle: PASS_THROUGH,
6595
+ borderRadius: PASS_THROUGH,
6596
+ borderTopLeftRadius: PASS_THROUGH,
6597
+ borderTopRightRadius: PASS_THROUGH,
6598
+ borderBottomLeftRadius: PASS_THROUGH,
6599
+ borderBottomRightRadius: PASS_THROUGH,
6591
6600
  opacity: PASS_THROUGH,
6601
+ visibility: PASS_THROUGH,
6592
6602
  filter: PASS_THROUGH,
6593
6603
  cursor: PASS_THROUGH,
6594
6604
  transition: PASS_THROUGH,
@@ -14463,14 +14473,37 @@ const debug$1 = (...args) => {
14463
14473
  // - route → RouteLeafRoute (rendered by parent container when URL matches)
14464
14474
  // - fallback → RouteActive (rendered by parent container when no sibling matches)
14465
14475
  const Route = props => {
14466
- if (props.children) return jsx(RouteContainer, {
14467
- ...props
14468
- });
14476
+ if (props.children) {
14477
+ return jsx(RouteContainer, {
14478
+ ...props
14479
+ });
14480
+ }
14469
14481
  return jsx(RouteLeaf, {
14470
14482
  ...props
14471
14483
  });
14472
14484
  };
14473
-
14485
+ // RouteContainer: traverses children statically per render, finds the active branch,
14486
+ // and renders only that branch — or the fallback if nothing matches.
14487
+ // No effects, no signals, no contexts needed: reads route signals directly.
14488
+ const RouteContainer = ({
14489
+ id,
14490
+ element,
14491
+ elementProps,
14492
+ children
14493
+ }) => {
14494
+ const {
14495
+ activeBranch
14496
+ } = collectBranches(children);
14497
+ debug$1(`[container "${id}"] RENDER, active=${activeBranch ? activeBranch.type : "none"}`);
14498
+ const content = activeBranch ? activeBranch.node : null;
14499
+ if (!content) {
14500
+ return null;
14501
+ }
14502
+ if (element) {
14503
+ return h(element, elementProps, content);
14504
+ }
14505
+ return content;
14506
+ };
14474
14507
  // Walk JSX children vnodes (without rendering) to build a branch list and
14475
14508
  // find the active one in the same pass.
14476
14509
  // All children must be <Route> — throws in dev otherwise.
@@ -14540,52 +14573,34 @@ const collectBranches = children => {
14540
14573
  activeBranch
14541
14574
  };
14542
14575
  };
14543
- // RouteContainer: traverses children statically per render, finds the active branch,
14544
- // and renders only that branch — or the fallback if nothing matches.
14545
- // No effects, no signals, no contexts needed: reads route signals directly.
14546
- const RouteContainer = ({
14547
- id,
14548
- element,
14549
- elementProps,
14550
- children
14551
- }) => {
14552
- const {
14553
- activeBranch
14554
- } = collectBranches(children);
14555
- debug$1(`[container "${id}"] RENDER, active=${activeBranch ? activeBranch.type : "none"}`);
14556
- const content = activeBranch ? activeBranch.node : null;
14557
- if (!content) {
14558
- return null;
14576
+ const RouteLeaf = props => {
14577
+ if (props.route) {
14578
+ return jsx(RouteLeafRoute, {
14579
+ ...props
14580
+ });
14559
14581
  }
14560
- if (element) {
14561
- return h(element, elementProps, content);
14582
+ if (props.fallback) {
14583
+ return jsx(RouteLeafFallback, {
14584
+ ...props
14585
+ });
14562
14586
  }
14563
- return content;
14564
- };
14565
- const RouteLeaf = props => {
14566
- if (props.route) return jsx(RouteLeafRoute, {
14567
- ...props
14568
- });
14569
- if (props.fallback) return jsx(RouteLeafFallback, {
14570
- ...props
14571
- });
14572
14587
  // not supposed to happen?
14573
- return jsx(RouteActive, {
14588
+ return jsx(RouteUI, {
14574
14589
  ...props
14575
14590
  });
14576
14591
  };
14577
14592
  const RouteLeafRoute = props => {
14578
14593
  useUITransitionContentId(props.route?.urlPattern);
14579
- return jsx(RouteActive, {
14594
+ return jsx(RouteUI, {
14580
14595
  ...props
14581
14596
  });
14582
14597
  };
14583
14598
  const RouteLeafFallback = props => {
14584
- return jsx(RouteActive, {
14599
+ return jsx(RouteUI, {
14585
14600
  ...props
14586
14601
  });
14587
14602
  };
14588
- const RouteActive = ({
14603
+ const RouteUI = ({
14589
14604
  element,
14590
14605
  elementProps
14591
14606
  }) => {
@@ -14596,15 +14611,18 @@ const RouteActive = ({
14596
14611
  };
14597
14612
 
14598
14613
  const routeAction = (
14599
- route,
14614
+ routeOrRoutes,
14600
14615
  action,
14601
14616
  paramsEffect = () => true,
14602
14617
  options = {},
14603
14618
  ) => {
14619
+ const routeMatchingSignal = Array.isArray(routeOrRoutes)
14620
+ ? anyMatchingRouteSignal(routeOrRoutes)
14621
+ : routeOrRoutes.matchingSignal;
14604
14622
  const actionBoundToRoute = actionRunEffect(
14605
14623
  action,
14606
14624
  () => {
14607
- const matching = route.matchingSignal.value;
14625
+ const matching = routeMatchingSignal.value;
14608
14626
  const params = paramsEffect();
14609
14627
  if (!matching) {
14610
14628
  return null;
@@ -14617,6 +14635,31 @@ const routeAction = (
14617
14635
  return actionBoundToRoute;
14618
14636
  };
14619
14637
 
14638
+ // I delibrately prefer the term "any" and avoid "some" so dev are not tempted to think
14639
+ // "well I could just use array.some" and bypass this helper entirely, which would be incorrect:
14640
+ // This helper does return if some/any route is matching but ensure all route matching signals are read (subscribed to)
14641
+ // array.some would return as soon as it finds a match and would not subscribe to the rest of the signals.
14642
+ const anyMatchingRouteSignal = (routes) => {
14643
+ if (routes.length === 0) {
14644
+ return signal(false);
14645
+ }
14646
+ if (routes.length === 1) {
14647
+ const [route] = routes;
14648
+ return route.matchingSignal;
14649
+ }
14650
+ const anyMatchingSignal = computed(() => {
14651
+ let someMatching;
14652
+ for (const route of routes) {
14653
+ const matching = route.matchingSignal.value;
14654
+ if (matching) {
14655
+ someMatching = true;
14656
+ }
14657
+ }
14658
+ return someMatching;
14659
+ });
14660
+ return anyMatchingSignal;
14661
+ };
14662
+
14620
14663
  const FormContext = createContext();
14621
14664
 
14622
14665
  const FormActionContext = createContext();
@@ -37843,5 +37886,5 @@ const UserSvg = () => jsx("svg", {
37843
37886
  })
37844
37887
  });
37845
37888
 
37846
- export { ActionRenderer, ActiveKeyboardShortcuts, Address, Badge, BadgeCount, Box, Button, ButtonCopyToClipboard, Caption, CheckSvg, Checkbox, CheckboxList, CloseSvg, Code, Col, Colgroup, ConstructionSvg, Details, Dialog, DialogLayout, Editable, ErrorBoundary, ErrorBoundaryContext, ExclamationSvg, EyeClosedSvg, EyeSvg, Form, Group, Head, HeartSvg, HomeSvg, Icon, Image, Input, Interpolate, Label, Link, LinkAnchorSvg, LinkBlankTargetSvg, LinkCurrentSvg, List, ListItem, ListItemFooter, ListItemGroup, ListItemHeader, Loading, MessageBox, Meter, Nav, NaviDebug, Paragraph, Popover, Quantity, QuantityIntl, Radio, RadioList, Route, RowNumberCol, RowNumberTableCell, SVGMaskOverlay, SearchSvg, Select, SelectionContext, Separator, SettingsSvg, SidePanel, StarSvg, SummaryMarker, Svg, Table, TableCell, Tbody, Text, Thead, Title, Tr, UITransition, UserSvg, ViewportLayout, actionIntegratedVia, actionRunEffect, addCustomMessage, applySearch, arraySignalMembership, compareTwoJsValues, createAction, createAvailableConstraint, createIntl, createRequestCanceller, createSearch, createSelectionKeyboardShortcuts, enableDebugActions, enableDebugOnDocumentLoading, filterTableSelection, forwardActionRequested, installCustomConstraintValidation, isCellSelected, isColumnSelected, isRowSelected, localStorageSignal, navBack, navForward, navTo, openCallout, rawUrlPart, reload, removeCustomMessage, requestAction, requestListClose, requestListOpen, rerunActions, resource, route, routeAction, setBaseUrl, setupRoutes, stateSignal, stopLoad, stringifyTableSelectionValue, syncOwnedResourceToSignals, syncResourceToSignals, updateActions, useActionStatus, useArraySignalMembership, useAsyncData, useCalloutClose, useCancelPrevious, useCellGridFromRows, useConstraintValidityState, useDependenciesDiff, useDisplayedLayoutEffect, useDocumentResource, useDocumentState, useDocumentUrl, useEditionController, useFocusGroup, useKeyboardShortcuts, useNavState, useOrderedColumns, useRouteStatus, useRunOnMount, useSearchText, useSelectRequestClose, useSelectableElement, useSelectionController, useSidePanelClose, useSignalSync, useStateArray, useTitleLevel, useUrlSearchParam, valueInLocalStorage, windowWidthSignal };
37889
+ export { ActionRenderer, ActiveKeyboardShortcuts, Address, Badge, BadgeCount, Box, Button, ButtonCopyToClipboard, Caption, CheckSvg, Checkbox, CheckboxList, CloseSvg, Code, Col, Colgroup, ConstructionSvg, Details, Dialog, DialogLayout, Editable, ErrorBoundary, ErrorBoundaryContext, ExclamationSvg, EyeClosedSvg, EyeSvg, Form, Group, Head, HeartSvg, HomeSvg, Icon, Image, Input, Interpolate, Label, Link, LinkAnchorSvg, LinkBlankTargetSvg, LinkCurrentSvg, List, ListItem, ListItemFooter, ListItemGroup, ListItemHeader, Loading, MessageBox, Meter, Nav, NaviDebug, Paragraph, Popover, Quantity, QuantityIntl, Radio, RadioList, Route, RowNumberCol, RowNumberTableCell, SVGMaskOverlay, SearchSvg, Select, SelectionContext, Separator, SettingsSvg, SidePanel, StarSvg, SummaryMarker, Svg, Table, TableCell, Tbody, Text, Thead, Title, Tr, UITransition, UserSvg, ViewportLayout, actionIntegratedVia, actionRunEffect, addCustomMessage, anyMatchingRouteSignal, applySearch, arraySignalMembership, compareTwoJsValues, createAction, createAvailableConstraint, createIntl, createRequestCanceller, createSearch, createSelectionKeyboardShortcuts, enableDebugActions, enableDebugOnDocumentLoading, filterTableSelection, forwardActionRequested, installCustomConstraintValidation, isCellSelected, isColumnSelected, isRowSelected, localStorageSignal, navBack, navForward, navTo, openCallout, rawUrlPart, reload, removeCustomMessage, requestAction, requestListClose, requestListOpen, rerunActions, resource, route, routeAction, setBaseUrl, setupRoutes, stateSignal, stopLoad, stringifyTableSelectionValue, syncOwnedResourceToSignals, syncResourceToSignals, updateActions, useActionStatus, useArraySignalMembership, useAsyncData, useCalloutClose, useCancelPrevious, useCellGridFromRows, useConstraintValidityState, useDependenciesDiff, useDisplayedLayoutEffect, useDocumentResource, useDocumentState, useDocumentUrl, useEditionController, useFocusGroup, useKeyboardShortcuts, useNavState, useOrderedColumns, useRouteStatus, useRunOnMount, useSearchText, useSelectRequestClose, useSelectableElement, useSelectionController, useSidePanelClose, useSignalSync, useStateArray, useTitleLevel, useUrlSearchParam, valueInLocalStorage, windowWidthSignal };
37847
37890
  //# sourceMappingURL=jsenv_navi.js.map