CETEIcean 1.6.0 → 1.7.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "CETEIcean",
3
- "version": "1.6.0",
3
+ "version": "1.7.0",
4
4
  "description": "JavaScript library to load a TEI XML document and register it as HTML5 custom elements.",
5
5
  "main": "src/CETEI.js",
6
6
  "keywords": [
@@ -18,11 +18,11 @@
18
18
  "devDependencies": {
19
19
  "@babel/core": "^7.15.5",
20
20
  "@babel/preset-env": "7.15.6",
21
+ "@rollup/plugin-babel": "^5.3.0",
21
22
  "babel-preset-env": "^1.7.0",
22
- "http-server": "^0.12.3",
23
+ "http-server": "^14.1.1",
23
24
  "onchange": "^6.1.1",
24
25
  "rollup": "^2.57.0",
25
- "@rollup/plugin-babel": "^5.3.0",
26
26
  "rollup-plugin-terser": "1.0.1",
27
27
  "terser": "^3.17.0"
28
28
  },
package/src/CETEI.js CHANGED
@@ -304,11 +304,14 @@ childExists(elt, name) {
304
304
  strings or an object with CSS selector keys and either functions
305
305
  or arrays as described above. Returns a closure around a function
306
306
  that can be called in the element constructor or applied to an
307
- individual element.
307
+ individual element. An empty array is considered a no-op.
308
308
 
309
309
  Called by the getHandler() and getFallback() methods
310
310
  */
311
311
  decorator(template) {
312
+ if (Array.isArray(template) && template.length == 0) {
313
+ return function(e) {};
314
+ }
312
315
  if (Array.isArray(template) && !Array.isArray(template[0])) {
313
316
  return this.applyDecorator(template)
314
317
  }
@@ -84,11 +84,6 @@ export default {
84
84
  document.querySelector("head").appendChild(title);
85
85
  }]
86
86
  ],
87
- "cell": [
88
- ["[cols]", function(elt) {
89
- elt.setAttribute("style", "grid-column: " + this.getOrdinality(elt) + " / span " + elt.getAttribute("cols") + ";");
90
- }]
91
- ]
92
87
  },
93
88
  "teieg": {
94
89
  "egXML": function(elt) {