@omerdlw/base-framework 3.2.0 → 3.2.2

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 (123) hide show
  1. package/MIGRATION.md +13 -0
  2. package/dist/ambient/index.js +8 -8
  3. package/dist/background/index.js +7 -7
  4. package/dist/{chunk-AYUEZPAN.js → chunk-2EFQJITY.js} +238 -141
  5. package/dist/chunk-2EFQJITY.js.map +1 -0
  6. package/dist/{chunk-2223J34C.js → chunk-6IP6YFQX.js} +6 -6
  7. package/dist/{chunk-2223J34C.js.map → chunk-6IP6YFQX.js.map} +1 -1
  8. package/dist/{chunk-CT4UILO2.js → chunk-7VU2OAJB.js} +4 -77
  9. package/dist/chunk-7VU2OAJB.js.map +1 -0
  10. package/dist/{chunk-BCFJSPTI.js → chunk-7XUAYJOA.js} +5 -5
  11. package/dist/{chunk-BCFJSPTI.js.map → chunk-7XUAYJOA.js.map} +1 -1
  12. package/dist/{chunk-5H6FZW3N.js → chunk-D222OCTV.js} +15 -9
  13. package/dist/chunk-D222OCTV.js.map +1 -0
  14. package/dist/{chunk-RF2YGILF.js → chunk-FS2R34VD.js} +3 -3
  15. package/dist/{chunk-RF2YGILF.js.map → chunk-FS2R34VD.js.map} +1 -1
  16. package/dist/chunk-FXO4QJQ4.js +17 -0
  17. package/dist/{chunk-MCYHKFZL.js.map → chunk-FXO4QJQ4.js.map} +1 -1
  18. package/dist/{chunk-TUUGWQY5.js → chunk-HFR6YROB.js} +9 -16
  19. package/dist/chunk-HFR6YROB.js.map +1 -0
  20. package/dist/{chunk-NHOJWICA.js → chunk-IH3STE7W.js} +128 -83
  21. package/dist/chunk-IH3STE7W.js.map +1 -0
  22. package/dist/{chunk-GT4COZI7.js → chunk-KOYTJW5E.js} +60 -9
  23. package/dist/chunk-KOYTJW5E.js.map +1 -0
  24. package/dist/{chunk-WYVA6AN5.js → chunk-LKYW4LH6.js} +5 -5
  25. package/dist/{chunk-WYVA6AN5.js.map → chunk-LKYW4LH6.js.map} +1 -1
  26. package/dist/{chunk-QMFV53PP.js → chunk-MMVVHQ7V.js} +6 -6
  27. package/dist/{chunk-QMFV53PP.js.map → chunk-MMVVHQ7V.js.map} +1 -1
  28. package/dist/{chunk-RTCJ35UC.js → chunk-QRXDXAQI.js} +5 -5
  29. package/dist/{chunk-RTCJ35UC.js.map → chunk-QRXDXAQI.js.map} +1 -1
  30. package/dist/{chunk-H6HRU3XN.js → chunk-R4K6VAOK.js} +4 -4
  31. package/dist/{chunk-H6HRU3XN.js.map → chunk-R4K6VAOK.js.map} +1 -1
  32. package/dist/{chunk-ZFTQY7OF.js → chunk-RGC2VFQO.js} +6 -6
  33. package/dist/chunk-RGC2VFQO.js.map +1 -0
  34. package/dist/chunk-TAWTGCWJ.js +113 -0
  35. package/dist/chunk-TAWTGCWJ.js.map +1 -0
  36. package/dist/{chunk-4OQGXZIH.js → chunk-TKOGBAW3.js} +7 -7
  37. package/dist/{chunk-4OQGXZIH.js.map → chunk-TKOGBAW3.js.map} +1 -1
  38. package/dist/{chunk-LTO77WSO.js → chunk-UDJ7ARCH.js} +3 -3
  39. package/dist/{chunk-LTO77WSO.js.map → chunk-UDJ7ARCH.js.map} +1 -1
  40. package/dist/{chunk-GCHQ5OC4.js → chunk-UQLTP3XB.js} +6 -6
  41. package/dist/{chunk-GCHQ5OC4.js.map → chunk-UQLTP3XB.js.map} +1 -1
  42. package/dist/{chunk-Y2Q74PJP.js → chunk-WQTMOUCA.js} +3 -3
  43. package/dist/{chunk-Y2Q74PJP.js.map → chunk-WQTMOUCA.js.map} +1 -1
  44. package/dist/chunk-WZ5T2NXH.js +702 -0
  45. package/dist/chunk-WZ5T2NXH.js.map +1 -0
  46. package/dist/{chunk-ZSNP26VU.js → chunk-YZS2B6YE.js} +6 -6
  47. package/dist/{chunk-ZSNP26VU.js.map → chunk-YZS2B6YE.js.map} +1 -1
  48. package/dist/{chunk-WXEOP6Z4.js → chunk-ZXRE2KZO.js} +5 -5
  49. package/dist/{chunk-WXEOP6Z4.js.map → chunk-ZXRE2KZO.js.map} +1 -1
  50. package/dist/context-menu/index.js +13 -13
  51. package/dist/controls/index.js +4 -4
  52. package/dist/core/kernel/hooks.d.ts.map +1 -1
  53. package/dist/core/kernel/operations-records.d.ts +7 -0
  54. package/dist/core/kernel/operations-records.d.ts.map +1 -1
  55. package/dist/core/kernel/operations-resolve.d.ts.map +1 -1
  56. package/dist/core/kernel/operations.d.ts.map +1 -1
  57. package/dist/core/kernel/page-controller.d.ts.map +1 -1
  58. package/dist/core/kernel/stabilize.d.ts.map +1 -1
  59. package/dist/core/provider/index.d.ts.map +1 -1
  60. package/dist/dock/index.js +12 -12
  61. package/dist/error/index.js +5 -5
  62. package/dist/foundation/recipes/cn.d.ts +3 -3
  63. package/dist/foundation/recipes/cn.d.ts.map +1 -1
  64. package/dist/foundation/recipes/define.d.ts +2 -3
  65. package/dist/foundation/recipes/define.d.ts.map +1 -1
  66. package/dist/foundation/recipes/recipe.d.ts +4 -4
  67. package/dist/foundation/recipes/recipe.d.ts.map +1 -1
  68. package/dist/foundation/utils/scheduler.d.ts +1 -1
  69. package/dist/foundation/utils/scheduler.d.ts.map +1 -1
  70. package/dist/hooks/index.js +2 -2
  71. package/dist/index.js +22 -22
  72. package/dist/kernel/index.js +3 -3
  73. package/dist/loading/index.js +6 -6
  74. package/dist/media/index.js +4 -4
  75. package/dist/modal/index.js +11 -11
  76. package/dist/modules/background/context.d.ts.map +1 -1
  77. package/dist/modules/dock/hooks/use-card-item-model.d.ts +4 -4
  78. package/dist/modules/dock/lib/helpers.d.ts +1 -1
  79. package/dist/modules/dock/lib/helpers.d.ts.map +1 -1
  80. package/dist/modules/dock/lib/styles.d.ts +2 -2
  81. package/dist/modules/dock/motion.d.ts +2 -2
  82. package/dist/modules/dock/routing/navigation.d.ts.map +1 -1
  83. package/dist/modules/index.js +20 -20
  84. package/dist/modules/modal/module.d.ts.map +1 -1
  85. package/dist/navigation/index.js +7 -7
  86. package/dist/notification/index.js +5 -5
  87. package/dist/overlay-7QLGWHCH.js +13 -0
  88. package/dist/{overlay-QHSJBV3O.js.map → overlay-7QLGWHCH.js.map} +1 -1
  89. package/dist/provider/index.js +9 -8
  90. package/dist/react/ui/components/tooltip-group.d.ts +34 -0
  91. package/dist/react/ui/components/tooltip-group.d.ts.map +1 -0
  92. package/dist/react/ui/components/tooltip-placement.d.ts +43 -0
  93. package/dist/react/ui/components/tooltip-placement.d.ts.map +1 -0
  94. package/dist/react/ui/components/tooltip-slot.d.ts +23 -0
  95. package/dist/react/ui/components/tooltip-slot.d.ts.map +1 -0
  96. package/dist/react/ui/components/tooltip.d.ts +9 -7
  97. package/dist/react/ui/components/tooltip.d.ts.map +1 -1
  98. package/dist/react/ui/types.d.ts +24 -3
  99. package/dist/react/ui/types.d.ts.map +1 -1
  100. package/dist/recipes/index.js +22 -3
  101. package/dist/recipes/index.js.map +1 -1
  102. package/dist/ui/index.js +8 -8
  103. package/dist/utils/index.js +13 -7
  104. package/dist/utils/index.js.map +1 -1
  105. package/docs/architecture-and-rules.md +1 -2
  106. package/docs/core-engine.md +2 -2
  107. package/docs/design.md +17 -17
  108. package/docs/getting-started.md +6 -7
  109. package/docs/modules/modal.md +2 -2
  110. package/package.json +1 -4
  111. package/dist/chunk-37OBXNEO.js +0 -116
  112. package/dist/chunk-37OBXNEO.js.map +0 -1
  113. package/dist/chunk-5H6FZW3N.js.map +0 -1
  114. package/dist/chunk-7RSRDKYE.js +0 -22
  115. package/dist/chunk-7RSRDKYE.js.map +0 -1
  116. package/dist/chunk-AYUEZPAN.js.map +0 -1
  117. package/dist/chunk-CT4UILO2.js.map +0 -1
  118. package/dist/chunk-GT4COZI7.js.map +0 -1
  119. package/dist/chunk-MCYHKFZL.js +0 -17
  120. package/dist/chunk-NHOJWICA.js.map +0 -1
  121. package/dist/chunk-TUUGWQY5.js.map +0 -1
  122. package/dist/chunk-ZFTQY7OF.js.map +0 -1
  123. package/dist/overlay-QHSJBV3O.js +0 -13
