@fluentui/react-positioning 0.0.0-nightly-20230530-0415.1 → 0.0.0-nightly-20230531-0416.1
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/CHANGELOG.json +9 -9
- package/CHANGELOG.md +7 -7
- package/lib/constants.js +0 -2
- package/lib/constants.js.map +1 -1
- package/lib/createArrowStyles.js +0 -2
- package/lib/createArrowStyles.js.map +1 -1
- package/lib/createPositionManager.js +0 -2
- package/lib/createPositionManager.js.map +1 -1
- package/lib/createVirtualElementFromClick.js +0 -2
- package/lib/createVirtualElementFromClick.js.map +1 -1
- package/lib/index.js +0 -2
- package/lib/index.js.map +1 -1
- package/lib/middleware/coverTarget.js +0 -2
- package/lib/middleware/coverTarget.js.map +1 -1
- package/lib/middleware/flip.js +0 -2
- package/lib/middleware/flip.js.map +1 -1
- package/lib/middleware/index.js +0 -2
- package/lib/middleware/index.js.map +1 -1
- package/lib/middleware/intersecting.js +0 -2
- package/lib/middleware/intersecting.js.map +1 -1
- package/lib/middleware/maxSize.js +0 -2
- package/lib/middleware/maxSize.js.map +1 -1
- package/lib/middleware/offset.js +0 -2
- package/lib/middleware/offset.js.map +1 -1
- package/lib/middleware/shift.js +0 -2
- package/lib/middleware/shift.js.map +1 -1
- package/lib/types.js +0 -2
- package/lib/types.js.map +1 -1
- package/lib/usePositioning.js +0 -2
- package/lib/usePositioning.js.map +1 -1
- package/lib/usePositioningMouseTarget.js +0 -2
- package/lib/usePositioningMouseTarget.js.map +1 -1
- package/lib/utils/debounce.js +0 -2
- package/lib/utils/debounce.js.map +1 -1
- package/lib/utils/fromFloatingUIPlacement.js +0 -2
- package/lib/utils/fromFloatingUIPlacement.js.map +1 -1
- package/lib/utils/getBoundary.js +0 -2
- package/lib/utils/getBoundary.js.map +1 -1
- package/lib/utils/getFloatingUIOffset.js +0 -2
- package/lib/utils/getFloatingUIOffset.js.map +1 -1
- package/lib/utils/getReactFiberFromNode.js +0 -2
- package/lib/utils/getReactFiberFromNode.js.map +1 -1
- package/lib/utils/getScrollParent.js +0 -2
- package/lib/utils/getScrollParent.js.map +1 -1
- package/lib/utils/hasAutoFocusFilter.js +0 -2
- package/lib/utils/hasAutoFocusFilter.js.map +1 -1
- package/lib/utils/index.js +0 -2
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/mergeArrowOffset.js +0 -2
- package/lib/utils/mergeArrowOffset.js.map +1 -1
- package/lib/utils/parseFloatingUIPlacement.js +0 -2
- package/lib/utils/parseFloatingUIPlacement.js.map +1 -1
- package/lib/utils/resolvePositioningShorthand.js +0 -2
- package/lib/utils/resolvePositioningShorthand.js.map +1 -1
- package/lib/utils/toFloatingUIPadding.js +0 -2
- package/lib/utils/toFloatingUIPadding.js.map +1 -1
- package/lib/utils/toFloatingUIPlacement.js +0 -2
- package/lib/utils/toFloatingUIPlacement.js.map +1 -1
- package/lib/utils/toggleScrollListener.js +0 -2
- package/lib/utils/toggleScrollListener.js.map +1 -1
- package/lib/utils/useCallbackRef.js +0 -2
- package/lib/utils/useCallbackRef.js.map +1 -1
- package/lib/utils/writeArrowUpdates.js +0 -2
- package/lib/utils/writeArrowUpdates.js.map +1 -1
- package/lib/utils/writeContainerupdates.js +0 -2
- package/lib/utils/writeContainerupdates.js.map +1 -1
- package/lib-commonjs/constants.js +1 -3
- package/lib-commonjs/constants.js.map +1 -1
- package/lib-commonjs/createArrowStyles.js +1 -3
- package/lib-commonjs/createArrowStyles.js.map +1 -1
- package/lib-commonjs/createPositionManager.js +1 -3
- package/lib-commonjs/createPositionManager.js.map +1 -1
- package/lib-commonjs/createVirtualElementFromClick.js +1 -3
- package/lib-commonjs/createVirtualElementFromClick.js.map +1 -1
- package/lib-commonjs/index.js +0 -3
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/middleware/coverTarget.js +1 -3
- package/lib-commonjs/middleware/coverTarget.js.map +1 -1
- package/lib-commonjs/middleware/flip.js +1 -3
- package/lib-commonjs/middleware/flip.js.map +1 -1
- package/lib-commonjs/middleware/index.js +0 -3
- package/lib-commonjs/middleware/index.js.map +1 -1
- package/lib-commonjs/middleware/intersecting.js +1 -3
- package/lib-commonjs/middleware/intersecting.js.map +1 -1
- package/lib-commonjs/middleware/maxSize.js +1 -3
- package/lib-commonjs/middleware/maxSize.js.map +1 -1
- package/lib-commonjs/middleware/offset.js +1 -3
- package/lib-commonjs/middleware/offset.js.map +1 -1
- package/lib-commonjs/middleware/shift.js +1 -3
- package/lib-commonjs/middleware/shift.js.map +1 -1
- package/lib-commonjs/types.js +0 -3
- package/lib-commonjs/types.js.map +1 -1
- package/lib-commonjs/usePositioning.js +1 -3
- package/lib-commonjs/usePositioning.js.map +1 -1
- package/lib-commonjs/usePositioningMouseTarget.js +1 -3
- package/lib-commonjs/usePositioningMouseTarget.js.map +1 -1
- package/lib-commonjs/utils/debounce.js +1 -3
- package/lib-commonjs/utils/debounce.js.map +1 -1
- package/lib-commonjs/utils/fromFloatingUIPlacement.js +1 -3
- package/lib-commonjs/utils/fromFloatingUIPlacement.js.map +1 -1
- package/lib-commonjs/utils/getBoundary.js +1 -3
- package/lib-commonjs/utils/getBoundary.js.map +1 -1
- package/lib-commonjs/utils/getFloatingUIOffset.js +1 -3
- package/lib-commonjs/utils/getFloatingUIOffset.js.map +1 -1
- package/lib-commonjs/utils/getReactFiberFromNode.js +1 -3
- package/lib-commonjs/utils/getReactFiberFromNode.js.map +1 -1
- package/lib-commonjs/utils/getScrollParent.js +1 -3
- package/lib-commonjs/utils/getScrollParent.js.map +1 -1
- package/lib-commonjs/utils/hasAutoFocusFilter.js +1 -3
- package/lib-commonjs/utils/hasAutoFocusFilter.js.map +1 -1
- package/lib-commonjs/utils/index.js +0 -3
- package/lib-commonjs/utils/index.js.map +1 -1
- package/lib-commonjs/utils/mergeArrowOffset.js +1 -3
- package/lib-commonjs/utils/mergeArrowOffset.js.map +1 -1
- package/lib-commonjs/utils/parseFloatingUIPlacement.js +1 -3
- package/lib-commonjs/utils/parseFloatingUIPlacement.js.map +1 -1
- package/lib-commonjs/utils/resolvePositioningShorthand.js +1 -3
- package/lib-commonjs/utils/resolvePositioningShorthand.js.map +1 -1
- package/lib-commonjs/utils/toFloatingUIPadding.js +1 -3
- package/lib-commonjs/utils/toFloatingUIPadding.js.map +1 -1
- package/lib-commonjs/utils/toFloatingUIPlacement.js +1 -3
- package/lib-commonjs/utils/toFloatingUIPlacement.js.map +1 -1
- package/lib-commonjs/utils/toggleScrollListener.js +1 -3
- package/lib-commonjs/utils/toggleScrollListener.js.map +1 -1
- package/lib-commonjs/utils/useCallbackRef.js +1 -3
- package/lib-commonjs/utils/useCallbackRef.js.map +1 -1
- package/lib-commonjs/utils/writeArrowUpdates.js +1 -3
- package/lib-commonjs/utils/writeArrowUpdates.js.map +1 -1
- package/lib-commonjs/utils/writeContainerupdates.js +1 -3
- package/lib-commonjs/utils/writeContainerupdates.js.map +1 -1
- package/package.json +5 -5
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/utils/getReactFiberFromNode.ts"],"sourcesContent":["import * as React from 'react';\n\n// ========================================================\n// react/packages/shared/ReactTypes.js\n// ========================================================\n\ntype ReactEventResponder<E, C> = {\n $$typeof: Symbol | number;\n displayName: string;\n targetEventTypes: null | string[];\n rootEventTypes: null | string[];\n getInitialState: null | ((props: Object) => Object);\n onEvent: null | ((event: E, context: C, props: Object, state: Object) => void);\n onRootEvent: null | ((event: E, context: C, props: Object, state: Object) => void);\n onMount: null | ((context: C, props: Object, state: Object) => void);\n onUnmount: null | ((context: C, props: Object, state: Object) => void);\n};\n\ntype ReactEventResponderInstance<E, C> = {\n fiber: Object;\n props: Object;\n responder: ReactEventResponder<E, C>;\n rootEventTypes: null | Set<string>;\n state: Object;\n};\n\n// ========================================================\n// react/packages/react-reconciler/src/ReactFiberHooks.js\n// ========================================================\n\nexport type HookType =\n | 'useState'\n | 'useReducer'\n | 'useContext'\n | 'useRef'\n | 'useEffect'\n | 'useLayoutEffect'\n | 'useCallback'\n | 'useMemo'\n | 'useImperativeHandle'\n | 'useDebugValue'\n | 'useResponder';\n\ntype ReactProviderType<T> = {\n $$typeof: Symbol | number;\n _context: ReactContext<T>;\n};\n\ntype ReactContext<T> = {\n $$typeof: Symbol | number;\n Consumer: ReactContext<T>;\n Provider: ReactProviderType<T>;\n\n _calculateChangedBits: ((a: T, b: T) => number) | null;\n\n _currentValue: T;\n _currentValue2: T;\n _threadCount: number;\n\n // DEV only\n _currentRenderer?: Object | null;\n _currentRenderer2?: Object | null;\n};\n\ntype ContextDependency<T> = {\n context: ReactContext<T>;\n observedBits: number;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n next: ContextDependency<any> | null;\n};\n\nenum WorkTag {\n FunctionComponent = 0,\n ClassComponent = 1,\n IndeterminateComponent = 2, // Before we know whether it is function or class\n HostRoot = 3, // Root of a host tree. Could be nested inside another node.\n HostPortal = 4, // A subtree. Could be an entry point to a different renderer.\n HostComponent = 5,\n HostText = 6,\n Fragment = 7,\n Mode = 8,\n ContextConsumer = 9,\n ContextProvider = 10,\n ForwardRef = 11,\n Profiler = 12,\n SuspenseComponent = 13,\n MemoComponent = 14,\n SimpleMemoComponent = 15,\n LazyComponent = 16,\n IncompleteClassComponent = 17,\n DehydratedFragment = 18,\n SuspenseListComponent = 19,\n FundamentalComponent = 20,\n ScopeComponent = 21,\n}\n\ntype Source = {\n fileName: string;\n lineNumber: number;\n};\n\ntype ExpirationTime = number;\n\ntype Dependencies = {\n expirationTime: ExpirationTime;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n firstContext: ContextDependency<any> | null;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n responders: Map<ReactEventResponder<any, any>, ReactEventResponderInstance<any, any>> | null;\n};\n\n// ========================================================\n// react/packages/react-reconciler/src/ReactFiber.js\n// ========================================================\n\n// A Fiber is work on a Component that needs to be done or was done. There can\n// be more than one per component.\n\nexport type Fiber = {\n // These first fields are conceptually members of an Instance. This used to\n // be split into a separate type and intersected with the other Fiber fields,\n // but until Flow fixes its intersection bugs, we've merged them into a\n // single type.\n\n // An Instance is shared between all versions of a component. We can easily\n // break this out into a separate object to avoid copying so much to the\n // alternate versions of the tree. We put this on a single object for now to\n // minimize the number of objects created during the initial render.\n\n // Tag identifying the type of fiber.\n tag: WorkTag;\n\n // Unique identifier of this child.\n key: null | string;\n\n // The value of element.type which is used to preserve the identity during\n // reconciliation of this child.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n elementType: any;\n\n // The resolved function/class/ associated with this fiber.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n type: any;\n\n // The local state associated with this fiber.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n stateNode: any;\n\n // Conceptual aliases\n // parent : Instance -> return The parent happens to be the same as the\n // return fiber since we've merged the fiber and instance.\n\n // Remaining fields belong to Fiber\n\n // The Fiber to return to after finishing processing this one.\n // This is effectively the parent, but there can be multiple parents (two)\n // so this is only the parent of the thing we're currently processing.\n // It is conceptually the same as the return address of a stack frame.\n return: Fiber | null;\n\n // Singly Linked List Tree Structure.\n child: Fiber | null;\n sibling: Fiber | null;\n index: number;\n\n // The ref last used to attach this node.\n // I'll avoid adding an owner field for prod and model that as functions.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref: React.Ref<any>;\n\n // Input is the data coming into process this fiber. Arguments. Props.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n pendingProps: any; // This type will be more specific once we overload the tag.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n memoizedProps: any; // The props used to create the output.\n\n // A queue of state updates and callbacks.\n // updateQueue: UpdateQueue<any> | null,\n\n // The state used to create the output\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n memoizedState: any;\n\n // Dependencies (contexts, events) for this fiber, if it has any\n dependencies: Dependencies | null;\n\n // // Bitfield that describes properties about the fiber and its subtree. E.g.\n // // the ConcurrentMode flag indicates whether the subtree should be async-by-\n // // default. When a fiber is created, it inherits the mode of its\n // // parent. Additional flags can be set at creation time, but after that the\n // // value should remain unchanged throughout the fiber's lifetime, particularly\n // // before its child fibers are created.\n // mode: TypeOfMode\n //\n // // Effect\n // effectTag: SideEffectTag\n\n // Singly linked list fast path to the next fiber with side-effects.\n nextEffect: Fiber | null;\n\n // The first and last fiber with side-effect within this subtree. This allows\n // us to reuse a slice of the linked list when we reuse the work done within\n // this fiber.\n firstEffect: Fiber | null;\n lastEffect: Fiber | null;\n\n // Represents a time in the future by which this work should be completed.\n // Does not include work found in its subtree.\n expirationTime: ExpirationTime;\n\n // This is used to quickly determine if a subtree has no pending changes.\n childExpirationTime: ExpirationTime;\n\n // This is a pooled version of a Fiber. Every fiber that gets updated will\n // eventually have a pair. There are cases when we can clean up pairs to save\n // memory if we need to.\n alternate: Fiber | null;\n\n // Time spent rendering this Fiber and its descendants for the current update.\n // This tells us how well the tree makes use of sCU for memoization.\n // It is reset to 0 each time we render and only updated when we don't bailout.\n // This field is only set when the enableProfilerTimer flag is enabled.\n actualDuration?: number;\n\n // If the Fiber is currently active in the \"render\" phase,\n // This marks the time at which the work began.\n // This field is only set when the enableProfilerTimer flag is enabled.\n actualStartTime?: number;\n\n // Duration of the most recent render time for this Fiber.\n // This value is not updated when we bailout for memoization purposes.\n // This field is only set when the enableProfilerTimer flag is enabled.\n selfBaseDuration?: number;\n\n // Sum of base times for all descendants of this Fiber.\n // This value bubbles up during the \"complete\" phase.\n // This field is only set when the enableProfilerTimer flag is enabled.\n treeBaseDuration?: number;\n\n // Conceptual aliases\n // workInProgress : Fiber -> alternate The alternate used for reuse happens\n // to be the same as work in progress.\n // __DEV__ only\n _debugID?: number;\n _debugSource?: Source | null;\n _debugOwner?: Fiber | null;\n _debugIsCurrentlyTiming?: boolean;\n _debugNeedsRemount?: boolean;\n\n // Used to verify that the order of hooks does not change between renders.\n _debugHookTypes?: HookType[] | null;\n};\n\nexport function getReactFiberFromNode(elm: Node | undefined): Fiber | null {\n if (!elm) {\n return null;\n }\n\n for (const k in elm) {\n // React 16 uses \"__reactInternalInstance$\" prefix\n // React 17 uses \"__reactFiber$\" prefix\n // https://github.com/facebook/react/pull/18377\n if (k.indexOf('__reactInternalInstance$') === 0 || k.indexOf('__reactFiber$') === 0) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n return elm[k];\n }\n }\n\n throw new Error('getReactFiber(): Failed to find a React Fiber on a node');\n}\n"],"names":["React","WorkTag","FunctionComponent","ClassComponent","IndeterminateComponent","HostRoot","HostPortal","HostComponent","HostText","Fragment","Mode","ContextConsumer","ContextProvider","ForwardRef","Profiler","SuspenseComponent","MemoComponent","SimpleMemoComponent","LazyComponent","IncompleteClassComponent","DehydratedFragment","SuspenseListComponent","FundamentalComponent","ScopeComponent","getReactFiberFromNode","elm","k","indexOf","Error"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;IAuE/B;UAAKC,OAAO;IAAPA,QAAAA,QACHC,uBAAoB,KAApBA;IADGD,QAAAA,QAEHE,oBAAiB,KAAjBA;IAFGF,QAAAA,QAGHG,4BAAyB,KAAzBA;IAHGH,QAAAA,QAIHI,cAAW,KAAXA;IAJGJ,QAAAA,QAKHK,gBAAa,KAAbA;IALGL,QAAAA,QAMHM,mBAAgB,KAAhBA;IANGN,QAAAA,QAOHO,cAAW,KAAXA;IAPGP,QAAAA,QAQHQ,cAAW,KAAXA;IARGR,QAAAA,QASHS,UAAO,KAAPA;IATGT,QAAAA,QAUHU,qBAAkB,KAAlBA;IAVGV,QAAAA,QAWHW,qBAAkB,MAAlBA;IAXGX,QAAAA,QAYHY,gBAAa,MAAbA;IAZGZ,QAAAA,QAaHa,cAAW,MAAXA;IAbGb,QAAAA,QAcHc,uBAAoB,MAApBA;IAdGd,QAAAA,QAeHe,mBAAgB,MAAhBA;IAfGf,QAAAA,QAgBHgB,yBAAsB,MAAtBA;IAhBGhB,QAAAA,QAiBHiB,mBAAgB,MAAhBA;IAjBGjB,QAAAA,QAkBHkB,8BAA2B,MAA3BA;IAlBGlB,QAAAA,QAmBHmB,wBAAqB,MAArBA;IAnBGnB,QAAAA,QAoBHoB,2BAAwB,MAAxBA;IApBGpB,QAAAA,QAqBHqB,0BAAuB,MAAvBA;IArBGrB,QAAAA,QAsBHsB,oBAAiB,MAAjBA;GAtBGtB,YAAAA;AAsLL,OAAO,SAASuB,sBAAsBC,GAAqB,EAAgB;IACzE,IAAI,CAACA,KAAK;QACR,OAAO,IAAI;IACb,CAAC;IAED,IAAK,MAAMC,KAAKD,IAAK;QACnB,kDAAkD;QAClD,uCAAuC;QACvC,+CAA+C;QAC/C,IAAIC,EAAEC,OAAO,CAAC,gCAAgC,KAAKD,EAAEC,OAAO,CAAC,qBAAqB,GAAG;YACnF,6DAA6D;YAC7D,aAAa;YACb,OAAOF,GAAG,CAACC,EAAE;QACf,CAAC;IACH;IAEA,MAAM,IAAIE,MAAM,2DAA2D;AAC7E,CAAC"}
|
1
|
+
{"version":3,"sources":["getReactFiberFromNode.ts"],"sourcesContent":["import * as React from 'react';\n\n// ========================================================\n// react/packages/shared/ReactTypes.js\n// ========================================================\n\ntype ReactEventResponder<E, C> = {\n $$typeof: Symbol | number;\n displayName: string;\n targetEventTypes: null | string[];\n rootEventTypes: null | string[];\n getInitialState: null | ((props: Object) => Object);\n onEvent: null | ((event: E, context: C, props: Object, state: Object) => void);\n onRootEvent: null | ((event: E, context: C, props: Object, state: Object) => void);\n onMount: null | ((context: C, props: Object, state: Object) => void);\n onUnmount: null | ((context: C, props: Object, state: Object) => void);\n};\n\ntype ReactEventResponderInstance<E, C> = {\n fiber: Object;\n props: Object;\n responder: ReactEventResponder<E, C>;\n rootEventTypes: null | Set<string>;\n state: Object;\n};\n\n// ========================================================\n// react/packages/react-reconciler/src/ReactFiberHooks.js\n// ========================================================\n\nexport type HookType =\n | 'useState'\n | 'useReducer'\n | 'useContext'\n | 'useRef'\n | 'useEffect'\n | 'useLayoutEffect'\n | 'useCallback'\n | 'useMemo'\n | 'useImperativeHandle'\n | 'useDebugValue'\n | 'useResponder';\n\ntype ReactProviderType<T> = {\n $$typeof: Symbol | number;\n _context: ReactContext<T>;\n};\n\ntype ReactContext<T> = {\n $$typeof: Symbol | number;\n Consumer: ReactContext<T>;\n Provider: ReactProviderType<T>;\n\n _calculateChangedBits: ((a: T, b: T) => number) | null;\n\n _currentValue: T;\n _currentValue2: T;\n _threadCount: number;\n\n // DEV only\n _currentRenderer?: Object | null;\n _currentRenderer2?: Object | null;\n};\n\ntype ContextDependency<T> = {\n context: ReactContext<T>;\n observedBits: number;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n next: ContextDependency<any> | null;\n};\n\nenum WorkTag {\n FunctionComponent = 0,\n ClassComponent = 1,\n IndeterminateComponent = 2, // Before we know whether it is function or class\n HostRoot = 3, // Root of a host tree. Could be nested inside another node.\n HostPortal = 4, // A subtree. Could be an entry point to a different renderer.\n HostComponent = 5,\n HostText = 6,\n Fragment = 7,\n Mode = 8,\n ContextConsumer = 9,\n ContextProvider = 10,\n ForwardRef = 11,\n Profiler = 12,\n SuspenseComponent = 13,\n MemoComponent = 14,\n SimpleMemoComponent = 15,\n LazyComponent = 16,\n IncompleteClassComponent = 17,\n DehydratedFragment = 18,\n SuspenseListComponent = 19,\n FundamentalComponent = 20,\n ScopeComponent = 21,\n}\n\ntype Source = {\n fileName: string;\n lineNumber: number;\n};\n\ntype ExpirationTime = number;\n\ntype Dependencies = {\n expirationTime: ExpirationTime;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n firstContext: ContextDependency<any> | null;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n responders: Map<ReactEventResponder<any, any>, ReactEventResponderInstance<any, any>> | null;\n};\n\n// ========================================================\n// react/packages/react-reconciler/src/ReactFiber.js\n// ========================================================\n\n// A Fiber is work on a Component that needs to be done or was done. There can\n// be more than one per component.\n\nexport type Fiber = {\n // These first fields are conceptually members of an Instance. This used to\n // be split into a separate type and intersected with the other Fiber fields,\n // but until Flow fixes its intersection bugs, we've merged them into a\n // single type.\n\n // An Instance is shared between all versions of a component. We can easily\n // break this out into a separate object to avoid copying so much to the\n // alternate versions of the tree. We put this on a single object for now to\n // minimize the number of objects created during the initial render.\n\n // Tag identifying the type of fiber.\n tag: WorkTag;\n\n // Unique identifier of this child.\n key: null | string;\n\n // The value of element.type which is used to preserve the identity during\n // reconciliation of this child.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n elementType: any;\n\n // The resolved function/class/ associated with this fiber.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n type: any;\n\n // The local state associated with this fiber.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n stateNode: any;\n\n // Conceptual aliases\n // parent : Instance -> return The parent happens to be the same as the\n // return fiber since we've merged the fiber and instance.\n\n // Remaining fields belong to Fiber\n\n // The Fiber to return to after finishing processing this one.\n // This is effectively the parent, but there can be multiple parents (two)\n // so this is only the parent of the thing we're currently processing.\n // It is conceptually the same as the return address of a stack frame.\n return: Fiber | null;\n\n // Singly Linked List Tree Structure.\n child: Fiber | null;\n sibling: Fiber | null;\n index: number;\n\n // The ref last used to attach this node.\n // I'll avoid adding an owner field for prod and model that as functions.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref: React.Ref<any>;\n\n // Input is the data coming into process this fiber. Arguments. Props.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n pendingProps: any; // This type will be more specific once we overload the tag.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n memoizedProps: any; // The props used to create the output.\n\n // A queue of state updates and callbacks.\n // updateQueue: UpdateQueue<any> | null,\n\n // The state used to create the output\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n memoizedState: any;\n\n // Dependencies (contexts, events) for this fiber, if it has any\n dependencies: Dependencies | null;\n\n // // Bitfield that describes properties about the fiber and its subtree. E.g.\n // // the ConcurrentMode flag indicates whether the subtree should be async-by-\n // // default. When a fiber is created, it inherits the mode of its\n // // parent. Additional flags can be set at creation time, but after that the\n // // value should remain unchanged throughout the fiber's lifetime, particularly\n // // before its child fibers are created.\n // mode: TypeOfMode\n //\n // // Effect\n // effectTag: SideEffectTag\n\n // Singly linked list fast path to the next fiber with side-effects.\n nextEffect: Fiber | null;\n\n // The first and last fiber with side-effect within this subtree. This allows\n // us to reuse a slice of the linked list when we reuse the work done within\n // this fiber.\n firstEffect: Fiber | null;\n lastEffect: Fiber | null;\n\n // Represents a time in the future by which this work should be completed.\n // Does not include work found in its subtree.\n expirationTime: ExpirationTime;\n\n // This is used to quickly determine if a subtree has no pending changes.\n childExpirationTime: ExpirationTime;\n\n // This is a pooled version of a Fiber. Every fiber that gets updated will\n // eventually have a pair. There are cases when we can clean up pairs to save\n // memory if we need to.\n alternate: Fiber | null;\n\n // Time spent rendering this Fiber and its descendants for the current update.\n // This tells us how well the tree makes use of sCU for memoization.\n // It is reset to 0 each time we render and only updated when we don't bailout.\n // This field is only set when the enableProfilerTimer flag is enabled.\n actualDuration?: number;\n\n // If the Fiber is currently active in the \"render\" phase,\n // This marks the time at which the work began.\n // This field is only set when the enableProfilerTimer flag is enabled.\n actualStartTime?: number;\n\n // Duration of the most recent render time for this Fiber.\n // This value is not updated when we bailout for memoization purposes.\n // This field is only set when the enableProfilerTimer flag is enabled.\n selfBaseDuration?: number;\n\n // Sum of base times for all descendants of this Fiber.\n // This value bubbles up during the \"complete\" phase.\n // This field is only set when the enableProfilerTimer flag is enabled.\n treeBaseDuration?: number;\n\n // Conceptual aliases\n // workInProgress : Fiber -> alternate The alternate used for reuse happens\n // to be the same as work in progress.\n // __DEV__ only\n _debugID?: number;\n _debugSource?: Source | null;\n _debugOwner?: Fiber | null;\n _debugIsCurrentlyTiming?: boolean;\n _debugNeedsRemount?: boolean;\n\n // Used to verify that the order of hooks does not change between renders.\n _debugHookTypes?: HookType[] | null;\n};\n\nexport function getReactFiberFromNode(elm: Node | undefined): Fiber | null {\n if (!elm) {\n return null;\n }\n\n for (const k in elm) {\n // React 16 uses \"__reactInternalInstance$\" prefix\n // React 17 uses \"__reactFiber$\" prefix\n // https://github.com/facebook/react/pull/18377\n if (k.indexOf('__reactInternalInstance$') === 0 || k.indexOf('__reactFiber$') === 0) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n return elm[k];\n }\n }\n\n throw new Error('getReactFiber(): Failed to find a React Fiber on a node');\n}\n"],"names":["React","WorkTag","FunctionComponent","ClassComponent","IndeterminateComponent","HostRoot","HostPortal","HostComponent","HostText","Fragment","Mode","ContextConsumer","ContextProvider","ForwardRef","Profiler","SuspenseComponent","MemoComponent","SimpleMemoComponent","LazyComponent","IncompleteClassComponent","DehydratedFragment","SuspenseListComponent","FundamentalComponent","ScopeComponent","getReactFiberFromNode","elm","k","indexOf","Error"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;IAuE/B;UAAKC,OAAO;IAAPA,QAAAA,QACHC,uBAAoB,KAApBA;IADGD,QAAAA,QAEHE,oBAAiB,KAAjBA;IAFGF,QAAAA,QAGHG,4BAAyB,KAAzBA;IAHGH,QAAAA,QAIHI,cAAW,KAAXA;IAJGJ,QAAAA,QAKHK,gBAAa,KAAbA;IALGL,QAAAA,QAMHM,mBAAgB,KAAhBA;IANGN,QAAAA,QAOHO,cAAW,KAAXA;IAPGP,QAAAA,QAQHQ,cAAW,KAAXA;IARGR,QAAAA,QASHS,UAAO,KAAPA;IATGT,QAAAA,QAUHU,qBAAkB,KAAlBA;IAVGV,QAAAA,QAWHW,qBAAkB,MAAlBA;IAXGX,QAAAA,QAYHY,gBAAa,MAAbA;IAZGZ,QAAAA,QAaHa,cAAW,MAAXA;IAbGb,QAAAA,QAcHc,uBAAoB,MAApBA;IAdGd,QAAAA,QAeHe,mBAAgB,MAAhBA;IAfGf,QAAAA,QAgBHgB,yBAAsB,MAAtBA;IAhBGhB,QAAAA,QAiBHiB,mBAAgB,MAAhBA;IAjBGjB,QAAAA,QAkBHkB,8BAA2B,MAA3BA;IAlBGlB,QAAAA,QAmBHmB,wBAAqB,MAArBA;IAnBGnB,QAAAA,QAoBHoB,2BAAwB,MAAxBA;IApBGpB,QAAAA,QAqBHqB,0BAAuB,MAAvBA;IArBGrB,QAAAA,QAsBHsB,oBAAiB,MAAjBA;GAtBGtB,YAAAA;AAsLL,OAAO,SAASuB,sBAAsBC,GAAqB,EAAgB;IACzE,IAAI,CAACA,KAAK;QACR,OAAO,IAAI;IACb,CAAC;IAED,IAAK,MAAMC,KAAKD,IAAK;QACnB,kDAAkD;QAClD,uCAAuC;QACvC,+CAA+C;QAC/C,IAAIC,EAAEC,OAAO,CAAC,gCAAgC,KAAKD,EAAEC,OAAO,CAAC,qBAAqB,GAAG;YACnF,6DAA6D;YAC7D,aAAa;YACb,OAAOF,GAAG,CAACC,EAAE;QACf,CAAC;IACH;IAEA,MAAM,IAAIE,MAAM,2DAA2D;AAC7E,CAAC"}
|
@@ -49,5 +49,3 @@ export const hasScrollParent = (node)=>{
|
|
49
49
|
const scrollParentElement = getScrollParent(node);
|
50
50
|
return scrollParentElement ? scrollParentElement !== ((_scrollParentElement_ownerDocument = scrollParentElement.ownerDocument) === null || _scrollParentElement_ownerDocument === void 0 ? void 0 : _scrollParentElement_ownerDocument.body) : false;
|
51
51
|
};
|
52
|
-
|
53
|
-
//# sourceMappingURL=getScrollParent.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["getScrollParent.ts"],"sourcesContent":["/**\n * Returns the parent node or the host of the node argument.\n * @param node - DOM node.\n * @returns - parent DOM node.\n */\nexport const getParentNode = (node: HTMLElement): HTMLElement => {\n if (node.nodeName === 'HTML') {\n return node;\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return node.parentNode || (node as any).host;\n};\n\n/**\n * Returns CSS styles of the given node.\n * @param node - DOM node.\n * @returns - CSS styles.\n */\nconst getStyleComputedProperty = (node: HTMLElement): Partial<CSSStyleDeclaration> => {\n if (node.nodeType !== 1) {\n return {};\n }\n\n const window = node.ownerDocument?.defaultView;\n return window!.getComputedStyle(node, null);\n};\n\n/**\n * Returns the first scrollable parent of the given element.\n * @param node - DOM node.\n * @returns - the first scrollable parent.\n */\nexport const getScrollParent = (node: Document | HTMLElement | null): HTMLElement => {\n // Return body, `getScroll` will take care to get the correct `scrollTop` from it\n const parentNode = node && getParentNode(node as HTMLElement);\n // eslint-disable-next-line\n if (!parentNode) return document.body;\n\n switch (parentNode.nodeName) {\n case 'HTML':\n case 'BODY':\n return parentNode.ownerDocument!.body;\n case '#document':\n return (parentNode as unknown as Document).body;\n }\n\n // If any of the overflow props is defined for the node then we return it as the parent\n const { overflow, overflowX, overflowY } = getStyleComputedProperty(parentNode);\n if (/(auto|scroll|overlay)/.test(overflow! + overflowY! + overflowX)) {\n return parentNode;\n }\n\n return getScrollParent(parentNode);\n};\n\nexport const hasScrollParent = (node: Document | HTMLElement | null): boolean => {\n const scrollParentElement: HTMLElement = getScrollParent(node);\n return scrollParentElement ? scrollParentElement !== scrollParentElement.ownerDocument?.body : false;\n};\n"],"names":["getParentNode","node","nodeName","parentNode","host","getStyleComputedProperty","nodeType","window","ownerDocument","defaultView","getComputedStyle","getScrollParent","document","body","overflow","overflowX","overflowY","test","hasScrollParent","scrollParentElement"],"mappings":"AAAA;;;;CAIC,GACD,OAAO,MAAMA,gBAAgB,CAACC,OAAmC;IAC/D,IAAIA,KAAKC,QAAQ,KAAK,QAAQ;QAC5B,OAAOD;IACT,CAAC;IACD,8DAA8D;IAC9D,OAAOA,KAAKE,UAAU,IAAI,AAACF,KAAaG,IAAI;AAC9C,EAAE;AAEF;;;;CAIC,GACD,MAAMC,2BAA2B,CAACJ,OAAoD;QAKrEA;IAJf,IAAIA,KAAKK,QAAQ,KAAK,GAAG;QACvB,OAAO,CAAC;IACV,CAAC;IAED,MAAMC,SAASN,CAAAA,sBAAAA,KAAKO,aAAa,cAAlBP,iCAAAA,KAAAA,IAAAA,oBAAoBQ,WAAW;IAC9C,OAAOF,OAAQG,gBAAgB,CAACT,MAAM,IAAI;AAC5C;AAEA;;;;CAIC,GACD,OAAO,MAAMU,kBAAkB,CAACV,OAAqD;IACnF,iFAAiF;IACjF,MAAME,aAAaF,QAAQD,cAAcC;IACzC,2BAA2B;IAC3B,IAAI,CAACE,YAAY,OAAOS,SAASC,IAAI;IAErC,OAAQV,WAAWD,QAAQ;QACzB,KAAK;QACL,KAAK;YACH,OAAOC,WAAWK,aAAa,CAAEK,IAAI;QACvC,KAAK;YACH,OAAO,AAACV,WAAmCU,IAAI;IACnD;IAEA,uFAAuF;IACvF,MAAM,EAAEC,SAAQ,EAAEC,UAAS,EAAEC,UAAS,EAAE,GAAGX,yBAAyBF;IACpE,IAAI,wBAAwBc,IAAI,CAACH,WAAYE,YAAaD,YAAY;QACpE,OAAOZ;IACT,CAAC;IAED,OAAOQ,gBAAgBR;AACzB,EAAE;AAEF,OAAO,MAAMe,kBAAkB,CAACjB,OAAiD;QAE1BkB;IADrD,MAAMA,sBAAmCR,gBAAgBV;IACzD,OAAOkB,sBAAsBA,wBAAwBA,CAAAA,CAAAA,qCAAAA,oBAAoBX,aAAa,cAAjCW,gDAAAA,KAAAA,IAAAA,mCAAmCN,IAAI,AAAD,IAAI,KAAK;AACtG,EAAE"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["hasAutoFocusFilter.ts"],"sourcesContent":["//\n// Dev utils to detect if nodes have \"autoFocus\" props.\n//\n\nimport { getReactFiberFromNode } from './getReactFiberFromNode';\n\n/**\n * Detects if a passed HTML node has \"autoFocus\" prop on a React's fiber. Is needed as React handles autofocus behavior\n * in React DOM and will not pass \"autoFocus\" to an actual HTML.\n *\n * @param node\n */\nfunction hasAutofocusProp(node: Node): boolean {\n // https://github.com/facebook/react/blob/848bb2426e44606e0a55dfe44c7b3ece33772485/packages/react-dom/src/client/ReactDOMHostConfig.js#L157-L166\n const isAutoFocusableElement =\n node.nodeName === 'BUTTON' ||\n node.nodeName === 'INPUT' ||\n node.nodeName === 'SELECT' ||\n node.nodeName === 'TEXTAREA';\n\n if (isAutoFocusableElement) {\n return !!getReactFiberFromNode(node)?.pendingProps.autoFocus;\n }\n\n return false;\n}\n\nexport function hasAutofocusFilter(node: Node) {\n return hasAutofocusProp(node) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n}\n"],"names":["getReactFiberFromNode","hasAutofocusProp","node","isAutoFocusableElement","nodeName","pendingProps","autoFocus","hasAutofocusFilter","NodeFilter","FILTER_ACCEPT","FILTER_SKIP"],"mappings":"AAAA,EAAE;AACF,uDAAuD;AACvD,EAAE;AAEF,SAASA,qBAAqB,QAAQ,0BAA0B;AAEhE;;;;;CAKC,GACD,SAASC,iBAAiBC,IAAU,EAAW;IAC7C,gJAAgJ;IAChJ,MAAMC,yBACJD,KAAKE,QAAQ,KAAK,YAClBF,KAAKE,QAAQ,KAAK,WAClBF,KAAKE,QAAQ,KAAK,YAClBF,KAAKE,QAAQ,KAAK;IAEpB,IAAID,wBAAwB;YACjBH;QAAT,OAAO,CAAC,EAACA,CAAAA,yBAAAA,sBAAsBE,mBAAtBF,oCAAAA,KAAAA,IAAAA,uBAA6BK,aAAaC,SAAS;IAC9D,CAAC;IAED,OAAO,KAAK;AACd;AAEA,OAAO,SAASC,mBAAmBL,IAAU,EAAE;IAC7C,OAAOD,iBAAiBC,QAAQM,WAAWC,aAAa,GAAGD,WAAWE,WAAW;AACnF,CAAC"}
|
package/lib/utils/index.js
CHANGED
package/lib/utils/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './parseFloatingUIPlacement';\nexport * from './getBoundary';\nexport * from './getReactFiberFromNode';\nexport * from './getScrollParent';\nexport * from './mergeArrowOffset';\nexport * from './toFloatingUIPadding';\nexport * from './toFloatingUIPlacement';\nexport * from './fromFloatingUIPlacement';\nexport * from './resolvePositioningShorthand';\nexport * from './useCallbackRef';\nexport * from './debounce';\nexport * from './toggleScrollListener';\nexport * from './hasAutoFocusFilter';\nexport * from './writeArrowUpdates';\nexport * from './writeContainerupdates';\n"],"names":[],"mappings":"AAAA,cAAc,6BAA6B;AAC3C,cAAc,gBAAgB;AAC9B,cAAc,0BAA0B;AACxC,cAAc,oBAAoB;AAClC,cAAc,qBAAqB;AACnC,cAAc,wBAAwB;AACtC,cAAc,0BAA0B;AACxC,cAAc,4BAA4B;AAC1C,cAAc,gCAAgC;AAC9C,cAAc,mBAAmB;AACjC,cAAc,aAAa;AAC3B,cAAc,yBAAyB;AACvC,cAAc,uBAAuB;AACrC,cAAc,sBAAsB;AACpC,cAAc,0BAA0B"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["mergeArrowOffset.ts"],"sourcesContent":["import type { Offset, OffsetObject } from '../types';\n\n/**\n * Generally when adding an arrow to popper, it's necessary to offset the position of the popper by the\n * height of the arrow. A simple utility to merge a provided offset with an arrow height to return the final offset\n *\n * @internal\n * @param userOffset - The offset provided by the user\n * @param arrowHeight - The height of the arrow in px\n * @returns User offset augmented with arrow height\n */\nexport function mergeArrowOffset(userOffset: Offset | undefined | null, arrowHeight: number): Offset {\n if (typeof userOffset === 'number') {\n return addArrowOffset(userOffset, arrowHeight);\n }\n\n if (typeof userOffset === 'object' && userOffset !== null) {\n return addArrowOffset(userOffset, arrowHeight);\n }\n\n if (typeof userOffset === 'function') {\n return offsetParams => {\n const offset = userOffset(offsetParams);\n return addArrowOffset(offset, arrowHeight);\n };\n }\n\n return { mainAxis: arrowHeight };\n}\n\nconst addArrowOffset = (offset: OffsetObject | number, arrowHeight: number): OffsetObject => {\n if (typeof offset === 'number') {\n return { mainAxis: offset + arrowHeight };\n }\n\n return { ...offset, mainAxis: (offset.mainAxis ?? 0) + arrowHeight };\n};\n"],"names":["mergeArrowOffset","userOffset","arrowHeight","addArrowOffset","offsetParams","offset","mainAxis"],"mappings":"AAEA;;;;;;;;CAQC,GACD,OAAO,SAASA,iBAAiBC,UAAqC,EAAEC,WAAmB,EAAU;IACnG,IAAI,OAAOD,eAAe,UAAU;QAClC,OAAOE,eAAeF,YAAYC;IACpC,CAAC;IAED,IAAI,OAAOD,eAAe,YAAYA,eAAe,IAAI,EAAE;QACzD,OAAOE,eAAeF,YAAYC;IACpC,CAAC;IAED,IAAI,OAAOD,eAAe,YAAY;QACpC,OAAOG,CAAAA,eAAgB;YACrB,MAAMC,SAASJ,WAAWG;YAC1B,OAAOD,eAAeE,QAAQH;QAChC;IACF,CAAC;IAED,OAAO;QAAEI,UAAUJ;IAAY;AACjC,CAAC;AAED,MAAMC,iBAAiB,CAACE,QAA+BH,cAAsC;IAC3F,IAAI,OAAOG,WAAW,UAAU;QAC9B,OAAO;YAAEC,UAAUD,SAASH;QAAY;IAC1C,CAAC;QAE8BG;IAA/B,OAAO;QAAE,GAAGA,MAAM;QAAEC,UAAU,AAACD,CAAAA,CAAAA,mBAAAA,OAAOC,QAAQ,cAAfD,8BAAAA,mBAAmB,CAAC,AAAD,IAAKH;IAAY;AACrE"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["parseFloatingUIPlacement.ts"],"sourcesContent":["import type { Side, Placement, Alignment } from '@floating-ui/dom';\n\n/**\n * Parses Floating UI placement and returns the different components\n * @param placement - the floating ui placement (i.e. bottom-start)\n *\n * @returns side and alignment components of the placement\n */\nexport function parseFloatingUIPlacement(placement: Placement): { side: Side; alignment: Alignment } {\n const tokens = placement.split('-');\n return {\n side: tokens[0] as Side,\n alignment: tokens[1] as Alignment,\n };\n}\n"],"names":["parseFloatingUIPlacement","placement","tokens","split","side","alignment"],"mappings":"AAEA;;;;;CAKC,GACD,OAAO,SAASA,yBAAyBC,SAAoB,EAAwC;IACnG,MAAMC,SAASD,UAAUE,KAAK,CAAC;IAC/B,OAAO;QACLC,MAAMF,MAAM,CAAC,EAAE;QACfG,WAAWH,MAAM,CAAC,EAAE;IACtB;AACF,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["resolvePositioningShorthand.ts"],"sourcesContent":["import type { PositioningShorthand, PositioningShorthandValue, PositioningProps } from '../types';\n\n// Look up table for shorthand to avoid parsing strings\nconst shorthandLookup: Record<PositioningShorthandValue, Pick<PositioningProps, 'position' | 'align'>> = {\n above: { position: 'above', align: 'center' },\n 'above-start': { position: 'above', align: 'start' },\n 'above-end': { position: 'above', align: 'end' },\n below: { position: 'below', align: 'center' },\n 'below-start': { position: 'below', align: 'start' },\n 'below-end': { position: 'below', align: 'end' },\n before: { position: 'before', align: 'center' },\n 'before-top': { position: 'before', align: 'top' },\n 'before-bottom': { position: 'before', align: 'bottom' },\n after: { position: 'after', align: 'center' },\n 'after-top': { position: 'after', align: 'top' },\n 'after-bottom': { position: 'after', align: 'bottom' },\n};\n\nexport function resolvePositioningShorthand(\n shorthand: PositioningShorthand | undefined | null,\n): Readonly<PositioningProps> {\n if (shorthand === undefined || shorthand === null) {\n return {};\n }\n\n if (typeof shorthand === 'string') {\n return shorthandLookup[shorthand];\n }\n\n return shorthand as Readonly<PositioningProps>;\n}\n"],"names":["shorthandLookup","above","position","align","below","before","after","resolvePositioningShorthand","shorthand","undefined"],"mappings":"AAEA,uDAAuD;AACvD,MAAMA,kBAAmG;IACvGC,OAAO;QAAEC,UAAU;QAASC,OAAO;IAAS;IAC5C,eAAe;QAAED,UAAU;QAASC,OAAO;IAAQ;IACnD,aAAa;QAAED,UAAU;QAASC,OAAO;IAAM;IAC/CC,OAAO;QAAEF,UAAU;QAASC,OAAO;IAAS;IAC5C,eAAe;QAAED,UAAU;QAASC,OAAO;IAAQ;IACnD,aAAa;QAAED,UAAU;QAASC,OAAO;IAAM;IAC/CE,QAAQ;QAAEH,UAAU;QAAUC,OAAO;IAAS;IAC9C,cAAc;QAAED,UAAU;QAAUC,OAAO;IAAM;IACjD,iBAAiB;QAAED,UAAU;QAAUC,OAAO;IAAS;IACvDG,OAAO;QAAEJ,UAAU;QAASC,OAAO;IAAS;IAC5C,aAAa;QAAED,UAAU;QAASC,OAAO;IAAM;IAC/C,gBAAgB;QAAED,UAAU;QAASC,OAAO;IAAS;AACvD;AAEA,OAAO,SAASI,4BACdC,SAAkD,EACtB;IAC5B,IAAIA,cAAcC,aAAaD,cAAc,IAAI,EAAE;QACjD,OAAO,CAAC;IACV,CAAC;IAED,IAAI,OAAOA,cAAc,UAAU;QACjC,OAAOR,eAAe,CAACQ,UAAU;IACnC,CAAC;IAED,OAAOA;AACT,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["toFloatingUIPadding.ts"],"sourcesContent":["import type { SideObject } from '@floating-ui/dom';\nimport { PositioningOptions } from '../types';\n\nexport function toFloatingUIPadding(\n padding: NonNullable<PositioningOptions['overflowBoundaryPadding']>,\n isRtl: boolean,\n): number | Partial<SideObject> {\n if (typeof padding === 'number') {\n return padding;\n }\n\n const { start, end, ...verticalPadding } = padding;\n\n const paddingObject: Partial<SideObject> = verticalPadding;\n\n const left = isRtl ? 'end' : 'start';\n const right = isRtl ? 'start' : 'end';\n\n // assign properties explicitly since undefined values are actually handled by floating UI\n // TODO create floating UI issue\n if (padding[left]) {\n paddingObject.left = padding[left];\n }\n\n if (padding[right]) {\n paddingObject.right = padding[right];\n }\n\n return paddingObject;\n}\n"],"names":["toFloatingUIPadding","padding","isRtl","start","end","verticalPadding","paddingObject","left","right"],"mappings":"AAGA,OAAO,SAASA,oBACdC,OAAmE,EACnEC,KAAc,EACgB;IAC9B,IAAI,OAAOD,YAAY,UAAU;QAC/B,OAAOA;IACT,CAAC;IAED,MAAM,EAAEE,MAAK,EAAEC,IAAG,EAAE,GAAGC,iBAAiB,GAAGJ;IAE3C,MAAMK,gBAAqCD;IAE3C,MAAME,OAAOL,QAAQ,QAAQ,OAAO;IACpC,MAAMM,QAAQN,QAAQ,UAAU,KAAK;IAErC,0FAA0F;IAC1F,gCAAgC;IAChC,IAAID,OAAO,CAACM,KAAK,EAAE;QACjBD,cAAcC,IAAI,GAAGN,OAAO,CAACM,KAAK;IACpC,CAAC;IAED,IAAIN,OAAO,CAACO,MAAM,EAAE;QAClBF,cAAcE,KAAK,GAAGP,OAAO,CAACO,MAAM;IACtC,CAAC;IAED,OAAOF;AACT,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["toFloatingUIPlacement.ts"],"sourcesContent":["import type { Placement, Side, Alignment as FloatingUIAlignment } from '@floating-ui/dom';\nimport type { Alignment, Position } from '../types';\n\ntype PlacementPosition = Side;\ntype PlacementAlign = FloatingUIAlignment;\n\nconst getPositionMap = (rtl?: boolean): Record<Position, PlacementPosition> => ({\n above: 'top',\n below: 'bottom',\n before: rtl ? 'right' : 'left',\n after: rtl ? 'left' : 'right',\n});\n\n// Floating UI automatically flips alignment\n// https://github.com/floating-ui/floating-ui/issues/1563\nconst getAlignmentMap = (): Record<Alignment, PlacementAlign | undefined> => ({\n start: 'start',\n end: 'end',\n top: 'start',\n bottom: 'end',\n center: undefined,\n});\n\nconst shouldAlignToCenter = (p?: Position, a?: Alignment): boolean => {\n const positionedVertically = p === 'above' || p === 'below';\n const alignedVertically = a === 'top' || a === 'bottom';\n\n return (positionedVertically && alignedVertically) || (!positionedVertically && !alignedVertically);\n};\n\n/**\n * Maps internal positioning values to Floating UI placement\n * @see positioningHelper.test.ts for expected placement values\n */\nexport const toFloatingUIPlacement = (align?: Alignment, position?: Position, rtl?: boolean): Placement | undefined => {\n const alignment = shouldAlignToCenter(position, align) ? 'center' : align;\n\n const computedPosition = position && getPositionMap(rtl)[position];\n const computedAlignment = alignment && getAlignmentMap()[alignment];\n\n if (computedPosition && computedAlignment) {\n return `${computedPosition}-${computedAlignment}` as Placement;\n }\n\n return computedPosition;\n};\n"],"names":["getPositionMap","rtl","above","below","before","after","getAlignmentMap","start","end","top","bottom","center","undefined","shouldAlignToCenter","p","a","positionedVertically","alignedVertically","toFloatingUIPlacement","align","position","alignment","computedPosition","computedAlignment"],"mappings":"AAMA,MAAMA,iBAAiB,CAACC,MAAwD,CAAA;QAC9EC,OAAO;QACPC,OAAO;QACPC,QAAQH,MAAM,UAAU,MAAM;QAC9BI,OAAOJ,MAAM,SAAS,OAAO;IAC/B,CAAA;AAEA,4CAA4C;AAC5C,yDAAyD;AACzD,MAAMK,kBAAkB,IAAsD,CAAA;QAC5EC,OAAO;QACPC,KAAK;QACLC,KAAK;QACLC,QAAQ;QACRC,QAAQC;IACV,CAAA;AAEA,MAAMC,sBAAsB,CAACC,GAAcC,IAA2B;IACpE,MAAMC,uBAAuBF,MAAM,WAAWA,MAAM;IACpD,MAAMG,oBAAoBF,MAAM,SAASA,MAAM;IAE/C,OAAO,AAACC,wBAAwBC,qBAAuB,CAACD,wBAAwB,CAACC;AACnF;AAEA;;;CAGC,GACD,OAAO,MAAMC,wBAAwB,CAACC,OAAmBC,UAAqBnB,MAAyC;IACrH,MAAMoB,YAAYR,oBAAoBO,UAAUD,SAAS,WAAWA,KAAK;IAEzE,MAAMG,mBAAmBF,YAAYpB,eAAeC,IAAI,CAACmB,SAAS;IAClE,MAAMG,oBAAoBF,aAAaf,iBAAiB,CAACe,UAAU;IAEnE,IAAIC,oBAAoBC,mBAAmB;QACzC,OAAO,CAAC,EAAED,iBAAiB,CAAC,EAAEC,kBAAkB,CAAC;IACnD,CAAC;IAED,OAAOD;AACT,EAAE"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["toggleScrollListener.ts"],"sourcesContent":["import { isHTMLElement } from '@fluentui/react-utilities';\nimport type { PositioningVirtualElement } from '../types';\nimport { getScrollParent } from './getScrollParent';\n\n/**\n * Toggles event listeners for scroll parent.\n * Cleans up the event listeners for the previous element and adds them for the new scroll parent.\n * @param next Next element\n * @param prev Previous element\n */\nexport function toggleScrollListener(\n next: HTMLElement | PositioningVirtualElement | null,\n prev: HTMLElement | PositioningVirtualElement | null,\n handler: EventListener,\n) {\n if (next === prev) {\n return;\n }\n\n if (isHTMLElement(prev)) {\n const prevScrollParent = getScrollParent(prev);\n prevScrollParent.removeEventListener('scroll', handler);\n }\n if (isHTMLElement(next)) {\n const scrollParent = getScrollParent(next);\n scrollParent.addEventListener('scroll', handler);\n }\n}\n"],"names":["isHTMLElement","getScrollParent","toggleScrollListener","next","prev","handler","prevScrollParent","removeEventListener","scrollParent","addEventListener"],"mappings":"AAAA,SAASA,aAAa,QAAQ,4BAA4B;AAE1D,SAASC,eAAe,QAAQ,oBAAoB;AAEpD;;;;;CAKC,GACD,OAAO,SAASC,qBACdC,IAAoD,EACpDC,IAAoD,EACpDC,OAAsB,EACtB;IACA,IAAIF,SAASC,MAAM;QACjB;IACF,CAAC;IAED,IAAIJ,cAAcI,OAAO;QACvB,MAAME,mBAAmBL,gBAAgBG;QACzCE,iBAAiBC,mBAAmB,CAAC,UAAUF;IACjD,CAAC;IACD,IAAIL,cAAcG,OAAO;QACvB,MAAMK,eAAeP,gBAAgBE;QACrCK,aAAaC,gBAAgB,CAAC,UAAUJ;IAC1C,CAAC;AACH,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["useCallbackRef.ts"],"sourcesContent":["import * as React from 'react';\nimport { useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\n\n/**\n * Creates a MutableRef with ref change callback. Is useful as React.useRef() doesn't notify you when its content\n * changes and mutating the .current property doesn't cause a re-render. An opt-out will be use a callback ref via\n * React.useState(), but it will cause re-renders always.\n *\n * https://reactjs.org/docs/hooks-reference.html#useref\n * https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref\n *\n * @param initialValue - initial ref value\n * @param callback - a callback to run when value changes\n * @param skipInitialResolve - a flag to skip an initial ref report\n *\n * @example\n * const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue);\n * ref.current = 1;\n * // prints 0 -> 1\n */\nexport function useCallbackRef<T>(\n initialValue: T | null,\n callback: (newValue: T | null, lastValue: T | null) => void,\n skipInitialResolve?: boolean,\n): React.MutableRefObject<T | null> {\n const isFirst = React.useRef(true);\n const [ref] = React.useState(() => ({\n // value\n value: initialValue,\n // last callback\n callback,\n // \"memoized\" public interface\n facade: {\n get current() {\n return ref.value;\n },\n set current(value) {\n const last = ref.value;\n\n if (last !== value) {\n ref.value = value;\n\n if (skipInitialResolve && isFirst.current) {\n return;\n }\n\n ref.callback(value, last);\n }\n },\n },\n }));\n\n useIsomorphicLayoutEffect(() => {\n isFirst.current = false;\n }, []);\n\n // update callback\n ref.callback = callback;\n\n return ref.facade;\n}\n"],"names":["React","useIsomorphicLayoutEffect","useCallbackRef","initialValue","callback","skipInitialResolve","isFirst","useRef","ref","useState","value","facade","current","last"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,yBAAyB,QAAQ,4BAA4B;AAEtE;;;;;;;;;;;;;;;;CAgBC,GACD,OAAO,SAASC,eACdC,YAAsB,EACtBC,QAA2D,EAC3DC,kBAA4B,EACM;IAClC,MAAMC,UAAUN,MAAMO,MAAM,CAAC,IAAI;IACjC,MAAM,CAACC,IAAI,GAAGR,MAAMS,QAAQ,CAAC,IAAO,CAAA;YAClC,QAAQ;YACRC,OAAOP;YACP,gBAAgB;YAChBC;YACA,8BAA8B;YAC9BO,QAAQ;gBACN,IAAIC,WAAU;oBACZ,OAAOJ,IAAIE,KAAK;gBAClB;gBACA,IAAIE,SAAQF,MAAO;oBACjB,MAAMG,OAAOL,IAAIE,KAAK;oBAEtB,IAAIG,SAASH,OAAO;wBAClBF,IAAIE,KAAK,GAAGA;wBAEZ,IAAIL,sBAAsBC,QAAQM,OAAO,EAAE;4BACzC;wBACF,CAAC;wBAEDJ,IAAIJ,QAAQ,CAACM,OAAOG;oBACtB,CAAC;gBACH;YACF;QACF,CAAA;IAEAZ,0BAA0B,IAAM;QAC9BK,QAAQM,OAAO,GAAG,KAAK;IACzB,GAAG,EAAE;IAEL,kBAAkB;IAClBJ,IAAIJ,QAAQ,GAAGA;IAEf,OAAOI,IAAIG,MAAM;AACnB,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["writeArrowUpdates.ts"],"sourcesContent":["import { MiddlewareData } from '@floating-ui/dom';\n\n/**\n * Writes all DOM element updates after position is computed\n */\nexport function writeArrowUpdates(options: { arrow: HTMLElement | null; middlewareData: MiddlewareData }) {\n const { arrow, middlewareData } = options;\n if (!middlewareData.arrow || !arrow) {\n return;\n }\n\n const { x: arrowX, y: arrowY } = middlewareData.arrow;\n\n Object.assign(arrow.style, {\n left: `${arrowX}px`,\n top: `${arrowY}px`,\n });\n}\n"],"names":["writeArrowUpdates","options","arrow","middlewareData","x","arrowX","y","arrowY","Object","assign","style","left","top"],"mappings":"AAEA;;CAEC,GACD,OAAO,SAASA,kBAAkBC,OAAsE,EAAE;IACxG,MAAM,EAAEC,MAAK,EAAEC,eAAc,EAAE,GAAGF;IAClC,IAAI,CAACE,eAAeD,KAAK,IAAI,CAACA,OAAO;QACnC;IACF,CAAC;IAED,MAAM,EAAEE,GAAGC,OAAM,EAAEC,GAAGC,OAAM,EAAE,GAAGJ,eAAeD,KAAK;IAErDM,OAAOC,MAAM,CAACP,MAAMQ,KAAK,EAAE;QACzBC,MAAM,CAAC,EAAEN,OAAO,EAAE,CAAC;QACnBO,KAAK,CAAC,EAAEL,OAAO,EAAE,CAAC;IACpB;AACF,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["writeContainerupdates.ts"],"sourcesContent":["import type { Placement, MiddlewareData, Strategy, Coords } from '@floating-ui/dom';\nimport {\n DATA_POSITIONING_ESCAPED,\n DATA_POSITIONING_HIDDEN,\n DATA_POSITIONING_INTERSECTING,\n DATA_POSITIONING_PLACEMENT,\n} from '../constants';\n\n/**\n * Writes all container element position updates after the position is computed\n */\nexport function writeContainerUpdates(options: {\n container: HTMLElement | null;\n placement: Placement;\n middlewareData: MiddlewareData;\n /**\n * Layer acceleration can disable subpixel rendering which causes slightly\n * blurry text on low PPI displays, so we want to use 2D transforms\n * instead\n */\n lowPPI: boolean;\n strategy: Strategy;\n coordinates: Coords;\n useTransform?: boolean;\n}) {\n const { container, placement, middlewareData, strategy, lowPPI, coordinates, useTransform = true } = options;\n if (!container) {\n return;\n }\n container.setAttribute(DATA_POSITIONING_PLACEMENT, placement);\n container.removeAttribute(DATA_POSITIONING_INTERSECTING);\n if (middlewareData.intersectionObserver.intersecting) {\n container.setAttribute(DATA_POSITIONING_INTERSECTING, '');\n }\n\n container.removeAttribute(DATA_POSITIONING_ESCAPED);\n if (middlewareData.hide?.escaped) {\n container.setAttribute(DATA_POSITIONING_ESCAPED, '');\n }\n\n container.removeAttribute(DATA_POSITIONING_HIDDEN);\n if (middlewareData.hide?.referenceHidden) {\n container.setAttribute(DATA_POSITIONING_HIDDEN, '');\n }\n\n // Round so that the coordinates land on device pixels.\n // This prevents blurriness in cases where the browser doesn't apply pixel snapping, such as when other effects like\n // `backdrop-filter: blur()` are applied to the container, and the browser is zoomed in.\n // See https://github.com/microsoft/fluentui/issues/26764 for more info.\n const devicePixelRatio = container.ownerDocument.defaultView?.devicePixelRatio || 1;\n const x = Math.round(coordinates.x * devicePixelRatio) / devicePixelRatio;\n const y = Math.round(coordinates.y * devicePixelRatio) / devicePixelRatio;\n\n Object.assign(container.style, {\n position: strategy,\n });\n\n if (useTransform) {\n Object.assign(container.style, {\n transform: lowPPI ? `translate(${x}px, ${y}px)` : `translate3d(${x}px, ${y}px, 0)`,\n });\n return;\n }\n\n Object.assign(container.style, {\n left: `${x}px`,\n top: `${y}px`,\n });\n}\n"],"names":["DATA_POSITIONING_ESCAPED","DATA_POSITIONING_HIDDEN","DATA_POSITIONING_INTERSECTING","DATA_POSITIONING_PLACEMENT","writeContainerUpdates","options","middlewareData","container","placement","strategy","lowPPI","coordinates","useTransform","setAttribute","removeAttribute","intersectionObserver","intersecting","hide","escaped","referenceHidden","devicePixelRatio","ownerDocument","defaultView","x","Math","round","y","Object","assign","style","position","transform","left","top"],"mappings":"AACA,SACEA,wBAAwB,EACxBC,uBAAuB,EACvBC,6BAA6B,EAC7BC,0BAA0B,QACrB,eAAe;AAEtB;;CAEC,GACD,OAAO,SAASC,sBAAsBC,OAarC,EAAE;QAYGC,sBAKAA,uBAQqBC;IAxBzB,MAAM,EAAEA,UAAS,EAAEC,UAAS,EAAEF,eAAc,EAAEG,SAAQ,EAAEC,OAAM,EAAEC,YAAW,EAAEC,cAAe,IAAI,CAAA,EAAE,GAAGP;IACrG,IAAI,CAACE,WAAW;QACd;IACF,CAAC;IACDA,UAAUM,YAAY,CAACV,4BAA4BK;IACnDD,UAAUO,eAAe,CAACZ;IAC1B,IAAII,eAAeS,oBAAoB,CAACC,YAAY,EAAE;QACpDT,UAAUM,YAAY,CAACX,+BAA+B;IACxD,CAAC;IAEDK,UAAUO,eAAe,CAACd;IAC1B,IAAIM,CAAAA,uBAAAA,eAAeW,IAAI,cAAnBX,kCAAAA,KAAAA,IAAAA,qBAAqBY,OAAO,EAAE;QAChCX,UAAUM,YAAY,CAACb,0BAA0B;IACnD,CAAC;IAEDO,UAAUO,eAAe,CAACb;IAC1B,IAAIK,CAAAA,wBAAAA,eAAeW,IAAI,cAAnBX,mCAAAA,KAAAA,IAAAA,sBAAqBa,eAAe,EAAE;QACxCZ,UAAUM,YAAY,CAACZ,yBAAyB;IAClD,CAAC;IAED,uDAAuD;IACvD,oHAAoH;IACpH,wFAAwF;IACxF,wEAAwE;IACxE,MAAMmB,mBAAmBb,CAAAA,CAAAA,uCAAAA,UAAUc,aAAa,CAACC,WAAW,cAAnCf,kDAAAA,KAAAA,IAAAA,qCAAqCa,gBAAgB,AAAD,KAAK;IAClF,MAAMG,IAAIC,KAAKC,KAAK,CAACd,YAAYY,CAAC,GAAGH,oBAAoBA;IACzD,MAAMM,IAAIF,KAAKC,KAAK,CAACd,YAAYe,CAAC,GAAGN,oBAAoBA;IAEzDO,OAAOC,MAAM,CAACrB,UAAUsB,KAAK,EAAE;QAC7BC,UAAUrB;IACZ;IAEA,IAAIG,cAAc;QAChBe,OAAOC,MAAM,CAACrB,UAAUsB,KAAK,EAAE;YAC7BE,WAAWrB,SAAS,CAAC,UAAU,EAAEa,EAAE,IAAI,EAAEG,EAAE,GAAG,CAAC,GAAG,CAAC,YAAY,EAAEH,EAAE,IAAI,EAAEG,EAAE,MAAM,CAAC;QACpF;QACA;IACF,CAAC;IAEDC,OAAOC,MAAM,CAACrB,UAAUsB,KAAK,EAAE;QAC7BG,MAAM,CAAC,EAAET,EAAE,EAAE,CAAC;QACdU,KAAK,CAAC,EAAEP,EAAE,EAAE,CAAC;IACf;AACF,CAAC"}
|
@@ -17,6 +17,4 @@ _export(exports, {
|
|
17
17
|
const DATA_POSITIONING_INTERSECTING = 'data-popper-is-intersecting';
|
18
18
|
const DATA_POSITIONING_ESCAPED = 'data-popper-escaped';
|
19
19
|
const DATA_POSITIONING_HIDDEN = 'data-popper-reference-hidden';
|
20
|
-
const DATA_POSITIONING_PLACEMENT = 'data-popper-placement';
|
21
|
-
|
22
|
-
//# sourceMappingURL=constants.js.map
|
20
|
+
const DATA_POSITIONING_PLACEMENT = 'data-popper-placement';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["constants.js"],"sourcesContent":["export const DATA_POSITIONING_INTERSECTING = 'data-popper-is-intersecting';\nexport const DATA_POSITIONING_ESCAPED = 'data-popper-escaped';\nexport const DATA_POSITIONING_HIDDEN = 'data-popper-reference-hidden';\nexport const DATA_POSITIONING_PLACEMENT = 'data-popper-placement';\n"],"names":["DATA_POSITIONING_INTERSECTING","DATA_POSITIONING_ESCAPED","DATA_POSITIONING_HIDDEN","DATA_POSITIONING_PLACEMENT"],"mappings":";;;;;;;;;;;IAAaA,6BAA6B,MAA7BA;IACAC,wBAAwB,MAAxBA;IACAC,uBAAuB,MAAvBA;IACAC,0BAA0B,MAA1BA;;AAHN,MAAMH,gCAAgC;AACtC,MAAMC,2BAA2B;AACjC,MAAMC,0BAA0B;AAChC,MAAMC,6BAA6B"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["createArrowStyles.js"],"sourcesContent":["import { shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\n/**\n * @internal\n * Helper that creates a makeStyles rule for an arrow element.\n * For runtime arrow size toggling simply create extra classnames to apply to the arrow element\n *\n * ```ts\n * makeStyles({\n * arrowWithSize: createArrowStyles({ arrowHeight: 6 }),\n *\n * arrowWithoutSize: createArrowStyles({ arrowHeight: undefined }),\n * mediumArrow: createArrowHeightStyles(4),\n * smallArrow: createArrowHeightStyles(2),\n * })\n * ...\n *\n * state.arrowWithSize.className = styles.arrowWithSize;\n * state.arrowWithoutSize.className = mergeClasses(\n * styles.arrowWithoutSize,\n * state.smallArrow && styles.smallArrow,\n * state.mediumArrow && styles.mediumArrow,\n * )\n * ```\n */ export function createArrowStyles(options) {\n const { arrowHeight , borderWidth ='1px' , borderStyle ='solid' , borderColor =tokens.colorTransparentStroke } = options;\n return {\n position: 'absolute',\n backgroundColor: 'inherit',\n visibility: 'hidden',\n zIndex: -1,\n ...arrowHeight && createArrowHeightStyles(arrowHeight),\n '::before': {\n content: '\"\"',\n visibility: 'visible',\n position: 'absolute',\n boxSizing: 'border-box',\n width: 'inherit',\n height: 'inherit',\n backgroundColor: 'inherit',\n ...shorthands.borderRight(`${borderWidth} /* @noflip */`, `${borderStyle} /* @noflip */`, `${borderColor} /* @noflip */`),\n ...shorthands.borderBottom(borderWidth, borderStyle, borderColor),\n borderBottomRightRadius: tokens.borderRadiusSmall,\n transform: 'rotate(var(--angle)) translate(0, 50%) rotate(45deg)'\n },\n // Popper sets data-popper-placement on the root element, which is used to align the arrow\n ':global([data-popper-placement^=\"top\"])': {\n bottom: `-${borderWidth}`,\n '--angle': '0'\n },\n ':global([data-popper-placement^=\"right\"])': {\n left: `-${borderWidth} /* @noflip */`,\n '--angle': '90deg'\n },\n ':global([data-popper-placement^=\"bottom\"])': {\n top: `-${borderWidth}`,\n '--angle': '180deg'\n },\n ':global([data-popper-placement^=\"left\"])': {\n right: `-${borderWidth} /* @noflip */`,\n '--angle': '270deg'\n }\n };\n}\n/**\n * @internal\n * Creates CSS styles to size the arrow created by createArrowStyles to the given height.\n *\n * Use this when you need to create classes for several different arrow sizes. If you only need a\n * constant arrow size, you can pass the `arrowHeight` param to createArrowStyles instead.\n */ export function createArrowHeightStyles(arrowHeight) {\n // The arrow is a square rotated 45 degrees to have its bottom and right edges form a right triangle.\n // Multiply the triangle's height by sqrt(2) to get length of its edges.\n const edgeLength = `${1.414 * arrowHeight}px`;\n return {\n width: edgeLength,\n height: edgeLength\n };\n}\n"],"names":["createArrowStyles","createArrowHeightStyles","options","arrowHeight","borderWidth","borderStyle","borderColor","tokens","colorTransparentStroke","position","backgroundColor","visibility","zIndex","content","boxSizing","width","height","shorthands","borderRight","borderBottom","borderBottomRightRadius","borderRadiusSmall","transform","bottom","left","top","right","edgeLength"],"mappings":";;;;;;;;;;;IAwBoBA,iBAAiB,MAAjBA;IA8CAC,uBAAuB,MAAvBA;;uBAtEO;4BACJ;AAuBZ,SAASD,kBAAkBE,OAAO,EAAE;IAC3C,MAAM,EAAEC,YAAW,EAAGC,aAAa,MAAK,EAAGC,aAAa,QAAO,EAAGC,aAAaC,kBAAM,CAACC,sBAAsB,CAAA,EAAG,GAAGN;IAClH,OAAO;QACHO,UAAU;QACVC,iBAAiB;QACjBC,YAAY;QACZC,QAAQ,CAAC;QACT,GAAGT,eAAeF,wBAAwBE,YAAY;QACtD,YAAY;YACRU,SAAS;YACTF,YAAY;YACZF,UAAU;YACVK,WAAW;YACXC,OAAO;YACPC,QAAQ;YACRN,iBAAiB;YACjB,GAAGO,iBAAU,CAACC,WAAW,CAAC,CAAC,EAAEd,YAAY,cAAc,CAAC,EAAE,CAAC,EAAEC,YAAY,cAAc,CAAC,EAAE,CAAC,EAAEC,YAAY,cAAc,CAAC,CAAC;YACzH,GAAGW,iBAAU,CAACE,YAAY,CAACf,aAAaC,aAAaC,YAAY;YACjEc,yBAAyBb,kBAAM,CAACc,iBAAiB;YACjDC,WAAW;QACf;QACA,0FAA0F;QAC1F,2CAA2C;YACvCC,QAAQ,CAAC,CAAC,EAAEnB,YAAY,CAAC;YACzB,WAAW;QACf;QACA,6CAA6C;YACzCoB,MAAM,CAAC,CAAC,EAAEpB,YAAY,cAAc,CAAC;YACrC,WAAW;QACf;QACA,8CAA8C;YAC1CqB,KAAK,CAAC,CAAC,EAAErB,YAAY,CAAC;YACtB,WAAW;QACf;QACA,4CAA4C;YACxCsB,OAAO,CAAC,CAAC,EAAEtB,YAAY,cAAc,CAAC;YACtC,WAAW;QACf;IACJ;AACJ;AAOW,SAASH,wBAAwBE,WAAW,EAAE;IACrD,qGAAqG;IACrG,wEAAwE;IACxE,MAAMwB,aAAa,CAAC,EAAE,QAAQxB,YAAY,EAAE,CAAC;IAC7C,OAAO;QACHY,OAAOY;QACPX,QAAQW;IACZ;AACJ"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["createPositionManager.js"],"sourcesContent":["import { computePosition } from '@floating-ui/dom';\nimport { debounce, writeArrowUpdates, writeContainerUpdates, getScrollParent } from './utils';\nimport { isHTMLElement } from '@fluentui/react-utilities';\n/**\n * @internal\n * @returns manager that handles positioning out of the react lifecycle\n */ export function createPositionManager(options) {\n const { container , target , arrow , strategy , middleware , placement , useTransform =true } = options;\n let isDestroyed = false;\n if (!target || !container) {\n return {\n updatePosition: ()=>undefined,\n dispose: ()=>undefined\n };\n }\n let isFirstUpdate = true;\n const scrollParents = new Set();\n const targetWindow = container.ownerDocument.defaultView;\n // When the container is first resolved, set position `fixed` to avoid scroll jumps.\n // Without this scroll jumps can occur when the element is rendered initially and receives focus\n Object.assign(container.style, {\n position: 'fixed',\n left: 0,\n top: 0,\n margin: 0\n });\n const forceUpdate = ()=>{\n // debounced update can still occur afterwards\n // early return to avoid memory leaks\n if (isDestroyed) {\n return;\n }\n if (isFirstUpdate) {\n scrollParents.add(getScrollParent(container));\n if (isHTMLElement(target)) {\n scrollParents.add(getScrollParent(target));\n }\n scrollParents.forEach((scrollParent)=>{\n scrollParent.addEventListener('scroll', updatePosition);\n });\n isFirstUpdate = false;\n }\n Object.assign(container.style, {\n position: strategy\n });\n computePosition(target, container, {\n placement,\n middleware,\n strategy\n }).then(({ x , y , middlewareData , placement: computedPlacement })=>{\n // Promise can still resolve after destruction\n // early return to avoid applying outdated position\n if (isDestroyed) {\n return;\n }\n writeArrowUpdates({\n arrow,\n middlewareData\n });\n writeContainerUpdates({\n container,\n middlewareData,\n placement: computedPlacement,\n coordinates: {\n x,\n y\n },\n lowPPI: ((targetWindow === null || targetWindow === void 0 ? void 0 : targetWindow.devicePixelRatio) || 1) <= 1,\n strategy,\n useTransform\n });\n }).catch((err)=>{\n // https://github.com/floating-ui/floating-ui/issues/1845\n // FIXME for node > 14\n // node 15 introduces promise rejection which means that any components\n // tests need to be `it('', async () => {})` otherwise there can be race conditions with\n // JSDOM being torn down before this promise is resolved so globals like `window` and `document` don't exist\n // Unless all tests that ever use `usePositioning` are turned into async tests, any logging during testing\n // will actually be counter productive\n if (process.env.NODE_ENV === 'development') {\n // eslint-disable-next-line no-console\n console.error('[usePositioning]: Failed to calculate position', err);\n }\n });\n };\n const updatePosition = debounce(()=>forceUpdate());\n const dispose = ()=>{\n isDestroyed = true;\n if (targetWindow) {\n targetWindow.removeEventListener('scroll', updatePosition);\n targetWindow.removeEventListener('resize', updatePosition);\n }\n scrollParents.forEach((scrollParent)=>{\n scrollParent.removeEventListener('scroll', updatePosition);\n });\n };\n if (targetWindow) {\n targetWindow.addEventListener('scroll', updatePosition);\n targetWindow.addEventListener('resize', updatePosition);\n }\n // Update the position on initialization\n updatePosition();\n return {\n updatePosition,\n dispose\n };\n}\n"],"names":["createPositionManager","options","container","target","arrow","strategy","middleware","placement","useTransform","isDestroyed","updatePosition","undefined","dispose","isFirstUpdate","scrollParents","Set","targetWindow","ownerDocument","defaultView","Object","assign","style","position","left","top","margin","forceUpdate","add","getScrollParent","isHTMLElement","forEach","scrollParent","addEventListener","computePosition","then","x","y","middlewareData","computedPlacement","writeArrowUpdates","writeContainerUpdates","coordinates","lowPPI","devicePixelRatio","catch","err","process","env","NODE_ENV","console","error","debounce","removeEventListener"],"mappings":";;;;+BAMoBA;;aAAAA;;qBANY;uBACoD;gCACtD;AAInB,SAASA,sBAAsBC,OAAO,EAAE;IAC/C,MAAM,EAAEC,UAAS,EAAGC,OAAM,EAAGC,MAAK,EAAGC,SAAQ,EAAGC,WAAU,EAAGC,UAAS,EAAGC,cAAc,IAAI,CAAA,EAAG,GAAGP;IACjG,IAAIQ,cAAc,KAAK;IACvB,IAAI,CAACN,UAAU,CAACD,WAAW;QACvB,OAAO;YACHQ,gBAAgB,IAAIC;YACpBC,SAAS,IAAID;QACjB;IACJ,CAAC;IACD,IAAIE,gBAAgB,IAAI;IACxB,MAAMC,gBAAgB,IAAIC;IAC1B,MAAMC,eAAed,UAAUe,aAAa,CAACC,WAAW;IACxD,oFAAoF;IACpF,gGAAgG;IAChGC,OAAOC,MAAM,CAAClB,UAAUmB,KAAK,EAAE;QAC3BC,UAAU;QACVC,MAAM;QACNC,KAAK;QACLC,QAAQ;IACZ;IACA,MAAMC,cAAc,IAAI;QACpB,8CAA8C;QAC9C,qCAAqC;QACrC,IAAIjB,aAAa;YACb;QACJ,CAAC;QACD,IAAII,eAAe;YACfC,cAAca,GAAG,CAACC,IAAAA,sBAAe,EAAC1B;YAClC,IAAI2B,IAAAA,6BAAa,EAAC1B,SAAS;gBACvBW,cAAca,GAAG,CAACC,IAAAA,sBAAe,EAACzB;YACtC,CAAC;YACDW,cAAcgB,OAAO,CAAC,CAACC,eAAe;gBAClCA,aAAaC,gBAAgB,CAAC,UAAUtB;YAC5C;YACAG,gBAAgB,KAAK;QACzB,CAAC;QACDM,OAAOC,MAAM,CAAClB,UAAUmB,KAAK,EAAE;YAC3BC,UAAUjB;QACd;QACA4B,IAAAA,oBAAe,EAAC9B,QAAQD,WAAW;YAC/BK;YACAD;YACAD;QACJ,GAAG6B,IAAI,CAAC,CAAC,EAAEC,EAAC,EAAGC,EAAC,EAAGC,eAAc,EAAG9B,WAAW+B,kBAAiB,EAAG,GAAG;YAClE,8CAA8C;YAC9C,mDAAmD;YACnD,IAAI7B,aAAa;gBACb;YACJ,CAAC;YACD8B,IAAAA,wBAAiB,EAAC;gBACdnC;gBACAiC;YACJ;YACAG,IAAAA,4BAAqB,EAAC;gBAClBtC;gBACAmC;gBACA9B,WAAW+B;gBACXG,aAAa;oBACTN;oBACAC;gBACJ;gBACAM,QAAQ,AAAC,CAAA,AAAC1B,CAAAA,iBAAiB,IAAI,IAAIA,iBAAiB,KAAK,IAAI,KAAK,IAAIA,aAAa2B,gBAAgB,AAAD,KAAM,CAAA,KAAM;gBAC9GtC;gBACAG;YACJ;QACJ,GAAGoC,KAAK,CAAC,CAACC,MAAM;YACZ,yDAAyD;YACzD,sBAAsB;YACtB,uEAAuE;YACvE,wFAAwF;YACxF,4GAA4G;YAC5G,0GAA0G;YAC1G,sCAAsC;YACtC,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,eAAe;gBACxC,sCAAsC;gBACtCC,QAAQC,KAAK,CAAC,kDAAkDL;YACpE,CAAC;QACL;IACJ;IACA,MAAMnC,iBAAiByC,IAAAA,eAAQ,EAAC,IAAIzB;IACpC,MAAMd,UAAU,IAAI;QAChBH,cAAc,IAAI;QAClB,IAAIO,cAAc;YACdA,aAAaoC,mBAAmB,CAAC,UAAU1C;YAC3CM,aAAaoC,mBAAmB,CAAC,UAAU1C;QAC/C,CAAC;QACDI,cAAcgB,OAAO,CAAC,CAACC,eAAe;YAClCA,aAAaqB,mBAAmB,CAAC,UAAU1C;QAC/C;IACJ;IACA,IAAIM,cAAc;QACdA,aAAagB,gBAAgB,CAAC,UAAUtB;QACxCM,aAAagB,gBAAgB,CAAC,UAAUtB;IAC5C,CAAC;IACD,wCAAwC;IACxCA;IACA,OAAO;QACHA;QACAE;IACJ;AACJ"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["createVirtualElementFromClick.js"],"sourcesContent":["/**\n * Creates a virtual element based on the position of a click event\n * Can be used as a target for popper in scenarios such as context menus\n */ export function createVirtualElementFromClick(nativeEvent) {\n const left = nativeEvent.clientX;\n const top = nativeEvent.clientY;\n const right = left + 1;\n const bottom = top + 1;\n function getBoundingClientRect() {\n return {\n left,\n top,\n right,\n bottom,\n x: left,\n y: top,\n height: 1,\n width: 1\n };\n }\n return {\n getBoundingClientRect\n };\n}\n"],"names":["createVirtualElementFromClick","nativeEvent","left","clientX","top","clientY","right","bottom","getBoundingClientRect","x","y","height","width"],"mappings":"AAAA;;;CAGC;;;;+BAAmBA;;aAAAA;;AAAT,SAASA,8BAA8BC,WAAW,EAAE;IAC3D,MAAMC,OAAOD,YAAYE,OAAO;IAChC,MAAMC,MAAMH,YAAYI,OAAO;IAC/B,MAAMC,QAAQJ,OAAO;IACrB,MAAMK,SAASH,MAAM;IACrB,SAASI,wBAAwB;QAC7B,OAAO;YACHN;YACAE;YACAE;YACAC;YACAE,GAAGP;YACHQ,GAAGN;YACHO,QAAQ;YACRC,OAAO;QACX;IACJ;IACA,OAAO;QACHJ;IACJ;AACJ"}
|
package/lib-commonjs/index.js
CHANGED
@@ -22,6 +22,3 @@ const _createArrowStyles = require("./createArrowStyles");
|
|
22
22
|
const _usePositioning = require("./usePositioning");
|
23
23
|
const _usePositioningMouseTarget = require("./usePositioningMouseTarget");
|
24
24
|
const _index = require("./utils/index");
|
25
|
-
//# sourceMappingURL=index.js.map
|
26
|
-
|
27
|
-
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["index.js"],"sourcesContent":["export { createVirtualElementFromClick } from './createVirtualElementFromClick';\nexport { createArrowHeightStyles, createArrowStyles } from './createArrowStyles';\nexport { usePositioning } from './usePositioning';\nexport { usePositioningMouseTarget } from './usePositioningMouseTarget';\nexport { resolvePositioningShorthand, mergeArrowOffset } from './utils/index';\n"],"names":["createVirtualElementFromClick","createArrowHeightStyles","createArrowStyles","usePositioning","usePositioningMouseTarget","resolvePositioningShorthand","mergeArrowOffset"],"mappings":";;;;;;;;;;;IAASA,6BAA6B,MAA7BA,4DAA6B;IAC7BC,uBAAuB,MAAvBA,0CAAuB;IAAEC,iBAAiB,MAAjBA,oCAAiB;IAC1CC,cAAc,MAAdA,8BAAc;IACdC,yBAAyB,MAAzBA,oDAAyB;IACzBC,2BAA2B,MAA3BA,kCAA2B;IAAEC,gBAAgB,MAAhBA,uBAAgB;;+CAJR;mCACa;gCAC5B;2CACW;uBACoB"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["coverTarget.js"],"sourcesContent":["import { parseFloatingUIPlacement } from '../utils/index';\nexport function coverTarget() {\n return {\n name: 'coverTarget',\n fn: (middlewareArguments)=>{\n const { placement , rects , x , y } = middlewareArguments;\n const basePlacement = parseFloatingUIPlacement(placement).side;\n const newCoords = {\n x,\n y\n };\n switch(basePlacement){\n case 'bottom':\n newCoords.y -= rects.reference.height;\n break;\n case 'top':\n newCoords.y += rects.reference.height;\n break;\n case 'left':\n newCoords.x += rects.reference.width;\n break;\n case 'right':\n newCoords.x -= rects.reference.width;\n break;\n }\n return newCoords;\n }\n };\n}\n"],"names":["coverTarget","name","fn","middlewareArguments","placement","rects","x","y","basePlacement","parseFloatingUIPlacement","side","newCoords","reference","height","width"],"mappings":";;;;+BACgBA;;aAAAA;;uBADyB;AAClC,SAASA,cAAc;IAC1B,OAAO;QACHC,MAAM;QACNC,IAAI,CAACC,sBAAsB;YACvB,MAAM,EAAEC,UAAS,EAAGC,MAAK,EAAGC,EAAC,EAAGC,EAAC,EAAG,GAAGJ;YACvC,MAAMK,gBAAgBC,IAAAA,+BAAwB,EAACL,WAAWM,IAAI;YAC9D,MAAMC,YAAY;gBACdL;gBACAC;YACJ;YACA,OAAOC;gBACH,KAAK;oBACDG,UAAUJ,CAAC,IAAIF,MAAMO,SAAS,CAACC,MAAM;oBACrC,KAAM;gBACV,KAAK;oBACDF,UAAUJ,CAAC,IAAIF,MAAMO,SAAS,CAACC,MAAM;oBACrC,KAAM;gBACV,KAAK;oBACDF,UAAUL,CAAC,IAAID,MAAMO,SAAS,CAACE,KAAK;oBACpC,KAAM;gBACV,KAAK;oBACDH,UAAUL,CAAC,IAAID,MAAMO,SAAS,CAACE,KAAK;oBACpC,KAAM;YACd;YACA,OAAOH;QACX;IACJ;AACJ"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["flip.js"],"sourcesContent":["import { flip as baseFlip } from '@floating-ui/dom';\nimport { getBoundary, resolvePositioningShorthand, toFloatingUIPlacement } from '../utils/index';\nexport function flip(options) {\n const { hasScrollableElement , flipBoundary , container , fallbackPositions =[] , isRtl } = options;\n const fallbackPlacements = fallbackPositions.reduce((acc, shorthand)=>{\n const { position , align } = resolvePositioningShorthand(shorthand);\n const placement = toFloatingUIPlacement(align, position, isRtl);\n if (placement) {\n acc.push(placement);\n }\n return acc;\n }, []);\n return baseFlip({\n ...hasScrollableElement && {\n boundary: 'clippingAncestors'\n },\n ...flipBoundary && {\n altBoundary: true,\n boundary: getBoundary(container, flipBoundary)\n },\n fallbackStrategy: 'bestFit',\n ...fallbackPlacements.length && {\n fallbackPlacements\n }\n });\n}\n"],"names":["flip","options","hasScrollableElement","flipBoundary","container","fallbackPositions","isRtl","fallbackPlacements","reduce","acc","shorthand","position","align","resolvePositioningShorthand","placement","toFloatingUIPlacement","push","baseFlip","boundary","altBoundary","getBoundary","fallbackStrategy","length"],"mappings":";;;;+BAEgBA;;aAAAA;;qBAFiB;uBAC+C;AACzE,SAASA,KAAKC,OAAO,EAAE;IAC1B,MAAM,EAAEC,qBAAoB,EAAGC,aAAY,EAAGC,UAAS,EAAGC,mBAAmB,EAAE,CAAA,EAAGC,MAAK,EAAG,GAAGL;IAC7F,MAAMM,qBAAqBF,kBAAkBG,MAAM,CAAC,CAACC,KAAKC,YAAY;QAClE,MAAM,EAAEC,SAAQ,EAAGC,MAAK,EAAG,GAAGC,IAAAA,kCAA2B,EAACH;QAC1D,MAAMI,YAAYC,IAAAA,4BAAqB,EAACH,OAAOD,UAAUL;QACzD,IAAIQ,WAAW;YACXL,IAAIO,IAAI,CAACF;QACb,CAAC;QACD,OAAOL;IACX,GAAG,EAAE;IACL,OAAOQ,IAAAA,SAAQ,EAAC;QACZ,GAAGf,wBAAwB;YACvBgB,UAAU;QACd,CAAC;QACD,GAAGf,gBAAgB;YACfgB,aAAa,IAAI;YACjBD,UAAUE,IAAAA,kBAAW,EAAChB,WAAWD;QACrC,CAAC;QACDkB,kBAAkB;QAClB,GAAGd,mBAAmBe,MAAM,IAAI;YAC5Bf;QACJ,CAAC;IACL;AACJ"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["index.js"],"sourcesContent":["export * from './coverTarget';\nexport * from './flip';\nexport * from './intersecting';\nexport * from './maxSize';\nexport * from './offset';\nexport * from './shift';\n"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;oBACA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["intersecting.js"],"sourcesContent":["import { detectOverflow } from '@floating-ui/dom';\nexport function intersecting() {\n return {\n name: 'intersectionObserver',\n fn: async (middlewareArguments)=>{\n const floatingRect = middlewareArguments.rects.floating;\n const altOverflow = await detectOverflow(middlewareArguments, {\n altBoundary: true\n });\n const isIntersectingTop = altOverflow.top < floatingRect.height && altOverflow.top > 0;\n const isIntersectingBottom = altOverflow.bottom < floatingRect.height && altOverflow.bottom > 0;\n const isIntersecting = isIntersectingTop || isIntersectingBottom;\n return {\n data: {\n intersecting: isIntersecting\n }\n };\n }\n };\n}\n"],"names":["intersecting","name","fn","middlewareArguments","floatingRect","rects","floating","altOverflow","detectOverflow","altBoundary","isIntersectingTop","top","height","isIntersectingBottom","bottom","isIntersecting","data"],"mappings":";;;;+BACgBA;;aAAAA;;qBADe;AACxB,SAASA,eAAe;IAC3B,OAAO;QACHC,MAAM;QACNC,IAAI,OAAOC,sBAAsB;YAC7B,MAAMC,eAAeD,oBAAoBE,KAAK,CAACC,QAAQ;YACvD,MAAMC,cAAc,MAAMC,IAAAA,mBAAc,EAACL,qBAAqB;gBAC1DM,aAAa,IAAI;YACrB;YACA,MAAMC,oBAAoBH,YAAYI,GAAG,GAAGP,aAAaQ,MAAM,IAAIL,YAAYI,GAAG,GAAG;YACrF,MAAME,uBAAuBN,YAAYO,MAAM,GAAGV,aAAaQ,MAAM,IAAIL,YAAYO,MAAM,GAAG;YAC9F,MAAMC,iBAAiBL,qBAAqBG;YAC5C,OAAO;gBACHG,MAAM;oBACFhB,cAAce;gBAClB;YACJ;QACJ;IACJ;AACJ"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["maxSize.js"],"sourcesContent":["import { size } from '@floating-ui/dom';\nimport { getBoundary } from '../utils/getBoundary';\nexport function maxSize(autoSize, options) {\n const { container , overflowBoundary } = options;\n return size({\n ...overflowBoundary && {\n altBoundary: true,\n boundary: getBoundary(container, overflowBoundary)\n },\n apply ({ availableHeight , availableWidth , elements , rects }) {\n const applyMaxWidth = autoSize === 'always' || autoSize === 'width-always' || rects.floating.width > availableWidth && (autoSize === true || autoSize === 'width');\n const applyMaxHeight = autoSize === 'always' || autoSize === 'height-always' || rects.floating.height > availableHeight && (autoSize === true || autoSize === 'height');\n if (applyMaxHeight) {\n Object.assign(elements.floating.style, {\n maxHeight: `${availableHeight}px`,\n boxSizing: 'border-box',\n overflowY: 'auto'\n });\n }\n if (applyMaxWidth) {\n Object.assign(elements.floating.style, {\n maxWidth: `${availableWidth}px`,\n boxSizing: 'border-box',\n overflowX: 'auto'\n });\n }\n }\n });\n}\n"],"names":["maxSize","autoSize","options","container","overflowBoundary","size","altBoundary","boundary","getBoundary","apply","availableHeight","availableWidth","elements","rects","applyMaxWidth","floating","width","applyMaxHeight","height","Object","assign","style","maxHeight","boxSizing","overflowY","maxWidth","overflowX"],"mappings":";;;;+BAEgBA;;aAAAA;;qBAFK;6BACO;AACrB,SAASA,QAAQC,QAAQ,EAAEC,OAAO,EAAE;IACvC,MAAM,EAAEC,UAAS,EAAGC,iBAAgB,EAAG,GAAGF;IAC1C,OAAOG,IAAAA,SAAI,EAAC;QACR,GAAGD,oBAAoB;YACnBE,aAAa,IAAI;YACjBC,UAAUC,IAAAA,wBAAW,EAACL,WAAWC;QACrC,CAAC;QACDK,OAAO,EAAEC,gBAAe,EAAGC,eAAc,EAAGC,SAAQ,EAAGC,MAAK,EAAG,EAAE;YAC7D,MAAMC,gBAAgBb,aAAa,YAAYA,aAAa,kBAAkBY,MAAME,QAAQ,CAACC,KAAK,GAAGL,kBAAmBV,CAAAA,aAAa,IAAI,IAAIA,aAAa,OAAM;YAChK,MAAMgB,iBAAiBhB,aAAa,YAAYA,aAAa,mBAAmBY,MAAME,QAAQ,CAACG,MAAM,GAAGR,mBAAoBT,CAAAA,aAAa,IAAI,IAAIA,aAAa,QAAO;YACrK,IAAIgB,gBAAgB;gBAChBE,OAAOC,MAAM,CAACR,SAASG,QAAQ,CAACM,KAAK,EAAE;oBACnCC,WAAW,CAAC,EAAEZ,gBAAgB,EAAE,CAAC;oBACjCa,WAAW;oBACXC,WAAW;gBACf;YACJ,CAAC;YACD,IAAIV,eAAe;gBACfK,OAAOC,MAAM,CAACR,SAASG,QAAQ,CAACM,KAAK,EAAE;oBACnCI,UAAU,CAAC,EAAEd,eAAe,EAAE,CAAC;oBAC/BY,WAAW;oBACXG,WAAW;gBACf;YACJ,CAAC;QACL;IACJ;AACJ"}
|