@canopycanopycanopy/b-ber-grammar-attributes 1.2.13-media-queries.53 → 1.2.13-react-reader.63
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 +9 -11
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -40,6 +40,8 @@ var _lodash = _interopRequireDefault(require("lodash.has"));
|
|
|
40
40
|
|
|
41
41
|
var _bBerLib = require("@canopycanopycanopy/b-ber-lib");
|
|
42
42
|
|
|
43
|
+
var _utils = require("@canopycanopycanopy/b-ber-lib/utils");
|
|
44
|
+
|
|
43
45
|
var _bBerLogger = _interopRequireDefault(require("@canopycanopycanopy/b-ber-logger"));
|
|
44
46
|
|
|
45
47
|
var _bBerShapesDirectives = require("@canopycanopycanopy/b-ber-shapes-directives");
|
|
@@ -66,11 +68,11 @@ const _isUnsupportedAttribute = (genus, attr) => {
|
|
|
66
68
|
let key;
|
|
67
69
|
|
|
68
70
|
if (_bBerShapesDirectives.BLOCK_DIRECTIVES.has(genus)) {
|
|
69
|
-
//
|
|
71
|
+
// these are all containers which share the same attributes, so they're
|
|
70
72
|
// grouped under a single property
|
|
71
73
|
key = 'block';
|
|
72
74
|
} else {
|
|
73
|
-
//
|
|
75
|
+
// this will be the directive name, e.g., figure, video, etc
|
|
74
76
|
key = genus;
|
|
75
77
|
}
|
|
76
78
|
|
|
@@ -273,17 +275,13 @@ const attributesObject = (attrs, origGenus, context = {}) => {
|
|
|
273
275
|
}
|
|
274
276
|
|
|
275
277
|
if (attrs && typeof attrs === 'string') {
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
if (_isUnsupportedAttribute(genus, key)) {
|
|
280
|
-
_bBerLogger.default.warn(`render omitting unsupported attribute [${key}] at [${fileName}:${lineNumber}]`);
|
|
281
|
-
|
|
282
|
-
continue;
|
|
278
|
+
(0, _utils.forOf)(parseAttrs((0, _trim.default)(attrs).call(attrs)), (k, v) => {
|
|
279
|
+
if (_isUnsupportedAttribute(origGenus, k)) {
|
|
280
|
+
return _bBerLogger.default.warn(`render omitting unsupported attribute [${k}] at [${fileName}:${lineNumber}]`);
|
|
283
281
|
}
|
|
284
282
|
|
|
285
|
-
attrsObject[
|
|
286
|
-
}
|
|
283
|
+
attrsObject[k] = v;
|
|
284
|
+
});
|
|
287
285
|
} // Add original `origGenus` as a class to the attrs object in case it's
|
|
288
286
|
// different from the current `genus` (which might've changed due to it's
|
|
289
287
|
// specification). do this to keep styling consistent
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canopycanopycanopy/b-ber-grammar-attributes",
|
|
3
|
-
"version": "1.2.13-
|
|
3
|
+
"version": "1.2.13-react-reader.63+9866626a",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"access": "public"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@canopycanopycanopy/b-ber-lib": "1.2.13-
|
|
20
|
+
"@canopycanopycanopy/b-ber-lib": "1.2.13-react-reader.63+9866626a",
|
|
21
21
|
"@canopycanopycanopy/b-ber-logger": "1.2.12",
|
|
22
22
|
"@canopycanopycanopy/b-ber-shapes-directives": "1.2.12",
|
|
23
23
|
"lodash": "^4.17.21",
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"url": "https://maxwellsimmer.com"
|
|
50
50
|
}
|
|
51
51
|
],
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "9866626aedfa1c5c08c279f147636c1973178b06"
|
|
53
53
|
}
|