@histoire/vendors 0.17.17 → 1.0.0-alpha.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 (216) hide show
  1. package/dist/client/b-floating-vue.js +2175 -2150
  2. package/dist/client/b-iconify.js +663 -850
  3. package/dist/client/b-pinia.js +130 -68
  4. package/dist/client/b-scroll.js +3 -52
  5. package/dist/client/b-vue-router.js +385 -237
  6. package/dist/client/b-vue-use.js +4578 -3115
  7. package/dist/client/b-vue.js +1 -1
  8. package/dist/client/index.js +162 -20
  9. package/dist/client/node_modules/@babel/helper-string-parser/package.json +31 -0
  10. package/dist/client/node_modules/@babel/helper-validator-identifier/package.json +31 -0
  11. package/dist/client/node_modules/@babel/parser/package.json +10 -6
  12. package/dist/client/node_modules/@babel/parser/typings/babel-parser.d.ts +167 -188
  13. package/dist/client/node_modules/@babel/types/lib/index-legacy.d.ts +2786 -0
  14. package/dist/client/node_modules/@babel/types/lib/index.d.ts +3286 -0
  15. package/dist/client/node_modules/@babel/types/package.json +39 -0
  16. package/dist/client/node_modules/@floating-ui/core/dist/floating-ui.core.d.ts +525 -0
  17. package/dist/client/node_modules/@floating-ui/core/package.json +32 -39
  18. package/dist/client/node_modules/@floating-ui/dom/package.json +23 -24
  19. package/dist/client/node_modules/@floating-ui/dom/src/autoUpdate.d.ts +31 -0
  20. package/dist/client/node_modules/@floating-ui/dom/src/index.d.ts +11 -7
  21. package/dist/client/node_modules/@floating-ui/dom/src/platform.d.ts +1 -1
  22. package/dist/client/node_modules/@floating-ui/dom/src/types.d.ts +121 -20
  23. package/dist/client/node_modules/@floating-ui/dom/src/utils/getBoundingClientRect.d.ts +1 -1
  24. package/dist/client/node_modules/@floating-ui/dom/src/utils/getClippingRect.d.ts +12 -0
  25. package/dist/client/node_modules/@floating-ui/dom/src/utils/getCssDimensions.d.ts +4 -0
  26. package/dist/client/node_modules/@floating-ui/dom/src/utils/getDimensions.d.ts +1 -1
  27. package/dist/client/node_modules/@floating-ui/dom/src/utils/getNearestOverflowAncestor.d.ts +1 -0
  28. package/dist/client/node_modules/@floating-ui/dom/src/utils/getOverflowAncestors.d.ts +3 -0
  29. package/dist/client/node_modules/@floating-ui/dom/src/utils/getScale.d.ts +7 -0
  30. package/dist/client/node_modules/@floating-ui/dom/src/utils/getViewportRect.d.ts +2 -2
  31. package/dist/client/node_modules/@floating-ui/dom/src/utils/getWindowScrollBarX.d.ts +1 -1
  32. package/dist/client/node_modules/@floating-ui/dom/src/utils/is.d.ts +3 -1
  33. package/dist/client/node_modules/@floating-ui/dom/src/utils/unwrapElement.d.ts +2 -0
  34. package/dist/client/node_modules/@floating-ui/dom/src/utils/userAgent.d.ts +1 -0
  35. package/dist/client/node_modules/@floating-ui/dom/src/utils/window.d.ts +1 -2
  36. package/dist/client/node_modules/@floating-ui/utils/dist/floating-ui.utils.d.ts +103 -0
  37. package/dist/client/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.d.ts +47 -0
  38. package/dist/client/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.d.ts +47 -0
  39. package/dist/client/node_modules/@floating-ui/utils/dom/package.json +6 -0
  40. package/dist/client/node_modules/@floating-ui/utils/package.json +70 -0
  41. package/dist/client/node_modules/@iconify/types/package.json +23 -0
  42. package/dist/client/node_modules/@iconify/types/provider.d.ts +44 -0
  43. package/dist/client/node_modules/@iconify/types/types.d.ts +272 -0
  44. package/dist/client/node_modules/@iconify/vue/dist/iconify.d.ts +122 -327
  45. package/dist/client/node_modules/@iconify/vue/dist/offline.d.ts +36 -269
  46. package/dist/client/node_modules/@iconify/vue/package.json +64 -60
  47. package/dist/client/node_modules/@jridgewell/sourcemap-codec/dist/types/scopes.d.ts +49 -0
  48. package/dist/client/node_modules/@jridgewell/sourcemap-codec/dist/types/sourcemap-codec.d.ts +2 -0
  49. package/dist/client/node_modules/@jridgewell/sourcemap-codec/dist/types/strings.d.ts +15 -0
  50. package/dist/client/node_modules/@jridgewell/sourcemap-codec/dist/types/vlq.d.ts +6 -0
  51. package/dist/client/node_modules/@jridgewell/sourcemap-codec/package.json +3 -2
  52. package/dist/client/node_modules/@types/web-bluetooth/index.d.ts +33 -14
  53. package/dist/client/node_modules/@types/web-bluetooth/package.json +12 -12
  54. package/dist/client/node_modules/@vue/compiler-core/dist/compiler-core.d.ts +218 -125
  55. package/dist/client/node_modules/@vue/compiler-core/package.json +20 -5
  56. package/dist/client/node_modules/@vue/compiler-dom/dist/compiler-dom.d.ts +6 -3
  57. package/dist/client/node_modules/@vue/compiler-dom/package.json +17 -3
  58. package/dist/client/node_modules/@vue/compiler-sfc/dist/compiler-sfc.d.ts +35 -25
  59. package/dist/client/node_modules/@vue/compiler-sfc/package.json +27 -18
  60. package/dist/client/node_modules/@vue/compiler-ssr/dist/compiler-ssr.d.ts +2 -2
  61. package/dist/client/node_modules/@vue/compiler-ssr/package.json +3 -3
  62. package/dist/client/node_modules/@vue/devtools-api/package.json +1 -1
  63. package/dist/client/node_modules/@vue/reactivity/dist/reactivity.d.ts +268 -166
  64. package/dist/client/node_modules/@vue/reactivity/package.json +16 -2
  65. package/dist/client/node_modules/@vue/runtime-core/dist/runtime-core.d.ts +728 -529
  66. package/dist/client/node_modules/@vue/runtime-core/package.json +17 -3
  67. package/dist/client/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts +195 -86
  68. package/dist/client/node_modules/@vue/runtime-dom/package.json +22 -4
  69. package/dist/client/node_modules/@vue/server-renderer/dist/server-renderer.d.ts +4 -8
  70. package/dist/client/node_modules/@vue/server-renderer/package.json +18 -4
  71. package/dist/client/node_modules/@vue/shared/dist/shared.d.ts +45 -30
  72. package/dist/client/node_modules/@vue/shared/package.json +15 -1
  73. package/dist/client/node_modules/@vueuse/core/index.d.ts +2323 -666
  74. package/dist/client/node_modules/@vueuse/core/package.json +22 -12
  75. package/dist/client/node_modules/@vueuse/metadata/index.d.ts +7 -5
  76. package/dist/client/node_modules/@vueuse/metadata/package.json +14 -7
  77. package/dist/client/node_modules/@vueuse/shared/index.d.ts +451 -280
  78. package/dist/client/node_modules/@vueuse/shared/package.json +17 -6
  79. package/dist/client/node_modules/compute-scroll-into-view/dist/index.d.ts +75 -0
  80. package/dist/client/node_modules/compute-scroll-into-view/package.json +35 -45
  81. package/dist/client/node_modules/entities/lib/decode.d.ts +211 -0
  82. package/dist/client/node_modules/entities/lib/decode_codepoint.d.ts +19 -0
  83. package/dist/client/node_modules/entities/lib/encode.d.ts +22 -0
  84. package/dist/client/node_modules/entities/lib/escape.d.ts +43 -0
  85. package/dist/client/node_modules/entities/lib/esm/decode.d.ts +211 -0
  86. package/dist/client/node_modules/entities/lib/esm/decode_codepoint.d.ts +19 -0
  87. package/dist/client/node_modules/entities/lib/esm/encode.d.ts +22 -0
  88. package/dist/client/node_modules/entities/lib/esm/escape.d.ts +43 -0
  89. package/dist/client/node_modules/entities/lib/esm/generated/decode-data-html.d.ts +3 -0
  90. package/dist/client/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts +3 -0
  91. package/dist/client/node_modules/entities/lib/esm/generated/encode-html.d.ts +8 -0
  92. package/dist/client/node_modules/entities/lib/esm/index.d.ts +96 -0
  93. package/dist/client/node_modules/entities/lib/esm/package.json +1 -0
  94. package/dist/client/node_modules/entities/lib/generated/decode-data-html.d.ts +3 -0
  95. package/dist/client/node_modules/entities/lib/generated/decode-data-xml.d.ts +3 -0
  96. package/dist/client/node_modules/entities/lib/generated/encode-html.d.ts +8 -0
  97. package/dist/client/node_modules/entities/lib/index.d.ts +96 -0
  98. package/dist/client/node_modules/entities/package.json +90 -0
  99. package/dist/client/node_modules/floating-vue/dist/components/Dropdown.d.ts +398 -0
  100. package/dist/client/node_modules/floating-vue/dist/components/Menu.d.ts +398 -0
  101. package/dist/client/node_modules/floating-vue/dist/components/Popper.d.ts +225 -105
  102. package/dist/client/node_modules/floating-vue/dist/components/Popper.vue.d.ts +471 -364
  103. package/dist/client/node_modules/floating-vue/dist/components/PopperContent.vue.d.ts +14 -25
  104. package/dist/client/node_modules/floating-vue/dist/components/PopperWrapper.vue.d.ts +392 -6
  105. package/dist/client/node_modules/floating-vue/dist/components/Tooltip.d.ts +398 -0
  106. package/dist/client/node_modules/floating-vue/dist/components/TooltipDirective.vue.d.ts +49 -10
  107. package/dist/client/node_modules/floating-vue/dist/config.d.ts +1 -1
  108. package/dist/client/node_modules/floating-vue/dist/index.d.ts +2071 -247
  109. package/dist/client/node_modules/floating-vue/dist/util/events.d.ts +2 -0
  110. package/dist/client/node_modules/floating-vue/dist/util/popper.d.ts +1 -1
  111. package/dist/client/node_modules/floating-vue/package.json +42 -33
  112. package/dist/client/node_modules/magic-string/dist/magic-string.cjs.d.ts +250 -229
  113. package/dist/client/node_modules/magic-string/package.json +24 -26
  114. package/dist/client/node_modules/nanoid/package.json +1 -1
  115. package/dist/client/node_modules/picocolors/package.json +2 -2
  116. package/dist/client/node_modules/picocolors/types.d.ts +51 -0
  117. package/dist/client/node_modules/pinia/dist/pinia.d.ts +116 -37
  118. package/dist/client/node_modules/pinia/package.json +7 -11
  119. package/dist/client/node_modules/postcss/lib/at-rule.d.ts +22 -19
  120. package/dist/client/node_modules/postcss/lib/comment.d.ts +6 -5
  121. package/dist/client/node_modules/postcss/lib/container.d.ts +72 -82
  122. package/dist/client/node_modules/postcss/lib/css-syntax-error.d.ts +1 -1
  123. package/dist/client/node_modules/postcss/lib/declaration.d.ts +16 -13
  124. package/dist/client/node_modules/postcss/lib/document.d.ts +4 -4
  125. package/dist/client/node_modules/postcss/lib/input.d.ts +28 -16
  126. package/dist/client/node_modules/postcss/lib/lazy-result.d.ts +40 -40
  127. package/dist/client/node_modules/postcss/lib/list.d.ts +5 -2
  128. package/dist/client/node_modules/postcss/lib/no-work-result.d.ts +5 -5
  129. package/dist/client/node_modules/postcss/lib/node.d.ts +19 -14
  130. package/dist/client/node_modules/postcss/lib/postcss.d.ts +25 -8
  131. package/dist/client/node_modules/postcss/lib/processor.d.ts +1 -1
  132. package/dist/client/node_modules/postcss/lib/result.d.ts +10 -11
  133. package/dist/client/node_modules/postcss/lib/root.d.ts +4 -4
  134. package/dist/client/node_modules/postcss/lib/rule.d.ts +22 -13
  135. package/dist/client/node_modules/postcss/package.json +4 -4
  136. package/dist/client/node_modules/scroll-into-view-if-needed/dist/index.d.ts +79 -0
  137. package/dist/client/node_modules/scroll-into-view-if-needed/package.json +28 -67
  138. package/dist/client/node_modules/source-map-js/lib/source-map-consumer.d.ts +1 -0
  139. package/dist/client/node_modules/source-map-js/lib/source-map-generator.d.ts +1 -0
  140. package/dist/client/node_modules/source-map-js/lib/source-node.d.ts +1 -0
  141. package/dist/client/node_modules/source-map-js/package.json +1 -1
  142. package/dist/client/node_modules/source-map-js/source-map.d.ts +88 -99
  143. package/dist/client/node_modules/vue/dist/vue.d.ts +0 -4
  144. package/dist/client/node_modules/vue/jsx-runtime/index.d.ts +2 -1
  145. package/dist/client/node_modules/vue/jsx.d.ts +2 -1
  146. package/dist/client/node_modules/vue/package.json +13 -14
  147. package/dist/client/node_modules/{pinia/node_modules/vue-demi → vue-demi}/package.json +1 -1
  148. package/dist/client/node_modules/vue-router/dist/vue-router.d.ts +410 -81
  149. package/dist/client/node_modules/vue-router/package.json +66 -37
  150. package/dist/client/node_modules/vue-router/vue-router-auto-routes.d.ts +4 -0
  151. package/dist/client/node_modules/vue-router/vue-router-auto.d.ts +4 -0
  152. package/dist/client/vue.runtime.esm-bundler.js +6458 -4714
  153. package/package.json +17 -17
  154. package/rollup.config.mjs +6 -6
  155. package/dist/client/index2.js +0 -168
  156. package/dist/client/node_modules/@floating-ui/core/index.d.ts +0 -1
  157. package/dist/client/node_modules/@floating-ui/core/src/_babel.d.ts +0 -1
  158. package/dist/client/node_modules/@floating-ui/core/src/computeCoordsFromPlacement.d.ts +0 -4
  159. package/dist/client/node_modules/@floating-ui/core/src/computePosition.d.ts +0 -2
  160. package/dist/client/node_modules/@floating-ui/core/src/detectOverflow.d.ts +0 -9
  161. package/dist/client/node_modules/@floating-ui/core/src/enums.d.ts +0 -4
  162. package/dist/client/node_modules/@floating-ui/core/src/index.d.ts +0 -11
  163. package/dist/client/node_modules/@floating-ui/core/src/middleware/arrow.d.ts +0 -6
  164. package/dist/client/node_modules/@floating-ui/core/src/middleware/autoPlacement.d.ts +0 -9
  165. package/dist/client/node_modules/@floating-ui/core/src/middleware/flip.d.ts +0 -10
  166. package/dist/client/node_modules/@floating-ui/core/src/middleware/hide.d.ts +0 -2
  167. package/dist/client/node_modules/@floating-ui/core/src/middleware/inline.d.ts +0 -5
  168. package/dist/client/node_modules/@floating-ui/core/src/middleware/offset.d.ts +0 -21
  169. package/dist/client/node_modules/@floating-ui/core/src/middleware/shift.d.ts +0 -32
  170. package/dist/client/node_modules/@floating-ui/core/src/middleware/size.d.ts +0 -6
  171. package/dist/client/node_modules/@floating-ui/core/src/types.d.ts +0 -148
  172. package/dist/client/node_modules/@floating-ui/core/src/utils/expandPaddingObject.d.ts +0 -2
  173. package/dist/client/node_modules/@floating-ui/core/src/utils/getAlignment.d.ts +0 -2
  174. package/dist/client/node_modules/@floating-ui/core/src/utils/getAlignmentSides.d.ts +0 -5
  175. package/dist/client/node_modules/@floating-ui/core/src/utils/getBasePlacement.d.ts +0 -2
  176. package/dist/client/node_modules/@floating-ui/core/src/utils/getCrossAxis.d.ts +0 -2
  177. package/dist/client/node_modules/@floating-ui/core/src/utils/getExpandedPlacements.d.ts +0 -2
  178. package/dist/client/node_modules/@floating-ui/core/src/utils/getLengthFromAxis.d.ts +0 -2
  179. package/dist/client/node_modules/@floating-ui/core/src/utils/getMainAxisFromPlacement.d.ts +0 -2
  180. package/dist/client/node_modules/@floating-ui/core/src/utils/getOppositeAlignmentPlacement.d.ts +0 -2
  181. package/dist/client/node_modules/@floating-ui/core/src/utils/getOppositePlacement.d.ts +0 -1
  182. package/dist/client/node_modules/@floating-ui/core/src/utils/getPaddingObject.d.ts +0 -2
  183. package/dist/client/node_modules/@floating-ui/core/src/utils/math.d.ts +0 -2
  184. package/dist/client/node_modules/@floating-ui/core/src/utils/rectToClientRect.d.ts +0 -2
  185. package/dist/client/node_modules/@floating-ui/core/src/utils/within.d.ts +0 -1
  186. package/dist/client/node_modules/@floating-ui/dom/src/utils/contains.d.ts +0 -1
  187. package/dist/client/node_modules/@floating-ui/dom/src/utils/getClippingClientRect.d.ts +0 -6
  188. package/dist/client/node_modules/@floating-ui/dom/src/utils/getScrollParent.d.ts +0 -1
  189. package/dist/client/node_modules/@floating-ui/dom/src/utils/getScrollParents.d.ts +0 -1
  190. package/dist/client/node_modules/@vue/reactivity-transform/dist/reactivity-transform.d.ts +0 -43
  191. package/dist/client/node_modules/@vue/reactivity-transform/package.json +0 -41
  192. package/dist/client/node_modules/@vueuse/core/node_modules/vue-demi/package.json +0 -47
  193. package/dist/client/node_modules/@vueuse/shared/node_modules/vue-demi/lib/index.d.ts +0 -22
  194. package/dist/client/node_modules/@vueuse/shared/node_modules/vue-demi/lib/v2/index.d.ts +0 -33
  195. package/dist/client/node_modules/@vueuse/shared/node_modules/vue-demi/lib/v2.7/index.d.ts +0 -38
  196. package/dist/client/node_modules/@vueuse/shared/node_modules/vue-demi/lib/v3/index.d.ts +0 -22
  197. package/dist/client/node_modules/@vueuse/shared/node_modules/vue-demi/package.json +0 -47
  198. package/dist/client/node_modules/compute-scroll-into-view/typings/index.d.ts +0 -19
  199. package/dist/client/node_modules/floating-vue/dist/components/Dropdown.vue.d.ts +0 -25
  200. package/dist/client/node_modules/floating-vue/dist/components/Menu.vue.d.ts +0 -25
  201. package/dist/client/node_modules/floating-vue/dist/components/Tooltip.vue.d.ts +0 -25
  202. package/dist/client/node_modules/floating-vue/src/global-shim.d.ts +0 -1
  203. package/dist/client/node_modules/floating-vue/src/vue-shim.d.ts +0 -5
  204. package/dist/client/node_modules/pinia/node_modules/vue-demi/lib/index.d.ts +0 -22
  205. package/dist/client/node_modules/pinia/node_modules/vue-demi/lib/v2/index.d.ts +0 -33
  206. package/dist/client/node_modules/pinia/node_modules/vue-demi/lib/v2.7/index.d.ts +0 -38
  207. package/dist/client/node_modules/pinia/node_modules/vue-demi/lib/v3/index.d.ts +0 -22
  208. package/dist/client/node_modules/scroll-into-view-if-needed/typings/index.d.ts +0 -13
  209. package/dist/client/node_modules/scroll-into-view-if-needed/typings/types.d.ts +0 -19
  210. package/dist/client/node_modules/vue/macros-global.d.ts +0 -19
  211. package/dist/client/node_modules/vue/macros.d.ts +0 -112
  212. package/dist/client/node_modules/vue/ref-macros.d.ts +0 -2
  213. /package/dist/client/node_modules/{@vueuse/core/node_modules/vue-demi → vue-demi}/lib/index.d.ts +0 -0
  214. /package/dist/client/node_modules/{@vueuse/core/node_modules/vue-demi → vue-demi}/lib/v2/index.d.ts +0 -0
  215. /package/dist/client/node_modules/{@vueuse/core/node_modules/vue-demi → vue-demi}/lib/v2.7/index.d.ts +0 -0
  216. /package/dist/client/node_modules/{@vueuse/core/node_modules/vue-demi → vue-demi}/lib/v3/index.d.ts +0 -0
