@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,187 @@
1
+ import { computePosition as q, autoUpdate as B, offset as T, flip as k, shift as L, arrow as N, size as X, hide as Y, limitShift as G } from "../../../@floating-ui/dom/dist/floating-ui.dom.js";
2
+ import { getAnchorElement as J } from "./get-anchor.js";
3
+ import { shiftArrowMiddleware as K, createTransformOriginMiddleware as Q, rectMiddleware as Z } from "./middleware.js";
4
+ import { getPlacementDetails as _ } from "./placement.js";
5
+ import { noop as U } from "../../utils/dist/functions.js";
6
+ import { isNull as V } from "../../utils/dist/guard.js";
7
+ import { raf as ee } from "../../dom-query/dist/raf.js";
8
+ import { getWindow as te, isHTMLElement as re } from "../../dom-query/dist/node.js";
9
+ import { getComputedStyle as ne } from "../../dom-query/dist/computed-style.js";
10
+ import { compact as ie } from "../../utils/dist/object.js";
11
+ var oe = {
12
+ strategy: "absolute",
13
+ placement: "bottom",
14
+ listeners: !0,
15
+ restoreStyles: !1,
16
+ gutter: 8,
17
+ flip: !0,
18
+ slide: !0,
19
+ overlap: !1,
20
+ sameWidth: !1,
21
+ fitViewport: !1,
22
+ overflowPadding: 8,
23
+ arrowPadding: 4
24
+ };
25
+ function R(e, t) {
26
+ const i = e.devicePixelRatio || 1;
27
+ return Math.round(t * i) / i;
28
+ }
29
+ function y(e, t) {
30
+ return e != null && Math.abs(e - t) < 0.5;
31
+ }
32
+ function A(e) {
33
+ return typeof e == "function" ? e() : e === "clipping-ancestors" ? "clippingAncestors" : e;
34
+ }
35
+ function se(e, t, i) {
36
+ const o = e || t.createElement("div");
37
+ return N({ element: o, padding: i.arrowPadding });
38
+ }
39
+ function le(e, t) {
40
+ if (!V(t.offset ?? t.gutter))
41
+ return T(({ placement: i }) => {
42
+ const o = (e?.clientHeight || 0) / 2, s = t.offset?.mainAxis ?? t.gutter, d = typeof s == "number" ? s + o : s ?? o, { hasAlign: n } = _(i), l = n ? void 0 : t.shift, a = t.offset?.crossAxis ?? l;
43
+ return ie({
44
+ crossAxis: a,
45
+ mainAxis: d,
46
+ alignmentAxis: t.shift
47
+ });
48
+ });
49
+ }
50
+ function fe(e) {
51
+ if (!e.flip) return;
52
+ const t = A(e.boundary);
53
+ return k({
54
+ ...t ? { boundary: t } : void 0,
55
+ padding: e.overflowPadding,
56
+ fallbackPlacements: e.flip === !0 ? void 0 : e.flip
57
+ });
58
+ }
59
+ function ae(e) {
60
+ if (!e.slide && !e.overlap) return;
61
+ const t = A(e.boundary);
62
+ return L({
63
+ ...t ? { boundary: t } : void 0,
64
+ mainAxis: e.slide,
65
+ crossAxis: e.overlap,
66
+ padding: e.overflowPadding,
67
+ limiter: G()
68
+ });
69
+ }
70
+ function ce(e) {
71
+ if (e.sizeMiddleware === !1 && !e.sameWidth && !e.fitViewport) return;
72
+ let t, i, o, s;
73
+ return X({
74
+ padding: e.overflowPadding,
75
+ apply({ elements: d, rects: n, availableHeight: l, availableWidth: a }) {
76
+ const u = d.floating, p = Math.round(n.reference.width), m = Math.round(n.reference.height);
77
+ a = Math.floor(a), l = Math.floor(l), y(t, p) || (u.style.setProperty("--reference-width", `${p}px`), t = p), y(i, m) || (u.style.setProperty("--reference-height", `${m}px`), i = m), y(o, a) || (u.style.setProperty("--available-width", `${a}px`), o = a), y(s, l) || (u.style.setProperty("--available-height", `${l}px`), s = l);
78
+ }
79
+ });
80
+ }
81
+ function de(e) {
82
+ if (e.hideWhenDetached)
83
+ return Y({ strategy: "referenceHidden", boundary: A(e.boundary) ?? "clippingAncestors" });
84
+ }
85
+ function ue(e) {
86
+ return e ? e === !0 ? { ancestorResize: !0, ancestorScroll: !0, elementResize: !0, layoutShift: !0 } : e : {};
87
+ }
88
+ var pe = [
89
+ "transform",
90
+ "visibility",
91
+ "pointer-events",
92
+ "--x",
93
+ "--y",
94
+ "--z-index",
95
+ "--reference-width",
96
+ "--reference-height",
97
+ "--available-width",
98
+ "--available-height",
99
+ "--transform-origin"
100
+ ], ye = ["top", "right", "bottom", "left"];
101
+ function D(e, t) {
102
+ if (!e) return U;
103
+ const i = new Map(t.map((o) => [o, e.style.getPropertyValue(o)]));
104
+ return () => {
105
+ i.forEach((o, s) => {
106
+ o ? e.style.setProperty(s, o) : e.style.removeProperty(s);
107
+ }), e.style.length === 0 && e.removeAttribute("style");
108
+ };
109
+ }
110
+ function O(e) {
111
+ return e == null ? null : re(e) ? e : typeof e == "object" && e && "contextElement" in e && e.contextElement ? e.contextElement : e;
112
+ }
113
+ function me(e, t, i = {}) {
114
+ const o = () => (typeof t == "function" ? t() : t) ?? null, s = () => {
115
+ const r = typeof e == "function" ? e() : e;
116
+ return i.getAnchorElement?.() ?? r;
117
+ }, d = () => {
118
+ const r = s();
119
+ return !r && !i.getAnchorRect ? null : J(r, i.getAnchorRect);
120
+ }, n = Object.assign({}, oe, i);
121
+ let l = [], a = null, u, p;
122
+ function m(r) {
123
+ u?.(), p?.(), a = r, u = n.restoreStyles ? D(r, pe) : void 0;
124
+ const f = r.querySelector("[data-part=arrow]");
125
+ p = n.restoreStyles ? D(f, ye) : void 0, l = [
126
+ le(f, n),
127
+ fe(n),
128
+ ae(n),
129
+ se(f, r.ownerDocument, n),
130
+ K(f),
131
+ Q(
132
+ { gutter: n.gutter, offset: n.offset, overlap: n.overlap },
133
+ f
134
+ ),
135
+ ce(n),
136
+ de(n),
137
+ Z
138
+ ];
139
+ }
140
+ const { placement: $, strategy: H, onComplete: W, onPositioned: M } = n;
141
+ let b, S, h = !1, E, z, w = U;
142
+ const I = ue(n.listeners);
143
+ function j() {
144
+ if (!n.listeners) return;
145
+ const r = s(), f = d(), c = o();
146
+ if (!f || !c) return;
147
+ (O(r) !== O(E) || c !== z) && (w(), E = r, z = c, w = B(f, c, F, I));
148
+ }
149
+ async function C() {
150
+ j();
151
+ const r = o();
152
+ if (!r) return;
153
+ r !== a && (m(r), h = !1);
154
+ const f = d();
155
+ if (!f) return;
156
+ const c = await q(f, r, {
157
+ placement: $,
158
+ middleware: l,
159
+ strategy: H
160
+ });
161
+ W?.(c);
162
+ const v = te(r), g = R(v, c.x), P = R(v, c.y);
163
+ if (y(b, g) || (r.style.setProperty("--x", `${g}px`), b = g), y(S, P) || (r.style.setProperty("--y", `${P}px`), S = P), n.hideWhenDetached && (c.middlewareData.hide?.referenceHidden ? (r.style.setProperty("visibility", "hidden"), r.style.setProperty("pointer-events", "none")) : (r.style.removeProperty("visibility"), r.style.removeProperty("pointer-events"))), !h) {
164
+ const x = r.firstElementChild;
165
+ x && (r.style.setProperty("--z-index", ne(x).zIndex), h = !0);
166
+ }
167
+ }
168
+ async function F() {
169
+ i.updatePosition ? (await i.updatePosition({ updatePosition: C, floatingElement: o() }), M?.({ placed: !0 })) : await C();
170
+ }
171
+ return F(), () => {
172
+ w(), p?.(), u?.(), M?.({ placed: !1 });
173
+ };
174
+ }
175
+ function Ee(e, t, i = {}) {
176
+ const { defer: o, ...s } = i, d = o ? ee : (l) => l(), n = [];
177
+ return n.push(
178
+ d(() => {
179
+ n.push(me(e, t, s));
180
+ })
181
+ ), () => {
182
+ n.forEach((l) => l?.());
183
+ };
184
+ }
185
+ export {
186
+ Ee as getPlacement
187
+ };
@@ -0,0 +1,47 @@
1
+ import { cssVars as e } from "./middleware.js";
2
+ var n = {
3
+ bottom: "rotate(45deg)",
4
+ left: "rotate(135deg)",
5
+ top: "rotate(225deg)",
6
+ right: "rotate(315deg)"
7
+ };
8
+ function d(i = {}) {
9
+ const { placement: t, sameWidth: r, fitViewport: a, strategy: o = "absolute" } = i;
10
+ return {
11
+ arrow: {
12
+ position: "absolute",
13
+ width: e.arrowSize.reference,
14
+ height: e.arrowSize.reference,
15
+ [e.arrowSizeHalf.variable]: `calc(${e.arrowSize.reference} / 2)`,
16
+ [e.arrowOffset.variable]: `calc(${e.arrowSizeHalf.reference} * -1)`
17
+ },
18
+ arrowTip: {
19
+ // @ts-expect-error - Fix this
20
+ transform: t ? n[t.split("-")[0]] : void 0,
21
+ background: e.arrowBg.reference,
22
+ top: "0",
23
+ left: "0",
24
+ width: "100%",
25
+ height: "100%",
26
+ position: "absolute",
27
+ zIndex: "inherit"
28
+ },
29
+ floating: {
30
+ position: o,
31
+ isolation: "isolate",
32
+ minWidth: r ? void 0 : "max-content",
33
+ width: r ? "var(--reference-width)" : void 0,
34
+ maxWidth: a ? "var(--available-width)" : void 0,
35
+ maxHeight: a ? "var(--available-height)" : void 0,
36
+ pointerEvents: t ? void 0 : "none",
37
+ top: "0px",
38
+ left: "0px",
39
+ // move off-screen if placement is not defined
40
+ transform: t ? "translate3d(var(--x), var(--y), 0)" : "translate3d(0, -100vh, 0)",
41
+ zIndex: "var(--z-index)"
42
+ }
43
+ };
44
+ }
45
+ export {
46
+ d as getPlacementStyles
47
+ };
@@ -0,0 +1,56 @@
1
+ var n = (r) => ({ variable: r, reference: `var(${r})` }), u = {
2
+ arrowSize: n("--arrow-size"),
3
+ arrowSizeHalf: n("--arrow-size-half"),
4
+ arrowBg: n("--arrow-background"),
5
+ transformOrigin: n("--transform-origin"),
6
+ arrowOffset: n("--arrow-offset")
7
+ }, M = (r) => r === "top" || r === "bottom" ? "y" : "x";
8
+ function S(r, a) {
9
+ return {
10
+ name: "transformOrigin",
11
+ fn(o) {
12
+ const { elements: s, middlewareData: t, placement: i, rects: l, y: O } = o, p = i.split("-")[0], $ = M(p), v = t.arrow?.x || 0, y = t.arrow?.y || 0, b = a?.clientWidth || 0, g = a?.clientHeight || 0, c = v + b / 2, w = y + g / 2, A = Math.abs(t.shift?.y || 0), z = l.reference.height / 2, m = g / 2, f = r.offset?.mainAxis ?? r.gutter, e = typeof f == "number" ? f + m : f ?? m, H = A > e, x = {
13
+ top: `${c}px calc(100% + ${e}px)`,
14
+ bottom: `${c}px ${-e}px`,
15
+ left: `calc(100% + ${e}px) ${w}px`,
16
+ right: `${-e}px ${w}px`
17
+ }[p], h = `${c}px ${l.reference.y + z - O}px`, d = !!r.overlap && $ === "y" && H;
18
+ return s.floating.style.setProperty(
19
+ u.transformOrigin.variable,
20
+ d ? h : x
21
+ ), {
22
+ data: {
23
+ transformOrigin: d ? h : x
24
+ }
25
+ };
26
+ }
27
+ };
28
+ }
29
+ var T = {
30
+ name: "rects",
31
+ fn({ rects: r }) {
32
+ return {
33
+ data: r
34
+ };
35
+ }
36
+ }, V = (r) => {
37
+ if (r)
38
+ return {
39
+ name: "shiftArrow",
40
+ fn({ placement: a, middlewareData: o }) {
41
+ if (!o.arrow) return {};
42
+ const { x: s, y: t } = o.arrow, i = a.split("-")[0];
43
+ return Object.assign(r.style, {
44
+ left: s != null ? `${s}px` : "",
45
+ top: t != null ? `${t}px` : "",
46
+ [i]: `calc(100% + ${u.arrowOffset.reference})`
47
+ }), {};
48
+ }
49
+ };
50
+ };
51
+ export {
52
+ S as createTransformOriginMiddleware,
53
+ u as cssVars,
54
+ T as rectMiddleware,
55
+ V as shiftArrowMiddleware
56
+ };
@@ -0,0 +1,7 @@
1
+ function l(t) {
2
+ const [e, n] = t.split("-");
3
+ return { side: e, align: n, hasAlign: n != null };
4
+ }
5
+ export {
6
+ l as getPlacementDetails
7
+ };
@@ -0,0 +1,16 @@
1
+ function i(n, c) {
2
+ const { state: o, send: t, context: s } = n, u = o.matches("mounted", "unmountSuspended");
3
+ return {
4
+ skip: !s.get("initial"),
5
+ present: u,
6
+ setNode(e) {
7
+ e && t({ type: "NODE.SET", node: e });
8
+ },
9
+ unmount() {
10
+ t({ type: "UNMOUNT" });
11
+ }
12
+ };
13
+ }
14
+ export {
15
+ i as connect
16
+ };
@@ -0,0 +1,147 @@
1
+ import { createMachine as p } from "../../core/dist/create-machine.js";
2
+ import { setStyle as g } from "../../dom-query/dist/set.js";
3
+ import { nextTick as v, raf as l } from "../../dom-query/dist/raf.js";
4
+ import { getComputedStyle as E } from "../../dom-query/dist/computed-style.js";
5
+ import { getWindow as y } from "../../dom-query/dist/node.js";
6
+ import { getEventTarget as N } from "../../dom-query/dist/event.js";
7
+ var T = p({
8
+ props({ props: e }) {
9
+ return { ...e, present: !!e.present };
10
+ },
11
+ initialState({ prop: e }) {
12
+ return e("present") ? "mounted" : "unmounted";
13
+ },
14
+ refs() {
15
+ return {
16
+ node: null,
17
+ styles: null
18
+ };
19
+ },
20
+ context({ bindable: e }) {
21
+ return {
22
+ unmountAnimationName: e(() => ({ defaultValue: null })),
23
+ prevAnimationName: e(() => ({ defaultValue: null })),
24
+ present: e(() => ({ defaultValue: !1 })),
25
+ initial: e(() => ({
26
+ sync: !0,
27
+ defaultValue: !1
28
+ }))
29
+ };
30
+ },
31
+ exit: ["cleanupNode"],
32
+ watch({ track: e, prop: t, send: i }) {
33
+ e([() => t("present")], () => {
34
+ i({ type: "PRESENCE.CHANGED" });
35
+ });
36
+ },
37
+ on: {
38
+ "NODE.SET": {
39
+ actions: ["setupNode"]
40
+ },
41
+ "PRESENCE.CHANGED": {
42
+ actions: ["setInitial", "syncPresence"]
43
+ }
44
+ },
45
+ states: {
46
+ mounted: {
47
+ on: {
48
+ UNMOUNT: {
49
+ target: "unmounted",
50
+ actions: ["clearPrevAnimationName", "invokeOnExitComplete"]
51
+ },
52
+ "UNMOUNT.SUSPEND": {
53
+ target: "unmountSuspended"
54
+ }
55
+ }
56
+ },
57
+ unmountSuspended: {
58
+ effects: ["trackAnimationEvents"],
59
+ on: {
60
+ MOUNT: {
61
+ target: "mounted",
62
+ actions: ["setPrevAnimationName"]
63
+ },
64
+ UNMOUNT: {
65
+ target: "unmounted",
66
+ actions: ["clearPrevAnimationName", "invokeOnExitComplete"]
67
+ }
68
+ }
69
+ },
70
+ unmounted: {
71
+ on: {
72
+ MOUNT: {
73
+ target: "mounted",
74
+ actions: ["setPrevAnimationName"]
75
+ }
76
+ }
77
+ }
78
+ },
79
+ implementations: {
80
+ actions: {
81
+ setInitial: ({ context: e }) => {
82
+ e.get("initial") || queueMicrotask(() => {
83
+ e.set("initial", !0);
84
+ });
85
+ },
86
+ invokeOnExitComplete: ({ prop: e, refs: t }) => {
87
+ e("onExitComplete")?.();
88
+ const i = t.get("node");
89
+ if (!i) return;
90
+ const a = y(i), n = new a.CustomEvent("exitcomplete", { bubbles: !1 });
91
+ i.dispatchEvent(n);
92
+ },
93
+ setupNode: ({ refs: e, event: t }) => {
94
+ e.get("node") !== t.node && (e.set("node", t.node), e.set("styles", E(t.node)));
95
+ },
96
+ cleanupNode: ({ refs: e }) => {
97
+ e.set("node", null), e.set("styles", null);
98
+ },
99
+ syncPresence: ({ context: e, refs: t, send: i, prop: a }) => {
100
+ const n = a("present");
101
+ if (n)
102
+ return i({ type: "MOUNT", src: "presence.changed" });
103
+ const s = t.get("node");
104
+ if (!n && s?.ownerDocument.visibilityState === "hidden")
105
+ return i({ type: "UNMOUNT", src: "visibilitychange" });
106
+ l(() => {
107
+ if (a("present")) return;
108
+ const o = m(t.get("styles"));
109
+ e.set("unmountAnimationName", o), o === "none" || o === e.get("prevAnimationName") || t.get("styles")?.display === "none" || t.get("styles")?.animationDuration === "0s" ? i({ type: "UNMOUNT", src: "presence.changed" }) : i({ type: "UNMOUNT.SUSPEND" });
110
+ });
111
+ },
112
+ setPrevAnimationName: ({ context: e, refs: t }) => {
113
+ l(() => {
114
+ e.set("prevAnimationName", m(t.get("styles")));
115
+ });
116
+ },
117
+ clearPrevAnimationName: ({ context: e }) => {
118
+ e.set("prevAnimationName", null);
119
+ }
120
+ },
121
+ effects: {
122
+ trackAnimationEvents: ({ context: e, refs: t, send: i, prop: a }) => {
123
+ const n = t.get("node");
124
+ if (!n) return;
125
+ const s = (r) => {
126
+ (r.composedPath?.()?.[0] ?? r.target) === n && e.set("prevAnimationName", m(t.get("styles")));
127
+ }, o = (r) => {
128
+ const u = m(t.get("styles"));
129
+ N(r) === n && u === e.get("unmountAnimationName") && !a("present") && i({ type: "UNMOUNT", src: "animationend" });
130
+ }, c = (r) => {
131
+ N(r) === n && !a("present") && i({ type: "UNMOUNT", src: "animationcancel" });
132
+ };
133
+ n.addEventListener("animationstart", s), n.addEventListener("animationcancel", c), n.addEventListener("animationend", o);
134
+ const d = g(n, { animationFillMode: "forwards" });
135
+ return () => {
136
+ n.removeEventListener("animationstart", s), n.removeEventListener("animationcancel", c), n.removeEventListener("animationend", o), v(() => d());
137
+ };
138
+ }
139
+ }
140
+ }
141
+ });
142
+ function m(e) {
143
+ return e?.animationName || "none";
144
+ }
145
+ export {
146
+ T as machine
147
+ };
@@ -0,0 +1,6 @@
1
+ import { createAnatomy as r } from "../../anatomy/dist/create-anatomy.js";
2
+ var t = r("tooltip").parts("trigger", "arrow", "arrowTip", "positioner", "content"), a = t.build();
3
+ export {
4
+ t as anatomy,
5
+ a as parts
6
+ };
@@ -0,0 +1,119 @@
1
+ import { isLeftClick as V } from "../../dom-query/dist/event.js";
2
+ import { dataAttr as P } from "../../dom-query/dist/shared.js";
3
+ import { isFocusVisible as A } from "../../focus-visible/dist/index.js";
4
+ import { getPlacementStyles as C } from "../../popper/dist/get-styles.js";
5
+ import { parts as p } from "./tooltip.anatomy.js";
6
+ import { getContentId as I, getPositionerId as E, getArrowId as S, getTriggerId as k } from "./tooltip.dom.js";
7
+ import { store as g } from "./tooltip.store.js";
8
+ function j(b, u) {
9
+ const { state: y, context: v, send: r, scope: a, prop: n } = b, f = n("id"), w = !!n("aria-label"), o = y.matches("open", "closing"), h = v.get("triggerValue"), T = I(a), s = n("disabled"), m = C({
10
+ ...n("positioning"),
11
+ placement: v.get("currentPlacement")
12
+ });
13
+ return {
14
+ open: o,
15
+ setOpen(i) {
16
+ y.matches("open", "closing") !== i && r({ type: i ? "open" : "close" });
17
+ },
18
+ triggerValue: h,
19
+ setTriggerValue(i) {
20
+ r({ type: "triggerValue.set", value: i ?? void 0 });
21
+ },
22
+ reposition(i = {}) {
23
+ r({ type: "positioning.set", options: i });
24
+ },
25
+ getTriggerProps(i = {}) {
26
+ const { value: e } = i, l = e == null ? !1 : h === e, c = k(a, e);
27
+ return u.button({
28
+ ...p.trigger.attrs,
29
+ id: c,
30
+ "data-ownedby": a.id,
31
+ "data-value": e,
32
+ "data-current": P(l),
33
+ dir: n("dir"),
34
+ "data-expanded": P(o),
35
+ "data-state": o ? "open" : "closed",
36
+ "aria-describedby": o ? T : void 0,
37
+ onClick(t) {
38
+ if (t.defaultPrevented || s || !n("closeOnClick")) return;
39
+ const d = o && e != null && !l;
40
+ r({ type: d ? "triggerValue.set" : "close", src: "trigger.click", value: e, triggerId: c });
41
+ },
42
+ onFocus(t) {
43
+ if (t.defaultPrevented || s || !A()) return;
44
+ const d = o && e != null && !l;
45
+ r({ type: d ? "triggerValue.set" : "open", src: "trigger.focus", value: e, triggerId: c });
46
+ },
47
+ onBlur(t) {
48
+ if (t.defaultPrevented || s || f !== g.get("id")) return;
49
+ (t.relatedTarget ?? a.getDoc().activeElement)?.closest(`[data-ownedby="${a.id}"]`) != null || r({ type: "close", src: "trigger.blur", value: e, triggerId: c });
50
+ },
51
+ onPointerDown(t) {
52
+ t.defaultPrevented || s || V(t) && n("closeOnPointerDown") && f === g.get("id") && r({ type: "close", src: "trigger.pointerdown", value: e, triggerId: c });
53
+ },
54
+ onPointerMove(t) {
55
+ if (t.defaultPrevented || s || t.pointerType === "touch") return;
56
+ const d = o && e != null && !l;
57
+ r({ type: d ? "triggerValue.set" : "pointer.move", value: e, triggerId: c });
58
+ },
59
+ onPointerOver(t) {
60
+ t.defaultPrevented || s || t.pointerType !== "touch" && r({ type: "pointer.move", value: e, triggerId: c });
61
+ },
62
+ onPointerLeave() {
63
+ s || r({ type: "pointer.leave" });
64
+ },
65
+ onPointerCancel() {
66
+ s || r({ type: "pointer.leave" });
67
+ }
68
+ });
69
+ },
70
+ getArrowProps() {
71
+ return u.element({
72
+ id: S(a),
73
+ ...p.arrow.attrs,
74
+ dir: n("dir"),
75
+ style: m.arrow
76
+ });
77
+ },
78
+ getArrowTipProps() {
79
+ return u.element({
80
+ ...p.arrowTip.attrs,
81
+ dir: n("dir"),
82
+ style: m.arrowTip
83
+ });
84
+ },
85
+ getPositionerProps() {
86
+ return u.element({
87
+ id: E(a),
88
+ ...p.positioner.attrs,
89
+ dir: n("dir"),
90
+ style: m.floating
91
+ });
92
+ },
93
+ getContentProps() {
94
+ const i = g.get("id") === f, e = g.get("prevId") === f, l = g.get("instant") && (o && i || e);
95
+ return u.element({
96
+ ...p.content.attrs,
97
+ dir: n("dir"),
98
+ hidden: !o,
99
+ "data-state": o ? "open" : "closed",
100
+ "data-instant": P(l),
101
+ role: w ? void 0 : "tooltip",
102
+ id: w ? void 0 : T,
103
+ "data-placement": v.get("currentPlacement"),
104
+ onPointerEnter() {
105
+ r({ type: "content.pointer.move" });
106
+ },
107
+ onPointerLeave() {
108
+ r({ type: "content.pointer.leave" });
109
+ },
110
+ style: {
111
+ pointerEvents: n("interactive") ? "auto" : "none"
112
+ }
113
+ });
114
+ }
115
+ };
116
+ }
117
+ export {
118
+ j as connect
119
+ };
@@ -0,0 +1,15 @@
1
+ import { isFunction as o } from "../../utils/dist/guard.js";
2
+ import { queryAll as g } from "../../dom-query/dist/query.js";
3
+ var d = (t, r) => {
4
+ const i = t.ids?.trigger;
5
+ return i != null ? o(i) ? i(r) : i : r ? `tooltip:${t.id}:trigger:${r}` : `tooltip:${t.id}:trigger`;
6
+ }, I = (t) => t.ids?.content ?? `tooltip:${t.id}:content`, $ = (t) => t.ids?.arrow ?? `tooltip:${t.id}:arrow`, e = (t) => t.ids?.positioner ?? `tooltip:${t.id}:popper`, p = (t) => t.getById(e(t)), n = (t) => g(t.getDoc(), `[data-scope="tooltip"][data-part="trigger"][data-ownedby="${t.id}"]`), m = (t, r) => r == null ? n(t)[0] : t.getById(d(t, r));
7
+ export {
8
+ m as getActiveTriggerEl,
9
+ $ as getArrowId,
10
+ I as getContentId,
11
+ p as getPositionerEl,
12
+ e as getPositionerId,
13
+ n as getTriggerEls,
14
+ d as getTriggerId
15
+ };