@kernhq/module-quire 0.7.2 → 0.7.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kernhq/module-quire",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
4
4
  "description": "Kern Quire: collaborative documents, spaces and page trees",
5
5
  "homepage": "https://github.com/KernAIO/module-quire#readme",
6
6
  "license": "AGPL-3.0-only",
@@ -27,9 +27,20 @@ import PageTreeRow from './PageTreeRow.svelte'
27
27
  const api = getQuireApi()
28
28
  const client = useQueryClient()
29
29
 
30
- const workspaceSlug = $derived(navigation.workspaceSlug)
31
- const workspace = $derived(session.workspaces.find((w) => w.slug === workspaceSlug))
32
- const workspaceId = $derived(workspace?.id ?? '')
30
+ /**
31
+ * The shell passes these `SidebarProps` — and they are the ones to use.
32
+ *
33
+ * Reading `navigation` here instead looks equivalent and is not: the shell fills that singleton
34
+ * from an `$effect`, which runs *after* the first render, so the sidebar's first paint would query
35
+ * with an empty workspace id and show nothing.
36
+ */
37
+ interface Props {
38
+ workspaceId: string
39
+ workspaceSlug: string
40
+ pathname: string
41
+ segment: string
42
+ }
43
+ const { workspaceId, workspaceSlug }: Props = $props()
33
44
 
34
45
  const spaceKeyInUrl = $derived(navigation.params.space ?? null)
35
46
  const activePageId = $derived(navigation.params.page ?? null)