@medyll/cssfabric 0.1.0 → 0.2.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.
Files changed (202) hide show
  1. package/README.md +38 -240
  2. package/_generated/cssFabric.vars.json +13 -0
  3. package/{src/_generated → _generated}/export.variables.md +0 -0
  4. package/{src/_generated → _generated}/index.d.ts +0 -0
  5. package/{src/_generated → _generated}/readme.md +0 -0
  6. package/init/importCssVars.d.ts +1 -0
  7. package/init/importCssVars.js +2 -0
  8. package/package.json +113 -69
  9. package/{lib/scripts → scripts}/cssfabric.d.ts +0 -0
  10. package/scripts/cssfabric.js +43 -0
  11. package/{lib/scripts → scripts}/cssfabricClassNames.d.ts +0 -0
  12. package/{lib/scripts → scripts}/cssfabricClassNames.js +5 -9
  13. package/{src/scripts → scripts}/index.d.ts +0 -0
  14. package/scripts/index.js +4 -0
  15. package/{lib/scripts → scripts}/utils.d.ts +0 -0
  16. package/{lib/scripts → scripts}/utils.js +1 -3
  17. package/{lib/styles/core → styles}/animation/animation.css +0 -0
  18. package/{lib/styles/core → styles}/animation/animation.min.css +0 -0
  19. package/{lib/styles/core → styles}/base/base.css +0 -7
  20. package/styles/base/base.min.css +1 -0
  21. package/styles/box/box.css +1379 -0
  22. package/styles/box/box.min.css +1 -0
  23. package/styles/box/box.responsive.css +5524 -0
  24. package/styles/box/box.responsive.min.css +1 -0
  25. package/styles/color/color.css +1565 -0
  26. package/styles/color/color.min.css +1 -0
  27. package/styles/color/color.responsive.css +6268 -0
  28. package/styles/color/color.responsive.min.css +1 -0
  29. package/styles/cssfabric.css +61792 -0
  30. package/styles/cssfabric.min.css +168 -0
  31. package/styles/cssfabric.responsive.css +200596 -0
  32. package/styles/cssfabric.responsive.min.css +108 -0
  33. package/{lib/styles/core → styles}/flex/flex.css +0 -0
  34. package/styles/flex/flex.min.css +1 -0
  35. package/{lib/styles/core → styles}/flex/flex.responsive.css +0 -126
  36. package/styles/flex/flex.responsive.min.css +1 -0
  37. package/{lib/styles/core → styles}/grid/grid.css +0 -0
  38. package/styles/grid/grid.min.css +1 -0
  39. package/{lib/styles/core → styles}/grid/grid.responsive.css +0 -121
  40. package/styles/grid/grid.responsive.min.css +1 -0
  41. package/{lib/styles/core → styles}/menu/menu.css +16 -12
  42. package/styles/menu/menu.min.css +1 -0
  43. package/{lib/styles/core → styles}/menu/menu.responsive.css +64 -129
  44. package/styles/menu/menu.responsive.min.css +1 -0
  45. package/{lib/styles/core → styles}/overflow/overflow.css +0 -0
  46. package/{lib/styles/core → styles}/overflow/overflow.min.css +0 -0
  47. package/{lib/styles/core → styles}/overflow/overflow.responsive.css +0 -61
  48. package/styles/overflow/overflow.responsive.min.css +1 -0
  49. package/{lib/styles/core → styles}/scale/scale.css +286 -206
  50. package/styles/scale/scale.min.css +1 -0
  51. package/styles/scale/scale.responsive.css +2884 -0
  52. package/styles/scale/scale.responsive.min.css +1 -0
  53. package/{lib/styles/core → styles}/table/table.css +0 -0
  54. package/styles/table/table.min.css +1 -0
  55. package/{lib/styles/core → styles}/table/table.responsive.css +0 -74
  56. package/styles/table/table.responsive.min.css +1 -0
  57. package/{lib/styles/core → styles}/text/text.css +4 -0
  58. package/styles/text/text.min.css +1 -0
  59. package/styles/text/text.responsive.css +196 -0
  60. package/styles/text/text.responsive.min.css +1 -0
  61. package/{lib/styles/core → styles}/theme/theme.css +0 -0
  62. package/{lib/styles/core → styles}/theme/theme.min.css +0 -0
  63. package/styles/vars.css +414 -0
  64. package/styles/vars.min.css +1 -0
  65. package/{lib/styles/core → styles}/zindex/zindex.css +0 -0
  66. package/{lib/styles/core → styles}/zindex/zindex.min.css +0 -0
  67. package/.idea/cssfabric.iml +0 -8
  68. package/.idea/misc.xml +0 -9
  69. package/.idea/modules.xml +0 -8
  70. package/.idea/vcs.xml +0 -6
  71. package/.vscode/settings.json +0 -24
  72. package/bin/index.js +0 -7
  73. package/cssfabric.config.js +0 -3
  74. package/cssfabric.json +0 -8
  75. package/gulpfile.js +0 -598
  76. package/lib/_generated/export.variables.json +0 -583
  77. package/lib/index.d.ts +0 -2
  78. package/lib/index.js +0 -7
  79. package/lib/scripts/cssfabric.js +0 -48
  80. package/lib/scripts/index.d.ts +0 -2
  81. package/lib/scripts/index.js +0 -6
  82. package/lib/styles/core/base/base.min.css +0 -1
  83. package/lib/styles/core/box/box.css +0 -2449
  84. package/lib/styles/core/box/box.min.css +0 -1
  85. package/lib/styles/core/box/box.responsive.css +0 -12255
  86. package/lib/styles/core/box/box.responsive.min.css +0 -1
  87. package/lib/styles/core/color/color.css +0 -923
  88. package/lib/styles/core/color/color.min.css +0 -1
  89. package/lib/styles/core/color/color.responsive.css +0 -4625
  90. package/lib/styles/core/color/color.responsive.min.css +0 -1
  91. package/lib/styles/core/flex/flex.min.css +0 -1
  92. package/lib/styles/core/flex/flex.responsive.min.css +0 -1
  93. package/lib/styles/core/grid/grid.min.css +0 -1
  94. package/lib/styles/core/grid/grid.responsive.min.css +0 -1
  95. package/lib/styles/core/main.min.css +0 -1
  96. package/lib/styles/core/menu/menu.min.css +0 -1
  97. package/lib/styles/core/menu/menu.responsive.min.css +0 -1
  98. package/lib/styles/core/overflow/overflow.responsive.min.css +0 -1
  99. package/lib/styles/core/scale/scale.min.css +0 -1
  100. package/lib/styles/core/scale/scale.responsive.css +0 -3205
  101. package/lib/styles/core/scale/scale.responsive.min.css +0 -1
  102. package/lib/styles/core/table/table.min.css +0 -1
  103. package/lib/styles/core/table/table.responsive.min.css +0 -1
  104. package/lib/styles/core/text/text.min.css +0 -1
  105. package/lib/styles/core/text/text.responsive.css +0 -745
  106. package/lib/styles/core/text/text.responsive.min.css +0 -1
  107. package/lib/styles/core/vars.css +0 -274
  108. package/lib/styles/core/vars.min.css +0 -1
  109. package/lib/styles/cssfabric.css +0 -5367
  110. package/lib/styles/cssfabric.min.css +0 -15
  111. package/lib/styles/cssfabric.responsive.css +0 -23164
  112. package/lib/styles/cssfabric.responsive.min.css +0 -9
  113. package/src/_generated/export.variables.json +0 -760
  114. package/src/cssfabric/_utils.scss +0 -193
  115. package/src/cssfabric/index.d.ts +0 -3
  116. package/src/cssfabric/modules/_cssfabric-config.scss +0 -93
  117. package/src/cssfabric/modules/_mixins.scss +0 -1
  118. package/src/cssfabric/modules/animation/_animation-vars.scss +0 -17
  119. package/src/cssfabric/modules/animation/animation.scss +0 -3
  120. package/src/cssfabric/modules/base/_base-vars.scss +0 -19
  121. package/src/cssfabric/modules/base/base.scss +0 -80
  122. package/src/cssfabric/modules/box/_box-build.scss +0 -268
  123. package/src/cssfabric/modules/box/_box-vars.scss +0 -119
  124. package/src/cssfabric/modules/box/box-responsive.scss +0 -18
  125. package/src/cssfabric/modules/box/box.scss +0 -3
  126. package/src/cssfabric/modules/color/_color-build.scss +0 -108
  127. package/src/cssfabric/modules/color/_color-vars.scss +0 -80
  128. package/src/cssfabric/modules/color/color-responsive.scss +0 -23
  129. package/src/cssfabric/modules/color/color.scss +0 -9
  130. package/src/cssfabric/modules/css-fabric.scss +0 -2
  131. package/src/cssfabric/modules/flex/_flex-build.scss +0 -150
  132. package/src/cssfabric/modules/flex/_flex-vars.scss +0 -84
  133. package/src/cssfabric/modules/flex/flex-responsive.scss +0 -25
  134. package/src/cssfabric/modules/flex/flex.scss +0 -3
  135. package/src/cssfabric/modules/grid/_grid-build.scss +0 -84
  136. package/src/cssfabric/modules/grid/_grid-vars.scss +0 -88
  137. package/src/cssfabric/modules/grid/grid-responsive.scss +0 -25
  138. package/src/cssfabric/modules/grid/grid.scss +0 -6
  139. package/src/cssfabric/modules/menu/_menu-build.scss +0 -119
  140. package/src/cssfabric/modules/menu/_menu-vars.scss +0 -29
  141. package/src/cssfabric/modules/menu/menu-responsive.scss +0 -19
  142. package/src/cssfabric/modules/menu/menu.scss +0 -6
  143. package/src/cssfabric/modules/overflow/_overflow-build.scss +0 -22
  144. package/src/cssfabric/modules/overflow/_overflow-vars.scss +0 -31
  145. package/src/cssfabric/modules/overflow/overflow-responsive.scss +0 -25
  146. package/src/cssfabric/modules/overflow/overflow.scss +0 -7
  147. package/src/cssfabric/modules/scale/_scale-build.scss +0 -129
  148. package/src/cssfabric/modules/scale/_scale-vars.scss +0 -75
  149. package/src/cssfabric/modules/scale/scale-responsive.scss +0 -23
  150. package/src/cssfabric/modules/scale/scale.scss +0 -8
  151. package/src/cssfabric/modules/table/_table-build.scss +0 -134
  152. package/src/cssfabric/modules/table/_table-vars.scss +0 -30
  153. package/src/cssfabric/modules/table/table-responsive.scss +0 -24
  154. package/src/cssfabric/modules/table/table.scss +0 -8
  155. package/src/cssfabric/modules/text/_text-build.scss +0 -109
  156. package/src/cssfabric/modules/text/_text-vars.scss +0 -87
  157. package/src/cssfabric/modules/text/text-responsive.scss +0 -25
  158. package/src/cssfabric/modules/text/text.scss +0 -6
  159. package/src/cssfabric/modules/theme/_theme-build.scss +0 -76
  160. package/src/cssfabric/modules/theme/_theme-vars.scss +0 -55
  161. package/src/cssfabric/modules/theme/theme.scss +0 -6
  162. package/src/cssfabric/modules/vars.scss +0 -118
  163. package/src/cssfabric/modules/zindex/_zindex-vars.scss +0 -14
  164. package/src/cssfabric/modules/zindex/zindex.scss +0 -15
  165. package/src/index.d.ts +0 -3
  166. package/src/index.ts +0 -4
  167. package/src/scripts/cssfabric.ts +0 -54
  168. package/src/scripts/cssfabricClassNames.ts +0 -216
  169. package/src/scripts/index.ts +0 -8
  170. package/src/scripts/utils.ts +0 -37
  171. package/src/vendor/index.d.ts +0 -3
  172. package/src/vendor/normalize/normalize.min.css +0 -2
  173. package/src/vendor/sass-json-export/CHANGELOG.md +0 -26
  174. package/src/vendor/sass-json-export/Gruntfile.js +0 -60
  175. package/src/vendor/sass-json-export/LICENSE +0 -20
  176. package/src/vendor/sass-json-export/README.md +0 -90
  177. package/src/vendor/sass-json-export/package.json +0 -60
  178. package/src/vendor/sass-json-export/stylesheets/encode/api/_json.scss +0 -26
  179. package/src/vendor/sass-json-export/stylesheets/encode/encode.scss +0 -17
  180. package/src/vendor/sass-json-export/stylesheets/encode/helpers/_quote.scss +0 -9
  181. package/src/vendor/sass-json-export/stylesheets/encode/mixins/_json.scss +0 -42
  182. package/src/vendor/sass-json-export/stylesheets/encode/types/_bool.scss +0 -7
  183. package/src/vendor/sass-json-export/stylesheets/encode/types/_color.scss +0 -8
  184. package/src/vendor/sass-json-export/stylesheets/encode/types/_list.scss +0 -14
  185. package/src/vendor/sass-json-export/stylesheets/encode/types/_map.scss +0 -15
  186. package/src/vendor/sass-json-export/stylesheets/encode/types/_null.scss +0 -7
  187. package/src/vendor/sass-json-export/stylesheets/encode/types/_number.scss +0 -8
  188. package/src/vendor/sass-json-export/stylesheets/encode/types/_string.scss +0 -8
  189. package/src/vendor/sass-json-export/stylesheets/sass-json-export.scss +0 -2
  190. package/src/vendor/sass-json-export/test/encode/_index.scss +0 -14
  191. package/src/vendor/sass-json-export/test/encode/api/_json.scss +0 -29
  192. package/src/vendor/sass-json-export/test/encode/helpers/_quote.scss +0 -6
  193. package/src/vendor/sass-json-export/test/encode/types/_bool.scss +0 -6
  194. package/src/vendor/sass-json-export/test/encode/types/_color.scss +0 -7
  195. package/src/vendor/sass-json-export/test/encode/types/_list.scss +0 -25
  196. package/src/vendor/sass-json-export/test/encode/types/_map.scss +0 -17
  197. package/src/vendor/sass-json-export/test/encode/types/_null.scss +0 -8
  198. package/src/vendor/sass-json-export/test/encode/types/_number.scss +0 -68
  199. package/src/vendor/sass-json-export/test/encode/types/_string.scss +0 -9
  200. package/src/vendor/sass-json-export/test/test.scss +0 -9
  201. package/tsconfig.json +0 -46
  202. package/webpack.config.js +0 -53
@@ -1,14 +0,0 @@
1
- $zindex-metadata: (
2
- title: zindex,
3
- tag: zI,
4
- description: "cssfabric zindex module to set z-index on all html elements",
5
- );
6
- $zindex-config: (
7
- z_groups: (
8
- a,
9
- z
10
- ),
11
- );
12
- $zindex-docs: (
13
- z_groups: _,
14
- );
@@ -1,15 +0,0 @@
1
-
2
- @use 'zindex-vars';
3
- $zindex-config: zindex-vars.$zindex-config;
4
- // load scss config file
5
- @use '../../_utils';
6
-
7
- // read variables
8
- $z_groups: map-get($zindex-config, z_groups);
9
-
10
-
11
- @for $z_value from 0 through 10 {
12
- .zI-#{$z_value} {
13
- z-index: (($z_value) * 100);
14
- }
15
- }
package/src/index.d.ts DELETED
@@ -1,3 +0,0 @@
1
- declare const cssfabric;
2
-
3
- export default cssfabric;
package/src/index.ts DELETED
@@ -1,4 +0,0 @@
1
-
2
- import cssfabric from "./scripts/cssfabric"
3
-
4
- export default cssfabric
@@ -1,54 +0,0 @@
1
- import jsonConfig from "../_generated/export.variables.json" ;
2
- import cssfabricClassNames from "./cssfabricClassNames";
3
-
4
- export type IFabricConfModulePart = Record<string, any>;
5
- export type IFabricConfModuleDataPart = Record<string, any>;
6
- export type IFabricConfModuleMetaDataPart = Record<string, any>;
7
- export type IFabricConfModuleDocsPart = Record<string, any>;
8
- export type TFabricConfModuleDocsAttributesPart = Record<string, any>;
9
-
10
- //
11
- const getModuleList = (): Record<string, any> => {
12
- return jsonConfig["cssfabric"]?.["modules"] || {};
13
- };
14
-
15
- const getModuleConfig = (module?: string): IFabricConfModulePart => {
16
- if (module) return jsonConfig["cssfabric"]?.["modules"]?.[module] || {};
17
- return jsonConfig;
18
- };
19
-
20
- const getModuleData = (module?: string): IFabricConfModuleDataPart => {
21
- if (module) return jsonConfig["cssfabric"]?.["modules"]?.[module]?.["_data"] || {};
22
- return jsonConfig;
23
- };
24
-
25
- const getModuleMetaData = (module?: string): IFabricConfModuleMetaDataPart => {
26
- if (module)
27
- return jsonConfig["cssfabric"]?.["modules"]?.[module]?.["_metadata"] || {};
28
- return jsonConfig;
29
- };
30
-
31
- const getModuleDocs = (module?: string): IFabricConfModuleDocsPart => {
32
- if (module)
33
- return jsonConfig["cssfabric"]?.["modules"]?.[module]?.["_docs"] || {};
34
- return jsonConfig;
35
- };
36
-
37
- const getModuleDocsAttributes = (module?: string): TFabricConfModuleDocsAttributesPart => {
38
- if (module)
39
- return jsonConfig["cssfabric"]?.["modules"]?.[module]?.["_docs"]?.["attributes"] || {};
40
- return jsonConfig;
41
- };
42
-
43
- export default {
44
- getModuleList,
45
- getModuleConfig,
46
- getModuleData,
47
- getModuleMetaData,
48
- getModuleDocs,
49
- getModuleDocsAttributes,
50
- getClassNames: cssfabricClassNames,
51
- getModuleClassNames: cssfabricClassNames,
52
- getModuleTagClassNames: cssfabricClassNames.getModuleTagClassNames,
53
- getModuleTagDebug: cssfabricClassNames.getModuleTagDebug,
54
- };
@@ -1,216 +0,0 @@
1
- import cssfabric from "./cssfabric"
2
- import utils from "./utils";
3
-
4
- export interface IListCssfabricClassNamesProps {
5
- module: string;
6
- moduleAttribute: any;
7
- outputStyle?: 'default' | 'debug';
8
- }
9
-
10
- type TFabricClassName = string;
11
- type TClassNameFragment = string | number;
12
-
13
- type TCollect = string[];
14
- type TFabricClassNameList = TFabricClassName[];
15
- type TFabricClassNameListFragments = TClassNameFragment[];
16
-
17
- type TGuess = any;
18
- type TLevelKey = string;
19
-
20
- type level = string[];
21
-
22
- type IModuleLevels = level | level[] | [] | any[] | Record<string, any[]>;
23
-
24
-
25
- export interface ILoopIt {
26
- module: string;
27
- }
28
-
29
- function loopIt(props: ILoopIt) {
30
-
31
- const {module} = props;
32
- const moduleAttributes = cssfabric.getModuleDocsAttributes(module);
33
-
34
- }
35
-
36
- function cssfabricClassNames(props: IListCssfabricClassNamesProps) {
37
-
38
- const {module, moduleAttribute, outputStyle} = props;
39
- const moduleAttributes = cssfabric.getModuleDocsAttributes(module);
40
-
41
- const fabricAttributes = moduleAttributes[moduleAttribute];
42
- const moduleTag = fabricAttributes["tag"];
43
- const moduleKeys: any[] = fabricAttributes["keys"] || undefined;
44
- const moduleLevels: IModuleLevels = fabricAttributes["levels"] || undefined;
45
- const moduleLevelsLinked: IModuleLevels = fabricAttributes["levelsLinked"] || undefined;
46
- const moduleLevelsExtended = fabricAttributes["levelsDeclin"] || undefined;
47
- const moduleClassNames = fabricAttributes["classNames"] || undefined;
48
-
49
- let finalOutput: TCollect = [];
50
- let finalOutputDebug: Record<string, any> = {};
51
-
52
-
53
- return doParse(outputStyle);
54
-
55
- function doParse(mode?: string) {
56
-
57
- let keyList,
58
- levelList,
59
- levelListLinked,
60
- levelListDeclin;
61
-
62
- const finalOut = [];
63
- const debugOut = {};
64
-
65
- if (moduleKeys && moduleKeys.length) {
66
- // beware of any [][]
67
- keyList = concatenateWithKey(moduleTag, moduleKeys);
68
- }
69
-
70
- if (moduleLevels && Object.keys(moduleLevels).length) { // object !!!
71
- levelList = Object.keys(moduleLevels).map((level) => {
72
- let val = moduleLevels[level]
73
- return concatenateWithKey(level, val);
74
- }).flat();
75
- }
76
-
77
- if (moduleLevelsLinked && Object.keys(moduleLevelsLinked).length) {
78
- levelListLinked = Object.keys(moduleLevelsLinked).map((level) => {
79
- let val = moduleLevelsLinked[level]
80
- return concatenateWithKey(level, val);
81
- }).flat();
82
- }
83
-
84
-
85
- if (moduleLevelsExtended && Object.keys(moduleLevelsExtended).length) {
86
- levelListDeclin = Object.keys(moduleLevelsExtended).map((level) => {
87
- let val = moduleLevelsLinked[level]
88
- return concatenateWithKey(level, val);
89
- }).flat();
90
- }
91
-
92
- // prefix all now , and link
93
- // colors :
94
- if (keyList && !moduleLevels && !moduleLevelsLinked) {
95
- // export
96
- finalOut.push(keyList);
97
- registerDebug('default', keyList);
98
- }
99
-
100
- if (moduleKeys && (moduleLevels || moduleLevelsLinked)) {
101
- // base
102
- if (moduleLevels) {
103
- let tg = keyList.map(x => {
104
-
105
- let tre = Object.keys(moduleLevels).map((level) => {
106
- let val = moduleLevels[level]
107
-
108
- let debugKey = (x !== '_' && x.toString().charAt(0) !== '_') ? x : level;
109
- debugKey = (level.toString().charAt(0)==='_')? debugKey : debugKey + '-' + level
110
- registerDebug(x, concatenateWithKey(debugKey , val), level);
111
-
112
- return concatenateWithKey(level, val);
113
- }).flat(4)
114
-
115
- return concatenateWithKey(x, tre);
116
-
117
- });
118
- // is it declinated ? only colors, so nope
119
- // export
120
- finalOut.push(tg.flat());
121
- }
122
- // if moduleLevelsLinked // only color ?
123
- if (moduleLevelsLinked) {
124
- //
125
- let yt = Object.values(moduleKeys).map(moduleKey => {
126
-
127
- if (moduleKeys.includes(moduleKey)) {
128
- let out = [];
129
- // linked are here !!
130
- registerDebug('linked', concatenateWithKey(moduleTag + '-' + moduleKey, moduleLevelsLinked[moduleKey]), moduleKey);
131
-
132
- out.push(concatenateWithKey(moduleKey, moduleLevelsLinked[moduleKey]));
133
- // is it declinated ?
134
- if (moduleLevelsExtended && moduleLevelsExtended[moduleKey]) {
135
- //
136
- out.push(moduleLevelsLinked[moduleKey].map((z) => {
137
- // iddem
138
- registerDebug('declinated', concatenateWithKey(moduleTag + '-' + moduleKey + '-' + z, moduleLevelsExtended[moduleKey]), z);
139
-
140
- return concatenateWithKey(z, moduleLevelsExtended[moduleKey]);
141
- }).flat(2))
142
- }
143
-
144
- // flatten for group here
145
- return out.flat(2);
146
- }
147
- }).flat();
148
-
149
- // export
150
- finalOut.push(concatenateWithKey(moduleTag, yt));
151
-
152
- }
153
- if (levelListDeclin) {
154
- } // only colors ? don't go there
155
-
156
- }
157
- if (!keyList && levelList) {
158
- // export
159
- let kkk = concatenateWithKey(moduleTag, levelList);
160
- finalOut.push(kkk);
161
- }
162
-
163
- if (moduleClassNames) {
164
- let kk = parseClassNames();
165
- let kkk = concatenateWithKey(moduleTag, kk);
166
-
167
- registerDebug('classnames', kk);
168
-
169
- // export
170
- finalOut.push(kkk);
171
- }
172
-
173
- if (mode && mode === 'debug') {
174
- return finalOutputDebug
175
-
176
- } else {
177
- return finalOut.flat(2);
178
- }
179
- }
180
-
181
- function registerDebug(tag: string, data: string[], nestedTag?: string) {
182
- if (nestedTag) {
183
- if (!finalOutputDebug[tag]) finalOutputDebug[tag] = {}
184
- finalOutputDebug[tag][nestedTag] = finalOutputDebug[tag][nestedTag] ? finalOutputDebug[tag][nestedTag].concat(data) : data;
185
-
186
- } else {
187
-
188
- finalOutputDebug[tag] = finalOutputDebug[tag] ? finalOutputDebug[tag].concat(data) : data;
189
- }
190
- }
191
-
192
- function parseClassNames() {
193
- return Object.keys(moduleClassNames).map((klass) => {
194
- return concatenateWithKey(klass, moduleClassNames[klass]);
195
- }).flat();
196
- }
197
-
198
-
199
- function concatenateWithKey(key, levelLine: string[]) {
200
- return levelLine.map((levelTag: string) => {
201
- return [key, levelTag].filter((val) => {
202
- return (val !== '_' && val.toString().charAt(0) !== '_')
203
- }).filter(x => Boolean(x)).join('-');
204
- })
205
- }
206
-
207
-
208
- }
209
-
210
- export default {
211
- getModuleTagClassNames: cssfabricClassNames,
212
- getModuleTagDebug: function doIt(props: IListCssfabricClassNamesProps) {
213
- props.outputStyle = 'debug'
214
- return cssfabricClassNames(props);
215
- }
216
- }
@@ -1,8 +0,0 @@
1
-
2
-
3
- function buildReadme(vars: string){
4
- return "readme"
5
- }
6
-
7
-
8
- export default buildReadme;
@@ -1,37 +0,0 @@
1
- const utils = {
2
-
3
- isArrayOfTypes: (arr: any): any => {
4
- let ret = '';
5
-
6
- if (!Array.isArray(arr)) {
7
- return false;
8
- }
9
- if (arr.every(x => Array.isArray(x))) ret = 'arrays'
10
- if (arr.every(x => typeof x === 'number' || typeof x === 'string' ) ) ret = 'strings'
11
- if (arr.every(x => typeof x === 'string')) ret = 'strings'
12
- if (arr.every(x => typeof x === 'number')) ret = 'numbers'
13
- if (arr.every(x => typeof x === 'object' && !Array.isArray(x))) ret = 'objects'
14
-
15
- return ret;
16
- },
17
-
18
- isObjectOfTypes: (arr: any): any => {
19
-
20
- if (Array.isArray(arr)) {
21
- return false;
22
- }
23
-
24
- let ret = '';
25
- let arrValues = Object.values(arr);
26
-
27
- if (arrValues.every(x => typeof x === 'number' || typeof x === 'string' ) ) ret = 'strings'
28
- if (arrValues.every(x => Array.isArray(x))) ret = 'arrays'
29
- if (arrValues.every(x => typeof x === 'string')) ret = 'strings'
30
- if (arrValues.every(x => typeof x === 'number')) ret = 'numbers'
31
- if (arrValues.every(x => typeof x === 'object' && !Array.isArray(x))) ret = 'objects'
32
-
33
- return ret;
34
- }
35
- }
36
-
37
- export default utils;
@@ -1,3 +0,0 @@
1
- declare const module;
2
-
3
- export default module;
@@ -1,2 +0,0 @@
1
- /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{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}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}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,input{overflow:visible}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}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[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}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}
2
- /*# sourceMappingURL=normalize.min.css.map */
@@ -1,26 +0,0 @@
1
- # Changelog
2
- * `2.0.1`: Resolve Sass deprecation warnings (Sass 3.5+) -- [#3](https://github.com/oddbird/sass-json-export/pull/3).
3
- * `2.0.0`: Removed json-decode and changed name to `sass-json-export`.
4
- * `1.1.8`: Solved an issue with tabs
5
- * `1.1.7`: Included cosmetic changes made after linting with [scss-lint](https://github.com/causes/scss-lint)
6
- * `1.1.6`: JSON files that are loaded via `@import "data.json?varname` can be pretty printed now.
7
- * `1.1.5`: Fixed `json-encode` mixin to keep `body::before` in the render tree. Making it possible to access via `getComputedStyle(document.body, ':before')`
8
- * `1.1.4`: Small fix for the `npm` release
9
- * `1.1.3`: fixed error in `_pow` introduced after updating to Sass 3.3.0.rc.3
10
- * `1.1.2`: Made it possible to import JSON files via `@import 'relative/path/to/file.json?variable-name'`
11
- * `1.1.1`: fixing a minor issue with the gem
12
- * `1.1.0`: adding the ability to import a JSON file
13
- * `1.0.11`: fixing an issue with scientific number parsing
14
- * `1.0.10`: improving number and string helpers
15
- * `1.0.9`: fixing a bug in `_find-exponent`
16
- * `1.0.8`: fixing a major issue in Ruby Gem
17
- * `1.0.7`: minor fixes and stable Ruby Gem
18
- * `1.0.6`: released a Ruby Gem
19
- * `1.0.5`: improved the encoding mixin
20
- * `1.0.4`: fixed an error in map parsing
21
- * `1.0.3`: slightly edited the mixin to dump JSON to CSS
22
- * `1.0.2`: fixed an issue with string parsing
23
- * `1.0.1`: fixed an issue with alpha color parsing
24
- * `1.0.0`: Stable API. `json-encode` and `json-decode`
25
- * `0.0.2`: added `json-decode` and test
26
- * `0.0.1`: initial commit
@@ -1,60 +0,0 @@
1
- module.exports = function(grunt) {
2
-
3
- // Modules
4
- grunt.loadNpmTasks('bootcamp');
5
- grunt.loadNpmTasks('grunt-contrib-watch');
6
- grunt.loadNpmTasks('grunt-sass');
7
- grunt.loadNpmTasks('grunt-sass-lint');
8
-
9
- // Grunt Tasks
10
- grunt.initConfig({
11
- dir : {
12
- src : 'stylesheets',
13
- },
14
- pkg: grunt.file.readJSON('package.json'),
15
-
16
- // Sass
17
- sass: {
18
- options: {
19
- outputStyle: 'expanded',
20
- includePaths: ['./node_modules/bootcamp/dist', './<%= dir.src %>']
21
- },
22
- all: {
23
- files: {
24
- './tmp/all.css': './test/test.scss'
25
- }
26
- }
27
- },
28
-
29
- sasslint : {
30
- all: {
31
- src : ['<%= dir.src %>/**/*']
32
- }
33
- },
34
-
35
- // Bootcamp
36
- bootcamp: {
37
- all: {
38
- files: {
39
- src: ['./tmp/all.css']
40
- }
41
- }
42
- },
43
-
44
- // Watch
45
- watch: {
46
- all: {
47
- files: [
48
- './test/**/*.scss',
49
- './<%= dir.src %>/**/*.scss'
50
- ],
51
- tasks: ['test']
52
- }
53
- }
54
- });
55
-
56
- // Tasks
57
- grunt.registerTask('test', ['sasslint', 'sass', 'bootcamp']);
58
- grunt.registerTask('dev', ['test', 'watch']);
59
- grunt.registerTask('default', ['test']);
60
- };
@@ -1,20 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2014-2015 Hugo Giraudel and contributors
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of
6
- this software and associated documentation files (the "Software"), to deal in
7
- the Software without restriction, including without limitation the rights to
8
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
- the Software, and to permit persons to whom the Software is furnished to do so,
10
- subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
- FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
- COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
- IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,90 +0,0 @@
1
- # sass-json-export [![npm version](https://badge.fury.io/js/sass-json-export.svg)](https://badge.fury.io/js/sass-json-export) [![Circle CI](https://circleci.com/gh/oddbird/sass-json-export.svg?style=svg)](https://circleci.com/gh/oddbird/sass-json-export)
2
-
3
- `sass-json-export` allows you to export your Sass data structures as JSON.
4
-
5
- It is based on Hugo Giraudel's
6
- [SassyJSON](https://github.com/HugoGiraudel/SassyJSON), which is
7
- [no longer maintained](https://github.com/HugoGiraudel/SassyJSON/issues/91). It
8
- is simplified to include only the JSON exporter from SassyJSON, and not the
9
- (much more complex) JSON parser.
10
-
11
- ## Install
12
-
13
- sass-json-export is available on [npm](https://npmjs.org/).
14
-
15
- ### Git
16
-
17
- ``` git
18
- git clone https://github.com/oddbird/sass-json-export.git && cd sass-json-export
19
- ```
20
-
21
- ### npm
22
-
23
- ``` bash
24
- npm install sass-json-export --save-dev
25
- ```
26
-
27
- ## Example
28
-
29
- ### Encoding Sass to JSON
30
-
31
- #### Sass
32
-
33
- ``` scss
34
- $map: ((a: (1 2 ( b : 1 )), b: ( #444444, false, ( a: 1, b: test ) ), c: (2 3 4 string)));
35
-
36
- @include json-encode($map);
37
- ```
38
-
39
- #### CSS
40
-
41
- ``` css
42
- /*! json-encode: '{"a": [1, 2, {"b": 1}], "b": ["#444444", false, {"a": 1, "b": "test"}], "c": [2, 3, 4, "string"]}' */
43
-
44
- body::before {
45
- display:block;
46
- width:0;height:0;
47
- overflow:hidden;
48
- content: '{"a": [1, 2, {"b": 1}], "b": ["#444444", false, {"a": 1, "b": "test"}], "c": [2, 3, 4, "string"]}';
49
- }
50
-
51
- head {
52
- font-family: '{"a": [1, 2, {"b": 1}], "b": ["#444444", false, {"a": 1, "b": "test"}], "c": [2, 3, 4, "string"]}';
53
- }
54
-
55
- @media -json-encode {
56
- json {
57
- json: '{"a": [1, 2, {"b": 1}], "b": ["#444444", false, {"a": 1, "b": "test"}], "c": [2, 3, 4, "string"]}';
58
- }
59
- }
60
- ```
61
-
62
- If you want to restrict the output to only one of the three drivers (comment,
63
- media query or regular output) you can pass a flag as the second parameter with
64
- one of the four following keywords: `all`, `comment`, `media` or
65
- `regular`. Default is `all`.
66
-
67
- ## Requirements
68
-
69
- All you need is Sass 3.3+. Otherwise it's just pure Sass madness.
70
-
71
- ## Development
72
-
73
- ### You need
74
-
75
- * [NodeJS](http://nodejs.org)
76
- * Sass 3.3
77
- * `grunt-cli` via `npm install -g grunt-cli`
78
-
79
- ### How to
80
-
81
- 1. Fork this repository
82
- 2. Run `npm install`
83
- 3. `grunt dev`
84
- 4. Make your changes + write tests
85
- 5. Commit + Pull request
86
-
87
- ## Credits
88
-
89
- * [Fabrice Weinberg](http://twitter.com/fweinb)
90
- * [Hugo Giraudel](http://twitter.com/hugogiraudel)
@@ -1,60 +0,0 @@
1
- {
2
- "_from": "sass-json-export",
3
- "_id": "sass-json-export@2.0.1",
4
- "_inBundle": false,
5
- "_integrity": "sha512-xNoOlN+36MKOnNxB/zQ09s6vZH6WmC/u9lXJ9FAbTf65lRJNyT2sPRS1iqKopLb9ZbdXfukpvHzh1n1/BkqVdA==",
6
- "_location": "/sass-json-export",
7
- "_phantomChildren": {},
8
- "_requested": {
9
- "type": "tag",
10
- "registry": true,
11
- "raw": "sass-json-export",
12
- "name": "sass-json-export",
13
- "escapedName": "sass-json-export",
14
- "rawSpec": "",
15
- "saveSpec": null,
16
- "fetchSpec": "latest"
17
- },
18
- "_requiredBy": [
19
- "#DEV:/",
20
- "#USER"
21
- ],
22
- "_resolved": "https://registry.npmjs.org/sass-json-export/-/sass-json-export-2.0.1.tgz",
23
- "_shasum": "265d822db87d5c1a12cc3934531404b889bbf26b",
24
- "_spec": "sass-json-export",
25
- "_where": "D:\\boulot\\app-node\\cssfabric",
26
- "author": {
27
- "name": "Hugo Giraudel, Fabrice Weinberg"
28
- },
29
- "bugs": {
30
- "url": "https://github.com/oddbird/sass-json-export/issues"
31
- },
32
- "bundleDependencies": false,
33
- "dependencies": {},
34
- "deprecated": false,
35
- "description": "Export your Sass data structures to JSON.",
36
- "devDependencies": {
37
- "bootcamp": "^1.1.7",
38
- "grunt": "^0.4.5",
39
- "grunt-contrib-watch": "^0.6.1",
40
- "grunt-sass": "^1.1.0",
41
- "grunt-sass-lint": "0.1.0-beta.4"
42
- },
43
- "homepage": "https://github.com/oddbird/sass-json-export",
44
- "keywords": [
45
- "sass",
46
- "scss",
47
- "json"
48
- ],
49
- "license": "MIT",
50
- "maintainer": "OddBird",
51
- "name": "sass-json-export",
52
- "repository": {
53
- "type": "git",
54
- "url": "git+https://github.com/oddbird/sass-json-export.git"
55
- },
56
- "scripts": {
57
- "test": "grunt test"
58
- },
59
- "version": "2.0.1"
60
- }
@@ -1,26 +0,0 @@
1
- /// Delay the encoding of ta literal to JSON to a type-specific method
2
- /// @access public
3
- /// @param {*} $value - value to be stringified
4
- /// @throw Unknown type for #{$value} (#{$type}).
5
- /// @return {String} - JSON encoded string
6
- /// @require {function} _json-encode--string
7
- /// @require {function} _json-encode--number
8
- /// @require {function} _json-encode--list
9
- /// @require {function} _json-encode--map
10
- /// @require {function} _json-encode--null
11
- /// @require {function} _json-encode--color
12
- /// @require {function} _json-encode--bool
13
- @function json-encode($value) {
14
- $type: type-of($value);
15
- $function: '_json-encode--#{$type}';
16
-
17
- @if function-exists('get-function') {
18
- $function: get-function($function);
19
- }
20
-
21
- @if function-exists('_json-encode--#{$type}') {
22
- @return call($function, $value);
23
- }
24
-
25
- @error 'Unknown type for #{$value} (#{$type}).';
26
- }
@@ -1,17 +0,0 @@
1
- // Helpers
2
- @import 'helpers/quote';
3
-
4
- // Type specific encoding functions
5
- @import 'types/bool';
6
- @import 'types/color';
7
- @import 'types/list';
8
- @import 'types/map';
9
- @import 'types/number';
10
- @import 'types/string';
11
- @import 'types/null';
12
-
13
- // Public API
14
- @import 'api/json';
15
-
16
- // Mixin to pass the string to the DOM
17
- @import 'mixins/json';