package/MIGRATION.md CHANGED
@@ -73,3 +73,16 @@ Rendering is the same. What changes:
73
73
  The published JavaScript is built with `babel-plugin-react-compiler`. Components and hooks memoize automatically, so the source no longer carries most hand-written `useMemo`/`useCallback`/`memo`. Behaviour does not depend on the compiler: identities that effects, subscriptions, context values and public hook returns rely on stay stable in uncompiled code too.
74
74
 
75
75
  The compiled output is larger. Total gzipped JavaScript is about 35% above the previous build (about 273 KB vs 201 KB across all entries and chunks). The compiler accounts for most of that, about 25%. Bundlers still tree-shake per entry, so an app pays only for the entries it imports.
76
+
77
+ ## Tooltip without Radix (3.2.2)
78
+
79
+ `Tooltip` and `TooltipProvider` no longer wrap `@radix-ui/react-tooltip`; placement, delay groups and presence are built in. `@radix-ui/react-tooltip`, `clsx` and `loading-dev` are no longer dependencies, so a fresh install pulls less. The public props are the same except:
80
+
81
+ - `contentProps` takes plain `div` attributes and `data-*` hooks. Radix-only props (`onEscapeKeyDown`, `onPointerDownOutside`, `avoidCollisions`, `forceMount`, `asChild`, `hideWhenDetached`, `sticky`) are gone; flipping and shifting into the viewport always apply.
82
+ - CSS variables are renamed: `--radix-tooltip-content-transform-origin` → `--tooltip-transform-origin`, `--radix-tooltip-content-available-width/height` → `--tooltip-available-width/height`, `--radix-tooltip-trigger-width/height` → `--tooltip-trigger-width/height`.
83
+ - The portal wrapper is `[data-tooltip-wrapper]` (was `[data-radix-popper-content-wrapper]`). It still copies the content's `z-index`.
84
+ - `data-state` (`delayed-open`, `instant-open`, `closed`) and `data-side` keep their values; `data-align` is new, and so is the `align` prop (`start`, `center`, `end`).
85
+ - A `TooltipProvider` is optional. A `Tooltip` outside one uses a shared default group (700 ms delay, 300 ms skip window).
86
+ - `ClassValue` from `clsx` is no longer re-exported through `cn`'s types; `cn` takes the framework's `Classes` type, which accepts the same strings, arrays, objects and falsy values.
87
+
88
+ The modal overlay now loads with `React.lazy` instead of `next/dynamic`, mounts only after the first modal opens, and preloads its chunk when the browser is idle.
@@ -1,13 +1,13 @@
1
1
  "use client";