@@ -1,10 +1,10 @@
1
- import type { AllowedComponentProps } from 'vue';
2
- import type { ComponentCustomProps } from 'vue';
3
1
  import type { ComponentOptionsMixin } from 'vue';
2
+ import { ComponentProvideOptions } from 'vue';
4
3
  import type { DefineComponent } from 'vue';
5
- import type { EmitsOptions } from 'vue';
6
- import { ExtractPropTypes } from 'vue';
7
- import type { VNodeProps } from 'vue';
4
+ import { IconifyIcon } from '@iconify/types';
5
+ import { IconifyJSON } from '@iconify/types';
6
+ import { IconifyTransformations } from '@iconify/types';
7
+ import { PublicProps } from 'vue';
8
8
 
9
9
  /**
10
10
  * Add custom config for provider
@@ -19,7 +19,7 @@ export declare function addCollection(data: IconifyJSON, provider?: string): boo
19
19
  /**
20
20
  * Add one icon
21
21
  */
22
- export declare function addIcon(name: string, data: IconifyIcon): boolean;
22
+ export declare function addIcon(name: string, data: IconifyIcon | null): boolean;
23
23
 
24
24
  /**
25
25
  * Internal API
@@ -27,94 +27,58 @@ export declare function addIcon(name: string, data: IconifyIcon): boolean;
27
27
  export declare const _api: IconifyAPIInternalFunctions;
28
28
 
29
29
  /**
30
- * Icon with optional parameters that are provided by API and affect only search
31
- */
32
- declare interface APIIconAttributes {
33
- // True if icon is hidden.
34
- // Used in icon sets to keep icons that no longer exist, but should still be accessible
35
- // from API, preventing websites from breaking when icon is removed by developer.
36
- hidden?: boolean;
37
- }
38
-
39
- /**
40
- * API query parameters
30
+ * Storage types
31
+ *
32
+ * @deprecated This type is not used anymore
41
33
  */
