@canopycanopycanopy/b-ber-grammar-section 1.2.13-react-reader.6 → 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 +14 -10
- package/package.json +10 -9
package/dist/index.js
CHANGED
|
@@ -48,19 +48,18 @@ var _bBerGrammarRenderer = _interopRequireDefault(require("@canopycanopycanopy/b
|
|
|
48
48
|
|
|
49
49
|
var _bBerGrammarAttributes = require("@canopycanopycanopy/b-ber-grammar-attributes");
|
|
50
50
|
|
|
51
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object);
|
|
51
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
52
52
|
|
|
53
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
53
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context2 = ownKeys(Object(source), !0)).call(_context2, function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context3 = ownKeys(Object(source))).call(_context3, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
54
54
|
|
|
55
|
-
//
|
|
55
|
+
// This matches *all* container-type directives, and outputs the appropriate
|
|
56
56
|
// HTML based on user-defined attributes
|
|
57
|
-
const containers = (0, _from.default)(_bBerShapesDirectives.BLOCK_DIRECTIVES).join('|'); //
|
|
57
|
+
const containers = (0, _from.default)(_bBerShapesDirectives.BLOCK_DIRECTIVES).join('|'); // Treat `exit` like an opening marker
|
|
58
58
|
|
|
59
59
|
const MARKER_OPEN_RE = new RegExp(`^(${containers}|exit)(?::([^\\s]+)(\\s.*)?)?$`);
|
|
60
|
-
const MARKER_CLOSE_RE = /(exit)(?::([^\s]+))?/; //
|
|
61
|
-
//
|
|
62
|
-
//
|
|
63
|
-
// testing
|
|
60
|
+
const MARKER_CLOSE_RE = /(exit)(?::([^\s]+))?/; // `context` must be available in this `render` method and is passed
|
|
61
|
+
// into `createRenderer` below. Default for `context` is set for use
|
|
62
|
+
// during tests
|
|
64
63
|
|
|
65
64
|
function isGallery(directive) {
|
|
66
65
|
return directive && directive.type === 'gallery' && (_State.default.build === 'web' || _State.default.build === 'reader');
|
|
@@ -95,14 +94,19 @@ function handleExitDirective(token) {
|
|
|
95
94
|
|
|
96
95
|
if (isSpread(directive)) {
|
|
97
96
|
return `</div>
|
|
98
|
-
</div
|
|
97
|
+
</div>
|
|
98
|
+
|
|
99
|
+
${_State.default.build === 'reader' ? `<!-- Empty node required for spread markers -->
|
|
100
|
+
<div></div>` : ''}
|
|
101
|
+
|
|
102
|
+
${comment}`;
|
|
99
103
|
}
|
|
100
104
|
|
|
101
105
|
return `</section>${comment}`;
|
|
102
106
|
}
|
|
103
107
|
|
|
104
108
|
function openElement(token, fileName, lineNumber) {
|
|
105
|
-
//
|
|
109
|
+
// Destructure the attributes from matches, omitting `matches[0]` since
|
|
106
110
|
// we're only interested in the captures
|
|
107
111
|
const [, type, id, attr] = token;
|
|
108
112
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canopycanopycanopy/b-ber-grammar-section",
|
|
3
|
-
"version": "1.2.13-react-reader.
|
|
3
|
+
"version": "1.2.13-react-reader.63+9866626a",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -20,16 +20,17 @@
|
|
|
20
20
|
"@babel/cli": "^7.10.5",
|
|
21
21
|
"@babel/core": "^7.10.5",
|
|
22
22
|
"@babel/preset-env": "^7.10.4",
|
|
23
|
+
"browserslist": "^4.17.4",
|
|
23
24
|
"jest": "^26.6.3",
|
|
24
|
-
"rimraf": "^2.
|
|
25
|
+
"rimraf": "^2.7.1"
|
|
25
26
|
},
|
|
26
27
|
"dependencies": {
|
|
27
|
-
"@canopycanopycanopy/b-ber-grammar-attributes": "1.2.13-react-reader.
|
|
28
|
-
"@canopycanopycanopy/b-ber-grammar-renderer": "1.2.13-react-reader.
|
|
29
|
-
"@canopycanopycanopy/b-ber-lib": "1.2.13-react-reader.
|
|
30
|
-
"@canopycanopycanopy/b-ber-logger": "1.2.
|
|
31
|
-
"@canopycanopycanopy/b-ber-parser-section": "1.2.13-react-reader.
|
|
32
|
-
"@canopycanopycanopy/b-ber-shapes-directives": "1.2.
|
|
28
|
+
"@canopycanopycanopy/b-ber-grammar-attributes": "1.2.13-react-reader.63+9866626a",
|
|
29
|
+
"@canopycanopycanopy/b-ber-grammar-renderer": "1.2.13-react-reader.63+9866626a",
|
|
30
|
+
"@canopycanopycanopy/b-ber-lib": "1.2.13-react-reader.63+9866626a",
|
|
31
|
+
"@canopycanopycanopy/b-ber-logger": "1.2.12",
|
|
32
|
+
"@canopycanopycanopy/b-ber-parser-section": "1.2.13-react-reader.63+9866626a",
|
|
33
|
+
"@canopycanopycanopy/b-ber-shapes-directives": "1.2.12",
|
|
33
34
|
"lodash": "^4.17.21",
|
|
34
35
|
"lodash.find": "latest",
|
|
35
36
|
"tar": "^6.1.11"
|
|
@@ -51,5 +52,5 @@
|
|
|
51
52
|
"url": "https://maxwellsimmer.com"
|
|
52
53
|
}
|
|
53
54
|
],
|
|
54
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "9866626aedfa1c5c08c279f147636c1973178b06"
|
|
55
56
|
}
|