@blogmcp/sdk 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (340) hide show
  1. package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
  2. package/dist/_virtual/constants.js +4 -0
  3. package/dist/_virtual/index.js +2 -0
  4. package/dist/_virtual/index2.js +4 -0
  5. package/dist/_virtual/index3.js +2 -0
  6. package/dist/_virtual/re.js +4 -0
  7. package/dist/core/article-seo.d.ts +27 -0
  8. package/dist/core/article-seo.js +25 -0
  9. package/dist/core/auth.d.ts +34 -0
  10. package/dist/core/auth.js +89 -0
  11. package/dist/core/blog-config.d.ts +5 -0
  12. package/dist/core/blog-config.js +14 -0
  13. package/dist/core/client-types.d.ts +51 -0
  14. package/dist/core/client.d.ts +159 -0
  15. package/dist/core/client.js +82 -0
  16. package/dist/core/i18n.d.ts +29 -0
  17. package/dist/core/i18n.js +34 -0
  18. package/dist/core/index.d.ts +26 -0
  19. package/dist/core/index.js +67 -0
  20. package/dist/core/markdown.d.ts +69 -0
  21. package/dist/core/markdown.js +47 -0
  22. package/dist/core/navigation.d.ts +70 -0
  23. package/dist/core/navigation.js +71 -0
  24. package/dist/core/queries.d.ts +34 -0
  25. package/dist/core/queries.js +363 -0
  26. package/dist/core/retry.d.ts +9 -0
  27. package/dist/core/retry.js +14 -0
  28. package/dist/core/seo.d.ts +142 -0
  29. package/dist/core/seo.js +166 -0
  30. package/dist/core/theme.d.ts +41 -0
  31. package/dist/core/theme.js +60 -0
  32. package/dist/core/translations/cs.json.js +27 -0
  33. package/dist/core/translations/en.json.js +27 -0
  34. package/dist/core/types.d.ts +184 -0
  35. package/dist/core/types.js +9 -0
  36. package/dist/core/view-model.d.ts +53 -0
  37. package/dist/core/view-model.js +47 -0
  38. package/dist/node_modules/@braintree/sanitize-url/dist/constants.js +8 -0
  39. package/dist/node_modules/@braintree/sanitize-url/dist/index.js +60 -0
  40. package/dist/node_modules/dompurify/dist/purify.es.js +662 -0
  41. package/dist/node_modules/semver/classes/comparator.js +56 -0
  42. package/dist/node_modules/semver/classes/range.js +148 -0
  43. package/dist/node_modules/semver/classes/semver.js +169 -0
  44. package/dist/node_modules/semver/functions/clean.js +14 -0
  45. package/dist/node_modules/semver/functions/cmp.js +39 -0
  46. package/dist/node_modules/semver/functions/coerce.js +33 -0
  47. package/dist/node_modules/semver/functions/compare-build.js +14 -0
  48. package/dist/node_modules/semver/functions/compare-loose.js +11 -0
  49. package/dist/node_modules/semver/functions/compare.js +11 -0
  50. package/dist/node_modules/semver/functions/diff.js +24 -0
  51. package/dist/node_modules/semver/functions/eq.js +11 -0
  52. package/dist/node_modules/semver/functions/gt.js +11 -0
  53. package/dist/node_modules/semver/functions/gte.js +11 -0
  54. package/dist/node_modules/semver/functions/inc.js +21 -0
  55. package/dist/node_modules/semver/functions/lt.js +11 -0
  56. package/dist/node_modules/semver/functions/lte.js +11 -0
  57. package/dist/node_modules/semver/functions/major.js +11 -0
  58. package/dist/node_modules/semver/functions/minor.js +11 -0
  59. package/dist/node_modules/semver/functions/neq.js +11 -0
  60. package/dist/node_modules/semver/functions/parse.js +21 -0
  61. package/dist/node_modules/semver/functions/patch.js +11 -0
  62. package/dist/node_modules/semver/functions/prerelease.js +14 -0
  63. package/dist/node_modules/semver/functions/rcompare.js +11 -0
  64. package/dist/node_modules/semver/functions/rsort.js +11 -0
  65. package/dist/node_modules/semver/functions/satisfies.js +18 -0
  66. package/dist/node_modules/semver/functions/sort.js +11 -0
  67. package/dist/node_modules/semver/functions/valid.js +14 -0
  68. package/dist/node_modules/semver/index.js +97 -0
  69. package/dist/node_modules/semver/internal/constants.js +28 -0
  70. package/dist/node_modules/semver/internal/debug.js +8 -0
  71. package/dist/node_modules/semver/internal/identifiers.js +18 -0
  72. package/dist/node_modules/semver/internal/lrucache.js +32 -0
  73. package/dist/node_modules/semver/internal/parse-options.js +10 -0
  74. package/dist/node_modules/semver/internal/re.js +32 -0
  75. package/dist/node_modules/semver/ranges/gtr.js +11 -0
  76. package/dist/node_modules/semver/ranges/intersects.js +11 -0
  77. package/dist/node_modules/semver/ranges/ltr.js +11 -0
  78. package/dist/node_modules/semver/ranges/max-satisfying.js +22 -0
  79. package/dist/node_modules/semver/ranges/min-satisfying.js +22 -0
  80. package/dist/node_modules/semver/ranges/min-version.js +42 -0
  81. package/dist/node_modules/semver/ranges/outside.js +44 -0
  82. package/dist/node_modules/semver/ranges/simplify.js +24 -0
  83. package/dist/node_modules/semver/ranges/subset.js +94 -0
  84. package/dist/node_modules/semver/ranges/to-comparators.js +11 -0
  85. package/dist/node_modules/semver/ranges/valid.js +17 -0
  86. package/dist/nuxt/composables/useAsyncKb.d.ts +32 -0
  87. package/dist/nuxt/composables/useAsyncKb.js +34 -0
  88. package/dist/nuxt/index.d.ts +1 -0
  89. package/dist/nuxt/index.js +6 -0
  90. package/dist/packages/mdx-render-vue/dist/_virtual/_plugin-vue_export-helper.js +9 -0
  91. package/dist/packages/mdx-render-vue/dist/_virtual/constants.js +4 -0
  92. package/dist/packages/mdx-render-vue/dist/_virtual/index.js +5 -0
  93. package/dist/packages/mdx-render-vue/dist/_virtual/index2.js +4 -0
  94. package/dist/packages/mdx-render-vue/dist/composables/useAudioPlayer.js +40 -0
  95. package/dist/packages/mdx-render-vue/dist/composables/useCallout.js +66 -0
  96. package/dist/packages/mdx-render-vue/dist/composables/useCodeBlock.js +62 -0
  97. package/dist/packages/mdx-render-vue/dist/composables/useGallery.js +68 -0
  98. package/dist/packages/mdx-render-vue/dist/composables/useMedia.js +9 -0
  99. package/dist/packages/mdx-render-vue/dist/composables/useYouTube.js +24 -0
  100. package/dist/packages/mdx-render-vue/dist/edit/AlertEdit.vue.js +4 -0
  101. package/dist/packages/mdx-render-vue/dist/edit/AlertEdit.vue2.js +16 -0
  102. package/dist/packages/mdx-render-vue/dist/edit/AudioPlayerEdit.vue.js +102 -0
  103. package/dist/packages/mdx-render-vue/dist/edit/AudioPlayerEdit.vue2.js +4 -0
  104. package/dist/packages/mdx-render-vue/dist/edit/BadgeEdit.vue.js +4 -0
  105. package/dist/packages/mdx-render-vue/dist/edit/BadgeEdit.vue2.js +11 -0
  106. package/dist/packages/mdx-render-vue/dist/edit/ButtonEdit.vue.js +4 -0
  107. package/dist/packages/mdx-render-vue/dist/edit/ButtonEdit.vue2.js +11 -0
  108. package/dist/packages/mdx-render-vue/dist/edit/CalloutEdit.vue.js +78 -0
  109. package/dist/packages/mdx-render-vue/dist/edit/CalloutEdit.vue2.js +4 -0
  110. package/dist/packages/mdx-render-vue/dist/edit/CardEdit.vue.js +4 -0
  111. package/dist/packages/mdx-render-vue/dist/edit/CardEdit.vue2.js +16 -0
  112. package/dist/packages/mdx-render-vue/dist/edit/CodeBlockEdit.vue.js +6 -0
  113. package/dist/packages/mdx-render-vue/dist/edit/CodeBlockEdit.vue2.js +74 -0
  114. package/dist/packages/mdx-render-vue/dist/edit/GalleryEdit.vue.js +56 -0
  115. package/dist/packages/mdx-render-vue/dist/edit/GalleryEdit.vue2.js +4 -0
  116. package/dist/packages/mdx-render-vue/dist/edit/IconEdit.vue.js +4 -0
  117. package/dist/packages/mdx-render-vue/dist/edit/IconEdit.vue2.js +11 -0
  118. package/dist/packages/mdx-render-vue/dist/edit/TooltipEdit.vue.js +4 -0
  119. package/dist/packages/mdx-render-vue/dist/edit/TooltipEdit.vue2.js +20 -0
  120. package/dist/packages/mdx-render-vue/dist/edit/YouTubeEdit.vue.js +34 -0
  121. package/dist/packages/mdx-render-vue/dist/edit/YouTubeEdit.vue2.js +4 -0
  122. package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/_virtual/_rolldown/runtime.js +11 -0
  123. package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/factory.js +29 -0
  124. package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/presence/use-presence-context.js +6 -0
  125. package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/presence/use-presence.js +32 -0
  126. package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-arrow-tip.js +5 -0
  127. package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-arrow-tip.vue_vue_type_script_setup_true_lang.js +18 -0
  128. package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-arrow.js +5 -0
  129. package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-arrow.vue_vue_type_script_setup_true_lang.js +18 -0
  130. package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-content.js +5 -0
  131. package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-content.vue_vue_type_script_setup_true_lang.js +20 -0
  132. package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-context.js +5 -0
  133. package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-context.vue_vue_type_script_setup_true_lang.js +12 -0
  134. package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-positioner.js +5 -0
  135. package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-positioner.vue_vue_type_script_setup_true_lang.js +19 -0
  136. package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-root-provider.js +5 -0
  137. package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-root-provider.vue_vue_type_script_setup_true_lang.js +29 -0
  138. package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-root.js +5 -0
  139. package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-root.vue_vue_type_script_setup_true_lang.js +59 -0
  140. package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-trigger.js +5 -0
  141. package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip-trigger.vue_vue_type_script_setup_true_lang.js +21 -0
  142. package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/tooltip.js +22 -0
  143. package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/use-tooltip-context.js +6 -0
  144. package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/components/tooltip/use-tooltip.js +29 -0
  145. package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/providers/environment/use-environment-context.js +12 -0
  146. package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/providers/locale/use-locale-context.js +11 -0
  147. package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/utils/clean-props.js +8 -0
  148. package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/utils/create-context.js +12 -0
  149. package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/utils/dynamic.js +25 -0
  150. package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/utils/unref-element.js +8 -0
  151. package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/utils/use-forward-expose.js +36 -0
  152. package/dist/packages/mdx-render-vue/dist/node_modules/@ark-ui/vue/dist/utils/use-render-strategy.js +5 -0
  153. package/dist/packages/mdx-render-vue/dist/node_modules/@braintree/sanitize-url/dist/constants.js +8 -0
  154. package/dist/packages/mdx-render-vue/dist/node_modules/@braintree/sanitize-url/dist/index.js +60 -0
  155. package/dist/packages/mdx-render-vue/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +532 -0
  156. package/dist/packages/mdx-render-vue/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +403 -0
  157. package/dist/packages/mdx-render-vue/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +136 -0
  158. package/dist/packages/mdx-render-vue/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +128 -0
  159. package/dist/packages/mdx-render-vue/dist/node_modules/@iconify/vue/dist/iconify.js +1192 -0
  160. package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/anatomy/dist/create-anatomy.js +26 -0
  161. package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/core/dist/create-machine.js +21 -0
  162. package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/core/dist/merge-props.js +45 -0
  163. package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/core/dist/scope.js +16 -0
  164. package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/core/dist/state.js +136 -0
  165. package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/core/dist/types.js +5 -0
  166. package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/dom-query/dist/chunk-QZ7TP4HQ.js +4 -0
  167. package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/dom-query/dist/computed-style.js +8 -0
  168. package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/dom-query/dist/event.js +31 -0
  169. package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/dom-query/dist/node.js +49 -0
  170. package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/dom-query/dist/overflow.js +19 -0
  171. package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/dom-query/dist/platform.js +16 -0
  172. package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/dom-query/dist/query.js +6 -0
  173. package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/dom-query/dist/raf.js +41 -0
  174. package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/dom-query/dist/set.js +14 -0
  175. package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/dom-query/dist/shared.js +7 -0
  176. package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/focus-visible/dist/index.js +90 -0
  177. package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/popper/dist/get-anchor.js +34 -0
  178. package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/popper/dist/get-placement.js +187 -0
  179. package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/popper/dist/get-styles.js +47 -0
  180. package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/popper/dist/middleware.js +56 -0
  181. package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/popper/dist/placement.js +7 -0
  182. package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/presence/dist/presence.connect.js +16 -0
  183. package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/presence/dist/presence.machine.js +147 -0
  184. package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/tooltip/dist/tooltip.anatomy.js +6 -0
  185. package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/tooltip/dist/tooltip.connect.js +119 -0
  186. package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/tooltip/dist/tooltip.dom.js +15 -0
  187. package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/tooltip/dist/tooltip.machine.js +375 -0
  188. package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/tooltip/dist/tooltip.store.js +9 -0
  189. package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/types/dist/prop-types.js +10 -0
  190. package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/utils/dist/array.js +6 -0
  191. package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/utils/dist/equal.js +27 -0
  192. package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/utils/dist/functions.js +10 -0
  193. package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/utils/dist/guard.js +15 -0
  194. package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/utils/dist/object.js +13 -0
  195. package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/utils/dist/store.js +25 -0
  196. package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/utils/dist/warning.js +25 -0
  197. package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/vue/dist/bindable.js +37 -0
  198. package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/vue/dist/machine.js +205 -0
  199. package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/vue/dist/normalize-props.js +30 -0
  200. package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/vue/dist/refs.js +14 -0
  201. package/dist/packages/mdx-render-vue/dist/node_modules/@zag-js/vue/dist/track.js +19 -0
  202. package/dist/packages/mdx-render-vue/dist/node_modules/dompurify/dist/purify.es.js +659 -0
  203. package/dist/packages/mdx-render-vue/dist/registry.js +154 -0
  204. package/dist/packages/mdx-render-vue/dist/render/alert/Alert.vue.js +4 -0
  205. package/dist/packages/mdx-render-vue/dist/render/alert/Alert.vue2.js +37 -0
  206. package/dist/packages/mdx-render-vue/dist/render/audioplayer/AudioPlayerDefault.vue.js +102 -0
  207. package/dist/packages/mdx-render-vue/dist/render/audioplayer/AudioPlayerDefault.vue2.js +4 -0
  208. package/dist/packages/mdx-render-vue/dist/render/badge/Badge.vue.js +4 -0
  209. package/dist/packages/mdx-render-vue/dist/render/badge/Badge.vue2.js +25 -0
  210. package/dist/packages/mdx-render-vue/dist/render/button/Button.vue.js +4 -0
  211. package/dist/packages/mdx-render-vue/dist/render/button/Button.vue2.js +37 -0
  212. package/dist/packages/mdx-render-vue/dist/render/callout/CalloutDefault.vue.js +79 -0
  213. package/dist/packages/mdx-render-vue/dist/render/callout/CalloutDefault.vue2.js +4 -0
  214. package/dist/packages/mdx-render-vue/dist/render/callout/CalloutMinimal.vue.js +22 -0
  215. package/dist/packages/mdx-render-vue/dist/render/callout/CalloutMinimal.vue2.js +4 -0
  216. package/dist/packages/mdx-render-vue/dist/render/card/Card.vue.js +4 -0
  217. package/dist/packages/mdx-render-vue/dist/render/card/Card.vue2.js +24 -0
  218. package/dist/packages/mdx-render-vue/dist/render/codeblock/CodeBlockDefault.vue.js +6 -0
  219. package/dist/packages/mdx-render-vue/dist/render/codeblock/CodeBlockDefault.vue2.js +77 -0
  220. package/dist/packages/mdx-render-vue/dist/render/gallery/GalleryGrid.vue.js +103 -0
  221. package/dist/packages/mdx-render-vue/dist/render/gallery/GalleryGrid.vue2.js +4 -0
  222. package/dist/packages/mdx-render-vue/dist/render/gallery/GalleryLightbox.vue.js +6 -0
  223. package/dist/packages/mdx-render-vue/dist/render/gallery/GalleryLightbox.vue2.js +142 -0
  224. package/dist/packages/mdx-render-vue/dist/render/icon/Icon.vue.js +4 -0
  225. package/dist/packages/mdx-render-vue/dist/render/icon/Icon.vue2.js +23 -0
  226. package/dist/packages/mdx-render-vue/dist/render/tooltip/Tooltip.vue.js +4 -0
  227. package/dist/packages/mdx-render-vue/dist/render/tooltip/Tooltip.vue2.js +54 -0
  228. package/dist/packages/mdx-render-vue/dist/render/youtube/YouTubeDefault.vue.js +69 -0
  229. package/dist/packages/mdx-render-vue/dist/render/youtube/YouTubeDefault.vue2.js +4 -0
  230. package/dist/packages/mdx-schema/dist/composables/useMdxParsing.js +139 -0
  231. package/dist/packages/mdx-schema/dist/metadata/index.js +415 -0
  232. package/dist/packages/mdx-schema/dist/prepareProps.js +46 -0
  233. package/dist/packages/mdx-schema/dist/styles/index.js +119 -0
  234. package/dist/packages/mdx-schema/dist/types/index.js +26 -0
  235. package/dist/packages/sanitize/dist/html.js +41 -0
  236. package/dist/react/KbMdxContent.d.ts +35 -0
  237. package/dist/react/KbMdxContent.js +102 -0
  238. package/dist/react/context.d.ts +11 -0
  239. package/dist/react/context.js +5 -0
  240. package/dist/react/hooks/useImageRenderer.d.ts +6 -0
  241. package/dist/react/hooks/useImageRenderer.js +9 -0
  242. package/dist/react/hooks/useKbClient.d.ts +3 -0
  243. package/dist/react/hooks/useKbClient.js +7 -0
  244. package/dist/react/hooks/useKbContext.d.ts +3 -0
  245. package/dist/react/hooks/useKbContext.js +11 -0
  246. package/dist/react/hooks/useKbI18n.d.ts +7 -0
  247. package/dist/react/hooks/useKbI18n.js +8 -0
  248. package/dist/react/hooks/useKbLanguage.d.ts +21 -0
  249. package/dist/react/hooks/useKbLanguage.js +63 -0
  250. package/dist/react/hooks/useKbSearch.d.ts +20 -0
  251. package/dist/react/hooks/useKbSearch.js +22 -0
  252. package/dist/react/hooks/useMdxContent.d.ts +18 -0
  253. package/dist/react/hooks/useMdxContent.js +11 -0
  254. package/dist/react/index.d.ts +21 -0
  255. package/dist/react/index.js +20 -0
  256. package/dist/react/provider.d.ts +25 -0
  257. package/dist/react/provider.js +29 -0
  258. package/dist/react/server/index.d.ts +38 -0
  259. package/dist/react/server/index.js +26 -0
  260. package/dist/sdk.css +1 -0
  261. package/dist/vue/components/KbAccessGate.vue.d.ts +36 -0
  262. package/dist/vue/components/KbAccessGate.vue.js +74 -0
  263. package/dist/vue/components/KbAccessGate.vue2.js +4 -0
  264. package/dist/vue/components/KbArticleCard.vue.d.ts +34 -0
  265. package/dist/vue/components/KbArticleCard.vue.js +87 -0
  266. package/dist/vue/components/KbArticleCard.vue2.js +4 -0
  267. package/dist/vue/components/KbMdxContent.vue.d.ts +5 -0
  268. package/dist/vue/components/KbMdxContent.vue.js +7 -0
  269. package/dist/vue/components/KbMdxContent.vue2.js +82 -0
  270. package/dist/vue/composables/useArticles.d.ts +30 -0
  271. package/dist/vue/composables/useArticles.js +36 -0
  272. package/dist/vue/composables/useImageRenderer.d.ts +6 -0
  273. package/dist/vue/composables/useImageRenderer.js +9 -0
  274. package/dist/vue/composables/useKbAuth.d.ts +27 -0
  275. package/dist/vue/composables/useKbAuth.js +83 -0
  276. package/dist/vue/composables/useKbClient.d.ts +6 -0
  277. package/dist/vue/composables/useKbClient.js +13 -0
  278. package/dist/vue/composables/useKbComments.d.ts +37 -0
  279. package/dist/vue/composables/useKbComments.js +160 -0
  280. package/dist/vue/composables/useKbI18n.d.ts +6 -0
  281. package/dist/vue/composables/useKbI18n.js +8 -0
  282. package/dist/vue/composables/useKbLanguage.d.ts +22 -0
  283. package/dist/vue/composables/useKbLanguage.js +63 -0
  284. package/dist/vue/composables/useNavigation.d.ts +18 -0
  285. package/dist/vue/composables/useNavigation.js +20 -0
  286. package/dist/vue/composables/useSearch.d.ts +21 -0
  287. package/dist/vue/composables/useSearch.js +20 -0
  288. package/dist/vue/composables/useTags.d.ts +17 -0
  289. package/dist/vue/composables/useTags.js +36 -0
  290. package/dist/vue/index.d.ts +22 -0
  291. package/dist/vue/index.js +36 -0
  292. package/dist/vue/plugin.d.ts +30 -0
  293. package/dist/vue/plugin.js +17 -0
  294. package/package.json +97 -0
  295. package/src/core/article-seo.ts +101 -0
  296. package/src/core/auth.ts +138 -0
  297. package/src/core/blog-config.ts +30 -0
  298. package/src/core/client-types.ts +58 -0
  299. package/src/core/client.ts +287 -0
  300. package/src/core/i18n.ts +84 -0
  301. package/src/core/index.ts +147 -0
  302. package/src/core/markdown.ts +178 -0
  303. package/src/core/navigation.ts +152 -0
  304. package/src/core/queries.ts +414 -0
  305. package/src/core/retry.ts +19 -0
  306. package/src/core/seo.ts +374 -0
  307. package/src/core/theme.ts +128 -0
  308. package/src/core/translations/cs.json +225 -0
  309. package/src/core/translations/en.json +225 -0
  310. package/src/core/types.ts +231 -0
  311. package/src/core/view-model.ts +98 -0
  312. package/src/nuxt/composables/useAsyncKb.ts +119 -0
  313. package/src/nuxt/index.ts +6 -0
  314. package/src/react/KbMdxContent.tsx +215 -0
  315. package/src/react/context.ts +25 -0
  316. package/src/react/hooks/useImageRenderer.ts +15 -0
  317. package/src/react/hooks/useKbClient.ts +9 -0
  318. package/src/react/hooks/useKbContext.ts +13 -0
  319. package/src/react/hooks/useKbI18n.ts +15 -0
  320. package/src/react/hooks/useKbLanguage.ts +105 -0
  321. package/src/react/hooks/useKbSearch.ts +50 -0
  322. package/src/react/hooks/useMdxContent.tsx +33 -0
  323. package/src/react/index.ts +31 -0
  324. package/src/react/provider.tsx +70 -0
  325. package/src/react/server/index.ts +70 -0
  326. package/src/vue/components/KbAccessGate.vue +86 -0
  327. package/src/vue/components/KbArticleCard.vue +102 -0
  328. package/src/vue/components/KbMdxContent.vue +211 -0
  329. package/src/vue/composables/useArticles.ts +78 -0
  330. package/src/vue/composables/useImageRenderer.ts +12 -0
  331. package/src/vue/composables/useKbAuth.ts +131 -0
  332. package/src/vue/composables/useKbClient.ts +17 -0
  333. package/src/vue/composables/useKbComments.ts +281 -0
  334. package/src/vue/composables/useKbI18n.ts +11 -0
  335. package/src/vue/composables/useKbLanguage.ts +103 -0
  336. package/src/vue/composables/useNavigation.ts +38 -0
  337. package/src/vue/composables/useSearch.ts +52 -0
  338. package/src/vue/composables/useTags.ts +64 -0
  339. package/src/vue/index.ts +27 -0
  340. package/src/vue/plugin.ts +73 -0
