@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,4 +1,4 @@
1
- import { defaultClassProp } from "./const.mjs";
1
+ import { defaultClassProp } from "./const.js";
2
2
 
3
3
  /**
4
4
  * Split class name by spaces
@@ -1,4 +1,4 @@
1
- import { FactoryComponent } from "../types/component.mjs";
1
+ import { FactoryComponent } from "../types/component.js";
2
2
  type Types = string | Record<string, string>;
3
3
  interface Options {
4
4
  ext?: string;
@@ -1,6 +1,6 @@
1
- import { FactoryComponent, FactoryGeneratedComponent } from "../types/component.mjs";
2
- import { FactoryIconData } from "../types/data.mjs";
3
- import { ComponentFactoryFileSystemOptions } from "../types/options.mjs";
1
+ import { FactoryComponent, FactoryGeneratedComponent } from "../types/component.js";
2
+ import { FactoryIconData } from "../types/data.js";
3
+ import { ComponentFactoryFileSystemOptions } from "../types/options.js";
4
4
  interface Options extends Pick<ComponentFactoryFileSystemOptions, 'doubleDirsForComponents' | 'prefixDirsForComponents'> {
5
5
  includePrefix?: boolean;
6
6
  extension: string;
@@ -1,4 +1,4 @@
1
- import { getGeneratedComponentFilename } from "./filename.mjs";
1
+ import { getGeneratedComponentFilename } from "./filename.js";
2
2
 
3
3
  /**
4
4
  * Add icon and filename to generated component
@@ -1,5 +1,5 @@
1
- import { FactoryIconData } from "../types/data.mjs";
2
- import { ComponentFactoryFileSystemOptions } from "../types/options.mjs";
1
+ import { FactoryIconData } from "../types/data.js";
2
+ import { ComponentFactoryFileSystemOptions } from "../types/options.js";
3
3
  /**
4
4
  * Generate component filename based on options
5
5
  *
@@ -1,4 +1,4 @@
1
- import { GeneratedComponentFile } from "../types/component.mjs";
1
+ import { GeneratedComponentFile } from "../types/component.js";
2
2
  /**
3
3
  * Save exported files to filesystem
4
4
  */
@@ -1,4 +1,4 @@
1
- import { FactoryComponent, GeneratedComponentFile } from "../types/component.mjs";
1
+ import { FactoryComponent, GeneratedComponentFile } from "../types/component.js";
2
2
  /**
3
3
  * Merge exported component files into single array
4
4
  */
@@ -1,4 +1,4 @@
1
- import { IconViewBox } from "../../../svg/viewbox/types.mjs";
1
+ import { IconViewBox } from "../../../svg/viewbox/types.js";
2
2
  /**
3
3
  * Get viewBox ratio as string
4
4
  */
