ember-attacher 4.2.0 → 4.2.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.
@@ -1,7 +1,7 @@
1
1
  import { _ as _applyDecoratedDescriptor, a as _defineProperty, b as _initializerDefineProperty, r as resolveAttachmentTarget, g as getListenerTarget, i as isElementTarget } from '../target-resolution-Bz738VeA.js';
2
2
  import { action } from '@ember/object';
3
3
  import Component from '@glimmer/component';
4
- import { later, cancel, schedule, next, debounce, run } from '@ember/runloop';
4
+ import { schedule, cancel, later, next, debounce, run } from '@ember/runloop';
5
5
  import { getOwner } from '@ember/application';
6
6
  import { guidFor } from '@ember/object/internals';
7
7
  import { htmlSafe, isHTMLSafe } from '@ember/template';
@@ -16,21 +16,90 @@ import { precompileTemplate } from '@ember/template-compilation';
16
16
  import { setComponentTemplate } from '@ember/component';
17
17
  import templateOnly from '@ember/component/template-only';
18
18
 
19
- var MaybeInElement = setComponentTemplate(precompileTemplate("{{~#if @renderInPlace~}}{{yield}}{{~else~}}{{#in-element @destinationElement insertBefore=null}}{{yield}}{{/in-element}}{{~/if~}}", {
20
- strictMode: true
21
- }), templateOnly());
19
+ /**
20
+ * DOM and event helpers for attachment boundary and cursor detection.
21
+ */
22
+
23
+ /**
24
+ * Determine whether an event originated from or traversed through a given DOM element.
25
+ *
26
+ * Uses `event.composedPath()` to safely detect clicks on elements that were subsequently
27
+ * removed from the DOM during event handling (e.g. self-disappearing buttons).
28
+ * Falls back to `element.contains(event.target)` when `composedPath` is unavailable.
29
+ *
30
+ * @param {Element | null | undefined} element
31
+ * @param {Event | null | undefined} event
32
+ * @returns {boolean}
33
+ */
34
+ function elementContainsEvent(element, event) {
35
+ if (!element) {
36
+ return false;
37
+ }
38
+ const path = typeof event?.composedPath === 'function' ? event.composedPath() : null;
39
+ if (path && path.length > 0) {
40
+ return path.includes(element);
41
+ }
42
+ return Boolean(event?.target && element.contains(event.target));
43
+ }
22
44
 
23
- var TEMPLATE = precompileTemplate("{{~#unless this.renderFloatingElement~}}<meta hidden {{this.parentFinder}} {{this.isShownDidUpdate this.isShown}}/>{{~/unless~}}{{~#if this.renderFloatingElement~}}<this.MaybeInElement @destinationElement={{this._floatingElementContainer}} @renderInPlace={{this._renderInPlace}}><div\n class=\"ember-attacher\"\n id={{this.id}}\n role={{@ariaRole}}\n {{this.setupFloatingElement}}\n {{this.isShownDidUpdate this.isShown}}\n {{this.targetDidUpdate this.hideOn this.showOn @explicitTarget}}\n {{this.optionsDidUpdate this.autoUpdate this.animation this.arrow this.useCapture this.placement this._renderInPlace this._middleware}}\n ...attributes\n >\n <div class={{this._class}} style={{this._style}}>\n {{yield (hash hide=this.hide setReference=this.setReference reference=this.reference)}}\n {{#if this.arrow}}\n <div class=\"ember-attacher-arrow\" x-arrow {{this.insertArrow}}></div>\n {{/if}}\n {{#if this.isFillAnimation}}\n <div x-circle style=\"{{this._circleTransitionDuration}}\"></div>\n {{/if}}\n </div>\n </div></this.MaybeInElement>{{~/if~}}\n");
45
+ /**
46
+ * Check if cursor coordinates lie in the geometric gap between the target and floating element.
47
+ *
48
+ * Used for interactive attachments with `isOffset=true` to prevent premature hide
49
+ * while the cursor transitions across the gap between target and attachment.
50
+ *
51
+ * @param {MouseEvent} event
52
+ * @param {Element | { getBoundingClientRect: Function } | null | undefined} target
53
+ * @param {Element | null | undefined} floatingElement
54
+ * @returns {boolean}
55
+ */
56
+ function isCursorBetween(event, target, floatingElement) {
57
+ if (!target || !floatingElement) {
58
+ return false;
59
+ }
60
+ const {
61
+ clientX,
62
+ clientY
63
+ } = event;
64
+ const attachmentPosition = floatingElement.getBoundingClientRect();
65
+ const targetPosition = target.getBoundingClientRect();
66
+ const isBetweenLeftAndRight = clientX > Math.min(attachmentPosition.left, targetPosition.left) && clientX < Math.max(attachmentPosition.right, targetPosition.right);
67
+ const isBetweenTopAndBottom = clientY > Math.min(attachmentPosition.top, targetPosition.top) && clientY < Math.max(attachmentPosition.bottom, targetPosition.bottom);
68
+
69
+ // Check if cursor is between a left-flipped attachment
70
+ if (attachmentPosition.right < targetPosition.left && clientX >= attachmentPosition.right && clientX <= targetPosition.left && isBetweenTopAndBottom) {
71
+ return true;
72
+ }
73
+
74
+ // Check if cursor is between a right-flipped attachment
75
+ if (attachmentPosition.left > targetPosition.right && clientX <= attachmentPosition.left && clientX >= targetPosition.right && isBetweenTopAndBottom) {
76
+ return true;
77
+ }
78
+
79
+ // Check if cursor is between a bottom-flipped attachment
80
+ if (attachmentPosition.top > targetPosition.bottom && clientY <= attachmentPosition.top && clientY >= targetPosition.bottom && isBetweenLeftAndRight) {
81
+ return true;
82
+ }
83
+
84
+ // Check if cursor is between a top-flipped attachment
85
+ if (attachmentPosition.bottom < targetPosition.top && clientY >= attachmentPosition.bottom && clientY <= targetPosition.top && isBetweenLeftAndRight) {
86
+ return true;
87
+ }
88
+ return false;
89
+ }
24
90
 
25
- var _class, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8;
26
- const animationTestWaiter = buildWaiter('basic-attacher');
27
91
  function consume(positional) {
28
92
  for (let i = 0; i < positional.length; i++) {
29
93
  void positional[i];
30
94
  }
31
95
  }
32
96
 
