@cyberalien/svg-utils 1.1.0 → 1.1.2

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 (191) hide show
  1. package/lib/classname/{toggle.mjs → toggle.js} +1 -1
  2. package/lib/components/export/{exports.d.mts → exports.d.ts} +1 -1
  3. package/lib/components/export/{file.d.mts → file.d.ts} +3 -3
  4. package/lib/components/export/{file.mjs → file.js} +1 -1
  5. package/lib/components/export/{filename.d.mts → filename.d.ts} +2 -2
  6. package/lib/components/export/{fs.d.mts → fs.d.ts} +1 -1
  7. package/lib/components/export/{merge.d.mts → merge.d.ts} +1 -1
  8. package/lib/components/helpers/content/{ratio.d.mts → ratio.d.ts} +1 -1
  9. package/lib/components/helpers/content/{size.d.mts → size.d.ts} +2 -2
  10. package/lib/components/helpers/content/{size.mjs → size.js} +1 -1
  11. package/lib/components/helpers/content/{stringify.d.mts → stringify.d.ts} +2 -2
  12. package/lib/components/helpers/content/{stringify.mjs → stringify.js} +1 -1
  13. package/lib/components/helpers/css/{generate.d.mts → generate.d.ts} +4 -4
  14. package/lib/components/helpers/css/{generate.mjs → generate.js} +3 -3
  15. package/lib/components/helpers/css/{name.mjs → name.js} +1 -1
  16. package/lib/components/helpers/filenames/{asset.d.mts → asset.d.ts} +1 -1
  17. package/lib/components/helpers/filenames/{css.d.mts → css.d.ts} +1 -1
  18. package/lib/components/helpers/filenames/{css.mjs → css.js} +1 -1
  19. package/lib/components/helpers/filenames/{path.d.mts → path.d.ts} +1 -1
  20. package/lib/components/helpers/filenames/{types.d.mts → types.d.ts} +3 -3
  21. package/lib/components/helpers/filenames/{types.mjs → types.js} +3 -3
  22. package/lib/components/helpers/functions/{size.d.mts → size.d.ts} +3 -3
  23. package/lib/components/helpers/functions/{size.mjs → size.js} +1 -1
  24. package/lib/components/helpers/imports/{add.d.mts → add.d.ts} +1 -1
  25. package/lib/components/helpers/imports/{create.d.mts → create.d.ts} +1 -1
  26. package/lib/components/helpers/imports/{stringify.d.mts → stringify.d.ts} +1 -1
  27. package/lib/components/helpers/props/{object.d.mts → object.d.ts} +1 -1
  28. package/lib/components/helpers/props/{object.mjs → object.js} +1 -1
  29. package/lib/components/helpers/props/{stringify.d.mts → stringify.d.ts} +1 -1
  30. package/lib/components/helpers/props/{ts.d.mts → ts.d.ts} +1 -1
  31. package/lib/components/helpers/ts/jsx.d.ts +13 -0
  32. package/lib/components/helpers/ts/{jsx.mjs → jsx.js} +1 -1
  33. package/lib/components/helpers/ts/svelte.d.ts +9 -0
  34. package/lib/components/helpers/ts/{svelte.mjs → svelte.js} +1 -1
  35. package/lib/components/helpers/ts/vue.d.ts +9 -0
  36. package/lib/components/helpers/ts/{vue.mjs → vue.js} +1 -1
  37. package/lib/components/helpers/ts/wrapper.d.ts +9 -0
  38. package/lib/components/helpers/ts/{wrapper.mjs → wrapper.js} +2 -2
  39. package/lib/components/{jsx.d.mts → jsx.d.ts} +4 -4
  40. package/lib/components/{jsx.mjs → jsx.js} +13 -13
  41. package/lib/components/prepare/{iconify.d.mts → iconify.d.ts} +4 -4
  42. package/lib/components/prepare/{iconify.mjs → iconify.js} +3 -3
  43. package/lib/components/prepare/{options.d.mts → options.d.ts} +1 -1
  44. package/lib/components/prepare/{options.mjs → options.js} +2 -2
  45. package/lib/components/raw.d.ts +8 -0
  46. package/lib/components/{raw.mjs → raw.js} +8 -8
  47. package/lib/components/{svelte.d.mts → svelte.d.ts} +3 -3
  48. package/lib/components/{svelte.mjs → svelte.js} +13 -13
  49. package/lib/components/types/{data.d.mts → data.d.ts} +2 -2
  50. package/lib/components/types/{options.d.mts → options.d.ts} +2 -2
  51. package/lib/components/types/{source.d.mts → source.d.ts} +2 -2
  52. package/lib/components/vue-func.d.ts +8 -0
  53. package/lib/components/{vue-func.mjs → vue-func.js} +13 -13
  54. package/lib/components/{vue.d.mts → vue.d.ts} +3 -3
  55. package/lib/components/{vue.mjs → vue.js} +13 -13
  56. package/lib/css/{hash.d.mts → hash.d.ts} +1 -1
  57. package/lib/css/{hash.mjs → hash.js} +2 -2
  58. package/lib/css/{stringify.d.mts → stringify.d.ts} +1 -1
  59. package/lib/css/stylesheet.d.ts +16 -0
  60. package/lib/css/stylesheet.js +64 -0
  61. package/lib/css/types.d.ts +33 -0
  62. package/lib/helpers/hash/{context.d.mts → context.d.ts} +1 -1
  63. package/lib/helpers/hash/{unique.d.mts → unique.d.ts} +1 -1
  64. package/lib/helpers/hash/{unique.mjs → unique.js} +3 -3
  65. package/lib/helpers/misc/{compare.mjs → compare.js} +1 -1
  66. package/lib/helpers/misc/{keys.mjs → keys.js} +1 -1
  67. package/lib/helpers/misc/{promises.d.mts → promises.d.ts} +1 -1
  68. package/lib/helpers/misc/{promises.mjs → promises.js} +1 -1
  69. package/lib/iconify/icon/{nornalise.d.mts → nornalise.d.ts} +1 -1
  70. package/lib/iconify/icon/{nornalise.mjs → nornalise.js} +1 -1
  71. package/lib/iconify/icon/types.d.ts +6 -0
  72. package/lib/iconify/icon-set/{icon.mjs → icon.js} +1 -1
  73. package/lib/iconify/icon-set/{parse.d.mts → parse.d.ts} +1 -1
  74. package/lib/iconify/icon-set/{parse.mjs → parse.js} +1 -1
  75. package/lib/index.d.ts +30 -0
  76. package/lib/index.js +26 -0
  77. package/lib/svg/ids/{change.d.mts → change.d.ts} +2 -2
  78. package/lib/svg/ids/{change.mjs → change.js} +3 -3
  79. package/lib/svg/ids/{duplicate.d.mts → duplicate.d.ts} +2 -2
  80. package/lib/svg/ids/{duplicate.mjs → duplicate.js} +1 -1
  81. package/lib/svg/ids/{types.d.mts → types.d.ts} +2 -2
  82. package/lib/svg/ids/{unique.d.mts → unique.d.ts} +2 -2
  83. package/lib/svg/ids/{unique.mjs → unique.js} +2 -2
  84. package/lib/svg/ids/{unused.d.mts → unused.d.ts} +2 -2
  85. package/lib/svg/ids/{unused.mjs → unused.js} +1 -1
  86. package/lib/svg/viewbox/{minify.d.mts → minify.d.ts} +1 -1
  87. package/lib/svg/viewbox/{parse.d.mts → parse.d.ts} +1 -1
  88. package/lib/svg/viewbox/{square.d.mts → square.d.ts} +1 -1
  89. package/lib/svg/viewbox/{value.d.mts → value.d.ts} +1 -1
  90. package/lib/svg-css/{content.d.mts → content.d.ts} +1 -1
  91. package/lib/svg-css/{content.mjs → content.js} +3 -3
  92. package/lib/svg-css/props/{props.d.mts → props.d.ts} +2 -2
  93. package/lib/svg-css/props/{props.mjs → props.js} +3 -3
  94. package/lib/svg-css/props/{types.d.mts → types.d.ts} +1 -1
  95. package/lib/svg-css/{root.d.mts → root.d.ts} +3 -3
  96. package/lib/svg-css/{root.mjs → root.js} +4 -4
  97. package/lib/svg-css/{types.d.mts → types.d.ts} +2 -2
  98. package/lib/xml/{iterate.d.mts → iterate.d.ts} +1 -1
  99. package/lib/xml/{parse.d.mts → parse.d.ts} +1 -1
  100. package/lib/xml/{stringify.d.mts → stringify.d.ts} +1 -1
  101. package/package.json +7 -7
  102. package/lib/components/helpers/ts/jsx.d.mts +0 -13
  103. package/lib/components/helpers/ts/svelte.d.mts +0 -9
  104. package/lib/components/helpers/ts/vue.d.mts +0 -9
  105. package/lib/components/helpers/ts/wrapper.d.mts +0 -9
  106. package/lib/components/raw.d.mts +0 -8
  107. package/lib/components/vue-func.d.mts +0 -8
  108. package/lib/css/types.d.mts +0 -21
  109. package/lib/iconify/icon/types.d.mts +0 -6
  110. package/lib/index.d.mts +0 -28
  111. package/lib/index.mjs +0 -25
  112. /package/lib/classname/{const.d.mts → const.d.ts} +0 -0
  113. /package/lib/classname/{const.mjs → const.js} +0 -0
  114. /package/lib/classname/{toggle.d.mts → toggle.d.ts} +0 -0
  115. /package/lib/components/export/{exports.mjs → exports.js} +0 -0
  116. /package/lib/components/export/{filename.mjs → filename.js} +0 -0
  117. /package/lib/components/export/{fs.mjs → fs.js} +0 -0
  118. /package/lib/components/export/{merge.mjs → merge.js} +0 -0
  119. /package/lib/components/helpers/code/{lines.d.mts → lines.d.ts} +0 -0
  120. /package/lib/components/helpers/code/{lines.mjs → lines.js} +0 -0
  121. /package/lib/components/helpers/content/{ratio.mjs → ratio.js} +0 -0
  122. /package/lib/components/helpers/css/{name.d.mts → name.d.ts} +0 -0
  123. /package/lib/components/helpers/filenames/{asset.mjs → asset.js} +0 -0
  124. /package/lib/components/helpers/filenames/{path.mjs → path.js} +0 -0
  125. /package/lib/components/helpers/imports/{add.mjs → add.js} +0 -0
  126. /package/lib/components/helpers/imports/{create.mjs → create.js} +0 -0
  127. /package/lib/components/helpers/imports/{stringify.mjs → stringify.js} +0 -0
  128. /package/lib/components/helpers/imports/{types.d.mts → types.d.ts} +0 -0
  129. /package/lib/components/helpers/imports/{types.mjs → types.js} +0 -0
  130. /package/lib/components/helpers/props/{stringify.mjs → stringify.js} +0 -0
  131. /package/lib/components/helpers/props/{ts.mjs → ts.js} +0 -0
  132. /package/lib/components/helpers/props/{types.d.mts → types.d.ts} +0 -0
  133. /package/lib/components/helpers/props/{types.mjs → types.js} +0 -0
  134. /package/lib/components/types/{component.d.mts → component.d.ts} +0 -0
  135. /package/lib/components/types/{component.mjs → component.js} +0 -0
  136. /package/lib/components/types/{css.d.mts → css.d.ts} +0 -0
  137. /package/lib/components/types/{css.mjs → css.js} +0 -0
  138. /package/lib/components/types/{data.mjs → data.js} +0 -0
  139. /package/lib/components/types/{jsx.d.mts → jsx.d.ts} +0 -0
  140. /package/lib/components/types/{jsx.mjs → jsx.js} +0 -0
  141. /package/lib/components/types/{options.mjs → options.js} +0 -0
  142. /package/lib/components/types/{source.mjs → source.js} +0 -0
  143. /package/lib/css/{stringify.mjs → stringify.js} +0 -0
  144. /package/lib/css/{types.mjs → types.js} +0 -0
  145. /package/lib/helpers/hash/{context.mjs → context.js} +0 -0
  146. /package/lib/helpers/hash/{hash.d.mts → hash.d.ts} +0 -0
  147. /package/lib/helpers/hash/{hash.mjs → hash.js} +0 -0
  148. /package/lib/helpers/hash/{stringify.d.mts → stringify.d.ts} +0 -0
  149. /package/lib/helpers/hash/{stringify.mjs → stringify.js} +0 -0
  150. /package/lib/helpers/hash/{types.d.mts → types.d.ts} +0 -0
  151. /package/lib/helpers/hash/{types.mjs → types.js} +0 -0
  152. /package/lib/helpers/misc/{clone.d.mts → clone.d.ts} +0 -0
  153. /package/lib/helpers/misc/{clone.mjs → clone.js} +0 -0
  154. /package/lib/helpers/misc/{compare.d.mts → compare.d.ts} +0 -0
  155. /package/lib/helpers/misc/{keys.d.mts → keys.d.ts} +0 -0
  156. /package/lib/helpers/misc/{sort-object.d.mts → sort-object.d.ts} +0 -0
  157. /package/lib/helpers/misc/{sort-object.mjs → sort-object.js} +0 -0
  158. /package/lib/helpers/misc/{strings.d.mts → strings.d.ts} +0 -0
  159. /package/lib/helpers/misc/{strings.mjs → strings.js} +0 -0
  160. /package/lib/iconify/icon/{types.mjs → types.js} +0 -0
  161. /package/lib/iconify/icon-set/{defaults.d.mts → defaults.d.ts} +0 -0
  162. /package/lib/iconify/icon-set/{defaults.mjs → defaults.js} +0 -0
  163. /package/lib/iconify/icon-set/{icon.d.mts → icon.d.ts} +0 -0
  164. /package/lib/iconify/icon-set/{types.d.mts → types.d.ts} +0 -0
  165. /package/lib/iconify/icon-set/{types.mjs → types.js} +0 -0
  166. /package/lib/svg/content/{defs.d.mts → defs.d.ts} +0 -0
  167. /package/lib/svg/content/{defs.mjs → defs.js} +0 -0
  168. /package/lib/svg/ids/{string.d.mts → string.d.ts} +0 -0
  169. /package/lib/svg/ids/{string.mjs → string.js} +0 -0
  170. /package/lib/svg/ids/{types.mjs → types.js} +0 -0
  171. /package/lib/svg/props/{size.d.mts → size.d.ts} +0 -0
  172. /package/lib/svg/props/{size.mjs → size.js} +0 -0
  173. /package/lib/svg/props/{stringify.d.mts → stringify.d.ts} +0 -0
  174. /package/lib/svg/props/{stringify.mjs → stringify.js} +0 -0
  175. /package/lib/svg/viewbox/{minify.mjs → minify.js} +0 -0
  176. /package/lib/svg/viewbox/{parse.mjs → parse.js} +0 -0
  177. /package/lib/svg/viewbox/{square.mjs → square.js} +0 -0
  178. /package/lib/svg/viewbox/{types.d.mts → types.d.ts} +0 -0
  179. /package/lib/svg/viewbox/{types.mjs → types.js} +0 -0
  180. /package/lib/svg/viewbox/{value.mjs → value.js} +0 -0
  181. /package/lib/svg-css/props/{prop.d.mts → prop.d.ts} +0 -0
  182. /package/lib/svg-css/props/{prop.mjs → prop.js} +0 -0
  183. /package/lib/svg-css/props/{tags.d.mts → tags.d.ts} +0 -0
  184. /package/lib/svg-css/props/{tags.mjs → tags.js} +0 -0
  185. /package/lib/svg-css/props/{types.mjs → types.js} +0 -0
  186. /package/lib/svg-css/{types.mjs → types.js} +0 -0
  187. /package/lib/xml/{iterate.mjs → iterate.js} +0 -0
  188. /package/lib/xml/{parse.mjs → parse.js} +0 -0
  189. /package/lib/xml/{stringify.mjs → stringify.js} +0 -0
  190. /package/lib/xml/{types.d.mts → types.d.ts} +0 -0
  191. /package/lib/xml/{types.mjs → types.js} +0 -0
