@omerdlw/base-framework 3.2.2 → 3.3.0

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.
Files changed (52) hide show
  1. package/MIGRATION.md +11 -0
  2. package/dist/ambient/index.js +1 -1
  3. package/dist/ambient/server/index.js +2 -2
  4. package/dist/ambient/worker/index.js +1 -1
  5. package/dist/{chunk-MMVVHQ7V.js → chunk-67MOKJFZ.js} +174 -75
  6. package/dist/chunk-67MOKJFZ.js.map +1 -0
  7. package/dist/{chunk-2LGI33JP.js → chunk-GKAJ4EM2.js} +169 -73
  8. package/dist/chunk-GKAJ4EM2.js.map +1 -0
  9. package/dist/{chunk-FXO4QJQ4.js → chunk-K3LXE6D5.js} +6 -6
  10. package/dist/{chunk-FXO4QJQ4.js.map → chunk-K3LXE6D5.js.map} +1 -1
  11. package/dist/{chunk-2EFQJITY.js → chunk-NCXFWCXP.js} +263 -229
  12. package/dist/chunk-NCXFWCXP.js.map +1 -0
  13. package/dist/{chunk-TKOGBAW3.js → chunk-UE2KBW3D.js} +3 -3
  14. package/dist/{chunk-TKOGBAW3.js.map → chunk-UE2KBW3D.js.map} +1 -1
  15. package/dist/{chunk-7XUAYJOA.js → chunk-VNSMNGWP.js} +3 -3
  16. package/dist/{chunk-7XUAYJOA.js.map → chunk-VNSMNGWP.js.map} +1 -1
  17. package/dist/{chunk-FS2R34VD.js → chunk-XGAYTDSI.js} +36 -36
  18. package/dist/chunk-XGAYTDSI.js.map +1 -0
  19. package/dist/context-menu/index.js +3 -3
  20. package/dist/dock/index.js +2 -2
  21. package/dist/index.js +6 -6
  22. package/dist/modules/ambient/analyze-ground.d.ts +42 -0
  23. package/dist/modules/ambient/analyze-ground.d.ts.map +1 -0
  24. package/dist/modules/ambient/analyze.d.ts +1 -1
  25. package/dist/modules/ambient/analyze.d.ts.map +1 -1
  26. package/dist/modules/ambient/dom.d.ts.map +1 -1
  27. package/dist/modules/ambient/hooks.d.ts.map +1 -1
  28. package/dist/modules/ambient/settings.d.ts.map +1 -1
  29. package/dist/modules/ambient/types.d.ts +16 -4
  30. package/dist/modules/ambient/types.d.ts.map +1 -1
  31. package/dist/modules/dock/hooks/use-dock-height-controller.d.ts +1 -1
  32. package/dist/modules/dock/hooks/use-dock-height-controller.d.ts.map +1 -1
  33. package/dist/modules/dock/hooks/use-dock-viewport.d.ts.map +1 -1
  34. package/dist/modules/dock/model/layout.d.ts +19 -4
  35. package/dist/modules/dock/model/layout.d.ts.map +1 -1
  36. package/dist/modules/dock/model/paths.d.ts +7 -0
  37. package/dist/modules/dock/model/paths.d.ts.map +1 -1
  38. package/dist/modules/dock/runtime/dock.d.ts.map +1 -1
  39. package/dist/modules/dock/runtime/hooks/use-dock.d.ts.map +1 -1
  40. package/dist/modules/dock/types/card.d.ts +6 -0
  41. package/dist/modules/dock/types/card.d.ts.map +1 -1
  42. package/dist/modules/dock/types/theme.d.ts +20 -0
  43. package/dist/modules/dock/types/theme.d.ts.map +1 -1
  44. package/dist/modules/index.js +6 -6
  45. package/dist/navigation/index.js +4 -4
  46. package/docs/modules/ambient.md +79 -58
  47. package/docs/modules/dock.md +15 -15
  48. package/package.json +1 -1
  49. package/dist/chunk-2EFQJITY.js.map +0 -1
  50. package/dist/chunk-2LGI33JP.js.map +0 -1
  51. package/dist/chunk-FS2R34VD.js.map +0 -1
  52. package/dist/chunk-MMVVHQ7V.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { createNavigator, NAVIGATION_STATUS } from './chunk-FS2R34VD.js';
1
+ import { pathOf, createNavigator, NAVIGATION_STATUS } from './chunk-XGAYTDSI.js';
2
2
  import { useNotificationVisible } from './chunk-6IP6YFQX.js';
3
3
  import { useOptionalLoadingActions, useOptionalLoadingState } from './chunk-YZS2B6YE.js';
4
4
  import { useOptionalMediaState, useOptionalMediaActions } from './chunk-ZXRE2KZO.js';
@@ -9,7 +9,7 @@ import { Button } from './chunk-UDJ7ARCH.js';
9
9
  import { Icon, Spinner } from './chunk-7VU2OAJB.js';
10
10
  import { cn } from './chunk-TAWTGCWJ.js';
11
11
  import { defineThemeSpec, useModuleMotion, useTheme, useOptionalModuleMotion } from './chunk-ESD5EQ5H.js';
12
- import { createStore, normalizePath, gpuTransform, cssTransition, trimToNull, report, globalEvents, isImageIconSource, EVENT_TYPES, toUserMessage, clamp, createScheduler } from './chunk-D222OCTV.js';
12
+ import { createStore, gpuTransform, normalizePath, cssTransition, trimToNull, report, globalEvents, isImageIconSource, EVENT_TYPES, toUserMessage, clamp, createScheduler } from './chunk-D222OCTV.js';
13
13
  import { getOrCreateGlobalContext } from './chunk-J3VTDBC6.js';
14
14
  import { isObject, isPlainObject, shallowEqual, toArray } from './chunk-BMFHS3GV.js';
15
15
  import { c } from 'react/compiler-runtime';
@@ -412,6 +412,9 @@ function isPathPrefix(candidatePath, pathname) {
412
412
  if (normalizedCandidate === "/") return normalizedPathname.startsWith("/");
413
413
  return normalizedPathname.startsWith(`${normalizedCandidate}/`);
414
414
  }
