ember-style-modifier 3.1.0 → 3.1.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 CHANGED
@@ -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 v4.12 or above
13
- * Ember CLI v4.12 or above
14
- * Node.js v18 or above
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
 
@@ -3,13 +3,7 @@ import { dasherize } from '@ember/string';
3
3
  import { assert } from '@ember/debug';
4
4
  import { typeOf } from '@ember/utils';
5
5
 
6
- // Cannot be typed as `Partial<CSSStyleDeclaration>` because `CSSStyleDeclaration`
7
- // interface does _not_ included dashed CSS property names. It only includes the
8
- // camelCase version of a CSS property.
9
- // https://github.com/microsoft/TypeScript-DOM-lib-generator/issues/1672
10
- type CSSStyles = { [key: string]: string | undefined };
11
-
12
- function isObject(o: unknown): boolean {
6
+ function isObject(o) {
13
7
  return typeof o === 'object' && Boolean(o);
14
8
  }
15
9
 
@@ -26,33 +20,18 @@ function isObject(o: unknown): boolean {
26
20
  *
27
21
  * This data structure is slightly faster to process than an object / dictionary.
28
22
  */
29
- function compileStyles(
30
- positional: CSSStyles[],
31
- named: CSSStyles,
32
- ): [string, string][] {
23
+ function compileStyles(positional, named) {
33
24
  return [...positional.filter(isObject), named]
34
- .map((obj) =>
35
- Object.entries(obj).map(
36
- ([k, v]) => [dasherize(k), v] as [string, string],
37
- ),
38
- )
25
+ .map((obj) => Object.entries(obj).map(([k, v]) => [dasherize(k), v]))
39
26
  .flat();
40
27
  }
41
28
 
42
- export interface StyleModifierSignature {
43
- Element: HTMLElement;
44
- Args: {
45
- Positional: CSSStyles[];
46
- Named: CSSStyles;
47
- };
48
- }
49
-
50
- export default class StyleModifier extends Modifier<StyleModifierSignature> {
51
- existingStyles: Set<string> = new Set();
29
+ export default class StyleModifier extends Modifier {
30
+ existingStyles = new Set();
52
31
 
53
- setStyles(element: HTMLElement, newStyles: [string, string][]) {
32
+ setStyles(element, newStyles) {
54
33
  const { existingStyles } = this;
55
- const rulesToRemove: Set<string> = new Set(existingStyles);
34
+ const rulesToRemove = new Set(existingStyles);
56
35
 
57
36
  // clear cache of existing styles
58
37
  existingStyles.clear();
@@ -60,10 +39,10 @@ export default class StyleModifier extends Modifier<StyleModifierSignature> {
60
39
  newStyles.forEach(([property, value]) => {
61
40
  assert(
62
41
  `Your given value for property '${property}' is ${value} (${typeOf(
63
- value,
42
+ value
64
43
  )}). ` +
65
44
  'Accepted types are string and undefined. Please change accordingly.',
66
- typeof value === 'undefined' || typeOf(value) === 'string',
45
+ typeof value === 'undefined' || typeOf(value) === 'string'
67
46
  );
68
47
 
69
48
  // priority must be specified as separate argument
@@ -88,7 +67,7 @@ export default class StyleModifier extends Modifier<StyleModifierSignature> {
88
67
  rulesToRemove.forEach((rule) => element.style.removeProperty(rule));
89
68
  }
90
69
 
91
- modify(element: HTMLElement, positional: [CSSStyles] | [], named: CSSStyles) {
70
+ modify(element, positional, named) {
92
71
  this.setStyles(element, compileStyles(positional, named));
93
72
  }
94
73
  }
package/index.js CHANGED
@@ -2,8 +2,4 @@
2
2
 
3
3
  module.exports = {
4
4
  name: require('./package').name,
5
-
6
- options: {
7
- 'ember-cli-babel': { enableTypeScriptTransform: true },
8
- },
9
5
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-style-modifier",
3
- "version": "3.1.0",
3
+ "version": "3.1.1",
4
4
  "description": "{{style}} modifier to set an element's style using the CSSStyleDeclaration API.",
5
5
  "keywords": [
6
6
  "ember-addon"
@@ -8,21 +8,6 @@
8
8
  "repository": "https://github.com/jelhan/ember-style-modifier",
9
9
  "license": "MIT",
10
10
  "author": "",
11
- "typesVersions": {
12
- "*": {
13
- "test-support": [
14
- "declarations/addon-test-support/index.d.ts"
15
- ],
16
- "test-support/*": [
17
- "declarations/addon-test-support/*",
18
- "declarations/addon-test-support/*/index.d.ts"
19
- ],
20
- "*": [
21
- "declarations/addon/*",
22
- "declarations/addon/*/index.d.ts"
23
- ]
24
- }
25
- },
26
11
  "directories": {
27
12
  "doc": "doc",
28
13
  "test": "tests"
@@ -30,113 +15,66 @@
30
15
  "scripts": {
31
16
  "build": "ember build --environment=production",
32
17
  "lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
33
- "lint:css": "stylelint \"**/*.css\"",
34
- "lint:css:fix": "concurrently \"npm:lint:css -- --fix\"",
35
18
  "lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
36
19
  "lint:hbs": "ember-template-lint .",
37
20
  "lint:hbs:fix": "ember-template-lint . --fix",
38
21
  "lint:js": "eslint . --cache",
39
- "lint:js:fix": "eslint . --fix",
40
- "lint:types": "glint",
41
- "prepack": "tsc --project tsconfig.declarations.json",
42
- "postpack": "rimraf declarations",
43
22
  "release": "release-it",
23
+ "lint:js:fix": "eslint . --fix",
44
24
  "start": "ember serve",
45
25
  "test": "concurrently \"npm:lint\" \"npm:test:*\" --names \"lint,test:\"",
46
26
  "test:ember": "ember test",
47
27
  "test:ember-compatibility": "ember try:each"
48
28
  },
49
29
  "dependencies": {
50
- "@babel/core": "^7.23.6",
51
- "ember-auto-import": "^2.7.0",
52
- "ember-cli-babel": "^8.2.0",
30
+ "ember-auto-import": "^2.5.0",
31
+ "ember-cli-babel": "^7.26.11",
53
32
  "ember-modifier": "^3.2.7 || ^4.0.0"
54
33
  },
55
34
  "devDependencies": {
56
35
  "@ember/optional-features": "^2.0.0",
57
- "@ember/string": "^3.1.1",
58
- "@ember/test-helpers": "^3.2.1",
59
- "@embroider/test-setup": "^3.0.3",
36
+ "@ember/string": "^3.0.1",
37
+ "@ember/test-helpers": "^2.9.3",
38
+ "@embroider/test-setup": "^2.0.2",
60
39
  "@glimmer/component": "^1.1.2",
61
40
  "@glimmer/tracking": "^1.1.2",
62
- "@glint/core": "^1.2.2",
63
- "@glint/environment-ember-loose": "^1.2.2",
64
- "@glint/environment-ember-template-imports": "^1.2.2",
65
- "@glint/template": "^1.2.2",
66
- "@release-it-plugins/lerna-changelog": "^6.0.0",
67
- "@tsconfig/ember": "^3.0.2",
68
- "@types/ember": "^4.0.10",
69
- "@types/ember__application": "^4.0.10",
70
- "@types/ember__array": "^4.0.9",
71
- "@types/ember__component": "^4.0.21",
72
- "@types/ember__controller": "^4.0.11",
73
- "@types/ember__debug": "^4.0.7",
74
- "@types/ember__destroyable": "^4.0.4",
75
- "@types/ember__engine": "^4.0.10",
76
- "@types/ember__error": "^4.0.5",
77
- "@types/ember__helper": "^4.0.5",
78
- "@types/ember__modifier": "^4.0.8",
79
- "@types/ember__object": "^4.0.11",
80
- "@types/ember__owner": "^4.0.8",
81
- "@types/ember__polyfills": "^4.0.5",
82
- "@types/ember__routing": "^4.0.19",
83
- "@types/ember__runloop": "^4.0.8",
84
- "@types/ember__service": "^4.0.8",
85
- "@types/ember__string": "^3.16.3",
86
- "@types/ember__template": "^4.0.5",
87
- "@types/ember__test": "^4.0.5",
88
- "@types/ember__utils": "^4.0.6",
89
- "@types/qunit": "^2.19.9",
90
- "@types/rsvp": "^4.0.8",
91
- "@typescript-eslint/eslint-plugin": "^6.14.0",
92
- "@typescript-eslint/parser": "^6.14.0",
41
+ "babel-eslint": "^10.1.0",
93
42
  "broccoli-asset-rev": "^3.0.0",
94
- "concurrently": "^8.2.2",
95
- "ember-auto-import": "^2.7.0",
96
- "ember-cli": "~5.5.0",
97
- "ember-cli-clean-css": "^3.0.0",
43
+ "concurrently": "^7.6.0",
44
+ "ember-cli": "~4.10.0",
98
45
  "ember-cli-content-security-policy": "^2.0.3",
99
- "ember-cli-dependency-checker": "^3.3.2",
100
- "ember-cli-htmlbars": "^6.3.0",
46
+ "ember-cli-dependency-checker": "^3.3.1",
47
+ "ember-cli-htmlbars": "^6.2.0",
101
48
  "ember-cli-inject-live-reload": "^2.1.0",
102
49
  "ember-cli-sri": "^2.1.1",
103
50
  "ember-cli-terser": "^4.0.2",
104
- "ember-eslint-parser": "^0.2.5",
105
51
  "ember-load-initializers": "^2.1.2",
106
- "ember-page-title": "^8.1.0",
107
- "ember-qunit": "^7.0.0",
108
- "ember-resolver": "^11.0.1",
109
- "ember-source": "~5.5.0",
52
+ "ember-page-title": "^7.0.0",
53
+ "ember-qunit": "^6.1.1",
54
+ "ember-resolver": "^10.0.0",
55
+ "ember-source": "~4.10.0",
110
56
  "ember-source-channel-url": "^3.0.0",
111
- "ember-template-imports": "^4.0.0",
112
- "ember-template-lint": "^5.13.0",
113
- "ember-try": "^3.0.0",
114
- "ember-welcome-page": "^7.0.2",
115
- "eslint": "^8.55.0",
116
- "eslint-config-prettier": "^9.1.0",
117
- "eslint-plugin-ember": "^11.11.1",
118
- "eslint-plugin-n": "^16.4.0",
119
- "eslint-plugin-prettier": "^5.0.1",
120
- "eslint-plugin-qunit": "^8.0.1",
57
+ "ember-template-lint": "^5.3.1",
58
+ "ember-try": "^2.0.0",
59
+ "eslint": "^7.32.0",
60
+ "eslint-config-prettier": "^8.6.0",
61
+ "eslint-plugin-ember": "^11.4.3",
62
+ "eslint-plugin-n": "^15.6.1",
63
+ "eslint-plugin-prettier": "^4.2.1",
64
+ "eslint-plugin-qunit": "^7.3.4",
121
65
  "loader.js": "^4.7.0",
122
- "prettier": "^3.1.1",
123
- "prettier-plugin-ember-template-tag": "^2.0.0",
124
- "qunit": "^2.20.0",
125
- "qunit-dom": "^3.0.0",
126
- "release-it": "^16.0.0",
127
- "rimraf": "^5.0.1",
128
- "stylelint": "^16.0.0",
129
- "stylelint-config-standard": "^36.0.0",
130
- "stylelint-prettier": "^5.0.0",
131
- "typescript": "^5.3.3",
132
- "webpack": "^5.89.0"
66
+ "prettier": "^2.8.3",
67
+ "qunit": "^2.19.3",
68
+ "qunit-dom": "^2.0.0",
69
+ "release-it": "^15.0.0",
70
+ "release-it-lerna-changelog": "^5.0.0",
71
+ "webpack": "^5.75.0"
133
72
  },
134
73
  "peerDependencies": {
135
- "@ember/string": "^3.0.1",
136
- "ember-source": ">= 4.12.0"
74
+ "@ember/string": "^3.0.1"
137
75
  },
138
76
  "engines": {
139
- "node": "18.* || >= 20"
77
+ "node": "14.* || 16.* || >= 18"
140
78
  },
141
79
  "publishConfig": {
142
80
  "registry": "https://registry.npmjs.org"
package/CHANGELOG.md DELETED
@@ -1,194 +0,0 @@
1
-
2
-
3
-
4
-
5
-
6
-
7
-
8
-
9
- ## v3.1.0 (2024-01-10)
10
-
11
- #### :boom: Breaking Change
12
- * [#181](https://github.com/jelhan/ember-style-modifier/pull/181) drop support for Ember < 4.12 ([@jelhan](https://github.com/jelhan))
13
- * [#180](https://github.com/jelhan/ember-style-modifier/pull/180) drop support for node 14 and 16 ([@jelhan](https://github.com/jelhan))
14
-
15
- #### :rocket: Enhancement
16
- * [#213](https://github.com/jelhan/ember-style-modifier/pull/213) document Ember compatibility adding a peer dep on ember-source ([@jelhan](https://github.com/jelhan))
17
- * [#211](https://github.com/jelhan/ember-style-modifier/pull/211) better import path for apps using template tag ([@jelhan](https://github.com/jelhan))
18
- * [#210](https://github.com/jelhan/ember-style-modifier/pull/210) Convert to TypeScript and publish types (including Glint) ([@jelhan](https://github.com/jelhan))
19
-
20
- #### :house: Internal
21
- * [#208](https://github.com/jelhan/ember-style-modifier/pull/208) upgrade with Ember CLI v5.5 blueprints ([@jelhan](https://github.com/jelhan))
22
- * [#207](https://github.com/jelhan/ember-style-modifier/pull/207) migrate from yarn v1 to pnpm ([@jelhan](https://github.com/jelhan))
23
-
24
- #### Committers: 1
25
- - Jeldrik Hanschke ([@jelhan](https://github.com/jelhan))
26
-
27
- ## v3.0.1 (2023-02-15)
28
-
29
- #### :bug: Bug Fix
30
- * [#148](https://github.com/jelhan/ember-style-modifier/pull/148) Don't dasherize property names twice ([@drewpereli](https://github.com/drewpereli))
31
-
32
- #### :house: Internal
33
- * [#149](https://github.com/jelhan/ember-style-modifier/pull/149) ember-cli-update to v4.10 ([@jelhan](https://github.com/jelhan))
34
-
35
- #### Committers: 2
36
- - Drew Pereli ([@drewpereli](https://github.com/drewpereli))
37
- - Jeldrik Hanschke ([@jelhan](https://github.com/jelhan))
38
-
39
- ## v3.0.0 (2023-01-16)
40
-
41
- #### :boom: Breaking Change
42
- * [#139](https://github.com/jelhan/ember-style-modifier/pull/139) Add `@ember/string` as a dependency ([@boris-petrov](https://github.com/boris-petrov))
43
-
44
- #### Committers: 1
45
- - Boris Petrov ([@boris-petrov](https://github.com/boris-petrov))
46
-
47
- ## v2.1.0 (2023-01-13)
48
-
49
- #### :house: Internal
50
- * [#143](https://github.com/jelhan/ember-style-modifier/pull/143) upgrade files created by Ember CLI blueprints to 4.9 ([@jelhan](https://github.com/jelhan))
51
- * [#142](https://github.com/jelhan/ember-style-modifier/pull/142) refactor pure method to pure function for readability ([@jelhan](https://github.com/jelhan))
52
- * [#141](https://github.com/jelhan/ember-style-modifier/pull/141) use Array.flat() instead of complex workaround ([@jelhan](https://github.com/jelhan))
53
- * [#140](https://github.com/jelhan/ember-style-modifier/pull/140) only loop once over styles ([@jelhan](https://github.com/jelhan))
54
-
55
- #### Committers: 1
56
- - Jeldrik Hanschke ([@jelhan](https://github.com/jelhan))
57
-
58
- ## v2.0.0 (2022-12-22)
59
-
60
- ember-style-modifier v2 requires consuming application to have an explicit
61
- dependency on ember-auto-import@v2. This is the only breaking change introduced.
62
-
63
- Addon authors are encouraged to support both v1 and v2 of ember-style-modifier
64
- in parallel. Instead of replacing ember-style-modifier@^1.0.0 dependency with a
65
- dependency on ember-style-modifier@^2.0.0 widening the version range to
66
- `^1.0.0 || ^2.0.0` is recommended. Widening the version range is _not_ a
67
- change. Doing so allows applications to upgrade to ember-style-modifer@^2.0.0
68
- as soon as all their direct and indirect addons support both.
69
-
70
- #### :boom: Breaking Change
71
- * [#133](https://github.com/jelhan/ember-style-modifier/pull/133) Add ember-auto-import v2 dependency ([@SergeAstapov](https://github.com/SergeAstapov))
72
-
73
- #### :rocket: Enhancement
74
- * [#133](https://github.com/jelhan/ember-style-modifier/pull/133) Widen ember-modifier versions to support v4 ([@SergeAstapov](https://github.com/SergeAstapov))
75
-
76
- #### Committers: 1
77
- - Sergey Astapov ([@SergeAstapov](https://github.com/SergeAstapov))
78
-
79
- ## v1.0.0 (2022-10-14)
80
-
81
- #### :boom: Breaking Change
82
- * [#112](https://github.com/jelhan/ember-style-modifier/pull/112) drop support for Ember 3.24 ([@jelhan](https://github.com/jelhan))
83
- * [#111](https://github.com/jelhan/ember-style-modifier/pull/111) drop support for node 12 ([@jelhan](https://github.com/jelhan))
84
-
85
- #### :house: Internal
86
- * [#117](https://github.com/jelhan/ember-style-modifier/pull/117) document known limitations ([@jelhan](https://github.com/jelhan))
87
- * [#114](https://github.com/jelhan/ember-style-modifier/pull/114) update blueprints to Ember CLI 4.7 ([@jelhan](https://github.com/jelhan))
88
- * [#94](https://github.com/jelhan/ember-style-modifier/pull/94) Update Ember to v4.3 ([@bertdeblock](https://github.com/bertdeblock))
89
- * [#93](https://github.com/jelhan/ember-style-modifier/pull/93) Update `.npmignore` file ([@bertdeblock](https://github.com/bertdeblock))
90
- * [#92](https://github.com/jelhan/ember-style-modifier/pull/92) Update CI badge in README ([@bertdeblock](https://github.com/bertdeblock))
91
-
92
- #### Committers: 2
93
- - Bert De Block ([@bertdeblock](https://github.com/bertdeblock))
94
- - Jeldrik Hanschke ([@jelhan](https://github.com/jelhan))
95
-
96
- ## v0.8.0 (2022-04-08)
97
-
98
- #### :rocket: Enhancement
99
- * [#88](https://github.com/jelhan/ember-style-modifier/pull/88) Resolve `ember-modifier` deprecations ([@bertdeblock](https://github.com/bertdeblock))
100
-
101
- #### Committers: 1
102
- - Bert De Block ([@bertdeblock](https://github.com/bertdeblock))
103
-
104
- ## v0.7.0 (2021-10-27)
105
-
106
- #### :boom: Breaking Change
107
- * [#71](https://github.com/jelhan/ember-style-modifier/pull/71) add Ember Auto Import v2 ([@jelhan](https://github.com/jelhan))
108
- * [#60](https://github.com/jelhan/ember-style-modifier/pull/60) Update dependency ember-modifier to v3 ([@renovate[bot]](https://github.com/apps/renovate))
109
- * [#67](https://github.com/jelhan/ember-style-modifier/pull/67) drop support for Ember < 3.24 ([@jelhan](https://github.com/jelhan))
110
- * [#57](https://github.com/jelhan/ember-style-modifier/pull/57) drop support for Ember 3.4 ([@jelhan](https://github.com/jelhan))
111
- * [#58](https://github.com/jelhan/ember-style-modifier/pull/58) drop support for node 10 ([@jelhan](https://github.com/jelhan))
112
-
113
- #### :house: Internal
114
- * [#72](https://github.com/jelhan/ember-style-modifier/pull/72) fix CSP for Embroider builds ([@jelhan](https://github.com/jelhan))
115
- * [#68](https://github.com/jelhan/ember-style-modifier/pull/68) upgrade addon blueprints to Ember CLI 3.28 ([@jelhan](https://github.com/jelhan))
116
- * [#51](https://github.com/jelhan/ember-style-modifier/pull/51) Create ember-try scenarios for `no-deprecations` ([@mansona](https://github.com/mansona))
117
- * [#39](https://github.com/jelhan/ember-style-modifier/pull/39) upgrade to Ember 3.24 ([@jelhan](https://github.com/jelhan))
118
- * [#64](https://github.com/jelhan/ember-style-modifier/pull/64) finish all scenarios in CI even if one fails ([@jelhan](https://github.com/jelhan))
119
- * [#28](https://github.com/jelhan/ember-style-modifier/pull/28) Upgrade Ember CLI to 3.21 ([@jelhan](https://github.com/jelhan))
120
- * [#20](https://github.com/jelhan/ember-style-modifier/pull/20) Configure Renovate ([@renovate[bot]](https://github.com/apps/renovate))
121
-
122
- #### Committers: 2
123
- - Chris Manson ([@mansona](https://github.com/mansona))
124
- - Jeldrik Hanschke ([@jelhan](https://github.com/jelhan))
125
-
126
- ## v0.6.0 (2020-08-03)
127
-
128
- #### :boom: Breaking Change
129
- * [#19](https://github.com/jelhan/ember-style-modifier/pull/19) Update ember-modifier to 2.1.0 and drop support for Ember < 3.4 ([@andreyfel](https://github.com/andreyfel))
130
-
131
- #### Committers: 2
132
- - Andrey Fel ([@andreyfel](https://github.com/andreyfel))
133
- - Jeldrik Hanschke ([@jelhan](https://github.com/jelhan))
134
-
135
- ## v0.5.0 (2019-12-04)
136
-
137
- #### :boom: Breaking Change
138
- * [#12](https://github.com/jelhan/ember-style-modifier/pull/12) use public APIs through ember-modifier and upgrade dependencies ([@andreyfel](https://github.com/andreyfel))
139
-
140
- #### :house: Internal
141
- * [#14](https://github.com/jelhan/ember-style-modifier/pull/14) automate releases with release-it and lerna-changelog ([@jelhan](https://github.com/jelhan))
142
- * [#12](https://github.com/jelhan/ember-style-modifier/pull/12) use public APIs through ember-modifier and upgrade dependencies ([@andreyfel](https://github.com/andreyfel))
143
-
144
- #### Committers: 2
145
- - Andrey Fel ([@andreyfel](https://github.com/andreyfel))
146
- - Jeldrik Hanschke ([@jelhan](https://github.com/jelhan))
147
-
148
-
149
- ## v0.4.1 (2019-03-28)
150
-
151
- #### :rocket: Enhancement
152
- * [#10](https://github.com/jelhan/ember-style-modifier/pull/10) better assertion message for wrong value type ([@jelhan](https://github.com/jelhan))
153
-
154
- #### Committers: 1
155
- - Jeldrik Hanschke ([@jelhan](https://github.com/jelhan))
156
-
157
-
158
- ## v0.4.0 (2019-03-18)
159
-
160
- #### :house: Internal
161
- * [#8](https://github.com/jelhan/ember-style-modifier/pull/8) refactor: drop ember-functional-modifiers ([@buschtoens](https://github.com/buschtoens))
162
-
163
- #### Committers: 1
164
- - Jan Buschtöns ([@buschtoens](https://github.com/buschtoens))
165
-
166
-
167
- ## v0.3.0 (2019-03-13)
168
-
169
- #### :rocket: Enhancement
170
- * [#6](https://github.com/jelhan/ember-style-modifier/pull/6) support setting CSS rules using a POJO ([@jelhan](https://github.com/jelhan))
171
-
172
- #### Committers: 1
173
- - Jeldrik Hanschke ([@jelhan](https://github.com/jelhan))
174
-
175
-
176
- ## v0.2.0 (2019-03-12)
177
-
178
- #### :boom: Breaking Change
179
- * [#4](https://github.com/jelhan/ember-style-modifier/pull/4) support a more compact style for declaring CSS rules ([@jelhan](https://github.com/jelhan))
180
-
181
- #### :rocket: Enhancement
182
- * [#4](https://github.com/jelhan/ember-style-modifier/pull/4) support a more compact style for declaring CSS rules ([@jelhan](https://github.com/jelhan))
183
-
184
- #### Committers: 1
185
- - Jeldrik Hanschke ([@jelhan](https://github.com/jelhan))
186
-
187
-
188
- ## v0.1.0 (2019-03-11)
189
-
190
- Initial proof of concept
191
-
192
- #### Committers: 1
193
- - Jeldrik Hanschke ([@jelhan](https://github.com/jelhan))
194
- -
package/addon/index.ts DELETED
@@ -1 +0,0 @@
1
- export { default } from './modifiers/style';
@@ -1,5 +0,0 @@
1
- import type StyleModifier from './modifiers/style';
2
-
3
- export default interface EmberStyleModifierRegistry {
4
- style: typeof StyleModifier;
5
- }
@@ -1,2 +0,0 @@
1
- export { default } from './modifiers/style';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../addon/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC"}
@@ -1,18 +0,0 @@
1
- import Modifier from 'ember-modifier';
2
- type CSSStyles = {
3
- [key: string]: string | undefined;
4
- };
5
- export interface StyleModifierSignature {
6
- Element: HTMLElement;
7
- Args: {
8
- Positional: CSSStyles[];
9
- Named: CSSStyles;
10
- };
11
- }
12
- export default class StyleModifier extends Modifier<StyleModifierSignature> {
13
- existingStyles: Set<string>;
14
- setStyles(element: HTMLElement, newStyles: [string, string][]): void;
15
- modify(element: HTMLElement, positional: [CSSStyles] | [], named: CSSStyles): void;
16
- }
17
- export {};
18
- //# sourceMappingURL=style.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../addon/modifiers/style.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAStC,KAAK,SAAS,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAgCvD,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,WAAW,CAAC;IACrB,IAAI,EAAE;QACJ,UAAU,EAAE,SAAS,EAAE,CAAC;QACxB,KAAK,EAAE,SAAS,CAAC;KAClB,CAAC;CACH;AAED,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,QAAQ,CAAC,sBAAsB,CAAC;IACzE,cAAc,EAAE,GAAG,CAAC,MAAM,CAAC,CAAa;IAExC,SAAS,CAAC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE;IAsC7D,MAAM,CAAC,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,SAAS;CAG5E"}
@@ -1,5 +0,0 @@
1
- import type StyleModifier from './modifiers/style';
2
- export default interface EmberStyleModifierRegistry {
3
- style: typeof StyleModifier;
4
- }
5
- //# sourceMappingURL=template-registry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"template-registry.d.ts","sourceRoot":"","sources":["../../addon/template-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,aAAa,MAAM,mBAAmB,CAAC;AAEnD,MAAM,CAAC,OAAO,WAAW,0BAA0B;IACjD,KAAK,EAAE,OAAO,aAAa,CAAC;CAC7B"}
@@ -1,10 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- "declarationDir": "declarations",
5
- "emitDeclarationOnly": true,
6
- "noEmit": false,
7
- "rootDir": "."
8
- },
9
- "include": ["addon", "addon-test-support"]
10
- }
package/tsconfig.json DELETED
@@ -1,21 +0,0 @@
1
- {
2
- "extends": "@tsconfig/ember/tsconfig.json",
3
- "compilerOptions": {
4
- // The combination of `baseUrl` with `paths` allows Ember's classic package
5
- // layout, which is not resolvable with the Node resolution algorithm, to
6
- // work with TypeScript.
7
- "baseUrl": ".",
8
- "paths": {
9
- "dummy/tests/*": ["tests/*"],
10
- "dummy/*": ["tests/dummy/app/*", "app/*"],
11
- "ember-style-modifier": ["addon"],
12
- "ember-style-modifier/*": ["addon/*"],
13
- "ember-style-modifier/test-support": ["addon-test-support"],
14
- "ember-style-modifier/test-support/*": ["addon-test-support/*"],
15
- "*": ["types/*"]
16
- }
17
- },
18
- "glint": {
19
- "environment": ["ember-loose", "ember-template-imports"]
20
- }
21
- }
package/types/global.d.ts DELETED
@@ -1,6 +0,0 @@
1
- import '@glint/environment-ember-loose';
2
- import EmberStyleModifierRegistry from 'ember-style-modifier/template-registry';
3
-
4
- declare module '@glint/environment-ember-loose/registry' {
5
- export default interface Registry extends EmberStyleModifierRegistry {}
6
- }