@@ -1,21 +0,0 @@
1
- import { UniqueHashPartialOptions } from "../helpers/hash/types.mjs";
2
- /**
3
- * CSS rules
4
- */
5
- type CSSRules = Record<string, string>;
6
- /**
7
- * Animation keyframes
8
- */
9
- interface CSSKeyframe {
10
- time: number;
11
- value: string;
12
- }
13
- interface CSSKeyframes {
14
- prop: string;
15
- frames: CSSKeyframe[];
16
- }
17
- /**
18
- * Hash options
19
- */
20
- type CSSHashOptions = UniqueHashPartialOptions;
21
- export { CSSHashOptions, CSSKeyframe, CSSKeyframes, CSSRules };
@@ -1,6 +0,0 @@
1
- import { IconViewBox } from "../../svg/viewbox/types.mjs";
2
- interface ParsedIconifyIcon {
3
- body: string;
4
- viewBox: IconViewBox;
5
- }
6
- export { ParsedIconifyIcon };
package/lib/index.d.mts DELETED
@@ -1,28 +0,0 @@
1
- import { ClassProp, classProps, defaultClassProp } from "./classname/const.mjs";
2
- import { splitClassName, toggleClassName } from "./classname/toggle.mjs";
3
- import { HashContext, UniqueHashOptions, UniqueHashPartialOptions } from "./helpers/hash/types.mjs";
4
- import { ParsedXMLNode, ParsedXMLTagElement, ParsedXMLTextElement, StringifyXMLOptions } from "./xml/types.mjs";
5
- import { BaseConvertSVGContentOptions, ConvertSVGContentOptions, ConvertedSVGContent } from "./svg-css/types.mjs";
6
- import { createCSSClassName } from "./css/hash.mjs";
7
- import { stringifyCSSKeyframes, stringifyCSSRules, stringifyCSSSelector } from "./css/stringify.mjs";
8
- import { createUniqueHashContext } from "./helpers/hash/context.mjs";
9
- import { hashString } from "./helpers/hash/hash.mjs";
10
- import { hashToString } from "./helpers/hash/stringify.mjs";
11
- import { getUniqueHash } from "./helpers/hash/unique.mjs";
12
- import { cloneObject } from "./helpers/misc/clone.mjs";
13
- import { compareSets, compareValues } from "./helpers/misc/compare.mjs";
14
- import { ComparisonKey, compareKeys } from "./helpers/misc/keys.mjs";
15
- import { uniquePromise } from "./helpers/misc/promises.mjs";
16
- import { sortObject } from "./helpers/misc/sort-object.mjs";
17
- import { iterateXMLContent } from "./xml/iterate.mjs";
18
- import { parseXMLContent } from "./xml/parse.mjs";
19
- import { stringifyXMLContent } from "./xml/stringify.mjs";
20
- import { ChangeIDResult, UniqueIDOptions } from "./svg/ids/types.mjs";
21
- import { changeIDInString } from "./svg/ids/string.mjs";
22
- import { removeDuplicateIDs } from "./svg/ids/duplicate.mjs";
23
- import { removeUnusedIDs } from "./svg/ids/unused.mjs";
24
- import { changeSVGIDs } from "./svg/ids/change.mjs";
25
- import { createUniqueIDs } from "./svg/ids/unique.mjs";
26
- import { convertSVGRootToCSS } from "./svg-css/root.mjs";
27
- import { convertSVGContentToCSSRules } from "./svg-css/content.mjs";
28
- export { BaseConvertSVGContentOptions, ChangeIDResult, ClassProp, ComparisonKey, ConvertSVGContentOptions, ConvertedSVGContent, HashContext, ParsedXMLNode, ParsedXMLTagElement, ParsedXMLTextElement, StringifyXMLOptions, UniqueHashOptions, UniqueHashPartialOptions, UniqueIDOptions, changeIDInString, changeSVGIDs, classProps, cloneObject, compareKeys, compareSets, compareValues, convertSVGContentToCSSRules, convertSVGRootToCSS, createCSSClassName, createUniqueHashContext, createUniqueIDs, defaultClassProp, getUniqueHash, hashString, hashToString, iterateXMLContent, parseXMLContent, removeDuplicateIDs, removeUnusedIDs, sortObject, splitClassName, stringifyCSSKeyframes, stringifyCSSRules, stringifyCSSSelector, stringifyXMLContent, toggleClassName, uniquePromise };
package/lib/index.mjs DELETED
@@ -1,25 +0,0 @@
1
- import { cloneObject } from "./helpers/misc/clone.mjs";
2
- import { sortObject } from "./helpers/misc/sort-object.mjs";
3
- import { compareSets, compareValues } from "./helpers/misc/compare.mjs";
4
- import { compareKeys } from "./helpers/misc/keys.mjs";
5
- import { uniquePromise } from "./helpers/misc/promises.mjs";
6
- import { createUniqueHashContext } from "./helpers/hash/context.mjs";
7
- import { hashToString } from "./helpers/hash/stringify.mjs";
8
- import { hashString } from "./helpers/hash/hash.mjs";
9
- import { getUniqueHash } from "./helpers/hash/unique.mjs";
10
- import { iterateXMLContent } from "./xml/iterate.mjs";
11
- import { parseXMLContent } from "./xml/parse.mjs";
12
- import { stringifyXMLContent } from "./xml/stringify.mjs";
13
- import { createCSSClassName } from "./css/hash.mjs";
14
- import { stringifyCSSKeyframes, stringifyCSSRules, stringifyCSSSelector } from "./css/stringify.mjs";
15
- import { classProps, defaultClassProp } from "./classname/const.mjs";
16
- import { splitClassName, toggleClassName } from "./classname/toggle.mjs";
17
- import { changeIDInString } from "./svg/ids/string.mjs";
18
- import { removeDuplicateIDs } from "./svg/ids/duplicate.mjs";
19
- import { removeUnusedIDs } from "./svg/ids/unused.mjs";
20
- import { changeSVGIDs } from "./svg/ids/change.mjs";
21
- import { createUniqueIDs } from "./svg/ids/unique.mjs";
22
- import { convertSVGRootToCSS } from "./svg-css/root.mjs";
23
- import { convertSVGContentToCSSRules } from "./svg-css/content.mjs";
24
-
25
- export { changeIDInString, changeSVGIDs, classProps, cloneObject, compareKeys, compareSets, compareValues, convertSVGContentToCSSRules, convertSVGRootToCSS, createCSSClassName, createUniqueHashContext, createUniqueIDs, defaultClassProp, getUniqueHash, hashString, hashToString, iterateXMLContent, parseXMLContent, removeDuplicateIDs, removeUnusedIDs, sortObject, splitClassName, stringifyCSSKeyframes, stringifyCSSRules, stringifyCSSSelector, stringifyXMLContent, toggleClassName, uniquePromise };
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes