@salty-css/core 0.2.1 → 0.2.2-refactor-vite-8.4

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 (304) hide show
  1. package/dist/astro-component-Ov1RH0CO.js +4 -0
  2. package/dist/astro-component-r0qEcF1p.cjs +14 -0
  3. package/{bin → dist/bin}/bin-util.d.ts +1 -0
  4. package/dist/bin/bin-util.d.ts.map +1 -0
  5. package/{bin → dist/bin}/commands/build.d.ts +1 -0
  6. package/dist/bin/commands/build.d.ts.map +1 -0
  7. package/{bin → dist/bin}/commands/generate.d.ts +1 -0
  8. package/dist/bin/commands/generate.d.ts.map +1 -0
  9. package/{bin → dist/bin}/commands/init.d.ts +1 -0
  10. package/dist/bin/commands/init.d.ts.map +1 -0
  11. package/{bin → dist/bin}/commands/update.d.ts +1 -0
  12. package/dist/bin/commands/update.d.ts.map +1 -0
  13. package/{bin → dist/bin}/commands/version.d.ts +1 -0
  14. package/dist/bin/commands/version.d.ts.map +1 -0
  15. package/{bin → dist/bin}/confirm-install.d.ts +1 -0
  16. package/dist/bin/confirm-install.d.ts.map +1 -0
  17. package/{bin → dist/bin}/context.d.ts +1 -0
  18. package/dist/bin/context.d.ts.map +1 -0
  19. package/{bin → dist/bin}/detection/css-file.d.ts +1 -0
  20. package/dist/bin/detection/css-file.d.ts.map +1 -0
  21. package/{bin → dist/bin}/frameworks/astro.d.ts +1 -0
  22. package/dist/bin/frameworks/astro.d.ts.map +1 -0
  23. package/{bin → dist/bin}/frameworks/index.d.ts +1 -0
  24. package/dist/bin/frameworks/index.d.ts.map +1 -0
  25. package/{bin → dist/bin}/frameworks/react.d.ts +1 -0
  26. package/dist/bin/frameworks/react.d.ts.map +1 -0
  27. package/{bin → dist/bin}/frameworks/types.d.ts +1 -0
  28. package/dist/bin/frameworks/types.d.ts.map +1 -0
  29. package/dist/bin/index.cjs +2 -0
  30. package/dist/bin/index.d.ts +3 -0
  31. package/dist/bin/index.d.ts.map +1 -0
  32. package/dist/bin/index.js +5 -0
  33. package/{bin → dist/bin}/integrations/astro.d.ts +1 -0
  34. package/dist/bin/integrations/astro.d.ts.map +1 -0
  35. package/{bin → dist/bin}/integrations/eslint.d.ts +1 -0
  36. package/dist/bin/integrations/eslint.d.ts.map +1 -0
  37. package/{bin → dist/bin}/integrations/index.d.ts +1 -0
  38. package/dist/bin/integrations/index.d.ts.map +1 -0
  39. package/{bin → dist/bin}/integrations/next.d.ts +1 -0
  40. package/dist/bin/integrations/next.d.ts.map +1 -0
  41. package/{bin → dist/bin}/integrations/types.d.ts +1 -0
  42. package/dist/bin/integrations/types.d.ts.map +1 -0
  43. package/{bin → dist/bin}/integrations/vite.d.ts +1 -0
  44. package/dist/bin/integrations/vite.d.ts.map +1 -0
  45. package/{bin → dist/bin}/logger.d.ts +1 -0
  46. package/dist/bin/logger.d.ts.map +1 -0
  47. package/dist/bin/main.cjs +1 -0
  48. package/{bin → dist/bin}/main.d.ts +1 -0
  49. package/dist/bin/main.d.ts.map +1 -0
  50. package/dist/bin/main.js +2 -0
  51. package/{bin → dist/bin}/package-json.d.ts +1 -0
  52. package/dist/bin/package-json.d.ts.map +1 -0
  53. package/{bin → dist/bin}/path-defaults.d.ts +1 -0
  54. package/dist/bin/path-defaults.d.ts.map +1 -0
  55. package/{bin → dist/bin}/prettier.d.ts +1 -0
  56. package/dist/bin/prettier.d.ts.map +1 -0
  57. package/{bin → dist/bin}/saltyrc.d.ts +1 -0
  58. package/dist/bin/saltyrc.d.ts.map +1 -0
  59. package/dist/bin/templates.d.ts +15 -0
  60. package/dist/bin/templates.d.ts.map +1 -0
  61. package/dist/chunk-CMqjfN_6.cjs +1 -0
  62. package/dist/compiler/get-files.cjs +1 -0
  63. package/{compiler → dist/compiler}/get-files.d.ts +1 -0
  64. package/dist/compiler/get-files.d.ts.map +1 -0
  65. package/dist/compiler/get-files.js +15 -0
  66. package/dist/compiler/get-function-range.cjs +1 -0
  67. package/{compiler → dist/compiler}/get-function-range.d.ts +1 -0
  68. package/dist/compiler/get-function-range.d.ts.map +1 -0
  69. package/dist/compiler/get-function-range.js +17 -0
  70. package/dist/compiler/helpers.cjs +1 -0
  71. package/{compiler → dist/compiler}/helpers.d.ts +1 -0
  72. package/dist/compiler/helpers.d.ts.map +1 -0
  73. package/dist/compiler/helpers.js +24 -0
  74. package/{compiler → dist/compiler}/resolve-import.d.ts +1 -0
  75. package/dist/compiler/resolve-import.d.ts.map +1 -0
  76. package/dist/compiler/salty-compiler.cjs +1 -0
  77. package/{compiler → dist/compiler}/salty-compiler.d.ts +1 -0
  78. package/dist/compiler/salty-compiler.d.ts.map +1 -0
  79. package/dist/compiler/salty-compiler.js +2 -0
  80. package/{config → dist/config}/define-config.d.ts +1 -0
  81. package/dist/config/define-config.d.ts.map +1 -0
  82. package/dist/config/index.cjs +1 -0
  83. package/{config → dist/config}/index.d.ts +1 -0
  84. package/dist/config/index.d.ts.map +1 -0
  85. package/dist/config/index.js +5 -0
  86. package/dist/css/index.cjs +1 -0
  87. package/{css → dist/css}/index.d.ts +1 -0
  88. package/dist/css/index.d.ts.map +1 -0
  89. package/dist/css/index.js +5 -0
  90. package/dist/css/keyframes.cjs +1 -0
  91. package/{css → dist/css}/keyframes.d.ts +1 -0
  92. package/dist/css/keyframes.d.ts.map +1 -0
  93. package/dist/css/keyframes.js +30 -0
  94. package/dist/css/media.cjs +1 -0
  95. package/{css → dist/css}/media.d.ts +1 -0
  96. package/dist/css/media.d.ts.map +1 -0
  97. package/dist/css/media.js +84 -0
  98. package/dist/css/merge.cjs +1 -0
  99. package/{css → dist/css}/merge.d.ts +1 -0
  100. package/dist/css/merge.d.ts.map +1 -0
  101. package/dist/css/merge.js +20 -0
  102. package/dist/css/token.cjs +1 -0
  103. package/{css → dist/css}/token.d.ts +1 -0
  104. package/dist/css/token.d.ts.map +1 -0
  105. package/dist/css/token.js +4 -0
  106. package/{factories → dist/factories}/define-font.d.ts +1 -0
  107. package/dist/factories/define-font.d.ts.map +1 -0
  108. package/{factories → dist/factories}/define-global-styles.d.ts +1 -0
  109. package/dist/factories/define-global-styles.d.ts.map +1 -0
  110. package/{factories → dist/factories}/define-import.d.ts +1 -0
  111. package/dist/factories/define-import.d.ts.map +1 -0
  112. package/{factories → dist/factories}/define-media-query.d.ts +1 -0
  113. package/dist/factories/define-media-query.d.ts.map +1 -0
  114. package/{factories → dist/factories}/define-templates.d.ts +1 -0
  115. package/dist/factories/define-templates.d.ts.map +1 -0
  116. package/{factories → dist/factories}/define-variables.d.ts +1 -0
  117. package/dist/factories/define-variables.d.ts.map +1 -0
  118. package/dist/factories/index.cjs +1 -0
  119. package/{factories → dist/factories}/index.d.ts +1 -0
  120. package/dist/factories/index.d.ts.map +1 -0
  121. package/dist/factories/index.js +149 -0
  122. package/{generators → dist/generators}/class-name-generator.d.ts +1 -0
  123. package/dist/generators/class-name-generator.d.ts.map +1 -0
  124. package/dist/generators/index.cjs +1 -0
  125. package/{generators → dist/generators}/index.d.ts +1 -0
  126. package/dist/generators/index.d.ts.map +1 -0
  127. package/dist/generators/index.js +2 -0
  128. package/{generators → dist/generators}/styled-generator.d.ts +1 -0
  129. package/dist/generators/styled-generator.d.ts.map +1 -0
  130. package/{generators → dist/generators}/styles-generator.d.ts +1 -0
  131. package/dist/generators/styles-generator.d.ts.map +1 -0
  132. package/dist/generators-CrK45F8i.js +112 -0
  133. package/dist/generators-eEKEtyAm.cjs +1 -0
  134. package/{helpers → dist/helpers}/color.d.ts +1 -0
  135. package/dist/helpers/color.d.ts.map +1 -0
  136. package/dist/helpers/index.cjs +1 -0
  137. package/{helpers → dist/helpers}/index.d.ts +1 -0
  138. package/dist/helpers/index.d.ts.map +1 -0
  139. package/dist/helpers/index.js +33 -0
  140. package/{helpers → dist/helpers}/viewport-clamp.d.ts +1 -0
  141. package/dist/helpers/viewport-clamp.d.ts.map +1 -0
  142. package/dist/instances/classname-instance.cjs +1 -0
  143. package/{instances → dist/instances}/classname-instance.d.ts +1 -0
  144. package/dist/instances/classname-instance.d.ts.map +1 -0
  145. package/dist/instances/classname-instance.js +18 -0
  146. package/dist/main-DGpSu6zK.js +545 -0
  147. package/dist/main-LnoqOq21.cjs +11 -0
  148. package/dist/maybe.d.ts +2 -0
  149. package/dist/maybe.d.ts.map +1 -0
  150. package/dist/parse-styles-2rwbF9j_.cjs +3 -0
  151. package/dist/parse-styles-Bz0otiZ-.js +336 -0
  152. package/dist/parsers/index.cjs +3 -0
  153. package/{parsers → dist/parsers}/index.d.ts +1 -0
  154. package/dist/parsers/index.d.ts.map +1 -0
  155. package/dist/parsers/index.js +79 -0
  156. package/{parsers → dist/parsers}/parse-modifiers.d.ts +1 -0
  157. package/dist/parsers/parse-modifiers.d.ts.map +1 -0
  158. package/{parsers → dist/parsers}/parse-styles.d.ts +1 -0
  159. package/dist/parsers/parse-styles.d.ts.map +1 -0
  160. package/{parsers → dist/parsers}/parse-templates.d.ts +1 -0
  161. package/dist/parsers/parse-templates.d.ts.map +1 -0
  162. package/{parsers → dist/parsers}/parse-tokens.d.ts +1 -0
  163. package/dist/parsers/parse-tokens.d.ts.map +1 -0
  164. package/{parsers → dist/parsers}/parser-regexes.d.ts +1 -0
  165. package/dist/parsers/parser-regexes.d.ts.map +1 -0
  166. package/{parsers → dist/parsers}/parser-types.d.ts +1 -0
  167. package/dist/parsers/parser-types.d.ts.map +1 -0
  168. package/{parsers → dist/parsers}/property-name-check.d.ts +1 -0
  169. package/dist/parsers/property-name-check.d.ts.map +1 -0
  170. package/{parsers → dist/parsers}/resolve-template-variants.d.ts +1 -0
  171. package/dist/parsers/resolve-template-variants.d.ts.map +1 -0
  172. package/{parsers → dist/parsers}/strict.d.ts +1 -0
  173. package/dist/parsers/strict.d.ts.map +1 -0
  174. package/{parsers → dist/parsers}/unit-check.d.ts +1 -0
  175. package/dist/parsers/unit-check.d.ts.map +1 -0
  176. package/dist/runtime/index.cjs +2 -0
  177. package/{runtime → dist/runtime}/index.d.ts +1 -0
  178. package/dist/runtime/index.d.ts.map +1 -0
  179. package/dist/runtime/index.js +20 -0
  180. package/dist/salty-compiler-Bvd0OKHz.cjs +33 -0
  181. package/dist/salty-compiler-CvQ-rsex.js +484 -0
  182. package/dist/salty.config-B0ZiRpHR.cjs +7 -0
  183. package/dist/salty.config-DWF4i7K0.js +4 -0
  184. package/dist/server/index.cjs +1 -0
  185. package/dist/server/index.d.ts +2 -0
  186. package/dist/server/index.d.ts.map +1 -0
  187. package/dist/server/index.js +12 -0
  188. package/{server → dist/server}/should-restart.d.ts +1 -0
  189. package/dist/server/should-restart.d.ts.map +1 -0
  190. package/{styled-file-Cda3EeR6.js → dist/styled-file-BCbAEzBB.cjs} +2 -5
  191. package/dist/styled-file-C_4eLAdV.js +4 -0
  192. package/dist/styled-file-DQHLzmuL.js +4 -0
  193. package/{styled-file-DLcgYmGN.js → dist/styled-file-DorArlCk.cjs} +2 -5
  194. package/{templates → dist/templates}/salty-reset.d.ts +1 -0
  195. package/dist/templates/salty-reset.d.ts.map +1 -0
  196. package/dist/templates-BGHLaAOm.cjs +1 -0
  197. package/dist/templates-DWWLjEiU.js +4 -0
  198. package/{types → dist/types}/cli-types.d.ts +1 -0
  199. package/dist/types/cli-types.d.ts.map +1 -0
  200. package/{types → dist/types}/config-types.d.ts +1 -0
  201. package/dist/types/config-types.d.ts.map +1 -0
  202. package/{types → dist/types}/font-types.d.ts +1 -0
  203. package/dist/types/font-types.d.ts.map +1 -0
  204. package/dist/types/index.cjs +0 -0
  205. package/{types → dist/types}/index.d.ts +1 -0
  206. package/dist/types/index.d.ts.map +1 -0
  207. package/dist/types/index.js +0 -0
  208. package/{types → dist/types}/util-types.d.ts +1 -0
  209. package/dist/types/util-types.d.ts.map +1 -0
  210. package/{util → dist/util}/camel-case.d.ts +1 -0
  211. package/dist/util/camel-case.d.ts.map +1 -0
  212. package/{util → dist/util}/dash-case.d.ts +1 -0
  213. package/dist/util/dash-case.d.ts.map +1 -0
  214. package/{util → dist/util}/dot-case.d.ts +1 -0
  215. package/dist/util/dot-case.d.ts.map +1 -0
  216. package/{util → dist/util}/glob-match.d.ts +1 -0
  217. package/dist/util/glob-match.d.ts.map +1 -0
  218. package/dist/util/index.cjs +1 -0
  219. package/{util → dist/util}/index.d.ts +1 -0
  220. package/dist/util/index.d.ts.map +1 -0
  221. package/dist/util/index.js +72 -0
  222. package/{util → dist/util}/module-type.d.ts +1 -0
  223. package/dist/util/module-type.d.ts.map +1 -0
  224. package/{util → dist/util}/pascal-case.d.ts +1 -0
  225. package/dist/util/pascal-case.d.ts.map +1 -0
  226. package/{util → dist/util}/to-hash.d.ts +1 -0
  227. package/dist/util/to-hash.d.ts.map +1 -0
  228. package/dist/vanilla-file-BEqMIe-6.js +4 -0
  229. package/{vanilla-file-1kOqbCIM.js → dist/vanilla-file-Z3VsOa_U.cjs} +2 -5
  230. package/dist/viewport-clamp-CHOyzt37.cjs +1 -0
  231. package/dist/viewport-clamp-CRtzRvJ3.js +7 -0
  232. package/package.json +67 -64
  233. package/README.md +0 -535
  234. package/astro-component-5hrNTCJ5.js +0 -4
  235. package/astro-component-Dj3enX6K.cjs +0 -4
  236. package/bin/index.cjs +0 -4
  237. package/bin/index.d.ts +0 -2
  238. package/bin/index.js +0 -3
  239. package/bin/main.cjs +0 -783
  240. package/bin/main.js +0 -782
  241. package/bin/templates.d.ts +0 -14
  242. package/class-name-generator-BcbeZdcV.cjs +0 -88
  243. package/class-name-generator-DJ27JHW_.js +0 -89
  244. package/compiler/get-files.cjs +0 -25
  245. package/compiler/get-files.js +0 -25
  246. package/compiler/get-function-range.cjs +0 -22
  247. package/compiler/get-function-range.js +0 -22
  248. package/compiler/helpers.cjs +0 -34
  249. package/compiler/helpers.js +0 -33
  250. package/compiler/salty-compiler.cjs +0 -845
  251. package/compiler/salty-compiler.js +0 -827
  252. package/config/index.cjs +0 -20
  253. package/config/index.js +0 -20
  254. package/css/index.cjs +0 -12
  255. package/css/index.js +0 -12
  256. package/css/keyframes.cjs +0 -49
  257. package/css/keyframes.js +0 -49
  258. package/css/media.cjs +0 -93
  259. package/css/media.js +0 -93
  260. package/css/merge.cjs +0 -20
  261. package/css/merge.js +0 -20
  262. package/css/token.cjs +0 -4
  263. package/css/token.js +0 -4
  264. package/define-templates-CVhhgPnd.js +0 -60
  265. package/define-templates-Deq1aCbN.cjs +0 -59
  266. package/factories/index.cjs +0 -177
  267. package/factories/index.js +0 -177
  268. package/generators/index.cjs +0 -58
  269. package/generators/index.js +0 -59
  270. package/glob-match-C28iYp1A.js +0 -74
  271. package/glob-match-CT1uFlp-.cjs +0 -73
  272. package/helpers/index.cjs +0 -53
  273. package/helpers/index.js +0 -53
  274. package/index-ByR0nfaf.cjs +0 -4
  275. package/index-DKz1QXqs.js +0 -4
  276. package/instances/classname-instance.cjs +0 -31
  277. package/instances/classname-instance.js +0 -31
  278. package/parse-styles-BlUpavVg.js +0 -521
  279. package/parse-styles-DWT4tDyS.cjs +0 -520
  280. package/parsers/index.cjs +0 -147
  281. package/parsers/index.js +0 -148
  282. package/pascal-case-By_l58S-.cjs +0 -7
  283. package/pascal-case-F3Usi5Wf.js +0 -8
  284. package/runtime/index.cjs +0 -24
  285. package/runtime/index.js +0 -24
  286. package/salty.config-DogY_sSQ.cjs +0 -4
  287. package/salty.config-GV37Q-D2.js +0 -4
  288. package/server/index.cjs +0 -4
  289. package/server/index.d.ts +0 -1
  290. package/server/index.js +0 -4
  291. package/should-restart-CQsyHls3.cjs +0 -17
  292. package/should-restart-CXIO0jxY.js +0 -18
  293. package/styled-file-BzmB9_Ez.cjs +0 -12
  294. package/styled-file-CPd_rTW2.cjs +0 -11
  295. package/to-hash-DSoCPs8D.js +0 -33
  296. package/to-hash-DT2ImSPA.cjs +0 -32
  297. package/types/index.cjs +0 -1
  298. package/types/index.js +0 -1
  299. package/util/index.cjs +0 -18
  300. package/util/index.js +0 -18
  301. package/vanilla-file-r0fp2q_m.cjs +0 -18
  302. package/viewport-clamp-CEmzmcSj.cjs +0 -10
  303. package/viewport-clamp-K553uXu3.js +0 -11
  304. /package/{.saltyrc.schema.json → dist/.saltyrc.schema.json} +0 -0