42
- declare type APIQueryParamValue = number | string | boolean | undefined;
34
+ declare type BrowserStorageType = 'local' | 'session';
43
35
 
44
36
  /**
45
- * Build icon
37
+ * Get SVG attributes and content from icon + customisations
38
+ *
39
+ * Does not generate style to make it compatible with frameworks that use objects for style, such as React.
40
+ * Instead, it generates 'inline' value. If true, rendering engine should add verticalAlign: -0.125em to icon.
41
+ *
42
+ * Customisations should be normalised by platform specific parser.
43
+ * Result should be converted to <svg> by platform specific parser.
44
+ * Use replaceIDs to generate unique IDs for body.
46
45
  */
47
- export declare function buildIcon(icon: IconifyIcon, customisations?: RawIconCustomisations): IconifyIconBuildResult;
46
+ export declare function buildIcon(icon: IconifyIcon, customisations?: IconifyIconCustomisations_2): IconifyIconBuildResult;
48
47
 
49
48
  /**
50
49
  * Calculate second dimension when only 1 dimension is set
51
50
  */
51
+ export declare function calculateSize(size: string, ratio: number, precision?: number): string;
52
+
53
+ export declare function calculateSize(size: number, ratio: number, precision?: number): number;
54
+
52
55
  export declare function calculateSize(size: string | number, ratio: number, precision?: number): string | number;
