ember-freestyle 0.14.0 → 0.15.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/CHANGELOG.md CHANGED
@@ -1,6 +1,31 @@
1
1
  # Changelog
2
2
 
3
- All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
3
+ All notable changes to this project will be documented in this file.
4
+
5
+
6
+ ## v0.15.0 (2022-09-14)
7
+
8
+ #### :rocket: Enhancement
9
+ * [#828](https://github.com/chrislopresto/ember-freestyle/pull/828) Render headings instead of divs ([@KamiKillertO](https://github.com/KamiKillertO))
10
+
11
+ #### :bug: Bug Fix
12
+ * [#827](https://github.com/chrislopresto/ember-freestyle/pull/827) Fix aside menu ([@KamiKillertO](https://github.com/KamiKillertO))
13
+ * [#823](https://github.com/chrislopresto/ember-freestyle/pull/823) Fix rendering too many submenus ([@bertdeblock](https://github.com/bertdeblock))
14
+
15
+ #### :memo: Documentation
16
+ * [#835](https://github.com/chrislopresto/ember-freestyle/pull/835) Recommend `exclude` option instead of `blacklist` option ([@bertdeblock](https://github.com/bertdeblock))
17
+
18
+ #### :house: Internal
19
+ * [#844](https://github.com/chrislopresto/ember-freestyle/pull/844) Move to release-it to manage release and CHANGELOG. ([@lukemelia](https://github.com/lukemelia))
20
+ * [#836](https://github.com/chrislopresto/ember-freestyle/pull/836) Update Ember to v4.6 ([@bertdeblock](https://github.com/bertdeblock))
21
+ * [#837](https://github.com/chrislopresto/ember-freestyle/pull/837) Use spread syntax instead of Ember's `assign` polyfill ([@bertdeblock](https://github.com/bertdeblock))
22
+ * [#810](https://github.com/chrislopresto/ember-freestyle/pull/810) Update Ember to v4.4 ([@bertdeblock](https://github.com/bertdeblock))
23
+ * [#752](https://github.com/chrislopresto/ember-freestyle/pull/752) Resolve `ember-modifier` deprecations ([@bertdeblock](https://github.com/bertdeblock))
24
+
25
+ #### Committers: 3
26
+ - Benjamin JEGARD ([@KamiKillertO](https://github.com/KamiKillertO))
27
+ - Bert De Block ([@bertdeblock](https://github.com/bertdeblock))
28
+ - Luke Melia ([@lukemelia](https://github.com/lukemelia))
4
29
 
5
30
  ## [0.14.0](https://github.com/chrislopresto/ember-freestyle/compare/v0.13.2...v0.14.0) (2022-03-11)
6
31
 
package/README.md CHANGED
@@ -5,7 +5,6 @@
5
5
  ![NPM Version](https://img.shields.io/npm/v/ember-freestyle?logo=npm)
6
6
  ![Download Count All Time](https://img.shields.io/npm/dt/ember-freestyle.svg)
7
7
  [![Ember Observer Score](http://emberobserver.com/badges/ember-freestyle.svg)](http://emberobserver.com/addons/ember-freestyle)
8
- [![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)
9
8
  <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
10
9
  [![All Contributors](https://img.shields.io/badge/all_contributors-39-orange.svg?style=flat-square)](#contributors-)
11
10
  <!-- ALL-CONTRIBUTORS-BADGE:END -->
@@ -26,7 +25,7 @@ To see Ember Freestyle in action, visit [https://chrislopresto.github.io/ember-f
26
25
 
27
26
  * Ember.js v3.16 or above
28
27
  * Ember CLI v3.16 or above
29
- * Node.js v12 or above
28
+ * Node.js v14 or above
30
29
  * Ember Auto Import v2 or above
31
30
 
32
31
  ## Installation
@@ -89,7 +88,7 @@ $FreestyleGuide-color--accent: #DAF7A6;
89
88
  ## Excluding Ember Freestyle from Your Production Build
90
89
 
91
90
  We recommend excluding Ember Freestyle from production builds using Ember CLI's
92
- `addons.blacklist` option.
91
+ `addons.exclude` option.
93
92
 
94
93
  ```js
95
94
  // ember-cli-build.js
@@ -98,9 +97,9 @@ const environment = process.env.EMBER_ENV;
98
97
  const addonsToExclude = environment === 'production' ? ['ember-freestyle'] : [];
99
98
 
100
99
  module.exports = function (defaults) {
101
- const app = new EmberAddon(defaults, {
100
+ const app = new EmberApp(defaults, {
102
101
  addons: {
103
- blacklist: addonsToExclude,
102
+ exclude: addonsToExclude,
104
103
  },
105
104
  };
106
105
  };
package/RELEASE.md ADDED
@@ -0,0 +1,60 @@
1
+ # Release Process
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
+ ## Preparation
8
+
9
+ Since the majority of the actual release process is automated, the primary
10
+ remaining task prior to releasing is confirming that all pull requests that
11
+ have been merged since the last release have been labeled with the appropriate
12
+ `lerna-changelog` labels and the titles have been updated to ensure they
13
+ represent something that would make sense to our users. Some great information
14
+ on why this is important can be found at
15
+ [keepachangelog.com](https://keepachangelog.com/en/1.0.0/), but the overall
16
+ guiding principle here is that changelogs are for humans, not machines.
17
+
18
+ When reviewing merged PR's the labels to be used are:
19
+
20
+ * breaking - Used when the PR is considered a breaking change.
21
+ * enhancement - Used when the PR adds a new feature or enhancement.
22
+ * bug - Used when the PR fixes a bug included in a previous release.
23
+ * documentation - Used when the PR adds or updates documentation.
24
+ * internal - Used for internal changes that still require a mention in the
25
+ changelog/release notes.
26
+
27
+ ## Release
28
+
29
+ Once the prep work is completed, the actual release is straight forward:
30
+
31
+ * First, ensure that you have installed your projects dependencies:
32
+
33
+ ```sh
34
+ yarn install
35
+ ```
36
+
37
+ * Second, ensure that you have obtained a
38
+ [GitHub personal access token][generate-token] with the `repo` scope (no
39
+ other permissions are needed). Make sure the token is available as the
40
+ `GITHUB_AUTH` environment variable.
41
+
42
+ For instance:
43
+
44
+ ```bash
45
+ export GITHUB_AUTH=abc123def456
46
+ ```
47
+
48
+ [generate-token]: https://github.com/settings/tokens/new?scopes=repo&description=GITHUB_AUTH+env+variable
49
+
50
+ * And last (but not least 😁) do your release.
51
+
52
+ ```sh
53
+ npx release-it
54
+ ```
55
+
56
+ [release-it](https://github.com/release-it/release-it/) manages the actual
57
+ release process. It will prompt you to to choose the version number after which
58
+ you will have the chance to hand tweak the changelog to be used (for the
59
+ `CHANGELOG.md` and GitHub release), then `release-it` continues on to tagging,
60
+ pushing the tag and commits, etc.
@@ -1,4 +1,3 @@
1
- import { assign } from '@ember/polyfills';
2
1
  import Component from '@ember/component';
3
2
  import { action, set, get, computed } from '@ember/object';
4
3
  import { assert } from '@ember/debug';
@@ -38,7 +37,7 @@ export default Component.extend({
38
37
  @action
39
38
  changeValueTo(property, newValue) {
40
39
  // Make a copy and then reset dynamicProperties, to force template changes
41
- let dynamicProperties = assign({}, this.dynamicProperties);
40
+ let dynamicProperties = { ...this.dynamicProperties };
42
41
  set(dynamicProperties, `${property}.value`, newValue);
43
42
 
44
43
  this.set('dynamicProperties', dynamicProperties);
@@ -10,17 +10,16 @@
10
10
  <svg height="20px" class="FreestyleGuide-ctaIcon" style="enable-background:new 0 0 32 32;" version="1.1" viewBox="0 0 32 32" width="20px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M4,10h24c1.104,0,2-0.896,2-2s-0.896-2-2-2H4C2.896,6,2,6.896,2,8S2.896,10,4,10z M28,14H4c-1.104,0-2,0.896-2,2 s0.896,2,2,2h24c1.104,0,2-0.896,2-2S29.104,14,28,14z M28,22H4c-1.104,0-2,0.896-2,2s0.896,2,2,2h24c1.104,0,2-0.896,2-2 S29.104,22,28,22z"/></svg>
11
11
  </a>
12
12
  <div class="FreestyleGuide-titleContainer">
13
- <div class="FreestyleGuide-title">{{@title}}</div>
13
+ <h1 class="FreestyleGuide-title">{{@title}}</h1>
14
14
  <div class="FreestyleGuide-subtitle">{{@subtitle}}</div>
15
15
  </div>
16
- <a
16
+ <button
17
17
  class="FreestyleGuide-cta FreestyleGuide-cta--aside {{unless this.showAside 'FreestyleGuide-cta--active'}}"
18
- href="#"
19
- title="Show Aside"
18
+ type="button"
20
19
  {{on 'click' this.toggleAside}}
21
20
  >
22
21
  <svg xmlns="http://www.w3.org/2000/svg" class="FreestyleGuide-ctaIcon" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" width="14px" height="14px" viewBox="0 0 340.274 340.274" style="enable-background:new 0 0 340.274 340.274;" xml:space="preserve"><path d="M293.629,127.806l-5.795-13.739c19.846-44.856,18.53-46.189,14.676-50.08l-25.353-24.77l-2.516-2.12h-2.937 c-1.549,0-6.173,0-44.712,17.48l-14.184-5.719c-18.332-45.444-20.212-45.444-25.58-45.444h-35.765 c-5.362,0-7.446-0.006-24.448,45.606l-14.123,5.734C86.848,43.757,71.574,38.19,67.452,38.19l-3.381,0.105L36.801,65.032 c-4.138,3.891-5.582,5.263,15.402,49.425l-5.774,13.691C0,146.097,0,147.838,0,153.33v35.068c0,5.501,0,7.44,46.585,24.127 l5.773,13.667c-19.843,44.832-18.51,46.178-14.655,50.032l25.353,24.8l2.522,2.168h2.951c1.525,0,6.092,0,44.685-17.516 l14.159,5.758c18.335,45.438,20.218,45.427,25.598,45.427h35.771c5.47,0,7.41,0,24.463-45.589l14.195-5.74 c26.014,11,41.253,16.585,45.349,16.585l3.404-0.096l27.479-26.901c3.909-3.945,5.278-5.309-15.589-49.288l5.734-13.702 c46.496-17.967,46.496-19.853,46.496-25.221v-35.029C340.268,146.361,340.268,144.434,293.629,127.806z M170.128,228.474 c-32.798,0-59.504-26.187-59.504-58.364c0-32.153,26.707-58.315,59.504-58.315c32.78,0,59.43,26.168,59.43,58.315 C229.552,202.287,202.902,228.474,170.128,228.474z"/></svg>
23
- </a>
22
+ </button>
24
23
  </header>
25
24
  <main class="FreestyleGuide-body">
26
25
  <article class="FreestyleGuide-content">
@@ -39,9 +38,17 @@
39
38
  </nav>
40
39
  {{/if}}
41
40
  {{#if this.showAside}}
42
- <aside class="FreestyleGuide-aside">
41
+ <aside class="FreestyleGuide-aside"
42
+ {{focus-trap
43
+ focusTrapOptions=(hash
44
+ onDeactivate=(fn (mut this.showAside) false)
45
+ allowOutsideClick=true
46
+ escapeDeactivates=true
47
+ )
48
+ }}
49
+ >
43
50
  <FreestyleUsageControls />
44
51
  </aside>
45
52
  {{/if}}
46
53
  </main>
47
- </div>
54
+ </div>
@@ -11,15 +11,17 @@
11
11
  <LinkTo @query={{hash f=null s=section.name ss=null}} class="FreestyleMenu-itemLink">
12
12
  {{section.name}}
13
13
  </LinkTo>
14
- {{#each section.subsections as |subsection|}}
14
+ {{#if section.subsections.length}}
15
15
  <ul class="FreestyleMenu-submenu">
16
- <li class="FreestyleMenu-submenuItem">
17
- <LinkTo @query={{hash f=null s=section.name ss=subsection.name}} class="FreestyleMenu-submenuItemLink">
18
- {{subsection.name}}
19
- </LinkTo>
20
- </li>
16
+ {{#each section.subsections as |subsection|}}
17
+ <li class="FreestyleMenu-submenuItem">
18
+ <LinkTo @query={{hash f=null s=section.name ss=subsection.name}} class="FreestyleMenu-submenuItemLink">
19
+ {{subsection.name}}
20
+ </LinkTo>
21
+ </li>
22
+ {{/each}}
21
23
  </ul>
22
- {{/each}}
24
+ {{/if}}
23
25
  </li>
24
26
  {{/each}}
25
27
  </ul>
@@ -5,9 +5,9 @@
5
5
  >
6
6
  {{#if this.show}}
7
7
  {{#if @name}}
8
- <div class="FreestyleSection-name">
8
+ <h2 class="FreestyleSection-name">
9
9
  {{@name}}
10
- </div>
10
+ </h2>
11
11
  {{/if}}
12
12
  {{/if}}
13
13
  {{yield
@@ -4,9 +4,9 @@
4
4
  >
5
5
  {{#if this.show}}
6
6
  {{#if @name}}
7
- <div class="FreestyleSubsection-name">
7
+ <h3 class="FreestyleSubsection-name">
8
8
  {{@name}}
9
- </div>
9
+ </h3>
10
10
  {{/if}}
11
11
  {{yield}}
12
12
  {{/if}}
@@ -4,7 +4,7 @@ import { inject as service } from '@ember/service';
4
4
  export default class FreestyleHighlight extends Modifier {
5
5
  @service emberFreestyle;
6
6
 
7
- didReceiveArguments() {
8
- this.emberFreestyle.highlight(this.element);
7
+ modify(element) {
8
+ this.emberFreestyle.highlight(element);
9
9
  }
10
10
  }
@@ -39,6 +39,12 @@ $FreestyleGuide-boxShadow: 0 2px 5px 0 $FreestyleGuide-shadow1,
39
39
  text-align: center;
40
40
  }
41
41
 
42
+ &-cta--aside {
43
+ background: none;
44
+ border: 0;
45
+ padding: 0;
46
+ }
47
+
42
48
  &-ctaIcon {
43
49
  &:hover {
44
50
  fill: $FreestyleGuide-color--primary;
@@ -113,6 +119,7 @@ $FreestyleGuide-boxShadow: 0 2px 5px 0 $FreestyleGuide-shadow1,
113
119
  display: flex;
114
120
  height: 100%;
115
121
  font-size: 1.4rem;
122
+
116
123
  & > span {
117
124
  margin: auto;
118
125
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-freestyle",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "description": "Create a living styleguide for your Ember app.",
5
5
  "keywords": [
6
6
  "ember-addon"
@@ -28,78 +28,84 @@
28
28
  "test": "npm-run-all lint test:*",
29
29
  "test:ember": "ember test",
30
30
  "test:ember-compatibility": "ember try:each",
31
- "prerelease": "./script/prerelease",
32
- "release": "./script/release",
33
- "postrelease": "./script/postrelease",
31
+ "release": "release-it",
34
32
  "contributors:add": "all-contributors add",
35
33
  "contributors:generate": "all-contributors generate"
36
34
  },
37
35
  "dependencies": {
38
36
  "@ember/render-modifiers": "^2.0.4",
39
- "@glimmer/component": "^1.0.4",
40
- "@glimmer/tracking": "^1.0.4",
41
- "ember-auto-import": "^2.4.0",
37
+ "@glimmer/component": "^1.1.2",
38
+ "@glimmer/tracking": "^1.1.2",
39
+ "ember-auto-import": "^2.4.2",
42
40
  "ember-cli-babel": "^7.26.11",
43
- "ember-cli-htmlbars": "^6.0.1",
44
- "ember-modifier": "^3.1.0",
41
+ "ember-cli-htmlbars": "^6.1.0",
42
+ "ember-focus-trap": "^1.0.1",
43
+ "ember-modifier": "^3.2.7",
45
44
  "ember-named-blocks-polyfill": "^0.2.5",
46
- "ember-truth-helpers": "^3.0.0",
45
+ "ember-truth-helpers": "^3.1.1",
47
46
  "json-formatter-js": "^2.3.4",
48
47
  "macro-decorators": "^0.1.2",
49
48
  "strip-indent": "^3.0.0"
50
49
  },
51
50
  "devDependencies": {
52
51
  "@ember/optional-features": "^2.0.0",
53
- "@ember/test-helpers": "^2.6.0",
54
- "@embroider/test-setup": "^1.4.0",
52
+ "@ember/test-helpers": "^2.8.1",
53
+ "@embroider/test-setup": "^1.8.3",
55
54
  "all-contributors-cli": "^6.14.1",
56
55
  "babel-eslint": "^10.1.0",
57
56
  "broccoli-asset-rev": "^3.0.0",
58
- "ember-cli": "~4.2.0",
57
+ "ember-cli": "~4.6.0",
59
58
  "ember-cli-autoprefixer": "^2.0.0",
60
- "ember-cli-dependency-checker": "^3.2.0",
59
+ "ember-cli-dependency-checker": "^3.3.1",
61
60
  "ember-cli-deploy": "^1.0.2",
62
61
  "ember-cli-deploy-build": "^2.0.0",
63
62
  "ember-cli-deploy-git": "^1.3.4",
64
63
  "ember-cli-inject-live-reload": "^2.1.0",
65
- "ember-cli-sass": "^10.0.0",
64
+ "ember-cli-sass": "^11.0.1",
66
65
  "ember-cli-sri": "^2.1.0",
67
66
  "ember-cli-terser": "^4.0.2",
68
67
  "ember-code-snippet": "^3.0.0",
69
- "ember-export-application-global": "^2.0.1",
70
68
  "ember-load-initializers": "^2.1.2",
71
69
  "ember-page-title": "^7.0.0",
72
70
  "ember-qunit": "^5.1.5",
73
71
  "ember-resolver": "^8.0.3",
74
- "ember-source": "~4.2.0",
72
+ "ember-source": "~4.6.0",
75
73
  "ember-source-channel-url": "^3.0.0",
76
- "ember-template-lint": "^4.2.0",
74
+ "ember-template-lint": "^4.14.0",
77
75
  "ember-try": "^2.0.0",
78
76
  "eslint": "^7.32.0",
79
77
  "eslint-config-ember": "0.3.0",
80
- "eslint-config-prettier": "^8.4.0",
81
- "eslint-plugin-ember": "^10.5.9",
78
+ "eslint-config-prettier": "^8.5.0",
79
+ "eslint-plugin-ember": "^11.0.6",
82
80
  "eslint-plugin-node": "^11.1.0",
83
- "eslint-plugin-prettier": "^4.0.0",
84
- "eslint-plugin-qunit": "^7.2.0",
85
- "husky": "^7.0.4",
81
+ "eslint-plugin-prettier": "^4.2.1",
82
+ "eslint-plugin-qunit": "^7.3.1",
83
+ "husky": "^8.0.1",
86
84
  "loader.js": "^4.7.0",
87
85
  "npm-run-all": "^4.1.5",
88
- "prettier": "^2.5.1",
89
- "qunit": "^2.18.0",
86
+ "prettier": "^2.7.1",
87
+ "qunit": "^2.19.1",
90
88
  "qunit-dom": "^2.0.0",
89
+ "release-it": "^15.4.1",
90
+ "@release-it-plugins/lerna-changelog": "^5.0.0",
91
91
  "remarkable": "^2.0.0",
92
- "sass": "^1.49.7",
93
- "standard-version": "^9.3.2",
94
- "stylelint": "^14.5.3",
92
+ "sass": "^1.54.8",
93
+ "stylelint": "^14.11.0",
95
94
  "stylelint-config-prettier": "^9.0.3",
96
- "stylelint-config-recommended-scss": "^5.0.2",
97
- "stylelint-prettier": "^1.2.0",
98
- "stylelint-scss": "^4.1.0",
99
- "webpack": "^5.69.1"
95
+ "stylelint-config-recommended-scss": "^7.0.0",
96
+ "stylelint-prettier": "^2.0.0",
97
+ "stylelint-scss": "^4.3.0",
98
+ "webpack": "^5.74.0"
100
99
  },
101
100
  "engines": {
102
- "node": "12.* || 14.* || >= 16"
101
+ "node": "14.* || >= 16"
102
+ },
103
+ "volta": {
104
+ "node": "14.19.3",
105
+ "yarn": "1.22.19"
106
+ },
107
+ "publishConfig": {
108
+ "registry": "https://registry.npmjs.org"
103
109
  },
104
110
  "ember": {
105
111
  "edition": "octane"
@@ -114,8 +120,22 @@
114
120
  "ember-named-blocks-polyfill"
115
121
  ]
116
122
  },
117
- "volta": {
118
- "node": "12.22.6",
119
- "yarn": "1.22.15"
123
+ "release-it": {
124
+ "plugins": {
125
+ "@release-it-plugins/lerna-changelog": {
126
+ "infile": "CHANGELOG.md",
127
+ "launchEditor": false
128
+ }
129
+ },
130
+ "git": {
131
+ "tagName": "v${version}"
132
+ },
133
+ "github": {
134
+ "release": true,
135
+ "tokenRef": "GITHUB_AUTH"
136
+ },
137
+ "hooks": {
138
+ "after:release": "ember deploy production"
139
+ }
120
140
  }
121
141
  }
@@ -22,6 +22,11 @@
22
22
  font-size: 1.4rem;
23
23
  text-align: center;
24
24
  }
25
+ .FreestyleGuide-cta--aside {
26
+ background: none;
27
+ border: 0;
28
+ padding: 0;
29
+ }
25
30
  .FreestyleGuide-ctaIcon:hover {
26
31
  fill: #00bcd4;
27
32
  }