2
- export { AMBIENT_ANALYSIS_VERSION, AMBIENT_REGIONS, AMBIENT_ROLES, AMBIENT_TONES, AmbientContext, AmbientProvider, DEFAULT_ANALYSIS, DEFAULT_CSS_VAR_NAMES, DEFAULT_LINGER_MS, ambientModule, ambientTheme, analyzeAmbientPixels, applyScopedCssVariables, configureAmbient, contrastRatio, defineAmbient, extractPaletteFromImage, findContentBounds, formatOklch, getAmbientSettings, getCachedAmbientPalette, maxChroma, normalizeColorMap, onColorFor, paletteVarMap, primeAmbientPalette, resolveAmbientVarMap, resolveCssVarNames, resolvePageAmbientTheme, resolveTargetElement, skinLikeness, srgbToOklab, toneOf, useAmbient, useAmbientColor, useAmbientTheme } from '../chunk-QMFV53PP.js';
3
- import '../chunk-TUUGWQY5.js';
4
- import '../chunk-WXEOP6Z4.js';
5
- import '../chunk-NHOJWICA.js';
6
- import '../chunk-Y2Q74PJP.js';
7
- import '../chunk-CT4UILO2.js';
8
- import '../chunk-7RSRDKYE.js';
2
+ export { AMBIENT_ANALYSIS_VERSION, AMBIENT_REGIONS, AMBIENT_ROLES, AMBIENT_TONES, AmbientContext, AmbientProvider, DEFAULT_ANALYSIS, DEFAULT_CSS_VAR_NAMES, DEFAULT_LINGER_MS, ambientModule, ambientTheme, analyzeAmbientPixels, applyScopedCssVariables, configureAmbient, contrastRatio, defineAmbient, extractPaletteFromImage, findContentBounds, formatOklch, getAmbientSettings, getCachedAmbientPalette, maxChroma, normalizeColorMap, onColorFor, paletteVarMap, primeAmbientPalette, resolveAmbientVarMap, resolveCssVarNames, resolvePageAmbientTheme, resolveTargetElement, skinLikeness, srgbToOklab, toneOf, useAmbient, useAmbientColor, useAmbientTheme } from '../chunk-MMVVHQ7V.js';
3
+ import '../chunk-HFR6YROB.js';
4
+ import '../chunk-ZXRE2KZO.js';
5
+ import '../chunk-IH3STE7W.js';
6
+ import '../chunk-WQTMOUCA.js';
7
+ import '../chunk-7VU2OAJB.js';
8
+ import '../chunk-TAWTGCWJ.js';
9
9
  import '../chunk-ESD5EQ5H.js';
10
- import '../chunk-5H6FZW3N.js';
10
+ import '../chunk-D222OCTV.js';
11
11
  import '../chunk-J3VTDBC6.js';
12
12
  import '../chunk-BMFHS3GV.js';
13
13
  //# sourceMappingURL=index.js.map
@@ -1,12 +1,12 @@
1
1
  "use client";
