ember-resize-modifier 0.7.1 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -12
- package/addon-main.cjs +4 -0
- package/dist/_app_/modifiers/did-resize.js +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/{addon → dist}/modifiers/did-resize.js +4 -12
- package/dist/modifiers/did-resize.js.map +1 -0
- package/package.json +52 -101
- package/CHANGELOG.md +0 -154
- package/RELEASE.md +0 -67
- package/app/modifiers/did-resize.js +0 -1
- package/docs/index.md +0 -24
- package/docs/modifiers/did-resize.js +0 -12
- package/docs/modifiers/did-resize.md +0 -36
- package/index.js +0 -5
- package/tsconfig.declarations.json +0 -10
package/README.md
CHANGED
|
@@ -1,22 +1,15 @@
|
|
|
1
1
|
# ember-resize-modifier
|
|
2
2
|
|
|
3
|
-
[](https://app.netlify.com/sites/blissful-bell-745374/deploys)
|
|
4
|
-
[](https://travis-ci.com/elwayman02/ember-resize-modifier)
|
|
5
|
-
|
|
6
3
|
Resize Modifier for Ember.js Applications using ResizeObserver.
|
|
7
4
|
|
|
8
5
|
Check out the [documentation](https://ember-resize-modifier.jhawk.co/)!
|
|
9
6
|
|
|
10
7
|
We adhere to the [Ember Community Guidelines](https://emberjs.com/guidelines/) for our Code of Conduct.
|
|
11
8
|
|
|
12
|
-
|
|
13
9
|
## Compatibility
|
|
14
10
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
* Node.js v16 or above
|
|
18
|
-
* [All N-1 browsers](https://caniuse.com/#search=resizeobserver)
|
|
19
|
-
|
|
11
|
+
- Ember.js v4.12 or above
|
|
12
|
+
- Embroider or ember-auto-import v2
|
|
20
13
|
|
|
21
14
|
## Installation
|
|
22
15
|
|
|
@@ -24,17 +17,14 @@ We adhere to the [Ember Community Guidelines](https://emberjs.com/guidelines/) f
|
|
|
24
17
|
ember install ember-resize-modifier
|
|
25
18
|
```
|
|
26
19
|
|
|
27
|
-
|
|
28
20
|
## Usage
|
|
29
21
|
|
|
30
22
|
[Longer description of how to use the addon in apps.]
|
|
31
23
|
|
|
32
|
-
|
|
33
24
|
## Contributing
|
|
34
25
|
|
|
35
26
|
See the [Contributing](CONTRIBUTING.md) guide for details.
|
|
36
27
|
|
|
37
|
-
|
|
38
28
|
## License
|
|
39
29
|
|
|
40
30
|
This project is licensed under the [MIT License](LICENSE.md).
|
package/addon-main.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "ember-resize-modifier/modifiers/did-resize";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Modifier from 'ember-modifier';
|
|
2
2
|
import { registerDestructor } from '@ember/destroyable';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
class DidResizeModifier extends Modifier {
|
|
5
5
|
// Public API
|
|
6
6
|
element;
|
|
7
7
|
handler;
|
|
@@ -10,14 +10,11 @@ export default class DidResizeModifier extends Modifier {
|
|
|
10
10
|
// Private API
|
|
11
11
|
static observer = null;
|
|
12
12
|
static handlers = null;
|
|
13
|
-
|
|
14
13
|
constructor() {
|
|
15
14
|
super(...arguments);
|
|
16
|
-
|
|
17
15
|
if (!('ResizeObserver' in window)) {
|
|
18
16
|
return;
|
|
19
17
|
}
|
|
20
|
-
|
|
21
18
|
if (!DidResizeModifier.observer) {
|
|
22
19
|
DidResizeModifier.handlers = new WeakMap();
|
|
23
20
|
DidResizeModifier.observer = new ResizeObserver((entries, observer) => {
|
|
@@ -29,35 +26,27 @@ export default class DidResizeModifier extends Modifier {
|
|
|
29
26
|
});
|
|
30
27
|
});
|
|
31
28
|
}
|
|
32
|
-
|
|
33
29
|
registerDestructor(this, unobserve);
|
|
34
30
|
}
|
|
35
|
-
|
|
36
31
|
modify(element, positional /*, named*/) {
|
|
37
32
|
unobserve(this);
|
|
38
|
-
|
|
39
33
|
this.element = element;
|
|
40
|
-
|
|
41
34
|
const [handler, options] = positional;
|
|
42
35
|
|
|
43
36
|
// Save arguments for when we need them
|
|
44
37
|
this.handler = handler;
|
|
45
38
|
this.options = options || this.options;
|
|
46
|
-
|
|
47
39
|
this.observe();
|
|
48
40
|
}
|
|
49
|
-
|
|
50
41
|
observe() {
|
|
51
42
|
if (DidResizeModifier.observer) {
|
|
52
43
|
this.addHandler();
|
|
53
44
|
DidResizeModifier.observer.observe(this.element, this.options);
|
|
54
45
|
}
|
|
55
46
|
}
|
|
56
|
-
|
|
57
47
|
addHandler() {
|
|
58
48
|
DidResizeModifier.handlers.set(this.element, this.handler);
|
|
59
49
|
}
|
|
60
|
-
|
|
61
50
|
removeHandler() {
|
|
62
51
|
DidResizeModifier.handlers.delete(this.element);
|
|
63
52
|
}
|
|
@@ -73,3 +62,6 @@ function unobserve(instance) {
|
|
|
73
62
|
instance.removeHandler();
|
|
74
63
|
}
|
|
75
64
|
}
|
|
65
|
+
|
|
66
|
+
export { DidResizeModifier as default };
|
|
67
|
+
//# sourceMappingURL=did-resize.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"did-resize.js","sources":["../../src/modifiers/did-resize.js"],"sourcesContent":["import Modifier from 'ember-modifier';\nimport { registerDestructor } from '@ember/destroyable';\n\nexport default class DidResizeModifier extends Modifier {\n // Public API\n element;\n handler;\n options = {};\n\n // Private API\n static observer = null;\n static handlers = null;\n\n constructor() {\n super(...arguments);\n\n if (!('ResizeObserver' in window)) {\n return;\n }\n\n if (!DidResizeModifier.observer) {\n DidResizeModifier.handlers = new WeakMap();\n DidResizeModifier.observer = new ResizeObserver((entries, observer) => {\n window.requestAnimationFrame(() => {\n for (let entry of entries) {\n const handler = DidResizeModifier.handlers.get(entry.target);\n if (handler) handler(entry, observer);\n }\n });\n });\n }\n\n registerDestructor(this, unobserve);\n }\n\n modify(element, positional /*, named*/) {\n unobserve(this);\n\n this.element = element;\n\n const [handler, options] = positional;\n\n // Save arguments for when we need them\n this.handler = handler;\n this.options = options || this.options;\n\n this.observe();\n }\n\n observe() {\n if (DidResizeModifier.observer) {\n this.addHandler();\n DidResizeModifier.observer.observe(this.element, this.options);\n }\n }\n\n addHandler() {\n DidResizeModifier.handlers.set(this.element, this.handler);\n }\n\n removeHandler() {\n DidResizeModifier.handlers.delete(this.element);\n }\n}\n\n/**\n *\n * @param {DidResizeModifier} instance\n */\nfunction unobserve(instance) {\n if (instance.element && DidResizeModifier.observer) {\n DidResizeModifier.observer.unobserve(instance.element);\n instance.removeHandler();\n }\n}\n"],"names":["DidResizeModifier","Modifier","element","handler","options","observer","handlers","constructor","arguments","window","WeakMap","ResizeObserver","entries","requestAnimationFrame","entry","get","target","registerDestructor","unobserve","modify","positional","observe","addHandler","set","removeHandler","delete","instance"],"mappings":";;;AAGe,MAAMA,iBAAiB,SAASC,QAAQ,CAAC;AACtD;EACAC,OAAO,CAAA;EACPC,OAAO,CAAA;EACPC,OAAO,GAAG,EAAE,CAAA;;AAEZ;EACA,OAAOC,QAAQ,GAAG,IAAI,CAAA;EACtB,OAAOC,QAAQ,GAAG,IAAI,CAAA;AAEtBC,EAAAA,WAAWA,GAAG;IACZ,KAAK,CAAC,GAAGC,SAAS,CAAC,CAAA;AAEnB,IAAA,IAAI,EAAE,gBAAgB,IAAIC,MAAM,CAAC,EAAE;AACjC,MAAA,OAAA;AACF,KAAA;AAEA,IAAA,IAAI,CAACT,iBAAiB,CAACK,QAAQ,EAAE;AAC/BL,MAAAA,iBAAiB,CAACM,QAAQ,GAAG,IAAII,OAAO,EAAE,CAAA;MAC1CV,iBAAiB,CAACK,QAAQ,GAAG,IAAIM,cAAc,CAAC,CAACC,OAAO,EAAEP,QAAQ,KAAK;QACrEI,MAAM,CAACI,qBAAqB,CAAC,MAAM;AACjC,UAAA,KAAK,IAAIC,KAAK,IAAIF,OAAO,EAAE;YACzB,MAAMT,OAAO,GAAGH,iBAAiB,CAACM,QAAQ,CAACS,GAAG,CAACD,KAAK,CAACE,MAAM,CAAC,CAAA;AAC5D,YAAA,IAAIb,OAAO,EAAEA,OAAO,CAACW,KAAK,EAAET,QAAQ,CAAC,CAAA;AACvC,WAAA;AACF,SAAC,CAAC,CAAA;AACJ,OAAC,CAAC,CAAA;AACJ,KAAA;AAEAY,IAAAA,kBAAkB,CAAC,IAAI,EAAEC,SAAS,CAAC,CAAA;AACrC,GAAA;AAEAC,EAAAA,MAAMA,CAACjB,OAAO,EAAEkB,UAAU,cAAc;IACtCF,SAAS,CAAC,IAAI,CAAC,CAAA;IAEf,IAAI,CAAChB,OAAO,GAAGA,OAAO,CAAA;AAEtB,IAAA,MAAM,CAACC,OAAO,EAAEC,OAAO,CAAC,GAAGgB,UAAU,CAAA;;AAErC;IACA,IAAI,CAACjB,OAAO,GAAGA,OAAO,CAAA;AACtB,IAAA,IAAI,CAACC,OAAO,GAAGA,OAAO,IAAI,IAAI,CAACA,OAAO,CAAA;IAEtC,IAAI,CAACiB,OAAO,EAAE,CAAA;AAChB,GAAA;AAEAA,EAAAA,OAAOA,GAAG;IACR,IAAIrB,iBAAiB,CAACK,QAAQ,EAAE;MAC9B,IAAI,CAACiB,UAAU,EAAE,CAAA;AACjBtB,MAAAA,iBAAiB,CAACK,QAAQ,CAACgB,OAAO,CAAC,IAAI,CAACnB,OAAO,EAAE,IAAI,CAACE,OAAO,CAAC,CAAA;AAChE,KAAA;AACF,GAAA;AAEAkB,EAAAA,UAAUA,GAAG;AACXtB,IAAAA,iBAAiB,CAACM,QAAQ,CAACiB,GAAG,CAAC,IAAI,CAACrB,OAAO,EAAE,IAAI,CAACC,OAAO,CAAC,CAAA;AAC5D,GAAA;AAEAqB,EAAAA,aAAaA,GAAG;IACdxB,iBAAiB,CAACM,QAAQ,CAACmB,MAAM,CAAC,IAAI,CAACvB,OAAO,CAAC,CAAA;AACjD,GAAA;AACF,CAAA;;AAEA;AACA;AACA;AACA;AACA,SAASgB,SAASA,CAACQ,QAAQ,EAAE;AAC3B,EAAA,IAAIA,QAAQ,CAACxB,OAAO,IAAIF,iBAAiB,CAACK,QAAQ,EAAE;IAClDL,iBAAiB,CAACK,QAAQ,CAACa,SAAS,CAACQ,QAAQ,CAACxB,OAAO,CAAC,CAAA;IACtDwB,QAAQ,CAACF,aAAa,EAAE,CAAA;AAC1B,GAAA;AACF;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ember-resize-modifier",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Resize Modifier for Ember.js Applications using ResizeObserver",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon",
|
|
@@ -8,94 +8,46 @@
|
|
|
8
8
|
"modifiers",
|
|
9
9
|
"resize"
|
|
10
10
|
],
|
|
11
|
-
"repository":
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git@github.com:elwayman02/ember-resize-modifier.git"
|
|
14
|
+
},
|
|
12
15
|
"license": "MIT",
|
|
13
16
|
"author": "Jordan Hawker <hawker.jordan@gmail.com> (http://www.JordanHawker.com)",
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
"scripts": {
|
|
19
|
-
"build": "ember build --environment=production",
|
|
20
|
-
"lint": "concurrently \"npm:lint:*(!fix|css|hbs)\" --names \"lint:\"",
|
|
21
|
-
"lint:css": "stylelint \"**/*.scss\"",
|
|
22
|
-
"lint:css:fix": "concurrently \"npm:lint:css -- --fix\"",
|
|
23
|
-
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
|
|
24
|
-
"lint:hbs": "ember-template-lint .",
|
|
25
|
-
"lint:hbs:fix": "ember-template-lint . --fix",
|
|
26
|
-
"lint:js": "eslint . --cache",
|
|
27
|
-
"lint:js:fix": "eslint . --fix",
|
|
28
|
-
"start": "ember serve",
|
|
29
|
-
"test": "concurrently \"npm:lint\" \"npm:test:*\" --names \"lint,test:\"",
|
|
30
|
-
"test:ember": "ember test",
|
|
31
|
-
"test:ember-compatibility": "ember try:each"
|
|
17
|
+
"exports": {
|
|
18
|
+
".": "./dist/index.js",
|
|
19
|
+
"./*": "./dist/*.js",
|
|
20
|
+
"./addon-main.js": "./addon-main.cjs"
|
|
32
21
|
},
|
|
22
|
+
"files": [
|
|
23
|
+
"addon-main.cjs",
|
|
24
|
+
"declarations",
|
|
25
|
+
"dist"
|
|
26
|
+
],
|
|
33
27
|
"dependencies": {
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"ember-
|
|
37
|
-
"ember-modifier": "^4.1.0"
|
|
28
|
+
"@embroider/addon-shim": "^1.8.7",
|
|
29
|
+
"decorator-transforms": "^2.2.2",
|
|
30
|
+
"ember-modifier": "^4.2.0"
|
|
38
31
|
},
|
|
39
32
|
"devDependencies": {
|
|
40
|
-
"@babel/
|
|
41
|
-
"@babel/
|
|
42
|
-
"@
|
|
43
|
-
"@
|
|
44
|
-
"@
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"ember
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"ember-cli-terser": "^4.0.2",
|
|
59
|
-
"ember-fetch": "^8.1.2",
|
|
60
|
-
"ember-load-initializers": "^2.1.2",
|
|
61
|
-
"ember-page-title": "^8.0.0",
|
|
62
|
-
"ember-qunit": "^7.0.0",
|
|
63
|
-
"ember-resolver": "^11.0.1",
|
|
64
|
-
"ember-sinon-qunit": "^6.0.0",
|
|
65
|
-
"ember-source": "~5.3.0",
|
|
66
|
-
"ember-source-channel-url": "^3.0.0",
|
|
67
|
-
"ember-template-lint": "^5.11.2",
|
|
68
|
-
"ember-try": "^3.0.0",
|
|
69
|
-
"eslint": "^8.51.0",
|
|
70
|
-
"eslint-config-prettier": "^9.0.0",
|
|
71
|
-
"eslint-plugin-ember": "^11.11.1",
|
|
72
|
-
"eslint-plugin-n": "^16.1.0",
|
|
73
|
-
"eslint-plugin-prettier": "^5.0.1",
|
|
74
|
-
"eslint-plugin-qunit": "^8.0.1",
|
|
75
|
-
"field-guide": "^2.4.0",
|
|
76
|
-
"field-guide-default-template": "^3.0.0",
|
|
77
|
-
"loader.js": "^4.7.0",
|
|
78
|
-
"prember": "^2.0.0",
|
|
79
|
-
"prettier": "^3.0.3",
|
|
80
|
-
"qunit": "^2.19.4",
|
|
81
|
-
"qunit-dom": "^2.0.0",
|
|
82
|
-
"release-it": "^15.11.0",
|
|
83
|
-
"release-it-lerna-changelog": "^5.0.0",
|
|
84
|
-
"sass": "^1.69.2",
|
|
85
|
-
"stylelint": "^15.10.3",
|
|
86
|
-
"stylelint-config-standard": "^34.0.0",
|
|
87
|
-
"stylelint-prettier": "^4.0.2",
|
|
88
|
-
"webpack": "^5.88.2"
|
|
89
|
-
},
|
|
90
|
-
"peerDependencies": {
|
|
91
|
-
"ember-source": "^4.0.0 || >=5.0.0"
|
|
92
|
-
},
|
|
93
|
-
"engines": {
|
|
94
|
-
"node": "16.* || >= 18"
|
|
95
|
-
},
|
|
96
|
-
"volta": {
|
|
97
|
-
"node": "18.12.0",
|
|
98
|
-
"yarn": "1.22.19"
|
|
33
|
+
"@babel/core": "^7.25.7",
|
|
34
|
+
"@babel/eslint-parser": "^7.25.7",
|
|
35
|
+
"@babel/runtime": "^7.25.7",
|
|
36
|
+
"@embroider/addon-dev": "^6.0.0",
|
|
37
|
+
"@rollup/plugin-babel": "^6.0.4",
|
|
38
|
+
"babel-plugin-ember-template-compilation": "^2.3.0",
|
|
39
|
+
"concurrently": "^9.0.1",
|
|
40
|
+
"ember-template-lint": "^6.0.0",
|
|
41
|
+
"eslint": "^8.56.0",
|
|
42
|
+
"eslint-config-prettier": "^9.1.0",
|
|
43
|
+
"eslint-plugin-ember": "^12.2.1",
|
|
44
|
+
"eslint-plugin-import": "^2.31.0",
|
|
45
|
+
"eslint-plugin-n": "^17.10.3",
|
|
46
|
+
"eslint-plugin-prettier": "^5.1.3",
|
|
47
|
+
"prettier": "^3.2.5",
|
|
48
|
+
"prettier-plugin-ember-template-tag": "^2.0.2",
|
|
49
|
+
"rollup": "^4.24.0",
|
|
50
|
+
"rollup-plugin-copy": "^3.5.0"
|
|
99
51
|
},
|
|
100
52
|
"publishConfig": {
|
|
101
53
|
"registry": "https://registry.npmjs.org"
|
|
@@ -104,23 +56,22 @@
|
|
|
104
56
|
"edition": "octane"
|
|
105
57
|
},
|
|
106
58
|
"ember-addon": {
|
|
107
|
-
"
|
|
108
|
-
"
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
"plugins": {
|
|
113
|
-
"release-it-lerna-changelog": {
|
|
114
|
-
"infile": "CHANGELOG.md",
|
|
115
|
-
"launchEditor": false
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
"git": {
|
|
119
|
-
"tagName": "v${version}"
|
|
120
|
-
},
|
|
121
|
-
"github": {
|
|
122
|
-
"release": true,
|
|
123
|
-
"tokenRef": "GITHUB_AUTH"
|
|
59
|
+
"version": 2,
|
|
60
|
+
"type": "addon",
|
|
61
|
+
"main": "addon-main.cjs",
|
|
62
|
+
"app-js": {
|
|
63
|
+
"./modifiers/did-resize.js": "./dist/_app_/modifiers/did-resize.js"
|
|
124
64
|
}
|
|
65
|
+
},
|
|
66
|
+
"scripts": {
|
|
67
|
+
"build": "rollup --config",
|
|
68
|
+
"lint": "concurrently 'pnpm:lint:*(!fix)' --names 'lint:'",
|
|
69
|
+
"lint:fix": "concurrently 'pnpm:lint:*:fix' --names 'fix:'",
|
|
70
|
+
"lint:hbs": "ember-template-lint . --no-error-on-unmatched-pattern",
|
|
71
|
+
"lint:hbs:fix": "ember-template-lint . --fix --no-error-on-unmatched-pattern",
|
|
72
|
+
"lint:js": "eslint . --cache",
|
|
73
|
+
"lint:js:fix": "eslint . --fix",
|
|
74
|
+
"start": "rollup --config --watch",
|
|
75
|
+
"test": "echo 'A v2 addon does not have tests, run tests in test-app'"
|
|
125
76
|
}
|
|
126
|
-
}
|
|
77
|
+
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
## v0.7.1 (2023-10-11)
|
|
2
|
-
|
|
3
|
-
#### :boom: Breaking Change
|
|
4
|
-
* [#821](https://github.com/elwayman02/ember-resize-modifier/pull/821) Ember 5 Dependencies + Drop 3.28 Support ([@elwayman02](https://github.com/elwayman02))
|
|
5
|
-
* [#822](https://github.com/elwayman02/ember-resize-modifier/pull/822) Ember 5 Partial Update + Drop Node 14 Support ([@elwayman02](https://github.com/elwayman02))
|
|
6
|
-
|
|
7
|
-
#### :rocket: Enhancement
|
|
8
|
-
* [#811](https://github.com/elwayman02/ember-resize-modifier/pull/811) Add ember-source 5 support ([@hexadecy](https://github.com/hexadecy))
|
|
9
|
-
|
|
10
|
-
#### :bug: Bug Fix
|
|
11
|
-
* [#817](https://github.com/elwayman02/ember-resize-modifier/pull/817) Embroider compatible with dynamic components ([@hexadecy](https://github.com/hexadecy))
|
|
12
|
-
|
|
13
|
-
#### :house: Internal
|
|
14
|
-
* [#821](https://github.com/elwayman02/ember-resize-modifier/pull/821) Ember 5 Dependencies + Drop 3.28 Support ([@elwayman02](https://github.com/elwayman02))
|
|
15
|
-
* [#822](https://github.com/elwayman02/ember-resize-modifier/pull/822) Ember 5 Partial Update + Drop Node 14 Support ([@elwayman02](https://github.com/elwayman02))
|
|
16
|
-
* [#820](https://github.com/elwayman02/ember-resize-modifier/pull/820) prettier v3 ([@elwayman02](https://github.com/elwayman02))
|
|
17
|
-
* [#818](https://github.com/elwayman02/ember-resize-modifier/pull/818) ember-try v3 ([@elwayman02](https://github.com/elwayman02))
|
|
18
|
-
* [#817](https://github.com/elwayman02/ember-resize-modifier/pull/817) Embroider compatible with dynamic components ([@hexadecy](https://github.com/hexadecy))
|
|
19
|
-
|
|
20
|
-
#### Committers: 3
|
|
21
|
-
- Jordan Hawker ([@elwayman02](https://github.com/elwayman02))
|
|
22
|
-
- Michel Couillard ([@hexadecy](https://github.com/hexadecy))
|
|
23
|
-
- Patrick Pircher ([@patricklx](https://github.com/patricklx))
|
|
24
|
-
|
|
25
|
-
## v0.6.0 (2023-01-04)
|
|
26
|
-
|
|
27
|
-
#### :boom: Breaking Change
|
|
28
|
-
* [#632](https://github.com/elwayman02/ember-resize-modifier/pull/632) [skip netlify]: Bump ember-modifier from 3.2.7 to 4.0.0 ([@dependabot[bot]](https://github.com/apps/dependabot))
|
|
29
|
-
* [#648](https://github.com/elwayman02/ember-resize-modifier/pull/648) Move ember-auto-import v2 to dep ([@elwayman02](https://github.com/elwayman02))
|
|
30
|
-
|
|
31
|
-
#### Committers: 1
|
|
32
|
-
- Jordan Hawker ([@elwayman02](https://github.com/elwayman02))
|
|
33
|
-
|
|
34
|
-
## v0.5.0 (2022-12-08)
|
|
35
|
-
|
|
36
|
-
#### :boom: Breaking Change
|
|
37
|
-
* [#625](https://github.com/elwayman02/ember-resize-modifier/pull/625) Ember 4.9 Upgrade ([@elwayman02](https://github.com/elwayman02))
|
|
38
|
-
|
|
39
|
-
#### :house: Internal
|
|
40
|
-
* [#625](https://github.com/elwayman02/ember-resize-modifier/pull/625) Ember 4.9 Upgrade ([@elwayman02](https://github.com/elwayman02))
|
|
41
|
-
* [#623](https://github.com/elwayman02/ember-resize-modifier/pull/623) ESLint v8 Upgrade ([@elwayman02](https://github.com/elwayman02))
|
|
42
|
-
|
|
43
|
-
#### Committers: 1
|
|
44
|
-
- Jordan Hawker ([@elwayman02](https://github.com/elwayman02))
|
|
45
|
-
|
|
46
|
-
## v0.4.1 (2022-05-13)
|
|
47
|
-
|
|
48
|
-
#### :rocket: Enhancement
|
|
49
|
-
* [#514](https://github.com/elwayman02/ember-resize-modifier/pull/514) Performance: avoid creating callbacks for the destructor ([@chriskrycho](https://github.com/chriskrycho))
|
|
50
|
-
|
|
51
|
-
#### :bug: Bug Fix
|
|
52
|
-
* [#515](https://github.com/elwayman02/ember-resize-modifier/pull/515) Require ember-modifier@^3.2 ([@chriskrycho](https://github.com/chriskrycho))
|
|
53
|
-
|
|
54
|
-
#### :house: Internal
|
|
55
|
-
* [#514](https://github.com/elwayman02/ember-resize-modifier/pull/514) Performance: avoid creating callbacks for the destructor ([@chriskrycho](https://github.com/chriskrycho))
|
|
56
|
-
|
|
57
|
-
#### Committers: 1
|
|
58
|
-
- Chris Krycho ([@chriskrycho](https://github.com/chriskrycho))
|
|
59
|
-
|
|
60
|
-
## v0.4.0 (2022-05-13)
|
|
61
|
-
|
|
62
|
-
#### :boom: Breaking Change
|
|
63
|
-
* [#506](https://github.com/elwayman02/ember-resize-modifier/pull/506) Update ember-modifier to v3 ([@BnitoBzh](https://github.com/BnitoBzh))
|
|
64
|
-
|
|
65
|
-
#### :house: Internal
|
|
66
|
-
* [#506](https://github.com/elwayman02/ember-resize-modifier/pull/506) Update ember-modifier to v3 ([@BnitoBzh](https://github.com/BnitoBzh))
|
|
67
|
-
|
|
68
|
-
#### Committers: 2
|
|
69
|
-
- Jordan Hawker ([@elwayman02](https://github.com/elwayman02))
|
|
70
|
-
- [@BnitoBzh](https://github.com/BnitoBzh)
|
|
71
|
-
|
|
72
|
-
## v0.3.0 (2021-10-11)
|
|
73
|
-
|
|
74
|
-
#### :boom: Breaking Change
|
|
75
|
-
* [#377](https://github.com/elwayman02/ember-resize-modifier/pull/377) Ember 3.28 Upgrade ([@elwayman02](https://github.com/elwayman02))
|
|
76
|
-
|
|
77
|
-
#### :house: Internal
|
|
78
|
-
* [#377](https://github.com/elwayman02/ember-resize-modifier/pull/377) Ember 3.28 Upgrade ([@elwayman02](https://github.com/elwayman02))
|
|
79
|
-
|
|
80
|
-
#### Committers: 3
|
|
81
|
-
- Jordan Hawker ([@elwayman02](https://github.com/elwayman02))
|
|
82
|
-
- Tamas Sule ([@xjmdoo](https://github.com/xjmdoo))
|
|
83
|
-
- [@dependabot-preview[bot]](https://github.com/apps/dependabot-preview)
|
|
84
|
-
|
|
85
|
-
## v0.2.0 (2021-03-03)
|
|
86
|
-
|
|
87
|
-
#### :rocket: Enhancement
|
|
88
|
-
* [#222](https://github.com/elwayman02/ember-resize-modifier/pull/222) Use single ResizeObserver for better performance ([@xjmdoo](https://github.com/xjmdoo))
|
|
89
|
-
|
|
90
|
-
#### Committers: 3
|
|
91
|
-
- Jordan Hawker ([@elwayman02](https://github.com/elwayman02))
|
|
92
|
-
- Tamas Sule ([@xjmdoo](https://github.com/xjmdoo))
|
|
93
|
-
- [@dependabot-preview[bot]](https://github.com/apps/dependabot-preview)
|
|
94
|
-
|
|
95
|
-
## v0.1.0 (2021-01-07)
|
|
96
|
-
|
|
97
|
-
#### :memo: Documentation
|
|
98
|
-
* [#29](https://github.com/elwayman02/ember-resize-modifier/pull/29) Add fastboot & prember to allow direct linking to non-index routes ([@elwayman02](https://github.com/elwayman02))
|
|
99
|
-
|
|
100
|
-
#### :house: Internal
|
|
101
|
-
* [#178](https://github.com/elwayman02/ember-resize-modifier/pull/178) Update to 3.24 Blueprint ([@elwayman02](https://github.com/elwayman02))
|
|
102
|
-
* [#174](https://github.com/elwayman02/ember-resize-modifier/pull/174) Switch from Travis to GitHub Actions ([@elwayman02](https://github.com/elwayman02))
|
|
103
|
-
|
|
104
|
-
#### Committers: 3
|
|
105
|
-
- Chris Manson ([@mansona](https://github.com/mansona))
|
|
106
|
-
- Jordan Hawker ([@elwayman02](https://github.com/elwayman02))
|
|
107
|
-
- [@dependabot-preview[bot]](https://github.com/apps/dependabot-preview)
|
|
108
|
-
|
|
109
|
-
## v0.0.2 (2020-05-12)
|
|
110
|
-
|
|
111
|
-
#### :memo: Documentation
|
|
112
|
-
* [#24](https://github.com/elwayman02/ember-resize-modifier/pull/24) Add install instructions to docs ([@elwayman02](https://github.com/elwayman02))
|
|
113
|
-
|
|
114
|
-
#### :house: Internal
|
|
115
|
-
* [#25](https://github.com/elwayman02/ember-resize-modifier/pull/25) did-resize Refactoring ([@elwayman02](https://github.com/elwayman02))
|
|
116
|
-
* [#22](https://github.com/elwayman02/ember-resize-modifier/pull/22) Set launchEditor to false ([@elwayman02](https://github.com/elwayman02))
|
|
117
|
-
|
|
118
|
-
#### Committers: 2
|
|
119
|
-
- Jordan Hawker ([@elwayman02](https://github.com/elwayman02))
|
|
120
|
-
- [@dependabot-preview[bot]](https://github.com/apps/dependabot-preview)
|
|
121
|
-
|
|
122
|
-
## v0.0.1 (2020-05-11)
|
|
123
|
-
|
|
124
|
-
#### :rocket: Enhancement
|
|
125
|
-
* [#10](https://github.com/elwayman02/ember-resize-modifier/pull/10) Support options hash ([@elwayman02](https://github.com/elwayman02))
|
|
126
|
-
* [#5](https://github.com/elwayman02/ember-resize-modifier/pull/5) Add did-resize modifier ([@elwayman02](https://github.com/elwayman02))
|
|
127
|
-
|
|
128
|
-
#### :bug: Bug Fix
|
|
129
|
-
* [#17](https://github.com/elwayman02/ember-resize-modifier/pull/17) Call setupSinon in test-helper.js ([@elwayman02](https://github.com/elwayman02))
|
|
130
|
-
* [#14](https://github.com/elwayman02/ember-resize-modifier/pull/14) Test fallback ([@elwayman02](https://github.com/elwayman02))
|
|
131
|
-
|
|
132
|
-
#### :memo: Documentation
|
|
133
|
-
* [#13](https://github.com/elwayman02/ember-resize-modifier/pull/13) Fix Doc Typo ([@elwayman02](https://github.com/elwayman02))
|
|
134
|
-
* [#12](https://github.com/elwayman02/ember-resize-modifier/pull/12) Add notice about browser fallback ([@elwayman02](https://github.com/elwayman02))
|
|
135
|
-
* [#11](https://github.com/elwayman02/ember-resize-modifier/pull/11) Add a title to the dummy page ([@elwayman02](https://github.com/elwayman02))
|
|
136
|
-
* [#10](https://github.com/elwayman02/ember-resize-modifier/pull/10) Support options hash ([@elwayman02](https://github.com/elwayman02))
|
|
137
|
-
* [#4](https://github.com/elwayman02/ember-resize-modifier/pull/4) Package and README updates ([@elwayman02](https://github.com/elwayman02))
|
|
138
|
-
* [#3](https://github.com/elwayman02/ember-resize-modifier/pull/3) Basic field-guide scaffolding ([@elwayman02](https://github.com/elwayman02))
|
|
139
|
-
|
|
140
|
-
#### :house: Internal
|
|
141
|
-
* [#17](https://github.com/elwayman02/ember-resize-modifier/pull/17) Call setupSinon in test-helper.js ([@elwayman02](https://github.com/elwayman02))
|
|
142
|
-
* [#15](https://github.com/elwayman02/ember-resize-modifier/pull/15) Add `options` to public API more clearly ([@elwayman02](https://github.com/elwayman02))
|
|
143
|
-
* [#14](https://github.com/elwayman02/ember-resize-modifier/pull/14) Test fallback ([@elwayman02](https://github.com/elwayman02))
|
|
144
|
-
* [#9](https://github.com/elwayman02/ember-resize-modifier/pull/9) Add travis build status ([@elwayman02](https://github.com/elwayman02))
|
|
145
|
-
* [#6](https://github.com/elwayman02/ember-resize-modifier/pull/6) Add dependabot config ([@elwayman02](https://github.com/elwayman02))
|
|
146
|
-
* [#4](https://github.com/elwayman02/ember-resize-modifier/pull/4) Package and README updates ([@elwayman02](https://github.com/elwayman02))
|
|
147
|
-
* [#2](https://github.com/elwayman02/ember-resize-modifier/pull/2) Include Ember 3.8 in ember-try config ([@elwayman02](https://github.com/elwayman02))
|
|
148
|
-
* [#1](https://github.com/elwayman02/ember-resize-modifier/pull/1) Release-it config via create-rwjblue-release-it-setup ([@elwayman02](https://github.com/elwayman02))
|
|
149
|
-
|
|
150
|
-
#### Committers: 2
|
|
151
|
-
- Jordan Hawker ([@elwayman02](https://github.com/elwayman02))
|
|
152
|
-
- [@dependabot-preview[bot]](https://github.com/apps/dependabot-preview)
|
|
153
|
-
|
|
154
|
-
|
package/RELEASE.md
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
# Release
|
|
2
|
-
|
|
3
|
-
Releases are mostly automated using
|
|
4
|
-
[release-it](https://github.com/release-it/release-it/) and
|
|
5
|
-
[lerna-changelog](https://github.com/lerna/lerna-changelog/).
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
## Preparation
|
|
9
|
-
|
|
10
|
-
Since the majority of the actual release process is automated, the primary
|
|
11
|
-
remaining task prior to releasing is confirming that all pull requests that
|
|
12
|
-
have been merged since the last release have been labeled with the appropriate
|
|
13
|
-
`lerna-changelog` labels and the titles have been updated to ensure they
|
|
14
|
-
represent something that would make sense to our users. Some great information
|
|
15
|
-
on why this is important can be found at
|
|
16
|
-
[keepachangelog.com](https://keepachangelog.com/en/1.0.0/), but the overall
|
|
17
|
-
guiding principle here is that changelogs are for humans, not machines.
|
|
18
|
-
|
|
19
|
-
When reviewing merged PR's the labels to be used are:
|
|
20
|
-
|
|
21
|
-
* breaking - Used when the PR is considered a breaking change.
|
|
22
|
-
* enhancement - Used when the PR adds a new feature or enhancement.
|
|
23
|
-
* bug - Used when the PR fixes a bug included in a previous release.
|
|
24
|
-
* documentation - Used when the PR adds or updates documentation.
|
|
25
|
-
* internal - Used for internal changes that still require a mention in the
|
|
26
|
-
changelog/release notes.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
## Release
|
|
30
|
-
|
|
31
|
-
Once the prep work is completed, the actual release is straight forward:
|
|
32
|
-
|
|
33
|
-
* First ensure that you have `release-it` installed globally, generally done by
|
|
34
|
-
using one of the following commands:
|
|
35
|
-
|
|
36
|
-
```
|
|
37
|
-
# using https://volta.sh
|
|
38
|
-
volta install release-it
|
|
39
|
-
|
|
40
|
-
# using Yarn
|
|
41
|
-
yarn global add release-it
|
|
42
|
-
|
|
43
|
-
# using npm
|
|
44
|
-
npm install --global release-it
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
* Second, ensure that you have installed your projects dependencies:
|
|
48
|
-
|
|
49
|
-
```
|
|
50
|
-
yarn install
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
* And last (but not least 😁) do your release. It requires a
|
|
54
|
-
[GitHub personal access token](https://github.com/settings/tokens) as
|
|
55
|
-
`$GITHUB_AUTH` environment variable. Only "repo" access is needed; no "admin"
|
|
56
|
-
or other scopes are required.
|
|
57
|
-
|
|
58
|
-
```
|
|
59
|
-
export GITHUB_AUTH="f941e0..."
|
|
60
|
-
release-it
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
[release-it](https://github.com/release-it/release-it/) manages the actual
|
|
64
|
-
release process. It will prompt you to to choose the version number after which
|
|
65
|
-
you will have the chance to hand tweak the changelog to be used (for the
|
|
66
|
-
`CHANGELOG.md` and GitHub release), then `release-it` continues on to tagging,
|
|
67
|
-
pushing the tag and commits, etc.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from 'ember-resize-modifier/modifiers/did-resize';
|
package/docs/index.md
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# Ember-Resize-Modifier
|
|
2
|
-
|
|
3
|
-
This addon provides a [`did-resize`](modifiers/did-resize) modifier for detecting
|
|
4
|
-
resize events on the element or component it's attached to. These events could include window resizing
|
|
5
|
-
CSS changes, content updates, and more!
|
|
6
|
-
|
|
7
|
-
## Installation
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
ember install ember-resize-modifier
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Browser Support
|
|
14
|
-
|
|
15
|
-
Our features are [supported](https://caniuse.com/#search=resizeobserver) in the latest versions of every browser except IE 11.
|
|
16
|
-
The previous version of Safari (13), also does not support this feature, but it's supported in 13.1.
|
|
17
|
-
MDN actually lists ResizeObserverEntry as [unsupported by Safari](https://caniuse.com/#feat=mdn-api_resizeobserverentry) altogether,
|
|
18
|
-
but this is incorrect and we have logged an issue with MDN to fix their data. We have tested this in
|
|
19
|
-
the latest Safari and confirmed that it in fact works as expected.
|
|
20
|
-
|
|
21
|
-
In browsers where ResizeObserver is not supported, this modifier becomes a no-op. It will not error,
|
|
22
|
-
nor will it employ a fallback. Features built with this addon will simply gracefully not respond to resize events.
|
|
23
|
-
|
|
24
|
-
[](https://www.netlify.com)
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import Component from '@glimmer/component';
|
|
2
|
-
import { tracked } from '@glimmer/tracking';
|
|
3
|
-
import { action } from '@ember/object';
|
|
4
|
-
|
|
5
|
-
export default class EsButtonComponent extends Component {
|
|
6
|
-
@tracked count = 0;
|
|
7
|
-
|
|
8
|
-
@action
|
|
9
|
-
onResize() {
|
|
10
|
-
this.count++;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
# did-resize
|
|
2
|
-
|
|
3
|
-
This modifier triggers a callback when resize events are observed on the target element.
|
|
4
|
-
|
|
5
|
-
## Basic Usage
|
|
6
|
-
|
|
7
|
-
A callback handler is always expected to be passed to `did-resize`:
|
|
8
|
-
|
|
9
|
-
```handlebars{data-execute=false}
|
|
10
|
-
<div {{did-resize this.onResize}}></div>
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
The handler will be called with an instance of [ResizeObserverEntry](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserverEntry)
|
|
14
|
-
and the [ResizeObserver](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/ResizeObserver) instance itself:
|
|
15
|
-
|
|
16
|
-
```javascript
|
|
17
|
-
onResize(entry, observer) {
|
|
18
|
-
// do something
|
|
19
|
-
}
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
Here is an example of using the `did-resize` modifier to increment a counter every time the containing `<div>` has been resized:
|
|
23
|
-
|
|
24
|
-
```handlebars
|
|
25
|
-
<div {{did-resize this.onResize}}>I have been resized {{this.count}} times!</div>
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## Advanced Usage
|
|
29
|
-
|
|
30
|
-
`did-resize` also supports passing an `options` hash into ResizeObserver:
|
|
31
|
-
|
|
32
|
-
```handlebars{data-execute=false}
|
|
33
|
-
<div {{did-resize this.onResize this.options}}></div>
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
The options supported are documented under [ResizeObserver.observe](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/observe).
|
package/index.js
DELETED