@miragon/slidev-toolkit 1.7.0 → 1.7.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.
@@ -1,28 +1,5 @@
1
1
  <script setup lang="ts">
2
- /**
3
- * Card — kanonische weiße Brand-Card (Design-System §6).
4
- * Hintergrund IMMER weiß, Akzent NUR auf dem Titel. `accent` wählt einen Stop
5
- * der blue → teal → green-Progression (§6.3) — dies ist der einzige
6
- * sanktionierte Ort für rohe Hex-Werte, hier zentral statt im Deck verstreut.
7
- *
8
- * Mehrkartige Grids: Titel von links nach rechts entlang der Progression.
9
- * 2 Karten: blue, green
10
- * 3 Karten: blue, teal, green
11
- * 4 Karten: blue, blue-mid, green-deep, green
12
- * <Card title="Deployment" accent="blue">Body …</Card>
13
- *
14
- * `icon` (optional): eine Iconify-UnoCSS-Klasse (`i-carbon-idea`, `i-ph-cube`, …).
15
- * Wird sie gesetzt, erscheint das Icon über dem Titel und trägt dieselbe
16
- * Akzentfarbe; ohne `icon` bleibt die Karte wie bisher rein textuell.
17
- * Der volle Klassenname muss so im Slide stehen, damit UnoCSS ihn beim
18
- * statischen Scan findet und generiert (Brand-Regel: Iconify `i-*`, kein Emoji).
19
- * <Card title="Deployment" accent="blue" icon="i-carbon-rocket">Body …</Card>
20
- *
21
- * `align` (optional): richtet Icon, Titel und Body aus — `left` (Standard),
22
- * `center` oder `right`. Betrifft nur die horizontale Ausrichtung des Inhalts;
23
- * Hintergrund, Akzentlogik und alles andere bleiben unverändert.
24
- * <Card title="Deployment" accent="blue" align="center">Body …</Card>
25
- */
2
+
26
3
  const props = withDefaults(
27
4
  defineProps<{
28
5
  title?: string
@@ -34,7 +11,6 @@ const props = withDefaults(
34
11
  { accent: 'blue', padding: 'standard', align: 'left' },
35
12
  )
36
13
 
37
- // Die §6.3-Progressions-Stops. Bewusst lokal: der einzige sanktionierte Hex-Ort.
38
14
  const ACCENTS: Record<string, string> = {
39
15
  blue: '#335DE5',
40
16
  'blue-mid': '#2B5ACE',
@@ -60,11 +36,6 @@ const ACCENTS: Record<string, string> = {
60
36
  background: var(--miragon-white);
61
37
  box-shadow: 0 8px 20px rgba(51, 93, 229, 0.08);
62
38
  }
63
- /* Nur Karten mit Zeichnung (compact) werden zur Flex-Spalte: im Grid stretchen
64
- die Karten auf gleiche Höhe, eine abschließende Zeichnung (margin-top:auto)
65
- dockt am Kartenboden an und liegt über alle Karten hinweg auf gleicher Höhe.
66
- Standard-Karten bleiben normaler Fluss, sonst würde inline <strong> im Body
67
- zu eigenen Flex-Items (eigene Zeilen) umbrechen. */
68
39
  .mg-card--compact { padding: 1rem; display: flex; flex-direction: column; }
69
40
  .mg-card--standard { padding: 1.25rem; }
70
41
  .mg-card--generous { padding: 1.5rem; }
@@ -90,28 +61,36 @@ const ACCENTS: Record<string, string> = {
90
61
  line-height: 1.55;
91
62
  color: #4b5563;
92
63
  }
93
- /* Blank-line-wrapped inline Markdown emits a <p>; normalise it to the card body size (no prose bloat). */
94
- .mg-card__body :deep(p) {
95
- margin: 0;
64
+ .mg-card .mg-card__body :deep(p),
65
+ .mg-card .mg-card__body :deep(ul),
66
+ .mg-card .mg-card__body :deep(ol),
67
+ .mg-card .mg-card__body :deep(li),
68
+ .mg-card .mg-card__body :deep(h1),
69
+ .mg-card .mg-card__body :deep(h2),
70
+ .mg-card .mg-card__body :deep(h3),
71
+ .mg-card .mg-card__body :deep(h4) {
96
72
  font-size: inherit;
97
73
  line-height: inherit;
74
+ color: inherit;
75
+ font-weight: inherit;
76
+ max-width: none;
77
+ margin: 0;
98
78
  }
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) {
79
+ .mg-card .mg-card__body :deep(p + p) { margin-top: 0.6em; }
80
+ /* Small breath between a lead paragraph and the list it introduces. */
81
+ .mg-card .mg-card__body :deep(p + ul),
82
+ .mg-card .mg-card__body :deep(p + ol) { margin-top: 0.3em; }
83
+ .mg-card .mg-card__body :deep(ul),
84
+ .mg-card .mg-card__body :deep(ol) {
102
85
  list-style: none;
103
- margin: 0;
104
86
  padding: 0;
105
87
  }
106
- .mg-card__body :deep(li) {
88
+ .mg-card .mg-card__body :deep(li) {
107
89
  position: relative;
108
- font-size: inherit;
109
- line-height: inherit;
110
90
  padding-left: 1.1rem;
111
- margin: 0;
112
91
  }
113
- .mg-card__body :deep(li + li) { margin-top: 0.4em; }
114
- .mg-card__body :deep(li)::before {
92
+ .mg-card .mg-card__body :deep(li + li) { margin-top: 0.4em; }
93
+ .mg-card .mg-card__body :deep(li)::before {
115
94
  content: '';
116
95
  position: absolute;
117
96
  left: 0;
@@ -121,8 +100,25 @@ const ACCENTS: Record<string, string> = {
121
100
  border-radius: 0.1rem;
122
101
  background: var(--miragon-blue);
123
102
  }
103
+ /* Numbered lists keep a decimal counter instead of the square marker. */
104
+ .mg-card .mg-card__body :deep(ol) { counter-reset: mg-card-ol; }
105
+ .mg-card .mg-card__body :deep(ol > li) { counter-increment: mg-card-ol; }
106
+ .mg-card .mg-card__body :deep(ol > li)::before {
107
+ content: counter(mg-card-ol) '.';
108
+ top: 0;
109
+ width: auto;
110
+ height: auto;
111
+ border-radius: 0;
112
+ background: none;
113
+ color: var(--miragon-blue);
114
+ font-weight: 700;
115
+ }
116
+ .mg-card .mg-card__body :deep(strong) { font-weight: 700; color: #1f2937; }
117
+ .mg-card .mg-card__body :deep(a) {
118
+ color: var(--miragon-blue);
119
+ text-decoration: none;
120
+ border-bottom: 1px solid currentColor;
121
+ }
124
122
  .mg-card--compact .mg-card__body { flex: 1 1 auto; display: flex; flex-direction: column; }
125
- /* A trailing diagram (<Figure src>) docks at the card bottom, so the image sits at
126
- the same position in every card of a stretched grid regardless of text length. */
127
123
  .mg-card--compact .mg-card__body :deep(.mg-figure) { margin-top: auto; }
128
124
  </style>
@@ -1,15 +1,6 @@
1
1
  <script setup lang="ts">
2
- /**
3
- * StepList — kompakte, beschriftete Schrittliste für die Seitenspalte neben
4
- * einem Diagramm (Laufzeit-/Deploymentsicht). Ersetzt handgestylte
5
- * <div style="font-size:…"><div style="margin-bottom:…"><strong style="…">-Blöcke.
6
- *
7
- * Styling lebt ausschließlich hier (Tokens aus theme.css), nie in slides.md.
8
- * Verwendung:
9
- * <StepList>
10
- * <Step label="Client">ruft … auf</Step>
11
- * </StepList>
12
- */
2
+ // Numbered step sequence beside a diagram. Wrap <Step> items; styling lives here.
3
+ // <StepList><Step label="Client">calls …</Step></StepList>
13
4
  </script>
14
5
 
15
6
  <template>
@@ -26,4 +17,24 @@
26
17
  color: var(--miragon-text-secondary);
27
18
  counter-reset: miragon-step;
28
19
  }
20
+ /* Own the step typography regardless of content or host layout: the doubled
21
+ `.step-list.step-list` (0,3,1) beats a host layout's prose `:deep()` (0,2,1),
22
+ so steps keep their size even inside a large-prose layout. */
23
+ .step-list.step-list :deep(p),
24
+ .step-list.step-list :deep(ul),
25
+ .step-list.step-list :deep(ol),
26
+ .step-list.step-list :deep(li) {
27
+ font-size: inherit;
28
+ line-height: inherit;
29
+ color: inherit;
30
+ max-width: none;
31
+ margin: 0;
32
+ }
33
+ .step-list.step-list :deep(p + p) { margin-top: 0.4em; }
34
+ .step-list.step-list :deep(strong) { font-weight: 700; color: var(--miragon-text-primary); }
35
+ .step-list.step-list :deep(a) {
36
+ color: var(--miragon-blue);
37
+ text-decoration: none;
38
+ border-bottom: 1px solid currentColor;
39
+ }
29
40
  </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@miragon/slidev-toolkit",
3
- "version": "1.7.0",
3
+ "version": "1.7.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",