2
- export { BACKGROUND_MEDIA_ID, BACKGROUND_REGISTRY_KEY, BG_TOKEN_TO_OBJECT_STYLE, BackgroundContext, BackgroundOverlay, BackgroundProvider, DEFAULT_BACKGROUND, DEFAULT_BACKGROUND_COMPUTED, DEFAULT_COLOR, INERT_BACKGROUND_ACTIONS, OBJECT_FITS, YouTubeBackgroundPlayer, applyVideoPlaybackState, backgroundModule, backgroundTheme, computeBackgroundState, defineBackground, extractYouTubeVideoId, generateBaseGradient, generateEdgeGradient, getEdgeFadeMask, getYouTubeStreamUrl, getYouTubeThumbnailUrl, isDirectVideoUrl, isYouTubeUrl, mergeBackgroundState, normalizeBackgroundInput, parseYouTubeUrlConfig, resolveBackgroundState, resolveVideoClassNames, resolveVideoOptions, selectPageBackground, syncVideoLoopDirect, syncVideoMutedDirect, triggerVideoPlaybackDirect, useBackground, useBackgroundActions, useBackgroundRegistration, useBackgroundState, useOptionalBackgroundActions, useOptionalBackgroundState } from '../chunk-TUUGWQY5.js';
3
- import '../chunk-WXEOP6Z4.js';
4
- import '../chunk-NHOJWICA.js';
5
- import '../chunk-Y2Q74PJP.js';
6
- import '../chunk-CT4UILO2.js';
7
- import '../chunk-7RSRDKYE.js';
2
+ export { BACKGROUND_MEDIA_ID, BACKGROUND_REGISTRY_KEY, BG_TOKEN_TO_OBJECT_STYLE, BackgroundContext, BackgroundOverlay, BackgroundProvider, DEFAULT_BACKGROUND, DEFAULT_BACKGROUND_COMPUTED, DEFAULT_COLOR, INERT_BACKGROUND_ACTIONS, OBJECT_FITS, YouTubeBackgroundPlayer, applyVideoPlaybackState, backgroundModule, backgroundTheme, computeBackgroundState, defineBackground, extractYouTubeVideoId, generateBaseGradient, generateEdgeGradient, getEdgeFadeMask, getYouTubeStreamUrl, getYouTubeThumbnailUrl, isDirectVideoUrl, isYouTubeUrl, mergeBackgroundState, normalizeBackgroundInput, parseYouTubeUrlConfig, resolveBackgroundState, resolveVideoClassNames, resolveVideoOptions, selectPageBackground, syncVideoLoopDirect, syncVideoMutedDirect, triggerVideoPlaybackDirect, useBackground, useBackgroundActions, useBackgroundRegistration, useBackgroundState, useOptionalBackgroundActions, useOptionalBackgroundState } from '../chunk-HFR6YROB.js';
3
+ import '../chunk-ZXRE2KZO.js';
4
+ import '../chunk-IH3STE7W.js';
5
+ import '../chunk-WQTMOUCA.js';
6
+ import '../chunk-7VU2OAJB.js';
7
+ import '../chunk-TAWTGCWJ.js';
8
8
  import '../chunk-ESD5EQ5H.js';
9
- import '../chunk-5H6FZW3N.js';
9
+ import '../chunk-D222OCTV.js';
10
10
  import '../chunk-J3VTDBC6.js';
11
11
  import '../chunk-BMFHS3GV.js';
12
12
  //# sourceMappingURL=index.js.map
@@ -1,21 +1,21 @@
1
- import { NAVIGATION_STATUS, createNavigator } from './chunk-RF2YGILF.js';
2
- import { useNotificationVisible } from './chunk-2223J34C.js';
3
- import { useOptionalLoadingActions, useOptionalLoadingState } from './chunk-ZSNP26VU.js';
4
- import { useOptionalMediaState, useOptionalMediaActions } from './chunk-WXEOP6Z4.js';
5
- import { Tooltip } from './chunk-37OBXNEO.js';
6
- import { defineModule, useModule, useRegistryEntries, useModuleRegistration } from './chunk-NHOJWICA.js';
7
- import { useRequiredContext, useIsFullscreenStateActive, useClickOutside, useStore, useGlobalEvent } from './chunk-Y2Q74PJP.js';
8
- import { Button } from './chunk-LTO77WSO.js';
9
- import { Icon, Spinner } from './chunk-CT4UILO2.js';
10
- import { cn } from './chunk-7RSRDKYE.js';
1
+ import { createNavigator, NAVIGATION_STATUS } from './chunk-FS2R34VD.js';
2
+ import { useNotificationVisible } from './chunk-6IP6YFQX.js';
3
+ import { useOptionalLoadingActions, useOptionalLoadingState } from './chunk-YZS2B6YE.js';
4
+ import { useOptionalMediaState, useOptionalMediaActions } from './chunk-ZXRE2KZO.js';
5
+ import { Tooltip } from './chunk-WZ5T2NXH.js';
6
+ import { defineModule, useModule, useRegistryEntries, useModuleRegistration } from './chunk-IH3STE7W.js';
7
+ import { useRequiredContext, useIsFullscreenStateActive, useClickOutside, useStore, useGlobalEvent } from './chunk-WQTMOUCA.js';
8
+ import { Button } from './chunk-UDJ7ARCH.js';
9
+ import { Icon, Spinner } from './chunk-7VU2OAJB.js';
10
+ import { cn } from './chunk-TAWTGCWJ.js';
11
11
  import { defineThemeSpec, useModuleMotion, useTheme, useOptionalModuleMotion } from './chunk-ESD5EQ5H.js';