53
56
 
54
57
  /**
55
58
  * Disable cache
59
+ *
60
+ * @deprecated No longer used
56
61
  */
57
62
  export declare function disableCache(storage: IconifyBrowserCacheType): void;
58
63
 
59
64
  /**
60
65
  * Enable cache
66
+ *
67
+ * @deprecated No longer used
61
68
  */
62
69
  export declare function enableCache(storage: IconifyBrowserCacheType): void;
63
70
 
64
- declare interface ExtendedIconifyAlias extends IconifyAlias, APIIconAttributes {}
65
-
66
- declare interface ExtendedIconifyIcon extends IconifyIcon, APIIconAttributes {}
67
-
68
71
  /**
69
72
  * Signature for getAPIConfig
70
73
  */
71
74
  export declare type GetAPIConfig = (provider: string) => IconifyAPIConfig | undefined;
72
75
 
73
76
  /**
74
- * Get icon
77
+ * Get full icon
75
78
  */
76
- export declare function getIcon(name: string): Required<IconifyIcon> | null;
79
+ export declare function getIcon(name: string): Required<IconifyIcon> | null | undefined;
77
80
 
78
- export declare const Icon: DefineComponent<{}, {}, {
79
- iconMounted: boolean;
80
- counter: number;
81
- }, {}, {
82
- abortLoading(): void;
83
- getIcon(icon: IconifyIcon | string, onload?: IconifyIconOnLoad): IconComponentData | null;
84
- }, ComponentOptionsMixin, ComponentOptionsMixin, EmitsOptions, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes< {}>>, {}>;
85
-
86
- /**
87
- * Component
88
- */
89
- declare interface IconComponentData {
90
- data: Required<IconifyIcon>;
91
- classes?: string[];
92
- }
93
-
94
- /**
95
- * Check if icon exists
96
- */
97
- export declare function iconExists(name: string): boolean;
98
-
99
- /**
100
- * Alias.
101
- */
102
- declare interface IconifyAlias extends IconifyOptional {
103
- // Parent icon index without prefix, required.
104
- parent: string;
105
-
106
- // IconifyOptional properties.
107
- // Alias should have only properties that it overrides.
108
- // Transformations are merged, not overridden. See IconifyTransformations comments.
109
- }
110
-
111
- /**
112
- * "aliases" field of JSON file.
113
- */
114
- declare interface IconifyAliases {
115
- // Index is name of icon, without prefix. Value is ExtendedIconifyAlias object.
116
- [index: string]: ExtendedIconifyAlias;
117
- }
81
+ export declare const Icon: DefineComponent<IconProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<IconProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
118
82
 
