@sewadah/selaras-docs 1.4.3 → 1.4.4

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## v1.4.4
4
+
5
+ [compare changes](https://github.com/sewadahapp/selaras/compare/selaras-docs-v1.4.3...selaras-docs-v1.4.4)
6
+
7
+ ### 🩹 Fixes
8
+
9
+ - **fix(docs):** preserve language popover anchor after hydration ([1b83dd3](https://github.com/sewadahapp/selaras/commit/1b83dd35a2a1354e840a0377572351fe0eb61659))
10
+
11
+ ### 🤖 Other changes
12
+
13
+ - Merge pull request #39 from sewadahapp/fix/docs-language-popover-anchor ([5efa87a](https://github.com/sewadahapp/selaras/commit/5efa87ad5019d7a4c27888f35d83bf0420d4dadf))
14
+
15
+ Published against `@sewadah/selaras` ^1.3.0.
16
+
3
17
  ## v1.4.3
4
18
 
5
19
  [compare changes](https://github.com/sewadahapp/selaras/compare/selaras-docs-v1.4.2...selaras-docs-v1.4.3)
@@ -5,7 +5,8 @@ const { locale, locales, localeOption, hasLocaleSwitching, setLocale } = useDocs
5
5
  const messages = useDocsMessages()
6
6
  const open = ref(false)
7
7
  // A root locale redirect can hydrate a different locale than the prerendered
8
- // trigger. Replace that trigger after hydration so its icon and label match.
8
+ // trigger. Refresh the popover with its trigger so the icon and label match
9
+ // and its positioning anchor references the newly mounted button.
9
10
  const hydrated = ref(false)
10
11
  onMounted(() => {
11
12
  hydrated.value = true
@@ -16,9 +17,8 @@ const label = computed(() => formatDocsMessage(messages.value.languageSwitcher,
16
17
  </script>
17
18
 
18
19
  <template>
19
- <SPopover v-if="hasLocaleSwitching" v-model:open="open" :positioning="{ side: 'bottom', align: 'end', sideOffset: 8 }" :ui="{ content: 'p-2' }">
20
+ <SPopover v-if="hasLocaleSwitching" :key="String(hydrated)" v-model:open="open" :positioning="{ side: 'bottom', align: 'end', sideOffset: 8 }" :ui="{ content: 'p-2' }">
20
21
  <SButton
21
- :key="String(hydrated)"
22
22
  variant="ghost"
23
23
  color="neutral"
24
24
  square
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sewadah/selaras-docs",
3
3
  "type": "module",
4
- "version": "1.4.3",
4
+ "version": "1.4.4",
5
5
  "description": "Nuxt Content documentation layer for Selaras",
6
6
  "repository": {
7
7
  "type": "git",