12
- import { createStore, normalizePath, gpuTransform, report, globalEvents, cssTransition, trimToNull, isImageIconSource, EVENT_TYPES, toUserMessage, clamp, createScheduler } from './chunk-5H6FZW3N.js';
12
+ import { createStore, normalizePath, gpuTransform, 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';
16
16
  import { motion, AnimatePresence, useMotionValue, useSpring, useTransform, useDragControls } from 'motion/react';
17
17
  import { createPortal } from 'react-dom';
18
- import React, { createContext, useRef, useLayoutEffect, useState, useEffect, use, isValidElement, useSyncExternalStore, useEffectEvent, useCallback, lazy, Suspense, useId, createElement, cloneElement, useReducer, useMemo } from 'react';
18
+ import React, { createContext, useRef, useLayoutEffect, useState, useEffect, use, isValidElement, useSyncExternalStore, useEffectEvent, lazy, Suspense, useId, createElement, cloneElement, useReducer, useCallback, useMemo } from 'react';
19
19
  import { usePathname, useRouter } from 'next/navigation';
20
20
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
21
21
  import Link from 'next/link';
@@ -2395,6 +2395,7 @@ var selectTrips = (state) => ({
2395
2395
  last: state.last
2396
2396
  });
2397
2397
  function useDockNavigation() {
2398
+ const $ = c(32);
2398
2399
  const pathname = usePathname();
2399
2400
  const {
2400
2401
  locationKey,
@@ -2420,125 +2421,221 @@ function useDockNavigation() {
2420
2421
  } = useStore(navigator2.store, selectTrips, shallowEqual);
2421
2422
  const previousLocationKeyRef = useRef(locationKey);
2422
2423
  const settledTripRef = useRef(lastTransaction);
2423
- useEffect(() => {
2424
- if (settledTripRef.current === lastTransaction) return;
2425
- settledTripRef.current = lastTransaction;
2426
- if (!lastTransaction) return;
2427
- if (lastTransaction.status === NAVIGATION_STATUS.COMPLETED) {
2428
- syncLocationKey2();
2429
- } else if (isFailedNavigation(lastTransaction.status)) {
2424
+ let t0;
2425
+ let t1;
2426
+ if ($[0] !== clearPreparedRouteReset || $[1] !== lastTransaction || $[2] !== stopLoading || $[3] !== syncLocationKey2) {
2427
+ t0 = () => {
2428
+ if (settledTripRef.current === lastTransaction) {
2429
+ return;
2430
+ }
2431
+ settledTripRef.current = lastTransaction;
2432
+ if (!lastTransaction) {
2433
+ return;
2434
+ }
2435
+ if (lastTransaction.status === NAVIGATION_STATUS.COMPLETED) {
2436
+ syncLocationKey2();
2437
+ } else {
2438
+ if (isFailedNavigation(lastTransaction.status)) {
2439
+ clearPreparedRouteReset();
2440
+ stopLoading();
2441
+ }
2442
+ }
2443
+ };
2444
+ t1 = [clearPreparedRouteReset, lastTransaction, stopLoading, syncLocationKey2];
2445
+ $[0] = clearPreparedRouteReset;
2446
+ $[1] = lastTransaction;
2447
+ $[2] = stopLoading;
2448
+ $[3] = syncLocationKey2;
2449
+ $[4] = t0;
2450
+ $[5] = t1;
2451
+ } else {
2452
+ t0 = $[4];
2453
+ t1 = $[5];
2454
+ }
2455
+ useEffect(t0, t1);
2456
+ let t2;
2457
+ if ($[6] !== clearPreparedRouteReset || $[7] !== closeSurface || $[8] !== navigator2) {
2458
+ t2 = (t32) => {
2459
+ const reason = t32 === void 0 ? GUARD_CANCEL_REASON : t32;
2460
+ navigator2.cancel(reason);
2430
2461
  clearPreparedRouteReset();
2431
- stopLoading();
2432
- }
2433
- }, [clearPreparedRouteReset, lastTransaction, stopLoading, syncLocationKey2]);
2434
- const cancelDock = useCallback((reason = GUARD_CANCEL_REASON) => {
2435
- navigator2.cancel(reason);
2436
- clearPreparedRouteReset();
2437
- closeSurface({
2438
- cancelled: true,
2439
- reason,
2440
- success: false
2441
- });
2442
- }, [clearPreparedRouteReset, closeSurface, navigator2]);
2443
- const commitDock = useCallback(async ({
2444
- force = false,
2445
- from,
2446
- href,
2447
- item,
2448
- routePolicy,
2449
- source = DEFAULT_NAVIGATION_SOURCE
2450
- }) => {
2451
- const result = await navigator2.navigate(href, {
2452
- force,
2453
- guard: guards.count() > 0 ? () => guards.check(href, from) : void 0,
2454
- onCommit: () => {
2455
- continuity?.remember?.(from);
2456
- blurActiveElement();
2457
- prepareRouteReset(routePolicy);
2458
- emitDockEvent(DOCK_EVENTS.NAVIGATE_START, {
2462
+ closeSurface({
2463
+ cancelled: true,
2464
+ reason,
2465
+ success: false
2466
+ });
2467
+ };
2468
+ $[6] = clearPreparedRouteReset;
2469
+ $[7] = closeSurface;
2470
+ $[8] = navigator2;
2471
+ $[9] = t2;
2472
+ } else {
2473
+ t2 = $[9];
2474
+ }
2475
+ const cancelDock = t2;
2476
+ let t3;
2477
+ if ($[10] !== closeSurface || $[11] !== continuity || $[12] !== guards || $[13] !== navigator2 || $[14] !== prepareRouteReset) {
2478
+ t3 = (request) => {
2479
+ const run = async (t42) => {
2480
+ const {
2481
+ force: t52,
2459
2482
  from,
2460
- to: href
2483
+ href,
2484
+ item,
2485
+ routePolicy,
2486
+ source: t62
2487
+ } = t42;
2488
+ const force = t52 === void 0 ? false : t52;
2489
+ const source = t62 === void 0 ? DEFAULT_NAVIGATION_SOURCE : t62;
2490
+ const result = await navigator2.navigate(href, {
2491
+ force,
2492
+ guard: guards.count() > 0 ? () => guards.check(href, from) : void 0,
2493
+ onCommit: () => {
2494
+ continuity?.remember?.(from);
2495
+ blurActiveElement();
2496
+ prepareRouteReset(routePolicy);
2497
+ emitDockEvent(DOCK_EVENTS.NAVIGATE_START, {
2498
+ from,
2499
+ to: href
2500
+ });
2501
+ },
2502
+ source
2461
2503
  });
2462
- },
2463
- source
2464
- });
2465
- if (result.ok) {
2466
- emitDockEvent(DOCK_EVENTS.NAVIGATE, {
2467
- from,
2468
- item,
2469
- to: href
2470
- });
2471
- return true;
2472
- }
2473
- if (result.blocked) {
2474
- blurActiveElement();
2475
- openDockGuardConfirmation({
2476
- closeSurface,
2477
- commit: (confirmed) => (
2478
- // Compiler exception (docs/architecture-and-rules.md): the guard
2479
- // confirmation runs after commitDock is declared, on user input.
2480
- // eslint-disable-next-line react-hooks/immutability
2481
- void commitDock({
2482
- ...confirmed,
2483
- force: true
2484
- }).catch((error) => report("Dock route transition", error))
2485
- ),
2486
- from,
2487
- href,
2488
- message: result.blocked.message,
2489
- routePolicy
2490
- });
2491
- }
2492
- return false;
2493
- }, [closeSurface, continuity, guards, navigator2, prepareRouteReset]);
2494
- const navigate = useCallback(async (href_0, {
2495
- force: force_0 = false,
2496
- item: item_0 = null,
2497
- source: source_0 = DEFAULT_NAVIGATION_SOURCE
2498
- } = {}) => {
2499
- if (!href_0) return false;
2500
- const from_0 = locationKey;
2501
- const routePolicy_0 = resolveDockRoutePolicy({
2502
- href: href_0,
2503
- item: item_0
2504
- });
2505
- if (!routePolicy_0.canNavigate) {
2506
- return false;
2507
- }
2508
- if (isSamePath(href_0, from_0)) return false;
2509
- try {
2510
- return await commitDock({
2511
- force: force_0,
2512
- from: from_0,
2504
+ if (result.ok) {
2505
+ emitDockEvent(DOCK_EVENTS.NAVIGATE, {
2506
+ from,
2507
+ item,
2508
+ to: href
2509
+ });
2510
+ return true;
2511
+ }
2512
+ if (result.blocked) {
2513
+ blurActiveElement();
2514
+ openDockGuardConfirmation({
2515
+ closeSurface,
2516
+ commit: (confirmed) => void run({
2517
+ ...confirmed,
2518
+ force: true
2519
+ }).catch(_temp23),
2520
+ from,
2521
+ href,
2522
+ message: result.blocked.message,
2523
+ routePolicy
2524
+ });
2525
+ }
2526
+ return false;
2527
+ };
2528
+ return run(request);
2529
+ };
2530
+ $[10] = closeSurface;
2531
+ $[11] = continuity;
2532
+ $[12] = guards;
2533
+ $[13] = navigator2;
2534
+ $[14] = prepareRouteReset;
2535
+ $[15] = t3;
2536
+ } else {
2537
+ t3 = $[15];
2538
+ }
2539
+ const commitDock = t3;
2540
+ let t4;
2541
+ if ($[16] !== commitDock || $[17] !== locationKey || $[18] !== stopLoading) {
2542
+ t4 = async (href_0, t52) => {
2543
+ const {
2544
+ force: t62,
2545
+ item: t72,
2546
+ source: t8
2547
+ } = t52 === void 0 ? {} : t52;
2548
+ const force_0 = t62 === void 0 ? false : t62;
2549
+ const item_0 = t72 === void 0 ? null : t72;
2550
+ const source_0 = t8 === void 0 ? DEFAULT_NAVIGATION_SOURCE : t8;
2551
+ if (!href_0) {
2552
+ return false;
2553
+ }
2554
+ const from_0 = locationKey;
2555
+ const routePolicy_0 = resolveDockRoutePolicy({
2513
2556
  href: href_0,
2514
- routePolicy: routePolicy_0,
2515
- source: source_0
2557
+ item: item_0
2558
+ });
2559
+ if (!routePolicy_0.canNavigate) {
2560
+ return false;
2561
+ }
2562
+ if (isSamePath(href_0, from_0)) {
2563
+ return false;
2564
+ }
2565
+ try {
2566
+ return await commitDock({
2567
+ force: force_0,
2568
+ from: from_0,
2569
+ href: href_0,
2570
+ routePolicy: routePolicy_0,
2571
+ source: source_0
2572
+ });
2573
+ } catch (t9) {
2574
+ const error_0 = t9;
2575
+ stopLoading();
2576
+ report("Dock navigation", error_0);
2577
+ return false;
2578
+ }
2579
+ };
2580
+ $[16] = commitDock;
2581
+ $[17] = locationKey;
2582
+ $[18] = stopLoading;
2583
+ $[19] = t4;
2584
+ } else {
2585
+ t4 = $[19];
2586
+ }
2587
+ const navigate = t4;
2588
+ let t5;
2589
+ let t6;
2590
+ if ($[20] !== locationKey || $[21] !== navigator2 || $[22] !== stopLoading) {
2591
+ t5 = () => {
2592
+ navigator2.arrive(locationKey);
2593
+ if (previousLocationKeyRef.current === locationKey) {
2594
+ return;
2595
+ }
2596
+ emitDockEvent(DOCK_EVENTS.NAVIGATE_END, {
2597
+ duration: void 0,
2598
+ from: previousLocationKeyRef.current,
2599
+ to: locationKey
2516
2600
  });
2517
- } catch (error_0) {
2601
+ previousLocationKeyRef.current = locationKey;
2518
2602
  stopLoading();
2519
- report("Dock navigation", error_0);
2520
- return false;
2521
- }
2522
- }, [commitDock, locationKey, stopLoading]);
2523
- useEffect(() => {
2524
- navigator2.arrive(locationKey);
2525
- if (previousLocationKeyRef.current === locationKey) return;
2526
- emitDockEvent(DOCK_EVENTS.NAVIGATE_END, {
2527
- duration: void 0,
2528
- from: previousLocationKeyRef.current,
2529
- to: locationKey
2530
- });
2531
- previousLocationKeyRef.current = locationKey;
2532
- stopLoading();
2533
- }, [locationKey, navigator2, stopLoading]);
2534
- return {
2535
- activeTransaction,
2536
- cancelDock,
2537
- lastTransaction,
2538
- locationKey,
2539
- navigate,
2540
- pathname
2541
- };
2603
+ };
2604
+ t6 = [locationKey, navigator2, stopLoading];
2605
+ $[20] = locationKey;
2606
+ $[21] = navigator2;
2607
+ $[22] = stopLoading;
2608
+ $[23] = t5;
2609
+ $[24] = t6;
2610
+ } else {
2611
+ t5 = $[23];
2612
+ t6 = $[24];
2613
+ }
2614
+ useEffect(t5, t6);
2615
+ let t7;
2616
+ if ($[25] !== activeTransaction || $[26] !== cancelDock || $[27] !== lastTransaction || $[28] !== locationKey || $[29] !== navigate || $[30] !== pathname) {
2617
+ t7 = {
2618
+ activeTransaction,
2619
+ cancelDock,
2620
+ lastTransaction,
2621
+ locationKey,
2622
+ navigate,
2623
+ pathname
2624
+ };
2625
+ $[25] = activeTransaction;
2626
+ $[26] = cancelDock;
2627
+ $[27] = lastTransaction;
2628
+ $[28] = locationKey;
2629
+ $[29] = navigate;
2630
+ $[30] = pathname;
2631
+ $[31] = t7;
2632
+ } else {
2633
+ t7 = $[31];
2634
+ }
2635
+ return t7;
2636
+ }
2637
+ function _temp23(error) {
2638
+ return report("Dock route transition", error);
2542
2639
  }
2543
2640
  function isValidComponentType(type) {
2544
2641
  if (typeof type === "function") return true;
@@ -4556,7 +4653,7 @@ function useSurfaceStep() {
4556
4653
  popStep,
4557
4654
  pushStep
4558
4655
  } = useDockActions();
4559
- const surfaceStack = useDockSelector(_temp23) || EMPTY_SURFACE_STACK;
4656
+ const surfaceStack = useDockSelector(_temp24) || EMPTY_SURFACE_STACK;
4560
4657
  const activeEntry = surfaceStack[surfaceStack.length - 1] || null;
4561
4658
  let t0;
4562
4659
  if ($[0] !== activeEntry) {
@@ -4655,7 +4752,7 @@ function useSurfaceStep() {
4655
4752
  }
4656
4753
  return t5;
4657
4754
  }
4658
- function _temp23(s) {
4755
+ function _temp24(s) {
4659
4756
  return s.surfaceStack;
4660
4757
  }
4661
4758
  function createSurfaceError(code, message) {
@@ -6004,7 +6101,7 @@ function useDockModel() {
6004
6101
  const {
6005
6102
  contextActions,
6006
6103
  hud
6007
- } = useDockSelector(_temp11, _temp24);
6104
+ } = useDockSelector(_temp11, _temp25);
6008
6105
  const {
6009
6106
  clearHud
6010
6107
  } = useDockActions();
@@ -6312,7 +6409,7 @@ function useDockModel() {
6312
6409
  }
6313
6410
  return t17;
6314
6411
  }
6315
- function _temp24(left, right) {
6412
+ function _temp25(left, right) {
6316
6413
  return left.contextActions === right.contextActions && left.hud === right.hud;
6317
6414
  }
6318
6415
  function _temp11(state) {
@@ -10232,7 +10329,7 @@ function useDockSurfaceExtensionsBarModel(t0) {
10232
10329
  let t2;
10233
10330
  if ($[3] !== activeItem?.extensions || $[4] !== activeItem?.surfaceExtensions || $[5] !== dynamicExtensions) {
10234
10331
  const raw = activeItem?.surfaceExtensions || activeItem?.extensions || [];
10235
- const descriptorExtensions = Array.isArray(raw) ? raw.map(normalizeSurfaceExtension).filter(_temp25) : [];
10332
+ const descriptorExtensions = Array.isArray(raw) ? raw.map(normalizeSurfaceExtension).filter(_temp26) : [];
10236
10333
  const map = /* @__PURE__ */ new Map();
10237
10334
  descriptorExtensions.forEach((ext_0) => map.set(ext_0.id, ext_0));
10238
10335
  dynamicExtensions.forEach((ext_1) => map.set(ext_1.id, ext_1));
@@ -10260,7 +10357,7 @@ function useDockSurfaceExtensionsBarModel(t0) {
10260
10357
  function _temp33(a, b) {
10261
10358
  return a.order - b.order;
10262
10359
  }
10263
- function _temp25(ext) {
10360
+ function _temp26(ext) {
10264
10361
  return ext !== null;
10265
10362
  }
10266
10363
  function _temp14() {
@@ -10321,7 +10418,7 @@ function ExtensionPill(t0) {
10321
10418
  }
10322
10419
  let t4;
10323
10420
  if ($[12] !== content || $[13] !== fill || $[14] !== t3) {
10324
- t4 = /* @__PURE__ */ jsx("div", { "data-fill": fill, className: t3, onClick: _temp26, children: content });
10421
+ t4 = /* @__PURE__ */ jsx("div", { "data-fill": fill, className: t3, onClick: _temp27, children: content });
10325
10422
  $[12] = content;
10326
10423
  $[13] = fill;
10327
10424
  $[14] = t3;
@@ -10331,7 +10428,7 @@ function ExtensionPill(t0) {
10331
10428
  }
10332
10429
  return t4;
10333
10430
  }
10334
- function _temp26(e_0) {
10431
+ function _temp27(e_0) {
10335
10432
  return e_0.stopPropagation();
10336
10433
  }
10337
10434
  function _temp15(e) {
@@ -15552,7 +15649,7 @@ function useDockConfig(configOrTitle, options) {
15552
15649
  }
15553
15650
  let t2;
15554
15651
  if ($[4] !== actions?.closeAllSurfaces) {
15555
- t2 = actions?.closeAllSurfaces ?? _temp27;
15652
+ t2 = actions?.closeAllSurfaces ?? _temp28;
15556
15653
  $[4] = actions?.closeAllSurfaces;
15557
15654
  $[5] = t2;
15558
15655
  } else {
@@ -15653,7 +15750,7 @@ function _temp43() {
15653
15750
  }
15654
15751
  function _temp35() {
15655
15752
  }
15656
- function _temp27() {
15753
+ function _temp28() {
15657
15754
  }
15658
15755
  function _temp21() {
15659
15756
  }
@@ -15662,7 +15759,7 @@ function useDockDimensions() {
15662
15759
  const {
15663
15760
  dockHeight
15664
15761
  } = useDockHeight();
15665
- const activeItem = useDockSelector(_temp28);
15762
+ const activeItem = useDockSelector(_temp29);
15666
15763
  const t0 = activeItem?.width ?? null;
15667
15764
  const t1 = Boolean(activeItem?.isSurface);
15668
15765
  let t2;
@@ -15681,7 +15778,7 @@ function useDockDimensions() {
15681
15778
  }
15682
15779
  return t2;
15683
15780
  }
15684
- function _temp28(state) {
15781
+ function _temp29(state) {
15685
15782
  return state.activeItem;
15686
15783
  }
15687
15784
  function useSurfaceReturn() {
@@ -15690,7 +15787,7 @@ function useSurfaceReturn() {
15690
15787
  const {
15691
15788
  continuity
15692
15789
  } = useDockActions();
15693
- const dockReturnHandoffs = useDockSelector(_temp29);
15790
+ const dockReturnHandoffs = useDockSelector(_temp30);
15694
15791
  let t0;
15695
15792
  if ($[0] !== dockReturnHandoffs) {
15696
15793
  t0 = dockReturnHandoffs || [];
@@ -15753,10 +15850,10 @@ function useSurfaceReturn() {
15753
15850
  }
15754
15851
  return t4;
15755
15852
  }
15756
- function _temp29(state) {
15853
+ function _temp30(state) {
15757
15854
  return state.dockReturnHandoffs;
15758
15855
  }
15759
15856
 
15760
15857
  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 };
15761
- //# sourceMappingURL=chunk-AYUEZPAN.js.map
15762
- //# sourceMappingURL=chunk-AYUEZPAN.js.map
15858
+ //# sourceMappingURL=chunk-2EFQJITY.js.map
15859
+ //# sourceMappingURL=chunk-2EFQJITY.js.map