33
- // Run once per element, after render, so tracked writes do not hit the modifier's tracking frame.
97
+ /**
98
+ * Run once per element, after render, so tracked writes do not hit the modifier's tracking frame.
99
+ *
100
+ * @param {Function} fn
101
+ * @returns {import('ember-modifier').ModifierFunction}
102
+ */
34
103
  function onInsert(fn) {
35
104
  const seen = new WeakSet();
36
105
  return modifier(element => {
@@ -43,8 +112,13 @@ function onInsert(fn) {
43
112
  });
44
113
  }
45
114
 
46
- // Skip install ({{did-update}} semantics). Each factory has its own WeakSet so two
47
- // onUpdate modifiers on the same node do not steal each other's first run.
115
+ /**
116
+ * Skip install ({{did-update}} semantics). Each factory has its own WeakSet so two
117
+ * onUpdate modifiers on the same node do not steal each other's first run.
118
+ *
119
+ * @param {Function} fn
120
+ * @returns {import('ember-modifier').ModifierFunction}
121
+ */
48
122
  function onUpdate(fn) {
49
123
  const seen = new WeakSet();
50
124
  return modifier((element, positional) => {
@@ -56,6 +130,15 @@ function onUpdate(fn) {
56
130
  fn();
57
131
  });
58
132
  }
133
+
134
+ var MaybeInElement = setComponentTemplate(precompileTemplate("{{~#if @renderInPlace~}}{{yield}}{{~else~}}{{#in-element @destinationElement insertBefore=null}}{{yield}}{{/in-element}}{{~/if~}}", {
135
+ strictMode: true
136
+ }), templateOnly());
137
+
138
+ var TEMPLATE = precompileTemplate("{{~#unless this.renderFloatingElement~}}<meta hidden {{this.parentFinder}} {{this.isShownDidUpdate this.isShown}}/>{{~/unless~}}{{~#if this.renderFloatingElement~}}<this.MaybeInElement @destinationElement={{this._floatingElementContainer}} @renderInPlace={{this._renderInPlace}}><div\n class=\"ember-attacher\"\n id={{this.id}}\n role={{@ariaRole}}\n {{this.setupFloatingElement}}\n {{this.isShownDidUpdate this.isShown}}\n {{this.targetDidUpdate this.hideOn this.showOn @explicitTarget}}\n {{this.optionsDidUpdate this.autoUpdate this.animation this.arrow this.useCapture this.placement this._renderInPlace this._middleware}}\n ...attributes\n >\n <div class={{this._class}} style={{this._style}}>\n {{yield (hash hide=this.hide setReference=this.setReference reference=this.reference)}}\n {{#if this.arrow}}\n <div class=\"ember-attacher-arrow\" x-arrow {{this.insertArrow}}></div>\n {{/if}}\n {{#if this.isFillAnimation}}\n <div x-circle style=\"{{this._circleTransitionDuration}}\"></div>\n {{/if}}\n </div>\n </div></this.MaybeInElement>{{~/if~}}\n");
139
+
140
+ var _class, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8;
141
+ const animationTestWaiter = buildWaiter('basic-attacher');
59
142
  let BasicAttacher = (_class = class BasicAttacher extends Component {
60
143
  /**
61
144
  * ================== PUBLIC CONFIG OPTIONS ==================
@@ -695,52 +778,18 @@ let BasicAttacher = (_class = class BasicAttacher extends Component {
695
778
  }
696
779
 
697
780
  // If cursor is not on the attachment or target, hide the floating element
698
- if (!target.contains(event.target) && !(this.isOffset && this._isCursorBetweenTargetAndAttachment(event)) && this._floatingElement && !this._floatingElement.contains(event.target)) {
781
+ if (!target.contains(event.target) && !(this.isOffset && isCursorBetween(event, this._currentTarget, this._floatingElement)) && this._floatingElement && !this._floatingElement.contains(event.target)) {
699
782
  // Remove this listener before hiding the attachment
700
783
  delete this._hideListenersOnDocumentByEvent.mousemove;
701
784
  document.removeEventListener('mousemove', this._hideIfMouseOutsideTargetOrAttachment, this.useCapture);
702
785
  this._hideAfterDelay();
703
786
  }
704
787
  }
705
- _isCursorBetweenTargetAndAttachment(event) {
706
- if (!this._currentTarget || !this._floatingElement) {
707
- return false;
708
- }
709
- const {
710
- clientX,
711
- clientY
712
- } = event;
713
- const attachmentPosition = this._floatingElement.getBoundingClientRect();
714
- const targetPosition = this._currentTarget.getBoundingClientRect();
715
- const isBetweenLeftAndRight = clientX > Math.min(attachmentPosition.left, targetPosition.left) && clientX < Math.max(attachmentPosition.right, targetPosition.right);
716
- const isBetweenTopAndBottom = clientY > Math.min(attachmentPosition.top, targetPosition.top) && clientY < Math.max(attachmentPosition.bottom, targetPosition.bottom);
717
-
718
- // Check if cursor is between a left-flipped attachment
719
- if (attachmentPosition.right < targetPosition.left && clientX >= attachmentPosition.right && clientX <= targetPosition.left && isBetweenTopAndBottom) {
720
- return true;
721
- }
722
-
723
- // Check if cursor is between a right-flipped attachment
724
- if (attachmentPosition.left > targetPosition.right && clientX <= attachmentPosition.left && clientX >= targetPosition.right && isBetweenTopAndBottom) {
725
- return true;
726
- }
727
-
728
- // Check if cursor is between a bottom-flipped attachment
729
- if (attachmentPosition.top > targetPosition.bottom && clientY <= attachmentPosition.top && clientY >= targetPosition.bottom && isBetweenLeftAndRight) {
730
- return true;
731
- }
732
-
733
- // Check if cursor is between a top-flipped attachment
734
- if (attachmentPosition.bottom < targetPosition.top && clientY >= attachmentPosition.bottom && clientY <= targetPosition.top && isBetweenLeftAndRight) {
735
- return true;
736
- }
737
- return false;
738
- }
739
788
  _hideOnClickOut(event) {
740
789
  const target = this._listenerTarget;
741
- const targetReceivedClick = target ? target.contains(event.target) : false;
790
+ const targetReceivedClick = elementContainsEvent(target, event);
742
791
  if (this.interactive) {
743
- if (!targetReceivedClick && !this._floatingElement.contains(event.target)) {
792
+ if (!targetReceivedClick && !elementContainsEvent(this._floatingElement, event)) {
744
793
  this._hideAfterDelay();
745
794
  }
746
795
  } else if (!targetReceivedClick) {
@@ -812,7 +861,7 @@ let BasicAttacher = (_class = class BasicAttacher extends Component {
812
861
  if (this.isDestroyed || this.isDestroying || this._positioningSuspended || !this._currentTarget || !this._floatingElement) {
813
862
  return;
814
863
  }
815
- const isTargetConnected = isElementTarget(this._currentTarget) ? this._currentTarget.isConnected : true;
864
+ const isTargetConnected = isElementTarget(this._currentTarget) ? this._currentTarget.isConnected : this._currentTarget?.contextElement instanceof Element ? this._currentTarget.contextElement.isConnected : true;
816
865
  if (!isTargetConnected || !this._floatingElement.isConnected) {
817
866
  return;
818
867
  }
@@ -826,7 +875,7 @@ let BasicAttacher = (_class = class BasicAttacher extends Component {
826
875
  if (this.isDestroyed || this.isDestroying || !this._currentTarget || !this._floatingElement) {
827
876
  return;
828
877
  }
829
- const isTargetConnected = isElementTarget(this._currentTarget) ? this._currentTarget.isConnected : true;
878
+ const isTargetConnected = isElementTarget(this._currentTarget) ? this._currentTarget.isConnected : this._currentTarget?.contextElement instanceof Element ? this._currentTarget.contextElement.isConnected : true;
830
879
  if (!isTargetConnected || !this._floatingElement.isConnected) {
831
880
  // Stop lingering observers if a node detached mid-update.
832
881
  this._cleanup?.();
@@ -1 +1 @@
1
- {"version":3,"file":"basic-attacher.js","sources":["../../src/components/basic-attacher/maybe-in-element.gjs","../../src/components/basic-attacher.js"],"sourcesContent":["<template>{{~#if @renderInPlace~}}{{yield}}{{~else~}}{{#in-element @destinationElement insertBefore=null}}{{yield}}{{/in-element}}{{~/if~}}</template>\n","import { action } from '@ember/object';\nimport Component from '@glimmer/component';\nimport { cancel, debounce, later, next, run, schedule } from '@ember/runloop';\nimport { getOwner } from '@ember/application';\nimport { guidFor } from '@ember/object/internals';\nimport { htmlSafe, isHTMLSafe } from '@ember/template';\nimport { runInDebug } from '@ember/debug';\nimport { warn, assert } from '@ember/debug';\nimport { isEmpty, typeOf } from '@ember/utils';\nimport { autoUpdate, computePosition, arrow, flip, limitShift, shift } from '@floating-ui/dom';\nimport { buildWaiter } from '@ember/test-waiters';\nimport { tracked } from '@glimmer/tracking';\nimport { modifier } from 'ember-modifier';\nimport DEFAULTS from '../defaults';\nimport {\n getListenerTarget,\n isElementTarget,\n resolveAttachmentTarget,\n} from '../lib/target-resolution.js';\nimport MaybeInElement from './basic-attacher/maybe-in-element.gjs';\n\nconst animationTestWaiter = buildWaiter('basic-attacher');\n\nfunction consume(positional) {\n for (let i = 0; i < positional.length; i++) {\n void positional[i];\n }\n}\n\n// Run once per element, after render, so tracked writes do not hit the modifier's tracking frame.\nfunction onInsert(fn) {\n const seen = new WeakSet();\n\n return modifier((element) => {\n if (seen.has(element)) {\n return;\n }\n\n seen.add(element);\n const timer = schedule('actions', fn, element);\n return () => cancel(timer);\n });\n}\n\n// Skip install ({{did-update}} semantics). Each factory has its own WeakSet so two\n// onUpdate modifiers on the same node do not steal each other's first run.\nfunction onUpdate(fn) {\n const seen = new WeakSet();\n\n return modifier((element, positional) => {\n consume(positional);\n\n if (!seen.has(element)) {\n seen.add(element);\n return;\n }\n\n fn();\n });\n}\n\nexport default class BasicAttacher extends Component {\n MaybeInElement = MaybeInElement;\n\n @tracked parentNotFound = true;\n @tracked parentElement = null;\n @tracked _isStartingAnimation = false;\n @tracked _arrowElement = null;\n @tracked _currentTarget = null;\n // Yielded `setReference` / `reference` registration. Prefer\n // `@explicitTarget` when that arg is set; otherwise this beats parent.\n @tracked _registeredTarget = null;\n _setReferenceTimer = null;\n // Untracked copy of the node listeners are on. `_removeEventListeners` must\n // not read `_currentTarget` in the same computation that writes it\n // (`targetDidUpdate` → `_initializeAttacher` when `@explicitTarget` changes).\n _listenerTarget = null;\n // This is set to true when the popover is shown in order to override lazyRender=false\n @tracked _mustRender = false;\n @tracked _transitionDuration = 0;\n _floatingElement = null;\n\n parentFinder = onInsert((element) => {\n if (this.isDestroyed || this.isDestroying) {\n return;\n }\n\n this.parentElement = element.parentElement;\n this._initializeAttacher();\n });\n\n // Insert + autoUpdate teardown. Must not read tracked state in the modifier\n // callback (the scheduled fn is fine); a tracked read would re-run this and\n // fire the destructor before updates.\n setupFloatingElement = modifier((element) => {\n const timer = schedule('actions', () => {\n if (this.isDestroyed || this.isDestroying) {\n return;\n }\n\n this._floatingElement = element;\n\n if (this.renderInPlace) {\n this.parentElement = element.parentElement;\n this._initializeAttacher();\n }\n });\n\n return () => {\n cancel(timer);\n this._cleanup?.();\n };\n });\n\n insertArrow = onInsert((element) => {\n if (this.isDestroyed || this.isDestroying) {\n return;\n }\n\n this._arrowElement = element;\n });\n\n isShownDidUpdate = onUpdate(() => this._syncIsShown());\n targetDidUpdate = onUpdate(() => this._initializeAttacher());\n optionsDidUpdate = onUpdate(() => {\n this._ensureArgumentsAreValid();\n this._update();\n });\n\n /**\n * ================== PUBLIC CONFIG OPTIONS ==================\n */\n get arrow() {\n return this.args.arrow ?? this._config.arrow ?? DEFAULTS.arrow;\n }\n\n get autoUpdate() {\n return this.args.autoUpdate ?? this._config.autoUpdate ?? DEFAULTS.autoUpdate;\n }\n\n get animation() {\n return this.args.animation || this._config.animation || DEFAULTS.animation;\n }\n\n get flip() {\n return this.args.flip ?? this._config.flip ?? DEFAULTS.flip;\n }\n\n get hideDelay() {\n return this.args.hideDelay ?? this._config.hideDelay ?? DEFAULTS.hideDelay;\n }\n\n get hideDuration() {\n return this.args.hideDuration ?? this._config.hideDuration ?? DEFAULTS.hideDuration;\n }\n\n get hideOn() {\n if (this.args.hideOn === null) {\n return null;\n }\n\n return this.args.hideOn ?? this._config.hideOn ?? DEFAULTS.hideOn;\n }\n\n get interactive() {\n return this.args.interactive ?? this._config.interactive ?? DEFAULTS.interactive;\n }\n\n get isOffset() {\n return this.args.isOffset ?? this._config.isOffset ?? DEFAULTS.isOffset;\n }\n\n get isShown() {\n return this.args.isShown ?? this._config.isShown ?? DEFAULTS.isShown;\n }\n\n get lazyRender() {\n return this.args.lazyRender ?? this._config.lazyRender ?? DEFAULTS.lazyRender;\n }\n\n get placement() {\n return this.args.placement ?? this._config.placement ?? DEFAULTS.placement;\n }\n\n get floatingElementContainer() {\n return this.args.floatingElementContainer || this._config.floatingElementContainer || DEFAULTS.floatingElementContainer;\n }\n\n get class() {\n return this.args.class || this._config.class;\n }\n\n get floatingUiOptions() {\n return this.args.floatingUiOptions || this._config.floatingUiOptions || DEFAULTS.floatingUiOptions;\n }\n\n get renderInPlace() {\n return this.args.renderInPlace ?? this._config.renderInPlace ?? DEFAULTS.renderInPlace;\n }\n\n get showDelay() {\n return this.args.showDelay ?? this._config.showDelay ?? DEFAULTS.showDelay;\n }\n\n get showDuration() {\n return this.args.showDuration ?? this._config.showDuration ?? DEFAULTS.showDuration;\n }\n\n get showOn() {\n if (this.args.showOn === null) {\n return null;\n }\n\n return this.args.showOn ?? this._config.showOn ?? DEFAULTS.showOn;\n }\n\n get style() {\n return this.args.style ?? this._config.style ?? DEFAULTS.style;\n }\n\n get useCapture() {\n return this.args.useCapture ?? this._config.useCapture ?? DEFAULTS.useCapture;\n }\n\n get configKey() {\n return this.args.configKey || 'popover';\n }\n\n get isFillAnimation() {\n return this.animation === 'fill';\n }\n\n get renderFloatingElement() {\n return (this.renderInPlace || this._currentTarget) && (!this.lazyRender || this._mustRender);\n }\n\n get shouldRenderFloatingElement() {\n // Always render the floating element unless lazyRender is true and we haven't been triggered yet\n return !this.lazyRender || this._mustRender;\n }\n\n get id() {\n return this.args.id || `${guidFor(this)}-floating`;\n }\n\n get overflowPadding() {\n return this.args.overflowPadding ?? this._config.overflowPadding ?? DEFAULTS.overflowPadding;\n }\n\n // The circle element needs a special duration that is slightly faster than the floating element's\n // transition, this prevents text from appearing outside the circle as it fills the background\n get _circleTransitionDuration() {\n return htmlSafe(\n `transition-duration: ${Math.round(this._transitionDuration / 1.25)}ms`\n );\n }\n\n get _class() {\n const showOrHideClass = `ember-attacher-${this._isStartingAnimation ? 'show' : 'hide'}`;\n const arrowClass = `ember-attacher-${this.arrow ? 'with' : 'without'}-arrow`;\n const baseClass = this.class || '';\n const additionalClass = this.args.additionalClass || '';\n return [`ember-attacher-${this.animation}`, baseClass, additionalClass, showOrHideClass, arrowClass].filter(Boolean).join(' ');\n }\n\n get _style() {\n const style = this.style;\n const transitionDuration = this._transitionDuration;\n warn(\n '@ember/string/htmlSafe must be used for any `style` passed to ember-attacher',\n isEmpty(style) || isHTMLSafe(style),\n { id: 'ember-attacher-require-html-safe-style' }\n );\n\n return htmlSafe(`transition-duration: ${transitionDuration}ms; ${style}`);\n }\n\n // This is memoized so it can be used by both attach-popover and attach-tooltip\n get _envConfig() {\n return getOwner(this).resolveRegistration('config:environment').emberAttacher || {};\n }\n\n get _config() {\n return {\n ...this._envConfig,\n ...this._envConfig[this.configKey],\n };\n }\n\n get _hideOn() {\n let hideOn = this.hideOn;\n\n if (hideOn === undefined) {\n hideOn = DEFAULTS.hideOn;\n }\n\n return hideOn === null ? [] : hideOn.split(' ');\n }\n\n get _middleware() {\n // Copy the middleware since we might write to the provided array\n const middleware = this.args.middleware ? [...this.args.middleware] : [];\n\n const flipString = this.flip;\n if (flipString) {\n const flipOptions = { fallbackPlacements: flipString.split(' ') };\n const flipMiddleware = middleware.find(name => name === 'flip');\n if (!flipMiddleware) {\n middleware.push(flip(flipOptions));\n } else if (!flipMiddleware.fallbackPlacements) {\n Object.assign({}, flipMiddleware, flipOptions);\n }\n } else if (this.overflowPadding !== false) {\n middleware.push(flip());\n }\n\n if (this.overflowPadding !== false && !middleware.find(name => name === 'shift')) {\n middleware.push(shift({ limiter: limitShift(), padding: this.overflowPadding }))\n }\n\n if (this.arrow && this._arrowElement && !middleware.find(name => name === 'arrow')) {\n middleware.push(arrow({ element: this._arrowElement }));\n }\n\n return middleware;\n }\n\n get _floatingElementContainer() {\n const maybeContainer = this.floatingElementContainer;\n const renderInPlace = this._renderInPlace;\n let floatingElementContainer;\n\n if (renderInPlace) {\n floatingElementContainer = this.parentElement;\n } else if (maybeContainer instanceof Element) {\n floatingElementContainer = maybeContainer;\n } else if (typeof maybeContainer === 'string') {\n const selector = maybeContainer;\n const possibleContainers = document.querySelectorAll(selector);\n\n assert(`floatingElementContainer selector \"${selector}\" found `\n + `${possibleContainers.length} possible containers when there should be exactly 1`, possibleContainers.length === 1);\n\n floatingElementContainer = possibleContainers[0];\n }\n\n return floatingElementContainer;\n }\n\n get _renderInPlace() {\n // document is undefined in Fastboot, so we have to render in\n // place for the floating element to show up at all.\n return typeof document !== 'undefined' ? !!this.renderInPlace : true;\n }\n\n _setIsVisibleAfterDelay(isVisible, delay) {\n if (!this._floatingElement) {\n this._animationTimeout = requestAnimationFrame(() => {\n this._setIsVisibleAfterDelay(isVisible, delay);\n });\n return;\n }\n const onChange = this.args.onChange;\n\n if (delay) {\n this._delayedVisibilityToggle = later(this, () => {\n this._animationTimeout = requestAnimationFrame(() => {\n animationTestWaiter.endAsync(this._animationTimeout);\n if (!this.isDestroyed && !this.isDestroying) {\n if (!isVisible) {\n this._cleanup?.();\n this._cleanup = null;\n }\n this._floatingElement.style.display = isVisible ? 'block' : 'none';\n\n // Prevent jank by making the attachment invisible until positioned.\n // The visibility style will be toggled by this._startShowAnimation()\n this._floatingElement.style.visibility = isVisible ? 'hidden' : '';\n\n if (onChange) {\n onChange(isVisible);\n }\n }\n });\n animationTestWaiter.beginAsync(this._animationTimeout);\n }, delay);\n } else {\n if (!isVisible) {\n this._cleanup?.();\n this._cleanup = null;\n }\n this._floatingElement.style.display = isVisible ? 'block' : 'none';\n // Prevent jank by making the attachment invisible until positioned.\n // The visibility style will be toggled by this._startShowAnimation()\n this._floatingElement.style.visibility = isVisible ? 'hidden' : '';\n\n if (onChange) {\n onChange(isVisible);\n }\n }\n }\n\n get _showOn() {\n let showOn = this.showOn;\n\n if (showOn === undefined) {\n showOn = DEFAULTS.showOn;\n }\n\n return showOn === null ? [] : showOn.split(' ');\n }\n\n // Exposed via the named yield to enable custom hide events\n @action\n hide() {\n this._hide();\n }\n\n /**\n * Register an explicit attachment target (Element or Floating UI virtual ref).\n * Yielded for composition into other modifiers.\n * Pass `null` to clear and fall back to `@explicitTarget` / parent.\n *\n * Calls `_initializeAttacher` directly so registration that happens during the\n * floating element's first render takes effect before the next user event.\n *\n * @param {Element | { getBoundingClientRect: Function } | null | undefined} target\n */\n @action\n setReference(target) {\n cancel(this._setReferenceTimer);\n\n // Defer: callers often invoke this from another modifier's\n // `modify()` (composition). Tracked writes + re-init must not run in\n // that tracking frame.\n this._setReferenceTimer = schedule('actions', () => {\n this._setReferenceTimer = null;\n\n if (this.isDestroyed || this.isDestroying) {\n return;\n }\n\n const next = target ?? null;\n\n if (this._registeredTarget === next) {\n return;\n }\n\n this._registeredTarget = next;\n this._initializeAttacher();\n });\n }\n\n // Always defined on first render so the modifier binding is present immediately.\n reference = modifier((element) => {\n this.setReference(element);\n\n return () => {\n if (this.isDestroyed || this.isDestroying) {\n return;\n }\n\n if (this._registeredTarget === element) {\n this.setReference(null);\n }\n };\n });\n\n _ensureArgumentsAreValid() {\n runInDebug(() => {\n if (this.arrow && this.isFillAnimation) {\n warn('Animation: \\'fill\\' is not compatible with arrow: true', { id: 70015 });\n }\n\n if (this.useCapture !== this._lastUseCaptureArgumentValue) {\n warn(\n 'The value of the useCapture argument was mutated',\n { id: 'ember-attacher.use-capture-mutated' }\n );\n }\n });\n }\n\n constructor() {\n super(...arguments);\n\n // The debounced _hide() and _show() are stored here so they can be cancelled when necessary\n this._delayedVisibilityToggle = null;\n\n // The final source of truth on whether or not all _hide() or _show() actions have completed\n this._isHidden = true;\n\n // Blocks _update from (re)starting autoUpdate after hide until the next show.\n this._positioningSuspended = false;\n\n // Holds a delayed function to toggle the visibility of the attachment.\n // Used to make sure animations can complete before the attachment is hidden.\n this._animationTimeout = null;\n\n // Used to store event listeners so they can be removed when necessary.\n this._hideListenersOnDocumentByEvent = {};\n this._hideListenersOnTargetByEvent = {};\n this._showListenersOnTargetByEvent = {};\n\n // Hacks to make sure event listeners have the right context and are still removable\n this._debouncedHideIfMouseOutsideTargetOrAttachment\n = this._debouncedHideIfMouseOutsideTargetOrAttachment.bind(this);\n this._hide = this._hide.bind(this);\n this._hideAfterDelay = this._hideAfterDelay.bind(this);\n this._hideIfMouseOutsideTargetOrAttachment\n = this._hideIfMouseOutsideTargetOrAttachment.bind(this);\n this._hideOnClickOut = this._hideOnClickOut.bind(this);\n this._hideOnEscapeKey = this._hideOnEscapeKey.bind(this);\n this._hideOnLostFocus = this._hideOnLostFocus.bind(this);\n this._hideOnMouseLeaveTarget = this._hideOnMouseLeaveTarget.bind(this);\n this._show = this._show.bind(this);\n this._showAfterDelay = this._showAfterDelay.bind(this);\n\n this._lastUseCaptureArgumentValue = this.useCapture;\n }\n\n _initializeAttacher() {\n this._removeEventListeners();\n const target = resolveAttachmentTarget({\n explicitTarget: this.args.explicitTarget,\n registeredTarget: this._registeredTarget,\n parentElement: this.parentElement,\n });\n this._listenerTarget = getListenerTarget(target);\n this._currentTarget = target;\n this._addListenersForShowEvents();\n\n if (!this._isHidden || this.isShown) {\n this._addListenersForHideEvents();\n\n // Even if the attachment is already shown, we still want to\n // call this._show() to make sure its position is updated for a potentially new target.\n this._show();\n }\n\n // Call hook for subclasses to add their own initialization logic\n this.args.onInitializeAttacher?.(this._currentTarget, this.id);\n }\n\n _addListenersForShowEvents() {\n const target = this._listenerTarget;\n\n if (!target) {\n return;\n }\n\n this._showOn.forEach((event) => {\n this._showListenersOnTargetByEvent[event] = this._showAfterDelay;\n\n target.addEventListener(event, this._showAfterDelay, this.useCapture);\n });\n }\n\n willDestroy() {\n super.willDestroy(...arguments);\n\n this._cleanup?.();\n this._cleanup = null;\n\n cancel(this._setReferenceTimer);\n this._cancelAnimation();\n cancel(this._delayedVisibilityToggle);\n\n this._removeEventListeners();\n\n // Call hook for cleanup\n this.args.onWillDestroy?.(this._currentTarget, this.id);\n }\n\n _removeEventListeners() {\n Object.keys(this._hideListenersOnDocumentByEvent).forEach((eventType) => {\n document.removeEventListener(eventType, this._hideListenersOnDocumentByEvent[eventType], this.useCapture);\n delete this._hideListenersOnDocumentByEvent[eventType];\n });\n const target = this._listenerTarget;\n\n if (!target) {\n return;\n }\n\n [this._hideListenersOnTargetByEvent, this._showListenersOnTargetByEvent]\n .forEach((eventToListener) => {\n Object.keys(eventToListener).forEach((event) => {\n target.removeEventListener(event, eventToListener[event], this.useCapture);\n });\n });\n }\n\n _syncIsShown() {\n const isShown = this.isShown;\n\n if (isShown === true && this._isHidden) {\n this._show();\n\n // Add the hide listeners in the next run loop to avoid conflicts\n // where clicking triggers both an isShown toggle and a clickout.\n next(this, () => this._addListenersForHideEvents());\n } else if (isShown === false && !this._isHidden) {\n this._hide();\n }\n }\n\n /**\n * ================== SHOW ATTACHMENT LOGIC ==================\n */\n\n _showAfterDelay() {\n cancel(this._delayedVisibilityToggle);\n\n this._mustRender = true;\n\n this._addListenersForHideEvents();\n\n const showDelay = parseInt(this.showDelay);\n\n this._delayedVisibilityToggle = debounce(this, this._show, showDelay, !showDelay);\n }\n\n _show() {\n this._cancelAnimation();\n\n if (!this._currentTarget) {\n return;\n }\n\n this._positioningSuspended = false;\n this._mustRender = true;\n\n // Make the attachment visible immediately so transition animations can take place\n this._setIsVisibleAfterDelay(true, 0);\n\n this._startShowAnimation();\n }\n\n _startShowAnimation() {\n // Start the show animation on the next cycle so CSS transitions can have an effect.\n // If we start the animation immediately, the transition won't work because\n // `display: none` => `display: ''` is not transition-able.\n // All included animations set opaque: 0, so the attachment is still effectively hidden until\n // the final RAF occurs.\n this._animationTimeout = requestAnimationFrame(() => {\n animationTestWaiter.endAsync(this._animationTimeout);\n if (this.isDestroyed || this.isDestroying || !this._currentTarget) {\n return;\n }\n\n const floatingElement = this._floatingElement;\n\n // Wait until the element is visible before continuing\n if (!floatingElement || floatingElement.style.display === 'none') {\n this._startShowAnimation();\n return;\n }\n\n this._update();\n\n // Wait for the above positioning to take effect before starting the show animation,\n // else the positioning itself will be animated, causing animation glitches.\n this._animationTimeout = requestAnimationFrame(() => {\n animationTestWaiter.endAsync(this._animationTimeout);\n if (this.isDestroyed || this.isDestroying || !this._currentTarget) {\n return;\n }\n run(() => {\n if (this.isDestroyed || this.isDestroying || !this._currentTarget) {\n return;\n }\n // Make the floating element visible now that it has been positioned\n floatingElement.style.visibility = '';\n this._transitionDuration = parseInt(this.showDuration);\n this._isStartingAnimation = true;\n floatingElement.setAttribute('aria-hidden', 'false');\n });\n\n this._isHidden = false;\n });\n animationTestWaiter.beginAsync(this._animationTimeout);\n });\n animationTestWaiter.beginAsync(this._animationTimeout);\n }\n\n /**\n * ================== HIDE ATTACHMENT LOGIC ==================\n */\n\n _hideAfterDelay() {\n cancel(this._delayedVisibilityToggle);\n\n const hideDelay = parseInt(this.hideDelay);\n\n this._delayedVisibilityToggle = debounce(this, this._hide, hideDelay, !hideDelay);\n }\n\n _hide() {\n this._positioningSuspended = true;\n this._cleanup?.();\n this._cleanup = null;\n\n if (!this._floatingElement) {\n this._animationTimeout = requestAnimationFrame(() => {\n animationTestWaiter.endAsync(this._animationTimeout);\n this._hide();\n });\n animationTestWaiter.beginAsync(this._animationTimeout);\n return;\n }\n\n this._cancelAnimation();\n\n this._removeListenersForHideEvents();\n this._animationTimeout = requestAnimationFrame(() => {\n animationTestWaiter.endAsync(this._animationTimeout);\n // Avoid a race condition where we attempt to hide after the component is being destroyed.\n if (this.isDestroyed || this.isDestroying) {\n return;\n }\n\n const hideDuration = parseInt(this.hideDuration);\n\n run(() => {\n if (this.isDestroyed || this.isDestroying) {\n return;\n }\n\n this._transitionDuration = hideDuration;\n this._isStartingAnimation = false;\n this._floatingElement.setAttribute('aria-hidden', 'true');\n // Wait for any animations to complete before hiding the attachment\n this._setIsVisibleAfterDelay(false, hideDuration);\n });\n\n this._isHidden = true;\n });\n animationTestWaiter.beginAsync(this._animationTimeout);\n }\n\n /**\n * ================== HIDE LISTENERS ==================\n */\n\n _addListenersForHideEvents() {\n const hideOn = this._hideOn;\n const target = this._listenerTarget;\n\n // Target or component was destroyed (virtual refs without contextElement skip listeners)\n if (!target || this.isDestroyed || this.isDestroying) {\n return;\n }\n\n if (hideOn.includes('click')) {\n const showOnClickListener = this._showListenersOnTargetByEvent.click;\n\n if (showOnClickListener) {\n target.removeEventListener('click', showOnClickListener, this.useCapture);\n\n delete this._showListenersOnTargetByEvent.click;\n }\n\n this._hideListenersOnTargetByEvent.click = this._hideAfterDelay;\n target.addEventListener('click', this._hideAfterDelay, this.useCapture);\n }\n\n if (hideOn.includes('clickout')) {\n const clickoutEvent = 'ontouchstart' in window ? 'touchend' : 'click';\n\n this._hideListenersOnDocumentByEvent[clickoutEvent] = this._hideOnClickOut;\n document.addEventListener(clickoutEvent, this._hideOnClickOut, this.useCapture);\n }\n\n if (hideOn.includes('escapekey')) {\n this._hideListenersOnDocumentByEvent.keydown = this._hideOnEscapeKey;\n document.addEventListener('keydown', this._hideOnEscapeKey, this.useCapture);\n }\n\n // Hides the attachment when the mouse leaves the target\n // (or leaves both target and attachment for interactive attachments)\n if (hideOn.includes('mouseleave')) {\n this._hideListenersOnTargetByEvent.mouseleave = this._hideOnMouseLeaveTarget;\n target.addEventListener('mouseleave', this._hideOnMouseLeaveTarget, this.useCapture);\n }\n\n // Hides the attachment when focus is lost on the target\n ['blur', 'focusout'].forEach((eventType) => {\n if (hideOn.includes(eventType)) {\n this._hideListenersOnTargetByEvent[eventType] = this._hideOnLostFocus;\n target.addEventListener(eventType, this._hideOnLostFocus, this.useCapture);\n }\n });\n }\n\n _hideOnMouseLeaveTarget() {\n if (this.interactive) {\n // TODO(kjb) Should debounce this, but hiding appears sluggish if you debounce.\n // - If you debounce with immediate fire, you get a bug where you can move out of the\n // attachment and not trigger the hide because the hide check was debounced\n // - Ideally we would debounce with an immediate run, then instead of debouncing, we would\n // queue another fire at the end of the debounce period\n if (!this._hideListenersOnDocumentByEvent.mousemove) {\n this._hideListenersOnDocumentByEvent.mousemove = this._hideIfMouseOutsideTargetOrAttachment;\n document.addEventListener('mousemove', this._hideIfMouseOutsideTargetOrAttachment, this.useCapture);\n }\n } else {\n this._hideAfterDelay();\n }\n }\n\n _debouncedHideIfMouseOutsideTargetOrAttachment(event) {\n debounce(this, this._hideIfMouseOutsideTargetOrAttachment, event, 10);\n }\n\n _hideIfMouseOutsideTargetOrAttachment(event) {\n const target = this._listenerTarget;\n\n if (!target) {\n return;\n }\n\n // If cursor is not on the attachment or target, hide the floating element\n if (!target.contains(event.target)\n && !(this.isOffset && this._isCursorBetweenTargetAndAttachment(event))\n && (this._floatingElement && !this._floatingElement.contains(event.target))) {\n // Remove this listener before hiding the attachment\n delete this._hideListenersOnDocumentByEvent.mousemove;\n document.removeEventListener('mousemove', this._hideIfMouseOutsideTargetOrAttachment, this.useCapture);\n\n this._hideAfterDelay();\n }\n }\n\n _isCursorBetweenTargetAndAttachment(event) {\n if (!this._currentTarget || !this._floatingElement) {\n return false;\n }\n\n const { clientX, clientY } = event;\n\n const attachmentPosition = this._floatingElement.getBoundingClientRect();\n const targetPosition = this._currentTarget.getBoundingClientRect();\n\n const isBetweenLeftAndRight = clientX > Math.min(attachmentPosition.left, targetPosition.left)\n && clientX < Math.max(attachmentPosition.right, targetPosition.right);\n\n const isBetweenTopAndBottom = clientY > Math.min(attachmentPosition.top, targetPosition.top)\n && clientY < Math.max(attachmentPosition.bottom, targetPosition.bottom);\n\n // Check if cursor is between a left-flipped attachment\n if (attachmentPosition.right < targetPosition.left\n && clientX >= attachmentPosition.right && clientX <= targetPosition.left\n && isBetweenTopAndBottom) {\n return true;\n }\n\n // Check if cursor is between a right-flipped attachment\n if (attachmentPosition.left > targetPosition.right\n && clientX <= attachmentPosition.left && clientX >= targetPosition.right\n && isBetweenTopAndBottom) {\n return true;\n }\n\n // Check if cursor is between a bottom-flipped attachment\n if (attachmentPosition.top > targetPosition.bottom\n && clientY <= attachmentPosition.top && clientY >= targetPosition.bottom\n && isBetweenLeftAndRight) {\n return true;\n }\n\n // Check if cursor is between a top-flipped attachment\n if (attachmentPosition.bottom < targetPosition.top\n && clientY >= attachmentPosition.bottom && clientY <= targetPosition.top\n && isBetweenLeftAndRight) {\n return true;\n }\n\n return false;\n }\n\n _hideOnClickOut(event) {\n const target = this._listenerTarget;\n const targetReceivedClick = target ? target.contains(event.target) : false;\n\n if (this.interactive) {\n if (!targetReceivedClick && !this._floatingElement.contains(event.target)) {\n this._hideAfterDelay();\n }\n } else if (!targetReceivedClick) {\n this._hideAfterDelay();\n }\n }\n\n _hideOnEscapeKey(event) {\n if (event.keyCode === 27) {\n return this._hideAfterDelay();\n }\n }\n\n _hideOnLostFocus(event) {\n if (event.relatedTarget === null) {\n this._hideAfterDelay();\n }\n\n const target = this._listenerTarget;\n\n if (!target) {\n return;\n }\n\n const targetContainsFocus = target.contains(event.relatedTarget);\n\n if (this.interactive) {\n if (!targetContainsFocus && !this._floatingElement.contains(event.relatedTarget)) {\n this._hideAfterDelay();\n }\n } else if (!targetContainsFocus) {\n this._hideAfterDelay();\n }\n }\n\n _removeListenersForHideEvents() {\n Object.keys(this._hideListenersOnDocumentByEvent).forEach((eventType) => {\n document.removeEventListener(eventType, this._hideListenersOnDocumentByEvent[eventType], this.useCapture);\n delete this._hideListenersOnDocumentByEvent[eventType];\n });\n\n const showOn = this._showOn;\n const target = this._listenerTarget;\n\n // The target was destroyed, nothing to remove listeners from\n if (!target) {\n return;\n }\n\n // Switch clicking back to a show event\n if (showOn.includes('click')) {\n const hideOnClickListener = this._hideListenersOnTargetByEvent.click;\n\n if (hideOnClickListener) {\n target.removeEventListener('click', hideOnClickListener, this.useCapture);\n delete this._hideListenersOnTargetByEvent.click;\n }\n\n this._showListenersOnTargetByEvent.click = this._showAfterDelay;\n target.addEventListener('click', this._showAfterDelay, this.useCapture);\n }\n\n ['blur', 'focusout', 'mouseleave'].forEach((eventType) => {\n const listener = this._hideListenersOnTargetByEvent[eventType];\n\n if (listener) {\n target.removeEventListener(eventType, listener, this.useCapture);\n delete this._hideListenersOnTargetByEvent[eventType];\n }\n });\n }\n\n _update() {\n this._cleanup?.();\n this._cleanup = null;\n\n // Suspended after _hide until the next _show. Hide writes tracked state that\n // re-renders and can re-fire optionsDidUpdate → _update; without this flag\n // that path restarts autoUpdate (especially with hideDuration: 0). Do not\n // use _isHidden here — it stays true until late in _startShowAnimation,\n // after _update must already run.\n if (\n this.isDestroyed ||\n this.isDestroying ||\n this._positioningSuspended ||\n !this._currentTarget ||\n !this._floatingElement\n ) {\n return;\n }\n\n const isTargetConnected = isElementTarget(this._currentTarget)\n ? this._currentTarget.isConnected\n : true;\n\n if (!isTargetConnected || !this._floatingElement.isConnected) {\n return;\n }\n\n if (this.autoUpdate) {\n this._cleanup = autoUpdate(\n this._currentTarget,\n this._floatingElement,\n this._updatePosition,\n typeOf(this.autoUpdate) === 'object' ? this.autoUpdate : undefined\n );\n } else {\n this._updatePosition();\n }\n }\n\n @action\n _updatePosition() {\n if (\n this.isDestroyed ||\n this.isDestroying ||\n !this._currentTarget ||\n !this._floatingElement\n ) {\n return;\n }\n\n const isTargetConnected = isElementTarget(this._currentTarget)\n ? this._currentTarget.isConnected\n : true;\n\n if (!isTargetConnected || !this._floatingElement.isConnected) {\n // Stop lingering observers if a node detached mid-update.\n this._cleanup?.();\n this._cleanup = null;\n return;\n }\n\n const computePositionToken = animationTestWaiter.beginAsync();\n computePosition(this._currentTarget, this._floatingElement, {\n ...this.floatingUiOptions,\n middleware: this._middleware,\n placement: this.placement,\n })\n .then(({ x, y, placement, middlewareData }) => {\n animationTestWaiter.endAsync(computePositionToken);\n\n if (\n this.isDestroyed ||\n this.isDestroying ||\n !this._floatingElement ||\n !this._floatingElement.isConnected\n ) {\n return;\n }\n\n Object.assign(this._floatingElement.style, {\n left: `${x}px`,\n top: `${y}px`,\n });\n\n if (middlewareData.arrow && this._arrowElement) {\n const { x: arrowX, y: arrowY } = middlewareData.arrow;\n\n Object.assign(this._arrowElement.style, {\n left: arrowX != null ? `${arrowX}px` : '',\n top: arrowY != null ? `${arrowY}px` : '',\n });\n }\n\n this._floatingElement.setAttribute('x-placement', placement);\n })\n .catch((error) => {\n animationTestWaiter.endAsync(computePositionToken);\n\n if (!this.isDestroyed && !this.isDestroying) {\n warn(`[ember-attacher] Positioning error: ${error?.message ?? error}`, {\n id: 'ember-attacher.positioning-error',\n });\n }\n });\n }\n\n _cancelAnimation() {\n if (typeof cancelAnimationFrame !== 'function') {\n return;\n }\n\n cancelAnimationFrame(this._animationTimeout);\n\n runInDebug(() => {\n if (animationTestWaiter.items?.get(this._animationTimeout)) {\n animationTestWaiter.endAsync(this._animationTimeout);\n }\n })\n }\n}"],"names":["setComponentTemplate","precompileTemplate","strictMode","templateOnly","animationTestWaiter","buildWaiter","consume","positional","i","length","onInsert","fn","seen","WeakSet","modifier","element","has","add","timer","schedule","cancel","onUpdate","BasicAttacher","_class","Component","arrow","args","_config","DEFAULTS","autoUpdate","animation","flip","hideDelay","hideDuration","hideOn","interactive","isOffset","isShown","lazyRender","placement","floatingElementContainer","class","floatingUiOptions","renderInPlace","showDelay","showDuration","showOn","style","useCapture","configKey","isFillAnimation","renderFloatingElement","_currentTarget","_mustRender","shouldRenderFloatingElement","id","guidFor","overflowPadding","_circleTransitionDuration","htmlSafe","Math","round","_transitionDuration","showOrHideClass","_isStartingAnimation","arrowClass","baseClass","additionalClass","filter","Boolean","join","_style","transitionDuration","warn","isEmpty","isHTMLSafe","_envConfig","getOwner","resolveRegistration","emberAttacher","_hideOn","undefined","split","_middleware","middleware","flipString","flipOptions","fallbackPlacements","flipMiddleware","find","name","push","Object","assign","shift","limiter","limitShift","padding","_arrowElement","_floatingElementContainer","maybeContainer","_renderInPlace","parentElement","Element","selector","possibleContainers","document","querySelectorAll","assert","_setIsVisibleAfterDelay","isVisible","delay","_floatingElement","_animationTimeout","requestAnimationFrame","onChange","_delayedVisibilityToggle","later","endAsync","isDestroyed","isDestroying","_cleanup","display","visibility","beginAsync","_showOn","hide","_hide","setReference","target","_setReferenceTimer","next","_registeredTarget","_initializeAttacher","_ensureArgumentsAreValid","runInDebug","_lastUseCaptureArgumentValue","constructor","arguments","_defineProperty","MaybeInElement","_initializerDefineProperty","_descriptor","_descriptor2","_descriptor3","_descriptor4","_descriptor5","_descriptor6","_descriptor7","_descriptor8","_syncIsShown","_update","_isHidden","_positioningSuspended","_hideListenersOnDocumentByEvent","_hideListenersOnTargetByEvent","_showListenersOnTargetByEvent","_debouncedHideIfMouseOutsideTargetOrAttachment","bind","_hideAfterDelay","_hideIfMouseOutsideTargetOrAttachment","_hideOnClickOut","_hideOnEscapeKey","_hideOnLostFocus","_hideOnMouseLeaveTarget","_show","_showAfterDelay","_removeEventListeners","resolveAttachmentTarget","explicitTarget","registeredTarget","_listenerTarget","getListenerTarget","_addListenersForShowEvents","_addListenersForHideEvents","onInitializeAttacher","forEach","event","addEventListener","willDestroy","_cancelAnimation","onWillDestroy","keys","eventType","removeEventListener","eventToListener","parseInt","debounce","_startShowAnimation","floatingElement","run","setAttribute","_removeListenersForHideEvents","includes","showOnClickListener","click","clickoutEvent","window","keydown","mouseleave","mousemove","contains","_isCursorBetweenTargetAndAttachment","clientX","clientY","attachmentPosition","getBoundingClientRect","targetPosition","isBetweenLeftAndRight","min","left","max","right","isBetweenTopAndBottom","top","bottom","targetReceivedClick","keyCode","relatedTarget","targetContainsFocus","hideOnClickListener","listener","isTargetConnected","isElementTarget","isConnected","_updatePosition","typeOf","computePositionToken","computePosition","then","x","y","middlewareData","arrowX","arrowY","catch","error","message","cancelAnimationFrame","items","get","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","action","getOwnPropertyDescriptor","TEMPLATE"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,qBAAAA,oBAAA,CAAAC,kBAA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cAAA;AAAA,IAAA,OAAe,KAAK;AAAA,EAAA;AAAA,CAAA,CAAA,EAAAlG,YAAA,GAAA4F,yBAAA,CAAA1N,MAAA,CAAA2N,SAAA,0BAC3BC,OAAO,CAAA,EAAA;EAAAC,YAAA,EAAA,IAAA;EAAAC,UAAA,EAAA,IAAA;EAAAC,QAAA,EAAA,IAAA;AAAAC,EAAAA,WAAA,cAAA;AAAA,IAAA,OAAuB,CAAC;AAAA,EAAA;AAAA,CAAA,CAAA,EAAAN,yBAAA,CAAA1N,MAAA,CAAA2N,SAAA,EAAA,MAAA,EAAA,CA8U/BM,MAAM,CAAA,EAAA5J,MAAA,CAAA6J,wBAAA,CAAAlO,MAAA,CAAA2N,SAAA,EAAA,MAAA,CAAA,EAAA3N,MAAA,CAAA2N,SAAA,CAAA,EAAAD,yBAAA,CAAA1N,MAAA,CAAA2N,SAAA,EAAA,cAAA,EAAA,CAeNM,MAAM,CAAA,EAAA5J,MAAA,CAAA6J,wBAAA,CAAAlO,MAAA,CAAA2N,SAAA,EAAA,cAAA,CAAA,EAAA3N,MAAA,CAAA2N,SAAA,CAAA,EAAAD,yBAAA,CAAA1N,MAAA,CAAA2N,SAAA,EAAA,iBAAA,EAAA,CA0jBNM,MAAM,CAAA,EAAA5J,MAAA,CAAA6J,wBAAA,CAAAlO,MAAA,CAAA2N,SAAA,EAAA,iBAAA,CAAA,EAAA3N,MAAA,CAAA2N,SAAA,CAAA,EAAA3N,MAAA;AAz6ByBvB,oBAAA,CAAA0P,QAAA,EAAbpO,aAAa,CAAA;;"}
1
+ {"version":3,"file":"basic-attacher.js","sources":["../../src/lib/dom.js","../../src/lib/modifiers.js","../../src/components/basic-attacher/maybe-in-element.gjs","../../src/components/basic-attacher.js"],"sourcesContent":["/**\n * DOM and event helpers for attachment boundary and cursor detection.\n */\n\n/**\n * Determine whether an event originated from or traversed through a given DOM element.\n *\n * Uses `event.composedPath()` to safely detect clicks on elements that were subsequently\n * removed from the DOM during event handling (e.g. self-disappearing buttons).\n * Falls back to `element.contains(event.target)` when `composedPath` is unavailable.\n *\n * @param {Element | null | undefined} element\n * @param {Event | null | undefined} event\n * @returns {boolean}\n */\nexport function elementContainsEvent(element, event) {\n if (!element) {\n return false;\n }\n\n const path = typeof event?.composedPath === 'function' ? event.composedPath() : null;\n if (path && path.length > 0) {\n return path.includes(element);\n }\n\n return Boolean(event?.target && element.contains(event.target));\n}\n\n/**\n * Check if cursor coordinates lie in the geometric gap between the target and floating element.\n *\n * Used for interactive attachments with `isOffset=true` to prevent premature hide\n * while the cursor transitions across the gap between target and attachment.\n *\n * @param {MouseEvent} event\n * @param {Element | { getBoundingClientRect: Function } | null | undefined} target\n * @param {Element | null | undefined} floatingElement\n * @returns {boolean}\n */\nexport function isCursorBetween(event, target, floatingElement) {\n if (!target || !floatingElement) {\n return false;\n }\n\n const { clientX, clientY } = event;\n\n const attachmentPosition = floatingElement.getBoundingClientRect();\n const targetPosition = target.getBoundingClientRect();\n\n const isBetweenLeftAndRight =\n clientX > Math.min(attachmentPosition.left, targetPosition.left) &&\n clientX < Math.max(attachmentPosition.right, targetPosition.right);\n\n const isBetweenTopAndBottom =\n clientY > Math.min(attachmentPosition.top, targetPosition.top) &&\n clientY < Math.max(attachmentPosition.bottom, targetPosition.bottom);\n\n // Check if cursor is between a left-flipped attachment\n if (\n attachmentPosition.right < targetPosition.left &&\n clientX >= attachmentPosition.right &&\n clientX <= targetPosition.left &&\n isBetweenTopAndBottom\n ) {\n return true;\n }\n\n // Check if cursor is between a right-flipped attachment\n if (\n attachmentPosition.left > targetPosition.right &&\n clientX <= attachmentPosition.left &&\n clientX >= targetPosition.right &&\n isBetweenTopAndBottom\n ) {\n return true;\n }\n\n // Check if cursor is between a bottom-flipped attachment\n if (\n attachmentPosition.top > targetPosition.bottom &&\n clientY <= attachmentPosition.top &&\n clientY >= targetPosition.bottom &&\n isBetweenLeftAndRight\n ) {\n return true;\n }\n\n // Check if cursor is between a top-flipped attachment\n if (\n attachmentPosition.bottom < targetPosition.top &&\n clientY >= attachmentPosition.bottom &&\n clientY <= targetPosition.top &&\n isBetweenLeftAndRight\n ) {\n return true;\n }\n\n return false;\n}\n","import { cancel, schedule } from '@ember/runloop';\nimport { modifier } from 'ember-modifier';\n\nfunction consume(positional) {\n for (let i = 0; i < positional.length; i++) {\n void positional[i];\n }\n}\n\n/**\n * Run once per element, after render, so tracked writes do not hit the modifier's tracking frame.\n *\n * @param {Function} fn\n * @returns {import('ember-modifier').ModifierFunction}\n */\nexport function onInsert(fn) {\n const seen = new WeakSet();\n\n return modifier((element) => {\n if (seen.has(element)) {\n return;\n }\n\n seen.add(element);\n const timer = schedule('actions', fn, element);\n return () => cancel(timer);\n });\n}\n\n/**\n * Skip install ({{did-update}} semantics). Each factory has its own WeakSet so two\n * onUpdate modifiers on the same node do not steal each other's first run.\n *\n * @param {Function} fn\n * @returns {import('ember-modifier').ModifierFunction}\n */\nexport function onUpdate(fn) {\n const seen = new WeakSet();\n\n return modifier((element, positional) => {\n consume(positional);\n\n if (!seen.has(element)) {\n seen.add(element);\n return;\n }\n\n fn();\n });\n}\n","<template>{{~#if @renderInPlace~}}{{yield}}{{~else~}}{{#in-element @destinationElement insertBefore=null}}{{yield}}{{/in-element}}{{~/if~}}</template>\n","import { action } from '@ember/object';\nimport Component from '@glimmer/component';\nimport { cancel, debounce, later, next, run, schedule } from '@ember/runloop';\nimport { getOwner } from '@ember/application';\nimport { guidFor } from '@ember/object/internals';\nimport { htmlSafe, isHTMLSafe } from '@ember/template';\nimport { runInDebug } from '@ember/debug';\nimport { warn, assert } from '@ember/debug';\nimport { isEmpty, typeOf } from '@ember/utils';\nimport { autoUpdate, computePosition, arrow, flip, limitShift, shift } from '@floating-ui/dom';\nimport { buildWaiter } from '@ember/test-waiters';\nimport { tracked } from '@glimmer/tracking';\nimport { modifier } from 'ember-modifier';\nimport DEFAULTS from '../defaults';\nimport { elementContainsEvent, isCursorBetween } from '../lib/dom.js';\nimport { onInsert, onUpdate } from '../lib/modifiers.js';\nimport {\n getListenerTarget,\n isElementTarget,\n resolveAttachmentTarget,\n} from '../lib/target-resolution.js';\nimport MaybeInElement from './basic-attacher/maybe-in-element.gjs';\n\nconst animationTestWaiter = buildWaiter('basic-attacher');\n\nexport default class BasicAttacher extends Component {\n MaybeInElement = MaybeInElement;\n\n @tracked parentNotFound = true;\n @tracked parentElement = null;\n @tracked _isStartingAnimation = false;\n @tracked _arrowElement = null;\n @tracked _currentTarget = null;\n // Yielded `setReference` / `reference` registration. Prefer\n // `@explicitTarget` when that arg is set; otherwise this beats parent.\n @tracked _registeredTarget = null;\n _setReferenceTimer = null;\n // Untracked copy of the node listeners are on. `_removeEventListeners` must\n // not read `_currentTarget` in the same computation that writes it\n // (`targetDidUpdate` → `_initializeAttacher` when `@explicitTarget` changes).\n _listenerTarget = null;\n // This is set to true when the popover is shown in order to override lazyRender=false\n @tracked _mustRender = false;\n @tracked _transitionDuration = 0;\n _floatingElement = null;\n\n parentFinder = onInsert((element) => {\n if (this.isDestroyed || this.isDestroying) {\n return;\n }\n\n this.parentElement = element.parentElement;\n this._initializeAttacher();\n });\n\n // Insert + autoUpdate teardown. Must not read tracked state in the modifier\n // callback (the scheduled fn is fine); a tracked read would re-run this and\n // fire the destructor before updates.\n setupFloatingElement = modifier((element) => {\n const timer = schedule('actions', () => {\n if (this.isDestroyed || this.isDestroying) {\n return;\n }\n\n this._floatingElement = element;\n\n if (this.renderInPlace) {\n this.parentElement = element.parentElement;\n this._initializeAttacher();\n }\n });\n\n return () => {\n cancel(timer);\n this._cleanup?.();\n };\n });\n\n insertArrow = onInsert((element) => {\n if (this.isDestroyed || this.isDestroying) {\n return;\n }\n\n this._arrowElement = element;\n });\n\n isShownDidUpdate = onUpdate(() => this._syncIsShown());\n targetDidUpdate = onUpdate(() => this._initializeAttacher());\n optionsDidUpdate = onUpdate(() => {\n this._ensureArgumentsAreValid();\n this._update();\n });\n\n /**\n * ================== PUBLIC CONFIG OPTIONS ==================\n */\n get arrow() {\n return this.args.arrow ?? this._config.arrow ?? DEFAULTS.arrow;\n }\n\n get autoUpdate() {\n return this.args.autoUpdate ?? this._config.autoUpdate ?? DEFAULTS.autoUpdate;\n }\n\n get animation() {\n return this.args.animation || this._config.animation || DEFAULTS.animation;\n }\n\n get flip() {\n return this.args.flip ?? this._config.flip ?? DEFAULTS.flip;\n }\n\n get hideDelay() {\n return this.args.hideDelay ?? this._config.hideDelay ?? DEFAULTS.hideDelay;\n }\n\n get hideDuration() {\n return this.args.hideDuration ?? this._config.hideDuration ?? DEFAULTS.hideDuration;\n }\n\n get hideOn() {\n if (this.args.hideOn === null) {\n return null;\n }\n\n return this.args.hideOn ?? this._config.hideOn ?? DEFAULTS.hideOn;\n }\n\n get interactive() {\n return this.args.interactive ?? this._config.interactive ?? DEFAULTS.interactive;\n }\n\n get isOffset() {\n return this.args.isOffset ?? this._config.isOffset ?? DEFAULTS.isOffset;\n }\n\n get isShown() {\n return this.args.isShown ?? this._config.isShown ?? DEFAULTS.isShown;\n }\n\n get lazyRender() {\n return this.args.lazyRender ?? this._config.lazyRender ?? DEFAULTS.lazyRender;\n }\n\n get placement() {\n return this.args.placement ?? this._config.placement ?? DEFAULTS.placement;\n }\n\n get floatingElementContainer() {\n return this.args.floatingElementContainer || this._config.floatingElementContainer || DEFAULTS.floatingElementContainer;\n }\n\n get class() {\n return this.args.class || this._config.class;\n }\n\n get floatingUiOptions() {\n return this.args.floatingUiOptions || this._config.floatingUiOptions || DEFAULTS.floatingUiOptions;\n }\n\n get renderInPlace() {\n return this.args.renderInPlace ?? this._config.renderInPlace ?? DEFAULTS.renderInPlace;\n }\n\n get showDelay() {\n return this.args.showDelay ?? this._config.showDelay ?? DEFAULTS.showDelay;\n }\n\n get showDuration() {\n return this.args.showDuration ?? this._config.showDuration ?? DEFAULTS.showDuration;\n }\n\n get showOn() {\n if (this.args.showOn === null) {\n return null;\n }\n\n return this.args.showOn ?? this._config.showOn ?? DEFAULTS.showOn;\n }\n\n get style() {\n return this.args.style ?? this._config.style ?? DEFAULTS.style;\n }\n\n get useCapture() {\n return this.args.useCapture ?? this._config.useCapture ?? DEFAULTS.useCapture;\n }\n\n get configKey() {\n return this.args.configKey || 'popover';\n }\n\n get isFillAnimation() {\n return this.animation === 'fill';\n }\n\n get renderFloatingElement() {\n return (this.renderInPlace || this._currentTarget) && (!this.lazyRender || this._mustRender);\n }\n\n get shouldRenderFloatingElement() {\n // Always render the floating element unless lazyRender is true and we haven't been triggered yet\n return !this.lazyRender || this._mustRender;\n }\n\n get id() {\n return this.args.id || `${guidFor(this)}-floating`;\n }\n\n get overflowPadding() {\n return this.args.overflowPadding ?? this._config.overflowPadding ?? DEFAULTS.overflowPadding;\n }\n\n // The circle element needs a special duration that is slightly faster than the floating element's\n // transition, this prevents text from appearing outside the circle as it fills the background\n get _circleTransitionDuration() {\n return htmlSafe(\n `transition-duration: ${Math.round(this._transitionDuration / 1.25)}ms`\n );\n }\n\n get _class() {\n const showOrHideClass = `ember-attacher-${this._isStartingAnimation ? 'show' : 'hide'}`;\n const arrowClass = `ember-attacher-${this.arrow ? 'with' : 'without'}-arrow`;\n const baseClass = this.class || '';\n const additionalClass = this.args.additionalClass || '';\n return [`ember-attacher-${this.animation}`, baseClass, additionalClass, showOrHideClass, arrowClass].filter(Boolean).join(' ');\n }\n\n get _style() {\n const style = this.style;\n const transitionDuration = this._transitionDuration;\n warn(\n '@ember/string/htmlSafe must be used for any `style` passed to ember-attacher',\n isEmpty(style) || isHTMLSafe(style),\n { id: 'ember-attacher-require-html-safe-style' }\n );\n\n return htmlSafe(`transition-duration: ${transitionDuration}ms; ${style}`);\n }\n\n // This is memoized so it can be used by both attach-popover and attach-tooltip\n get _envConfig() {\n return getOwner(this).resolveRegistration('config:environment').emberAttacher || {};\n }\n\n get _config() {\n return {\n ...this._envConfig,\n ...this._envConfig[this.configKey],\n };\n }\n\n get _hideOn() {\n let hideOn = this.hideOn;\n\n if (hideOn === undefined) {\n hideOn = DEFAULTS.hideOn;\n }\n\n return hideOn === null ? [] : hideOn.split(' ');\n }\n\n get _middleware() {\n // Copy the middleware since we might write to the provided array\n const middleware = this.args.middleware ? [...this.args.middleware] : [];\n\n const flipString = this.flip;\n if (flipString) {\n const flipOptions = { fallbackPlacements: flipString.split(' ') };\n const flipMiddleware = middleware.find(name => name === 'flip');\n if (!flipMiddleware) {\n middleware.push(flip(flipOptions));\n } else if (!flipMiddleware.fallbackPlacements) {\n Object.assign({}, flipMiddleware, flipOptions);\n }\n } else if (this.overflowPadding !== false) {\n middleware.push(flip());\n }\n\n if (this.overflowPadding !== false && !middleware.find(name => name === 'shift')) {\n middleware.push(shift({ limiter: limitShift(), padding: this.overflowPadding }))\n }\n\n if (this.arrow && this._arrowElement && !middleware.find(name => name === 'arrow')) {\n middleware.push(arrow({ element: this._arrowElement }));\n }\n\n return middleware;\n }\n\n get _floatingElementContainer() {\n const maybeContainer = this.floatingElementContainer;\n const renderInPlace = this._renderInPlace;\n let floatingElementContainer;\n\n if (renderInPlace) {\n floatingElementContainer = this.parentElement;\n } else if (maybeContainer instanceof Element) {\n floatingElementContainer = maybeContainer;\n } else if (typeof maybeContainer === 'string') {\n const selector = maybeContainer;\n const possibleContainers = document.querySelectorAll(selector);\n\n assert(`floatingElementContainer selector \"${selector}\" found `\n + `${possibleContainers.length} possible containers when there should be exactly 1`, possibleContainers.length === 1);\n\n floatingElementContainer = possibleContainers[0];\n }\n\n return floatingElementContainer;\n }\n\n get _renderInPlace() {\n // document is undefined in Fastboot, so we have to render in\n // place for the floating element to show up at all.\n return typeof document !== 'undefined' ? !!this.renderInPlace : true;\n }\n\n _setIsVisibleAfterDelay(isVisible, delay) {\n if (!this._floatingElement) {\n this._animationTimeout = requestAnimationFrame(() => {\n this._setIsVisibleAfterDelay(isVisible, delay);\n });\n return;\n }\n const onChange = this.args.onChange;\n\n if (delay) {\n this._delayedVisibilityToggle = later(this, () => {\n this._animationTimeout = requestAnimationFrame(() => {\n animationTestWaiter.endAsync(this._animationTimeout);\n if (!this.isDestroyed && !this.isDestroying) {\n if (!isVisible) {\n this._cleanup?.();\n this._cleanup = null;\n }\n this._floatingElement.style.display = isVisible ? 'block' : 'none';\n\n // Prevent jank by making the attachment invisible until positioned.\n // The visibility style will be toggled by this._startShowAnimation()\n this._floatingElement.style.visibility = isVisible ? 'hidden' : '';\n\n if (onChange) {\n onChange(isVisible);\n }\n }\n });\n animationTestWaiter.beginAsync(this._animationTimeout);\n }, delay);\n } else {\n if (!isVisible) {\n this._cleanup?.();\n this._cleanup = null;\n }\n this._floatingElement.style.display = isVisible ? 'block' : 'none';\n // Prevent jank by making the attachment invisible until positioned.\n // The visibility style will be toggled by this._startShowAnimation()\n this._floatingElement.style.visibility = isVisible ? 'hidden' : '';\n\n if (onChange) {\n onChange(isVisible);\n }\n }\n }\n\n get _showOn() {\n let showOn = this.showOn;\n\n if (showOn === undefined) {\n showOn = DEFAULTS.showOn;\n }\n\n return showOn === null ? [] : showOn.split(' ');\n }\n\n // Exposed via the named yield to enable custom hide events\n @action\n hide() {\n this._hide();\n }\n\n /**\n * Register an explicit attachment target (Element or Floating UI virtual ref).\n * Yielded for composition into other modifiers.\n * Pass `null` to clear and fall back to `@explicitTarget` / parent.\n *\n * Calls `_initializeAttacher` directly so registration that happens during the\n * floating element's first render takes effect before the next user event.\n *\n * @param {Element | { getBoundingClientRect: Function } | null | undefined} target\n */\n @action\n setReference(target) {\n cancel(this._setReferenceTimer);\n\n // Defer: callers often invoke this from another modifier's\n // `modify()` (composition). Tracked writes + re-init must not run in\n // that tracking frame.\n this._setReferenceTimer = schedule('actions', () => {\n this._setReferenceTimer = null;\n\n if (this.isDestroyed || this.isDestroying) {\n return;\n }\n\n const next = target ?? null;\n\n if (this._registeredTarget === next) {\n return;\n }\n\n this._registeredTarget = next;\n this._initializeAttacher();\n });\n }\n\n // Always defined on first render so the modifier binding is present immediately.\n reference = modifier((element) => {\n this.setReference(element);\n\n return () => {\n if (this.isDestroyed || this.isDestroying) {\n return;\n }\n\n if (this._registeredTarget === element) {\n this.setReference(null);\n }\n };\n });\n\n _ensureArgumentsAreValid() {\n runInDebug(() => {\n if (this.arrow && this.isFillAnimation) {\n warn('Animation: \\'fill\\' is not compatible with arrow: true', { id: 70015 });\n }\n\n if (this.useCapture !== this._lastUseCaptureArgumentValue) {\n warn(\n 'The value of the useCapture argument was mutated',\n { id: 'ember-attacher.use-capture-mutated' }\n );\n }\n });\n }\n\n constructor() {\n super(...arguments);\n\n // The debounced _hide() and _show() are stored here so they can be cancelled when necessary\n this._delayedVisibilityToggle = null;\n\n // The final source of truth on whether or not all _hide() or _show() actions have completed\n this._isHidden = true;\n\n // Blocks _update from (re)starting autoUpdate after hide until the next show.\n this._positioningSuspended = false;\n\n // Holds a delayed function to toggle the visibility of the attachment.\n // Used to make sure animations can complete before the attachment is hidden.\n this._animationTimeout = null;\n\n // Used to store event listeners so they can be removed when necessary.\n this._hideListenersOnDocumentByEvent = {};\n this._hideListenersOnTargetByEvent = {};\n this._showListenersOnTargetByEvent = {};\n\n // Hacks to make sure event listeners have the right context and are still removable\n this._debouncedHideIfMouseOutsideTargetOrAttachment\n = this._debouncedHideIfMouseOutsideTargetOrAttachment.bind(this);\n this._hide = this._hide.bind(this);\n this._hideAfterDelay = this._hideAfterDelay.bind(this);\n this._hideIfMouseOutsideTargetOrAttachment\n = this._hideIfMouseOutsideTargetOrAttachment.bind(this);\n this._hideOnClickOut = this._hideOnClickOut.bind(this);\n this._hideOnEscapeKey = this._hideOnEscapeKey.bind(this);\n this._hideOnLostFocus = this._hideOnLostFocus.bind(this);\n this._hideOnMouseLeaveTarget = this._hideOnMouseLeaveTarget.bind(this);\n this._show = this._show.bind(this);\n this._showAfterDelay = this._showAfterDelay.bind(this);\n\n this._lastUseCaptureArgumentValue = this.useCapture;\n }\n\n _initializeAttacher() {\n this._removeEventListeners();\n const target = resolveAttachmentTarget({\n explicitTarget: this.args.explicitTarget,\n registeredTarget: this._registeredTarget,\n parentElement: this.parentElement,\n });\n this._listenerTarget = getListenerTarget(target);\n this._currentTarget = target;\n this._addListenersForShowEvents();\n\n if (!this._isHidden || this.isShown) {\n this._addListenersForHideEvents();\n\n // Even if the attachment is already shown, we still want to\n // call this._show() to make sure its position is updated for a potentially new target.\n this._show();\n }\n\n // Call hook for subclasses to add their own initialization logic\n this.args.onInitializeAttacher?.(this._currentTarget, this.id);\n }\n\n _addListenersForShowEvents() {\n const target = this._listenerTarget;\n\n if (!target) {\n return;\n }\n\n this._showOn.forEach((event) => {\n this._showListenersOnTargetByEvent[event] = this._showAfterDelay;\n\n target.addEventListener(event, this._showAfterDelay, this.useCapture);\n });\n }\n\n willDestroy() {\n super.willDestroy(...arguments);\n\n this._cleanup?.();\n this._cleanup = null;\n\n cancel(this._setReferenceTimer);\n this._cancelAnimation();\n cancel(this._delayedVisibilityToggle);\n\n this._removeEventListeners();\n\n // Call hook for cleanup\n this.args.onWillDestroy?.(this._currentTarget, this.id);\n }\n\n _removeEventListeners() {\n Object.keys(this._hideListenersOnDocumentByEvent).forEach((eventType) => {\n document.removeEventListener(eventType, this._hideListenersOnDocumentByEvent[eventType], this.useCapture);\n delete this._hideListenersOnDocumentByEvent[eventType];\n });\n const target = this._listenerTarget;\n\n if (!target) {\n return;\n }\n\n [this._hideListenersOnTargetByEvent, this._showListenersOnTargetByEvent]\n .forEach((eventToListener) => {\n Object.keys(eventToListener).forEach((event) => {\n target.removeEventListener(event, eventToListener[event], this.useCapture);\n });\n });\n }\n\n _syncIsShown() {\n const isShown = this.isShown;\n\n if (isShown === true && this._isHidden) {\n this._show();\n\n // Add the hide listeners in the next run loop to avoid conflicts\n // where clicking triggers both an isShown toggle and a clickout.\n next(this, () => this._addListenersForHideEvents());\n } else if (isShown === false && !this._isHidden) {\n this._hide();\n }\n }\n\n /**\n * ================== SHOW ATTACHMENT LOGIC ==================\n */\n\n _showAfterDelay() {\n cancel(this._delayedVisibilityToggle);\n\n this._mustRender = true;\n\n this._addListenersForHideEvents();\n\n const showDelay = parseInt(this.showDelay);\n\n this._delayedVisibilityToggle = debounce(this, this._show, showDelay, !showDelay);\n }\n\n _show() {\n this._cancelAnimation();\n\n if (!this._currentTarget) {\n return;\n }\n\n this._positioningSuspended = false;\n this._mustRender = true;\n\n // Make the attachment visible immediately so transition animations can take place\n this._setIsVisibleAfterDelay(true, 0);\n\n this._startShowAnimation();\n }\n\n _startShowAnimation() {\n // Start the show animation on the next cycle so CSS transitions can have an effect.\n // If we start the animation immediately, the transition won't work because\n // `display: none` => `display: ''` is not transition-able.\n // All included animations set opaque: 0, so the attachment is still effectively hidden until\n // the final RAF occurs.\n this._animationTimeout = requestAnimationFrame(() => {\n animationTestWaiter.endAsync(this._animationTimeout);\n if (this.isDestroyed || this.isDestroying || !this._currentTarget) {\n return;\n }\n\n const floatingElement = this._floatingElement;\n\n // Wait until the element is visible before continuing\n if (!floatingElement || floatingElement.style.display === 'none') {\n this._startShowAnimation();\n return;\n }\n\n this._update();\n\n // Wait for the above positioning to take effect before starting the show animation,\n // else the positioning itself will be animated, causing animation glitches.\n this._animationTimeout = requestAnimationFrame(() => {\n animationTestWaiter.endAsync(this._animationTimeout);\n if (this.isDestroyed || this.isDestroying || !this._currentTarget) {\n return;\n }\n run(() => {\n if (this.isDestroyed || this.isDestroying || !this._currentTarget) {\n return;\n }\n // Make the floating element visible now that it has been positioned\n floatingElement.style.visibility = '';\n this._transitionDuration = parseInt(this.showDuration);\n this._isStartingAnimation = true;\n floatingElement.setAttribute('aria-hidden', 'false');\n });\n\n this._isHidden = false;\n });\n animationTestWaiter.beginAsync(this._animationTimeout);\n });\n animationTestWaiter.beginAsync(this._animationTimeout);\n }\n\n /**\n * ================== HIDE ATTACHMENT LOGIC ==================\n */\n\n _hideAfterDelay() {\n cancel(this._delayedVisibilityToggle);\n\n const hideDelay = parseInt(this.hideDelay);\n\n this._delayedVisibilityToggle = debounce(this, this._hide, hideDelay, !hideDelay);\n }\n\n _hide() {\n this._positioningSuspended = true;\n this._cleanup?.();\n this._cleanup = null;\n\n if (!this._floatingElement) {\n this._animationTimeout = requestAnimationFrame(() => {\n animationTestWaiter.endAsync(this._animationTimeout);\n this._hide();\n });\n animationTestWaiter.beginAsync(this._animationTimeout);\n return;\n }\n\n this._cancelAnimation();\n\n this._removeListenersForHideEvents();\n this._animationTimeout = requestAnimationFrame(() => {\n animationTestWaiter.endAsync(this._animationTimeout);\n // Avoid a race condition where we attempt to hide after the component is being destroyed.\n if (this.isDestroyed || this.isDestroying) {\n return;\n }\n\n const hideDuration = parseInt(this.hideDuration);\n\n run(() => {\n if (this.isDestroyed || this.isDestroying) {\n return;\n }\n\n this._transitionDuration = hideDuration;\n this._isStartingAnimation = false;\n this._floatingElement.setAttribute('aria-hidden', 'true');\n // Wait for any animations to complete before hiding the attachment\n this._setIsVisibleAfterDelay(false, hideDuration);\n });\n\n this._isHidden = true;\n });\n animationTestWaiter.beginAsync(this._animationTimeout);\n }\n\n /**\n * ================== HIDE LISTENERS ==================\n */\n\n _addListenersForHideEvents() {\n const hideOn = this._hideOn;\n const target = this._listenerTarget;\n\n // Target or component was destroyed (virtual refs without contextElement skip listeners)\n if (!target || this.isDestroyed || this.isDestroying) {\n return;\n }\n\n if (hideOn.includes('click')) {\n const showOnClickListener = this._showListenersOnTargetByEvent.click;\n\n if (showOnClickListener) {\n target.removeEventListener('click', showOnClickListener, this.useCapture);\n\n delete this._showListenersOnTargetByEvent.click;\n }\n\n this._hideListenersOnTargetByEvent.click = this._hideAfterDelay;\n target.addEventListener('click', this._hideAfterDelay, this.useCapture);\n }\n\n if (hideOn.includes('clickout')) {\n const clickoutEvent = 'ontouchstart' in window ? 'touchend' : 'click';\n\n this._hideListenersOnDocumentByEvent[clickoutEvent] = this._hideOnClickOut;\n document.addEventListener(clickoutEvent, this._hideOnClickOut, this.useCapture);\n }\n\n if (hideOn.includes('escapekey')) {\n this._hideListenersOnDocumentByEvent.keydown = this._hideOnEscapeKey;\n document.addEventListener('keydown', this._hideOnEscapeKey, this.useCapture);\n }\n\n // Hides the attachment when the mouse leaves the target\n // (or leaves both target and attachment for interactive attachments)\n if (hideOn.includes('mouseleave')) {\n this._hideListenersOnTargetByEvent.mouseleave = this._hideOnMouseLeaveTarget;\n target.addEventListener('mouseleave', this._hideOnMouseLeaveTarget, this.useCapture);\n }\n\n // Hides the attachment when focus is lost on the target\n ['blur', 'focusout'].forEach((eventType) => {\n if (hideOn.includes(eventType)) {\n this._hideListenersOnTargetByEvent[eventType] = this._hideOnLostFocus;\n target.addEventListener(eventType, this._hideOnLostFocus, this.useCapture);\n }\n });\n }\n\n _hideOnMouseLeaveTarget() {\n if (this.interactive) {\n // TODO(kjb) Should debounce this, but hiding appears sluggish if you debounce.\n // - If you debounce with immediate fire, you get a bug where you can move out of the\n // attachment and not trigger the hide because the hide check was debounced\n // - Ideally we would debounce with an immediate run, then instead of debouncing, we would\n // queue another fire at the end of the debounce period\n if (!this._hideListenersOnDocumentByEvent.mousemove) {\n this._hideListenersOnDocumentByEvent.mousemove = this._hideIfMouseOutsideTargetOrAttachment;\n document.addEventListener('mousemove', this._hideIfMouseOutsideTargetOrAttachment, this.useCapture);\n }\n } else {\n this._hideAfterDelay();\n }\n }\n\n _debouncedHideIfMouseOutsideTargetOrAttachment(event) {\n debounce(this, this._hideIfMouseOutsideTargetOrAttachment, event, 10);\n }\n\n _hideIfMouseOutsideTargetOrAttachment(event) {\n const target = this._listenerTarget;\n\n if (!target) {\n return;\n }\n\n // If cursor is not on the attachment or target, hide the floating element\n if (!target.contains(event.target)\n && !(this.isOffset && isCursorBetween(event, this._currentTarget, this._floatingElement))\n && (this._floatingElement && !this._floatingElement.contains(event.target))) {\n // Remove this listener before hiding the attachment\n delete this._hideListenersOnDocumentByEvent.mousemove;\n document.removeEventListener('mousemove', this._hideIfMouseOutsideTargetOrAttachment, this.useCapture);\n\n this._hideAfterDelay();\n }\n }\n\n _hideOnClickOut(event) {\n const target = this._listenerTarget;\n const targetReceivedClick = elementContainsEvent(target, event);\n\n if (this.interactive) {\n if (!targetReceivedClick && !elementContainsEvent(this._floatingElement, event)) {\n this._hideAfterDelay();\n }\n } else if (!targetReceivedClick) {\n this._hideAfterDelay();\n }\n }\n\n _hideOnEscapeKey(event) {\n if (event.keyCode === 27) {\n return this._hideAfterDelay();\n }\n }\n\n _hideOnLostFocus(event) {\n if (event.relatedTarget === null) {\n this._hideAfterDelay();\n }\n\n const target = this._listenerTarget;\n\n if (!target) {\n return;\n }\n\n const targetContainsFocus = target.contains(event.relatedTarget);\n\n if (this.interactive) {\n if (!targetContainsFocus && !this._floatingElement.contains(event.relatedTarget)) {\n this._hideAfterDelay();\n }\n } else if (!targetContainsFocus) {\n this._hideAfterDelay();\n }\n }\n\n _removeListenersForHideEvents() {\n Object.keys(this._hideListenersOnDocumentByEvent).forEach((eventType) => {\n document.removeEventListener(eventType, this._hideListenersOnDocumentByEvent[eventType], this.useCapture);\n delete this._hideListenersOnDocumentByEvent[eventType];\n });\n\n const showOn = this._showOn;\n const target = this._listenerTarget;\n\n // The target was destroyed, nothing to remove listeners from\n if (!target) {\n return;\n }\n\n // Switch clicking back to a show event\n if (showOn.includes('click')) {\n const hideOnClickListener = this._hideListenersOnTargetByEvent.click;\n\n if (hideOnClickListener) {\n target.removeEventListener('click', hideOnClickListener, this.useCapture);\n delete this._hideListenersOnTargetByEvent.click;\n }\n\n this._showListenersOnTargetByEvent.click = this._showAfterDelay;\n target.addEventListener('click', this._showAfterDelay, this.useCapture);\n }\n\n ['blur', 'focusout', 'mouseleave'].forEach((eventType) => {\n const listener = this._hideListenersOnTargetByEvent[eventType];\n\n if (listener) {\n target.removeEventListener(eventType, listener, this.useCapture);\n delete this._hideListenersOnTargetByEvent[eventType];\n }\n });\n }\n\n _update() {\n this._cleanup?.();\n this._cleanup = null;\n\n // Suspended after _hide until the next _show. Hide writes tracked state that\n // re-renders and can re-fire optionsDidUpdate → _update; without this flag\n // that path restarts autoUpdate (especially with hideDuration: 0). Do not\n // use _isHidden here — it stays true until late in _startShowAnimation,\n // after _update must already run.\n if (\n this.isDestroyed ||\n this.isDestroying ||\n this._positioningSuspended ||\n !this._currentTarget ||\n !this._floatingElement\n ) {\n return;\n }\n\n const isTargetConnected = isElementTarget(this._currentTarget)\n ? this._currentTarget.isConnected\n : (this._currentTarget?.contextElement instanceof Element\n ? this._currentTarget.contextElement.isConnected\n : true);\n\n if (!isTargetConnected || !this._floatingElement.isConnected) {\n return;\n }\n\n if (this.autoUpdate) {\n this._cleanup = autoUpdate(\n this._currentTarget,\n this._floatingElement,\n this._updatePosition,\n typeOf(this.autoUpdate) === 'object' ? this.autoUpdate : undefined\n );\n } else {\n this._updatePosition();\n }\n }\n\n @action\n _updatePosition() {\n if (\n this.isDestroyed ||\n this.isDestroying ||\n !this._currentTarget ||\n !this._floatingElement\n ) {\n return;\n }\n\n const isTargetConnected = isElementTarget(this._currentTarget)\n ? this._currentTarget.isConnected\n : (this._currentTarget?.contextElement instanceof Element\n ? this._currentTarget.contextElement.isConnected\n : true);\n\n if (!isTargetConnected || !this._floatingElement.isConnected) {\n // Stop lingering observers if a node detached mid-update.\n this._cleanup?.();\n this._cleanup = null;\n return;\n }\n\n const computePositionToken = animationTestWaiter.beginAsync();\n computePosition(this._currentTarget, this._floatingElement, {\n ...this.floatingUiOptions,\n middleware: this._middleware,\n placement: this.placement,\n })\n .then(({ x, y, placement, middlewareData }) => {\n animationTestWaiter.endAsync(computePositionToken);\n\n if (\n this.isDestroyed ||\n this.isDestroying ||\n !this._floatingElement ||\n !this._floatingElement.isConnected\n ) {\n return;\n }\n\n Object.assign(this._floatingElement.style, {\n left: `${x}px`,\n top: `${y}px`,\n });\n\n if (middlewareData.arrow && this._arrowElement) {\n const { x: arrowX, y: arrowY } = middlewareData.arrow;\n\n Object.assign(this._arrowElement.style, {\n left: arrowX != null ? `${arrowX}px` : '',\n top: arrowY != null ? `${arrowY}px` : '',\n });\n }\n\n this._floatingElement.setAttribute('x-placement', placement);\n })\n .catch((error) => {\n animationTestWaiter.endAsync(computePositionToken);\n\n if (!this.isDestroyed && !this.isDestroying) {\n warn(`[ember-attacher] Positioning error: ${error?.message ?? error}`, {\n id: 'ember-attacher.positioning-error',\n });\n }\n });\n }\n\n _cancelAnimation() {\n if (typeof cancelAnimationFrame !== 'function') {\n return;\n }\n\n cancelAnimationFrame(this._animationTimeout);\n\n runInDebug(() => {\n if (animationTestWaiter.items?.get(this._animationTimeout)) {\n animationTestWaiter.endAsync(this._animationTimeout);\n }\n })\n }\n}"],"names":["elementContainsEvent","element","event","path","composedPath","length","includes","Boolean","target","contains","isCursorBetween","floatingElement","clientX","clientY","attachmentPosition","getBoundingClientRect","targetPosition","isBetweenLeftAndRight","Math","min","left","max","right","isBetweenTopAndBottom","top","bottom","consume","positional","i","onInsert","fn","seen","WeakSet","modifier","has","add","timer","schedule","cancel","onUpdate","setComponentTemplate","precompileTemplate","strictMode","templateOnly","animationTestWaiter","buildWaiter","BasicAttacher","_class","Component","arrow","args","_config","DEFAULTS","autoUpdate","animation","flip","hideDelay","hideDuration","hideOn","interactive","isOffset","isShown","lazyRender","placement","floatingElementContainer","class","floatingUiOptions","renderInPlace","showDelay","showDuration","showOn","style","useCapture","configKey","isFillAnimation","renderFloatingElement","_currentTarget","_mustRender","shouldRenderFloatingElement","id","guidFor","overflowPadding","_circleTransitionDuration","htmlSafe","round","_transitionDuration","showOrHideClass","_isStartingAnimation","arrowClass","baseClass","additionalClass","filter","join","_style","transitionDuration","warn","isEmpty","isHTMLSafe","_envConfig","getOwner","resolveRegistration","emberAttacher","_hideOn","undefined","split","_middleware","middleware","flipString","flipOptions","fallbackPlacements","flipMiddleware","find","name","push","Object","assign","shift","limiter","limitShift","padding","_arrowElement","_floatingElementContainer","maybeContainer","_renderInPlace","parentElement","Element","selector","possibleContainers","document","querySelectorAll","assert","_setIsVisibleAfterDelay","isVisible","delay","_floatingElement","_animationTimeout","requestAnimationFrame","onChange","_delayedVisibilityToggle","later","endAsync","isDestroyed","isDestroying","_cleanup","display","visibility","beginAsync","_showOn","hide","_hide","setReference","_setReferenceTimer","next","_registeredTarget","_initializeAttacher","_ensureArgumentsAreValid","runInDebug","_lastUseCaptureArgumentValue","constructor","arguments","_defineProperty","MaybeInElement","_initializerDefineProperty","_descriptor","_descriptor2","_descriptor3","_descriptor4","_descriptor5","_descriptor6","_descriptor7","_descriptor8","_syncIsShown","_update","_isHidden","_positioningSuspended","_hideListenersOnDocumentByEvent","_hideListenersOnTargetByEvent","_showListenersOnTargetByEvent","_debouncedHideIfMouseOutsideTargetOrAttachment","bind","_hideAfterDelay","_hideIfMouseOutsideTargetOrAttachment","_hideOnClickOut","_hideOnEscapeKey","_hideOnLostFocus","_hideOnMouseLeaveTarget","_show","_showAfterDelay","_removeEventListeners","resolveAttachmentTarget","explicitTarget","registeredTarget","_listenerTarget","getListenerTarget","_addListenersForShowEvents","_addListenersForHideEvents","onInitializeAttacher","forEach","addEventListener","willDestroy","_cancelAnimation","onWillDestroy","keys","eventType","removeEventListener","eventToListener","parseInt","debounce","_startShowAnimation","run","setAttribute","_removeListenersForHideEvents","showOnClickListener","click","clickoutEvent","window","keydown","mouseleave","mousemove","targetReceivedClick","keyCode","relatedTarget","targetContainsFocus","hideOnClickListener","listener","isTargetConnected","isElementTarget","isConnected","contextElement","_updatePosition","typeOf","computePositionToken","computePosition","then","x","y","middlewareData","arrowX","arrowY","catch","error","message","cancelAnimationFrame","items","get","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","action","getOwnPropertyDescriptor","TEMPLATE"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,oBAAoBA,CAACC,OAAO,EAAEC,KAAK,EAAE;EACnD,IAAI,CAACD,OAAO,EAAE;AACZ,IAAA,OAAO,KAAK;AACd,EAAA;AAEA,EAAA,MAAME,IAAI,GAAG,OAAOD,KAAK,EAAEE,YAAY,KAAK,UAAU,GAAGF,KAAK,CAACE,YAAY,EAAE,GAAG,IAAI;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AAA,EAAA,cAAA,CAAA,EAAAvM,MAAA,CAAAuM,SAAA,CAAA,EAAAD,yBAAA,CAAAtM,MAAA,CAAAuM,SAAA,EAAA,iBAAA,EAAA,CA6gBNM,MAAM,CAAA,EAAA1I,MAAA,CAAA2I,wBAAA,CAAA9M,MAAA,CAAAuM,SAAA,EAAA,iBAAA,CAAA,EAAAvM,MAAA,CAAAuM,SAAA,CAAA,EAAAvM,MAAA;AA53ByBP,oBAAA,CAAAsN,QAAA,EAAbhN,aAAa,CAAA;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-attacher",
3
- "version": "4.2.0",
3
+ "version": "4.2.1",
4
4
  "description": "Tooltips and popovers for Ember.js apps",
5
5
  "keywords": [
6
6
  "ember-addon",