@medyll/cssfabric 0.0.10
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/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/cssfabric.iml +11 -0
- package/.idea/misc.xml +9 -0
- package/.idea/modules.xml +8 -0
- package/.idea/vcs.xml +6 -0
- package/.vscode/settings.json +24 -0
- package/README.md +240 -0
- package/cssfabric.config.js +3 -0
- package/cssfabric.json +8 -0
- package/gulpfile.js +610 -0
- package/lib/_generated/export.variables.json +583 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +7 -0
- package/lib/scripts/cssfabric.d.ts +24 -0
- package/lib/scripts/cssfabric.js +48 -0
- package/lib/scripts/cssfabricClassNames.d.ts +14 -0
- package/lib/scripts/cssfabricClassNames.js +150 -0
- package/lib/scripts/utils.d.ts +5 -0
- package/lib/scripts/utils.js +40 -0
- package/lib/styles/core/animation/animation.css +0 -0
- package/lib/styles/core/animation/animation.min.css +0 -0
- package/lib/styles/core/base/base.css +222 -0
- package/lib/styles/core/base/base.min.css +1 -0
- package/lib/styles/core/box/box.css +2263 -0
- package/lib/styles/core/box/box.min.css +1 -0
- package/lib/styles/core/box/box.responsive.css +13590 -0
- package/lib/styles/core/box/box.responsive.min.css +1 -0
- package/lib/styles/core/color/color.css +923 -0
- package/lib/styles/core/color/color.min.css +1 -0
- package/lib/styles/core/color/color.responsive.css +5550 -0
- package/lib/styles/core/color/color.responsive.min.css +1 -0
- package/lib/styles/core/flex/flex.css +140 -0
- package/lib/styles/core/flex/flex.min.css +1 -0
- package/lib/styles/core/flex/flex.responsive.css +852 -0
- package/lib/styles/core/flex/flex.responsive.min.css +1 -0
- package/lib/styles/core/grid/grid.css +50 -0
- package/lib/styles/core/grid/grid.min.css +1 -0
- package/lib/styles/core/grid/grid.responsive.css +312 -0
- package/lib/styles/core/grid/grid.responsive.min.css +1 -0
- package/lib/styles/core/main.css +2263 -0
- package/lib/styles/core/main.min.css +1 -0
- package/lib/styles/core/menu/menu.css +97 -0
- package/lib/styles/core/menu/menu.min.css +1 -0
- package/lib/styles/core/menu/menu.responsive.css +504 -0
- package/lib/styles/core/menu/menu.responsive.min.css +1 -0
- package/lib/styles/core/overflow/overflow.css +60 -0
- package/lib/styles/core/overflow/overflow.min.css +1 -0
- package/lib/styles/core/overflow/overflow.responsive.css +367 -0
- package/lib/styles/core/overflow/overflow.responsive.min.css +1 -0
- package/lib/styles/core/scale/scale.css +639 -0
- package/lib/styles/core/scale/scale.min.css +1 -0
- package/lib/styles/core/scale/scale.responsive.css +3846 -0
- package/lib/styles/core/scale/scale.responsive.min.css +1 -0
- package/lib/styles/core/table/table.css +72 -0
- package/lib/styles/core/table/table.min.css +1 -0
- package/lib/styles/core/table/table.responsive.css +444 -0
- package/lib/styles/core/table/table.responsive.min.css +1 -0
- package/lib/styles/core/text/text.css +147 -0
- package/lib/styles/core/text/text.min.css +1 -0
- package/lib/styles/core/text/text.responsive.css +894 -0
- package/lib/styles/core/text/text.responsive.min.css +1 -0
- package/lib/styles/core/theme/theme.css +197 -0
- package/lib/styles/core/theme/theme.min.css +1 -0
- package/lib/styles/core/vars.css +278 -0
- package/lib/styles/core/vars.min.css +1 -0
- package/lib/styles/core/zindex/zindex.css +279 -0
- package/lib/styles/core/zindex/zindex.min.css +1 -0
- package/lib/styles/cssfabric.css +7631 -0
- package/lib/styles/cssfabric.min.css +15 -0
- package/lib/styles/cssfabric.responsive.css +26359 -0
- package/lib/styles/cssfabric.responsive.min.css +9 -0
- package/package.json +67 -0
- package/src/_generated/export.variables.json +756 -0
- package/src/_generated/export.variables.md +240 -0
- package/src/_generated/index.d.ts +3 -0
- package/src/cssfabric/_utils.scss +205 -0
- package/src/cssfabric/index.d.ts +3 -0
- package/src/cssfabric/modules/_cssfabric-config.scss +89 -0
- package/src/cssfabric/modules/_mixins.scss +1 -0
- package/src/cssfabric/modules/animation/_animation-build.scss +121 -0
- package/src/cssfabric/modules/animation/_animation-vars.scss +17 -0
- package/src/cssfabric/modules/animation/animation.scss +3 -0
- package/src/cssfabric/modules/base/_base-vars.scss +17 -0
- package/src/cssfabric/modules/base/base.scss +80 -0
- package/src/cssfabric/modules/box/_box-build.scss +215 -0
- package/src/cssfabric/modules/box/_box-vars.scss +119 -0
- package/src/cssfabric/modules/box/box-responsive.scss +18 -0
- package/src/cssfabric/modules/box/box.scss +3 -0
- package/src/cssfabric/modules/color/_color-build.scss +108 -0
- package/src/cssfabric/modules/color/_color-vars.scss +80 -0
- package/src/cssfabric/modules/color/color-responsive.scss +23 -0
- package/src/cssfabric/modules/color/color.scss +3 -0
- package/src/cssfabric/modules/css-fabric.scss +2 -0
- package/src/cssfabric/modules/flex/_flex-build.scss +169 -0
- package/src/cssfabric/modules/flex/_flex-vars.scss +87 -0
- package/src/cssfabric/modules/flex/flex-responsive.scss +25 -0
- package/src/cssfabric/modules/flex/flex.scss +3 -0
- package/src/cssfabric/modules/grid/_grid-build.scss +91 -0
- package/src/cssfabric/modules/grid/_grid-vars.scss +87 -0
- package/src/cssfabric/modules/grid/grid-responsive.scss +25 -0
- package/src/cssfabric/modules/grid/grid.scss +3 -0
- package/src/cssfabric/modules/main.scss +3 -0
- package/src/cssfabric/modules/menu/_menu-build.scss +119 -0
- package/src/cssfabric/modules/menu/_menu-vars.scss +29 -0
- package/src/cssfabric/modules/menu/menu-responsive.scss +19 -0
- package/src/cssfabric/modules/menu/menu.scss +3 -0
- package/src/cssfabric/modules/overflow/_overflow-build.scss +22 -0
- package/src/cssfabric/modules/overflow/_overflow-vars.scss +31 -0
- package/src/cssfabric/modules/overflow/overflow-responsive.scss +25 -0
- package/src/cssfabric/modules/overflow/overflow.scss +5 -0
- package/src/cssfabric/modules/scale/_scale-build.scss +129 -0
- package/src/cssfabric/modules/scale/_scale-vars.scss +75 -0
- package/src/cssfabric/modules/scale/scale-responsive.scss +23 -0
- package/src/cssfabric/modules/scale/scale.scss +3 -0
- package/src/cssfabric/modules/table/_table-build.scss +134 -0
- package/src/cssfabric/modules/table/_table-vars.scss +30 -0
- package/src/cssfabric/modules/table/table-responsive.scss +24 -0
- package/src/cssfabric/modules/table/table.scss +3 -0
- package/src/cssfabric/modules/text/_text-build.scss +109 -0
- package/src/cssfabric/modules/text/_text-vars.scss +87 -0
- package/src/cssfabric/modules/text/text-responsive.scss +25 -0
- package/src/cssfabric/modules/text/text.scss +5 -0
- package/src/cssfabric/modules/theme/_theme-build.scss +77 -0
- package/src/cssfabric/modules/theme/_theme-vars.scss +47 -0
- package/src/cssfabric/modules/theme/theme.scss +5 -0
- package/src/cssfabric/modules/vars.scss +120 -0
- package/src/cssfabric/modules/zindex/_zindex-vars.scss +19 -0
- package/src/cssfabric/modules/zindex/zindex.scss +18 -0
- package/src/index.d.ts +3 -0
- package/src/index.ts +4 -0
- package/src/scripts/cssfabric.ts +54 -0
- package/src/scripts/cssfabricClassNames.ts +216 -0
- package/src/scripts/utils.ts +37 -0
- package/src/vendor/index.d.ts +3 -0
- package/src/vendor/normalize/normalize.min.css +2 -0
- package/src/vendor/sass-json-export/CHANGELOG.md +26 -0
- package/src/vendor/sass-json-export/Gruntfile.js +60 -0
- package/src/vendor/sass-json-export/LICENSE +20 -0
- package/src/vendor/sass-json-export/README.md +90 -0
- package/src/vendor/sass-json-export/package.json +60 -0
- package/src/vendor/sass-json-export/stylesheets/encode/api/_json.scss +26 -0
- package/src/vendor/sass-json-export/stylesheets/encode/encode.scss +17 -0
- package/src/vendor/sass-json-export/stylesheets/encode/helpers/_quote.scss +9 -0
- package/src/vendor/sass-json-export/stylesheets/encode/mixins/_json.scss +42 -0
- package/src/vendor/sass-json-export/stylesheets/encode/types/_bool.scss +7 -0
- package/src/vendor/sass-json-export/stylesheets/encode/types/_color.scss +8 -0
- package/src/vendor/sass-json-export/stylesheets/encode/types/_list.scss +14 -0
- package/src/vendor/sass-json-export/stylesheets/encode/types/_map.scss +15 -0
- package/src/vendor/sass-json-export/stylesheets/encode/types/_null.scss +7 -0
- package/src/vendor/sass-json-export/stylesheets/encode/types/_number.scss +8 -0
- package/src/vendor/sass-json-export/stylesheets/encode/types/_string.scss +8 -0
- package/src/vendor/sass-json-export/stylesheets/sass-json-export.scss +2 -0
- package/src/vendor/sass-json-export/test/encode/_index.scss +14 -0
- package/src/vendor/sass-json-export/test/encode/api/_json.scss +29 -0
- package/src/vendor/sass-json-export/test/encode/helpers/_quote.scss +6 -0
- package/src/vendor/sass-json-export/test/encode/types/_bool.scss +6 -0
- package/src/vendor/sass-json-export/test/encode/types/_color.scss +7 -0
- package/src/vendor/sass-json-export/test/encode/types/_list.scss +25 -0
- package/src/vendor/sass-json-export/test/encode/types/_map.scss +17 -0
- package/src/vendor/sass-json-export/test/encode/types/_null.scss +8 -0
- package/src/vendor/sass-json-export/test/encode/types/_number.scss +68 -0
- package/src/vendor/sass-json-export/test/encode/types/_string.scss +9 -0
- package/src/vendor/sass-json-export/test/test.scss +9 -0
- package/tsconfig.json +46 -0
- package/webpack.config.js +53 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const export_variables_json_1 = __importDefault(require("../_generated/export.variables.json"));
|
|
7
|
+
const cssfabricClassNames_1 = __importDefault(require("./cssfabricClassNames"));
|
|
8
|
+
//
|
|
9
|
+
const getModuleList = () => {
|
|
10
|
+
return export_variables_json_1.default["cssfabric"]?.["modules"] || {};
|
|
11
|
+
};
|
|
12
|
+
const getModuleConfig = (module) => {
|
|
13
|
+
if (module)
|
|
14
|
+
return export_variables_json_1.default["cssfabric"]?.["modules"]?.[module] || {};
|
|
15
|
+
return export_variables_json_1.default;
|
|
16
|
+
};
|
|
17
|
+
const getModuleData = (module) => {
|
|
18
|
+
if (module)
|
|
19
|
+
return export_variables_json_1.default["cssfabric"]?.["modules"]?.[module]?.["_data"] || {};
|
|
20
|
+
return export_variables_json_1.default;
|
|
21
|
+
};
|
|
22
|
+
const getModuleMetaData = (module) => {
|
|
23
|
+
if (module)
|
|
24
|
+
return export_variables_json_1.default["cssfabric"]?.["modules"]?.[module]?.["_metadata"] || {};
|
|
25
|
+
return export_variables_json_1.default;
|
|
26
|
+
};
|
|
27
|
+
const getModuleDocs = (module) => {
|
|
28
|
+
if (module)
|
|
29
|
+
return export_variables_json_1.default["cssfabric"]?.["modules"]?.[module]?.["_docs"] || {};
|
|
30
|
+
return export_variables_json_1.default;
|
|
31
|
+
};
|
|
32
|
+
const getModuleDocsAttributes = (module) => {
|
|
33
|
+
if (module)
|
|
34
|
+
return export_variables_json_1.default["cssfabric"]?.["modules"]?.[module]?.["_docs"]?.["attributes"] || {};
|
|
35
|
+
return export_variables_json_1.default;
|
|
36
|
+
};
|
|
37
|
+
exports.default = {
|
|
38
|
+
getModuleList,
|
|
39
|
+
getModuleConfig,
|
|
40
|
+
getModuleData,
|
|
41
|
+
getModuleMetaData,
|
|
42
|
+
getModuleDocs,
|
|
43
|
+
getModuleDocsAttributes,
|
|
44
|
+
getClassNames: cssfabricClassNames_1.default,
|
|
45
|
+
getModuleClassNames: cssfabricClassNames_1.default,
|
|
46
|
+
getModuleTagClassNames: cssfabricClassNames_1.default.getModuleTagClassNames,
|
|
47
|
+
getModuleTagDebug: cssfabricClassNames_1.default.getModuleTagDebug,
|
|
48
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface IListCssfabricClassNamesProps {
|
|
2
|
+
module: string;
|
|
3
|
+
moduleAttribute: any;
|
|
4
|
+
outputStyle?: 'default' | 'debug';
|
|
5
|
+
}
|
|
6
|
+
export interface ILoopIt {
|
|
7
|
+
module: string;
|
|
8
|
+
}
|
|
9
|
+
declare function cssfabricClassNames(props: IListCssfabricClassNamesProps): Record<string, any>;
|
|
10
|
+
declare const _default: {
|
|
11
|
+
getModuleTagClassNames: typeof cssfabricClassNames;
|
|
12
|
+
getModuleTagDebug: (props: IListCssfabricClassNamesProps) => Record<string, any>;
|
|
13
|
+
};
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const cssfabric_1 = __importDefault(require("./cssfabric"));
|
|
7
|
+
function loopIt(props) {
|
|
8
|
+
const { module } = props;
|
|
9
|
+
const moduleAttributes = cssfabric_1.default.getModuleDocsAttributes(module);
|
|
10
|
+
}
|
|
11
|
+
function cssfabricClassNames(props) {
|
|
12
|
+
const { module, moduleAttribute, outputStyle } = props;
|
|
13
|
+
const moduleAttributes = cssfabric_1.default.getModuleDocsAttributes(module);
|
|
14
|
+
const fabricAttributes = moduleAttributes[moduleAttribute];
|
|
15
|
+
const moduleTag = fabricAttributes["tag"];
|
|
16
|
+
const moduleKeys = fabricAttributes["keys"] || undefined;
|
|
17
|
+
const moduleLevels = fabricAttributes["levels"] || undefined;
|
|
18
|
+
const moduleLevelsLinked = fabricAttributes["levelsLinked"] || undefined;
|
|
19
|
+
const moduleLevelsExtended = fabricAttributes["levelsDeclin"] || undefined;
|
|
20
|
+
const moduleClassNames = fabricAttributes["classNames"] || undefined;
|
|
21
|
+
let finalOutput = [];
|
|
22
|
+
let finalOutputDebug = {};
|
|
23
|
+
return doParse(outputStyle);
|
|
24
|
+
function doParse(mode) {
|
|
25
|
+
let keyList, levelList, levelListLinked, levelListDeclin;
|
|
26
|
+
const finalOut = [];
|
|
27
|
+
const debugOut = {};
|
|
28
|
+
if (moduleKeys && moduleKeys.length) {
|
|
29
|
+
// beware of any [][]
|
|
30
|
+
keyList = concatenateWithKey(moduleTag, moduleKeys);
|
|
31
|
+
}
|
|
32
|
+
if (moduleLevels && Object.keys(moduleLevels).length) { // object !!!
|
|
33
|
+
levelList = Object.keys(moduleLevels).map((level) => {
|
|
34
|
+
let val = moduleLevels[level];
|
|
35
|
+
return concatenateWithKey(level, val);
|
|
36
|
+
}).flat();
|
|
37
|
+
}
|
|
38
|
+
if (moduleLevelsLinked && Object.keys(moduleLevelsLinked).length) {
|
|
39
|
+
levelListLinked = Object.keys(moduleLevelsLinked).map((level) => {
|
|
40
|
+
let val = moduleLevelsLinked[level];
|
|
41
|
+
return concatenateWithKey(level, val);
|
|
42
|
+
}).flat();
|
|
43
|
+
}
|
|
44
|
+
if (moduleLevelsExtended && Object.keys(moduleLevelsExtended).length) {
|
|
45
|
+
levelListDeclin = Object.keys(moduleLevelsExtended).map((level) => {
|
|
46
|
+
let val = moduleLevelsLinked[level];
|
|
47
|
+
return concatenateWithKey(level, val);
|
|
48
|
+
}).flat();
|
|
49
|
+
}
|
|
50
|
+
// prefix all now , and link
|
|
51
|
+
// colors :
|
|
52
|
+
if (keyList && !moduleLevels && !moduleLevelsLinked) {
|
|
53
|
+
// export
|
|
54
|
+
finalOut.push(keyList);
|
|
55
|
+
registerDebug('default', keyList);
|
|
56
|
+
}
|
|
57
|
+
if (moduleKeys && (moduleLevels || moduleLevelsLinked)) {
|
|
58
|
+
// base
|
|
59
|
+
if (moduleLevels) {
|
|
60
|
+
let tg = keyList.map(x => {
|
|
61
|
+
let tre = Object.keys(moduleLevels).map((level) => {
|
|
62
|
+
let val = moduleLevels[level];
|
|
63
|
+
let debugKey = (x !== '_' && x.toString().charAt(0) !== '_') ? x : level;
|
|
64
|
+
debugKey = (level.toString().charAt(0) === '_') ? debugKey : debugKey + '-' + level;
|
|
65
|
+
registerDebug(x, concatenateWithKey(debugKey, val), level);
|
|
66
|
+
return concatenateWithKey(level, val);
|
|
67
|
+
}).flat(4);
|
|
68
|
+
return concatenateWithKey(x, tre);
|
|
69
|
+
});
|
|
70
|
+
// is it declinated ? only colors, so nope
|
|
71
|
+
// export
|
|
72
|
+
finalOut.push(tg.flat());
|
|
73
|
+
}
|
|
74
|
+
// if moduleLevelsLinked // only color ?
|
|
75
|
+
if (moduleLevelsLinked) {
|
|
76
|
+
//
|
|
77
|
+
let yt = Object.values(moduleKeys).map(moduleKey => {
|
|
78
|
+
if (moduleKeys.includes(moduleKey)) {
|
|
79
|
+
let out = [];
|
|
80
|
+
// linked are here !!
|
|
81
|
+
registerDebug('linked', concatenateWithKey(moduleTag + '-' + moduleKey, moduleLevelsLinked[moduleKey]), moduleKey);
|
|
82
|
+
out.push(concatenateWithKey(moduleKey, moduleLevelsLinked[moduleKey]));
|
|
83
|
+
// is it declinated ?
|
|
84
|
+
if (moduleLevelsExtended && moduleLevelsExtended[moduleKey]) {
|
|
85
|
+
//
|
|
86
|
+
out.push(moduleLevelsLinked[moduleKey].map((z) => {
|
|
87
|
+
// iddem
|
|
88
|
+
registerDebug('declinated', concatenateWithKey(moduleTag + '-' + moduleKey + '-' + z, moduleLevelsExtended[moduleKey]), z);
|
|
89
|
+
return concatenateWithKey(z, moduleLevelsExtended[moduleKey]);
|
|
90
|
+
}).flat(2));
|
|
91
|
+
}
|
|
92
|
+
// flatten for group here
|
|
93
|
+
return out.flat(2);
|
|
94
|
+
}
|
|
95
|
+
}).flat();
|
|
96
|
+
// export
|
|
97
|
+
finalOut.push(concatenateWithKey(moduleTag, yt));
|
|
98
|
+
}
|
|
99
|
+
if (levelListDeclin) {
|
|
100
|
+
} // only colors ? don't go there
|
|
101
|
+
}
|
|
102
|
+
if (!keyList && levelList) {
|
|
103
|
+
// export
|
|
104
|
+
let kkk = concatenateWithKey(moduleTag, levelList);
|
|
105
|
+
finalOut.push(kkk);
|
|
106
|
+
}
|
|
107
|
+
if (moduleClassNames) {
|
|
108
|
+
let kk = parseClassNames();
|
|
109
|
+
let kkk = concatenateWithKey(moduleTag, kk);
|
|
110
|
+
registerDebug('classnames', kk);
|
|
111
|
+
// export
|
|
112
|
+
finalOut.push(kkk);
|
|
113
|
+
}
|
|
114
|
+
if (mode && mode === 'debug') {
|
|
115
|
+
return finalOutputDebug;
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
return finalOut.flat(2);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
function registerDebug(tag, data, nestedTag) {
|
|
122
|
+
if (nestedTag) {
|
|
123
|
+
if (!finalOutputDebug[tag])
|
|
124
|
+
finalOutputDebug[tag] = {};
|
|
125
|
+
finalOutputDebug[tag][nestedTag] = finalOutputDebug[tag][nestedTag] ? finalOutputDebug[tag][nestedTag].concat(data) : data;
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
finalOutputDebug[tag] = finalOutputDebug[tag] ? finalOutputDebug[tag].concat(data) : data;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
function parseClassNames() {
|
|
132
|
+
return Object.keys(moduleClassNames).map((klass) => {
|
|
133
|
+
return concatenateWithKey(klass, moduleClassNames[klass]);
|
|
134
|
+
}).flat();
|
|
135
|
+
}
|
|
136
|
+
function concatenateWithKey(key, levelLine) {
|
|
137
|
+
return levelLine.map((levelTag) => {
|
|
138
|
+
return [key, levelTag].filter((val) => {
|
|
139
|
+
return (val !== '_' && val.toString().charAt(0) !== '_');
|
|
140
|
+
}).filter(x => Boolean(x)).join('-');
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
exports.default = {
|
|
145
|
+
getModuleTagClassNames: cssfabricClassNames,
|
|
146
|
+
getModuleTagDebug: function doIt(props) {
|
|
147
|
+
props.outputStyle = 'debug';
|
|
148
|
+
return cssfabricClassNames(props);
|
|
149
|
+
}
|
|
150
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const utils = {
|
|
4
|
+
isArrayOfTypes: (arr) => {
|
|
5
|
+
let ret = '';
|
|
6
|
+
if (!Array.isArray(arr)) {
|
|
7
|
+
return false;
|
|
8
|
+
}
|
|
9
|
+
if (arr.every(x => Array.isArray(x)))
|
|
10
|
+
ret = 'arrays';
|
|
11
|
+
if (arr.every(x => typeof x === 'number' || typeof x === 'string'))
|
|
12
|
+
ret = 'strings';
|
|
13
|
+
if (arr.every(x => typeof x === 'string'))
|
|
14
|
+
ret = 'strings';
|
|
15
|
+
if (arr.every(x => typeof x === 'number'))
|
|
16
|
+
ret = 'numbers';
|
|
17
|
+
if (arr.every(x => typeof x === 'object' && !Array.isArray(x)))
|
|
18
|
+
ret = 'objects';
|
|
19
|
+
return ret;
|
|
20
|
+
},
|
|
21
|
+
isObjectOfTypes: (arr) => {
|
|
22
|
+
if (Array.isArray(arr)) {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
let ret = '';
|
|
26
|
+
let arrValues = Object.values(arr);
|
|
27
|
+
if (arrValues.every(x => typeof x === 'number' || typeof x === 'string'))
|
|
28
|
+
ret = 'strings';
|
|
29
|
+
if (arrValues.every(x => Array.isArray(x)))
|
|
30
|
+
ret = 'arrays';
|
|
31
|
+
if (arrValues.every(x => typeof x === 'string'))
|
|
32
|
+
ret = 'strings';
|
|
33
|
+
if (arrValues.every(x => typeof x === 'number'))
|
|
34
|
+
ret = 'numbers';
|
|
35
|
+
if (arrValues.every(x => typeof x === 'object' && !Array.isArray(x)))
|
|
36
|
+
ret = 'objects';
|
|
37
|
+
return ret;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
exports.default = utils;
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
|
|
2
|
+
html {
|
|
3
|
+
line-height: 1.15;
|
|
4
|
+
-webkit-text-size-adjust: 100%;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
body {
|
|
8
|
+
margin: 0;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
main {
|
|
12
|
+
display: block;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
h1 {
|
|
16
|
+
font-size: 2em;
|
|
17
|
+
margin: 0.67em 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
hr {
|
|
21
|
+
box-sizing: content-box;
|
|
22
|
+
height: 0;
|
|
23
|
+
overflow: visible;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
pre {
|
|
27
|
+
font-family: monospace, monospace;
|
|
28
|
+
font-size: 1em;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
a {
|
|
32
|
+
background-color: transparent;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
abbr[title] {
|
|
36
|
+
border-bottom: none;
|
|
37
|
+
text-decoration: underline;
|
|
38
|
+
text-decoration: underline dotted;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
b, strong {
|
|
42
|
+
font-weight: bolder;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
code, kbd, samp {
|
|
46
|
+
font-family: monospace, monospace;
|
|
47
|
+
font-size: 1em;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
small {
|
|
51
|
+
font-size: 80%;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
sub, sup {
|
|
55
|
+
font-size: 75%;
|
|
56
|
+
line-height: 0;
|
|
57
|
+
position: relative;
|
|
58
|
+
vertical-align: baseline;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
sub {
|
|
62
|
+
bottom: -0.25em;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
sup {
|
|
66
|
+
top: -0.5em;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
img {
|
|
70
|
+
border-style: none;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
button, input, optgroup, select, textarea {
|
|
74
|
+
font-family: inherit;
|
|
75
|
+
font-size: 100%;
|
|
76
|
+
line-height: 1.15;
|
|
77
|
+
margin: 0;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
button, input {
|
|
81
|
+
overflow: visible;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
button, select {
|
|
85
|
+
text-transform: none;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
[type=button], [type=reset], [type=submit], button {
|
|
89
|
+
-webkit-appearance: button;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
[type=button]::-moz-focus-inner, [type=reset]::-moz-focus-inner, [type=submit]::-moz-focus-inner, button::-moz-focus-inner {
|
|
93
|
+
border-style: none;
|
|
94
|
+
padding: 0;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
[type=button]:-moz-focusring, [type=reset]:-moz-focusring, [type=submit]:-moz-focusring, button:-moz-focusring {
|
|
98
|
+
outline: 1px dotted ButtonText;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
fieldset {
|
|
102
|
+
padding: 0.35em 0.75em 0.625em;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
legend {
|
|
106
|
+
box-sizing: border-box;
|
|
107
|
+
color: inherit;
|
|
108
|
+
display: table;
|
|
109
|
+
max-width: 100%;
|
|
110
|
+
padding: 0;
|
|
111
|
+
white-space: normal;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
progress {
|
|
115
|
+
vertical-align: baseline;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
textarea {
|
|
119
|
+
overflow: auto;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
[type=checkbox], [type=radio] {
|
|
123
|
+
box-sizing: border-box;
|
|
124
|
+
padding: 0;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
[type=number]::-webkit-inner-spin-button, [type=number]::-webkit-outer-spin-button {
|
|
128
|
+
height: auto;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
[type=search] {
|
|
132
|
+
-webkit-appearance: textfield;
|
|
133
|
+
outline-offset: -2px;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
[type=search]::-webkit-search-decoration {
|
|
137
|
+
-webkit-appearance: none;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
::-webkit-file-upload-button {
|
|
141
|
+
-webkit-appearance: button;
|
|
142
|
+
font: inherit;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
details {
|
|
146
|
+
display: block;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
summary {
|
|
150
|
+
display: list-item;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
template {
|
|
154
|
+
display: none;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
[hidden] {
|
|
158
|
+
display: none;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/*# sourceMappingURL=normalize.min.css.map */
|
|
162
|
+
p {
|
|
163
|
+
margin: auto;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.hover-parent .hover-show {
|
|
167
|
+
display: none;
|
|
168
|
+
}
|
|
169
|
+
.hover-parent .hover-hide {
|
|
170
|
+
display: initial;
|
|
171
|
+
}
|
|
172
|
+
.hover-parent:hover .hover-show {
|
|
173
|
+
display: initial;
|
|
174
|
+
}
|
|
175
|
+
.hover-parent:hover .hover-hide {
|
|
176
|
+
display: none;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.block:not(:last-child) {
|
|
180
|
+
margin-bottom: 1.5rem;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
h1,
|
|
184
|
+
h2,
|
|
185
|
+
h3,
|
|
186
|
+
h4,
|
|
187
|
+
h5,
|
|
188
|
+
h6 {
|
|
189
|
+
margin-block-start: 0 !important;
|
|
190
|
+
margin-block-end: 0 !important;
|
|
191
|
+
margin-inline-start: 0 !important;
|
|
192
|
+
margin-inline-end: 0 !important;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
label, .label {
|
|
196
|
+
padding: 0.125rem 0.5rem;
|
|
197
|
+
border: 1px solid #ccc;
|
|
198
|
+
display: inline-block;
|
|
199
|
+
border-radius: 4px;
|
|
200
|
+
background-color: #ededed;
|
|
201
|
+
text-shadow: white;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.box-content {
|
|
205
|
+
padding: 0.25rem;
|
|
206
|
+
margin: 0.25rem 0;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.cell-padding > * {
|
|
210
|
+
padding: 0.25em;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.cell-spacing > * {
|
|
214
|
+
margin: 0.25em;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
code {
|
|
218
|
+
padding: 0.25em;
|
|
219
|
+
border: 1px solid #cccccc;
|
|
220
|
+
background-color: #ededed;
|
|
221
|
+
border-radius: 5px;
|
|
222
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
button,hr,input{overflow:visible}progress,sub,sup{vertical-align:baseline}[type=checkbox],[type=radio],legend{box-sizing:border-box;padding:0}html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}details,main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}.label,code,label{border:1px solid #ccc;background-color:#ededed}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:ButtonText dotted 1px}fieldset{padding:.35em .75em .625em}legend{color:inherit;display:table;max-width:100%;white-space:normal}textarea{overflow:auto}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}.hover-parent .hover-show,[hidden],template{display:none}p{margin:auto}.hover-parent .hover-hide,.hover-parent:hover .hover-show{display:initial}.hover-parent:hover .hover-hide{display:none}.block:not(:last-child){margin-bottom:1.5rem}h1,h2,h3,h4,h5,h6{margin-block-start:0!important;margin-block-end:0!important;margin-inline-start:0!important;margin-inline-end:0!important}.label,label{padding:.125rem .5rem;display:inline-block;border-radius:4px;text-shadow:#fff}.box-content{padding:.25rem;margin:.25rem 0}.cell-padding>*,code{padding:.25em}.cell-spacing>*{margin:.25em}code{border-radius:5px}
|