@medyll/cssfabric 0.1.12 → 0.2.1-beta.1
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/README.md +36 -218
- package/dist/NewMenu.svelte +41 -0
- package/dist/NewMenu.svelte.d.ts +19 -0
- package/dist/_generated/cssFabric.vars.json +13 -0
- package/dist/_generated/cssFabric.vars.md +268 -0
- package/dist/cssFabric/config.d.ts +29 -0
- package/dist/cssFabric/config.js +29 -0
- package/dist/cssFabric/cssFabricSheet.d.ts +1226 -0
- package/dist/cssFabric/cssFabricSheet.js +1270 -0
- package/dist/cssFabric/cssProperties.d.ts +27 -0
- package/dist/cssFabric/cssProperties.js +343 -0
- package/dist/cssFabric/cssVariationsAi.d.ts +12 -0
- package/dist/cssFabric/cssVariationsAi.js +111 -0
- package/dist/cssFabric/index.d.ts +113 -0
- package/dist/cssFabric/index.js +341 -0
- package/dist/cssf/README.md +197 -0
- package/dist/cssf/cssf.d.ts +1 -0
- package/dist/cssf/cssf.js +12 -0
- package/dist/cssf/cssfGuide.d.ts +14 -0
- package/dist/cssf/cssfGuide.js +50 -0
- package/dist/cssf/cssfLib.d.ts +134 -0
- package/dist/cssf/cssfLib.js +116 -0
- package/dist/cssf/cssfModel.d.ts +8 -0
- package/dist/cssf/cssfModel.js +59 -0
- package/dist/cssf/cssfPlugin.d.ts +3 -0
- package/dist/cssf/cssfPlugin.js +37 -0
- package/dist/cssf/cssfTransformer.d.ts +2 -0
- package/dist/cssf/cssfTransformer.js +100 -0
- package/dist/cssf/index.d.ts +4 -0
- package/dist/cssf/index.js +4 -0
- package/dist/cssfVsCode/.vscode/launch.json +17 -0
- package/dist/cssfVsCode/.vscodeignore +4 -0
- package/dist/cssfVsCode/CHANGELOG.md +9 -0
- package/dist/cssfVsCode/README.md +65 -0
- package/dist/cssfVsCode/language-configuration.json +36 -0
- package/dist/cssfVsCode/package.json +40 -0
- package/dist/cssfVsCode/syntaxes/cssf.tmLanguage.json +1868 -0
- package/dist/cssfVsCode/test.cssf +6 -0
- package/dist/cssfVsCode/vsc-extension-quickstart.md +29 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -0
- package/dist/init/importCssVars.d.ts +1 -0
- package/dist/init/importCssVars.js +2 -0
- package/dist/scripts/cssfabric.d.ts +24 -0
- package/dist/scripts/cssfabric.js +43 -0
- package/{lib → dist}/scripts/cssfabricClassNames.d.ts +14 -14
- package/{lib → dist}/scripts/cssfabricClassNames.js +146 -150
- package/{lib → dist}/scripts/index.d.ts +2 -2
- package/dist/scripts/index.js +4 -0
- package/{lib → dist}/scripts/utils.d.ts +5 -5
- package/{lib → dist}/scripts/utils.js +38 -40
- package/dist/styles/animation/animation.css +2 -0
- package/{lib/styles/core → dist/styles}/base/base.css +207 -221
- package/dist/styles/base/base.min.css +1 -0
- package/{lib/styles/core → dist/styles}/box/box.css +1496 -1362
- package/dist/styles/box/box.min.css +1 -0
- package/{lib/styles/core → dist/styles}/box/box.responsive.css +7036 -5459
- package/dist/styles/box/box.responsive.min.css +1 -0
- package/{lib/styles/core → dist/styles}/color/color.css +1566 -1564
- package/dist/styles/color/color.min.css +1 -0
- package/{lib/styles/core → dist/styles}/color/color.responsive.css +7781 -6267
- package/dist/styles/color/color.responsive.min.css +1 -0
- package/{lib → dist}/styles/cssfabric.css +5327 -5146
- package/dist/styles/cssfabric.min.css +1 -0
- package/{lib → dist}/styles/cssfabric.responsive.css +20410 -16670
- package/dist/styles/cssfabric.responsive.min.css +1 -0
- package/{lib/styles/core → dist/styles}/flex/flex.css +125 -123
- package/dist/styles/flex/flex.min.css +1 -0
- package/{lib/styles/core → dist/styles}/flex/flex.responsive.css +581 -503
- package/dist/styles/flex/flex.responsive.min.css +1 -0
- package/{lib/styles/core → dist/styles}/grid/grid.css +120 -118
- package/dist/styles/grid/grid.min.css +1 -0
- package/{lib/styles/core → dist/styles}/grid/grid.responsive.css +501 -483
- package/dist/styles/grid/grid.responsive.min.css +1 -0
- package/{lib/styles/core → dist/styles}/menu/menu.css +102 -96
- package/dist/styles/menu/menu.min.css +1 -0
- package/dist/styles/menu/menu.responsive.css +445 -0
- package/dist/styles/menu/menu.responsive.min.css +1 -0
- package/{lib/styles/core → dist/styles}/overflow/overflow.css +61 -59
- package/{lib/styles/core → dist/styles}/overflow/overflow.responsive.css +237 -244
- package/dist/styles/overflow/overflow.responsive.min.css +1 -0
- package/{lib/styles/core → dist/styles}/scale/scale.css +720 -718
- package/{lib/styles/core → dist/styles}/scale/scale.responsive.css +3251 -2883
- package/dist/styles/scale/scale.responsive.min.css +1 -0
- package/{lib/styles/core → dist/styles}/table/table.css +73 -71
- package/dist/styles/table/table.min.css +1 -0
- package/{lib/styles/core → dist/styles}/table/table.responsive.css +371 -295
- package/dist/styles/table/table.responsive.min.css +1 -0
- package/{lib/styles/core → dist/styles}/text/text.css +152 -150
- package/dist/styles/text/text.min.css +1 -0
- package/{lib/styles/core → dist/styles}/text/text.responsive.css +216 -195
- package/dist/styles/text/text.responsive.min.css +1 -0
- package/{lib/styles/core → dist/styles}/theme/theme.css +247 -196
- package/{lib/styles/core → dist/styles}/theme/theme.min.css +1 -1
- package/{lib/styles/core → dist/styles}/vars.css +412 -409
- package/dist/styles/vars.min.css +1 -0
- package/{lib/styles/core → dist/styles}/zindex/zindex.css +44 -42
- package/package.json +66 -67
- package/.idea/cssfabric.iml +0 -8
- package/.idea/misc.xml +0 -9
- package/.idea/modules.xml +0 -8
- package/.idea/vcs.xml +0 -6
- package/.vscode/settings.json +0 -24
- package/bin/index.js +0 -7
- package/cssfabric.config.js +0 -3
- package/cssfabric.json +0 -8
- package/gulpfile.js +0 -598
- package/lib/_generated/export.variables.json +0 -583
- package/lib/index.d.ts +0 -2
- package/lib/index.js +0 -7
- package/lib/scripts/cssfabric.d.ts +0 -24
- package/lib/scripts/cssfabric.js +0 -48
- package/lib/scripts/index.js +0 -6
- package/lib/styles/core/animation/animation.css +0 -0
- package/lib/styles/core/base/base.min.css +0 -1
- package/lib/styles/core/box/box.min.css +0 -1
- package/lib/styles/core/box/box.responsive.min.css +0 -1
- package/lib/styles/core/color/color.min.css +0 -1
- package/lib/styles/core/color/color.responsive.min.css +0 -1
- package/lib/styles/core/flex/flex.min.css +0 -1
- package/lib/styles/core/flex/flex.responsive.min.css +0 -1
- package/lib/styles/core/grid/grid.min.css +0 -1
- package/lib/styles/core/grid/grid.responsive.min.css +0 -1
- package/lib/styles/core/main.min.css +0 -1
- package/lib/styles/core/menu/menu.min.css +0 -1
- package/lib/styles/core/menu/menu.responsive.css +0 -342
- package/lib/styles/core/menu/menu.responsive.min.css +0 -1
- package/lib/styles/core/overflow/overflow.responsive.min.css +0 -1
- package/lib/styles/core/scale/scale.responsive.min.css +0 -1
- package/lib/styles/core/table/table.min.css +0 -1
- package/lib/styles/core/table/table.responsive.min.css +0 -1
- package/lib/styles/core/text/text.min.css +0 -1
- package/lib/styles/core/text/text.responsive.min.css +0 -1
- package/lib/styles/core/vars.min.css +0 -1
- package/lib/styles/core/vars2.css +0 -4
- package/lib/styles/core/vars2.min.css +0 -1
- package/lib/styles/cssfabric.min.css +0 -16
- package/lib/styles/cssfabric.responsive.min.css +0 -9
- package/src/_generated/export.variables.json +0 -759
- package/src/_generated/index.d.ts +0 -3
- package/src/cssfabric/_utils.scss +0 -203
- package/src/cssfabric/index.d.ts +0 -3
- package/src/cssfabric/modules/_cssfabric-config.scss +0 -163
- package/src/cssfabric/modules/_mixins.scss +0 -1
- package/src/cssfabric/modules/animation/_animation-vars.scss +0 -17
- package/src/cssfabric/modules/animation/animation.scss +0 -3
- package/src/cssfabric/modules/base/_base-vars.scss +0 -19
- package/src/cssfabric/modules/base/base.scss +0 -80
- package/src/cssfabric/modules/box/_box-build.scss +0 -287
- package/src/cssfabric/modules/box/_box-vars.scss +0 -121
- package/src/cssfabric/modules/box/box-responsive.scss +0 -18
- package/src/cssfabric/modules/box/box.scss +0 -3
- package/src/cssfabric/modules/color/_color-build.scss +0 -196
- package/src/cssfabric/modules/color/_color-vars.scss +0 -80
- package/src/cssfabric/modules/color/color-responsive.scss +0 -23
- package/src/cssfabric/modules/color/color.scss +0 -9
- package/src/cssfabric/modules/css-fabric.scss +0 -2
- package/src/cssfabric/modules/flex/_flex-build.scss +0 -150
- package/src/cssfabric/modules/flex/_flex-vars.scss +0 -84
- package/src/cssfabric/modules/flex/flex-responsive.scss +0 -25
- package/src/cssfabric/modules/flex/flex.scss +0 -3
- package/src/cssfabric/modules/grid/_grid-build.scss +0 -84
- package/src/cssfabric/modules/grid/_grid-vars.scss +0 -88
- package/src/cssfabric/modules/grid/grid-responsive.scss +0 -25
- package/src/cssfabric/modules/grid/grid.scss +0 -6
- package/src/cssfabric/modules/menu/_menu-build.scss +0 -119
- package/src/cssfabric/modules/menu/_menu-vars.scss +0 -29
- package/src/cssfabric/modules/menu/menu-responsive.scss +0 -19
- package/src/cssfabric/modules/menu/menu.scss +0 -6
- package/src/cssfabric/modules/overflow/_overflow-build.scss +0 -22
- package/src/cssfabric/modules/overflow/_overflow-vars.scss +0 -31
- package/src/cssfabric/modules/overflow/overflow-responsive.scss +0 -25
- package/src/cssfabric/modules/overflow/overflow.scss +0 -7
- package/src/cssfabric/modules/scale/_scale-build.scss +0 -142
- package/src/cssfabric/modules/scale/_scale-vars.scss +0 -84
- package/src/cssfabric/modules/scale/scale-responsive.scss +0 -23
- package/src/cssfabric/modules/scale/scale.scss +0 -8
- package/src/cssfabric/modules/table/_table-build.scss +0 -134
- package/src/cssfabric/modules/table/_table-vars.scss +0 -30
- package/src/cssfabric/modules/table/table-responsive.scss +0 -24
- package/src/cssfabric/modules/table/table.scss +0 -8
- package/src/cssfabric/modules/text/_text-build.scss +0 -166
- package/src/cssfabric/modules/text/_text-vars.scss +0 -87
- package/src/cssfabric/modules/text/text-responsive.scss +0 -26
- package/src/cssfabric/modules/text/text.scss +0 -6
- package/src/cssfabric/modules/theme/_theme-build.scss +0 -90
- package/src/cssfabric/modules/theme/_theme-vars.scss +0 -46
- package/src/cssfabric/modules/theme/theme.scss +0 -6
- package/src/cssfabric/modules/vars.scss +0 -49
- package/src/cssfabric/modules/zindex/_zindex-vars.scss +0 -14
- package/src/cssfabric/modules/zindex/zindex.scss +0 -15
- package/src/index.d.ts +0 -3
- package/src/index.ts +0 -4
- package/src/scripts/cssfabric.ts +0 -54
- package/src/scripts/cssfabricClassNames.ts +0 -216
- package/src/scripts/index.d.ts +0 -2
- package/src/scripts/index.ts +0 -8
- package/src/scripts/utils.ts +0 -37
- package/src/vendor/index.d.ts +0 -3
- package/src/vendor/normalize/normalize.min.css +0 -2
- package/src/vendor/sass-json-export/CHANGELOG.md +0 -26
- package/src/vendor/sass-json-export/Gruntfile.js +0 -60
- package/src/vendor/sass-json-export/LICENSE +0 -20
- package/src/vendor/sass-json-export/README.md +0 -90
- package/src/vendor/sass-json-export/package.json +0 -60
- package/src/vendor/sass-json-export/stylesheets/encode/api/_json.scss +0 -26
- package/src/vendor/sass-json-export/stylesheets/encode/encode.scss +0 -17
- package/src/vendor/sass-json-export/stylesheets/encode/helpers/_quote.scss +0 -9
- package/src/vendor/sass-json-export/stylesheets/encode/mixins/_json.scss +0 -42
- package/src/vendor/sass-json-export/stylesheets/encode/types/_bool.scss +0 -7
- package/src/vendor/sass-json-export/stylesheets/encode/types/_color.scss +0 -8
- package/src/vendor/sass-json-export/stylesheets/encode/types/_list.scss +0 -14
- package/src/vendor/sass-json-export/stylesheets/encode/types/_map.scss +0 -15
- package/src/vendor/sass-json-export/stylesheets/encode/types/_null.scss +0 -7
- package/src/vendor/sass-json-export/stylesheets/encode/types/_number.scss +0 -8
- package/src/vendor/sass-json-export/stylesheets/encode/types/_string.scss +0 -8
- package/src/vendor/sass-json-export/stylesheets/sass-json-export.scss +0 -2
- package/src/vendor/sass-json-export/test/encode/_index.scss +0 -14
- package/src/vendor/sass-json-export/test/encode/api/_json.scss +0 -29
- package/src/vendor/sass-json-export/test/encode/helpers/_quote.scss +0 -6
- package/src/vendor/sass-json-export/test/encode/types/_bool.scss +0 -6
- package/src/vendor/sass-json-export/test/encode/types/_color.scss +0 -7
- package/src/vendor/sass-json-export/test/encode/types/_list.scss +0 -25
- package/src/vendor/sass-json-export/test/encode/types/_map.scss +0 -17
- package/src/vendor/sass-json-export/test/encode/types/_null.scss +0 -8
- package/src/vendor/sass-json-export/test/encode/types/_number.scss +0 -68
- package/src/vendor/sass-json-export/test/encode/types/_string.scss +0 -9
- package/src/vendor/sass-json-export/test/test.scss +0 -9
- package/tsconfig.json +0 -46
- package/webpack.config.js +0 -55
- /package/{src → dist}/_generated/export.variables.md +0 -0
- /package/{src → dist}/_generated/readme.md +0 -0
- /package/{lib/styles/core → dist/styles}/animation/animation.min.css +0 -0
- /package/{lib/styles/core → dist/styles}/overflow/overflow.min.css +0 -0
- /package/{lib/styles/core → dist/styles}/scale/scale.min.css +0 -0
- /package/{lib/styles/core → dist/styles}/zindex/zindex.min.css +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Welcome to your VS Code Extension
|
|
2
|
+
|
|
3
|
+
## What's in the folder
|
|
4
|
+
|
|
5
|
+
* This folder contains all of the files necessary for your extension.
|
|
6
|
+
* `package.json` - this is the manifest file in which you declare your language support and define the location of the grammar file that has been copied into your extension.
|
|
7
|
+
* `syntaxes/cssf.tmLanguage.json` - this is the Text mate grammar file that is used for tokenization.
|
|
8
|
+
* `language-configuration.json` - this is the language configuration, defining the tokens that are used for comments and brackets.
|
|
9
|
+
|
|
10
|
+
## Get up and running straight away
|
|
11
|
+
|
|
12
|
+
* Make sure the language configuration settings in `language-configuration.json` are accurate.
|
|
13
|
+
* Press `F5` to open a new window with your extension loaded.
|
|
14
|
+
* Create a new file with a file name suffix matching your language.
|
|
15
|
+
* Verify that syntax highlighting works and that the language configuration settings are working.
|
|
16
|
+
|
|
17
|
+
## Make changes
|
|
18
|
+
|
|
19
|
+
* You can relaunch the extension from the debug toolbar after making changes to the files listed above.
|
|
20
|
+
* You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes.
|
|
21
|
+
|
|
22
|
+
## Add more language features
|
|
23
|
+
|
|
24
|
+
* To add features such as IntelliSense, hovers and validators check out the VS Code extenders documentation at https://code.visualstudio.com/docs
|
|
25
|
+
|
|
26
|
+
## Install your extension
|
|
27
|
+
|
|
28
|
+
* To start using your extension with Visual Studio Code copy it into the `<user home>/.vscode/extensions` folder and restart Code.
|
|
29
|
+
* To share your extension with the world, read on https://code.visualstudio.com/docs about publishing an extension.
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type IFabricConfModulePart = Record<string, any>;
|
|
2
|
+
export type IFabricConfModuleDataPart = Record<string, any>;
|
|
3
|
+
export type IFabricConfModuleMetaDataPart = Record<string, any>;
|
|
4
|
+
export type IFabricConfModuleDocsPart = Record<string, any>;
|
|
5
|
+
export type TFabricConfModuleDocsAttributesPart = Record<string, any>;
|
|
6
|
+
declare const _default: {
|
|
7
|
+
getModuleList: () => Record<string, any>;
|
|
8
|
+
getModuleConfig: (module?: string | undefined) => IFabricConfModulePart;
|
|
9
|
+
getModuleData: (module?: string | undefined) => IFabricConfModuleDataPart;
|
|
10
|
+
getModuleMetaData: (module?: string | undefined) => IFabricConfModuleMetaDataPart;
|
|
11
|
+
getModuleDocs: (module?: string | undefined) => IFabricConfModuleDocsPart;
|
|
12
|
+
getModuleDocsAttributes: (module?: string | undefined) => TFabricConfModuleDocsAttributesPart;
|
|
13
|
+
getClassNames: {
|
|
14
|
+
getModuleTagClassNames: (props: import("./cssfabricClassNames").IListCssfabricClassNamesProps) => Record<string, any> | string[];
|
|
15
|
+
getModuleTagDebug: (props: import("./cssfabricClassNames").IListCssfabricClassNamesProps) => Record<string, any> | string[];
|
|
16
|
+
};
|
|
17
|
+
getModuleClassNames: {
|
|
18
|
+
getModuleTagClassNames: (props: import("./cssfabricClassNames").IListCssfabricClassNamesProps) => Record<string, any> | string[];
|
|
19
|
+
getModuleTagDebug: (props: import("./cssfabricClassNames").IListCssfabricClassNamesProps) => Record<string, any> | string[];
|
|
20
|
+
};
|
|
21
|
+
getModuleTagClassNames: (props: import("./cssfabricClassNames").IListCssfabricClassNamesProps) => Record<string, any> | string[];
|
|
22
|
+
getModuleTagDebug: (props: import("./cssfabricClassNames").IListCssfabricClassNamesProps) => Record<string, any> | string[];
|
|
23
|
+
};
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import jsonConfig from "../_generated/cssFabric.vars.json";
|
|
2
|
+
import cssfabricClassNames from "./cssfabricClassNames";
|
|
3
|
+
//
|
|
4
|
+
const getModuleList = () => {
|
|
5
|
+
return jsonConfig["cssfabric"]?.["modules"] || {};
|
|
6
|
+
};
|
|
7
|
+
const getModuleConfig = (module) => {
|
|
8
|
+
if (module)
|
|
9
|
+
return jsonConfig["cssfabric"]?.["modules"]?.[module] || {};
|
|
10
|
+
return jsonConfig;
|
|
11
|
+
};
|
|
12
|
+
const getModuleData = (module) => {
|
|
13
|
+
if (module)
|
|
14
|
+
return jsonConfig["cssfabric"]?.["modules"]?.[module]?.["_data"] || {};
|
|
15
|
+
return jsonConfig;
|
|
16
|
+
};
|
|
17
|
+
const getModuleMetaData = (module) => {
|
|
18
|
+
if (module)
|
|
19
|
+
return jsonConfig["cssfabric"]?.["modules"]?.[module]?.["_metadata"] || {};
|
|
20
|
+
return jsonConfig;
|
|
21
|
+
};
|
|
22
|
+
const getModuleDocs = (module) => {
|
|
23
|
+
if (module)
|
|
24
|
+
return jsonConfig["cssfabric"]?.["modules"]?.[module]?.["_docs"] || {};
|
|
25
|
+
return jsonConfig;
|
|
26
|
+
};
|
|
27
|
+
const getModuleDocsAttributes = (module) => {
|
|
28
|
+
if (module)
|
|
29
|
+
return jsonConfig["cssfabric"]?.["modules"]?.[module]?.["_docs"]?.["attributes"] || {};
|
|
30
|
+
return jsonConfig;
|
|
31
|
+
};
|
|
32
|
+
export default {
|
|
33
|
+
getModuleList,
|
|
34
|
+
getModuleConfig,
|
|
35
|
+
getModuleData,
|
|
36
|
+
getModuleMetaData,
|
|
37
|
+
getModuleDocs,
|
|
38
|
+
getModuleDocsAttributes,
|
|
39
|
+
getClassNames: cssfabricClassNames,
|
|
40
|
+
getModuleClassNames: cssfabricClassNames,
|
|
41
|
+
getModuleTagClassNames: cssfabricClassNames.getModuleTagClassNames,
|
|
42
|
+
getModuleTagDebug: cssfabricClassNames.getModuleTagDebug,
|
|
43
|
+
};
|
|
@@ -1,14 +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;
|
|
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> | string[];
|
|
10
|
+
declare const _default: {
|
|
11
|
+
getModuleTagClassNames: typeof cssfabricClassNames;
|
|
12
|
+
getModuleTagDebug: (props: IListCssfabricClassNamesProps) => Record<string, any> | string[];
|
|
13
|
+
};
|
|
14
|
+
export default _default;
|
|
@@ -1,150 +1,146 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
function
|
|
8
|
-
const { module } = props;
|
|
9
|
-
const moduleAttributes =
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
if (
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
let
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
props.outputStyle = 'debug';
|
|
148
|
-
return cssfabricClassNames(props);
|
|
149
|
-
}
|
|
150
|
-
};
|
|
1
|
+
import cssfabric from "./cssfabric";
|
|
2
|
+
import utils from "./utils";
|
|
3
|
+
function loopIt(props) {
|
|
4
|
+
const { module } = props;
|
|
5
|
+
const moduleAttributes = cssfabric.getModuleDocsAttributes(module);
|
|
6
|
+
}
|
|
7
|
+
function cssfabricClassNames(props) {
|
|
8
|
+
const { module, moduleAttribute, outputStyle } = props;
|
|
9
|
+
const moduleAttributes = cssfabric.getModuleDocsAttributes(module);
|
|
10
|
+
const fabricAttributes = moduleAttributes[moduleAttribute];
|
|
11
|
+
const moduleTag = fabricAttributes["tag"];
|
|
12
|
+
const moduleKeys = fabricAttributes["keys"] || undefined;
|
|
13
|
+
const moduleLevels = fabricAttributes["levels"] || undefined;
|
|
14
|
+
const moduleLevelsLinked = fabricAttributes["levelsLinked"] || undefined;
|
|
15
|
+
const moduleLevelsExtended = fabricAttributes["levelsDeclin"] || undefined;
|
|
16
|
+
const moduleClassNames = fabricAttributes["classNames"] || undefined;
|
|
17
|
+
let finalOutput = [];
|
|
18
|
+
let finalOutputDebug = {};
|
|
19
|
+
return doParse(outputStyle);
|
|
20
|
+
function doParse(mode) {
|
|
21
|
+
let keyList, levelList, levelListLinked, levelListDeclin;
|
|
22
|
+
const finalOut = [];
|
|
23
|
+
const debugOut = {};
|
|
24
|
+
if (moduleKeys && moduleKeys.length) {
|
|
25
|
+
// beware of any [][]
|
|
26
|
+
keyList = concatenateWithKey(moduleTag, moduleKeys);
|
|
27
|
+
}
|
|
28
|
+
if (moduleLevels && Object.keys(moduleLevels).length) { // object !!!
|
|
29
|
+
levelList = Object.keys(moduleLevels).map((level) => {
|
|
30
|
+
let val = moduleLevels[level];
|
|
31
|
+
return concatenateWithKey(level, val);
|
|
32
|
+
}).flat();
|
|
33
|
+
}
|
|
34
|
+
if (moduleLevelsLinked && Object.keys(moduleLevelsLinked).length) {
|
|
35
|
+
levelListLinked = Object.keys(moduleLevelsLinked).map((level) => {
|
|
36
|
+
let val = moduleLevelsLinked[level];
|
|
37
|
+
return concatenateWithKey(level, val);
|
|
38
|
+
}).flat();
|
|
39
|
+
}
|
|
40
|
+
if (moduleLevelsExtended && Object.keys(moduleLevelsExtended).length) {
|
|
41
|
+
levelListDeclin = Object.keys(moduleLevelsExtended).map((level) => {
|
|
42
|
+
let val = moduleLevelsLinked[level];
|
|
43
|
+
return concatenateWithKey(level, val);
|
|
44
|
+
}).flat();
|
|
45
|
+
}
|
|
46
|
+
// prefix all now , and link
|
|
47
|
+
// colors :
|
|
48
|
+
if (keyList && !moduleLevels && !moduleLevelsLinked) {
|
|
49
|
+
// export
|
|
50
|
+
finalOut.push(keyList);
|
|
51
|
+
registerDebug('default', keyList);
|
|
52
|
+
}
|
|
53
|
+
if (moduleKeys && (moduleLevels || moduleLevelsLinked)) {
|
|
54
|
+
// base
|
|
55
|
+
if (moduleLevels) {
|
|
56
|
+
let tg = keyList.map(x => {
|
|
57
|
+
let tre = Object.keys(moduleLevels).map((level) => {
|
|
58
|
+
let val = moduleLevels[level];
|
|
59
|
+
let debugKey = (x !== '_' && x.toString().charAt(0) !== '_') ? x : level;
|
|
60
|
+
debugKey = (level.toString().charAt(0) === '_') ? debugKey : debugKey + '-' + level;
|
|
61
|
+
registerDebug(x, concatenateWithKey(debugKey, val), level);
|
|
62
|
+
return concatenateWithKey(level, val);
|
|
63
|
+
}).flat(4);
|
|
64
|
+
return concatenateWithKey(x, tre);
|
|
65
|
+
});
|
|
66
|
+
// is it declinated ? only colors, so nope
|
|
67
|
+
// export
|
|
68
|
+
finalOut.push(tg.flat());
|
|
69
|
+
}
|
|
70
|
+
// if moduleLevelsLinked // only color ?
|
|
71
|
+
if (moduleLevelsLinked) {
|
|
72
|
+
//
|
|
73
|
+
let yt = Object.values(moduleKeys).map(moduleKey => {
|
|
74
|
+
if (moduleKeys.includes(moduleKey)) {
|
|
75
|
+
let out = [];
|
|
76
|
+
// linked are here !!
|
|
77
|
+
registerDebug('linked', concatenateWithKey(moduleTag + '-' + moduleKey, moduleLevelsLinked[moduleKey]), moduleKey);
|
|
78
|
+
out.push(concatenateWithKey(moduleKey, moduleLevelsLinked[moduleKey]));
|
|
79
|
+
// is it declinated ?
|
|
80
|
+
if (moduleLevelsExtended && moduleLevelsExtended[moduleKey]) {
|
|
81
|
+
//
|
|
82
|
+
out.push(moduleLevelsLinked[moduleKey].map((z) => {
|
|
83
|
+
// iddem
|
|
84
|
+
registerDebug('declinated', concatenateWithKey(moduleTag + '-' + moduleKey + '-' + z, moduleLevelsExtended[moduleKey]), z);
|
|
85
|
+
return concatenateWithKey(z, moduleLevelsExtended[moduleKey]);
|
|
86
|
+
}).flat(2));
|
|
87
|
+
}
|
|
88
|
+
// flatten for group here
|
|
89
|
+
return out.flat(2);
|
|
90
|
+
}
|
|
91
|
+
}).flat();
|
|
92
|
+
// export
|
|
93
|
+
finalOut.push(concatenateWithKey(moduleTag, yt));
|
|
94
|
+
}
|
|
95
|
+
if (levelListDeclin) {
|
|
96
|
+
} // only colors ? don't go there
|
|
97
|
+
}
|
|
98
|
+
if (!keyList && levelList) {
|
|
99
|
+
// export
|
|
100
|
+
let kkk = concatenateWithKey(moduleTag, levelList);
|
|
101
|
+
finalOut.push(kkk);
|
|
102
|
+
}
|
|
103
|
+
if (moduleClassNames) {
|
|
104
|
+
let kk = parseClassNames();
|
|
105
|
+
let kkk = concatenateWithKey(moduleTag, kk);
|
|
106
|
+
registerDebug('classnames', kk);
|
|
107
|
+
// export
|
|
108
|
+
finalOut.push(kkk);
|
|
109
|
+
}
|
|
110
|
+
if (mode && mode === 'debug') {
|
|
111
|
+
return finalOutputDebug;
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
return finalOut.flat(2);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
function registerDebug(tag, data, nestedTag) {
|
|
118
|
+
if (nestedTag) {
|
|
119
|
+
if (!finalOutputDebug[tag])
|
|
120
|
+
finalOutputDebug[tag] = {};
|
|
121
|
+
finalOutputDebug[tag][nestedTag] = finalOutputDebug[tag][nestedTag] ? finalOutputDebug[tag][nestedTag].concat(data) : data;
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
finalOutputDebug[tag] = finalOutputDebug[tag] ? finalOutputDebug[tag].concat(data) : data;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
function parseClassNames() {
|
|
128
|
+
return Object.keys(moduleClassNames).map((klass) => {
|
|
129
|
+
return concatenateWithKey(klass, moduleClassNames[klass]);
|
|
130
|
+
}).flat();
|
|
131
|
+
}
|
|
132
|
+
function concatenateWithKey(key, levelLine) {
|
|
133
|
+
return levelLine.map((levelTag) => {
|
|
134
|
+
return [key, levelTag].filter((val) => {
|
|
135
|
+
return (val !== '_' && val.toString().charAt(0) !== '_');
|
|
136
|
+
}).filter(x => Boolean(x)).join('-');
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
export default {
|
|
141
|
+
getModuleTagClassNames: cssfabricClassNames,
|
|
142
|
+
getModuleTagDebug: function doIt(props) {
|
|
143
|
+
props.outputStyle = 'debug';
|
|
144
|
+
return cssfabricClassNames(props);
|
|
145
|
+
}
|
|
146
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare function buildReadme(vars: string): string;
|
|
2
|
-
export default buildReadme;
|
|
1
|
+
declare function buildReadme(vars: string): string;
|
|
2
|
+
export default buildReadme;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
declare const utils: {
|
|
2
|
-
isArrayOfTypes: (arr: any) => any;
|
|
3
|
-
isObjectOfTypes: (arr: any) => any;
|
|
4
|
-
};
|
|
5
|
-
export default utils;
|
|
1
|
+
declare const utils: {
|
|
2
|
+
isArrayOfTypes: (arr: any) => any;
|
|
3
|
+
isObjectOfTypes: (arr: any) => any;
|
|
4
|
+
};
|
|
5
|
+
export default utils;
|
|
@@ -1,40 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
if (arr.every(x =>
|
|
10
|
-
ret = '
|
|
11
|
-
if (arr.every(x => typeof x === '
|
|
12
|
-
ret = 'strings';
|
|
13
|
-
if (arr.every(x => typeof x === '
|
|
14
|
-
ret = '
|
|
15
|
-
if (arr.every(x => typeof x === '
|
|
16
|
-
ret = '
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
if (arrValues.every(x =>
|
|
28
|
-
ret = '
|
|
29
|
-
if (arrValues.every(x =>
|
|
30
|
-
ret = '
|
|
31
|
-
if (arrValues.every(x => typeof x === '
|
|
32
|
-
ret = '
|
|
33
|
-
if (arrValues.every(x => typeof x === '
|
|
34
|
-
ret = '
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
};
|
|
40
|
-
exports.default = utils;
|
|
1
|
+
const utils = {
|
|
2
|
+
isArrayOfTypes: (arr) => {
|
|
3
|
+
let ret = '';
|
|
4
|
+
if (!Array.isArray(arr)) {
|
|
5
|
+
return false;
|
|
6
|
+
}
|
|
7
|
+
if (arr.every(x => Array.isArray(x)))
|
|
8
|
+
ret = 'arrays';
|
|
9
|
+
if (arr.every(x => typeof x === 'number' || typeof x === 'string'))
|
|
10
|
+
ret = 'strings';
|
|
11
|
+
if (arr.every(x => typeof x === 'string'))
|
|
12
|
+
ret = 'strings';
|
|
13
|
+
if (arr.every(x => typeof x === 'number'))
|
|
14
|
+
ret = 'numbers';
|
|
15
|
+
if (arr.every(x => typeof x === 'object' && !Array.isArray(x)))
|
|
16
|
+
ret = 'objects';
|
|
17
|
+
return ret;
|
|
18
|
+
},
|
|
19
|
+
isObjectOfTypes: (arr) => {
|
|
20
|
+
if (Array.isArray(arr)) {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
let ret = '';
|
|
24
|
+
let arrValues = Object.values(arr);
|
|
25
|
+
if (arrValues.every(x => typeof x === 'number' || typeof x === 'string'))
|
|
26
|
+
ret = 'strings';
|
|
27
|
+
if (arrValues.every(x => Array.isArray(x)))
|
|
28
|
+
ret = 'arrays';
|
|
29
|
+
if (arrValues.every(x => typeof x === 'string'))
|
|
30
|
+
ret = 'strings';
|
|
31
|
+
if (arrValues.every(x => typeof x === 'number'))
|
|
32
|
+
ret = 'numbers';
|
|
33
|
+
if (arrValues.every(x => typeof x === 'object' && !Array.isArray(x)))
|
|
34
|
+
ret = 'objects';
|
|
35
|
+
return ret;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
export default utils;
|