@commonpub/layer 0.35.0 → 0.36.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commonpub/layer",
3
- "version": "0.35.0",
3
+ "version": "0.36.0",
4
4
  "type": "module",
5
5
  "main": "./nuxt.config.ts",
6
6
  "files": [
@@ -54,13 +54,13 @@
54
54
  "vue-router": "^4.3.0",
55
55
  "zod": "^4.3.6",
56
56
  "@commonpub/auth": "0.7.0",
57
- "@commonpub/docs": "0.6.3",
58
- "@commonpub/editor": "0.7.11",
59
57
  "@commonpub/config": "0.16.0",
58
+ "@commonpub/editor": "0.7.11",
59
+ "@commonpub/docs": "0.6.3",
60
60
  "@commonpub/explainer": "0.7.15",
61
- "@commonpub/protocol": "0.12.0",
62
61
  "@commonpub/learning": "0.5.2",
63
62
  "@commonpub/schema": "0.24.0",
63
+ "@commonpub/protocol": "0.12.0",
64
64
  "@commonpub/server": "2.66.0",
65
65
  "@commonpub/ui": "0.9.1"
66
66
  },
@@ -117,9 +117,13 @@ const submitDialogRef = ref<HTMLElement | null>(null);
117
117
  useFocusTrap(submitDialogRef, () => showSubmitDialog.value, () => { showSubmitDialog.value = false; });
118
118
  const submitContentId = ref('');
119
119
  const submitting = ref(false);
120
+ // MY own published content only — was fetching everyone's public content (the
121
+ // picker listed other people's projects, which submitContestEntry then rejects
122
+ // since you can only enter your own). authorId === me ⇒ the endpoint scopes to mine.
120
123
  const { data: userContent } = useFetch('/api/content', {
121
- query: { status: 'published', limit: 50 },
122
- immediate: isAuthenticated.value,
124
+ query: computed(() => ({ status: 'published', authorId: user.value?.id, limit: 50 })),
125
+ immediate: !!user.value?.id,
126
+ watch: [() => user.value?.id],
123
127
  });
124
128
  const enteredContentIds = computed(() => new Set(entries.value.map((e) => e.contentId)));
125
129