415
+ function getDockRoutePathname(pathname, transitionTo) {
416
+ return transitionTo ? pathOf(transitionTo) : pathname;
417
+ }
415
418
  function isInlineActionPathMatch(path, pathname) {
416
419
  return isSamePath(path, pathname) || path !== "/" && isPathPrefix(path, pathname);
417
420
  }
@@ -906,21 +909,33 @@ function getViewportMaxHeight() {
906
909
  if (typeof window === "undefined") return Infinity;
907
910
  return window.innerHeight - VIEWPORT_MARGIN;
908
911
  }
912
+ var DEFAULT_CARD_PADDING = DOCK_CARD_LAYOUT.chromeHeight / 2;
913
+ function getDockCardPadding(padding) {
914
+ return typeof padding === "number" && Number.isFinite(padding) && padding >= 0 ? padding : DEFAULT_CARD_PADDING;
915
+ }
916
+ function getDockCardMinHeight(isHud = false, padding) {
917
+ const chrome = getDockCardPadding(padding) * 2;
918
+ const base = isHud ? DOCK_CARD_LAYOUT.hudHeight : DOCK_CARD_LAYOUT.baseHeight;
919
+ return base - DOCK_CARD_LAYOUT.chromeHeight + chrome;
920
+ }
909
921
  function getContainerHeight({
910
922
  cardContentHeight,
911
- isHud = false
923
+ isHud = false,
924
+ padding
912
925
  }) {
913
- const chromeHeight = DOCK_CARD_LAYOUT.chromeHeight;
914
- const minCardHeight = isHud ? DOCK_CARD_LAYOUT.hudHeight : DOCK_CARD_LAYOUT.baseHeight;
926
+ const chromeHeight = getDockCardPadding(padding) * 2;
927
+ const minCardHeight = getDockCardMinHeight(isHud, padding);
915
928
  const numericContentHeight = Number(cardContentHeight);
916
929
  const nextCardHeight = Math.max(minCardHeight, (Number.isFinite(numericContentHeight) ? numericContentHeight : 0) + chromeHeight);
917
930
  return Math.min(nextCardHeight, getViewportMaxHeight());
918
931
  }
