@commonpub/layer 0.8.0 → 0.8.1
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.
|
@@ -358,6 +358,21 @@ const canvasMaxWidth = computed(() => {
|
|
|
358
358
|
<textarea class="cpub-ep-textarea" rows="3" :value="metadata.description as string" placeholder="Brief description shown in feed previews..." @input="updateMeta('description', ($event.target as HTMLTextAreaElement).value)" />
|
|
359
359
|
<span class="cpub-ep-hint cpub-ep-hint-right">{{ ((metadata.description as string) || '').length }} / 300</span>
|
|
360
360
|
</div>
|
|
361
|
+
<div class="cpub-ep-field">
|
|
362
|
+
<label class="cpub-ep-flabel">Category</label>
|
|
363
|
+
<select class="cpub-ep-select" :value="metadata.category || ''" @change="updateMeta('category', ($event.target as HTMLSelectElement).value)">
|
|
364
|
+
<option value="">Select category</option>
|
|
365
|
+
<option value="article">Article</option>
|
|
366
|
+
<option value="blog">Blog Post</option>
|
|
367
|
+
<option value="tutorial">Tutorial</option>
|
|
368
|
+
<option value="deep-dive">Deep Dive</option>
|
|
369
|
+
<option value="opinion">Opinion</option>
|
|
370
|
+
<option value="hardware">Hardware & Makers</option>
|
|
371
|
+
<option value="software">Software</option>
|
|
372
|
+
<option value="ai-ml">AI & Machine Learning</option>
|
|
373
|
+
<option value="homelab">Home Lab</option>
|
|
374
|
+
</select>
|
|
375
|
+
</div>
|
|
361
376
|
<div class="cpub-ae-cover" :class="{ 'has-image': !!coverImageUrl }">
|
|
362
377
|
<template v-if="coverImageUrl">
|
|
363
378
|
<img :src="coverImageUrl" alt="Cover image" class="cpub-ae-cover-img" />
|
|
@@ -429,21 +444,6 @@ const canvasMaxWidth = computed(() => {
|
|
|
429
444
|
<label class="cpub-ep-flabel">Visibility</label>
|
|
430
445
|
<EditorVisibility :model-value="visibility" @update:model-value="onVisibilityUpdate" />
|
|
431
446
|
</div>
|
|
432
|
-
<div class="cpub-ep-field">
|
|
433
|
-
<label class="cpub-ep-flabel">Category</label>
|
|
434
|
-
<select class="cpub-ep-select" :value="metadata.category || ''" @change="updateMeta('category', ($event.target as HTMLSelectElement).value)">
|
|
435
|
-
<option value="">Select category</option>
|
|
436
|
-
<option value="article">Article</option>
|
|
437
|
-
<option value="blog">Blog Post</option>
|
|
438
|
-
<option value="tutorial">Tutorial</option>
|
|
439
|
-
<option value="deep-dive">Deep Dive</option>
|
|
440
|
-
<option value="opinion">Opinion</option>
|
|
441
|
-
<option value="hardware">Hardware & Makers</option>
|
|
442
|
-
<option value="software">Software</option>
|
|
443
|
-
<option value="ai-ml">AI & Machine Learning</option>
|
|
444
|
-
<option value="homelab">Home Lab</option>
|
|
445
|
-
</select>
|
|
446
|
-
</div>
|
|
447
447
|
<div class="cpub-ep-field">
|
|
448
448
|
<label class="cpub-ep-flabel">Tags</label>
|
|
449
449
|
<EditorTagInput :tags="tags" @update:tags="onTagsUpdate" />
|
|
@@ -30,11 +30,14 @@ const tocHeadings = computed(() => {
|
|
|
30
30
|
const block = b as [string, Record<string, unknown>];
|
|
31
31
|
return block[0] === 'heading';
|
|
32
32
|
})
|
|
33
|
-
.map((b: unknown
|
|
33
|
+
.map((b: unknown) => {
|
|
34
34
|
const block = b as [string, Record<string, unknown>];
|
|
35
|
+
const text = (block[1].text as string) || 'Untitled';
|
|
36
|
+
// Must match BlockHeadingView's slug generation
|
|
37
|
+
const slug = text.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-|-$/g, '');
|
|
35
38
|
return {
|
|
36
|
-
id:
|
|
37
|
-
text
|
|
39
|
+
id: slug,
|
|
40
|
+
text,
|
|
38
41
|
level: (block[1].level as number) || 2,
|
|
39
42
|
};
|
|
40
43
|
});
|
|
@@ -298,21 +301,18 @@ useJsonLd({
|
|
|
298
301
|
|
|
299
302
|
<style scoped>
|
|
300
303
|
/* ── TOC SIDEBAR ── */
|
|
301
|
-
.cpub-article-
|
|
304
|
+
.cpub-article-body-layout {
|
|
302
305
|
display: none;
|
|
303
306
|
}
|
|
304
307
|
@media (min-width: 1200px) {
|
|
305
308
|
.cpub-article-body-layout {
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
+
display: block;
|
|
310
|
+
position: absolute;
|
|
311
|
+
left: calc(100% + 32px);
|
|
312
|
+
top: 0;
|
|
309
313
|
width: 200px;
|
|
310
|
-
z-index: 10;
|
|
311
|
-
pointer-events: none;
|
|
312
314
|
}
|
|
313
315
|
.cpub-article-toc-sidebar {
|
|
314
|
-
display: block;
|
|
315
|
-
pointer-events: auto;
|
|
316
316
|
position: sticky;
|
|
317
317
|
top: 80px;
|
|
318
318
|
}
|
|
@@ -379,6 +379,7 @@ useJsonLd({
|
|
|
379
379
|
max-width: 720px;
|
|
380
380
|
margin: 0 auto;
|
|
381
381
|
padding: 40px clamp(12px, 4vw, 24px) 80px;
|
|
382
|
+
position: relative;
|
|
382
383
|
}
|
|
383
384
|
|
|
384
385
|
/* ── TYPE BADGE ── */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commonpub/layer",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./nuxt.config.ts",
|
|
6
6
|
"files": [
|
|
@@ -51,12 +51,12 @@
|
|
|
51
51
|
"vue-router": "^4.3.0",
|
|
52
52
|
"zod": "^4.3.6",
|
|
53
53
|
"@commonpub/auth": "0.5.0",
|
|
54
|
+
"@commonpub/docs": "0.6.2",
|
|
54
55
|
"@commonpub/editor": "0.7.9",
|
|
55
|
-
"@commonpub/
|
|
56
|
+
"@commonpub/schema": "0.9.6",
|
|
56
57
|
"@commonpub/config": "0.9.1",
|
|
57
|
-
"@commonpub/docs": "0.6.2",
|
|
58
58
|
"@commonpub/protocol": "0.9.8",
|
|
59
|
-
"@commonpub/
|
|
59
|
+
"@commonpub/learning": "0.5.0",
|
|
60
60
|
"@commonpub/ui": "0.8.5",
|
|
61
61
|
"@commonpub/server": "2.28.0",
|
|
62
62
|
"@commonpub/explainer": "0.7.10"
|