{"version":3,"file":"ngneat-helipopper-config.mjs","sources":["../../../../projects/ngneat/helipopper/config/src/defaults.ts","../../../../projects/ngneat/helipopper/config/src/tippy.types.ts","../../../../projects/ngneat/helipopper/config/src/providers.ts","../../../../projects/ngneat/helipopper/config/src/ngneat-helipopper-config.ts"],"sourcesContent":["import type { TippyProps } from './tippy.types';\n\n// A variation is a set of predefined tippy properties.\ntype Variation = Partial<TippyProps>;\n\nexport const tooltipVariation: Variation = {\n  theme: undefined,\n  arrow: false,\n  animation: 'scale',\n  trigger: 'mouseenter',\n  offset: [0, 5],\n};\n\nexport const popperVariation: Variation = {\n  theme: 'light',\n  arrow: true,\n  offset: [0, 10],\n  animation: undefined,\n  trigger: 'click',\n  interactive: true,\n};\n\nexport function withContextMenuVariation(baseVariation: Variation): Variation {\n  return {\n    ...baseVariation,\n    placement: 'right-start',\n    trigger: 'manual',\n    arrow: false,\n    offset: [0, 0],\n  };\n}\n","import type tippy from 'tippy.js';\nimport type { Instance, Props } from 'tippy.js';\nimport { ElementRef, InjectionToken } from '@angular/core';\nimport type { ResolveViewRef, ViewOptions } from '@ngneat/overview';\n\nexport interface CreateOptions extends Partial<TippyProps>, ViewOptions {\n  variation: string;\n  preserveView: boolean;\n  className: string | string[];\n  data: any;\n}\n\nexport interface TippyInstance extends Instance {\n  data?: any;\n}\n\nexport type TippyProps = Props;\n\nexport interface ExtendedTippyProps extends TippyProps {\n  variations: Record<string, Partial<TippyProps>>;\n  defaultVariation: keyof ExtendedTippyProps['variations'];\n  beforeRender?: (text: string) => string;\n  zIndexGetter?(): number;\n}\n\nexport type TippyElement = ElementRef | Element;\n\nexport interface ExtendedTippyInstance<T> extends TippyInstance {\n  view: ResolveViewRef<T> | null;\n  $viewOptions: ViewOptions;\n  context?: ViewOptions['context'];\n}\n\nexport type TippyConfig = Partial<ExtendedTippyProps>;\n\nexport type TippyLoader = () => typeof tippy | Promise<{ default: typeof tippy }>;\n\nexport const TIPPY_LOADER = new InjectionToken<TippyLoader>(\n  typeof ngDevMode !== 'undefined' && ngDevMode ? 'TIPPY_LOADER' : ''\n);\n\nexport const TIPPY_CONFIG = new InjectionToken<TippyConfig>(\n  typeof ngDevMode !== 'undefined' && ngDevMode ? 'TIPPY_CONFIG' : ''\n);\n\n/** @internal */\ndeclare global {\n  // Indicates whether the application is operating in development mode.\n  // `ngDevMode` is a global flag set by Angular CLI.\n  // https://github.com/angular/angular-cli/blob/9b883fe28862c96720c7899b431174e9b47ad7e4/packages/angular/build/src/tools/esbuild/application-code-bundle.ts#L604\n  const ngDevMode: boolean;\n}\n","import { makeEnvironmentProviders, type Provider } from '@angular/core';\n\nimport {\n  TIPPY_CONFIG,\n  TIPPY_LOADER,\n  type TippyLoader,\n  type TippyConfig,\n} from './tippy.types';\n\nexport function provideTippyLoader(loader: TippyLoader) {\n  return makeEnvironmentProviders([{ provide: TIPPY_LOADER, useValue: loader }]);\n}\n\nexport function provideTippyConfig(config: TippyConfig): Provider {\n  return { provide: TIPPY_CONFIG, useValue: config };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAKa,MAAA,gBAAgB,GAAc;AACzC,IAAA,KAAK,EAAE,SAAS;AAChB,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,SAAS,EAAE,OAAO;AAClB,IAAA,OAAO,EAAE,YAAY;AACrB,IAAA,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;;AAGH,MAAA,eAAe,GAAc;AACxC,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,KAAK,EAAE,IAAI;AACX,IAAA,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC;AACf,IAAA,SAAS,EAAE,SAAS;AACpB,IAAA,OAAO,EAAE,OAAO;AAChB,IAAA,WAAW,EAAE,IAAI;;AAGb,SAAU,wBAAwB,CAAC,aAAwB,EAAA;IAC/D,OAAO;AACL,QAAA,GAAG,aAAa;AAChB,QAAA,SAAS,EAAE,aAAa;AACxB,Q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