njk-tool 0.0.27 → 0.1.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/.env.example +11 -0
- package/dist/bundle/app.min.cjs +131 -113
- package/dist/bundle/app.min.cjs.map +1 -1
- package/dist/bundle/app.min.js +131 -113
- package/dist/bundle/app.min.js.map +1 -1
- package/dist/bundle/type.d.ts +63 -12
- package/package.json +58 -59
- package/readme.md +87 -9
package/dist/bundle/app.min.js
CHANGED
|
@@ -4971,7 +4971,7 @@ var hasRequiredUtils$1;
|
|
|
4971
4971
|
function requireUtils$1 () {
|
|
4972
4972
|
if (hasRequiredUtils$1) return utils$1;
|
|
4973
4973
|
hasRequiredUtils$1 = 1;
|
|
4974
|
-
(function (exports) {
|
|
4974
|
+
(function (exports$1) {
|
|
4975
4975
|
|
|
4976
4976
|
const path = require$$0$3;
|
|
4977
4977
|
const win32 = process.platform === 'win32';
|
|
@@ -4982,19 +4982,19 @@ function requireUtils$1 () {
|
|
|
4982
4982
|
REGEX_SPECIAL_CHARS_GLOBAL
|
|
4983
4983
|
} = requireConstants$2();
|
|
4984
4984
|
|
|
4985
|
-
exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
|
|
4986
|
-
exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);
|
|
4987
|
-
exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);
|
|
4988
|
-
exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1');
|
|
4989
|
-
exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');
|
|
4985
|
+
exports$1.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
|
|
4986
|
+
exports$1.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);
|
|
4987
|
+
exports$1.isRegexChar = str => str.length === 1 && exports$1.hasRegexChars(str);
|
|
4988
|
+
exports$1.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1');
|
|
4989
|
+
exports$1.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');
|
|
4990
4990
|
|
|
4991
|
-
exports.removeBackslashes = str => {
|
|
4991
|
+
exports$1.removeBackslashes = str => {
|
|
4992
4992
|
return str.replace(REGEX_REMOVE_BACKSLASH, match => {
|
|
4993
4993
|
return match === '\\' ? '' : match;
|
|
4994
4994
|
});
|
|
4995
4995
|
};
|
|
4996
4996
|
|
|
4997
|
-
exports.supportsLookbehinds = () => {
|
|
4997
|
+
exports$1.supportsLookbehinds = () => {
|
|
4998
4998
|
const segs = process.version.slice(1).split('.').map(Number);
|
|
4999
4999
|
if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) {
|
|
5000
5000
|
return true;
|
|
@@ -5002,21 +5002,21 @@ function requireUtils$1 () {
|
|
|
5002
5002
|
return false;
|
|
5003
5003
|
};
|
|
5004
5004
|
|
|
5005
|
-
exports.isWindows = options => {
|
|
5005
|
+
exports$1.isWindows = options => {
|
|
5006
5006
|
if (options && typeof options.windows === 'boolean') {
|
|
5007
5007
|
return options.windows;
|
|
5008
5008
|
}
|
|
5009
5009
|
return win32 === true || path.sep === '\\';
|
|
5010
5010
|
};
|
|
5011
5011
|
|
|
5012
|
-
exports.escapeLast = (input, char, lastIdx) => {
|
|
5012
|
+
exports$1.escapeLast = (input, char, lastIdx) => {
|
|
5013
5013
|
const idx = input.lastIndexOf(char, lastIdx);
|
|
5014
5014
|
if (idx === -1) return input;
|
|
5015
|
-
if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1);
|
|
5015
|
+
if (input[idx - 1] === '\\') return exports$1.escapeLast(input, char, idx - 1);
|
|
5016
5016
|
return `${input.slice(0, idx)}\\${input.slice(idx)}`;
|
|
5017
5017
|
};
|
|
5018
5018
|
|
|
5019
|
-
exports.removePrefix = (input, state = {}) => {
|
|
5019
|
+
exports$1.removePrefix = (input, state = {}) => {
|
|
5020
5020
|
let output = input;
|
|
5021
5021
|
if (output.startsWith('./')) {
|
|
5022
5022
|
output = output.slice(2);
|
|
@@ -5025,7 +5025,7 @@ function requireUtils$1 () {
|
|
|
5025
5025
|
return output;
|
|
5026
5026
|
};
|
|
5027
5027
|
|
|
5028
|
-
exports.wrapOutput = (input, state = {}, options = {}) => {
|
|
5028
|
+
exports$1.wrapOutput = (input, state = {}, options = {}) => {
|
|
5029
5029
|
const prepend = options.contains ? '' : '^';
|
|
5030
5030
|
const append = options.contains ? '' : '$';
|
|
5031
5031
|
|
|
@@ -7597,9 +7597,9 @@ var hasRequiredUtils;
|
|
|
7597
7597
|
function requireUtils () {
|
|
7598
7598
|
if (hasRequiredUtils) return utils;
|
|
7599
7599
|
hasRequiredUtils = 1;
|
|
7600
|
-
(function (exports) {
|
|
7600
|
+
(function (exports$1) {
|
|
7601
7601
|
|
|
7602
|
-
exports.isInteger = num => {
|
|
7602
|
+
exports$1.isInteger = num => {
|
|
7603
7603
|
if (typeof num === 'number') {
|
|
7604
7604
|
return Number.isInteger(num);
|
|
7605
7605
|
}
|
|
@@ -7613,15 +7613,15 @@ function requireUtils () {
|
|
|
7613
7613
|
* Find a node of the given type
|
|
7614
7614
|
*/
|
|
7615
7615
|
|
|
7616
|
-
exports.find = (node, type) => node.nodes.find(node => node.type === type);
|
|
7616
|
+
exports$1.find = (node, type) => node.nodes.find(node => node.type === type);
|
|
7617
7617
|
|
|
7618
7618
|
/**
|
|
7619
7619
|
* Find a node of the given type
|
|
7620
7620
|
*/
|
|
7621
7621
|
|
|
7622
|
-
exports.exceedsLimit = (min, max, step = 1, limit) => {
|
|
7622
|
+
exports$1.exceedsLimit = (min, max, step = 1, limit) => {
|
|
7623
7623
|
if (limit === false) return false;
|
|
7624
|
-
if (!exports.isInteger(min) || !exports.isInteger(max)) return false;
|
|
7624
|
+
if (!exports$1.isInteger(min) || !exports$1.isInteger(max)) return false;
|
|
7625
7625
|
return ((Number(max) - Number(min)) / Number(step)) >= limit;
|
|
7626
7626
|
};
|
|
7627
7627
|
|
|
@@ -7629,7 +7629,7 @@ function requireUtils () {
|
|
|
7629
7629
|
* Escape the given node with '\\' before node.value
|
|
7630
7630
|
*/
|
|
7631
7631
|
|
|
7632
|
-
exports.escapeNode = (block, n = 0, type) => {
|
|
7632
|
+
exports$1.escapeNode = (block, n = 0, type) => {
|
|
7633
7633
|
const node = block.nodes[n];
|
|
7634
7634
|
if (!node) return;
|
|
7635
7635
|
|
|
@@ -7645,7 +7645,7 @@ function requireUtils () {
|
|
|
7645
7645
|
* Returns true if the given brace node should be enclosed in literal braces
|
|
7646
7646
|
*/
|
|
7647
7647
|
|
|
7648
|
-
exports.encloseBrace = node => {
|
|
7648
|
+
exports$1.encloseBrace = node => {
|
|
7649
7649
|
if (node.type !== 'brace') return false;
|
|
7650
7650
|
if ((node.commas >> 0 + node.ranges >> 0) === 0) {
|
|
7651
7651
|
node.invalid = true;
|
|
@@ -7658,7 +7658,7 @@ function requireUtils () {
|
|
|
7658
7658
|
* Returns true if a brace node is invalid.
|
|
7659
7659
|
*/
|
|
7660
7660
|
|
|
7661
|
-
exports.isInvalidBrace = block => {
|
|
7661
|
+
exports$1.isInvalidBrace = block => {
|
|
7662
7662
|
if (block.type !== 'brace') return false;
|
|
7663
7663
|
if (block.invalid === true || block.dollar) return true;
|
|
7664
7664
|
if ((block.commas >> 0 + block.ranges >> 0) === 0) {
|
|
@@ -7676,7 +7676,7 @@ function requireUtils () {
|
|
|
7676
7676
|
* Returns true if a node is an open or close node
|
|
7677
7677
|
*/
|
|
7678
7678
|
|
|
7679
|
-
exports.isOpenOrClose = node => {
|
|
7679
|
+
exports$1.isOpenOrClose = node => {
|
|
7680
7680
|
if (node.type === 'open' || node.type === 'close') {
|
|
7681
7681
|
return true;
|
|
7682
7682
|
}
|
|
@@ -7687,7 +7687,7 @@ function requireUtils () {
|
|
|
7687
7687
|
* Reduce an array of text nodes.
|
|
7688
7688
|
*/
|
|
7689
7689
|
|
|
7690
|
-
exports.reduce = nodes => nodes.reduce((acc, node) => {
|
|
7690
|
+
exports$1.reduce = nodes => nodes.reduce((acc, node) => {
|
|
7691
7691
|
if (node.type === 'text') acc.push(node.value);
|
|
7692
7692
|
if (node.type === 'range') node.type = 'text';
|
|
7693
7693
|
return acc;
|
|
@@ -7697,7 +7697,7 @@ function requireUtils () {
|
|
|
7697
7697
|
* Flatten an array
|
|
7698
7698
|
*/
|
|
7699
7699
|
|
|
7700
|
-
exports.flatten = (...args) => {
|
|
7700
|
+
exports$1.flatten = (...args) => {
|
|
7701
7701
|
const result = [];
|
|
7702
7702
|
|
|
7703
7703
|
const flat = arr => {
|
|
@@ -9407,72 +9407,72 @@ var hasRequiredConstants;
|
|
|
9407
9407
|
function requireConstants () {
|
|
9408
9408
|
if (hasRequiredConstants) return constants;
|
|
9409
9409
|
hasRequiredConstants = 1;
|
|
9410
|
-
(function (exports) {
|
|
9410
|
+
(function (exports$1) {
|
|
9411
9411
|
|
|
9412
9412
|
const {sep} = require$$0$3;
|
|
9413
9413
|
const {platform} = process;
|
|
9414
9414
|
const os = require$$2$1;
|
|
9415
9415
|
|
|
9416
|
-
exports.EV_ALL = 'all';
|
|
9417
|
-
exports.EV_READY = 'ready';
|
|
9418
|
-
exports.EV_ADD = 'add';
|
|
9419
|
-
exports.EV_CHANGE = 'change';
|
|
9420
|
-
exports.EV_ADD_DIR = 'addDir';
|
|
9421
|
-
exports.EV_UNLINK = 'unlink';
|
|
9422
|
-
exports.EV_UNLINK_DIR = 'unlinkDir';
|
|
9423
|
-
exports.EV_RAW = 'raw';
|
|
9424
|
-
exports.EV_ERROR = 'error';
|
|
9425
|
-
|
|
9426
|
-
exports.STR_DATA = 'data';
|
|
9427
|
-
exports.STR_END = 'end';
|
|
9428
|
-
exports.STR_CLOSE = 'close';
|
|
9429
|
-
|
|
9430
|
-
exports.FSEVENT_CREATED = 'created';
|
|
9431
|
-
exports.FSEVENT_MODIFIED = 'modified';
|
|
9432
|
-
exports.FSEVENT_DELETED = 'deleted';
|
|
9433
|
-
exports.FSEVENT_MOVED = 'moved';
|
|
9434
|
-
exports.FSEVENT_CLONED = 'cloned';
|
|
9435
|
-
exports.FSEVENT_UNKNOWN = 'unknown';
|
|
9436
|
-
exports.FSEVENT_FLAG_MUST_SCAN_SUBDIRS = 1;
|
|
9437
|
-
exports.FSEVENT_TYPE_FILE = 'file';
|
|
9438
|
-
exports.FSEVENT_TYPE_DIRECTORY = 'directory';
|
|
9439
|
-
exports.FSEVENT_TYPE_SYMLINK = 'symlink';
|
|
9440
|
-
|
|
9441
|
-
exports.KEY_LISTENERS = 'listeners';
|
|
9442
|
-
exports.KEY_ERR = 'errHandlers';
|
|
9443
|
-
exports.KEY_RAW = 'rawEmitters';
|
|
9444
|
-
exports.HANDLER_KEYS = [exports.KEY_LISTENERS, exports.KEY_ERR, exports.KEY_RAW];
|
|
9445
|
-
|
|
9446
|
-
exports.DOT_SLASH = `.${sep}`;
|
|
9447
|
-
|
|
9448
|
-
exports.BACK_SLASH_RE = /\\/g;
|
|
9449
|
-
exports.DOUBLE_SLASH_RE = /\/\//;
|
|
9450
|
-
exports.SLASH_OR_BACK_SLASH_RE = /[/\\]/;
|
|
9451
|
-
exports.DOT_RE = /\..*\.(sw[px])$|~$|\.subl.*\.tmp/;
|
|
9452
|
-
exports.REPLACER_RE = /^\.[/\\]/;
|
|
9453
|
-
|
|
9454
|
-
exports.SLASH = '/';
|
|
9455
|
-
exports.SLASH_SLASH = '//';
|
|
9456
|
-
exports.BRACE_START = '{';
|
|
9457
|
-
exports.BANG = '!';
|
|
9458
|
-
exports.ONE_DOT = '.';
|
|
9459
|
-
exports.TWO_DOTS = '..';
|
|
9460
|
-
exports.STAR = '*';
|
|
9461
|
-
exports.GLOBSTAR = '**';
|
|
9462
|
-
exports.ROOT_GLOBSTAR = '/**/*';
|
|
9463
|
-
exports.SLASH_GLOBSTAR = '/**';
|
|
9464
|
-
exports.DIR_SUFFIX = 'Dir';
|
|
9465
|
-
exports.ANYMATCH_OPTS = {dot: true};
|
|
9466
|
-
exports.STRING_TYPE = 'string';
|
|
9467
|
-
exports.FUNCTION_TYPE = 'function';
|
|
9468
|
-
exports.EMPTY_STR = '';
|
|
9469
|
-
exports.EMPTY_FN = () => {};
|
|
9470
|
-
exports.IDENTITY_FN = val => val;
|
|
9471
|
-
|
|
9472
|
-
exports.isWindows = platform === 'win32';
|
|
9473
|
-
exports.isMacos = platform === 'darwin';
|
|
9474
|
-
exports.isLinux = platform === 'linux';
|
|
9475
|
-
exports.isIBMi = os.type() === 'OS400';
|
|
9416
|
+
exports$1.EV_ALL = 'all';
|
|
9417
|
+
exports$1.EV_READY = 'ready';
|
|
9418
|
+
exports$1.EV_ADD = 'add';
|
|
9419
|
+
exports$1.EV_CHANGE = 'change';
|
|
9420
|
+
exports$1.EV_ADD_DIR = 'addDir';
|
|
9421
|
+
exports$1.EV_UNLINK = 'unlink';
|
|
9422
|
+
exports$1.EV_UNLINK_DIR = 'unlinkDir';
|
|
9423
|
+
exports$1.EV_RAW = 'raw';
|
|
9424
|
+
exports$1.EV_ERROR = 'error';
|
|
9425
|
+
|
|
9426
|
+
exports$1.STR_DATA = 'data';
|
|
9427
|
+
exports$1.STR_END = 'end';
|
|
9428
|
+
exports$1.STR_CLOSE = 'close';
|
|
9429
|
+
|
|
9430
|
+
exports$1.FSEVENT_CREATED = 'created';
|
|
9431
|
+
exports$1.FSEVENT_MODIFIED = 'modified';
|
|
9432
|
+
exports$1.FSEVENT_DELETED = 'deleted';
|
|
9433
|
+
exports$1.FSEVENT_MOVED = 'moved';
|
|
9434
|
+
exports$1.FSEVENT_CLONED = 'cloned';
|
|
9435
|
+
exports$1.FSEVENT_UNKNOWN = 'unknown';
|
|
9436
|
+
exports$1.FSEVENT_FLAG_MUST_SCAN_SUBDIRS = 1;
|
|
9437
|
+
exports$1.FSEVENT_TYPE_FILE = 'file';
|
|
9438
|
+
exports$1.FSEVENT_TYPE_DIRECTORY = 'directory';
|
|
9439
|
+
exports$1.FSEVENT_TYPE_SYMLINK = 'symlink';
|
|
9440
|
+
|
|
9441
|
+
exports$1.KEY_LISTENERS = 'listeners';
|
|
9442
|
+
exports$1.KEY_ERR = 'errHandlers';
|
|
9443
|
+
exports$1.KEY_RAW = 'rawEmitters';
|
|
9444
|
+
exports$1.HANDLER_KEYS = [exports$1.KEY_LISTENERS, exports$1.KEY_ERR, exports$1.KEY_RAW];
|
|
9445
|
+
|
|
9446
|
+
exports$1.DOT_SLASH = `.${sep}`;
|
|
9447
|
+
|
|
9448
|
+
exports$1.BACK_SLASH_RE = /\\/g;
|
|
9449
|
+
exports$1.DOUBLE_SLASH_RE = /\/\//;
|
|
9450
|
+
exports$1.SLASH_OR_BACK_SLASH_RE = /[/\\]/;
|
|
9451
|
+
exports$1.DOT_RE = /\..*\.(sw[px])$|~$|\.subl.*\.tmp/;
|
|
9452
|
+
exports$1.REPLACER_RE = /^\.[/\\]/;
|
|
9453
|
+
|
|
9454
|
+
exports$1.SLASH = '/';
|
|
9455
|
+
exports$1.SLASH_SLASH = '//';
|
|
9456
|
+
exports$1.BRACE_START = '{';
|
|
9457
|
+
exports$1.BANG = '!';
|
|
9458
|
+
exports$1.ONE_DOT = '.';
|
|
9459
|
+
exports$1.TWO_DOTS = '..';
|
|
9460
|
+
exports$1.STAR = '*';
|
|
9461
|
+
exports$1.GLOBSTAR = '**';
|
|
9462
|
+
exports$1.ROOT_GLOBSTAR = '/**/*';
|
|
9463
|
+
exports$1.SLASH_GLOBSTAR = '/**';
|
|
9464
|
+
exports$1.DIR_SUFFIX = 'Dir';
|
|
9465
|
+
exports$1.ANYMATCH_OPTS = {dot: true};
|
|
9466
|
+
exports$1.STRING_TYPE = 'string';
|
|
9467
|
+
exports$1.FUNCTION_TYPE = 'function';
|
|
9468
|
+
exports$1.EMPTY_STR = '';
|
|
9469
|
+
exports$1.EMPTY_FN = () => {};
|
|
9470
|
+
exports$1.IDENTITY_FN = val => val;
|
|
9471
|
+
|
|
9472
|
+
exports$1.isWindows = platform === 'win32';
|
|
9473
|
+
exports$1.isMacos = platform === 'darwin';
|
|
9474
|
+
exports$1.isLinux = platform === 'linux';
|
|
9475
|
+
exports$1.isIBMi = os.type() === 'OS400';
|
|
9476
9476
|
} (constants));
|
|
9477
9477
|
return constants;
|
|
9478
9478
|
}
|
|
@@ -11817,7 +11817,7 @@ var hasRequiredTests;
|
|
|
11817
11817
|
function requireTests () {
|
|
11818
11818
|
if (hasRequiredTests) return tests;
|
|
11819
11819
|
hasRequiredTests = 1;
|
|
11820
|
-
(function (exports) {
|
|
11820
|
+
(function (exports$1) {
|
|
11821
11821
|
|
|
11822
11822
|
var SafeString = requireRuntime().SafeString;
|
|
11823
11823
|
|
|
@@ -11829,7 +11829,7 @@ function requireTests () {
|
|
|
11829
11829
|
function callable(value) {
|
|
11830
11830
|
return typeof value === 'function';
|
|
11831
11831
|
}
|
|
11832
|
-
exports.callable = callable;
|
|
11832
|
+
exports$1.callable = callable;
|
|
11833
11833
|
|
|
11834
11834
|
/**
|
|
11835
11835
|
* Returns `true` if the object is strictly not `undefined`.
|
|
@@ -11839,7 +11839,7 @@ function requireTests () {
|
|
|
11839
11839
|
function defined(value) {
|
|
11840
11840
|
return value !== undefined;
|
|
11841
11841
|
}
|
|
11842
|
-
exports.defined = defined;
|
|
11842
|
+
exports$1.defined = defined;
|
|
11843
11843
|
|
|
11844
11844
|
/**
|
|
11845
11845
|
* Returns `true` if the operand (one) is divisble by the test's argument
|
|
@@ -11851,7 +11851,7 @@ function requireTests () {
|
|
|
11851
11851
|
function divisibleby(one, two) {
|
|
11852
11852
|
return one % two === 0;
|
|
11853
11853
|
}
|
|
11854
|
-
exports.divisibleby = divisibleby;
|
|
11854
|
+
exports$1.divisibleby = divisibleby;
|
|
11855
11855
|
|
|
11856
11856
|
/**
|
|
11857
11857
|
* Returns true if the string has been escaped (i.e., is a SafeString).
|
|
@@ -11861,7 +11861,7 @@ function requireTests () {
|
|
|
11861
11861
|
function escaped(value) {
|
|
11862
11862
|
return value instanceof SafeString;
|
|
11863
11863
|
}
|
|
11864
|
-
exports.escaped = escaped;
|
|
11864
|
+
exports$1.escaped = escaped;
|
|
11865
11865
|
|
|
11866
11866
|
/**
|
|
11867
11867
|
* Returns `true` if the arguments are strictly equal.
|
|
@@ -11871,11 +11871,11 @@ function requireTests () {
|
|
|
11871
11871
|
function equalto(one, two) {
|
|
11872
11872
|
return one === two;
|
|
11873
11873
|
}
|
|
11874
|
-
exports.equalto = equalto;
|
|
11874
|
+
exports$1.equalto = equalto;
|
|
11875
11875
|
|
|
11876
11876
|
// Aliases
|
|
11877
|
-
exports.eq = exports.equalto;
|
|
11878
|
-
exports.sameas = exports.equalto;
|
|
11877
|
+
exports$1.eq = exports$1.equalto;
|
|
11878
|
+
exports$1.sameas = exports$1.equalto;
|
|
11879
11879
|
|
|
11880
11880
|
/**
|
|
11881
11881
|
* Returns `true` if the value is evenly divisible by 2.
|
|
@@ -11885,7 +11885,7 @@ function requireTests () {
|
|
|
11885
11885
|
function even(value) {
|
|
11886
11886
|
return value % 2 === 0;
|
|
11887
11887
|
}
|
|
11888
|
-
exports.even = even;
|
|
11888
|
+
exports$1.even = even;
|
|
11889
11889
|
|
|
11890
11890
|
/**
|
|
11891
11891
|
* Returns `true` if the value is falsy - if I recall correctly, '', 0, false,
|
|
@@ -11898,7 +11898,7 @@ function requireTests () {
|
|
|
11898
11898
|
function falsy(value) {
|
|
11899
11899
|
return !value;
|
|
11900
11900
|
}
|
|
11901
|
-
exports.falsy = falsy;
|
|
11901
|
+
exports$1.falsy = falsy;
|
|
11902
11902
|
|
|
11903
11903
|
/**
|
|
11904
11904
|
* Returns `true` if the operand (one) is greater or equal to the test's
|
|
@@ -11910,7 +11910,7 @@ function requireTests () {
|
|
|
11910
11910
|
function ge(one, two) {
|
|
11911
11911
|
return one >= two;
|
|
11912
11912
|
}
|
|
11913
|
-
exports.ge = ge;
|
|
11913
|
+
exports$1.ge = ge;
|
|
11914
11914
|
|
|
11915
11915
|
/**
|
|
11916
11916
|
* Returns `true` if the operand (one) is greater than the test's argument
|
|
@@ -11922,10 +11922,10 @@ function requireTests () {
|
|
|
11922
11922
|
function greaterthan(one, two) {
|
|
11923
11923
|
return one > two;
|
|
11924
11924
|
}
|
|
11925
|
-
exports.greaterthan = greaterthan;
|
|
11925
|
+
exports$1.greaterthan = greaterthan;
|
|
11926
11926
|
|
|
11927
11927
|
// alias
|
|
11928
|
-
exports.gt = exports.greaterthan;
|
|
11928
|
+
exports$1.gt = exports$1.greaterthan;
|
|
11929
11929
|
|
|
11930
11930
|
/**
|
|
11931
11931
|
* Returns `true` if the operand (one) is less than or equal to the test's
|
|
@@ -11937,7 +11937,7 @@ function requireTests () {
|
|
|
11937
11937
|
function le(one, two) {
|
|
11938
11938
|
return one <= two;
|
|
11939
11939
|
}
|
|
11940
|
-
exports.le = le;
|
|
11940
|
+
exports$1.le = le;
|
|
11941
11941
|
|
|
11942
11942
|
/**
|
|
11943
11943
|
* Returns `true` if the operand (one) is less than the test's passed argument
|
|
@@ -11949,10 +11949,10 @@ function requireTests () {
|
|
|
11949
11949
|
function lessthan(one, two) {
|
|
11950
11950
|
return one < two;
|
|
11951
11951
|
}
|
|
11952
|
-
exports.lessthan = lessthan;
|
|
11952
|
+
exports$1.lessthan = lessthan;
|
|
11953
11953
|
|
|
11954
11954
|
// alias
|
|
11955
|
-
exports.lt = exports.lessthan;
|
|
11955
|
+
exports$1.lt = exports$1.lessthan;
|
|
11956
11956
|
|
|
11957
11957
|
/**
|
|
11958
11958
|
* Returns `true` if the string is lowercased.
|
|
@@ -11962,7 +11962,7 @@ function requireTests () {
|
|
|
11962
11962
|
function lower(value) {
|
|
11963
11963
|
return value.toLowerCase() === value;
|
|
11964
11964
|
}
|
|
11965
|
-
exports.lower = lower;
|
|
11965
|
+
exports$1.lower = lower;
|
|
11966
11966
|
|
|
11967
11967
|
/**
|
|
11968
11968
|
* Returns `true` if the operand (one) is less than or equal to the test's
|
|
@@ -11974,7 +11974,7 @@ function requireTests () {
|
|
|
11974
11974
|
function ne(one, two) {
|
|
11975
11975
|
return one !== two;
|
|
11976
11976
|
}
|
|
11977
|
-
exports.ne = ne;
|
|
11977
|
+
exports$1.ne = ne;
|
|
11978
11978
|
|
|
11979
11979
|
/**
|
|
11980
11980
|
* Returns true if the value is strictly equal to `null`.
|
|
@@ -11984,7 +11984,7 @@ function requireTests () {
|
|
|
11984
11984
|
function nullTest(value) {
|
|
11985
11985
|
return value === null;
|
|
11986
11986
|
}
|
|
11987
|
-
exports.null = nullTest;
|
|
11987
|
+
exports$1.null = nullTest;
|
|
11988
11988
|
|
|
11989
11989
|
/**
|
|
11990
11990
|
* Returns true if value is a number.
|
|
@@ -11994,7 +11994,7 @@ function requireTests () {
|
|
|
11994
11994
|
function number(value) {
|
|
11995
11995
|
return typeof value === 'number';
|
|
11996
11996
|
}
|
|
11997
|
-
exports.number = number;
|
|
11997
|
+
exports$1.number = number;
|
|
11998
11998
|
|
|
11999
11999
|
/**
|
|
12000
12000
|
* Returns `true` if the value is *not* evenly divisible by 2.
|
|
@@ -12004,7 +12004,7 @@ function requireTests () {
|
|
|
12004
12004
|
function odd(value) {
|
|
12005
12005
|
return value % 2 === 1;
|
|
12006
12006
|
}
|
|
12007
|
-
exports.odd = odd;
|
|
12007
|
+
exports$1.odd = odd;
|
|
12008
12008
|
|
|
12009
12009
|
/**
|
|
12010
12010
|
* Returns `true` if the value is a string, `false` if not.
|
|
@@ -12014,7 +12014,7 @@ function requireTests () {
|
|
|
12014
12014
|
function string(value) {
|
|
12015
12015
|
return typeof value === 'string';
|
|
12016
12016
|
}
|
|
12017
|
-
exports.string = string;
|
|
12017
|
+
exports$1.string = string;
|
|
12018
12018
|
|
|
12019
12019
|
/**
|
|
12020
12020
|
* Returns `true` if the value is not in the list of things considered falsy:
|
|
@@ -12025,7 +12025,7 @@ function requireTests () {
|
|
|
12025
12025
|
function truthy(value) {
|
|
12026
12026
|
return !!value;
|
|
12027
12027
|
}
|
|
12028
|
-
exports.truthy = truthy;
|
|
12028
|
+
exports$1.truthy = truthy;
|
|
12029
12029
|
|
|
12030
12030
|
/**
|
|
12031
12031
|
* Returns `true` if the value is undefined.
|
|
@@ -12035,7 +12035,7 @@ function requireTests () {
|
|
|
12035
12035
|
function undefinedTest(value) {
|
|
12036
12036
|
return value === undefined;
|
|
12037
12037
|
}
|
|
12038
|
-
exports.undefined = undefinedTest;
|
|
12038
|
+
exports$1.undefined = undefinedTest;
|
|
12039
12039
|
|
|
12040
12040
|
/**
|
|
12041
12041
|
* Returns `true` if the string is uppercased.
|
|
@@ -12045,7 +12045,7 @@ function requireTests () {
|
|
|
12045
12045
|
function upper(value) {
|
|
12046
12046
|
return value.toUpperCase() === value;
|
|
12047
12047
|
}
|
|
12048
|
-
exports.upper = upper;
|
|
12048
|
+
exports$1.upper = upper;
|
|
12049
12049
|
|
|
12050
12050
|
/**
|
|
12051
12051
|
* If ES6 features are available, returns `true` if the value implements the
|
|
@@ -12064,7 +12064,7 @@ function requireTests () {
|
|
|
12064
12064
|
return Array.isArray(value) || typeof value === 'string';
|
|
12065
12065
|
}
|
|
12066
12066
|
}
|
|
12067
|
-
exports.iterable = iterable;
|
|
12067
|
+
exports$1.iterable = iterable;
|
|
12068
12068
|
|
|
12069
12069
|
/**
|
|
12070
12070
|
* If ES6 features are available, returns `true` if the value is an object hash
|
|
@@ -12081,7 +12081,7 @@ function requireTests () {
|
|
|
12081
12081
|
return bool;
|
|
12082
12082
|
}
|
|
12083
12083
|
}
|
|
12084
|
-
exports.mapping = mapping;
|
|
12084
|
+
exports$1.mapping = mapping;
|
|
12085
12085
|
} (tests));
|
|
12086
12086
|
return tests;
|
|
12087
12087
|
}
|
|
@@ -13280,7 +13280,10 @@ function requireNunjucks () {
|
|
|
13280
13280
|
var nunjucksExports = requireNunjucks();
|
|
13281
13281
|
var nunjucks = /*@__PURE__*/getDefaultExportFromCjs(nunjucksExports);
|
|
13282
13282
|
|
|
13283
|
-
|
|
13283
|
+
/**
|
|
13284
|
+
* 组件标签类型枚举
|
|
13285
|
+
* 包含所有支持的组件类型
|
|
13286
|
+
*/
|
|
13284
13287
|
var TagType;
|
|
13285
13288
|
(function (TagType) {
|
|
13286
13289
|
TagType["Title"] = "title";
|
|
@@ -13292,6 +13295,10 @@ var TagType;
|
|
|
13292
13295
|
TagType["Notice"] = "notice";
|
|
13293
13296
|
TagType["Block"] = "block";
|
|
13294
13297
|
TagType["Table"] = "table";
|
|
13298
|
+
TagType["Divider"] = "divider";
|
|
13299
|
+
TagType["Tag"] = "tag";
|
|
13300
|
+
TagType["ContentTitle"] = "title_content";
|
|
13301
|
+
TagType["Html"] = "html";
|
|
13295
13302
|
})(TagType || (TagType = {}));
|
|
13296
13303
|
|
|
13297
13304
|
const styleText = `<style>/* Components.css */
|
|
@@ -13710,6 +13717,15 @@ const templateText = `<!-- Head.njk -->
|
|
|
13710
13717
|
</table>
|
|
13711
13718
|
{% endmacro %}
|
|
13712
13719
|
<!-- /Head.njk -->
|
|
13720
|
+
<!-- Html.njk -->
|
|
13721
|
+
{% macro use_html(ctx) %}
|
|
13722
|
+
{% if ctx.html %}
|
|
13723
|
+
{{ ctx.html | safe }}
|
|
13724
|
+
{% elif ctx.code %}
|
|
13725
|
+
{{ ctx.code | safe }}
|
|
13726
|
+
{% endif %}
|
|
13727
|
+
{% endmacro %}
|
|
13728
|
+
<!-- /Html.njk -->
|
|
13713
13729
|
<!-- TOC.njk -->
|
|
13714
13730
|
{% macro use_toc(ctx) %}
|
|
13715
13731
|
<div class="article-toc">
|
|
@@ -14044,6 +14060,8 @@ display: block;
|
|
|
14044
14060
|
{{ use_tag(ctx) }}
|
|
14045
14061
|
{% elif ctx.tag == "title_content" %}
|
|
14046
14062
|
{{ use_content_title(ctx) }}
|
|
14063
|
+
{% elif ctx.tag == "html" %}
|
|
14064
|
+
{{ use_html(ctx) }}
|
|
14047
14065
|
{% else %}
|
|
14048
14066
|
{{ title_default(ctx) }}
|
|
14049
14067
|
{% endif %}
|