ember-attacher 4.3.0 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_app_/components/attacher.js +1 -0
- package/dist/_app_/modifiers/tooltip.js +1 -0
- package/dist/attacher-core-m7x5g04q.js +2653 -0
- package/dist/attacher-core-m7x5g04q.js.map +1 -0
- package/dist/components/attach-popover.d.ts +14 -0
- package/dist/components/attach-popover.js +9 -9
- package/dist/components/attach-popover.js.map +1 -1
- package/dist/components/attach-tooltip.d.ts +15 -0
- package/dist/components/attach-tooltip.js +11 -16
- package/dist/components/attach-tooltip.js.map +1 -1
- package/dist/components/attacher.d.ts +17 -0
- package/dist/components/attacher.js +33 -0
- package/dist/components/attacher.js.map +1 -0
- package/dist/components/basic-attacher.d.ts +151 -0
- package/dist/components/basic-attacher.js +22 -1689
- package/dist/components/basic-attacher.js.map +1 -1
- package/dist/defaults.d.ts +32 -0
- package/dist/index.d.ts +72 -0
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/{is-visible-c5EF_lZe.js → is-visible-DQGdmVDv.js} +2 -2
- package/dist/is-visible-DQGdmVDv.js.map +1 -0
- package/dist/modifiers/tooltip.d.ts +17 -0
- package/dist/modifiers/tooltip.js +254 -0
- package/dist/modifiers/tooltip.js.map +1 -0
- package/dist/styles/ember-attacher.css +1 -237
- package/dist/template-registry.d.ts +17 -0
- package/dist/test-support/index.d.ts +2 -0
- package/dist/test-support/index.js +1 -1
- package/dist/test-support/is-visible.d.ts +3 -0
- package/package.json +46 -14
- package/dist/is-visible-c5EF_lZe.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ember-attacher",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0",
|
|
4
4
|
"description": "Tooltips and popovers for Ember.js apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon",
|
|
@@ -12,15 +12,45 @@
|
|
|
12
12
|
"prepare": "pnpm run build",
|
|
13
13
|
"prepublishOnly": "pnpm run build",
|
|
14
14
|
"start": "rollup --config rollup.config.mjs --watch",
|
|
15
|
-
"lint": "eslint ."
|
|
16
|
-
|
|
15
|
+
"lint": "eslint ."
|
|
16
|
+
},
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"typesVersions": {
|
|
19
|
+
"*": {
|
|
20
|
+
"test-support": [
|
|
21
|
+
"./dist/test-support/index.d.ts"
|
|
22
|
+
],
|
|
23
|
+
"template-registry": [
|
|
24
|
+
"./dist/template-registry.d.ts"
|
|
25
|
+
],
|
|
26
|
+
"*": [
|
|
27
|
+
"./dist/*",
|
|
28
|
+
"./dist/*.d.ts"
|
|
29
|
+
]
|
|
30
|
+
}
|
|
17
31
|
},
|
|
18
32
|
"exports": {
|
|
19
|
-
".":
|
|
20
|
-
|
|
21
|
-
|
|
33
|
+
".": {
|
|
34
|
+
"types": "./dist/index.d.ts",
|
|
35
|
+
"default": "./dist/index.js"
|
|
36
|
+
},
|
|
37
|
+
"./test-support": {
|
|
38
|
+
"types": "./dist/test-support/index.d.ts",
|
|
39
|
+
"default": "./dist/test-support/index.js"
|
|
40
|
+
},
|
|
41
|
+
"./template-registry": {
|
|
42
|
+
"types": "./dist/template-registry.d.ts"
|
|
43
|
+
},
|
|
22
44
|
"./addon-main.js": "./addon-main.js",
|
|
23
|
-
"./styles": "./dist/styles/ember-attacher.css"
|
|
45
|
+
"./styles": "./dist/styles/ember-attacher.css",
|
|
46
|
+
"./*.js": {
|
|
47
|
+
"types": "./dist/*.d.ts",
|
|
48
|
+
"default": "./dist/*.js"
|
|
49
|
+
},
|
|
50
|
+
"./*": {
|
|
51
|
+
"types": "./dist/*.d.ts",
|
|
52
|
+
"default": "./dist/*"
|
|
53
|
+
}
|
|
24
54
|
},
|
|
25
55
|
"files": [
|
|
26
56
|
"addon-main.js",
|
|
@@ -46,6 +76,9 @@
|
|
|
46
76
|
"@floating-ui/dom": "^1.8.0",
|
|
47
77
|
"ember-modifier": "^4.2.2"
|
|
48
78
|
},
|
|
79
|
+
"peerDependencies": {
|
|
80
|
+
"@glimmer/component": "^1.0.0 || ^2.0.0"
|
|
81
|
+
},
|
|
49
82
|
"engines": {
|
|
50
83
|
"node": "16.* || >= 18"
|
|
51
84
|
},
|
|
@@ -63,7 +96,9 @@
|
|
|
63
96
|
"app-js": {
|
|
64
97
|
"./components/attach-popover.js": "./dist/_app_/components/attach-popover.js",
|
|
65
98
|
"./components/attach-tooltip.js": "./dist/_app_/components/attach-tooltip.js",
|
|
66
|
-
"./components/
|
|
99
|
+
"./components/attacher.js": "./dist/_app_/components/attacher.js",
|
|
100
|
+
"./components/basic-attacher.js": "./dist/_app_/components/basic-attacher.js",
|
|
101
|
+
"./modifiers/tooltip.js": "./dist/_app_/modifiers/tooltip.js"
|
|
67
102
|
}
|
|
68
103
|
},
|
|
69
104
|
"publishConfig": {
|
|
@@ -75,17 +110,14 @@
|
|
|
75
110
|
"@babel/plugin-proposal-decorators": "^8.0.2",
|
|
76
111
|
"@babel/plugin-transform-class-properties": "^8.0.1",
|
|
77
112
|
"@embroider/addon-dev": "^8.5.0",
|
|
78
|
-
"@release-it-plugins/lerna-changelog": "^9.0.0",
|
|
79
113
|
"@rollup/plugin-babel": "^7.1.0",
|
|
80
|
-
"babel-plugin-ember-template-compilation": "^2.
|
|
114
|
+
"babel-plugin-ember-template-compilation": "^2.4.1",
|
|
81
115
|
"eslint": "~9.39.5",
|
|
82
116
|
"eslint-plugin-decorator-position": "^6.1.1",
|
|
83
|
-
"eslint-plugin-ember": "
|
|
117
|
+
"eslint-plugin-ember": "^13.11.0",
|
|
84
118
|
"eslint-plugin-n": "^18.5.0",
|
|
85
119
|
"globals": "^17.14.0",
|
|
86
120
|
"lightningcss": "^1.33.0",
|
|
87
|
-
"
|
|
88
|
-
"release-it-pnpm": "^4.6.6",
|
|
89
|
-
"rollup": "^4.68.3"
|
|
121
|
+
"rollup": "^4.68.5"
|
|
90
122
|
}
|
|
91
123
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"is-visible-c5EF_lZe.js","sources":["../src/test-support/is-visible.js"],"sourcesContent":["export function isVisible(selector, contextEl) {\n const attachment = typeof(selector) === 'string' ? getAttachment(selector, contextEl) : selector;\n\n if (!attachment) {\n return false;\n }\n\n const style = getComputedStyle(attachment);\n\n if (style.display === 'none' || style.visibility === 'hidden') {\n return false;\n }\n\n if (attachment.getAttribute('aria-hidden') === 'true') {\n return false;\n }\n\n if (\n attachment.hasAttribute('popover') &&\n typeof attachment.matches === 'function' &&\n typeof HTMLElement !== 'undefined' &&\n typeof HTMLElement.prototype.showPopover === 'function'\n ) {\n try {\n if (!attachment.matches(':popover-open')) {\n return false;\n }\n } catch {\n // Ignore if :popover-open selector is unsupported\n }\n }\n\n return true;\n}\n\nfunction getAttachment(selectorOrElement = '', contextEl) {\n if (selectorOrElement instanceof Window ||\n selectorOrElement instanceof Document ||\n selectorOrElement instanceof HTMLElement ||\n selectorOrElement instanceof SVGElement) {\n return selectorOrElement;\n }\n\n let result;\n\n if (contextEl instanceof HTMLElement) {\n result = contextEl.querySelector(selectorOrElement);\n } else {\n result = document.querySelector(`${selectorOrElement}`);\n }\n\n if (!result) {\n const msg = typeof(selector) === 'string' ? selectorOrElement : selectorOrElement.innerHTML;\n\n throw `Could not locate attachment from selector: ${msg}`;\n }\n\n return result;\n}\n"],"names":["isVisible","selector","contextEl","attachment","getAttachment","style","getComputedStyle","display","visibility","getAttribute","hasAttribute","matches","HTMLElement","prototype","showPopover","selectorOrElement","Window","Document","SVGElement","result","querySelector","document","msg","innerHTML"],"mappings":"AAAO,SAASA,SAASA,CAACC,QAAQ,EAAEC,SAAS,EAAE;AAC7C,EAAA,MAAMC,UAAU,GAAG,OAAOF,QAAS,KAAK,QAAQ,GAAGG,aAAa,CAACH,QAAQ,EAAEC,SAAS,CAAC,GAAGD,QAAQ;EAEhG,IAAI,CA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