119
83
  /**
120
84
  * API config
@@ -146,6 +110,14 @@ export declare interface IconifyAPIFunctions {
146
110
  * Add API provider
147
111
  */
148
112
  addAPIProvider: (provider: string, customConfig: PartialIconifyAPIConfig) => boolean;
113
+ /**
114
+ * Set custom loader for multple icons
115
+ */
116
+ setCustomIconsLoader: (callback: IconifyCustomIconsLoader, prefix: string, provider?: string) => void;
117
+ /**
118
+ * Set custom loader for one icon
119
+ */
120
+ setCustomIconLoader: (callback: IconifyCustomIconLoader, prefix: string, provider?: string) => void;
149
121
  }
150
122
 
151
123
  /**
@@ -182,19 +154,13 @@ export declare interface IconifyAPIInternalFunctions {
182
154
  * Set and get fetch()
183
155
  */
184
156
  setFetch: (item: typeof fetch) => void;
185
- getFetch: () => typeof fetch | null;
157
+ getFetch: () => typeof fetch | undefined;
186
158
  /**
187
159
  * List all API providers (from config)
188
160
  */
189
161
  listAPIProviders: () => string[];
190
- /**
191
- * Merge parameters
192
- */
193
- mergeParams: MergeParams;
194
162
  }
195
163
 
196
- export declare type IconifyAPIMergeQueryParams = Record<string, APIQueryParamValue>;
197
-
198
164
  /**
199
165
  * API modules
200
166
  */
