ember-style-modifier 0.8.0 → 1.0.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/README.md +31 -4
- package/package.json +25 -27
- package/.github/workflows/ci.yml +0 -226
- package/.release-it.json +0 -14
- package/renovate.json +0 -6
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# ember-style-modifier
|
|
2
2
|
|
|
3
|
-
[](https://github.com/jelhan/ember-style-modifier/actions?query=workflow%3ACI)
|
|
4
4
|
[](http://emberobserver.com/addons/ember-style-modifier)
|
|
5
5
|
[](https://badge.fury.io/js/ember-style-modifier)
|
|
6
6
|
|
|
@@ -9,9 +9,9 @@ This allows to set custom CSS of an element without requiring a [Content Securit
|
|
|
9
9
|
|
|
10
10
|
## Compatibility
|
|
11
11
|
|
|
12
|
-
* Ember.js v3.
|
|
13
|
-
* Ember CLI v3.
|
|
14
|
-
* Node.js
|
|
12
|
+
* Ember.js v3.28 or above
|
|
13
|
+
* Ember CLI v3.28 or above
|
|
14
|
+
* Node.js v14 or above
|
|
15
15
|
|
|
16
16
|
## Installation
|
|
17
17
|
|
|
@@ -50,6 +50,33 @@ arguments declare same property, named argument wins.
|
|
|
50
50
|
|
|
51
51
|
Adding styles to pseudo-elements is not supported.
|
|
52
52
|
|
|
53
|
+
## Known limitations
|
|
54
|
+
|
|
55
|
+
Ember Style Modifier suffers from two known limitations of Modifiers
|
|
56
|
+
in Ember. Both need to be addressed by extending modifiers capabilities.
|
|
57
|
+
Doing so, is discussed in a [RFC issue](https://github.com/emberjs/rfcs/issues/652).
|
|
58
|
+
|
|
59
|
+
### Server-side rendering is not supported
|
|
60
|
+
|
|
61
|
+
Modifiers do not run in server-side rendering (SSR). Styles set using
|
|
62
|
+
`ember-style-modifier` are therefore _not_ applied if application is
|
|
63
|
+
run with [FastBoot](http://ember-fastboot.com/) or prerendered using
|
|
64
|
+
[Prember](https://github.com/ef4/prember). This may lead to wrong
|
|
65
|
+
layout _before_ rehydration and layout shifts on rehydration.
|
|
66
|
+
|
|
67
|
+
### Browser may paint the element twice on initial render
|
|
68
|
+
|
|
69
|
+
Modifiers run _after_ browser has printed the page. If styles are
|
|
70
|
+
applied to an elements immediately, the browser first renders the
|
|
71
|
+
element _without_ those styles applied and immediately afterwards
|
|
72
|
+
with these styles applied.
|
|
73
|
+
|
|
74
|
+
This may theoretically cause the experience of a flickering user
|
|
75
|
+
interface. But such a case has not been noticed yet in practice.
|
|
76
|
+
|
|
77
|
+
Rendering the element twice has a performance impact. But it should
|
|
78
|
+
not have any noticeable impact in practice.
|
|
79
|
+
|
|
53
80
|
## Contributing
|
|
54
81
|
|
|
55
82
|
See the [Contributing](CONTRIBUTING.md) guide for details.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ember-style-modifier",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "{{style}} modifier to set an element's style using the CSSStyleDeclaration API.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon"
|
|
@@ -27,53 +27,51 @@
|
|
|
27
27
|
"test:ember-compatibility": "ember try:each"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"ember-cli-babel": "^7.26.
|
|
30
|
+
"ember-cli-babel": "^7.26.11",
|
|
31
31
|
"ember-modifier": "^3.2.7"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@ember/optional-features": "^2.0.0",
|
|
35
|
-
"@ember/test-helpers": "^2.
|
|
36
|
-
"@embroider/test-setup": "^1.
|
|
37
|
-
"@glimmer/component": "^1.
|
|
38
|
-
"@glimmer/tracking": "^1.
|
|
35
|
+
"@ember/test-helpers": "^2.8.1",
|
|
36
|
+
"@embroider/test-setup": "^1.8.3",
|
|
37
|
+
"@glimmer/component": "^1.1.2",
|
|
38
|
+
"@glimmer/tracking": "^1.1.2",
|
|
39
39
|
"babel-eslint": "^10.1.0",
|
|
40
40
|
"broccoli-asset-rev": "^3.0.0",
|
|
41
|
-
"ember-auto-import": "^2.2
|
|
42
|
-
"ember-cli": "~4.
|
|
43
|
-
"ember-cli-content-security-policy": "^2.0.
|
|
44
|
-
"ember-cli-dependency-checker": "^3.
|
|
45
|
-
"ember-cli-htmlbars": "^6.
|
|
41
|
+
"ember-auto-import": "^2.4.2",
|
|
42
|
+
"ember-cli": "~4.7.0",
|
|
43
|
+
"ember-cli-content-security-policy": "^2.0.3",
|
|
44
|
+
"ember-cli-dependency-checker": "^3.3.1",
|
|
45
|
+
"ember-cli-htmlbars": "^6.1.0",
|
|
46
46
|
"ember-cli-inject-live-reload": "^2.1.0",
|
|
47
47
|
"ember-cli-sri": "^2.1.1",
|
|
48
48
|
"ember-cli-terser": "^4.0.2",
|
|
49
49
|
"ember-disable-prototype-extensions": "^1.1.3",
|
|
50
|
-
"ember-export-application-global": "^2.0.1",
|
|
51
50
|
"ember-load-initializers": "^2.1.2",
|
|
52
|
-
"ember-maybe-import-regenerator": "^1.0.0",
|
|
53
51
|
"ember-page-title": "^7.0.0",
|
|
54
|
-
"ember-qunit": "^
|
|
55
|
-
"ember-resolver": "^8.0.
|
|
56
|
-
"ember-source": "~
|
|
52
|
+
"ember-qunit": "^6.0.0",
|
|
53
|
+
"ember-resolver": "^8.0.3",
|
|
54
|
+
"ember-source": "~4.7.0",
|
|
57
55
|
"ember-source-channel-url": "^3.0.0",
|
|
58
|
-
"ember-template-lint": "^
|
|
56
|
+
"ember-template-lint": "^4.14.0",
|
|
59
57
|
"ember-try": "^2.0.0",
|
|
60
58
|
"eslint": "^7.32.0",
|
|
61
|
-
"eslint-config-prettier": "^8.
|
|
62
|
-
"eslint-plugin-ember": "^
|
|
59
|
+
"eslint-config-prettier": "^8.5.0",
|
|
60
|
+
"eslint-plugin-ember": "^11.0.6",
|
|
63
61
|
"eslint-plugin-node": "^11.1.0",
|
|
64
|
-
"eslint-plugin-prettier": "^4.
|
|
65
|
-
"eslint-plugin-qunit": "^7.
|
|
62
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
63
|
+
"eslint-plugin-qunit": "^7.3.1",
|
|
66
64
|
"loader.js": "^4.7.0",
|
|
67
65
|
"npm-run-all": "^4.1.5",
|
|
68
|
-
"prettier": "^2.
|
|
69
|
-
"qunit": "^2.
|
|
66
|
+
"prettier": "^2.7.1",
|
|
67
|
+
"qunit": "^2.19.1",
|
|
70
68
|
"qunit-dom": "^2.0.0",
|
|
71
|
-
"release-it": "^
|
|
72
|
-
"release-it-lerna-changelog": "^
|
|
73
|
-
"webpack": "^5.
|
|
69
|
+
"release-it": "^15.0.0",
|
|
70
|
+
"release-it-lerna-changelog": "^5.0.0",
|
|
71
|
+
"webpack": "^5.74.0"
|
|
74
72
|
},
|
|
75
73
|
"engines": {
|
|
76
|
-
"node": "
|
|
74
|
+
"node": "14.* || >= 16"
|
|
77
75
|
},
|
|
78
76
|
"publishConfig": {
|
|
79
77
|
"registry": "https://registry.npmjs.org"
|
package/.github/workflows/ci.yml
DELETED
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
# This file was autogenerated by create-github-actions-setup-for-ember-addons.
|
|
2
|
-
#
|
|
3
|
-
# You can upgrade the GitHub Actions workflow to the latest blueprints used
|
|
4
|
-
# by Create GitHub Actions setup for Ember Addons by running it again:
|
|
5
|
-
#
|
|
6
|
-
# - `yarn create github-actions-setup-for-ember-addons` if using yarn and
|
|
7
|
-
# - `npm init github-actions-setup-for-ember-addons` if using NPM.
|
|
8
|
-
#
|
|
9
|
-
# See https://github.com/jelhan/create-github-actions-setup-for-ember-addon for
|
|
10
|
-
# details.
|
|
11
|
-
#
|
|
12
|
-
# The following lines contain the configuration used in the last run. Please do
|
|
13
|
-
# not change them. Doing so could break upgrade flow.
|
|
14
|
-
#
|
|
15
|
-
#$ browsers:
|
|
16
|
-
#$ - chrome
|
|
17
|
-
#$ emberTryScenarios:
|
|
18
|
-
#$ - scenario: ember-lts-3.24
|
|
19
|
-
#$ - scenario: ember-lts-3.28
|
|
20
|
-
#$ - scenario: ember-release
|
|
21
|
-
#$ - scenario: ember-beta
|
|
22
|
-
#$ - scenario: ember-canary
|
|
23
|
-
#$ - scenario: ember-default-with-jquery
|
|
24
|
-
#$ - scenario: ember-classic
|
|
25
|
-
#$ - scenario: no-deprecations
|
|
26
|
-
#$ - scenario: ember-release-no-deprecations
|
|
27
|
-
#$ - scenario: embroider-safe
|
|
28
|
-
#$ - scenario: embroider-optimized
|
|
29
|
-
#$ nodeVersion: 12.x
|
|
30
|
-
#$ packageManager: yarn
|
|
31
|
-
#
|
|
32
|
-
|
|
33
|
-
name: CI
|
|
34
|
-
|
|
35
|
-
on:
|
|
36
|
-
push:
|
|
37
|
-
branches:
|
|
38
|
-
- master
|
|
39
|
-
pull_request:
|
|
40
|
-
|
|
41
|
-
env:
|
|
42
|
-
NODE_VERSION: '12.x'
|
|
43
|
-
|
|
44
|
-
jobs:
|
|
45
|
-
lint:
|
|
46
|
-
name: Lint
|
|
47
|
-
runs-on: ubuntu-latest
|
|
48
|
-
steps:
|
|
49
|
-
- uses: actions/checkout@v3
|
|
50
|
-
with:
|
|
51
|
-
fetch-depth: 1
|
|
52
|
-
|
|
53
|
-
- uses: actions/setup-node@v2-beta
|
|
54
|
-
with:
|
|
55
|
-
node-version: '${{ env.NODE_VERSION }}'
|
|
56
|
-
|
|
57
|
-
- name: Get package manager's global cache path
|
|
58
|
-
id: global-cache-dir-path
|
|
59
|
-
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
60
|
-
|
|
61
|
-
- name: Cache package manager's global cache and node_modules
|
|
62
|
-
id: cache-dependencies
|
|
63
|
-
uses: actions/cache@v3
|
|
64
|
-
with:
|
|
65
|
-
path: |
|
|
66
|
-
${{ steps.global-cache-dir-path.outputs.dir }}
|
|
67
|
-
node_modules
|
|
68
|
-
key: ${{ runner.os }}-${{ matrix.node-version }}-${{
|
|
69
|
-
hashFiles('**/yarn.lock'
|
|
70
|
-
) }}
|
|
71
|
-
restore-keys: |
|
|
72
|
-
${{ runner.os }}-${{ matrix.node-version }}-
|
|
73
|
-
|
|
74
|
-
- name: Install Dependencies
|
|
75
|
-
run: yarn install --frozen-lockfile
|
|
76
|
-
if: |
|
|
77
|
-
steps.cache-dependencies.outputs.cache-hit != 'true'
|
|
78
|
-
|
|
79
|
-
- name: Lint
|
|
80
|
-
run: yarn lint
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
test:
|
|
84
|
-
name: Tests
|
|
85
|
-
runs-on: ${{ matrix.os }}
|
|
86
|
-
needs: lint
|
|
87
|
-
|
|
88
|
-
strategy:
|
|
89
|
-
matrix:
|
|
90
|
-
os: [ubuntu-latest]
|
|
91
|
-
browser: [chrome]
|
|
92
|
-
|
|
93
|
-
steps:
|
|
94
|
-
- uses: actions/checkout@v3
|
|
95
|
-
with:
|
|
96
|
-
fetch-depth: 1
|
|
97
|
-
|
|
98
|
-
- uses: actions/setup-node@v2-beta
|
|
99
|
-
with:
|
|
100
|
-
node-version: '${{ env.NODE_VERSION }}'
|
|
101
|
-
|
|
102
|
-
- name: Get package manager's global cache path
|
|
103
|
-
id: global-cache-dir-path
|
|
104
|
-
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
105
|
-
|
|
106
|
-
- name: Cache package manager's global cache and node_modules
|
|
107
|
-
id: cache-dependencies
|
|
108
|
-
uses: actions/cache@v3
|
|
109
|
-
with:
|
|
110
|
-
path: |
|
|
111
|
-
${{ steps.global-cache-dir-path.outputs.dir }}
|
|
112
|
-
node_modules
|
|
113
|
-
key: ${{ runner.os }}-${{ matrix.node-version }}-${{
|
|
114
|
-
hashFiles('**/yarn.lock'
|
|
115
|
-
) }}
|
|
116
|
-
restore-keys: |
|
|
117
|
-
${{ runner.os }}-${{ matrix.node-version }}-
|
|
118
|
-
|
|
119
|
-
- name: Install Dependencies
|
|
120
|
-
run: yarn install --frozen-lockfile
|
|
121
|
-
if: |
|
|
122
|
-
steps.cache-dependencies.outputs.cache-hit != 'true'
|
|
123
|
-
|
|
124
|
-
- name: Test
|
|
125
|
-
run: yarn test:ember --launch ${{ matrix.browser }}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
floating-dependencies:
|
|
129
|
-
name: Floating Dependencies
|
|
130
|
-
runs-on: ${{ matrix.os }}
|
|
131
|
-
needs: lint
|
|
132
|
-
|
|
133
|
-
strategy:
|
|
134
|
-
matrix:
|
|
135
|
-
os: [ubuntu-latest]
|
|
136
|
-
browser: [chrome]
|
|
137
|
-
|
|
138
|
-
steps:
|
|
139
|
-
- uses: actions/checkout@v3
|
|
140
|
-
with:
|
|
141
|
-
fetch-depth: 1
|
|
142
|
-
|
|
143
|
-
- uses: actions/setup-node@v2-beta
|
|
144
|
-
with:
|
|
145
|
-
node-version: '${{ env.NODE_VERSION }}'
|
|
146
|
-
|
|
147
|
-
- name: Get package manager's global cache path
|
|
148
|
-
id: global-cache-dir-path
|
|
149
|
-
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
150
|
-
|
|
151
|
-
- name: Cache package manager's global cache and node_modules
|
|
152
|
-
id: cache-dependencies
|
|
153
|
-
uses: actions/cache@v3
|
|
154
|
-
with:
|
|
155
|
-
path: |
|
|
156
|
-
${{ steps.global-cache-dir-path.outputs.dir }}
|
|
157
|
-
node_modules
|
|
158
|
-
key: ${{ runner.os }}-${{ matrix.node-version }}-floating-deps
|
|
159
|
-
restore-keys: |
|
|
160
|
-
${{ runner.os }}-${{ matrix.node-version }}-
|
|
161
|
-
|
|
162
|
-
- name: Install Dependencies
|
|
163
|
-
run: yarn install --no-lockfile --non-interactive
|
|
164
|
-
|
|
165
|
-
- name: Test
|
|
166
|
-
run: yarn test:ember --launch ${{ matrix.browser }}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
try-scenarios:
|
|
170
|
-
name: Tests - ${{ matrix.ember-try-scenario }}
|
|
171
|
-
runs-on: ubuntu-latest
|
|
172
|
-
continue-on-error: true
|
|
173
|
-
needs: test
|
|
174
|
-
|
|
175
|
-
strategy:
|
|
176
|
-
fail-fast: true
|
|
177
|
-
matrix:
|
|
178
|
-
ember-try-scenario: [
|
|
179
|
-
ember-lts-3.24,
|
|
180
|
-
ember-lts-3.28,
|
|
181
|
-
ember-release,
|
|
182
|
-
ember-beta,
|
|
183
|
-
ember-canary,
|
|
184
|
-
ember-default-with-jquery,
|
|
185
|
-
ember-classic,
|
|
186
|
-
no-deprecations,
|
|
187
|
-
ember-release-no-deprecations,
|
|
188
|
-
embroider-safe,
|
|
189
|
-
embroider-optimized
|
|
190
|
-
]
|
|
191
|
-
|
|
192
|
-
steps:
|
|
193
|
-
- uses: actions/checkout@v3
|
|
194
|
-
with:
|
|
195
|
-
fetch-depth: 1
|
|
196
|
-
|
|
197
|
-
- uses: actions/setup-node@v2-beta
|
|
198
|
-
with:
|
|
199
|
-
node-version: '${{ env.NODE_VERSION }}'
|
|
200
|
-
|
|
201
|
-
- name: Get package manager's global cache path
|
|
202
|
-
id: global-cache-dir-path
|
|
203
|
-
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
204
|
-
|
|
205
|
-
- name: Cache package manager's global cache and node_modules
|
|
206
|
-
id: cache-dependencies
|
|
207
|
-
uses: actions/cache@v3
|
|
208
|
-
with:
|
|
209
|
-
path: |
|
|
210
|
-
${{ steps.global-cache-dir-path.outputs.dir }}
|
|
211
|
-
node_modules
|
|
212
|
-
key: ${{ runner.os }}-${{ matrix.node-version }}-${{
|
|
213
|
-
hashFiles('**/yarn.lock'
|
|
214
|
-
) }}
|
|
215
|
-
restore-keys: |
|
|
216
|
-
${{ runner.os }}-${{ matrix.node-version }}-
|
|
217
|
-
|
|
218
|
-
- name: Install Dependencies
|
|
219
|
-
run: yarn install --frozen-lockfile
|
|
220
|
-
if: |
|
|
221
|
-
steps.cache-dependencies.outputs.cache-hit != 'true'
|
|
222
|
-
|
|
223
|
-
- name: Test
|
|
224
|
-
env:
|
|
225
|
-
EMBER_TRY_SCENARIO: ${{ matrix.ember-try-scenario }}
|
|
226
|
-
run: node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO
|
package/.release-it.json
DELETED