@alphacifer/slidev-addon-theme 0.0.11 → 0.0.12

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/README.md CHANGED
@@ -84,8 +84,8 @@ overrides such as `--alpha-square-pyramid-stack-1-color` and
84
84
 
85
85
  ## Core
86
86
 
87
- - Components: `Date`, `QnA`, `Quote`, `ReflectedTitle`, `Speaker`
88
- - Layouts: `arc-toc`, `bg-center`
87
+ - Components: `Date`, `MetaList`, `QnA`, `Quote`, `ReflectedTitle`, `Speaker`
88
+ - Layouts: `arc-toc`, `bg-center`, `references`
89
89
 
90
90
  ## Shifting heading
91
91
 
@@ -160,15 +160,13 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
160
160
  }
161
161
  }
162
162
 
163
- @layer alpha-theme-tokens {
164
- .alpha-table-comparison :deep(tr) {
165
- background-color: transparent;
166
- border: none;
167
- }
163
+ .alpha-table-comparison :deep(tr) {
164
+ background-color: transparent;
165
+ border: none;
166
+ }
168
167
 
169
- .alpha-table-comparison :deep(th),
170
- .alpha-table-comparison :deep(td) {
171
- border: none;
172
- }
168
+ .alpha-table-comparison :deep(th),
169
+ .alpha-table-comparison :deep(td) {
170
+ border: none;
173
171
  }
174
172
  </style>
@@ -0,0 +1,50 @@
1
+ <script setup lang="ts">
2
+ import type { PropType } from 'vue';
3
+
4
+ import { useMergedUnoAttrs } from '../../utils/useMergedUnoAttrs';
5
+
6
+ defineOptions({
7
+ inheritAttrs: false,
8
+ });
9
+
10
+ export interface IMetaListItem {
11
+ label: string;
12
+ value: string;
13
+ }
14
+
15
+ const props = defineProps({
16
+ items: {
17
+ type: Array as PropType<IMetaListItem[]>,
18
+ required: false,
19
+ default: () => [],
20
+ },
21
+ separator: {
22
+ type: String,
23
+ required: false,
24
+ default: ': ',
25
+ },
26
+ });
27
+
28
+ const { className, forwardedAttrs } = useMergedUnoAttrs(
29
+ 'alpha-meta-list flex flex-col gap-2 text-left text-xl',
30
+ );
31
+ </script>
32
+
33
+ <template>
34
+ <dl v-bind="forwardedAttrs()" :class="className()">
35
+ <slot>
36
+ <div
37
+ v-for="(item, index) in props.items"
38
+ :key="`${item.label}-${index}`"
39
+ class="alpha-meta-list__item"
40
+ >
41
+ <dt class="alpha-meta-list__label inline font-medium">
42
+ {{ item.label }}{{ props.separator }}
43
+ </dt>
44
+ <dd class="alpha-meta-list__value inline m-0">
45
+ {{ item.value }}
46
+ </dd>
47
+ </div>
48
+ </slot>
49
+ </dl>
50
+ </template>
@@ -25,8 +25,8 @@ const props = defineProps({
25
25
  });
26
26
 
27
27
  const { className, forwardedAttrs } = useMergedUnoAttrs(() => [
28
- 'alpha-speaker flex absolute bottom-3.75 right-7.5 flex-col',
29
- props.team.length ? 'text-left gap-2' : undefined,
28
+ 'alpha-speaker flex absolute bottom-3.75 right-7.5 flex-col text-left',
29
+ props.team.length ? 'gap-2' : undefined,
30
30
  ]);
31
31
  </script>
32
32
 
@@ -321,17 +321,15 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
321
321
  </template>
322
322
 
323
323
  <style scoped>
324
- @layer alpha-theme-tokens {
325
- .alpha-arc-orbit-callout :deep(p),
326
- .alpha-arc-orbit-callout :deep(h1),
327
- .alpha-arc-orbit-callout :deep(h2),
328
- .alpha-arc-orbit-callout :deep(h3),
329
- .alpha-arc-orbit-callout :deep(h4),
330
- .alpha-arc-orbit-callout :deep(h5),
331
- .alpha-arc-orbit-callout :deep(h6) {
332
- margin: 0;
333
- padding: 0;
334
- }
324
+ .alpha-arc-orbit-callout :deep(p),
325
+ .alpha-arc-orbit-callout :deep(h1),
326
+ .alpha-arc-orbit-callout :deep(h2),
327
+ .alpha-arc-orbit-callout :deep(h3),
328
+ .alpha-arc-orbit-callout :deep(h4),
329
+ .alpha-arc-orbit-callout :deep(h5),
330
+ .alpha-arc-orbit-callout :deep(h6) {
331
+ margin: 0;
332
+ padding: 0;
335
333
  }
336
334
 
337
335
  .alpha-arc-orbit-callout--animated.alpha-arc-orbit-callout--left-0 {
@@ -68,22 +68,20 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(
68
68
  </template>
69
69
 
70
70
  <style scoped>
71
- @layer alpha-theme-tokens {
72
- .alpha-square-thanks-content :deep(h1),
73
- .alpha-square-thanks-content :deep(h2),
74
- .alpha-square-thanks-content :deep(h3),
75
- .alpha-square-thanks-content :deep(h4),
76
- .alpha-square-thanks-content :deep(h5),
77
- .alpha-square-thanks-content :deep(h6),
78
- .alpha-square-thanks-content :deep(p),
79
- .alpha-square-thanks-content :deep(div) {
80
- margin: 0;
81
- padding: 0;
82
- font-family: inherit;
83
- font-size: inherit;
84
- font-weight: inherit;
85
- line-height: inherit;
86
- color: inherit;
87
- }
71
+ .alpha-square-thanks-content :deep(h1),
72
+ .alpha-square-thanks-content :deep(h2),
73
+ .alpha-square-thanks-content :deep(h3),
74
+ .alpha-square-thanks-content :deep(h4),
75
+ .alpha-square-thanks-content :deep(h5),
76
+ .alpha-square-thanks-content :deep(h6),
77
+ .alpha-square-thanks-content :deep(p),
78
+ .alpha-square-thanks-content :deep(div) {
79
+ margin: 0;
80
+ padding: 0;
81
+ font-family: inherit;
82
+ font-size: inherit;
83
+ font-weight: inherit;
84
+ line-height: inherit;
85
+ color: inherit;
88
86
  }
89
87
  </style>
@@ -226,17 +226,15 @@ const { className, forwardedAttrs } = useMergedUnoAttrs(() => {
226
226
  </template>
227
227
 
228
228
  <style scoped>
229
- @layer alpha-theme-tokens {
230
- .alpha-rectangle-orbit-tetrad-callout :deep(p),
231
- .alpha-rectangle-orbit-tetrad-callout :deep(h1),
232
- .alpha-rectangle-orbit-tetrad-callout :deep(h2),
233
- .alpha-rectangle-orbit-tetrad-callout :deep(h3),
234
- .alpha-rectangle-orbit-tetrad-callout :deep(h4),
235
- .alpha-rectangle-orbit-tetrad-callout :deep(h5),
236
- .alpha-rectangle-orbit-tetrad-callout :deep(h6) {
237
- margin: 0;
238
- padding: 0;
239
- }
229
+ .alpha-rectangle-orbit-tetrad-callout :deep(p),
230
+ .alpha-rectangle-orbit-tetrad-callout :deep(h1),
231
+ .alpha-rectangle-orbit-tetrad-callout :deep(h2),
232
+ .alpha-rectangle-orbit-tetrad-callout :deep(h3),
233
+ .alpha-rectangle-orbit-tetrad-callout :deep(h4),
234
+ .alpha-rectangle-orbit-tetrad-callout :deep(h5),
235
+ .alpha-rectangle-orbit-tetrad-callout :deep(h6) {
236
+ margin: 0;
237
+ padding: 0;
240
238
  }
241
239
 
242
240
  .alpha-rectangle-orbit-tetrad-callout--animated.alpha-rectangle-orbit-tetrad-callout--0 {
@@ -0,0 +1,84 @@
1
+ <script setup lang="ts">
2
+ import { handleBackground } from '@slidev/client';
3
+ import { computed, type PropType } from 'vue';
4
+
5
+ import { useMergedUnoAttrs } from '../../utils/useMergedUnoAttrs';
6
+
7
+ defineOptions({
8
+ inheritAttrs: false,
9
+ });
10
+
11
+ export interface IReferenceItem {
12
+ authors: string;
13
+ year: number | string;
14
+ title: string;
15
+ url?: string;
16
+ }
17
+
18
+ const props = defineProps({
19
+ references: {
20
+ type: Array as PropType<IReferenceItem[]>,
21
+ default: () => [],
22
+ },
23
+ columns: {
24
+ type: [Number, String],
25
+ default: 2,
26
+ },
27
+ background: {
28
+ type: String,
29
+ default: '',
30
+ },
31
+ });
32
+
33
+ const style = computed(() =>
34
+ props.background ? handleBackground(props.background) : undefined,
35
+ );
36
+
37
+ const columnClass = computed(() => {
38
+ const cols = Number(props.columns) || 2;
39
+ if (cols === 1) return 'columns-1';
40
+ if (cols === 3) return 'columns-3';
41
+ return 'columns-2';
42
+ });
43
+
44
+ const { className, forwardedAttrs } = useMergedUnoAttrs(
45
+ 'alpha-references slidev-layout h-full',
46
+ );
47
+ </script>
48
+
49
+ <template>
50
+ <div v-bind="forwardedAttrs()" :class="className()" :style="style">
51
+ <slot />
52
+ <ul
53
+ v-if="props.references.length"
54
+ class="alpha-references__list list-none p-0 m-0 mt-3"
55
+ :class="[columnClass, 'gap-x-8']"
56
+ >
57
+ <li
58
+ v-for="(ref, index) in props.references"
59
+ :key="`${ref.authors}-${ref.year}-${index}`"
60
+ class="alpha-references__item break-inside-avoid mb-4 text-lg leading-snug"
61
+ >
62
+ <strong class="alpha-references__authors text-foreground-primary block">
63
+ {{ ref.authors }}
64
+ ({{ ref.year }})
65
+ </strong>
66
+ <a
67
+ v-if="ref.url"
68
+ :href="ref.url"
69
+ target="_blank"
70
+ rel="noopener noreferrer"
71
+ class="alpha-references__title text-foreground-accent hover:underline block"
72
+ >
73
+ {{ ref.title }}
74
+ </a>
75
+ <span
76
+ v-else
77
+ class="alpha-references__title text-foreground-secondary block"
78
+ >
79
+ {{ ref.title }}
80
+ </span>
81
+ </li>
82
+ </ul>
83
+ </div>
84
+ </template>
@@ -15,3 +15,33 @@
15
15
  --alpha-bg-center-text: var(--alpha-foreground-accent, #fff);
16
16
  }
17
17
  }
18
+
19
+ .slidev-page .slidev-layout.alpha-references ul:not([class*='alpha-references__list']) {
20
+ columns: 2;
21
+ column-gap: 2rem;
22
+ list-style: none;
23
+ padding: 0;
24
+ margin-top: 0.75rem;
25
+ }
26
+
27
+ .slidev-page .slidev-layout.alpha-references ul:not([class*='alpha-references__list']) > li {
28
+ margin-bottom: 1rem;
29
+ font-size: 1.125rem;
30
+ line-height: 1.375;
31
+ break-inside: avoid;
32
+ }
33
+
34
+ .slidev-page .slidev-layout.alpha-references ul:not([class*='alpha-references__list']) {
35
+ columns: 2;
36
+ column-gap: 2rem;
37
+ list-style: none;
38
+ padding: 0;
39
+ margin-top: 0.75rem;
40
+ }
41
+
42
+ .slidev-page .slidev-layout.alpha-references ul:not([class*='alpha-references__list']) > li {
43
+ margin-bottom: 1rem;
44
+ font-size: 1.125rem;
45
+ line-height: 1.375;
46
+ break-inside: avoid;
47
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alphacifer/slidev-addon-theme",
3
- "version": "0.0.11",
3
+ "version": "0.0.12",
4
4
  "description": "All Slidev addons for Alpha presentations",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -32,8 +32,8 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@vueuse/motion": "3.0.3",
35
- "@alphacifer/core-utils": "^0.0.10",
36
- "@alphacifer/slidev-core-theme": "^0.0.1"
35
+ "@alphacifer/slidev-core-theme": "^0.0.2",
36
+ "@alphacifer/core-utils": "^0.0.10"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@slidev/cli": "52.19.0",