@@ -214,6 +180,8 @@ export declare type IconifyAPISendQuery = (host: string, params: IconifyAPIQuery
214
180
 
215
181
  /**
216
182
  * Interface for exported functions
183
+ *
184
+ * @deprecated This type is not used anymore
217
185
  */
218
186
  export declare interface IconifyBrowserCacheFunctions {
219
187
  enableCache: (storage: IconifyBrowserCacheType) => void;
@@ -222,62 +190,29 @@ export declare interface IconifyBrowserCacheFunctions {
222
190
 
223
191
  /**
224
192
  * Cache types
193
+ *
194
+ * @deprecated This type is not used anymore
225
195
  */
226
- export declare type IconifyBrowserCacheType = 'local' | 'session' | 'all';
196
+ export declare type IconifyBrowserCacheType = BrowserStorageType | 'all';
227
197
 
228
198
  /**
229
199
  * Interface for exported builder functions
230
200
  */
231
201
  export declare interface IconifyBuilderFunctions {
232
- replaceIDs: (body: string, prefix?: string | (() => string)) => string;
202
+ replaceIDs?: (body: string, prefix?: string | (() => string)) => string;
233
203
  calculateSize: (size: string | number, ratio: number, precision?: number) => string | number;
234
- buildIcon: (icon: IconifyIcon, customisations?: RawIconCustomisations) => IconifyIconBuildResult;
204
+ buildIcon: (icon: IconifyIcon, customisations?: IconifyIconCustomisations_2) => IconifyIconBuildResult;
235
205
  }
236
206
 
237
207
  /**
238
- * Icon categories
208
+ * Custom loader for one icon
239
209
  */
240
- declare interface IconifyCategories {
241
- // Index is category title, such as "Weather".
242
- // Value is array of icons that belong to that category.
243
- // Each icon can belong to multiple categories or no categories.
244
- [index: string]: string[];
245
- }
210
+ export declare type IconifyCustomIconLoader = (name: string, prefix: string, provider: string) => Promise<IconifyIcon | null> | IconifyIcon | null;
246
211
 
247
212
  /**
248
- * Characters used in font.
213
+ * Custom icons loader
249
214
  */
250
- declare interface IconifyChars {
251
- // Index is character, such as "f000".
252
- // Value is icon name.
253
- [index: string]: string;
254
- }
255
-
256
- /**
257
- * Icon dimensions.
258
- *
259
- * Used in:
260
- * icon (as is)
261
- * alias (overwrite icon's properties)
262
- * root of JSON file (default values)
263
- */
264
- declare interface IconifyDimenisons {
265
- // Left position of viewBox.
266
- // Defaults to 0.
267
- left?: number;
268
-
269
- // Top position of viewBox.
270
- // Defaults to 0.
271
- top?: number;
272
-
273
- // Width of viewBox.
274
- // Defaults to 16.
275
- width?: number;
276
-
277
- // Height of viewBox.
278
- // Defaults to 16.
279
- height?: number;
280
- }
215
+ export declare type IconifyCustomIconsLoader = (icons: string[], prefix: string, provider: string) => Promise<IconifyJSON | null> | IconifyJSON | null;
281
216
 
282
217
  /**
283
218
  * Properties for element that are mentioned in render.ts
@@ -285,46 +220,42 @@ declare interface IconifyDimenisons {
285
220
  declare interface IconifyElementProps {
286
221
  id?: string;
287
222
  style?: unknown;
288
- onLoad?: IconifyIconOnLoad;
289
223
  }
290
224
 
291
- /**
292
- * Icon alignment
293
- */
294
- export declare type IconifyHorizontalIconAlignment = 'left' | 'center' | 'right';
295
-
296
- /**
297
- * Icon.
298
- */
299
- export declare interface IconifyIcon extends IconifyOptional {
300
- // Icon body: <path d="..." />, required.
301
- body: string;
302
-
303
- // IconifyOptional properties.
304
- // If property is missing in JSON file, look in root object for default value.
305
- }
225
+ export { IconifyIcon }
306
226
 
307
227
  /**
308
228
  * Interface for getSVGData() result
309
229
  */
310
230
  export declare interface IconifyIconBuildResult {
311
231
  attributes: {
312
- width: string;
313
- height: string;
314
- preserveAspectRatio: string;
232
+ width?: string;
233
+ height?: string;
315
234
  viewBox: string;
316
235
  };
236
+ viewBox: SVGViewBox;
317
237
  body: string;
318
- inline?: boolean;
319
238
  }
320
239
 
321
240
  /**
322
241
  * Icon customisations
323
242
  */
324
- export declare type IconifyIconCustomisations = RawIconCustomisations & {
243
+ export declare type IconifyIconCustomisations = IconifyIconCustomisations_2 & {
325
244
  rotate?: string | number;
245
+ inline?: boolean;
326
246
  };
327
247
 
248
+ /**
249
+ * Icon customisations
250
+ */
251
+ declare interface IconifyIconCustomisations_2 extends IconifyTransformations, IconifyIconSizeCustomisations {
252
+ }
253
+
254
+ /**
255
+ * Customise callback
256
+ */
257
+ declare type IconifyIconCustomiseCallback = (content: string, name: string, prefix: string, provider: string) => string;
258
+
328
259
  /**
329
260
  * Function to abort loading (usually just removes callback because loading is already in progress)
330
261
  */
@@ -356,17 +287,9 @@ export declare type IconifyIconOnLoad = (name: string) => void;
356
287
  */
357
288
  export declare interface IconifyIconProps extends IconifyIconCustomisations {
358
289
  icon: IconifyIcon | string;
290
+ mode?: IconifyRenderMode;
359
291
  color?: string;
360
292
  flip?: string;
361
- align?: string;
362
- }
363
-
364
- /**
365
- * "icons" field of JSON file.
366
- */
367
- declare interface IconifyIcons {
368
- // Index is name of icon, without prefix. Value is ExtendedIconifyIcon object.
369
- [index: string]: ExtendedIconifyIcon;
370
293
  }
371
294
 
372
295
  /**
@@ -375,89 +298,14 @@ declare interface IconifyIcons {
375
298
  export declare type IconifyIconSize = null | string | number;
376
299
 
377
300
  /**
378
- * Icon set information block.
301
+ * Dimensions
379
302
  */
380
- declare interface IconifyInfo {
381
- // Icon set name.
382
- name: string;
383
-
384
- // Total number of icons.
385
- total?: number;
386
-
387
- // Version string.
388
- version?: string;
389
-
390
- // Author information.
391
- author: {
392
- // Author name.
393
- name: string;
394
-
395
- // Link to author's website or icon set website.
396
- url?: string;
397
- };
398
-
399
- // License
400
- license: {
401
- // Human readable license.
402
- title: string;
403
-
404
- // SPDX license identifier.
405
- spdx?: string;
406
-
407
- // License URL.
408
- url?: string;
409
- };
410
-
411
- // Array of icons that should be used for samples in icon sets list.
412
- samples?: string[];
413
-
414
- // Icon grid: number or array of numbers.
415
- height?: number | number[];
416
-
417
- // Display height for samples: 16 - 24
418
- displayHeight?: number;
419
-
420
- // Category on Iconify collections list.
421
- category?: string;
422
-
423
- // Palette status. True if icons have predefined color scheme, false if icons use currentColor.
424
- // Ideally, icon set should not mix icons with and without palette to simplify search.
425
- palette?: boolean;
426
-
427
- // If true, icon set should not appear in icon sets list.
428
- hidden?: boolean;
303
+ declare interface IconifyIconSizeCustomisations {
304
+ width?: IconifyIconSize;
305
+ height?: IconifyIconSize;
429
306
  }
430
307
 
431
- /**
432
- * JSON structure.
433
- *
434
- * All optional values can exist in root of JSON file, used as defaults.
435
- */
436
- export declare interface IconifyJSON extends IconifyJSONIconsData, IconifyMetaData {
437
- // Optional list of missing icons. Returned by Iconify API when querying for icons that do not exist.
438
- not_found?: string[];
439
- }
440
-
441
- /**
442
- * JSON structure, contains only icon data
443
- */
444
- declare interface IconifyJSONIconsData extends IconifyOptional {
445
- // Prefix for icons in JSON file, required.
446
- prefix: string;
447
-
448
- // API provider, optional.
449
- provider?: string;
450
-
451
- // List of icons, required.
452
- icons: IconifyIcons;
453
-
454
- // Optional aliases.
455
- aliases?: IconifyAliases;
456
-
457
- // IconifyOptional properties that are used as default values for icons when icon is missing value.
458
- // If property exists in both icon and root, use value from icon.
459
- // This is used to reduce duplication.
460
- }
308
+ export { IconifyJSON }
461
309
 
462
310
  /**
463
311
  * Function to load icons
@@ -465,115 +313,72 @@ declare interface IconifyJSONIconsData extends IconifyOptional {
465
313
  declare type IconifyLoadIcons = (icons: (IconifyIconName | string)[], callback?: IconifyIconLoaderCallback) => IconifyIconLoaderAbort;
466
314
 
467
315
  /**
468
- * Meta data stored in JSON file, used for browsing icon set.
469
- */
470
- declare interface IconifyMetaData {
471
- // Icon set information block. Used for public icon sets, can be skipped for private icon sets.
472
- info?: IconifyInfo;
473
-
474
- // Characters used in font. Used for searching by character for icon sets imported from font, exporting icon set to font.
475
- chars?: IconifyChars;
476
-
477
- // Categories. Used for filtering icons.
478
- categories?: IconifyCategories;
479
-
480
- // Optional themes (old format).
481
- themes?: LegacyIconifyThemes;
482
-
483
- // Optional themes (new format). Key is prefix or suffix, value is title.
484
- prefixes?: Record<string, string>;
485
- suffixes?: Record<string, string>;
486
- }
487
-
488
- /**
489
- * Combination of dimensions and transformations.
316
+ * Icon render mode
317
+ *
318
+ * 'style' = 'bg' or 'mask', depending on icon content
319
+ * 'bg' = <span> with style using `background`
320
+ * 'mask' = <span> with style using `mask`
321
+ * 'svg' = <svg>
490
322
  */
491
- declare interface IconifyOptional
492
- extends IconifyDimenisons,
493
- IconifyTransformations {
494
- //
495
- }
323
+ export declare type IconifyRenderMode = 'style' | 'bg' | 'mask' | 'svg';
496
324
 
497
325
  /**
498
326
  * Interface for exported storage functions
499
327
  */
500
328
  export declare interface IconifyStorageFunctions {
501
329
  /**
502
- * Check if icon exists
330
+ * Check if icon data is available
331
+ */
332
+ iconLoaded: (name: string) => boolean;
333
+ /**
334
+ * Older, badly named, version of iconLoaded()
335
+ *
336
+ * @deprecated
503
337
  */
504
338
  iconExists: (name: string) => boolean;
505
339
  /**
506
340
  * Get icon data with all properties
341
+ *
342
+ * Returns null if icon is missing (attempted to load, but failed)
343
+ * Returns undefined if icon was not loaded
507
344
  */
508
- getIcon: (name: string) => Required<IconifyIcon> | null;
345
+ getIcon: (name: string) => Required<IconifyIcon> | null | undefined;
509
346
  /**
510
347
  * List all available icons
511
348
  */
512
349
  listIcons: (provider?: string, prefix?: string) => string[];
513
350
  /**
514
351
  * Add icon to storage
352
+ *
353
+ * Data is null if icon is missing
515
354
  */
516
- addIcon: (name: string, data: IconifyIcon) => boolean;
355
+ addIcon: (name: string, data: IconifyIcon | null) => boolean;
517
356
  /**
518
357
  * Add icon set to storage
519
358
  */
520
359
  addCollection: (data: IconifyJSON, provider?: string) => boolean;
521
- /**
522
- * Share storage (used to share icon data between various components or multiple instances of component)
523
- *
524
- * It works by moving storage to global variable, new instances of component attempt to detect global
525
- * variable during load. Therefore, function should be called as soon as possible.
526
- * Works only in browser, not usable in SSR.
527
- */
528
- shareStorage: () => void;
529
360
  }
530
361
 
531
362
  /**
532
- * Icon transformations.
533
- *
534
- * Used in:
535
- * icon (as is)
536
- * alias (merged with icon's properties)
537
- * root of JSON file (default values)
538
- */
539
- declare interface IconifyTransformations {
540
- // Number of 90 degrees rotations.
541
- // 0 = 0, 1 = 90deg and so on.
542
- // Defaults to 0.
543
- // When merged (such as alias + icon), result is icon.rotation + alias.rotation.
544
- rotate?: number;
545
-
546
- // Horizontal flip.
547
- // Defaults to false.
548
- // When merged, result is icon.hFlip !== alias.hFlip
549
- hFlip?: boolean;
550
-
551
- // Vertical flip. (see hFlip comments)
552
- vFlip?: boolean;
553
- }
554
-
555
- export declare type IconifyVerticalIconAlignment = 'top' | 'middle' | 'bottom';
363
+ * Check if icon data is available
364
+ */
365
+ declare function iconLoaded(name: string): boolean;
366
+ export { iconLoaded as iconExists }
367
+ export { iconLoaded }
556
368
 
557
369
  /**
558
370
  * Mix of icon properties and HTMLElement properties
559
371
  */
560
- export declare type IconProps = IconifyElementProps & IconifyIconProps;
561
-
562
- /**
563
- * Optional themes, old format.
564
- *
565
- * Deprecated because format is unnecessary complicated. Key is meaningless, suffixes and prefixes are mixed together.
566
- */
567
- declare interface LegacyIconifyThemes {
568
- // Key is unique string.
569
- [index: string]: {
570
- // Theme title.
571
- title: string;
572
-
573
- // Icon prefix or suffix, including dash. All icons that start with prefix and end with suffix belong to theme.
574
- prefix?: string; // Example: 'baseline-'
575
- suffix?: string; // Example: '-filled'
576
- };
372
+ export declare interface IconProps extends IconifyElementProps, IconifyIconProps {
373
+ /**
374
+ * Try load icon on first render during SSR
375
+ *
376
+ * This is a low-level API for framework integrations, you don't usually need to use it directly.
377
+ * Note this might hydration mismatches if the icon data is not handled correctly, use with caution.
378
+ */
379
+ ssr?: boolean;
380
+ onLoad?: IconifyIconOnLoad;
381
+ customise?: IconifyIconCustomiseCallback;
577
382
  }
578
383
 
579
384
  /**
@@ -582,7 +387,7 @@ declare interface LegacyIconifyThemes {
582
387
  export declare function listIcons(provider?: string, prefix?: string): string[];
583
388
 
584
389
  /**
585
- * Cache for loadIcon promises
390
+ * Load one icon using Promise
586
391
  */
587
392
  export declare const loadIcon: (icon: IconifyIconName | string) => Promise<Required<IconifyIcon>>;
588
393
 
@@ -591,11 +396,6 @@ export declare const loadIcon: (icon: IconifyIconName | string) => Promise<Requi
591
396
  */
592
397
  export declare const loadIcons: IconifyLoadIcons;
593
398
 
594
- /**
595
- * Type for mergeParams()
596
- */
597
- declare type MergeParams = (base: string, params: IconifyAPIMergeQueryParams) => string;
598
-
599
399
  export declare type PartialIconifyAPIConfig = Partial<IconifyAPIConfig> & Pick<IconifyAPIConfig, 'resources'>;
600
400
 
601
401
  /**
@@ -622,21 +422,6 @@ declare type QueryModuleResponseData = unknown;
622
422
  */
623
423
  declare type QueryModuleResponseType = 'success' | 'next' | 'abort';
624
424
 
625
- /**
626
- * Icon customisations
627
- */
628
- export declare interface RawIconCustomisations {
629
- inline?: boolean;
630
- width?: IconifyIconSize;
631
- height?: IconifyIconSize;
632
- hAlign?: IconifyHorizontalIconAlignment;
633
- vAlign?: IconifyVerticalIconAlignment;
634
- slice?: boolean;
635
- hFlip?: boolean;
636
- vFlip?: boolean;
637
- rotate?: number;
638
- }
639
-
640
425
  /**
641
426
  * Configuration object
642
427
  */
@@ -673,8 +458,18 @@ declare type RedundancyResource = string;
673
458
  export declare function replaceIDs(body: string, prefix?: string | ((id: string) => string)): string;
674
459
 
675
460
  /**
676
- * Share storage between components
461
+ * Set custom loader for one icon
462
+ */
463
+ export declare function setCustomIconLoader(loader: IconifyCustomIconLoader, prefix: string, provider?: string): void;
464
+
465
+ /**
466
+ * Set custom loader for multiple icons
467
+ */
468
+ export declare function setCustomIconsLoader(loader: IconifyCustomIconsLoader, prefix: string, provider?: string): void;
469
+
470
+ /**
471
+ * SVG viewBox: x, y, width, height
677
472
  */
678
- export declare function shareStorage(): void;
473
+ declare type SVGViewBox = [x: number, y: number, width: number, height: number];
679
474
 
680
475
  export { }