@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,375 @@
1
+ import { trackFocusVisible as v } from "../../focus-visible/dist/index.js";
2
+ import { getPlacement as p } from "../../popper/dist/get-placement.js";
3
+ import { getActiveTriggerEl as s, getPositionerEl as d } from "./tooltip.dom.js";
4
+ import { store as l } from "./tooltip.store.js";
5
+ import { getOverflowAncestors as m } from "../../dom-query/dist/overflow.js";
6
+ import { createMachine as f, createGuards as k } from "../../core/dist/create-machine.js";
7
+ import { addDomEvent as u, isComposingEvent as P } from "../../dom-query/dist/event.js";
8
+ import { ensureProps as V } from "../../utils/dist/warning.js";
9
+ var { and: C, not: O } = k(), S = f({
10
+ initialState: ({ prop: e }) => e("open") || e("defaultOpen") ? "open" : "closed",
11
+ props({ props: e }) {
12
+ V(e, ["id"]);
13
+ const t = e.closeOnClick ?? !0, o = e.closeOnPointerDown ?? t;
14
+ return {
15
+ openDelay: 400,
16
+ closeDelay: 150,
17
+ closeOnEscape: !0,
18
+ interactive: !1,
19
+ closeOnScroll: !0,
20
+ disabled: !1,
21
+ ...e,
22
+ closeOnPointerDown: o,
23
+ closeOnClick: t,
24
+ positioning: {
25
+ placement: "bottom",
26
+ ...e.positioning
27
+ }
28
+ };
29
+ },
30
+ effects: ["trackFocusVisible", "trackStore"],
31
+ context: ({ bindable: e, prop: t, scope: o }) => ({
32
+ currentPlacement: e(() => ({ defaultValue: void 0 })),
33
+ hasPointerMoveOpened: e(() => ({ defaultValue: null })),
34
+ triggerValue: e(() => ({
35
+ defaultValue: t("defaultTriggerValue") ?? null,
36
+ value: t("triggerValue"),
37
+ onChange(n) {
38
+ const r = t("onTriggerValueChange");
39
+ if (!r) return;
40
+ const i = s(o, n);
41
+ r({ value: n, triggerElement: i });
42
+ }
43
+ }))
44
+ }),
45
+ watch({ track: e, action: t, prop: o }) {
46
+ e([() => o("disabled")], () => {
47
+ t(["closeIfDisabled"]);
48
+ }), e([() => o("open")], () => {
49
+ t(["toggleVisibility"]);
50
+ }), e([() => o("triggerValue")], () => {
51
+ t(["repositionImmediate"]);
52
+ });
53
+ },
54
+ on: {
55
+ "triggerValue.set": {
56
+ actions: ["setTriggerValue", "repositionImmediate"]
57
+ }
58
+ },
59
+ states: {
60
+ closed: {
61
+ entry: ["clearGlobalId"],
62
+ on: {
63
+ "controlled.open": {
64
+ target: "open"
65
+ },
66
+ open: [
67
+ {
68
+ guard: "isOpenControlled",
69
+ actions: ["setTriggerValue", "invokeOnOpen"]
70
+ },
71
+ {
72
+ target: "open",
73
+ actions: ["setTriggerValue", "invokeOnOpen"]
74
+ }
75
+ ],
76
+ "pointer.leave": {
77
+ actions: ["clearPointerMoveOpened"]
78
+ },
79
+ "pointer.move": [
80
+ {
81
+ guard: C("noVisibleTooltip", O("hasPointerMoveOpened")),
82
+ target: "opening",
83
+ actions: ["setTriggerValue"]
84
+ },
85
+ {
86
+ guard: O("hasPointerMoveOpened"),
87
+ target: "open",
88
+ actions: ["setPointerMoveOpened", "invokeOnOpen", "setTriggerValue"]
89
+ }
90
+ ]
91
+ }
92
+ },
93
+ opening: {
94
+ effects: ["trackScroll", "trackPointerlockChange", "waitForOpenDelay"],
95
+ on: {
96
+ "after.openDelay": [
97
+ {
98
+ guard: "isOpenControlled",
99
+ actions: ["setPointerMoveOpened", "invokeOnOpen"]
100
+ },
101
+ {
102
+ target: "open",
103
+ actions: ["setPointerMoveOpened", "invokeOnOpen"]
104
+ }
105
+ ],
106
+ "controlled.open": {
107
+ target: "open"
108
+ },
109
+ "controlled.close": {
110
+ target: "closed"
111
+ },
112
+ open: [
113
+ {
114
+ guard: "isOpenControlled",
115
+ actions: ["setTriggerValue", "invokeOnOpen"]
116
+ },
117
+ {
118
+ target: "open",
119
+ actions: ["setTriggerValue", "invokeOnOpen"]
120
+ }
121
+ ],
122
+ "pointer.leave": [
123
+ {
124
+ guard: "isOpenControlled",
125
+ // We trigger toggleVisibility manually since the `ctx.open` has not changed yet (at this point)
126
+ actions: ["clearPointerMoveOpened", "invokeOnClose", "toggleVisibility"]
127
+ },
128
+ {
129
+ target: "closed",
130
+ actions: ["clearPointerMoveOpened", "invokeOnClose"]
131
+ }
132
+ ],
133
+ close: [
134
+ {
135
+ guard: "isOpenControlled",
136
+ // We trigger toggleVisibility manually since the `ctx.open` has not changed yet (at this point)
137
+ actions: ["invokeOnClose", "toggleVisibility"]
138
+ },
139
+ {
140
+ target: "closed",
141
+ actions: ["invokeOnClose"]
142
+ }
143
+ ]
144
+ }
145
+ },
146
+ open: {
147
+ effects: ["trackEscapeKey", "trackScroll", "trackPointerlockChange", "trackPositioning"],
148
+ entry: ["setGlobalId"],
149
+ on: {
150
+ "controlled.close": {
151
+ target: "closed"
152
+ },
153
+ close: [
154
+ {
155
+ guard: "isOpenControlled",
156
+ actions: ["invokeOnClose"]
157
+ },
158
+ {
159
+ target: "closed",
160
+ actions: ["invokeOnClose"]
161
+ }
162
+ ],
163
+ "pointer.leave": [
164
+ {
165
+ guard: "isVisible",
166
+ target: "closing",
167
+ actions: ["clearPointerMoveOpened"]
168
+ },
169
+ // == group ==
170
+ {
171
+ guard: "isOpenControlled",
172
+ actions: ["clearPointerMoveOpened", "invokeOnClose"]
173
+ },
174
+ {
175
+ target: "closed",
176
+ actions: ["clearPointerMoveOpened", "invokeOnClose"]
177
+ }
178
+ ],
179
+ "content.pointer.leave": {
180
+ guard: "isInteractive",
181
+ target: "closing"
182
+ },
183
+ "positioning.set": {
184
+ actions: ["reposition"]
185
+ },
186
+ "triggerValue.set": {
187
+ // Transition to closing (which cleans up trackPositioning) then immediately back to open
188
+ // This re-creates the positioning effect with the new trigger
189
+ target: "closing",
190
+ actions: ["setTriggerValue", "immediateReopen"]
191
+ }
192
+ }
193
+ },
194
+ closing: {
195
+ effects: ["trackPositioning", "waitForCloseDelay"],
196
+ on: {
197
+ "after.closeDelay": [
198
+ {
199
+ guard: "isOpenControlled",
200
+ actions: ["invokeOnClose"]
201
+ },
202
+ {
203
+ target: "closed",
204
+ actions: ["invokeOnClose"]
205
+ }
206
+ ],
207
+ "controlled.close": {
208
+ target: "closed"
209
+ },
210
+ "controlled.open": {
211
+ target: "open"
212
+ },
213
+ close: [
214
+ {
215
+ guard: "isOpenControlled",
216
+ actions: ["invokeOnClose"]
217
+ },
218
+ {
219
+ target: "closed",
220
+ actions: ["invokeOnClose"]
221
+ }
222
+ ],
223
+ "pointer.move": [
224
+ {
225
+ guard: "isOpenControlled",
226
+ // We trigger toggleVisibility manually since the `ctx.open` has not changed yet (at this point)
227
+ actions: ["setPointerMoveOpened", "setTriggerValue", "invokeOnOpen", "toggleVisibility"]
228
+ },
229
+ {
230
+ target: "open",
231
+ actions: ["setPointerMoveOpened", "setTriggerValue", "invokeOnOpen"]
232
+ }
233
+ ],
234
+ "triggerValue.set": {
235
+ target: "open",
236
+ actions: ["setTriggerValue", "repositionImmediate"]
237
+ },
238
+ reopen: {
239
+ target: "open"
240
+ },
241
+ "content.pointer.move": {
242
+ guard: "isInteractive",
243
+ target: "open"
244
+ },
245
+ "positioning.set": {
246
+ actions: ["reposition"]
247
+ }
248
+ }
249
+ }
250
+ },
251
+ implementations: {
252
+ guards: {
253
+ noVisibleTooltip: () => l.get("id") === null,
254
+ isVisible: ({ prop: e }) => e("id") === l.get("id"),
255
+ isInteractive: ({ prop: e }) => !!e("interactive"),
256
+ hasPointerMoveOpened: ({ context: e }) => !!e.get("hasPointerMoveOpened"),
257
+ isOpenControlled: ({ prop: e }) => e("open") !== void 0
258
+ },
259
+ actions: {
260
+ setGlobalId: ({ prop: e }) => {
261
+ const t = l.get("id"), o = t !== null && t !== e("id");
262
+ l.update({ id: e("id"), prevId: o ? t : null, instant: o });
263
+ },
264
+ clearGlobalId: ({ prop: e }) => {
265
+ e("id") === l.get("id") && l.update({ id: null, prevId: null, instant: !1 });
266
+ },
267
+ invokeOnOpen: ({ prop: e }) => {
268
+ e("onOpenChange")?.({ open: !0 });
269
+ },
270
+ invokeOnClose: ({ prop: e }) => {
271
+ e("onOpenChange")?.({ open: !1 });
272
+ },
273
+ closeIfDisabled: ({ prop: e, send: t }) => {
274
+ e("disabled") && t({ type: "close", src: "disabled.change" });
275
+ },
276
+ reposition: ({ context: e, event: t, prop: o, scope: n }) => {
277
+ if (t.type !== "positioning.set") return;
278
+ p(() => s(n, e.get("triggerValue")), () => d(n), {
279
+ ...o("positioning"),
280
+ ...t.options,
281
+ listeners: !1,
282
+ onComplete(a) {
283
+ e.set("currentPlacement", a.placement);
284
+ }
285
+ });
286
+ },
287
+ repositionImmediate: ({ context: e, event: t, prop: o, scope: n }) => {
288
+ const r = t.value ?? e.get("triggerValue");
289
+ return p(() => s(n, r), () => d(n), {
290
+ ...o("positioning"),
291
+ onComplete(c) {
292
+ e.set("currentPlacement", c.placement);
293
+ }
294
+ });
295
+ },
296
+ toggleVisibility: ({ prop: e, event: t, send: o }) => {
297
+ queueMicrotask(() => {
298
+ o({
299
+ type: e("open") ? "controlled.open" : "controlled.close",
300
+ previousEvent: t
301
+ });
302
+ });
303
+ },
304
+ setPointerMoveOpened: ({ context: e, event: t }) => {
305
+ const o = t.triggerId ?? t.previousEvent?.triggerId;
306
+ e.set("hasPointerMoveOpened", o ?? null);
307
+ },
308
+ clearPointerMoveOpened: ({ context: e }) => {
309
+ e.set("hasPointerMoveOpened", null);
310
+ },
311
+ setTriggerValue: ({ context: e, event: t }) => {
312
+ t.value !== void 0 && e.set("triggerValue", t.value);
313
+ },
314
+ immediateReopen: ({ send: e }) => {
315
+ queueMicrotask(() => {
316
+ e({ type: "reopen" });
317
+ });
318
+ }
319
+ },
320
+ effects: {
321
+ trackFocusVisible: ({ scope: e }) => v({ root: e.getRootNode?.() }),
322
+ trackPositioning: ({ context: e, prop: t, scope: o }) => (e.get("currentPlacement") || e.set("currentPlacement", t("positioning").placement), p(() => s(o, e.get("triggerValue")), () => d(o), {
323
+ ...t("positioning"),
324
+ defer: !0,
325
+ onComplete(i) {
326
+ e.set("currentPlacement", i.placement);
327
+ }
328
+ })),
329
+ trackPointerlockChange: ({ send: e, scope: t }) => {
330
+ const o = t.getDoc();
331
+ return u(o, "pointerlockchange", () => e({ type: "close", src: "pointerlock:change" }), !1);
332
+ },
333
+ trackScroll: ({ send: e, prop: t, scope: o, context: n }) => {
334
+ if (!t("closeOnScroll")) return;
335
+ const r = n.get("triggerValue"), i = s(o, r);
336
+ if (!i) return;
337
+ const c = m(i).map((g) => u(g, "scroll", () => {
338
+ e({ type: "close", src: "scroll" });
339
+ }, {
340
+ passive: !0,
341
+ capture: !0
342
+ }));
343
+ return () => {
344
+ c.forEach((g) => g?.());
345
+ };
346
+ },
347
+ trackStore: ({ prop: e, send: t }) => {
348
+ let o;
349
+ return queueMicrotask(() => {
350
+ o = l.subscribe(() => {
351
+ l.get("id") !== e("id") && t({ type: "close", src: "id.change" });
352
+ });
353
+ }), () => o?.();
354
+ },
355
+ trackEscapeKey: ({ send: e, prop: t }) => t("closeOnEscape") ? u(document, "keydown", (n) => {
356
+ P(n) || n.key === "Escape" && (n.stopPropagation(), e({ type: "close", src: "keydown.escape" }));
357
+ }, !0) : void 0,
358
+ waitForOpenDelay: ({ send: e, prop: t, event: o }) => {
359
+ const n = setTimeout(() => {
360
+ e({ type: "after.openDelay", previousEvent: o });
361
+ }, t("openDelay"));
362
+ return () => clearTimeout(n);
363
+ },
364
+ waitForCloseDelay: ({ send: e, prop: t, event: o }) => {
365
+ const n = setTimeout(() => {
366
+ e({ type: "after.closeDelay", previousEvent: o });
367
+ }, t("closeDelay"));
368
+ return () => clearTimeout(n);
369
+ }
370
+ }
371
+ }
372
+ });
373
+ export {
374
+ S as machine
375
+ };
@@ -0,0 +1,9 @@
1
+ import { createStore as r } from "../../utils/dist/store.js";
2
+ var t = r({
3
+ id: null,
4
+ prevId: null,
5
+ instant: !1
6
+ });
7
+ export {
8
+ t as store
9
+ };
@@ -0,0 +1,10 @@
1
+ function u(e) {
2
+ return new Proxy({}, {
3
+ get(n, r) {
4
+ return r === "style" ? (t) => e({ style: t }).style : e;
5
+ }
6
+ });
7
+ }
8
+ export {
9
+ u as createNormalizer
10
+ };
@@ -0,0 +1,6 @@
1
+ function n(r) {
2
+ return r == null ? [] : Array.isArray(r) ? r : [r];
3
+ }
4
+ export {
5
+ n as toArray
6
+ };
@@ -0,0 +1,27 @@
1
+ var u = (e) => e?.constructor.name === "Array", o = (e, r) => {
2
+ if (e.length !== r.length) return !1;
3
+ for (let t = 0; t < e.length; t++)
4
+ if (!i(e[t], r[t])) return !1;
5
+ return !0;
6
+ }, i = (e, r) => {
7
+ if (Object.is(e, r)) return !0;
8
+ if (e == null && r != null || e != null && r == null) return !1;
9
+ if (typeof e?.isEqual == "function" && typeof r?.isEqual == "function")
10
+ return e.isEqual(r);
11
+ if (typeof e == "function" && typeof r == "function")
12
+ return e.toString() === r.toString();
13
+ if (u(e) && u(r))
14
+ return o(Array.from(e), Array.from(r));
15
+ if (typeof e != "object" || typeof r != "object") return !1;
16
+ const t = Object.keys(r ?? /* @__PURE__ */ Object.create(null)), l = t.length;
17
+ for (let n = 0; n < l; n++)
18
+ if (!Reflect.has(e, t[n])) return !1;
19
+ for (let n = 0; n < l; n++) {
20
+ const f = t[n];
21
+ if (!i(e[f], r[f])) return !1;
22
+ }
23
+ return !0;
24
+ };
25
+ export {
26
+ i as isEqual
27
+ };
@@ -0,0 +1,10 @@
1
+ var r = () => {
2
+ }, c = (...o) => (...a) => {
3
+ o.forEach(function(l) {
4
+ l?.(...a);
5
+ });
6
+ };
7
+ export {
8
+ c as callAll,
9
+ r as noop
10
+ };
@@ -0,0 +1,15 @@
1
+ var n = (t) => t != null && typeof t == "object", u = (t) => typeof t == "string", f = (t) => typeof t == "function", b = (t) => t == null, c = (t, e) => Object.prototype.hasOwnProperty.call(t, e), i = (t) => Object.prototype.toString.call(t), r = Function.prototype.toString, a = r.call(Object), j = (t) => {
2
+ if (!n(t) || i(t) != "[object Object]" || s(t)) return !1;
3
+ const e = Object.getPrototypeOf(t);
4
+ if (e === null) return !0;
5
+ const o = c(e, "constructor") && e.constructor;
6
+ return typeof o == "function" && o instanceof o && r.call(o) == a;
7
+ }, l = (t) => typeof t == "object" && t !== null && "$$typeof" in t && "props" in t, p = (t) => typeof t == "object" && t !== null && "__v_isVNode" in t, s = (t) => l(t) || p(t);
8
+ export {
9
+ c as hasProp,
10
+ f as isFunction,
11
+ b as isNull,
12
+ n as isObjectLike,
13
+ j as isPlainObject,
14
+ u as isString
15
+ };
@@ -0,0 +1,13 @@
1
+ import { isPlainObject as r } from "./guard.js";
2
+ function f(t) {
3
+ if (!r(t) || t === void 0) return t;
4
+ const o = Reflect.ownKeys(t).filter((e) => typeof e == "string"), i = {};
5
+ for (const e of o) {
6
+ const n = t[e];
7
+ n !== void 0 && (i[e] = f(n));
8
+ }
9
+ return i;
10
+ }
11
+ export {
12
+ f as compact
13
+ };
@@ -0,0 +1,25 @@
1
+ function b(i, r = Object.is) {
2
+ let e = { ...i };
3
+ const n = /* @__PURE__ */ new Set(), u = (t) => (n.add(t), () => n.delete(t)), a = () => {
4
+ n.forEach((t) => t());
5
+ };
6
+ return {
7
+ subscribe: u,
8
+ get: (t) => e[t],
9
+ set: (t, s) => {
10
+ r(e[t], s) || (e[t] = s, a());
11
+ },
12
+ update: (t) => {
13
+ let s = !1;
14
+ for (const o in t) {
15
+ const c = t[o];
16
+ c !== void 0 && !r(e[o], c) && (e[o] = c, s = !0);
17
+ }
18
+ s && a();
19
+ },
20
+ snapshot: () => ({ ...e })
21
+ };
22
+ }
23
+ export {
24
+ b as createStore
25
+ };
@@ -0,0 +1,25 @@
1
+ function s(...n) {
2
+ const o = n.length === 1 ? n[0] : n[1];
3
+ (n.length === 2 ? n[0] : !0) && process.env.NODE_ENV !== "production" && console.warn(o);
4
+ }
5
+ function c(...n) {
6
+ const o = n.length === 1 ? n[0] : n[1];
7
+ if ((n.length === 2 ? n[0] : !0) && process.env.NODE_ENV !== "production")
8
+ throw new Error(o);
9
+ }
10
+ function i(n, o) {
11
+ if (n == null) throw new Error(o());
12
+ }
13
+ function u(n, o, e) {
14
+ let r = [];
15
+ for (const t of o)
16
+ n[t] == null && r.push(t);
17
+ if (r.length > 0)
18
+ throw new Error(`[zag-js] missing required props: ${r.join(", ")}`);
19
+ }
20
+ export {
21
+ i as ensure,
22
+ u as ensureProps,
23
+ c as invariant,
24
+ s as warn
25
+ };
@@ -0,0 +1,37 @@
1
+ import { shallowRef as v, computed as d, onUnmounted as g } from "vue";
2
+ import { isFunction as b } from "../../utils/dist/guard.js";
3
+ function c(e) {
4
+ const u = e().defaultValue ?? e().value, o = e().isEqual ?? Object.is, l = v(u), a = d(() => e().value !== void 0), f = v(a.value ? e().value : l.value);
5
+ return {
6
+ initial: u,
7
+ ref: f,
8
+ get() {
9
+ return a.value ? e().value : l.value;
10
+ },
11
+ set(n) {
12
+ const t = a.value ? e().value : l.value, i = b(n) ? n(t) : n;
13
+ e().debug && console.log(`[bindable > ${e().debug}] setValue`, { next: i, prev: t }), a.value || (l.value = i), o(i, t) || e().onChange?.(i, t);
14
+ },
15
+ invoke(n, t) {
16
+ e().onChange?.(n, t);
17
+ },
18
+ hash(n) {
19
+ return e().hash?.(n) ?? String(n);
20
+ }
21
+ };
22
+ }
23
+ c.cleanup = (e) => {
24
+ g(() => e());
25
+ };
26
+ c.ref = (e) => {
27
+ let u = e;
28
+ return {
29
+ get: () => u,
30
+ set: (o) => {
31
+ u = o;
32
+ }
33
+ };
34
+ };
35
+ export {
36
+ c as bindable
37
+ };