@canopycanopycanopy/b-ber-grammar-attributes 1.2.15 → 2.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/dist/index.js +6 -6
- package/package.json +7 -6
package/dist/index.js
CHANGED
|
@@ -246,13 +246,13 @@ const _extendWithDefaults = (obj, genus) => {
|
|
|
246
246
|
}; // Create an object from attributes in the given directive
|
|
247
247
|
|
|
248
248
|
|
|
249
|
-
const attributesObject = (attrs,
|
|
249
|
+
const attributesObject = (attrs, origGenus, context = {}) => {
|
|
250
250
|
const {
|
|
251
251
|
fileName,
|
|
252
252
|
lineNumber
|
|
253
253
|
} = context;
|
|
254
254
|
const attrsObject = {};
|
|
255
|
-
let genus =
|
|
255
|
+
let genus = origGenus;
|
|
256
256
|
|
|
257
257
|
if (!genus || typeof genus !== 'string') {
|
|
258
258
|
_bBerLogger.default.error(`No directive provided: ${fileName}:${lineNumber}`);
|
|
@@ -282,16 +282,16 @@ const attributesObject = (attrs, _genus, context = {}) => {
|
|
|
282
282
|
|
|
283
283
|
attrsObject[k] = v;
|
|
284
284
|
});
|
|
285
|
-
} // Add original `
|
|
285
|
+
} // Add original `origGenus` as a class to the attrs object in case it's
|
|
286
286
|
// different from the current `genus` (which might've changed due to it's
|
|
287
287
|
// specification). do this to keep styling consistent
|
|
288
288
|
|
|
289
289
|
|
|
290
|
-
if (genus !==
|
|
290
|
+
if (genus !== origGenus) {
|
|
291
291
|
if ((0, _lodash.default)(attrsObject, 'classes')) {
|
|
292
|
-
attrsObject.classes += ` ${
|
|
292
|
+
attrsObject.classes += ` ${origGenus}`;
|
|
293
293
|
} else {
|
|
294
|
-
attrsObject.classes =
|
|
294
|
+
attrsObject.classes = origGenus;
|
|
295
295
|
}
|
|
296
296
|
}
|
|
297
297
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canopycanopycanopy/b-ber-grammar-attributes",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"access": "public"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@canopycanopycanopy/b-ber-lib": "
|
|
21
|
-
"@canopycanopycanopy/b-ber-logger": "
|
|
22
|
-
"@canopycanopycanopy/b-ber-shapes-directives": "
|
|
20
|
+
"@canopycanopycanopy/b-ber-lib": "2.0.0",
|
|
21
|
+
"@canopycanopycanopy/b-ber-logger": "2.0.0",
|
|
22
|
+
"@canopycanopycanopy/b-ber-shapes-directives": "2.0.0",
|
|
23
23
|
"lodash": "^4.17.21",
|
|
24
24
|
"lodash.has": "latest",
|
|
25
25
|
"tar": "^6.1.11"
|
|
@@ -28,8 +28,9 @@
|
|
|
28
28
|
"@babel/cli": "^7.10.5",
|
|
29
29
|
"@babel/core": "^7.10.5",
|
|
30
30
|
"@babel/preset-env": "^7.10.4",
|
|
31
|
+
"browserslist": "^4.17.4",
|
|
31
32
|
"jest": "^26.6.3",
|
|
32
|
-
"rimraf": "^2.
|
|
33
|
+
"rimraf": "^2.7.1"
|
|
33
34
|
},
|
|
34
35
|
"files": [
|
|
35
36
|
"dist"
|
|
@@ -48,5 +49,5 @@
|
|
|
48
49
|
"url": "https://maxwellsimmer.com"
|
|
49
50
|
}
|
|
50
51
|
],
|
|
51
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "dbeae192709705f5bc211195ff343cbd999f9caf"
|
|
52
53
|
}
|