UNPKG

@vuesax-alpha/nightly

Version:
1 lines 1.34 kB
{"version":3,"file":"index.mjs","sources":["../../../../../../packages/hooks/use-floating/dom/index.ts"],"sourcesContent":["import { computePosition as computePositionCore } from '@vuesax-alpha/hooks/use-floating/core'\n\nimport { platform } from './platform'\nimport type {\n ComputePositionConfig,\n FloatingElement,\n ReferenceElement,\n} from './types'\n\nexport * from './platform'\nexport * from './utils'\n\nexport * from './middleware'\nexport * from './types'\n\nexport const computePosition = (\n reference: ReferenceElement,\n floating: FloatingElement,\n options?: Partial<ComputePositionConfig>\n) => {\n const cache = new Map<ReferenceElement, Array<Element>>()\n const mergedOptions = { platform, ...options }\n const platformWithCache = { ...mergedOptions.platform, _c: cache }\n return computePositionCore(reference, floating, {\n ...mergedOptions,\n platform: platformWithCache,\n })\n}\n"],"names":["computePositionCore"],"mappings":";;;;;;;;;;;;AAeO,MAAM,eAAkB,GAAA,CAC7B,SACA,EAAA,QAAA,EACA,OACG,KAAA;AACH,EAAM,MAAA,KAAA,uBAAY,GAAsC,EAAA,CAAA;AACxD,EAAA,MAAM,aAAgB,GAAA,EAAE,QAAU,EAAA,GAAG,OAAQ,EAAA,CAAA;AAC7C,EAAA,MAAM,oBAAoB,EAAE,GAAG,aAAc,CAAA,QAAA,EAAU,IAAI,KAAM,EAAA,CAAA;AACjE,EAAO,OAAAA,iBAAA,CAAoB,WAAW,QAAU,EAAA;AAAA,IAC9C,GAAG,aAAA;AAAA,IACH,QAAU,EAAA,iBAAA;AAAA,GACX,CAAA,CAAA;AACH;;;;"}