@@ -1,5 +1,5 @@
1
- import { IconViewBox } from "../../../svg/viewbox/types.mjs";
2
- import { ComponentFactoryRenderingOptions } from "../../types/options.mjs";
1
+ import { IconViewBox } from "../../../svg/viewbox/types.js";
2
+ import { ComponentFactoryRenderingOptions } from "../../types/options.js";
3
3
  interface SizeResult {
4
4
  width: string;
5
5
  height: string;
@@ -1,4 +1,4 @@
1
- import { calculateSize } from "../../../svg/props/size.mjs";
1
+ import { calculateSize } from "../../../svg/props/size.js";
2
2
 
3
3
  /**
4
4
  * Get size values for component
@@ -1,5 +1,5 @@
1
- import { ComponentFactorySource } from "../../types/source.mjs";
2
- import { ComponentFactoryRenderingOptions } from "../../types/options.mjs";
1
+ import { ComponentFactorySource } from "../../types/source.js";
2
+ import { ComponentFactoryRenderingOptions } from "../../types/options.js";
3
3
  /**
4
4
  * Convert icon content to a string literal
5
5
  */
@@ -1,4 +1,4 @@
1
- import { generateCSSDefaultImportName } from "../css/name.mjs";
1
+ import { generateCSSDefaultImportName } from "../css/name.js";
2
2
 
3
3
  /**
4
4
  * Convert icon content to a string literal
@@ -1,7 +1,7 @@
1
- import { GeneratedAssetFile } from "../../types/component.mjs";
2
- import { ComponentFactorySource } from "../../types/source.mjs";
3
- import { ComponentFactoryOptions } from "../../types/options.mjs";
4
- import { FactoryComponentImports } from "../imports/types.mjs";
1
+ import { GeneratedAssetFile } from "../../types/component.js";
2
+ import { ComponentFactorySource } from "../../types/source.js";
3
+ import { ComponentFactoryOptions } from "../../types/options.js";
4
+ import { FactoryComponentImports } from "../imports/types.js";
5
5
  interface Options extends Pick<ComponentFactoryOptions, 'cssMode' | 'cssPath' | 'doubleDirsForCSS' | 'mergeCSS'> {
6
6
  componentType?: 'svelte';
7
7
  }
@@ -1,6 +1,6 @@
1
- import { stringifyCSSKeyframes, stringifyCSSSelector } from "../../../css/stringify.mjs";
2
- import { generateCSSDefaultImportName } from "./name.mjs";
3
- import { getGeneratedCSSFilename } from "../filenames/css.mjs";
1
+ import { stringifyCSSKeyframes, stringifyCSSSelector } from "../../../css/stringify.js";
2
+ import { generateCSSDefaultImportName } from "./name.js";
3
+ import { getGeneratedCSSFilename } from "../filenames/css.js";
4
4
 
5
5
  /**
6
6
  * Generate CSS files for component
@@ -1,4 +1,4 @@
1
- import { camelize } from "../../../helpers/misc/strings.mjs";
1
+ import { camelize } from "../../../helpers/misc/strings.js";
2
2
 
3
3
  /**
4
4
  * Generate import name for CSS module
@@ -1,4 +1,4 @@
1
- import { GeneratedAssetPath } from "../../types/options.mjs";
1
+ import { GeneratedAssetPath } from "../../types/options.js";
2
2
  declare const defaultHelpersDirectory = "helpers";
3
3
  /**
4
4
  * Generate asset filename based on options
@@ -1,4 +1,4 @@
1
- import { ComponentFactoryOptions, GeneratedAssetPath } from "../../types/options.mjs";
1
+ import { ComponentFactoryOptions, GeneratedAssetPath } from "../../types/options.js";
2
2
  /**
3
3
  * Generate CSS filename based on options
4
4
  */
@@ -1,4 +1,4 @@
1
- import { getGeneratedAssetFilename } from "./asset.mjs";
1
+ import { getGeneratedAssetFilename } from "./asset.js";
2
2
 
3
3
  /**
4
4
  * Generate CSS filename based on options
@@ -1,4 +1,4 @@
1
- import { ComponentFactoryFileSystemOptions, GeneratedAssetPath } from "../../types/options.mjs";
1
+ import { ComponentFactoryFileSystemOptions, GeneratedAssetPath } from "../../types/options.js";
2
2
  /**
3
3
  * Get relative path to root directory from component
4
4
  *
@@ -1,6 +1,6 @@
1
- import { UniqueHashPartialOptions } from "../../../helpers/hash/types.mjs";
2
- import { FactoryIconData } from "../../types/data.mjs";
3
- import { ComponentFactoryFileSystemOptions, GeneratedAssetPath } from "../../types/options.mjs";
1
+ import { UniqueHashPartialOptions } from "../../../helpers/hash/types.js";
2
+ import { FactoryIconData } from "../../types/data.js";
3
+ import { ComponentFactoryFileSystemOptions, GeneratedAssetPath } from "../../types/options.js";
4
4
  interface Options extends Pick<UniqueHashPartialOptions, 'context'>, Pick<ComponentFactoryFileSystemOptions, 'rootPath' | 'doubleDirsForComponents' | 'prefixDirsForComponents' | 'sharedTypes'> {}
5
5
  /**
6
6
  * Generate component types filename based on options
@@ -1,6 +1,6 @@
1
- import { getUniqueHash } from "../../../helpers/hash/unique.mjs";
2
- import { getGeneratedAssetFilename } from "./asset.mjs";
3
- import { getGeneratedComponentFilename } from "../../export/filename.mjs";
1
+ import { getUniqueHash } from "../../../helpers/hash/unique.js";
2
+ import { getGeneratedAssetFilename } from "./asset.js";
3
+ import { getGeneratedComponentFilename } from "../../export/filename.js";
4
4
 
5
5
  /**
6
6
  * Generate component types filename based on options
@@ -1,6 +1,6 @@
1
- import { GeneratedAssetFile } from "../../types/component.mjs";
2
- import { ComponentFactoryOptions } from "../../types/options.mjs";
3
- import { FactoryComponentImports } from "../imports/types.mjs";
1
+ import { GeneratedAssetFile } from "../../types/component.js";
2
+ import { ComponentFactoryOptions } from "../../types/options.js";
3
+ import { FactoryComponentImports } from "../imports/types.js";
4
4
  /**
5
5
  * Adds getSizeProps() function to assets
6
6
  */
@@ -1,4 +1,4 @@
1
- import { defaultHelpersDirectory, getGeneratedAssetFilename } from "../filenames/asset.mjs";
1
+ import { defaultHelpersDirectory, getGeneratedAssetFilename } from "../filenames/asset.js";
2
2
 
3
3
  const functionName = "getSizeProps";
4
4
  const functionContent = `
@@ -1,4 +1,4 @@
1
- import { FactoryComponentImports } from "./types.mjs";
1
+ import { FactoryComponentImports } from "./types.js";
2
2
  /**
3
3
  * Add named import
4
4
  */
@@ -1,4 +1,4 @@
1
- import { FactoryComponentImports } from "./types.mjs";
1
+ import { FactoryComponentImports } from "./types.js";
2
2
  /**
3
3
  * Create imports object
4
4
  */
@@ -1,4 +1,4 @@
1
- import { FactoryComponentImports } from "./types.mjs";
1
+ import { FactoryComponentImports } from "./types.js";
2
2
  /**
3
3
  * Export imports as string
4
4
  */
@@ -1,4 +1,4 @@
1
- import { FactoryComponentProps } from "./types.mjs";
1
+ import { FactoryComponentProps } from "./types.js";
2
2
  /**
3
3
  * Stringify properties for component as JS object
4
4
  */
@@ -1,4 +1,4 @@
1
- import { stringifyFactoryProps } from "./stringify.mjs";
1
+ import { stringifyFactoryProps } from "./stringify.js";
2
2
 
3
3
  /**
4
4
  * Stringify properties for component as JS object
@@ -1,4 +1,4 @@
1
- import { FactoryComponentProps } from "./types.mjs";
1
+ import { FactoryComponentProps } from "./types.js";
2
2
  /**
3
3
  * Template for property
4
4
  */
@@ -1,4 +1,4 @@
1
- import { FactoryComponentProps } from "./types.mjs";
1
+ import { FactoryComponentProps } from "./types.js";
2
2
  /**
3
3
  * Stringify properties for component
4
4
  */
@@ -0,0 +1,13 @@
1
+ import { GeneratedAssetFile } from "../../types/component.js";
2
+ import { FactoryIconData } from "../../types/data.js";
3
+ import { ComponentFactoryOptions } from "../../types/options.js";
4
+ import { FactoryComponentProps } from "../props/types.js";
5
+ import { JSXMode } from "../../types/jsx.js";
6
+ interface Options extends ComponentFactoryOptions {
7
+ jsx: JSXMode;
8
+ }
9
+ /**
10
+ * Add JSX component types
11
+ */
12
+ declare function addJSXComponentTypes(data: FactoryIconData, options: Options, assets: GeneratedAssetFile[], props: FactoryComponentProps): string;
13
+ export { addJSXComponentTypes };
@@ -1,4 +1,4 @@
1
- import { addComponentTypes } from "./wrapper.mjs";
1
+ import { addComponentTypes } from "./wrapper.js";
2
2
 
3
3
  const iconPropsTemplate = `interface IconProps {
4
4
  /* PROPS */
@@ -0,0 +1,9 @@
1
+ import { GeneratedAssetFile } from "../../types/component.js";
2
+ import { FactoryIconData } from "../../types/data.js";
3
+ import { ComponentFactoryOptions } from "../../types/options.js";
4
+ import { FactoryComponentProps } from "../props/types.js";
5
+ /**
6
+ * Add Svelte component types
7
+ */
8
+ declare const addSvelteComponentTypes: (data: FactoryIconData, options: ComponentFactoryOptions, assets: GeneratedAssetFile[], props: FactoryComponentProps) => string;
9
+ export { addSvelteComponentTypes };
@@ -1,4 +1,4 @@
1
- import { addComponentTypes } from "./wrapper.mjs";
1
+ import { addComponentTypes } from "./wrapper.js";
2
2
 
3
3
  /**
4
4
  * Add Svelte component types
@@ -0,0 +1,9 @@
1
+ import { GeneratedAssetFile } from "../../types/component.js";
2
+ import { FactoryIconData } from "../../types/data.js";
3
+ import { ComponentFactoryOptions } from "../../types/options.js";
4
+ import { FactoryComponentProps } from "../props/types.js";
5
+ /**
6
+ * Add Vue component types
7
+ */
8
+ declare const addVueComponentTypes: (data: FactoryIconData, options: ComponentFactoryOptions, assets: GeneratedAssetFile[], props: FactoryComponentProps) => string;
9
+ export { addVueComponentTypes };
@@ -1,4 +1,4 @@
1
- import { addComponentTypes } from "./wrapper.mjs";
1
+ import { addComponentTypes } from "./wrapper.js";
2
2
 
3
3
  /**
4
4
  * Add Vue component types
@@ -0,0 +1,9 @@
1
+ import { GeneratedAssetFile } from "../../types/component.js";
2
+ import { FactoryIconData } from "../../types/data.js";
3
+ import { ComponentFactoryOptions } from "../../types/options.js";
4
+ import { FactoryComponentProps } from "../props/types.js";
5
+ /**
6
+ * Add component types
7
+ */
8
+ declare function addComponentTypes(template: string, data: FactoryIconData, options: ComponentFactoryOptions, assets: GeneratedAssetFile[], props: FactoryComponentProps): string;
9
+ export { addComponentTypes };
@@ -1,5 +1,5 @@
1
- import { stringifyFactoryPropTypes } from "../props/ts.mjs";
2
- import { getGeneratedComponentTypesFilename } from "../filenames/types.mjs";
1
+ import { stringifyFactoryPropTypes } from "../props/ts.js";
2
+ import { getGeneratedComponentTypesFilename } from "../filenames/types.js";
3
3
 
4
4
  /**
5
5
  * Add component types
@@ -1,7 +1,7 @@
1
- import { FactoryGeneratedComponent } from "./types/component.mjs";
2
- import { FactoryIconData } from "./types/data.mjs";
3
- import { ComponentFactoryOptions } from "./types/options.mjs";
4
- import { JSXMode } from "./types/jsx.mjs";
1
+ import { FactoryGeneratedComponent } from "./types/component.js";
2
+ import { FactoryIconData } from "./types/data.js";
3
+ import { ComponentFactoryOptions } from "./types/options.js";
4
+ import { JSXMode } from "./types/jsx.js";
5
5
  interface Options extends ComponentFactoryOptions {
6
6
  jsx: JSXMode;
7
7
  fallbackPackage?: string;
@@ -1,16 +1,16 @@
1
- import { getComponentSizeValues } from "./helpers/content/size.mjs";
2
- import { stringifyFactoryIconContent } from "./helpers/content/stringify.mjs";
3
- import { stringifyIconViewBox } from "../svg/viewbox/value.mjs";
4
- import { createFactoryImports } from "./helpers/imports/create.mjs";
5
- import { generateCSSFilesForComponent } from "./helpers/css/generate.mjs";
6
- import { addSizeFunctionAsset } from "./helpers/functions/size.mjs";
7
- import { stringifyFactoryPropsAsJSON } from "./helpers/props/object.mjs";
8
- import { stringifyFactoryImports } from "./helpers/imports/stringify.mjs";
9
- import { makeSquareViewBox } from "../svg/viewbox/square.mjs";
10
- import { getUsedFactoryProps, stringifyFactoryPropTypes } from "./helpers/props/ts.mjs";
11
- import { minifyViewBox } from "../svg/viewbox/minify.mjs";
12
- import { getViewBoxRatio } from "./helpers/content/ratio.mjs";
13
- import { addJSXComponentTypes } from "./helpers/ts/jsx.mjs";
1
+ import { getComponentSizeValues } from "./helpers/content/size.js";
2
+ import { stringifyFactoryIconContent } from "./helpers/content/stringify.js";
3
+ import { stringifyIconViewBox } from "../svg/viewbox/value.js";
4
+ import { createFactoryImports } from "./helpers/imports/create.js";
5
+ import { generateCSSFilesForComponent } from "./helpers/css/generate.js";
6
+ import { addSizeFunctionAsset } from "./helpers/functions/size.js";
7
+ import { stringifyFactoryPropsAsJSON } from "./helpers/props/object.js";
8
+ import { stringifyFactoryImports } from "./helpers/imports/stringify.js";
9
+ import { makeSquareViewBox } from "../svg/viewbox/square.js";
10
+ import { getUsedFactoryProps, stringifyFactoryPropTypes } from "./helpers/props/ts.js";
11
+ import { minifyViewBox } from "../svg/viewbox/minify.js";
12
+ import { getViewBoxRatio } from "./helpers/content/ratio.js";
13
+ import { addJSXComponentTypes } from "./helpers/ts/jsx.js";
14
14
 
15
15
  /**
16
16
  * Create functional Vue component code
@@ -1,7 +1,7 @@
1
- import { GeneratedAssetFile } from "../types/component.mjs";
2
- import { ConvertSVGContentOptions } from "../../svg-css/types.mjs";
3
- import { FactoryIconData } from "../types/data.mjs";
4
- import { GeneratedAssetPath } from "../types/options.mjs";
1
+ import { GeneratedAssetFile } from "../types/component.js";
2
+ import { ConvertSVGContentOptions } from "../../svg-css/types.js";
3
+ import { FactoryIconData } from "../types/data.js";
4
+ import { GeneratedAssetPath } from "../types/options.js";
5
5
  import { IconifyIcon, IconifyJSON } from "@iconify/types";
6
6
  interface Options extends ConvertSVGContentOptions {
7
7
  fallback?: string | boolean;
@@ -1,6 +1,6 @@
1
- import { convertSVGContentToCSSRules } from "../../svg-css/content.mjs";
2
- import { getGeneratedAssetFilename } from "../helpers/filenames/asset.mjs";
3
- import { normaliseIconifyIcon } from "../../iconify/icon/nornalise.mjs";
1
+ import { convertSVGContentToCSSRules } from "../../svg-css/content.js";
2
+ import { getGeneratedAssetFilename } from "../helpers/filenames/asset.js";
3
+ import { normaliseIconifyIcon } from "../../iconify/icon/nornalise.js";
4
4
 
5
5
  /**
6
6
  * Convert IconifyIcon data to FactoryIconData
@@ -1,4 +1,4 @@
1
- import { ComponentFactoryFileSystemOptions } from "../types/options.mjs";
1
+ import { ComponentFactoryFileSystemOptions } from "../types/options.js";
2
2
  /**
3
3
  * Generate file system options
4
4
  */
@@ -1,5 +1,5 @@
1
- import { getGeneratedAssetFilename } from "../helpers/filenames/asset.mjs";
2
- import { getFactoryRelativeRootPath } from "../helpers/filenames/path.mjs";
1
+ import { getGeneratedAssetFilename } from "../helpers/filenames/asset.js";
2
+ import { getFactoryRelativeRootPath } from "../helpers/filenames/path.js";
3
3
 
4
4
  /**
5
5
  * Generate file system options
@@ -0,0 +1,8 @@
1
+ import { FactoryGeneratedComponent } from "./types/component.js";
2
+ import { FactoryIconData } from "./types/data.js";
3
+ import { ComponentFactoryOptions } from "./types/options.js";
4
+ /**
5
+ * Create raw component code
6
+ */
7
+ declare function createRawComponent(data: FactoryIconData, options: ComponentFactoryOptions): FactoryGeneratedComponent;
8
+ export { createRawComponent };
@@ -1,11 +1,11 @@
1
- import { getComponentSizeValues } from "./helpers/content/size.mjs";
2
- import { stringifyFactoryIconContent } from "./helpers/content/stringify.mjs";
3
- import { stringifyIconViewBox } from "../svg/viewbox/value.mjs";
4
- import { createFactoryImports } from "./helpers/imports/create.mjs";
5
- import { generateCSSFilesForComponent } from "./helpers/css/generate.mjs";
6
- import { factoryPropTemplate, stringifyFactoryProps } from "./helpers/props/stringify.mjs";
7
- import { stringifyFactoryImports } from "./helpers/imports/stringify.mjs";
8
- import { getGeneratedComponentTypesFilename } from "./helpers/filenames/types.mjs";
1
+ import { getComponentSizeValues } from "./helpers/content/size.js";
2
+ import { stringifyFactoryIconContent } from "./helpers/content/stringify.js";
3
+ import { stringifyIconViewBox } from "../svg/viewbox/value.js";
4
+ import { createFactoryImports } from "./helpers/imports/create.js";
5
+ import { generateCSSFilesForComponent } from "./helpers/css/generate.js";
6
+ import { factoryPropTemplate, stringifyFactoryProps } from "./helpers/props/stringify.js";
7
+ import { stringifyFactoryImports } from "./helpers/imports/stringify.js";
8
+ import { getGeneratedComponentTypesFilename } from "./helpers/filenames/types.js";
9
9
 
10
10
  /**
11
11
  * Create raw component code
@@ -1,6 +1,6 @@
1
- import { FactoryGeneratedComponent } from "./types/component.mjs";
2
- import { FactoryIconData } from "./types/data.mjs";
3
- import { ComponentFactoryOptions } from "./types/options.mjs";
1
+ import { FactoryGeneratedComponent } from "./types/component.js";
2
+ import { FactoryIconData } from "./types/data.js";
3
+ import { ComponentFactoryOptions } from "./types/options.js";
4
4
  interface SvelteOptions extends ComponentFactoryOptions {
5
5
  ts?: boolean;
6
6
  }
@@ -1,16 +1,16 @@
1
- import { getComponentSizeValues } from "./helpers/content/size.mjs";
2
- import { stringifyFactoryIconContent } from "./helpers/content/stringify.mjs";
3
- import { stringifyIconViewBox } from "../svg/viewbox/value.mjs";
4
- import { createFactoryImports } from "./helpers/imports/create.mjs";
5
- import { generateCSSFilesForComponent } from "./helpers/css/generate.mjs";
6
- import { addSizeFunctionAsset } from "./helpers/functions/size.mjs";
7
- import { stringifyFactoryProps } from "./helpers/props/stringify.mjs";
8
- import { stringifyFactoryImports } from "./helpers/imports/stringify.mjs";
9
- import { makeSquareViewBox } from "../svg/viewbox/square.mjs";
10
- import { getUsedFactoryProps, stringifyFactoryPropTypes } from "./helpers/props/ts.mjs";
11
- import { minifyViewBox } from "../svg/viewbox/minify.mjs";
12
- import { getViewBoxRatio } from "./helpers/content/ratio.mjs";
13
- import { addSvelteComponentTypes } from "./helpers/ts/svelte.mjs";
1
+ import { getComponentSizeValues } from "./helpers/content/size.js";
2
+ import { stringifyFactoryIconContent } from "./helpers/content/stringify.js";
3
+ import { stringifyIconViewBox } from "../svg/viewbox/value.js";
4
+ import { createFactoryImports } from "./helpers/imports/create.js";
5
+ import { generateCSSFilesForComponent } from "./helpers/css/generate.js";
6
+ import { addSizeFunctionAsset } from "./helpers/functions/size.js";
7
+ import { stringifyFactoryProps } from "./helpers/props/stringify.js";
8
+ import { stringifyFactoryImports } from "./helpers/imports/stringify.js";
9
+ import { makeSquareViewBox } from "../svg/viewbox/square.js";
10
+ import { getUsedFactoryProps, stringifyFactoryPropTypes } from "./helpers/props/ts.js";
11
+ import { minifyViewBox } from "../svg/viewbox/minify.js";
12
+ import { getViewBoxRatio } from "./helpers/content/ratio.js";
13
+ import { addSvelteComponentTypes } from "./helpers/ts/svelte.js";
14
14
 
15
15
  /**
16
16
  * Create Svelte component code
@@ -1,5 +1,5 @@
1
- import { IconViewBox } from "../../svg/viewbox/types.mjs";
2
- import { ComponentFactorySource } from "./source.mjs";
1
+ import { IconViewBox } from "../../svg/viewbox/types.js";
2
+ import { ComponentFactorySource } from "./source.js";
3
3
  /**
4
4
  * Icon data
5
5
  */
@@ -1,5 +1,5 @@
1
- import { UniqueHashPartialOptions } from "../../helpers/hash/types.mjs";
2
- import { CSSExportMode } from "./css.mjs";
1
+ import { UniqueHashPartialOptions } from "../../helpers/hash/types.js";
2
+ import { CSSExportMode } from "./css.js";
3
3
  /**
4
4
  * Asset path, generated from configuration
5
5
  */
@@ -1,5 +1,5 @@
1
- import { CSSKeyframes, CSSRules } from "../../css/types.mjs";
2
- import { ConvertedSVGContent } from "../../svg-css/types.mjs";
1
+ import { CSSKeyframes, CSSRules } from "../../css/types.js";
2
+ import { ConvertedSVGContent } from "../../svg-css/types.js";
3
3
  /**
4
4
  * Content for component factory
5
5
  */
@@ -0,0 +1,8 @@
1
+ import { FactoryGeneratedComponent } from "./types/component.js";
2
+ import { FactoryIconData } from "./types/data.js";
3
+ import { ComponentFactoryOptions } from "./types/options.js";
4
+ /**
5
+ * Create functional Vue component code
6
+ */
7
+ declare function createVueFunctionalComponent(data: FactoryIconData, options: ComponentFactoryOptions): FactoryGeneratedComponent;
8
+ export { createVueFunctionalComponent };
@@ -1,16 +1,16 @@
1
- import { getComponentSizeValues } from "./helpers/content/size.mjs";
2
- import { stringifyFactoryIconContent } from "./helpers/content/stringify.mjs";
3
- import { stringifyIconViewBox } from "../svg/viewbox/value.mjs";
4
- import { createFactoryImports } from "./helpers/imports/create.mjs";
5
- import { generateCSSFilesForComponent } from "./helpers/css/generate.mjs";
6
- import { addSizeFunctionAsset } from "./helpers/functions/size.mjs";
7
- import { stringifyFactoryPropsAsJSON } from "./helpers/props/object.mjs";
8
- import { stringifyFactoryImports } from "./helpers/imports/stringify.mjs";
9
- import { makeSquareViewBox } from "../svg/viewbox/square.mjs";
10
- import { getUsedFactoryProps } from "./helpers/props/ts.mjs";
11
- import { minifyViewBox } from "../svg/viewbox/minify.mjs";
12
- import { getViewBoxRatio } from "./helpers/content/ratio.mjs";
13
- import { addVueComponentTypes } from "./helpers/ts/vue.mjs";
1
+ import { getComponentSizeValues } from "./helpers/content/size.js";
2
+ import { stringifyFactoryIconContent } from "./helpers/content/stringify.js";
3
+ import { stringifyIconViewBox } from "../svg/viewbox/value.js";
4
+ import { createFactoryImports } from "./helpers/imports/create.js";
5
+ import { generateCSSFilesForComponent } from "./helpers/css/generate.js";
6
+ import { addSizeFunctionAsset } from "./helpers/functions/size.js";
7
+ import { stringifyFactoryPropsAsJSON } from "./helpers/props/object.js";
8
+ import { stringifyFactoryImports } from "./helpers/imports/stringify.js";
9
+ import { makeSquareViewBox } from "../svg/viewbox/square.js";
10
+ import { getUsedFactoryProps } from "./helpers/props/ts.js";
11
+ import { minifyViewBox } from "../svg/viewbox/minify.js";
12
+ import { getViewBoxRatio } from "./helpers/content/ratio.js";
13
+ import { addVueComponentTypes } from "./helpers/ts/vue.js";
14
14
 
15
15
  /**
16
16
  * Create functional Vue component code
@@ -1,6 +1,6 @@
1
- import { FactoryGeneratedComponent } from "./types/component.mjs";
2
- import { FactoryIconData } from "./types/data.mjs";
3
- import { ComponentFactoryOptions } from "./types/options.mjs";
1
+ import { FactoryGeneratedComponent } from "./types/component.js";
2
+ import { FactoryIconData } from "./types/data.js";
3
+ import { ComponentFactoryOptions } from "./types/options.js";
4
4
  interface VueOptions extends ComponentFactoryOptions {
5
5
  ts?: boolean;
6
6
  }
@@ -1,16 +1,16 @@
1
- import { getComponentSizeValues } from "./helpers/content/size.mjs";
2
- import { stringifyFactoryIconContent } from "./helpers/content/stringify.mjs";
3
- import { stringifyIconViewBox } from "../svg/viewbox/value.mjs";
4
- import { createFactoryImports } from "./helpers/imports/create.mjs";
5
- import { generateCSSFilesForComponent } from "./helpers/css/generate.mjs";
6
- import { addSizeFunctionAsset } from "./helpers/functions/size.mjs";
7
- import { stringifyFactoryProps } from "./helpers/props/stringify.mjs";
8
- import { stringifyFactoryImports } from "./helpers/imports/stringify.mjs";
9
- import { makeSquareViewBox } from "../svg/viewbox/square.mjs";
10
- import { getUsedFactoryProps, stringifyFactoryPropTypes } from "./helpers/props/ts.mjs";
11
- import { minifyViewBox } from "../svg/viewbox/minify.mjs";
12
- import { getViewBoxRatio } from "./helpers/content/ratio.mjs";
13
- import { addVueComponentTypes } from "./helpers/ts/vue.mjs";
1
+ import { getComponentSizeValues } from "./helpers/content/size.js";
2
+ import { stringifyFactoryIconContent } from "./helpers/content/stringify.js";
3
+ import { stringifyIconViewBox } from "../svg/viewbox/value.js";
4
+ import { createFactoryImports } from "./helpers/imports/create.js";
5
+ import { generateCSSFilesForComponent } from "./helpers/css/generate.js";
6
+ import { addSizeFunctionAsset } from "./helpers/functions/size.js";
7
+ import { stringifyFactoryProps } from "./helpers/props/stringify.js";
8
+ import { stringifyFactoryImports } from "./helpers/imports/stringify.js";
9
+ import { makeSquareViewBox } from "../svg/viewbox/square.js";
10
+ import { getUsedFactoryProps, stringifyFactoryPropTypes } from "./helpers/props/ts.js";
11
+ import { minifyViewBox } from "../svg/viewbox/minify.js";
12
+ import { getViewBoxRatio } from "./helpers/content/ratio.js";
13
+ import { addVueComponentTypes } from "./helpers/ts/vue.js";
14
14
 
15
15
  /**
16
16
  * Create Vue component code