package/config/index.cjs DELETED
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const factories_index = require("../factories/index.cjs");
4
- const defineTemplates = require("../define-templates-Deq1aCbN.cjs");
5
- const defineConfig = (config) => {
6
- return config;
7
- };
8
- exports.FontFactory = factories_index.FontFactory;
9
- exports.GlobalStylesFactory = factories_index.GlobalStylesFactory;
10
- exports.ImportFactory = factories_index.ImportFactory;
11
- exports.VariablesFactory = factories_index.VariablesFactory;
12
- exports.defineFont = factories_index.defineFont;
13
- exports.defineGlobalStyles = factories_index.defineGlobalStyles;
14
- exports.defineImport = factories_index.defineImport;
15
- exports.defineMediaQuery = factories_index.defineMediaQuery;
16
- exports.defineVariables = factories_index.defineVariables;
17
- exports.TemplateFactory = defineTemplates.TemplateFactory;
18
- exports.TemplatesFactory = defineTemplates.TemplatesFactory;
19
- exports.defineTemplates = defineTemplates.defineTemplates;
20
- exports.defineConfig = defineConfig;
package/config/index.js DELETED
@@ -1,20 +0,0 @@
1
- import { FontFactory, GlobalStylesFactory, ImportFactory, VariablesFactory, defineFont, defineGlobalStyles, defineImport, defineMediaQuery, defineVariables } from "../factories/index.js";
2
- import { T, a, d } from "../define-templates-CVhhgPnd.js";
3
- const defineConfig = (config) => {
4
- return config;
5
- };
6
- export {
7
- FontFactory,
8
- GlobalStylesFactory,
9
- ImportFactory,
10
- T as TemplateFactory,
11
- a as TemplatesFactory,
12
- VariablesFactory,
13
- defineConfig,
14
- defineFont,
15
- defineGlobalStyles,
16
- defineImport,
17
- defineMediaQuery,
18
- d as defineTemplates,
19
- defineVariables
20
- };
package/css/index.cjs DELETED
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const css_keyframes = require("./keyframes.cjs");
4
- const css_media = require("./media.cjs");
5
- const css_token = require("./token.cjs");
6
- const css_merge = require("./merge.cjs");
7
- exports.keyframes = css_keyframes.keyframes;
8
- exports.MediaQueryFactory = css_media.MediaQueryFactory;
9
- exports.media = css_media.media;
10
- exports.token = css_token.token;
11
- exports.mergeFactories = css_merge.mergeFactories;
12
- exports.mergeObjects = css_merge.mergeObjects;
package/css/index.js DELETED
@@ -1,12 +0,0 @@
1
- import { keyframes } from "./keyframes.js";
2
- import { MediaQueryFactory, media } from "./media.js";
3
- import { token } from "./token.js";
4
- import { mergeFactories, mergeObjects } from "./merge.js";
5
- export {
6
- MediaQueryFactory,
7
- keyframes,
8
- media,
9
- mergeFactories,
10
- mergeObjects,
11
- token
12
- };
package/css/keyframes.cjs DELETED
@@ -1,49 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const parseStyles = require("../parse-styles-DWT4tDyS.cjs");
4
- const toHash = require("../to-hash-DT2ImSPA.cjs");
5
- const keyframes = ({ animationName: _name, params: _params, appendInitialStyles, ...keyframes2 }) => {
6
- const modifyKeyframes = async (params = {}) => {
7
- const animationName = _name || toHash.toHash(keyframes2);
8
- const fn = async () => {
9
- const {
10
- duration = "500ms",
11
- easing = "ease-in-out",
12
- delay = "0s",
13
- iterationCount = "1",
14
- direction = "normal",
15
- fillMode = "forwards",
16
- playState = "running"
17
- } = { ..._params, ...params };
18
- const animation = `${animationName} ${duration} ${easing} ${delay} ${iterationCount} ${direction} ${fillMode} ${playState}`;
19
- if (!appendInitialStyles) return animation;
20
- const startingFrom = keyframes2.from || keyframes2["0%"];
21
- if (!startingFrom) return animation;
22
- const startStyles = await parseStyles.parseAndJoinStyles(startingFrom, "");
23
- return `${animation};${startStyles}`;
24
- };
25
- const entries = Object.entries(keyframes2);
26
- const promises = entries.map(async ([key, value]) => {
27
- if (!value) return "";
28
- const styles = await parseStyles.parseAndJoinStyles(value, "");
29
- const keyStr = /^-?\d+$/.test(key) ? `${key}%` : key;
30
- return `${keyStr}{${styles}}`;
31
- });
32
- const resolved = await Promise.all(promises);
33
- const keyframesCss = resolved.join("");
34
- const css = `@keyframes ${animationName} {${keyframesCss}}`;
35
- Object.assign(fn, {
36
- toString: fn,
37
- isKeyframes: true,
38
- animationName,
39
- css,
40
- keyframes: keyframes2
41
- });
42
- return fn;
43
- };
44
- Object.assign(modifyKeyframes, {
45
- _shouldResolve: true
46
- });
47
- return modifyKeyframes;
48
- };
49
- exports.keyframes = keyframes;
package/css/keyframes.js DELETED
@@ -1,49 +0,0 @@
1
- import { p as parseAndJoinStyles } from "../parse-styles-BlUpavVg.js";
2
- import { t as toHash } from "../to-hash-DSoCPs8D.js";
3
- const keyframes = ({ animationName: _name, params: _params, appendInitialStyles, ...keyframes2 }) => {
4
- const modifyKeyframes = async (params = {}) => {
5
- const animationName = _name || toHash(keyframes2);
6
- const fn = async () => {
7
- const {
8
- duration = "500ms",
9
- easing = "ease-in-out",
10
- delay = "0s",
11
- iterationCount = "1",
12
- direction = "normal",
13
- fillMode = "forwards",
14
- playState = "running"
15
- } = { ..._params, ...params };
16
- const animation = `${animationName} ${duration} ${easing} ${delay} ${iterationCount} ${direction} ${fillMode} ${playState}`;
17
- if (!appendInitialStyles) return animation;
18
- const startingFrom = keyframes2.from || keyframes2["0%"];
19
- if (!startingFrom) return animation;
20
- const startStyles = await parseAndJoinStyles(startingFrom, "");
21
- return `${animation};${startStyles}`;
22
- };
23
- const entries = Object.entries(keyframes2);
24
- const promises = entries.map(async ([key, value]) => {
25
- if (!value) return "";
26
- const styles = await parseAndJoinStyles(value, "");
27
- const keyStr = /^-?\d+$/.test(key) ? `${key}%` : key;
28
- return `${keyStr}{${styles}}`;
29
- });
30
- const resolved = await Promise.all(promises);
31
- const keyframesCss = resolved.join("");
32
- const css = `@keyframes ${animationName} {${keyframesCss}}`;
33
- Object.assign(fn, {
34
- toString: fn,
35
- isKeyframes: true,
36
- animationName,
37
- css,
38
- keyframes: keyframes2
39
- });
40
- return fn;
41
- };
42
- Object.assign(modifyKeyframes, {
43
- _shouldResolve: true
44
- });
45
- return modifyKeyframes;
46
- };
47
- export {
48
- keyframes
49
- };
package/css/media.cjs DELETED
@@ -1,93 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
6
- class MediaQueryFactory {
7
- constructor(base = "@media") {
8
- __publicField(this, "next", (value) => {
9
- const str = new String(value);
10
- Object.assign(str, {
11
- get isMedia() {
12
- return true;
13
- },
14
- get and() {
15
- return new MediaQueryFactory(`${value} and`);
16
- },
17
- get or() {
18
- return new MediaQueryFactory(`${value},`);
19
- }
20
- });
21
- return str;
22
- });
23
- this.base = base;
24
- }
25
- custom(value) {
26
- return this.next(`${this.base} ${value}`);
27
- }
28
- minWidth(width) {
29
- const _width = typeof width === "number" ? `${width}px` : width;
30
- const value = `${this.base} (min-width: ${_width})`;
31
- return this.next(value);
32
- }
33
- maxWidth(width) {
34
- const _width = typeof width === "number" ? `${width}px` : width;
35
- const value = `${this.base} (max-width: ${_width})`;
36
- return this.next(value);
37
- }
38
- minHeight(height) {
39
- const _height = typeof height === "number" ? `${height}px` : height;
40
- const value = `${this.base} (min-height: ${_height})`;
41
- return this.next(value);
42
- }
43
- maxHeight(height) {
44
- const _height = typeof height === "number" ? `${height}px` : height;
45
- const value = `${this.base} (max-height: ${_height})`;
46
- return this.next(value);
47
- }
48
- get portrait() {
49
- const value = `${this.base} (orientation: portrait)`;
50
- return this.next(value);
51
- }
52
- get landscape() {
53
- const value = `${this.base} (orientation: landscape)`;
54
- return this.next(value);
55
- }
56
- prefersColorScheme(scheme) {
57
- const value = `${this.base} (prefers-color-scheme: ${scheme})`;
58
- return this.next(value);
59
- }
60
- get dark() {
61
- return this.prefersColorScheme("dark");
62
- }
63
- get light() {
64
- return this.prefersColorScheme("light");
65
- }
66
- get print() {
67
- const value = `${this.base} print`;
68
- return this.next(value);
69
- }
70
- get screen() {
71
- const value = `${this.base} screen`;
72
- return this.next(value);
73
- }
74
- get speech() {
75
- const value = `${this.base} speech`;
76
- return this.next(value);
77
- }
78
- get all() {
79
- const value = `${this.base} all`;
80
- return this.next(value);
81
- }
82
- get not() {
83
- const value = `${this.base} not`;
84
- return this.next(value);
85
- }
86
- get reducedMotion() {
87
- const value = `${this.base} (prefers-reduced-motion: reduce)`;
88
- return this.next(value);
89
- }
90
- }
91
- const media = new MediaQueryFactory();
92
- exports.MediaQueryFactory = MediaQueryFactory;
93
- exports.media = media;
package/css/media.js DELETED
@@ -1,93 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- class MediaQueryFactory {
5
- constructor(base = "@media") {
6
- __publicField(this, "next", (value) => {
7
- const str = new String(value);
8
- Object.assign(str, {
9
- get isMedia() {
10
- return true;
11
- },
12
- get and() {
13
- return new MediaQueryFactory(`${value} and`);
14
- },
15
- get or() {
16
- return new MediaQueryFactory(`${value},`);
17
- }
18
- });
19
- return str;
20
- });
21
- this.base = base;
22
- }
23
- custom(value) {
24
- return this.next(`${this.base} ${value}`);
25
- }
26
- minWidth(width) {
27
- const _width = typeof width === "number" ? `${width}px` : width;
28
- const value = `${this.base} (min-width: ${_width})`;
29
- return this.next(value);
30
- }
31
- maxWidth(width) {
32
- const _width = typeof width === "number" ? `${width}px` : width;
33
- const value = `${this.base} (max-width: ${_width})`;
34
- return this.next(value);
35
- }
36
- minHeight(height) {
37
- const _height = typeof height === "number" ? `${height}px` : height;
38
- const value = `${this.base} (min-height: ${_height})`;
39
- return this.next(value);
40
- }
41
- maxHeight(height) {
42
- const _height = typeof height === "number" ? `${height}px` : height;
43
- const value = `${this.base} (max-height: ${_height})`;
44
- return this.next(value);
45
- }
46
- get portrait() {
47
- const value = `${this.base} (orientation: portrait)`;
48
- return this.next(value);
49
- }
50
- get landscape() {
51
- const value = `${this.base} (orientation: landscape)`;
52
- return this.next(value);
53
- }
54
- prefersColorScheme(scheme) {
55
- const value = `${this.base} (prefers-color-scheme: ${scheme})`;
56
- return this.next(value);
57
- }
58
- get dark() {
59
- return this.prefersColorScheme("dark");
60
- }
61
- get light() {
62
- return this.prefersColorScheme("light");
63
- }
64
- get print() {
65
- const value = `${this.base} print`;
66
- return this.next(value);
67
- }
68
- get screen() {
69
- const value = `${this.base} screen`;
70
- return this.next(value);
71
- }
72
- get speech() {
73
- const value = `${this.base} speech`;
74
- return this.next(value);
75
- }
76
- get all() {
77
- const value = `${this.base} all`;
78
- return this.next(value);
79
- }
80
- get not() {
81
- const value = `${this.base} not`;
82
- return this.next(value);
83
- }
84
- get reducedMotion() {
85
- const value = `${this.base} (prefers-reduced-motion: reduce)`;
86
- return this.next(value);
87
- }
88
- }
89
- const media = new MediaQueryFactory();
90
- export {
91
- MediaQueryFactory,
92
- media
93
- };
package/css/merge.cjs DELETED
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const mergeObjects = (...styles) => {
4
- return styles.flat().reduce((acc, style) => {
5
- if (!style || typeof style !== "object") return acc;
6
- if ("_current" in style) {
7
- let _style = style._current || {};
8
- if (typeof _style !== "object") _style = {};
9
- return { ...acc, ..._style };
10
- }
11
- return { ...acc, ...style };
12
- }, {});
13
- };
14
- const mergeFactories = (...factories) => {
15
- return factories.flat().reduce((acc, factory) => {
16
- return { ...acc, ...factory._children };
17
- }, {});
18
- };
19
- exports.mergeFactories = mergeFactories;
20
- exports.mergeObjects = mergeObjects;
package/css/merge.js DELETED
@@ -1,20 +0,0 @@
1
- const mergeObjects = (...styles) => {
2
- return styles.flat().reduce((acc, style) => {
3
- if (!style || typeof style !== "object") return acc;
4
- if ("_current" in style) {
5
- let _style = style._current || {};
6
- if (typeof _style !== "object") _style = {};
7
- return { ...acc, ..._style };
8
- }
9
- return { ...acc, ...style };
10
- }, {});
11
- };
12
- const mergeFactories = (...factories) => {
13
- return factories.flat().reduce((acc, factory) => {
14
- return { ...acc, ...factory._children };
15
- }, {});
16
- };
17
- export {
18
- mergeFactories,
19
- mergeObjects
20
- };
package/css/token.cjs DELETED
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const token = (token2) => `{${token2}}`;
4
- exports.token = token;
package/css/token.js DELETED
@@ -1,4 +0,0 @@
1
- const token = (token2) => `{${token2}}`;
2
- export {
3
- token
4
- };
@@ -1,60 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- class TemplateFactory {
5
- constructor(params) {
6
- __publicField(this, "_path");
7
- this.params = params;
8
- }
9
- get _current() {
10
- return this.params.template;
11
- }
12
- get isDefineTemplate() {
13
- return true;
14
- }
15
- _setPath(path) {
16
- this._path = path;
17
- return this;
18
- }
19
- }
20
- class TemplatesFactory {
21
- constructor(params) {
22
- __publicField(this, "_path");
23
- __publicField(this, "templates", []);
24
- this.params = params;
25
- Object.entries(params).forEach(([name, template]) => {
26
- this.templates.push(
27
- new TemplateFactory({
28
- name,
29
- template
30
- })
31
- );
32
- });
33
- }
34
- get _current() {
35
- return this.params;
36
- }
37
- get _children() {
38
- return Object.fromEntries(
39
- this.templates.map((template) => {
40
- return [template.params.name, template];
41
- })
42
- );
43
- }
44
- get isDefineTemplates() {
45
- return true;
46
- }
47
- _setPath(path) {
48
- this._path = path;
49
- this.templates.forEach((template) => template._setPath(path));
50
- return this;
51
- }
52
- }
53
- const defineTemplates = (templates) => {
54
- return new TemplatesFactory(templates);
55
- };
56
- export {
57
- TemplateFactory as T,
58
- TemplatesFactory as a,
59
- defineTemplates as d
60
- };
@@ -1,59 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
- class TemplateFactory {
6
- constructor(params) {
7
- __publicField(this, "_path");
8
- this.params = params;
9
- }
10
- get _current() {
11
- return this.params.template;
12
- }
13
- get isDefineTemplate() {
14
- return true;
15
- }
16
- _setPath(path) {
17
- this._path = path;
18
- return this;
19
- }
20
- }
21
- class TemplatesFactory {
22
- constructor(params) {
23
- __publicField(this, "_path");
24
- __publicField(this, "templates", []);
25
- this.params = params;
26
- Object.entries(params).forEach(([name, template]) => {
27
- this.templates.push(
28
- new TemplateFactory({
29
- name,
30
- template
31
- })
32
- );
33
- });
34
- }
35
- get _current() {
36
- return this.params;
37
- }
38
- get _children() {
39
- return Object.fromEntries(
40
- this.templates.map((template) => {
41
- return [template.params.name, template];
42
- })
43
- );
44
- }
45
- get isDefineTemplates() {
46
- return true;
47
- }
48
- _setPath(path) {
49
- this._path = path;
50
- this.templates.forEach((template) => template._setPath(path));
51
- return this;
52
- }
53
- }
54
- const defineTemplates = (templates) => {
55
- return new TemplatesFactory(templates);
56
- };
57
- exports.TemplateFactory = TemplateFactory;
58
- exports.TemplatesFactory = TemplatesFactory;
59
- exports.defineTemplates = defineTemplates;