@teipublisher/pb-components 3.0.0 → 3.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/gh-pages.js CHANGED
@@ -19,12 +19,16 @@ copy('lib', path.join(dir, 'lib'));
19
19
  copy('css', path.join(dir, 'css'));
20
20
  copy('src', path.join(dir, 'src'));
21
21
 
22
- try {
23
- fs.unlinkSync(latest);
24
- } catch (e) {
25
- /* */
22
+ // Only link stable versions as latest, not pre-release versions (e.g., v.*-next.*)
23
+ const isStableVersion = !json.version.includes('-next');
24
+ if (isStableVersion) {
25
+ try {
26
+ fs.unlinkSync(latest);
27
+ } catch (e) {
28
+ /* */
29
+ }
30
+ fs.symlinkSync(path.resolve(dir), latest, 'dir');
26
31
  }
27
- fs.symlinkSync(path.resolve(dir), latest, 'dir');
28
32
 
29
33
  const redirect = fs.readFileSync(path.join('demo', 'redirect.js'), 'utf-8');
30
34
  fs.writeFileSync(path.join('docs', 'redirect.js'), redirect, { encoding: 'utf-8' });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teipublisher/pb-components",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "Collection of webcomponents underlying TEI Publisher",
5
5
  "repository": "https://github.com/eeditiones/tei-publisher-components.git",
6
6
  "main": "index.html",
@@ -1,5 +1,8 @@
1
1
  import { LitElement, html, css } from 'lit-element';
2
2
  import 'prismjs/prism';
3
+ import 'prismjs/components/prism-css';
4
+ import 'prismjs/components/prism-markup';
5
+ import 'prismjs/components/prism-json';
3
6
  import 'prismjs/components/prism-xquery';
4
7
  import 'prismjs/plugins/normalize-whitespace/prism-normalize-whitespace';
5
8
  import 'prismjs/plugins/line-numbers/prism-line-numbers';
@@ -1,6 +1,7 @@
1
1
  import { LitElement, html, css } from 'lit-element';
2
2
  import { pbMixin } from './pb-mixin.js';
3
3
  import { translate } from './pb-i18n.js';
4
+ import { themableMixin } from './theming.js';
4
5
 
5
6
  /**
6
7
  * Display a pagination control from which the user can select a page to view
@@ -14,7 +15,7 @@ import { translate } from './pb-i18n.js';
14
15
  * @fires pb-results-received - When received, recalculates page ranges to display according to the parameters received
15
16
  * @csspart count - the span displaying the number of items
16
17
  */
17
- export class PbPaginate extends pbMixin(LitElement) {
18
+ export class PbPaginate extends themableMixin(pbMixin(LitElement)) {
18
19
  static get properties() {
19
20
  return {
20
21
  ...super.properties,
@@ -151,7 +152,7 @@ export class PbPaginate extends pbMixin(LitElement) {
151
152
  }
152
153
 
153
154
  .found {
154
- padding-left: 20px;
155
+ padding-left: .5rem;
155
156
  }
156
157
  `;
157
158
  }
package/src/pb-zoom.js CHANGED
@@ -44,7 +44,9 @@ export class PbZoom extends themableMixin(pbMixin(LitElement)) {
44
44
  this._loadZoomPreference();
45
45
  }
46
46
 
47
- _handleClick() {
47
+ _handleClick(ev) {
48
+ ev.preventDefault();
49
+ ev.stopPropagation();
48
50
  this.emitTo('pb-zoom', { direction: this.direction });
49
51
  this.zoom(this.direction);
50
52
  }