@miragon/slidev-toolkit 1.5.0 → 1.5.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.
@@ -90,17 +90,37 @@ const ACCENTS: Record<string, string> = {
90
90
  line-height: 1.55;
91
91
  color: #4b5563;
92
92
  }
93
- /* Wrapping the body in blank lines (required for inline Markdown `code`, **bold**,
94
- links — to render inside the slot; see the slides skill) makes Markdown emit a
95
- <p>. Left alone it would inherit Slidev's larger prose paragraph size and default
96
- margins, so a block-form card would look different from a tight one. Normalise it:
97
- inherit the card body size, no outer margins, even spacing between paragraphs. */
93
+ /* Blank-line-wrapped inline Markdown emits a <p>; normalise it to the card body size (no prose bloat). */
98
94
  .mg-card__body :deep(p) {
99
95
  margin: 0;
100
96
  font-size: inherit;
101
97
  line-height: inherit;
102
98
  }
103
99
  .mg-card__body :deep(p + p) { margin-top: 0.6em; }
100
+ /* Same for bullet lists: normalise to the body size with a small blue square marker (like the content layout). */
101
+ .mg-card__body :deep(ul) {
102
+ list-style: none;
103
+ margin: 0;
104
+ padding: 0;
105
+ }
106
+ .mg-card__body :deep(li) {
107
+ position: relative;
108
+ font-size: inherit;
109
+ line-height: inherit;
110
+ padding-left: 1.1rem;
111
+ margin: 0;
112
+ }
113
+ .mg-card__body :deep(li + li) { margin-top: 0.4em; }
114
+ .mg-card__body :deep(li)::before {
115
+ content: '';
116
+ position: absolute;
117
+ left: 0;
118
+ top: 0.55em;
119
+ width: 0.4rem;
120
+ height: 0.4rem;
121
+ border-radius: 0.1rem;
122
+ background: var(--miragon-blue);
123
+ }
104
124
  .mg-card--compact .mg-card__body { flex: 1 1 auto; display: flex; flex-direction: column; }
105
125
  /* A trailing diagram (<Figure src>) docks at the card bottom, so the image sits at
106
126
  the same position in every card of a stretched grid regardless of text length. */
@@ -1,6 +1,8 @@
1
1
  <script setup lang="ts">
2
2
  /**
3
- * Step — eine Zeile in einer <StepList>: fett gesetztes Label + Fließtext.
3
+ * Step — eine Zeile in einer <StepList>: nummeriertes Badge + fett gesetztes
4
+ * Label + Fließtext. Die Nummer kommt aus einem CSS-Counter, den die StepList
5
+ * zurücksetzt und jeder Step erhöht (kein index-Prop nötig).
4
6
  * Das Label nutzt die primäre Textfarbe, der Body erbt die Farbe der StepList.
5
7
  * <Step label="Client">ruft … auf</Step>
6
8
  */
@@ -8,10 +10,35 @@ defineProps<{ label?: string }>()
8
10
  </script>
9
11
 
10
12
  <template>
11
- <div class="step"><strong v-if="label" class="step__label">{{ label }}:</strong> <slot /></div>
13
+ <div class="step">
14
+ <span class="step__marker" aria-hidden="true"></span>
15
+ <span class="step__body"><strong v-if="label" class="step__label">{{ label }}:</strong> <slot /></span>
16
+ </div>
12
17
  </template>
13
18
 
14
19
  <style scoped>
20
+ .step {
21
+ display: flex;
22
+ align-items: baseline;
23
+ gap: 0.6rem;
24
+ counter-increment: miragon-step;
25
+ }
26
+ .step__marker {
27
+ flex: 0 0 auto;
28
+ align-self: flex-start;
29
+ width: 1.5rem;
30
+ height: 1.5rem;
31
+ border-radius: 50%;
32
+ background: var(--miragon-blue);
33
+ color: #fff;
34
+ font-size: 0.75rem;
35
+ font-weight: 700;
36
+ line-height: 1.5rem;
37
+ text-align: center;
38
+ }
39
+ .step__marker::before {
40
+ content: counter(miragon-step);
41
+ }
15
42
  .step__label {
16
43
  font-weight: 700;
17
44
  color: var(--miragon-text-primary);
@@ -20,9 +20,10 @@
20
20
  .step-list {
21
21
  display: flex;
22
22
  flex-direction: column;
23
- gap: 0.65rem;
24
- font-size: 0.8rem;
25
- line-height: 1.4;
23
+ gap: 0.95rem;
24
+ font-size: 1.2rem;
25
+ line-height: 1.5;
26
26
  color: var(--miragon-text-secondary);
27
+ counter-reset: miragon-step;
27
28
  }
28
29
  </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@miragon/slidev-toolkit",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "Miragon Slidev toolkit: the brand theme, the layout archetypes, the reusable components (Card, CardGrid, StepList, Figure, SplitView) and the BrandMeshBackground animation. Single source of design truth, consumed by the reference deck in this repo.",
5
5
  "keywords": [
6
6
  "slidev-theme",