@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,363 @@
1
+ const t = `
2
+ query AccessibleArticles($status: String, $tags: [String!], $tagMode: String, $limit: Int, $offset: Int) {
3
+ accessibleKbArticles(status: $status, tags: $tags, tagMode: $tagMode, limit: $limit, offset: $offset) {
4
+ articles {
5
+ id
6
+ filename
7
+ title
8
+ description
9
+ contentType
10
+ status
11
+ publishedAt
12
+ updatedAt
13
+ tags
14
+ featuredImageUrl
15
+ }
16
+ totalCount
17
+ }
18
+ }
19
+ `, a = `
20
+ query ArticleWithTranslation($filename: String!, $languageCode: String!) {
21
+ articleWithTranslation(filename: $filename, languageCode: $languageCode) {
22
+ id
23
+ filename
24
+ contentType
25
+ status
26
+ description
27
+ sourceLanguageCode
28
+ createdAt
29
+ updatedAt
30
+ publishedAt
31
+ title
32
+ content
33
+ languageCode
34
+ isSource
35
+ isFallback
36
+ featuredImageUrl
37
+ featuredImageGeo {
38
+ latitude
39
+ longitude
40
+ altitude
41
+ placeName
42
+ }
43
+ contentImagesGeo {
44
+ url
45
+ latitude
46
+ longitude
47
+ altitude
48
+ placeName
49
+ }
50
+ accessRights
51
+ }
52
+ }
53
+ `, n = `
54
+ query ArticleAliasTarget($filename: String!) {
55
+ articleAliasTarget(filename: $filename)
56
+ }
57
+ `, o = `
58
+ query SearchKnowledgeBase($query: String!, $tags: [String!], $contentType: String, $limit: Int, $minSimilarity: Float, $searchMode: SearchMode) {
59
+ searchKnowledgeBase(query: $query, tags: $tags, contentType: $contentType, limit: $limit, minSimilarity: $minSimilarity, searchMode: $searchMode) {
60
+ articleId
61
+ filename
62
+ title
63
+ chunkText
64
+ similarity
65
+ }
66
+ }
67
+ `, r = `
68
+ query GetKBContext($query: String!, $maxChunks: Int) {
69
+ getKBContext(query: $query, maxChunks: $maxChunks) {
70
+ chunks {
71
+ filename
72
+ title
73
+ text
74
+ similarity
75
+ }
76
+ totalChunks
77
+ }
78
+ }
79
+ `, i = `
80
+ query KbNavigation($scope: String, $locale: String) {
81
+ kbNavigation(scope: $scope, locale: $locale)
82
+ }
83
+ `, s = `
84
+ query AccessibleTags {
85
+ accessibleKbTags {
86
+ tags {
87
+ id
88
+ slug
89
+ name
90
+ description
91
+ color
92
+ }
93
+ totalCount
94
+ }
95
+ }
96
+ `, c = `
97
+ query LocalizedTags($languageCode: String!) {
98
+ localizedTags(languageCode: $languageCode) {
99
+ id
100
+ name
101
+ slug
102
+ description
103
+ color
104
+ accessLevel
105
+ languageCode
106
+ isFallback
107
+ }
108
+ }
109
+ `, l = `
110
+ query KBLanguages {
111
+ kbLanguages {
112
+ id
113
+ code
114
+ name
115
+ nativeName
116
+ isSource
117
+ isEnabled
118
+ sortOrder
119
+ }
120
+ }
121
+ `, m = `
122
+ query ArticleTranslations($sourceFilename: String!) {
123
+ listArticleTranslations(sourceFilename: $sourceFilename) {
124
+ id
125
+ languageCode
126
+ title
127
+ syncStatus
128
+ reviewed
129
+ updatedAt
130
+ }
131
+ }
132
+ `, u = `
133
+ query GetTranslation($sourceFilename: String!, $languageCode: String!) {
134
+ getTranslation(sourceFilename: $sourceFilename, languageCode: $languageCode) {
135
+ id
136
+ articleId
137
+ languageCode
138
+ title
139
+ content
140
+ syncStatus
141
+ reviewed
142
+ translatedBy
143
+ updatedAt
144
+ }
145
+ }
146
+ `, e = `
147
+ id
148
+ articleId
149
+ userId
150
+ userName
151
+ parentCommentId
152
+ displayContent
153
+ displayLanguageCode
154
+ sourceLanguageCode
155
+ sourceContent
156
+ isPendingTranslation
157
+ isTranslated
158
+ isEdited
159
+ createdAt
160
+ `, d = `
161
+ query ArticleComments($articleId: ID!, $languageCode: String!) {
162
+ articleComments(articleId: $articleId, languageCode: $languageCode) {
163
+ comments {
164
+ ${e}
165
+ replies {
166
+ ${e}
167
+ replies {
168
+ ${e}
169
+ replies {
170
+ ${e}
171
+ }
172
+ }
173
+ }
174
+ }
175
+ totalCount
176
+ }
177
+ }
178
+ `, g = `
179
+ query GetComment($commentId: ID!, $languageCode: String!) {
180
+ comment(commentId: $commentId, languageCode: $languageCode) {
181
+ ${e}
182
+ replies {
183
+ ${e}
184
+ }
185
+ }
186
+ }
187
+ `, $ = `
188
+ mutation CreateComment($articleId: ID!, $content: String!, $sourceLanguageCode: String!, $parentCommentId: ID) {
189
+ createComment(articleId: $articleId, content: $content, sourceLanguageCode: $sourceLanguageCode, parentCommentId: $parentCommentId) {
190
+ success
191
+ error
192
+ comment {
193
+ ${e}
194
+ }
195
+ }
196
+ }
197
+ `, C = `
198
+ mutation UpdateComment($commentId: ID!, $content: String!) {
199
+ updateComment(commentId: $commentId, content: $content) {
200
+ success
201
+ error
202
+ comment {
203
+ ${e}
204
+ }
205
+ }
206
+ }
207
+ `, S = `
208
+ mutation DeleteComment($commentId: ID!) {
209
+ deleteComment(commentId: $commentId) {
210
+ success
211
+ error
212
+ }
213
+ }
214
+ `, I = `
215
+ subscription CommentUpdates($articleId: ID!) {
216
+ commentUpdates(articleId: $articleId) {
217
+ type
218
+ commentId
219
+ }
220
+ }
221
+ `, p = `
222
+ mutation Login($email: String!, $password: String!) {
223
+ login(email: $email, password: $password) {
224
+ success
225
+ token
226
+ user {
227
+ id
228
+ email
229
+ name
230
+ accessLevel
231
+ }
232
+ error
233
+ }
234
+ }
235
+ `, T = `
236
+ mutation Register($email: String!, $password: String!, $name: String) {
237
+ register(email: $email, password: $password, name: $name) {
238
+ success
239
+ message
240
+ error
241
+ }
242
+ }
243
+ `, E = `
244
+ mutation VerifyEmail($token: String!) {
245
+ verifyEmail(token: $token) {
246
+ success
247
+ error
248
+ }
249
+ }
250
+ `, A = `
251
+ mutation ForgotPassword($email: String!) {
252
+ forgotPassword(email: $email) {
253
+ success
254
+ message
255
+ error
256
+ }
257
+ }
258
+ `, R = `
259
+ mutation ResetPassword($token: String!, $password: String!) {
260
+ resetPassword(token: $token, password: $password) {
261
+ success
262
+ error
263
+ }
264
+ }
265
+ `, f = `
266
+ mutation ResendVerification($email: String!) {
267
+ resendVerification(email: $email) {
268
+ success
269
+ message
270
+ error
271
+ }
272
+ }
273
+ `, y = `
274
+ mutation ChangePassword($currentPassword: String!, $newPassword: String!) {
275
+ changePassword(currentPassword: $currentPassword, newPassword: $newPassword) {
276
+ success
277
+ error
278
+ }
279
+ }
280
+ `, N = `
281
+ mutation UpdateMyProfile($name: String, $email: String) {
282
+ updateMyProfile(name: $name, email: $email) {
283
+ success
284
+ emailChanged
285
+ user {
286
+ id
287
+ email
288
+ name
289
+ accessLevel
290
+ }
291
+ error
292
+ }
293
+ }
294
+ `, L = `
295
+ query MyReportSettings {
296
+ myReportSettings {
297
+ autoReportErrors
298
+ autoReportContent
299
+ autoReportPerformance
300
+ includeContextData
301
+ rateLimitPerHour
302
+ emailNotifications
303
+ feedbackNotifications
304
+ }
305
+ }
306
+ `, P = `
307
+ mutation UpdateMyReportSettings(
308
+ $autoReportErrors: String
309
+ $autoReportContent: String
310
+ $autoReportPerformance: String
311
+ $includeContextData: Boolean
312
+ $rateLimitPerHour: Int
313
+ $emailNotifications: String
314
+ $feedbackNotifications: String
315
+ ) {
316
+ updateMyReportSettings(
317
+ autoReportErrors: $autoReportErrors
318
+ autoReportContent: $autoReportContent
319
+ autoReportPerformance: $autoReportPerformance
320
+ includeContextData: $includeContextData
321
+ rateLimitPerHour: $rateLimitPerHour
322
+ emailNotifications: $emailNotifications
323
+ feedbackNotifications: $feedbackNotifications
324
+ ) {
325
+ autoReportErrors
326
+ autoReportContent
327
+ autoReportPerformance
328
+ includeContextData
329
+ rateLimitPerHour
330
+ emailNotifications
331
+ feedbackNotifications
332
+ }
333
+ }
334
+ `;
335
+ export {
336
+ t as ACCESSIBLE_ARTICLES,
337
+ s as ACCESSIBLE_TAGS,
338
+ n as ARTICLE_ALIAS_TARGET,
339
+ d as ARTICLE_COMMENTS,
340
+ m as ARTICLE_TRANSLATIONS,
341
+ a as ARTICLE_WITH_TRANSLATION,
342
+ y as CHANGE_PASSWORD,
343
+ I as COMMENT_UPDATES_SUBSCRIPTION,
344
+ $ as CREATE_COMMENT,
345
+ S as DELETE_COMMENT,
346
+ A as FORGOT_PASSWORD,
347
+ g as GET_COMMENT,
348
+ r as GET_KB_CONTEXT,
349
+ u as GET_TRANSLATION,
350
+ l as KB_LANGUAGES,
351
+ i as KB_NAVIGATION,
352
+ c as LOCALIZED_TAGS,
353
+ p as LOGIN,
354
+ L as MY_REPORT_SETTINGS,
355
+ T as REGISTER,
356
+ f as RESEND_VERIFICATION,
357
+ R as RESET_PASSWORD,
358
+ o as SEARCH_KNOWLEDGE_BASE,
359
+ C as UPDATE_COMMENT,
360
+ N as UPDATE_MY_PROFILE,
361
+ P as UPDATE_MY_REPORT_SETTINGS,
362
+ E as VERIFY_EMAIL
363
+ };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Retry a function with exponential backoff.
3
+ * Used for startup fetches that may fail if upstream services aren't ready yet.
4
+ */
5
+ export declare function retryWithBackoff<T>(fn: () => Promise<T>, { retries, initialDelay, maxDelay }?: {
6
+ retries?: number | undefined;
7
+ initialDelay?: number | undefined;
8
+ maxDelay?: number | undefined;
9
+ }): Promise<T>;
@@ -0,0 +1,14 @@
1
+ async function i(a, { retries: r = 3, initialDelay: e = 500, maxDelay: o = 5e3 } = {}) {
2
+ for (let t = 1; t <= r; t++)
3
+ try {
4
+ return await a();
5
+ } catch (n) {
6
+ if (t === r) throw n;
7
+ const c = Math.min(e * Math.pow(2, t - 1), o);
8
+ await new Promise((h) => setTimeout(h, c));
9
+ }
10
+ throw new Error("Unreachable");
11
+ }
12
+ export {
13
+ i as retryWithBackoff
14
+ };
@@ -0,0 +1,142 @@
1
+ /**
2
+ * Framework-agnostic SEO model builders.
3
+ *
4
+ * These compute the complete SEO surface (title, description, canonical,
5
+ * hreflang, Open Graph, Twitter card, schema.org JSON-LD) for the blog's page
6
+ * types ONCE, in pure code, so the Nuxt and Next.js reference implementations
7
+ * cannot drift. Each framework only maps the returned `SeoModel` into its own
8
+ * head mechanism (`useHead` for Nuxt, `generateMetadata` + a JSON-LD script for
9
+ * Next.js).
10
+ *
11
+ * i18n stays in the framework layer: callers pass already-translated strings
12
+ * (page title pieces, brand suffix, description).
13
+ */
14
+ import type { MediaGeo, ContentImageGeo } from './types';
15
+ export type LocalePrefixStrategy = 'prefix_except_default';
16
+ export interface SeoConfig {
17
+ /** Absolute site origin, no trailing slash, e.g. `https://blog.example.com`. */
18
+ siteUrl: string;
19
+ /** Human site name used for `og:site_name` and the WebSite/Organization name. */
20
+ siteName: string;
21
+ /** Enabled locale codes in display order, e.g. `['cs', 'en']`. */
22
+ locales: string[];
23
+ /** Default locale (rendered without a URL prefix). */
24
+ defaultLocale: string;
25
+ /** URL strategy. Only `prefix_except_default` is supported today. */
26
+ localePrefixStrategy?: LocalePrefixStrategy;
27
+ }
28
+ export interface SeoHreflang {
29
+ hreflang: string;
30
+ href: string;
31
+ }
32
+ export interface SeoOpenGraph {
33
+ title: string;
34
+ description: string;
35
+ type: 'website' | 'article';
36
+ url: string;
37
+ siteName: string;
38
+ image?: string;
39
+ }
40
+ export interface SeoTwitter {
41
+ card: 'summary' | 'summary_large_image';
42
+ title: string;
43
+ description: string;
44
+ image?: string;
45
+ }
46
+ export interface SeoModel {
47
+ /** The document `<title>`. */
48
+ title: string;
49
+ description: string;
50
+ /** Absolute canonical URL of the current page. */
51
+ canonical: string;
52
+ /** `<html lang>` value. */
53
+ htmlLang: string;
54
+ /** Alternate-language links, including an `x-default` pointing at the default locale. */
55
+ hreflang: SeoHreflang[];
56
+ og: SeoOpenGraph;
57
+ twitter: SeoTwitter;
58
+ /** Present only for article pages. */
59
+ articleMeta?: {
60
+ publishedTime?: string;
61
+ modifiedTime?: string;
62
+ };
63
+ /** schema.org JSON-LD object (serialize into a `<script type="application/ld+json">`). */
64
+ jsonLd: Record<string, unknown>;
65
+ }
66
+ /**
67
+ * Build a locale-aware path from a locale-agnostic logical path.
68
+ *
69
+ * Mirrors Nuxt i18n `prefix_except_default`: the default locale gets no prefix,
70
+ * every other locale gets a `/<locale>` prefix.
71
+ */
72
+ export declare function localizedHref(logicalPath: string, locale: string, config: SeoConfig): string;
73
+ /**
74
+ * Remove a leading non-default locale prefix from a path, yielding the
75
+ * locale-agnostic logical path. `/en/articles/x` → `/articles/x`, `/en` → `/`.
76
+ */
77
+ export declare function stripLocalePrefix(path: string, config: SeoConfig): string;
78
+ /**
79
+ * Join a site origin and a path into an absolute URL. The root path collapses to
80
+ * the bare origin (no trailing slash) so that trailing-slash-normalizing SSR
81
+ * frameworks (Next.js, default `trailingSlash:false`) and non-normalizing ones
82
+ * (Nuxt) emit byte-identical canonical/hreflang URLs for the home page.
83
+ */
84
+ export declare function pageUrl(siteUrl: string, path: string): string;
85
+ /** Minimal structural shape an article needs to expose for SEO. */
86
+ export interface ArticleSeoSource {
87
+ title?: string;
88
+ description?: string | null;
89
+ content?: string;
90
+ featuredImageUrl?: string | null;
91
+ /**
92
+ * Geo of the featured image — present ONLY when the image opted in (the API
93
+ * gates this). When set, the JSON-LD image becomes an ImageObject with
94
+ * `contentLocation`, and the article gains `spatialCoverage`.
95
+ */
96
+ featuredImageGeo?: MediaGeo | null;
97
+ /**
98
+ * Geo for opted-in images referenced in the article body. Each becomes an
99
+ * additional ImageObject (with `contentLocation`) in the JSON-LD `image`
100
+ * array. Gated server-side — only opted-in images appear here.
101
+ */
102
+ contentImagesGeo?: ContentImageGeo[] | null;
103
+ publishedAt?: string | null;
104
+ updatedAt?: string | null;
105
+ }
106
+ export interface BuildArticleSeoOptions {
107
+ article: ArticleSeoSource;
108
+ config: SeoConfig;
109
+ /** Locale currently being rendered. */
110
+ locale: string;
111
+ /** Current request path including any locale prefix, e.g. `/en/articles/x`. */
112
+ routePath: string;
113
+ /** Translated brand suffix appended to the title (e.g. "Knowledge Base"). */
114
+ brandSuffix: string;
115
+ /** Translated fallback used when the article has no title (e.g. "Articles"). */
116
+ fallbackTitle: string;
117
+ }
118
+ export declare function buildArticleSeo(opts: BuildArticleSeoOptions): SeoModel;
119
+ export interface BuildListPageSeoOptions {
120
+ /** Fully-composed page title (caller includes the brand suffix). */
121
+ title: string;
122
+ description: string;
123
+ config: SeoConfig;
124
+ locale: string;
125
+ routePath: string;
126
+ /** schema.org `CollectionPage` name; defaults to `title`. */
127
+ jsonLdName?: string;
128
+ /** Optional social image (absolutized if relative). */
129
+ image?: string | null;
130
+ }
131
+ /** Builds SEO for `/articles`, `/topics`, and `/topics/[slug]` (CollectionPage). */
132
+ export declare function buildListPageSeo(opts: BuildListPageSeoOptions): SeoModel;
133
+ export interface BuildHomeSeoOptions {
134
+ /** Translated home title (the document `<title>`). */
135
+ title: string;
136
+ description: string;
137
+ config: SeoConfig;
138
+ locale: string;
139
+ routePath: string;
140
+ }
141
+ /** Builds SEO for the home page (WebSite JSON-LD with a SearchAction). */
142
+ export declare function buildHomeSeo(opts: BuildHomeSeoOptions): SeoModel;
@@ -0,0 +1,166 @@
1
+ import { generateDescription as O } from "./article-seo.js";
2
+ const T = 25;
3
+ function S(t, e, i) {
4
+ const a = t.startsWith("/") ? t : `/${t}`;
5
+ return e === i.defaultLocale ? a : a === "/" ? `/${e}` : `/${e}${a}`;
6
+ }
7
+ function v(t, e) {
8
+ for (const i of e.locales)
9
+ if (i !== e.defaultLocale) {
10
+ if (t === `/${i}`) return "/";
11
+ if (t.startsWith(`/${i}/`)) return t.slice(i.length + 1);
12
+ }
13
+ return t;
14
+ }
15
+ function d(t, e) {
16
+ return e === "/" ? t : `${t}${e}`;
17
+ }
18
+ function L(t, e) {
19
+ const i = v(t, e), a = e.locales.map((n) => ({
20
+ hreflang: n,
21
+ href: d(e.siteUrl, S(i, n, e))
22
+ }));
23
+ return a.push({
24
+ hreflang: "x-default",
25
+ href: d(e.siteUrl, S(i, e.defaultLocale, e))
26
+ }), a;
27
+ }
28
+ function N(t, e) {
29
+ if (t)
30
+ return t.startsWith("http") ? t : `${e}${t}`;
31
+ }
32
+ function j(t) {
33
+ if (!(!t || typeof t.latitude != "number" || typeof t.longitude != "number"))
34
+ return {
35
+ "@type": "Place",
36
+ ...t.placeName ? { name: t.placeName } : {},
37
+ geo: {
38
+ "@type": "GeoCoordinates",
39
+ latitude: t.latitude,
40
+ longitude: t.longitude,
41
+ ...t.altitude != null ? { elevation: t.altitude } : {}
42
+ }
43
+ };
44
+ }
45
+ function C(t) {
46
+ const { article: e, config: i, locale: a, routePath: n, brandSuffix: l, fallbackTitle: o } = t, m = e.title || "", s = m || o, c = `${s} | ${l}`, f = e.description || O(e.content || "") || l, h = d(i.siteUrl, n), r = N(e.featuredImageUrl, i.siteUrl), x = {
47
+ title: s,
48
+ description: f,
49
+ type: "article",
50
+ url: h,
51
+ siteName: i.siteName,
52
+ ...r ? { image: r } : {}
53
+ }, I = {
54
+ card: r ? "summary_large_image" : "summary",
55
+ title: s,
56
+ description: f,
57
+ ...r ? { image: r } : {}
58
+ }, U = {
59
+ ...e.publishedAt ? { publishedTime: e.publishedAt } : {},
60
+ ...e.updatedAt ? { modifiedTime: e.updatedAt } : {}
61
+ }, g = j(e.featuredImageGeo), u = [], b = /* @__PURE__ */ new Set();
62
+ let y;
63
+ r && (b.add(r), u.push(g ? { "@type": "ImageObject", url: r, contentLocation: g } : r));
64
+ for (const _ of e.contentImagesGeo ?? []) {
65
+ if (u.length >= T) break;
66
+ const p = N(_.url, i.siteUrl);
67
+ if (!p || b.has(p)) continue;
68
+ const A = j(_);
69
+ A && (b.add(p), y || (y = A), u.push({ "@type": "ImageObject", url: p, contentLocation: A }));
70
+ }
71
+ const $ = u.length > 1 ? u : u[0], P = g ?? y, w = {
72
+ "@context": "https://schema.org",
73
+ "@type": "Article",
74
+ headline: m,
75
+ description: f,
76
+ url: h,
77
+ ...$ !== void 0 ? { image: $ } : {},
78
+ ...P ? { spatialCoverage: P } : {},
79
+ ...e.publishedAt ? { datePublished: e.publishedAt } : {},
80
+ ...e.updatedAt ? { dateModified: e.updatedAt } : {},
81
+ publisher: { "@type": "Organization", name: i.siteName }
82
+ };
83
+ return {
84
+ title: c,
85
+ description: f,
86
+ canonical: h,
87
+ htmlLang: a,
88
+ hreflang: L(n, i),
89
+ og: x,
90
+ twitter: I,
91
+ ...Object.keys(U).length ? { articleMeta: U } : {},
92
+ jsonLd: w
93
+ };
94
+ }
95
+ function M(t) {
96
+ const { title: e, description: i, config: a, locale: n, routePath: l, jsonLdName: o, image: m } = t, s = d(a.siteUrl, l), c = N(m, a.siteUrl);
97
+ return {
98
+ title: e,
99
+ description: i,
100
+ canonical: s,
101
+ htmlLang: n,
102
+ hreflang: L(l, a),
103
+ og: {
104
+ title: e,
105
+ description: i,
106
+ type: "website",
107
+ url: s,
108
+ siteName: a.siteName,
109
+ ...c ? { image: c } : {}
110
+ },
111
+ twitter: {
112
+ card: c ? "summary_large_image" : "summary",
113
+ title: e,
114
+ description: i,
115
+ ...c ? { image: c } : {}
116
+ },
117
+ jsonLd: {
118
+ "@context": "https://schema.org",
119
+ "@type": "CollectionPage",
120
+ name: o ?? e,
121
+ description: i,
122
+ url: s
123
+ }
124
+ };
125
+ }
126
+ function W(t) {
127
+ const { title: e, description: i, config: a, locale: n, routePath: l } = t, o = d(a.siteUrl, l);
128
+ return {
129
+ title: e,
130
+ description: i,
131
+ canonical: o,
132
+ htmlLang: n,
133
+ hreflang: L(l, a),
134
+ og: {
135
+ title: a.siteName,
136
+ description: i,
137
+ type: "website",
138
+ url: o,
139
+ siteName: a.siteName
140
+ },
141
+ twitter: {
142
+ card: "summary",
143
+ title: a.siteName,
144
+ description: i
145
+ },
146
+ jsonLd: {
147
+ "@context": "https://schema.org",
148
+ "@type": "WebSite",
149
+ name: a.siteName,
150
+ url: o,
151
+ potentialAction: {
152
+ "@type": "SearchAction",
153
+ target: `${a.siteUrl}/search?q={search_term_string}`,
154
+ "query-input": "required name=search_term_string"
155
+ }
156
+ }
157
+ };
158
+ }
159
+ export {
160
+ C as buildArticleSeo,
161
+ W as buildHomeSeo,
162
+ M as buildListPageSeo,
163
+ S as localizedHref,
164
+ d as pageUrl,
165
+ v as stripLocalePrefix
166
+ };