@commonpub/layer 0.4.10 → 0.4.11

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.
@@ -10,14 +10,14 @@ const props = defineProps<{
10
10
  federatedId?: string;
11
11
  }>();
12
12
 
13
- // Detect V2 ExplainerDocument format vs legacy BlockTuple[] format
14
- const isV2Format = computed(() => isExplainerDocument(props.content?.content));
15
- const v2Document = computed<ExplainerDocument | null>(() =>
16
- isV2Format.value ? (props.content.content as unknown as ExplainerDocument) : null,
13
+ // Check if content is the new ExplainerDocument format
14
+ const isDocumentFormat = computed(() => isExplainerDocument(props.content?.content));
15
+ const explainerDoc = computed<ExplainerDocument | null>(() =>
16
+ isDocumentFormat.value ? (props.content.content as unknown as ExplainerDocument) : null,
17
17
  );
18
18
 
19
19
  const blocks = computed<BlockTuple[]>(() => {
20
- if (isV2Format.value) return []; // V2 uses its own viewer
20
+ if (isDocumentFormat.value) return [];
21
21
  const raw = props.content?.content;
22
22
  if (!Array.isArray(raw)) return [];
23
23
  return raw as BlockTuple[];
@@ -164,10 +164,10 @@ onUnmounted(() => { document.removeEventListener('keydown', onKeydown); });
164
164
  </script>
165
165
 
166
166
  <template>
167
- <!-- V2 Scroll Viewer for ExplainerDocument format -->
168
- <ScrollViewer v-if="isV2Format && v2Document" :document="v2Document" />
167
+ <!-- Scroll viewer for ExplainerDocument format -->
168
+ <ScrollViewer v-if="isDocumentFormat && explainerDoc" :document="explainerDoc" />
169
169
 
170
- <!-- Legacy slide-deck viewer for BlockTuple[] format -->
170
+ <!-- Block-based viewer fallback -->
171
171
  <div v-else class="cpub-explainer-view">
172
172
  <!-- PROGRESS BAR -->
173
173
  <div class="cpub-progress-line">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commonpub/layer",
3
- "version": "0.4.10",
3
+ "version": "0.4.11",
4
4
  "type": "module",
5
5
  "main": "./nuxt.config.ts",
6
6
  "files": [
@@ -50,16 +50,16 @@
50
50
  "vue": "^3.4.0",
51
51
  "vue-router": "^4.3.0",
52
52
  "zod": "^4.3.6",
53
- "@commonpub/docs": "0.5.2",
54
53
  "@commonpub/auth": "0.5.0",
55
- "@commonpub/config": "0.8.0",
56
54
  "@commonpub/editor": "0.5.0",
57
- "@commonpub/server": "2.22.1",
58
- "@commonpub/explainer": "0.5.3",
59
55
  "@commonpub/learning": "0.5.0",
60
- "@commonpub/protocol": "0.9.5",
61
- "@commonpub/schema": "0.8.13",
62
- "@commonpub/ui": "0.8.4"
56
+ "@commonpub/schema": "0.8.14",
57
+ "@commonpub/config": "0.8.0",
58
+ "@commonpub/explainer": "0.5.3",
59
+ "@commonpub/docs": "0.5.2",
60
+ "@commonpub/ui": "0.8.4",
61
+ "@commonpub/server": "2.23.0",
62
+ "@commonpub/protocol": "0.9.5"
63
63
  },
64
64
  "devDependencies": {
65
65
  "@testing-library/jest-dom": "^6.9.1",
@@ -170,9 +170,9 @@ async function handleSave(): Promise<void> {
170
170
  method: 'PUT',
171
171
  body: {
172
172
  ...form.value,
173
- skills: skills.value.filter((s) => s.name.trim()),
174
- socialLinks: socialLinks.value,
173
+ skills: skills.value.filter((s) => s.name.trim()).map((s) => s.name),
175
174
  experience: experience.value.filter((e) => e.title.trim()),
175
+ socialLinks: socialLinks.value,
176
176
  ...(emailNotificationsEnabled.value ? { emailNotifications: emailNotifications.value } : {}),
177
177
  },
178
178
  });