@@ -0,0 +1,26 @@
1
+ var c = (e, a = []) => ({
2
+ parts: (...t) => {
3
+ if (d(a))
4
+ return c(e, t);
5
+ throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?");
6
+ },
7
+ extendWith: (...t) => c(e, [...a, ...t]),
8
+ omit: (...t) => c(e, a.filter((o) => !t.includes(o))),
9
+ rename: (t) => c(t, a),
10
+ keys: () => a,
11
+ build: () => [...new Set(a)].reduce(
12
+ (t, o) => Object.assign(t, {
13
+ [o]: {
14
+ selector: [
15
+ `&[data-scope="${r(e)}"][data-part="${r(o)}"]`,
16
+ `& [data-scope="${r(e)}"][data-part="${r(o)}"]`
17
+ ].join(", "),
18
+ attrs: { "data-scope": r(e), "data-part": r(o) }
19
+ }
20
+ }),
21
+ {}
22
+ )
23
+ }), r = (e) => e.replace(/([A-Z])([A-Z])/g, "$1-$2").replace(/([a-z])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase(), d = (e) => e.length === 0;
24
+ export {
25
+ c as createAnatomy
26
+ };
@@ -0,0 +1,21 @@
1
+ import { ensureStateIndex as u } from "./state.js";
2
+ function o() {
3
+ return {
4
+ and: (...r) => function(n) {
5
+ return r.every((e) => n.guard(e));
6
+ },
7
+ or: (...r) => function(n) {
8
+ return r.some((e) => n.guard(e));
9
+ },
10
+ not: (r) => function(n) {
11
+ return !n.guard(r);
12
+ }
13
+ };
14
+ }
15
+ function d(r) {
16
+ return u(r), r;
17
+ }
18
+ export {
19
+ o as createGuards,
20
+ d as createMachine
21
+ };
@@ -0,0 +1,45 @@
1
+ import { callAll as l } from "../../utils/dist/functions.js";
2
+ import { isString as i } from "../../utils/dist/guard.js";
3
+ var f = (...r) => r.map((e) => e?.trim?.()).filter(Boolean).join(" "), c = /((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g, n = (r) => {
4
+ const e = {};
5
+ let o;
6
+ for (; o = c.exec(r); )
7
+ e[o[1]] = o[2];
8
+ return e;
9
+ }, m = (r, e) => {
10
+ if (i(r)) {
11
+ if (i(e)) return `${r};${e}`;
12
+ r = n(r);
13
+ } else i(e) && (e = n(e));
14
+ return Object.assign({}, r ?? {}, e ?? {});
15
+ };
16
+ function p(...r) {
17
+ let e = {};
18
+ for (let o of r) {
19
+ if (!o) continue;
20
+ for (let t in e) {
21
+ if (t.startsWith("on") && typeof e[t] == "function" && typeof o[t] == "function") {
22
+ e[t] = l(o[t], e[t]);
23
+ continue;
24
+ }
25
+ if (t === "className" || t === "class") {
26
+ e[t] = f(e[t], o[t]);
27
+ continue;
28
+ }
29
+ if (t === "style") {
30
+ e[t] = m(e[t], o[t]);
31
+ continue;
32
+ }
33
+ e[t] = o[t] !== void 0 ? o[t] : e[t];
34
+ }
35
+ for (let t in o)
36
+ e[t] === void 0 && (e[t] = o[t]);
37
+ const s = Object.getOwnPropertySymbols(o);
38
+ for (let t of s)
39
+ e[t] = o[t];
40
+ }
41
+ return e;
42
+ }
43
+ export {
44
+ p as mergeProps
45
+ };
@@ -0,0 +1,16 @@
1
+ import { isActiveElement as c, getActiveElement as g, getDocument as i } from "../../dom-query/dist/node.js";
2
+ function r(t) {
3
+ const e = () => t.getRootNode?.() ?? document, n = () => i(e());
4
+ return {
5
+ ...t,
6
+ getRootNode: e,
7
+ getDoc: n,
8
+ getWin: () => n().defaultView ?? window,
9
+ getActiveElement: () => g(e()),
10
+ isActiveElement: c,
11
+ getById: (o) => e().getElementById(o)
12
+ };
13
+ }
14
+ export {
15
+ r as createScope
16
+ };
@@ -0,0 +1,136 @@
1
+ import { invariant as S, ensure as P } from "../../utils/dist/warning.js";
2
+ var u = ".", j = "#", I = /* @__PURE__ */ new WeakMap(), M = /* @__PURE__ */ new WeakMap();
3
+ function g(t) {
4
+ return t.join(u);
5
+ }
6
+ function E(t) {
7
+ return t.includes(u);
8
+ }
9
+ function w(t) {
10
+ return t.startsWith(j);
11
+ }
12
+ function T(t) {
13
+ return t.startsWith(u);
14
+ }
15
+ function b(t) {
16
+ return w(t) ? t.slice(j.length) : t;
17
+ }
18
+ function p(t, e) {
19
+ return t ? `${t}${u}${e}` : e;
20
+ }
21
+ function v(t) {
22
+ const e = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = (i, n) => {
23
+ e.set(i, n);
24
+ const r = n.id;
25
+ r && (o.has(r) && S(`[zag-js] Duplicate state id: "${r}"`), o.set(r, i));
26
+ const a = n.states;
27
+ if (a) {
28
+ P(n.initial, () => `[zag-js] Compound state "${i}" has child states but no "initial" property`), n.initial in a || S(
29
+ `[zag-js] Compound state "${i}" has initial "${String(n.initial)}" which is not a child state`
30
+ );
31
+ for (const [c, l] of Object.entries(a)) {
32
+ if (!l) continue;
33
+ const C = p(i, c);
34
+ s(C, l);
35
+ }
36
+ }
37
+ };
38
+ for (const [i, n] of Object.entries(t.states))
39
+ n && s(i, n);
40
+ return { index: e, idIndex: o };
41
+ }
42
+ function h(t) {
43
+ const e = I.get(t);
44
+ if (e) return e;
45
+ const { index: o, idIndex: s } = v(t);
46
+ return I.set(t, o), M.set(t, s), o;
47
+ }
48
+ function A(t, e) {
49
+ return h(t), M.get(t)?.get(e);
50
+ }
51
+ function x(t) {
52
+ return t ? String(t).split(u).filter(Boolean) : [];
53
+ }
54
+ function d(t, e) {
55
+ if (!e) return [];
56
+ const o = h(t), s = x(e), i = [], n = [];
57
+ for (const r of s) {
58
+ n.push(r);
59
+ const a = g(n), c = o.get(a);
60
+ if (!c) break;
61
+ i.push({ path: a, state: c });
62
+ }
63
+ return i;
64
+ }
65
+ function f(t, e) {
66
+ const o = h(t), s = x(e);
67
+ if (!s.length) return e;
68
+ const i = [];
69
+ for (const a of s) {
70
+ i.push(a);
71
+ const c = g(i);
72
+ if (!o.has(c)) return e;
73
+ }
74
+ let n = g(i), r = o.get(n);
75
+ for (; r?.initial; ) {
76
+ const a = `${n}${u}${r.initial}`, c = o.get(a);
77
+ if (!c) break;
78
+ n = a, r = c;
79
+ }
80
+ return n;
81
+ }
82
+ function $(t, e) {
83
+ return h(t).has(e);
84
+ }
85
+ function W(t, e, o) {
86
+ const s = String(e);
87
+ if (w(s)) {
88
+ const i = b(s), n = A(t, i);
89
+ return P(n, () => `[zag-js] Unknown state id: "${i}"`), f(t, n);
90
+ }
91
+ if (T(s) && o) {
92
+ const i = p(o, s.slice(1));
93
+ return f(t, i);
94
+ }
95
+ if (!E(s) && o) {
96
+ const i = x(o);
97
+ for (let n = i.length - 1; n >= 1; n--) {
98
+ const r = i.slice(0, n).join(u), a = p(r, s);
99
+ if ($(t, a)) return f(t, a);
100
+ }
101
+ if ($(t, s)) return f(t, s);
102
+ }
103
+ return f(t, s);
104
+ }
105
+ function z(t, e, o) {
106
+ const s = d(t, e);
107
+ for (let n = s.length - 1; n >= 0; n--) {
108
+ const a = s[n]?.state.on?.[o];
109
+ if (a) return { transitions: a, source: s[n]?.path };
110
+ }
111
+ return { transitions: t.on?.[o], source: void 0 };
112
+ }
113
+ function y(t, e, o, s) {
114
+ const i = e ? d(t, e) : [], n = d(t, o);
115
+ let r = 0;
116
+ for (; r < i.length && r < n.length && i[r]?.path === n[r]?.path; )
117
+ r += 1;
118
+ let a = i.slice(r).reverse(), c = n.slice(r);
119
+ const l = i.at(-1)?.path === n.at(-1)?.path;
120
+ return s && l && (a = i.slice().reverse(), c = n), { exiting: a, entering: c };
121
+ }
122
+ function B(t, e) {
123
+ return t ? t === e || t.startsWith(`${e}${u}`) : !1;
124
+ }
125
+ function L(t, e, o) {
126
+ return d(t, e).some((s) => s.state.tags?.includes(o));
127
+ }
128
+ export {
129
+ h as ensureStateIndex,
130
+ z as findTransition,
131
+ y as getExitEnterStates,
132
+ d as getStateChain,
133
+ L as hasTag,
134
+ B as matchesState,
135
+ W as resolveStateValue
136
+ };
@@ -0,0 +1,5 @@
1
+ var r = /* @__PURE__ */ ((t) => (t.NotStarted = "Not Started", t.Started = "Started", t.Stopped = "Stopped", t))(r || {}), d = "__init__";
2
+ export {
3
+ d as INIT_STATE,
4
+ r as MachineStatus
5
+ };
@@ -0,0 +1,4 @@
1
+ var a = Object.defineProperty, i = (e, r, t) => r in e ? a(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t, l = (e, r, t) => i(e, typeof r != "symbol" ? r + "" : r, t);
2
+ export {
3
+ l as __publicField
4
+ };
@@ -0,0 +1,8 @@
1
+ import { getWindow as o } from "./node.js";
2
+ var e = /* @__PURE__ */ new WeakMap();
3
+ function a(t) {
4
+ return e.has(t) || e.set(t, o(t).getComputedStyle(t)), e.get(t);
5
+ }
6
+ export {
7
+ a as getComputedStyle
8
+ };
@@ -0,0 +1,31 @@
1
+ import { isAndroid as r } from "./platform.js";
2
+ function u(t) {
3
+ return t.composedPath?.() ?? t.nativeEvent?.composedPath?.();
4
+ }
5
+ function p(t) {
6
+ return u(t)?.[0] ?? t.target;
7
+ }
8
+ function d(t) {
9
+ return s(t).isComposing || t.keyCode === 229;
10
+ }
11
+ function a(t) {
12
+ return t.pointerType === "" && t.isTrusted ? !0 : r() && t.pointerType ? t.type === "click" && t.buttons === 1 : t.detail === 0 && !t.pointerType;
13
+ }
14
+ var f = (t) => t.button === 0;
15
+ function s(t) {
16
+ return t.nativeEvent ?? t;
17
+ }
18
+ var m = (t, n, o, e) => {
19
+ const i = typeof t == "function" ? t() : t;
20
+ return i?.addEventListener(n, o, e), () => {
21
+ i?.removeEventListener(n, o, e);
22
+ };
23
+ };
24
+ export {
25
+ m as addDomEvent,
26
+ p as getEventTarget,
27
+ s as getNativeEvent,
28
+ d as isComposingEvent,
29
+ f as isLeftClick,
30
+ a as isVirtualClick
31
+ };
@@ -0,0 +1,49 @@
1
+ import { isObject as n } from "./shared.js";
2
+ var a = 1, d = 9, m = 11, i = (t) => n(t) && t.nodeType === a && typeof t.nodeName == "string", u = (t) => n(t) && t.nodeType === d, s = (t) => n(t) && t === t.window, c = (t) => i(t) ? t.localName || "" : "#document";
3
+ function D(t) {
4
+ return ["html", "body", "#document"].includes(c(t));
5
+ }
6
+ var f = (t) => n(t) && t.nodeType !== void 0, r = (t) => f(t) && t.nodeType === m && "host" in t;
7
+ function g(t) {
8
+ if (!t) return !1;
9
+ const e = t.getRootNode();
10
+ return v(e) === t;
11
+ }
12
+ function w(t) {
13
+ return u(t) ? t : s(t) ? t.document : t?.ownerDocument ?? document;
14
+ }
15
+ function E(t) {
16
+ return w(t).documentElement;
17
+ }
18
+ function N(t) {
19
+ return r(t) ? N(t.host) : u(t) ? t.defaultView ?? window : i(t) ? t.ownerDocument?.defaultView ?? window : window;
20
+ }
21
+ function v(t) {
22
+ let e = t.activeElement;
23
+ for (; e?.shadowRoot; ) {
24
+ const o = e.shadowRoot.activeElement;
25
+ if (!o || o === e) break;
26
+ e = o;
27
+ }
28
+ return e;
29
+ }
30
+ function T(t) {
31
+ if (c(t) === "html") return t;
32
+ const e = t.assignedSlot || t.parentNode || r(t) && t.host || E(t);
33
+ return r(e) ? e.host : e;
34
+ }
35
+ export {
36
+ v as getActiveElement,
37
+ w as getDocument,
38
+ E as getDocumentElement,
39
+ c as getNodeName,
40
+ T as getParentNode,
41
+ N as getWindow,
42
+ g as isActiveElement,
43
+ u as isDocument,
44
+ i as isHTMLElement,
45
+ f as isNode,
46
+ D as isRootElement,
47
+ r as isShadowRoot,
48
+ s as isWindow
49
+ };
@@ -0,0 +1,19 @@
1
+ import { getWindow as c, getParentNode as u, isRootElement as a, getDocument as f, isHTMLElement as w } from "./node.js";
2
+ function s(t) {
3
+ const e = u(t);
4
+ return a(e) ? f(e).body : w(e) && i(e) ? e : s(e);
5
+ }
6
+ function v(t, e = []) {
7
+ const o = s(t), r = o === t.ownerDocument.body, n = c(o);
8
+ return r ? e.concat(n, n.visualViewport || [], i(o) ? o : []) : e.concat(o, v(o, []));
9
+ }
10
+ var d = /auto|scroll|overlay|hidden|clip/, m = /* @__PURE__ */ new Set(["inline", "contents"]);
11
+ function i(t) {
12
+ const e = c(t), { overflow: o, overflowX: r, overflowY: n, display: l } = e.getComputedStyle(t);
13
+ return d.test(o + n + r) && !m.has(l);
14
+ }
15
+ export {
16
+ s as getNearestOverflowAncestor,
17
+ v as getOverflowAncestors,
18
+ i as isOverflowElement
19
+ };
@@ -0,0 +1,16 @@
1
+ var a = () => typeof document < "u";
2
+ function e() {
3
+ return navigator.userAgentData?.platform ?? navigator.platform;
4
+ }
5
+ function o() {
6
+ const t = navigator.userAgentData;
7
+ return t && Array.isArray(t.brands) ? t.brands.map(({ brand: r, version: n }) => `${r}/${n}`).join(" ") : navigator.userAgent;
8
+ }
9
+ var i = (t) => a() && t.test(e()), s = (t) => a() && t.test(o()), g = () => i(/^Mac/i), u = () => s(/Android/i);
10
+ export {
11
+ e as getPlatform,
12
+ o as getUserAgent,
13
+ u as isAndroid,
14
+ a as isDom,
15
+ g as isMac
16
+ };
@@ -0,0 +1,6 @@
1
+ function l(r, e) {
2
+ return Array.from(r?.querySelectorAll(e) ?? []);
3
+ }
4
+ export {
5
+ l as queryAll
6
+ };
@@ -0,0 +1,41 @@
1
+ import { __publicField as e } from "./chunk-QZ7TP4HQ.js";
2
+ var s = class l {
3
+ constructor() {
4
+ e(this, "id", null), e(this, "fn_cleanup"), e(this, "cleanup", () => {
5
+ this.cancel();
6
+ });
7
+ }
8
+ static create() {
9
+ return new l();
10
+ }
11
+ request(n) {
12
+ this.cancel(), this.id = globalThis.requestAnimationFrame(() => {
13
+ this.id = null, this.fn_cleanup = n?.();
14
+ });
15
+ }
16
+ cancel() {
17
+ this.id !== null && (globalThis.cancelAnimationFrame(this.id), this.id = null), this.fn_cleanup?.(), this.fn_cleanup = void 0;
18
+ }
19
+ isActive() {
20
+ return this.id !== null;
21
+ }
22
+ };
23
+ function u(i) {
24
+ const n = s.create();
25
+ return n.request(i), n.cleanup;
26
+ }
27
+ function o(i) {
28
+ const n = /* @__PURE__ */ new Set();
29
+ function a(c) {
30
+ const t = globalThis.requestAnimationFrame(c);
31
+ n.add(() => globalThis.cancelAnimationFrame(t));
32
+ }
33
+ return a(() => a(i)), function() {
34
+ n.forEach((t) => t());
35
+ };
36
+ }
37
+ export {
38
+ s as AnimationFrame,
39
+ o as nextTick,
40
+ u as raf
41
+ };
@@ -0,0 +1,14 @@
1
+ import { noop as u } from "./shared.js";
2
+ function c(t, e) {
3
+ if (!t) return u;
4
+ const r = Object.keys(e).reduce((n, s) => (n[s] = t.style.getPropertyValue(s), n), {});
5
+ return i(r, e) ? u : (Object.assign(t.style, e), () => {
6
+ Object.assign(t.style, r), t.style.length === 0 && t.removeAttribute("style");
7
+ });
8
+ }
9
+ function i(t, e) {
10
+ return Object.keys(t).every((r) => t[r] === e[r]);
11
+ }
12
+ export {
13
+ c as setStyle
14
+ };
@@ -0,0 +1,7 @@
1
+ var t = () => {
2
+ }, a = (o) => typeof o == "object" && o !== null, r = (o) => o ? "" : void 0;
3
+ export {
4
+ r as dataAttr,
5
+ a as isObject,
6
+ t as noop
7
+ };
@@ -0,0 +1,90 @@
1
+ import { isVirtualClick as k, getEventTarget as L } from "../../dom-query/dist/event.js";
2
+ import { isMac as T } from "../../dom-query/dist/platform.js";
3
+ import { getWindow as d, getDocument as f, getActiveElement as F } from "../../dom-query/dist/node.js";
4
+ function M(e) {
5
+ return !(e.metaKey || !T() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
6
+ }
7
+ var H = /* @__PURE__ */ new Set(["checkbox", "radio", "range", "color", "file", "image", "button", "submit", "reset"]);
8
+ function K(e, n, t) {
9
+ const r = t ? L(t) : null, i = f(r), s = d(r), u = F(i);
10
+ return e = e || u instanceof s.HTMLInputElement && !H.has(u?.type) || u instanceof s.HTMLTextAreaElement || u instanceof s.HTMLElement && u.isContentEditable, !(e && n === "keyboard" && t instanceof s.KeyboardEvent && !Reflect.has(V, t.key));
11
+ }
12
+ var a = null, E = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Map(), c = !1, p = !1, C = !1, V = {
13
+ Tab: !0,
14
+ Escape: !0
15
+ };
16
+ function m(e, n) {
17
+ for (let t of E)
18
+ t(e, n);
19
+ }
20
+ function v(e) {
21
+ c = !0, M(e) && (a = "keyboard", m("keyboard", e));
22
+ }
23
+ function o(e) {
24
+ a = "pointer", (e.type === "mousedown" || e.type === "pointerdown") && (c = !0, m("pointer", e));
25
+ }
26
+ function b(e) {
27
+ k(e) && (c = !0, a = "virtual");
28
+ }
29
+ function g(e) {
30
+ const n = L(e);
31
+ n === d(n) || n === f(n) || C || !e.isTrusted || (!c && !p && (a = "virtual", m("virtual", e)), c = !1, p = !1);
32
+ }
33
+ function w() {
34
+ c = !1, p = !0;
35
+ }
36
+ function P(e) {
37
+ if (typeof window > "u" || l.get(d(e)))
38
+ return;
39
+ const n = d(e), t = f(e);
40
+ let r = n.HTMLElement.prototype.focus;
41
+ function i() {
42
+ c = !0, r.apply(this, arguments);
43
+ }
44
+ try {
45
+ Object.defineProperty(n.HTMLElement.prototype, "focus", {
46
+ configurable: !0,
47
+ value: i
48
+ });
49
+ } catch {
50
+ }
51
+ t.addEventListener("keydown", v, !0), t.addEventListener("keyup", v, !0), t.addEventListener("click", b, !0), n.addEventListener("focus", g, !0), n.addEventListener("blur", w, !1), typeof n.PointerEvent < "u" ? (t.addEventListener("pointerdown", o, !0), t.addEventListener("pointermove", o, !0), t.addEventListener("pointerup", o, !0)) : (t.addEventListener("mousedown", o, !0), t.addEventListener("mousemove", o, !0), t.addEventListener("mouseup", o, !0)), n.addEventListener(
52
+ "beforeunload",
53
+ () => {
54
+ S(e);
55
+ },
56
+ { once: !0 }
57
+ ), l.set(n, { focus: r });
58
+ }
59
+ var S = (e, n) => {
60
+ const t = d(e), r = f(e), i = l.get(t);
61
+ if (i) {
62
+ try {
63
+ Object.defineProperty(t.HTMLElement.prototype, "focus", {
64
+ configurable: !0,
65
+ value: i.focus
66
+ });
67
+ } catch {
68
+ }
69
+ r.removeEventListener("keydown", v, !0), r.removeEventListener("keyup", v, !0), r.removeEventListener("click", b, !0), t.removeEventListener("focus", g, !0), t.removeEventListener("blur", w, !1), typeof t.PointerEvent < "u" ? (r.removeEventListener("pointerdown", o, !0), r.removeEventListener("pointermove", o, !0), r.removeEventListener("pointerup", o, !0)) : (r.removeEventListener("mousedown", o, !0), r.removeEventListener("mousemove", o, !0), r.removeEventListener("mouseup", o, !0)), l.delete(t);
70
+ }
71
+ };
72
+ function y() {
73
+ return a === "keyboard" || a === "virtual";
74
+ }
75
+ function x(e = {}) {
76
+ const { isTextInput: n, autoFocus: t, onChange: r, root: i } = e;
77
+ P(i), r?.({ isFocusVisible: t || y(), modality: a });
78
+ const s = (u, h) => {
79
+ K(!!n, u, h) && r?.({ isFocusVisible: y(), modality: u });
80
+ };
81
+ return E.add(s), () => {
82
+ E.delete(s);
83
+ };
84
+ }
85
+ export {
86
+ C as ignoreFocusEvent,
87
+ y as isFocusVisible,
88
+ l as listenerMap,
89
+ x as trackFocusVisible
90
+ };
@@ -0,0 +1,34 @@
1
+ import { isHTMLElement as u } from "../../dom-query/dist/node.js";
2
+ function c(t = 0, n = 0, e = 0, o = 0) {
3
+ if (typeof DOMRect == "function")
4
+ return new DOMRect(t, n, e, o);
5
+ const r = {
6
+ x: t,
7
+ y: n,
8
+ width: e,
9
+ height: o,
10
+ top: n,
11
+ right: t + e,
12
+ bottom: n + o,
13
+ left: t
14
+ };
15
+ return { ...r, toJSON: () => r };
16
+ }
17
+ function i(t) {
18
+ if (!t) return c();
19
+ const { x: n, y: e, width: o, height: r } = t;
20
+ return c(n, e, o, r);
21
+ }
22
+ function g(t, n) {
23
+ return {
24
+ contextElement: u(t) ? t : t?.contextElement,
25
+ getBoundingClientRect: () => {
26
+ const e = t, o = n?.(e);
27
+ return o || !e ? i(o) : e.getBoundingClientRect();
28
+ }
29
+ };
30
+ }
31
+ export {
32
+ c as createDOMRect,
33
+ g as getAnchorElement
34
+ };