919
932
  function getDockCardWidth({
920
- width
933
+ width,
934
+ fallback
921
935
  } = {}) {
936
+ const fallbackWidth = typeof fallback === "number" && Number.isFinite(fallback) && fallback > 0 ? fallback : DEFAULT_CARD_WIDTH;
922
937
  if (typeof window === "undefined") {
923
- return width ? Number(width) || DEFAULT_CARD_WIDTH : DEFAULT_CARD_WIDTH;
938
+ return width ? Number(width) || fallbackWidth : fallbackWidth;
924
939
  }
925
940
  const windowWidth = window.innerWidth;
926
941
  const isDesktop = windowWidth >= DESKTOP_MIN_VIEWPORT_WIDTH;
@@ -929,7 +944,7 @@ function getDockCardWidth({
929
944
  const gutter = isDesktop ? DESKTOP_VIEWPORT_GUTTER : MOBILE_VIEWPORT_GUTTER;
930
945
  return Math.min(targetWidth, Math.max(windowWidth - gutter, 0));
931
946
  }
932
- return Math.min(DEFAULT_CARD_WIDTH, Math.max(windowWidth - MOBILE_VIEWPORT_GUTTER, 0));
947
+ return Math.min(fallbackWidth, Math.max(windowWidth - MOBILE_VIEWPORT_GUTTER, 0));
933
948
  }
934
949
  function getObservedHeight(entry, element) {
935
950
  const rawBorderBoxSize = entry?.borderBoxSize;
@@ -945,9 +960,9 @@ function getObservedHeight(entry, element) {
945
960
  function hasMeaningfulHeightChange(previousHeight, nextHeight) {
946
961
  return Math.abs(Math.round(nextHeight) - Math.round(previousHeight)) > HEIGHT_EPSILON;
947
962
  }
948
- function publishDockHeightCssVar(heightPx) {
949
- if (typeof document === "undefined") return;
950
- document.documentElement.style.setProperty(DOCK_HEIGHT_CSS_VAR, `${Math.round(heightPx)}px`);
963
+ function publishDockHeightCssVar(heightPx, name = DOCK_HEIGHT_CSS_VAR) {
964
+ if (typeof document === "undefined" || name === false) return;
965
+ document.documentElement.style.setProperty(name, `${Math.round(heightPx)}px`);
951
966
  }
952
967
  function isSurfaceShapePhase(phase) {
953
968
  return phase === DOCK_SURFACE_PHASE.EXPANDING_BODY || phase === DOCK_SURFACE_PHASE.OPEN || phase === DOCK_SURFACE_PHASE.CLOSING_ANTICIPATION;
@@ -977,18 +992,16 @@ function getRouteMeasurementKey(pathname, key) {
977
992
  }
978
993
 
979
994
  // src/modules/dock/hooks/use-dock-height-controller.ts
980
- function getBaseHeight(isHud) {
981
- return isHud ? DOCK_CARD_LAYOUT.hudHeight : DOCK_CARD_LAYOUT.baseHeight;
982
- }
983
995
  function createHeightController(initial, setContainerHeight) {
984
996
  let inputs = initial;
985
997
  let contentHeight = 0;
986
- let lastAppliedContainerHeight = getBaseHeight(initial.isHud);
998
+ let lastAppliedContainerHeight = getDockCardMinHeight(initial.isHud, initial.padding);
987
999
  let lastAppliedSpacerHeight = lastAppliedContainerHeight + DOCK_HEIGHT_BUFFER;
988
1000
  const applyHeight = () => {
989
1001
  const height = getContainerHeight({
990
1002
  cardContentHeight: contentHeight,
991
- isHud: inputs.isHud
1003
+ isHud: inputs.isHud,
1004
+ padding: inputs.padding
992
1005
  });
993
1006
  const totalSpacerHeight = height + DOCK_HEIGHT_BUFFER;
994
1007
  if (Math.abs(height - lastAppliedContainerHeight) > HEIGHT_EPSILON) {
@@ -997,7 +1010,7 @@ function createHeightController(initial, setContainerHeight) {
997
1010
  }
998
1011
  if (Math.abs(totalSpacerHeight - lastAppliedSpacerHeight) > HEIGHT_EPSILON) {
999
1012
  lastAppliedSpacerHeight = totalSpacerHeight;
1000
- publishDockHeightCssVar(totalSpacerHeight);
1013
+ publishDockHeightCssVar(totalSpacerHeight, inputs.heightVar);
1001
1014
  inputs.setDockHeight(totalSpacerHeight);
1002
1015
  }
1003
1016
  };
@@ -1016,10 +1029,12 @@ function createHeightController(initial, setContainerHeight) {
1016
1029
  };
1017
1030
  }
1018
1031
  function useDockHeightController(t0) {
1019
- const $ = c(31);
1032
+ const $ = c(37);
1020
1033
  const {
1021
1034
  contentKey: t1,
1035
+ heightVar,
1022
1036
  isHud: t2,
1037
+ padding,
1023
1038
  setDockHeight,
1024
1039
  surfacePhase: t3
1025
1040
  } = t0;
@@ -1027,25 +1042,30 @@ function useDockHeightController(t0) {
1027
1042
  const isHud = t2 === void 0 ? false : t2;
1028
1043
  const surfacePhase = t3 === void 0 ? DOCK_SURFACE_PHASE.IDLE : t3;
1029
1044
  let t4;
1030
- if ($[0] !== isHud) {
1031
- t4 = () => getBaseHeight(isHud);
1045
+ if ($[0] !== isHud || $[1] !== padding) {
1046
+ t4 = () => getDockCardMinHeight(isHud, padding);
1032
1047
  $[0] = isHud;
1033
- $[1] = t4;
1048
+ $[1] = padding;
1049
+ $[2] = t4;
1034
1050
  } else {
1035
- t4 = $[1];
1051
+ t4 = $[2];
1036
1052
  }
1037
1053
  const [containerHeight, setContainerHeight] = useState(t4);
1038
1054
  let t5;
1039
- if ($[2] !== isHud || $[3] !== setDockHeight) {
1055
+ if ($[3] !== heightVar || $[4] !== isHud || $[5] !== padding || $[6] !== setDockHeight) {
1040
1056
  t5 = () => createHeightController({
1057
+ heightVar,
1041
1058
  isHud,
1059
+ padding,
1042
1060
  setDockHeight
1043
1061
  }, setContainerHeight);
1044
- $[2] = isHud;
1045
- $[3] = setDockHeight;
1046
- $[4] = t5;
1062
+ $[3] = heightVar;
1063
+ $[4] = isHud;
1064
+ $[5] = padding;
1065
+ $[6] = setDockHeight;
1066
+ $[7] = t5;
1047
1067
  } else {
1048
- t5 = $[4];
1068
+ t5 = $[7];
1049
1069
  }
1050
1070
  const [t6] = useState(t5);
1051
1071
  const {
@@ -1056,102 +1076,107 @@ function useDockHeightController(t0) {
1056
1076
  } = t6;
1057
1077
  let t7;
1058
1078
  let t8;
1059
- if ($[5] !== isHud || $[6] !== setDockHeight || $[7] !== setInputs) {
1079
+ if ($[8] !== heightVar || $[9] !== isHud || $[10] !== padding || $[11] !== setDockHeight || $[12] !== setInputs) {
1060
1080
  t7 = () => {
1061
1081
  setInputs({
1082
+ heightVar,
1062
1083
  isHud,
1084
+ padding,
1063
1085
  setDockHeight
1064
1086
  });
1065
1087
  };
1066
- t8 = [isHud, setDockHeight, setInputs];
1067
- $[5] = isHud;
1068
- $[6] = setDockHeight;
1069
- $[7] = setInputs;
1070
- $[8] = t7;
1071
- $[9] = t8;
1088
+ t8 = [heightVar, isHud, padding, setDockHeight, setInputs];
1089
+ $[8] = heightVar;
1090
+ $[9] = isHud;
1091
+ $[10] = padding;
1092
+ $[11] = setDockHeight;
1093
+ $[12] = setInputs;
1094
+ $[13] = t7;
1095
+ $[14] = t8;
1072
1096
  } else {
1073
- t7 = $[8];
1074
- t8 = $[9];
1097
+ t7 = $[13];
1098
+ t8 = $[14];
1075
1099
  }
1076
1100
  useLayoutEffect(t7, t8);
1077
1101
  let t10;
1078
1102
  let t9;
1079
- if ($[10] !== dispose) {
1103
+ if ($[15] !== dispose) {
1080
1104
  t9 = () => dispose;
1081
1105
  t10 = [dispose];
1082
- $[10] = dispose;
1083
- $[11] = t10;
1084
- $[12] = t9;
1106
+ $[15] = dispose;
1107
+ $[16] = t10;
1108
+ $[17] = t9;
1085
1109
  } else {
1086
- t10 = $[11];
1087
- t9 = $[12];
1110
+ t10 = $[16];
1111
+ t9 = $[17];
1088
1112
  }
1089
1113
  useEffect(t9, t10);
1090
1114
  let t11;
1091
- if ($[13] !== applyHeight) {
1115
+ if ($[18] !== applyHeight) {
1092
1116
  t11 = () => applyHeight();
1093
- $[13] = applyHeight;
1094
- $[14] = t11;
1117
+ $[18] = applyHeight;
1118
+ $[19] = t11;
1095
1119
  } else {
1096
- t11 = $[14];
1120
+ t11 = $[19];
1097
1121
  }
1098
1122
  let t12;
1099
- if ($[15] !== applyHeight || $[16] !== contentKey) {
1123
+ if ($[20] !== applyHeight || $[21] !== contentKey) {
1100
1124
  t12 = [applyHeight, contentKey];
1101
- $[15] = applyHeight;
1102
- $[16] = contentKey;
1103
- $[17] = t12;
1125
+ $[20] = applyHeight;
1126
+ $[21] = contentKey;
1127
+ $[22] = t12;
1104
1128
  } else {
1105
- t12 = $[17];
1129
+ t12 = $[22];
1106
1130
  }
1107
1131
  useLayoutEffect(t11, t12);
1108
1132
  let t13;
1109
- if ($[18] !== applyHeight) {
1133
+ if ($[23] !== applyHeight) {
1110
1134
  t13 = () => applyHeight();
1111
- $[18] = applyHeight;
1112
- $[19] = t13;
1135
+ $[23] = applyHeight;
1136
+ $[24] = t13;
1113
1137
  } else {
1114
- t13 = $[19];
1138
+ t13 = $[24];
1115
1139
  }
1116
1140
  let t14;
1117
- if ($[20] !== applyHeight || $[21] !== surfacePhase) {
1141
+ if ($[25] !== applyHeight || $[26] !== surfacePhase) {
1118
1142
  t14 = [applyHeight, surfacePhase];
1119
- $[20] = applyHeight;
1120
- $[21] = surfacePhase;
1121
- $[22] = t14;
1143
+ $[25] = applyHeight;
1144
+ $[26] = surfacePhase;
1145
+ $[27] = t14;
1122
1146
  } else {
1123
- t14 = $[22];
1147
+ t14 = $[27];
1124
1148
  }
1125
1149
  useLayoutEffect(t13, t14);
1126
1150
  let t15;
1127
- if ($[23] !== applyHeight) {
1151
+ if ($[28] !== applyHeight) {
1128
1152
  t15 = () => applyHeight();
1129
- $[23] = applyHeight;
1130
- $[24] = t15;
1153
+ $[28] = applyHeight;
1154
+ $[29] = t15;
1131
1155
  } else {
1132
- t15 = $[24];
1156
+ t15 = $[29];
1133
1157
  }
1134
1158
  let t16;
1135
- if ($[25] !== applyHeight || $[26] !== isHud) {
1136
- t16 = [applyHeight, isHud];
1137
- $[25] = applyHeight;
1138
- $[26] = isHud;
1139
- $[27] = t16;
1159
+ if ($[30] !== applyHeight || $[31] !== isHud || $[32] !== padding) {
1160
+ t16 = [applyHeight, isHud, padding];
1161
+ $[30] = applyHeight;
1162
+ $[31] = isHud;
1163
+ $[32] = padding;
1164
+ $[33] = t16;
1140
1165
  } else {
1141
- t16 = $[27];
1166
+ t16 = $[33];
1142
1167
  }
1143
1168
  useLayoutEffect(t15, t16);
1144
1169
  let t17;
1145
- if ($[28] !== containerHeight || $[29] !== handleContentHeightChange) {
1170
+ if ($[34] !== containerHeight || $[35] !== handleContentHeightChange) {
1146
1171
  t17 = {
1147
1172
  containerHeight,
1148
1173
  handleContentHeightChange
1149
1174
  };
1150
- $[28] = containerHeight;
1151
- $[29] = handleContentHeightChange;
1152
- $[30] = t17;
1175
+ $[34] = containerHeight;
1176
+ $[35] = handleContentHeightChange;
1177
+ $[36] = t17;
1153
1178
  } else {
1154
- t17 = $[30];
1179
+ t17 = $[36];
1155
1180
  }
1156
1181
  return t17;
1157
1182
  }
@@ -1297,7 +1322,11 @@ function useDockViewport(t0) {
1297
1322
  const targetWidth = getTargetItemWidth(activeItem);
1298
1323
  const [, setViewportRevision] = useState(0);
1299
1324
  const portalTarget = useSyncExternalStore(emptySubscribe, _temp4, _temp22);
1325
+ const {
1326
+ deck
1327
+ } = useDockMotion();
1300
1328
  const stackWidth = getDockCardWidth({
1329
+ fallback: deck.width,
1301
1330
  width: targetWidth
1302
1331
  });
1303
1332
  let t1;
@@ -5703,28 +5732,29 @@ function useDock() {
5703
5732
  navigate: navigateWithGuards,
5704
5733
  pathname
5705
5734
  } = core;
5706
- let t0;
5707
- if ($[0] !== activeTransaction || $[1] !== pathname) {
5708
- t0 = activeTransaction?.to ? normalizePath(activeTransaction.to) : pathname;
5709
- $[0] = activeTransaction;
5710
- $[1] = pathname;
5711
- $[2] = t0;
5735
+ const t0 = activeTransaction?.to;
5736
+ let t1;
5737
+ if ($[0] !== pathname || $[1] !== t0) {
5738
+ t1 = getDockRoutePathname(pathname, t0);
5739
+ $[0] = pathname;
5740
+ $[1] = t0;
5741
+ $[2] = t1;
5712
5742
  } else {
5713
- t0 = $[2];
5743
+ t1 = $[2];
5714
5744
  }
5715
- const effectivePathname = t0;
5716
- const t1 = Boolean(activeTransaction);
5717
- let t2;
5718
- if ($[3] !== t1) {
5719
- t2 = {
5720
- isNavigating: t1
5745
+ const effectivePathname = t1;
5746
+ const t2 = Boolean(activeTransaction);
5747
+ let t3;
5748
+ if ($[3] !== t2) {
5749
+ t3 = {
5750
+ isNavigating: t2
5721
5751
  };
5722
- $[3] = t1;
5723
- $[4] = t2;
5752
+ $[3] = t2;
5753
+ $[4] = t3;
5724
5754
  } else {
5725
- t2 = $[4];
5755
+ t3 = $[4];
5726
5756
  }
5727
- const display = useDockDisplay(effectivePathname, t2);
5757
+ const display = useDockDisplay(effectivePathname, t3);
5728
5758
  const {
5729
5759
  dockItems,
5730
5760
  activeItem,
@@ -5735,9 +5765,9 @@ function useDock() {
5735
5765
  const isHudModeActive = attention?.kind === DOCK_ATTENTION_KIND.HUD || attention?.kind === DOCK_ATTENTION_KIND.OPERATION;
5736
5766
  const isSurfaceActive = Boolean(activeItem?.isSurface);
5737
5767
  const activeItemHasAction = Boolean(activeItem?.action);
5738
- let t3;
5768
+ let t4;
5739
5769
  if ($[5] !== isExpanded || $[6] !== isSurfaceActive || $[7] !== setExpandedState) {
5740
- t3 = (nextValue) => {
5770
+ t4 = (nextValue) => {
5741
5771
  const resolvedValue = typeof nextValue === "function" ? nextValue(isExpanded) : nextValue;
5742
5772
  if (isSurfaceActive && resolvedValue) {
5743
5773
  return;
@@ -5747,16 +5777,16 @@ function useDock() {
5747
5777
  $[5] = isExpanded;
5748
5778
  $[6] = isSurfaceActive;
5749
5779
  $[7] = setExpandedState;
5750
- $[8] = t3;
5780
+ $[8] = t4;
5751
5781
  } else {
5752
- t3 = $[8];
5782
+ t4 = $[8];
5753
5783
  }
5754
- const setExpanded = t3;
5784
+ const setExpanded = t4;
5755
5785
  const wasSurfaceActiveRef = useRef(false);
5756
- let t4;
5757
5786
  let t5;
5787
+ let t6;
5758
5788
  if ($[9] !== isSurfaceActive) {
5759
- t4 = () => {
5789
+ t5 = () => {
5760
5790
  if (isSurfaceActive) {
5761
5791
  wasSurfaceActiveRef.current = true;
5762
5792
  return;
@@ -5766,37 +5796,37 @@ function useDock() {
5766
5796
  setIsHovered(false);
5767
5797
  }
5768
5798
  };
5769
- t5 = [isSurfaceActive];
5799
+ t6 = [isSurfaceActive];
5770
5800
  $[9] = isSurfaceActive;
5771
- $[10] = t4;
5772
- $[11] = t5;
5801
+ $[10] = t5;
5802
+ $[11] = t6;
5773
5803
  } else {
5774
- t4 = $[10];
5775
- t5 = $[11];
5804
+ t5 = $[10];
5805
+ t6 = $[11];
5776
5806
  }
5777
- useEffect(t4, t5);
5778
- let t6;
5807
+ useEffect(t5, t6);
5779
5808
  let t7;
5809
+ let t8;
5780
5810
  if ($[12] !== isExpanded || $[13] !== isSurfaceActive || $[14] !== setExpandedState) {
5781
- t6 = () => {
5811
+ t7 = () => {
5782
5812
  if (isSurfaceActive && isExpanded) {
5783
5813
  setExpandedState(false);
5784
5814
  }
5785
5815
  };
5786
- t7 = [isExpanded, isSurfaceActive, setExpandedState];
5816
+ t8 = [isExpanded, isSurfaceActive, setExpandedState];
5787
5817
  $[12] = isExpanded;
5788
5818
  $[13] = isSurfaceActive;
5789
5819
  $[14] = setExpandedState;
5790
- $[15] = t6;
5791
- $[16] = t7;
5820
+ $[15] = t7;
5821
+ $[16] = t8;
5792
5822
  } else {
5793
- t6 = $[15];
5794
- t7 = $[16];
5823
+ t7 = $[15];
5824
+ t8 = $[16];
5795
5825
  }
5796
- useEffect(t6, t7);
5797
- let t8;
5826
+ useEffect(t7, t8);
5827
+ let t9;
5798
5828
  if ($[17] !== guards || $[18] !== navigateWithGuards || $[19] !== setExpanded || $[20] !== setSearchQuery) {
5799
- t8 = async (href, options) => {
5829
+ t9 = async (href, options) => {
5800
5830
  if (!href) {
5801
5831
  return false;
5802
5832
  }
@@ -5822,14 +5852,14 @@ function useDock() {
5822
5852
  $[18] = navigateWithGuards;
5823
5853
  $[19] = setExpanded;
5824
5854
  $[20] = setSearchQuery;
5825
- $[21] = t8;
5855
+ $[21] = t9;
5826
5856
  } else {
5827
- t8 = $[21];
5857
+ t9 = $[21];
5828
5858
  }
5829
- const navigate = t8;
5830
- let t9;
5859
+ const navigate = t9;
5860
+ let t10;
5831
5861
  if ($[22] !== activeItem || $[23] !== dockItems || $[24] !== effectivePathname) {
5832
- t9 = {
5862
+ t10 = {
5833
5863
  dockItems,
5834
5864
  activeItem,
5835
5865
  pathname: effectivePathname
@@ -5837,31 +5867,31 @@ function useDock() {
5837
5867
  $[22] = activeItem;
5838
5868
  $[23] = dockItems;
5839
5869
  $[24] = effectivePathname;
5840
- $[25] = t9;
5870
+ $[25] = t10;
5841
5871
  } else {
5842
- t9 = $[25];
5872
+ t10 = $[25];
5843
5873
  }
5844
5874
  const {
5845
5875
  displayItems,
5846
5876
  activeIndex: layoutActiveIndex
5847
- } = useDockLayout(t9);
5848
- let t10;
5877
+ } = useDockLayout(t10);
5878
+ let t11;
5849
5879
  if ($[26] !== setExpanded || $[27] !== setSearchQuery) {
5850
- t10 = () => {
5880
+ t11 = () => {
5851
5881
  setExpanded(false);
5852
5882
  setSearchQuery("");
5853
5883
  setIsHovered(false);
5854
5884
  };
5855
5885
  $[26] = setExpanded;
5856
5886
  $[27] = setSearchQuery;
5857
- $[28] = t10;
5887
+ $[28] = t11;
5858
5888
  } else {
5859
- t10 = $[28];
5889
+ t11 = $[28];
5860
5890
  }
5861
- useDockRouteReset(pathname, t10);
5862
- let t11;
5891
+ useDockRouteReset(pathname, t11);
5892
+ let t12;
5863
5893
  if ($[29] !== activeItem || $[30] !== activeItemHasAction || $[31] !== activeTransaction || $[32] !== attention || $[33] !== cancelDock || $[34] !== closeSurface || $[35] !== displayItems || $[36] !== isExpanded || $[37] !== isHovered || $[38] !== isHudModeActive || $[39] !== lastTransaction || $[40] !== layoutActiveIndex || $[41] !== locationKey || $[42] !== navigate || $[43] !== pathname || $[44] !== searchQuery || $[45] !== setDockHeight || $[46] !== setExpanded || $[47] !== setSearchQuery || $[48] !== statusState || $[49] !== topology) {
5864
- t11 = {
5894
+ t12 = {
5865
5895
  dockItems: displayItems,
5866
5896
  activeItem,
5867
5897
  activeIndex: layoutActiveIndex,
@@ -5906,11 +5936,11 @@ function useDock() {
5906
5936
  $[47] = setSearchQuery;
5907
5937
  $[48] = statusState;
5908
5938
  $[49] = topology;
5909
- $[50] = t11;
5939
+ $[50] = t12;
5910
5940
  } else {
5911
- t11 = $[50];
5941
+ t12 = $[50];
5912
5942
  }
5913
- return t11;
5943
+ return t12;
5914
5944
  }
5915
5945
  function _temp10(state) {
5916
5946
  return {
@@ -6066,7 +6096,7 @@ function createDockCardProps({
6066
6096
 
6067
6097
  // src/modules/dock/runtime/dock.tsx
6068
6098
  function useDockModel() {
6069
- const $ = c(86);
6099
+ const $ = c(88);
6070
6100
  const {
6071
6101
  activeItem,
6072
6102
  dockItems,
@@ -6165,39 +6195,44 @@ function useDockModel() {
6165
6195
  t3 = $[16];
6166
6196
  }
6167
6197
  const contentKey = t3;
6198
+ const dockMotion = useDockMotion();
6168
6199
  const t4 = activeItem?.surfacePhase;
6169
6200
  let t5;
6170
- if ($[17] !== contentKey || $[18] !== isHudActive || $[19] !== setDockHeight || $[20] !== t4) {
6201
+ if ($[17] !== contentKey || $[18] !== dockMotion.deck.heightVar || $[19] !== dockMotion.deck.padding || $[20] !== isHudActive || $[21] !== setDockHeight || $[22] !== t4) {
6171
6202
  t5 = {
6172
6203
  contentKey,
6204
+ heightVar: dockMotion.deck.heightVar,
6173
6205
  isHud: isHudActive,
6206
+ padding: dockMotion.deck.padding,
6174
6207
  setDockHeight,
6175
6208
  surfacePhase: t4
6176
6209
  };
6177
6210
  $[17] = contentKey;
6178
- $[18] = isHudActive;
6179
- $[19] = setDockHeight;
6180
- $[20] = t4;
6181
- $[21] = t5;
6211
+ $[18] = dockMotion.deck.heightVar;
6212
+ $[19] = dockMotion.deck.padding;
6213
+ $[20] = isHudActive;
6214
+ $[21] = setDockHeight;
6215
+ $[22] = t4;
6216
+ $[23] = t5;
6182
6217
  } else {
6183
- t5 = $[21];
6218
+ t5 = $[23];
6184
6219
  }
6185
6220
  const {
6186
6221
  containerHeight,
6187
6222
  handleContentHeightChange
6188
6223
  } = useDockHeightController(t5);
6189
6224
  let t6;
6190
- if ($[22] !== containerHeight || $[23] !== stackWidth) {
6225
+ if ($[24] !== containerHeight || $[25] !== stackWidth) {
6191
6226
  t6 = {
6192
6227
  width: stackWidth,
6193
6228
  height: containerHeight,
6194
6229
  resizeDistance: 0
6195
6230
  };
6196
- $[22] = containerHeight;
6197
- $[23] = stackWidth;
6198
- $[24] = t6;
6231
+ $[24] = containerHeight;
6232
+ $[25] = stackWidth;
6233
+ $[26] = t6;
6199
6234
  } else {
6200
- t6 = $[24];
6235
+ t6 = $[26];
6201
6236
  }
6202
6237
  const [stackSize, setStackSize] = useState(t6);
6203
6238
  if (stackSize.width !== stackWidth || stackSize.height !== containerHeight) {
@@ -6209,7 +6244,7 @@ function useDockModel() {
6209
6244
  }
6210
6245
  const surfaceResizeDistance = stackSize.resizeDistance;
6211
6246
  let t7;
6212
- if ($[25] !== activeItem || $[26] !== isOverlayActive || $[27] !== setExpanded) {
6247
+ if ($[27] !== activeItem || $[28] !== isOverlayActive || $[29] !== setExpanded) {
6213
6248
  t7 = () => {
6214
6249
  const outcome = dismissSurfaceFromOutside(activeItem);
6215
6250
  if (outcome === OUTSIDE_DISMISS_HANDLED) {
@@ -6220,16 +6255,16 @@ function useDockModel() {
6220
6255
  }
6221
6256
  setExpanded(false);
6222
6257
  };
6223
- $[25] = activeItem;
6224
- $[26] = isOverlayActive;
6225
- $[27] = setExpanded;
6226
- $[28] = t7;
6258
+ $[27] = activeItem;
6259
+ $[28] = isOverlayActive;
6260
+ $[29] = setExpanded;
6261
+ $[30] = t7;
6227
6262
  } else {
6228
- t7 = $[28];
6263
+ t7 = $[30];
6229
6264
  }
6230
6265
  const handleOutsideDismiss = t7;
6231
6266
  let t8;
6232
- if ($[29] !== dockItems || $[30] !== expanded || $[31] !== focusedIndex || $[32] !== isOverlayActive || $[33] !== navigate || $[34] !== setExpanded) {
6267
+ if ($[31] !== dockItems || $[32] !== expanded || $[33] !== focusedIndex || $[34] !== isOverlayActive || $[35] !== navigate || $[36] !== setExpanded) {
6233
6268
  t8 = {
6234
6269
  expanded,
6235
6270
  focusedIndex,
@@ -6239,21 +6274,21 @@ function useDockModel() {
6239
6274
  setExpanded,
6240
6275
  setFocusedIndex
6241
6276
  };
6242
- $[29] = dockItems;
6243
- $[30] = expanded;
6244
- $[31] = focusedIndex;
6245
- $[32] = isOverlayActive;
6246
- $[33] = navigate;
6247
- $[34] = setExpanded;
6248
- $[35] = t8;
6277
+ $[31] = dockItems;
6278
+ $[32] = expanded;
6279
+ $[33] = focusedIndex;
6280
+ $[34] = isOverlayActive;
6281
+ $[35] = navigate;
6282
+ $[36] = setExpanded;
6283
+ $[37] = t8;
6249
6284
  } else {
6250
- t8 = $[35];
6285
+ t8 = $[37];
6251
6286
  }
6252
6287
  useDockKeyboard(t8);
6253
6288
  useClickOutside(dockRef, handleOutsideDismiss);
6254
6289
  let t10;
6255
6290
  let t9;
6256
- if ($[36] !== activeIndex || $[37] !== expanded || $[38] !== setIsHovered) {
6291
+ if ($[38] !== activeIndex || $[39] !== expanded || $[40] !== setIsHovered) {
6257
6292
  t9 = () => {
6258
6293
  queueMicrotask(() => {
6259
6294
  setIsStackHovered(false);
@@ -6262,19 +6297,19 @@ function useDockModel() {
6262
6297
  });
6263
6298
  };
6264
6299
  t10 = [activeIndex, expanded, setIsHovered];
6265
- $[36] = activeIndex;
6266
- $[37] = expanded;
6267
- $[38] = setIsHovered;
6268
- $[39] = t10;
6269
- $[40] = t9;
6300
+ $[38] = activeIndex;
6301
+ $[39] = expanded;
6302
+ $[40] = setIsHovered;
6303
+ $[41] = t10;
6304
+ $[42] = t9;
6270
6305
  } else {
6271
- t10 = $[39];
6272
- t9 = $[40];
6306
+ t10 = $[41];
6307
+ t9 = $[42];
6273
6308
  }
6274
6309
  useEffect(t9, t10);
6275
6310
  let t11;
6276
6311
  let t12;
6277
- if ($[41] !== isFullscreenStateActive || $[42] !== setExpanded || $[43] !== setIsHovered) {
6312
+ if ($[43] !== isFullscreenStateActive || $[44] !== setExpanded || $[45] !== setIsHovered) {
6278
6313
  t11 = () => {
6279
6314
  if (!isFullscreenStateActive) {
6280
6315
  return;
@@ -6286,29 +6321,29 @@ function useDockModel() {
6286
6321
  });
6287
6322
  };
6288
6323
  t12 = [isFullscreenStateActive, setExpanded, setIsHovered];
6289
- $[41] = isFullscreenStateActive;
6290
- $[42] = setExpanded;
6291
- $[43] = setIsHovered;
6292
- $[44] = t11;
6293
- $[45] = t12;
6324
+ $[43] = isFullscreenStateActive;
6325
+ $[44] = setExpanded;
6326
+ $[45] = setIsHovered;
6327
+ $[46] = t11;
6328
+ $[47] = t12;
6294
6329
  } else {
6295
- t11 = $[44];
6296
- t12 = $[45];
6330
+ t11 = $[46];
6331
+ t12 = $[47];
6297
6332
  }
6298
6333
  useEffect(t11, t12);
6299
6334
  let t13;
6300
- if ($[46] !== activeItem) {
6335
+ if ($[48] !== activeItem) {
6301
6336
  t13 = isNotFoundItem(activeItem);
6302
- $[46] = activeItem;
6303
- $[47] = t13;
6337
+ $[48] = activeItem;
6338
+ $[49] = t13;
6304
6339
  } else {
6305
- t13 = $[47];
6340
+ t13 = $[49];
6306
6341
  }
6307
6342
  const isNotFound = Boolean(t13);
6308
6343
  const isStatusActive = Boolean(activeItem?.isStatus || isNotFound);
6309
6344
  const statusStyle = isStatusActive && !isNotFound ? activeItem?.style || null : null;
6310
6345
  let t14;
6311
- if ($[48] !== activeItem || $[49] !== clearHoverState || $[50] !== clearHud || $[51] !== contextActions || $[52] !== dockItems || $[53] !== expanded || $[54] !== handleContentHeightChange || $[55] !== hud || $[56] !== isExtensionsVisible || $[57] !== isHudActive || $[58] !== isStackHovered || $[59] !== isStatusActive || $[60] !== navigate || $[61] !== setExpanded || $[62] !== setIsHovered || $[63] !== statusStyle) {
6346
+ if ($[50] !== activeItem || $[51] !== clearHoverState || $[52] !== clearHud || $[53] !== contextActions || $[54] !== dockItems || $[55] !== expanded || $[56] !== handleContentHeightChange || $[57] !== hud || $[58] !== isExtensionsVisible || $[59] !== isHudActive || $[60] !== isStackHovered || $[61] !== isStatusActive || $[62] !== navigate || $[63] !== setExpanded || $[64] !== setIsHovered || $[65] !== statusStyle) {
6312
6347
  t14 = createDockCardProps({
6313
6348
  activeItem,
6314
6349
  clearHud,
@@ -6329,47 +6364,46 @@ function useDockModel() {
6329
6364
  setIsStackHovered,
6330
6365
  statusStyle
6331
6366
  });
6332
- $[48] = activeItem;
6333
- $[49] = clearHoverState;
6334
- $[50] = clearHud;
6335
- $[51] = contextActions;
6336
- $[52] = dockItems;
6337
- $[53] = expanded;
6338
- $[54] = handleContentHeightChange;
6339
- $[55] = hud;
6340
- $[56] = isExtensionsVisible;
6341
- $[57] = isHudActive;
6342
- $[58] = isStackHovered;
6343
- $[59] = isStatusActive;
6344
- $[60] = navigate;
6345
- $[61] = setExpanded;
6346
- $[62] = setIsHovered;
6347
- $[63] = statusStyle;
6348
- $[64] = t14;
6349
- } else {
6350
- t14 = $[64];
6367
+ $[50] = activeItem;
6368
+ $[51] = clearHoverState;
6369
+ $[52] = clearHud;
6370
+ $[53] = contextActions;
6371
+ $[54] = dockItems;
6372
+ $[55] = expanded;
6373
+ $[56] = handleContentHeightChange;
6374
+ $[57] = hud;
6375
+ $[58] = isExtensionsVisible;
6376
+ $[59] = isHudActive;
6377
+ $[60] = isStackHovered;
6378
+ $[61] = isStatusActive;
6379
+ $[62] = navigate;
6380
+ $[63] = setExpanded;
6381
+ $[64] = setIsHovered;
6382
+ $[65] = statusStyle;
6383
+ $[66] = t14;
6384
+ } else {
6385
+ t14 = $[66];
6351
6386
  }
6352
6387
  const dockCardProps = t14;
6353
- const dockMotion = useDockMotion();
6354
6388
  const t15 = activeItem?.surfacePhase ?? null;
6355
6389
  let t16;
6356
- if ($[65] !== dockMotion || $[66] !== expanded || $[67] !== surfaceResizeDistance || $[68] !== t15) {
6390
+ if ($[67] !== dockMotion || $[68] !== expanded || $[69] !== surfaceResizeDistance || $[70] !== t15) {
6357
6391
  t16 = getDockStackTransition(dockMotion, {
6358
6392
  expanded,
6359
6393
  resizeDistance: surfaceResizeDistance,
6360
6394
  surfacePhase: t15
6361
6395
  });
6362
- $[65] = dockMotion;
6363
- $[66] = expanded;
6364
- $[67] = surfaceResizeDistance;
6365
- $[68] = t15;
6366
- $[69] = t16;
6396
+ $[67] = dockMotion;
6397
+ $[68] = expanded;
6398
+ $[69] = surfaceResizeDistance;
6399
+ $[70] = t15;
6400
+ $[71] = t16;
6367
6401
  } else {
6368
- t16 = $[69];
6402
+ t16 = $[71];
6369
6403
  }
6370
6404
  const dockStackTransition = t16;
6371
6405
  let t17;
6372
- if ($[70] !== activeItem || $[71] !== containerHeight || $[72] !== dockCardProps || $[73] !== dockItems || $[74] !== dockStackTransition || $[75] !== expanded || $[76] !== isBackdropVisible || $[77] !== isBreadcrumbsCardVisible || $[78] !== isExtensionsVisible || $[79] !== isFullscreenStateActive || $[80] !== isOverlayActive || $[81] !== isSubCardVisible || $[82] !== navigate || $[83] !== portalTarget || $[84] !== stackWidth) {
6406
+ if ($[72] !== activeItem || $[73] !== containerHeight || $[74] !== dockCardProps || $[75] !== dockItems || $[76] !== dockStackTransition || $[77] !== expanded || $[78] !== isBackdropVisible || $[79] !== isBreadcrumbsCardVisible || $[80] !== isExtensionsVisible || $[81] !== isFullscreenStateActive || $[82] !== isOverlayActive || $[83] !== isSubCardVisible || $[84] !== navigate || $[85] !== portalTarget || $[86] !== stackWidth) {
6373
6407
  t17 = {
6374
6408
  activeItem,
6375
6409
  dockItems,
@@ -6388,24 +6422,24 @@ function useDockModel() {
6388
6422
  dockCardProps,
6389
6423
  dockStackTransition
6390
6424
  };
6391
- $[70] = activeItem;
6392
- $[71] = containerHeight;
6393
- $[72] = dockCardProps;
6394
- $[73] = dockItems;
6395
- $[74] = dockStackTransition;
6396
- $[75] = expanded;
6397
- $[76] = isBackdropVisible;
6398
- $[77] = isBreadcrumbsCardVisible;
6399
- $[78] = isExtensionsVisible;
6400
- $[79] = isFullscreenStateActive;
6401
- $[80] = isOverlayActive;
6402
- $[81] = isSubCardVisible;
6403
- $[82] = navigate;
6404
- $[83] = portalTarget;
6405
- $[84] = stackWidth;
6406
- $[85] = t17;
6407
- } else {
6408
- t17 = $[85];
6425
+ $[72] = activeItem;
6426
+ $[73] = containerHeight;
6427
+ $[74] = dockCardProps;
6428
+ $[75] = dockItems;
6429
+ $[76] = dockStackTransition;
6430
+ $[77] = expanded;
6431
+ $[78] = isBackdropVisible;
6432
+ $[79] = isBreadcrumbsCardVisible;
6433
+ $[80] = isExtensionsVisible;
6434
+ $[81] = isFullscreenStateActive;
6435
+ $[82] = isOverlayActive;
6436
+ $[83] = isSubCardVisible;
6437
+ $[84] = navigate;
6438
+ $[85] = portalTarget;
6439
+ $[86] = stackWidth;
6440
+ $[87] = t17;
6441
+ } else {
6442
+ t17 = $[87];
6409
6443
  }
6410
6444
  return t17;
6411
6445
  }
@@ -15855,5 +15889,5 @@ function _temp30(state) {
15855
15889
  }
15856
15890
 
15857
15891
  export { DOCK_EVENTS, DOCK_HUD_PRIORITY, DOCK_HUD_RENDER_MODE, DOCK_HUD_VARIANT, Dock, DockCardBanner, DockCardHeader, DockDescription, DockIcon, DockProvider, DockSurfaceAction, DockSurfaceExtension, DockSurfaceHeaderButton, DockTitle, ErrorActions, GuardActions, createDockGuardRegistry, createErrorStatus, createGuardStatus, createInlineSurfaceEntry, createSurfaceEntryDefinition, createSurfaceFlowBuilder, defineBreadcrumb, defineDockAction, defineHud, defineStepSurface, defineSurface, dockModule, dockTheme, isValidBannerUrl, useDock, useDockActionClass, useDockActions, useDockBanner, useDockConfig, useDockContextActions, useDockDimensions, useDockGuard, useDockHeight, useDockHud, useDockMotion, useDockRegistration, useDockSelector, useDockState, useDockTheme, useHud, useOptionalDockActions, useOptionalDockState, useSurface, useSurfaceAction, useSurfaceDimensions, useSurfaceFlow, useSurfaceHeader, useSurfaceId, useSurfaceReturn, useSurfaceStep };
15858
- //# sourceMappingURL=chunk-2EFQJITY.js.map
15859
- //# sourceMappingURL=chunk-2EFQJITY.js.map
15892
+ //# sourceMappingURL=chunk-NCXFWCXP.js.map
15893
+ //# sourceMappingURL=chunk-NCXFWCXP.js.map