@troshab/slidev-theme-troshab 0.1.7 → 0.1.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/CLAUDE.md CHANGED
@@ -535,3 +535,21 @@ Phosphor Icons via Iconify (`@iconify-json/ph`). Use via `<Icon>` component:
535
535
  ```
536
536
 
537
537
  Weight suffixes: (none) = regular, `-bold`, `-fill`, `-duotone`, `-thin`, `-light`.
538
+
539
+
540
+ ## Related Projects (Cyber Academy)
541
+
542
+ This project is part of the Cyber Academy content factory. See `~/cyber-academy/README.md` for the full map.
543
+
544
+ | Path | Role |
545
+ |------|------|
546
+ | `~/colo_cyberrange` | LMS platform (delivery) |
547
+ | `~/soc-tier-2` | SOC Tier 1+2 program (course-gen DB pipeline) |
548
+ | `~/was26` | Web App Security 2026 (Slidev course) |
549
+ | `~/ll26` | Binary Exploitation 2026 (Slidev course, planned) |
550
+ | `~/avis26` | NaUKMA F5 bachelor program (curriculum admin) |
551
+ | `~/slidev-theme-troshab` | Slidev theme used by all course presentations |
552
+
553
+ Authoring tools: `~/.claude/plugins/marketplaces/troshab-own-claude-code` (skills `course-*`, `slidev-*`, `ukrainize-text`).
554
+
555
+ Cross-project navigation: `/troshab-own:cyber-academy` slash command.
@@ -123,7 +123,10 @@ const sizeClasses: Record<string, string> = {
123
123
 
124
124
  .metric-value {
125
125
  font-weight: var(--font-weight-bold);
126
- line-height: 1.1;
126
+ /* IBM Plex Sans glyph box ~1.275 + tabular-nums + bold add ~5% — at h1*1.5 (lg)
127
+ and gradient text (background-clip: text), browser computes scrollH 5-7% above
128
+ line-height. 1.4 absorbs the rounding without visible spacing change. */
129
+ line-height: 1.4;
127
130
  font-variant-numeric: tabular-nums;
128
131
  white-space: nowrap;
129
132
  overflow: hidden;
@@ -240,7 +240,7 @@ function isUpcoming(index: number) {
240
240
  display: flex;
241
241
  flex-direction: column;
242
242
  width: 100%;
243
- padding: 0.25rem;
243
+ padding: 0.25rem 0.25rem 0;
244
244
  }
245
245
 
246
246
  /* ===== Track ===== */
@@ -267,12 +267,12 @@ function isUpcoming(index: number) {
267
267
  .stepper-step {
268
268
  display: flex;
269
269
  align-items: center;
270
- /* Reserve horizontal space for .stepper-marker's transform: scale(1.15) on
271
- * active state. Scaled marker's visible box extends ~6px past its layout
272
- * box; without padding, step.scrollWidth exceeds clientWidth by 1-3px on
273
- * short labels. Per CSS spec, transformed descendants count toward parent
274
- * scrollable overflow. */
275
- padding: 0 var(--transform-scale-comp);
270
+ /* Reserve horizontal AND vertical space for .stepper-marker's transform:
271
+ * scale(1.15) on active state. Scaled marker's visible box extends ~6px past
272
+ * its layout box; without padding, step.scrollWidth/scrollHeight exceeds
273
+ * clientWidth/clientHeight by 1-5px. Per CSS spec, transformed descendants
274
+ * count toward parent scrollable overflow. */
275
+ padding: var(--transform-scale-comp);
276
276
  }
277
277
 
278
278
  .stepper-horizontal .stepper-step {
@@ -459,7 +459,7 @@ function isUpcoming(index: number) {
459
459
  .stepper-arrow-char {
460
460
  color: var(--color-text-tertiary);
461
461
  font-size: 2rem;
462
- line-height: 1;
462
+ line-height: 1.25;
463
463
  }
464
464
 
465
465
  .stepper-connector.is-completed .stepper-arrow-char {
@@ -479,10 +479,15 @@ function isUpcoming(index: number) {
479
479
  }
480
480
 
481
481
  .stepper-vertical.stepper-arrows .stepper-connector {
482
+ width: auto;
483
+ min-width: 2rem;
484
+ min-height: 2.5rem;
482
485
  background: none;
483
486
  display: flex;
484
487
  align-items: center;
485
- margin-left: calc(var(--stepper-marker-size) / 2 - 0.5rem);
488
+ justify-content: center;
489
+ margin-left: calc(var(--stepper-marker-size) / 2 - 1rem);
490
+ line-height: 1;
486
491
  }
487
492
 
488
493
  .stepper-vertical .stepper-connector.is-completed {
@@ -16,7 +16,7 @@ import type { SemanticColor } from '../composables/useColors'
16
16
  import { semanticColorVar } from '../composables/useColors'
17
17
 
18
18
  const props = withDefaults(defineProps<{
19
- marker?: 'disc' | 'number' | 'check' | 'arrow' | 'star' | 'none'
19
+ marker?: 'disc' | 'number' | 'check' | 'cross' | 'arrow' | 'star' | 'none'
20
20
  color?: SemanticColor
21
21
  size?: 'sm' | 'md' | 'lg'
22
22
  columns?: 1 | 2
@@ -81,6 +81,15 @@ const props = withDefaults(defineProps<{
81
81
  font-weight: var(--font-weight-bold);
82
82
  }
83
83
 
84
+ /* Marker: cross (pairs with check — semantic "mistake/don't/anti-pattern") */
85
+ .styled-list-cross li::before {
86
+ content: '\2717';
87
+ position: absolute;
88
+ left: 0;
89
+ color: var(--marker-color);
90
+ font-weight: var(--font-weight-bold);
91
+ }
92
+
84
93
  /* Marker: arrow */
85
94
  .styled-list-arrow li::before {
86
95
  content: '\2192';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@troshab/slidev-theme-troshab",
3
- "version": "0.1.7",
3
+ "version": "0.1.12",
4
4
  "description": "A minimal, universal Slidev theme with flexible layouts and ready-to-use slide templates",
5
5
  "author": "troshab",
6
6
  "license": "PolyForm-Noncommercial-1.0.0",
@@ -39,6 +39,14 @@
39
39
  "slidev-addon-fancy-arrow": "^0.16.0",
40
40
  "slidev-addon-preload-images": "^0.2.0"
41
41
  },
42
+ "peerDependencies": {
43
+ "shiki": ">=3.0.0"
44
+ },
45
+ "peerDependenciesMeta": {
46
+ "shiki": {
47
+ "optional": true
48
+ }
49
+ },
42
50
  "scripts": {
43
51
  "dev": "npx concurrently -n dark,light -c magenta,cyan \"slidev example_dark.md --port 30303\" \"slidev example_white.md --port 31313\"",
44
52
  "dev:dark": "slidev example_dark.md --port 30303",
@@ -0,0 +1,27 @@
1
+ /**
2
+ * slidev-theme-troshab — Vite Plugins Setup
3
+ *
4
+ * Fix: `lz-string` 1.5.0 is CJS-only (no `exports`/`module` fields).
5
+ * `@slidev/client/modules/mermaid.ts` does `import lz from 'lz-string'`
6
+ * which fails at runtime unless Vite pre-bundles the dep through esbuild
7
+ * (which fabricates a `default` export). Forcing `optimizeDeps.include`
8
+ * makes the pre-bundle deterministic across modules and CI environments.
9
+ *
10
+ * NOTE: this file runs through jiti BEFORE Vite starts, so it must avoid
11
+ * importing from ESM-only packages like `@slidev/types` (jiti's CJS interop
12
+ * crashes on them). `defineVitePluginsSetup` is just an identity helper
13
+ * for type inference; we drop it and export the raw setup function.
14
+ */
15
+
16
+ export default () => [
17
+ {
18
+ name: 'troshab:dep-optimization',
19
+ config() {
20
+ return {
21
+ optimizeDeps: {
22
+ include: ['lz-string'],
23
+ },
24
+ }
25
+ },
26
+ },
27
+ ]
package/styles/base.css CHANGED
@@ -11,12 +11,8 @@
11
11
  /* Import color system */
12
12
  @import './colors.css';
13
13
 
14
- /* ============================================
15
- 1. @font-face IBM Plex via @fontsource
16
- Provides proper unicode-range subsetting
17
- (latin, cyrillic, cyrillic-ext, etc.)
18
- ============================================ */
19
-
14
+ /* @font-face via @fontsource — must come BEFORE any other CSS rules per
15
+ * CSS spec (all @import / @charset / @layer at top of file). */
20
16
  @import '@fontsource/ibm-plex-sans/400.css';
21
17
  @import '@fontsource/ibm-plex-sans/500.css';
22
18
  @import '@fontsource/ibm-plex-sans/600.css';
@@ -24,6 +20,15 @@
24
20
  @import '@fontsource/ibm-plex-mono/400.css';
25
21
  @import '@fontsource/ibm-plex-mono/500.css';
26
22
 
23
+ /* Slidev fix: #slidev-goto-dialog уse `-top-20` (-5rem) для closed state, але
24
+ * з 100+ слайдів список autocomplete стає вищим за 5rem і видно нижню
25
+ * частину з-під верху екрану. Перекриваємо: коли dialog має `-top-20` клас,
26
+ * примусово ховаємо через translateY(-100%). */
27
+ #slidev-goto-dialog.\-top-20 {
28
+ transform: translateY(-100%);
29
+ pointer-events: none;
30
+ }
31
+
27
32
  /* ============================================
28
33
  2. CSS Custom Properties (Typography & Layout)
29
34
  Note: Colors are defined in colors.css
@@ -56,7 +61,7 @@
56
61
  Chung (2004, Vision Research): optimal 1.25-1.5 for body.
57
62
  Bringhurst "Elements of Typographic Style": headings 1.1-1.25, body 1.3-1.5.
58
63
  Kolers et al. (1981): reading speed U-curve — extremes reduce speed. */
59
- --line-height-heading: 1.3; /* IBM Plex Sans glyph box (1.275) + safety margin */
64
+ --line-height-heading: 1.4; /* IBM Plex Sans + Cyrillic descender (у, р, ф, ц, щ) need extra room - 1.3 caused 1-8px h1 overflow */
60
65
  --line-height-body: 1.4; /* Chung mid — comfortable for slides */
61
66
  --line-height-reading: 1.5; /* Chung upper — BDA recommended for paragraphs */
62
67
  --line-height-list: 1.4; /* matches body for consistency */
@@ -159,7 +164,7 @@
159
164
  letter-spacing: var(--letter-spacing-body);
160
165
  word-spacing: var(--word-spacing-body);
161
166
  color: var(--color-text);
162
- padding: var(--safe-inset-y) var(--safe-inset-x);
167
+ padding: var(--safe-inset-y) var(--safe-inset-x) calc(var(--safe-inset-y) - 16px);
163
168
  height: 100%;
164
169
  width: 100%;
165
170
  }
@@ -182,6 +187,7 @@
182
187
  line-height: 1.45;
183
188
  }
184
189
 
190
+
185
191
  /* --- Headings --- */
186
192
  .slidev-layout h1,
187
193
  .slidev-layout h2,
@@ -763,6 +769,19 @@
763
769
  padding-bottom: 1%;
764
770
  }
765
771
 
772
+ /* Split + footer: explicit grid rows so panels share remaining height with
773
+ * footer (auto). Without this, panel height defaults stretch and footer adds
774
+ * a 3rd auto-row, causing total > viewport (~80-200px overflow). */
775
+ .slide-split:has(.slide-footer) {
776
+ grid-template-rows: 1fr auto;
777
+ }
778
+ .slide-split:has(.slide-footer) .slide-panel {
779
+ min-height: 0;
780
+ }
781
+ .slide-split:has(.slide-footer) .slide-panel-content {
782
+ overflow: hidden;
783
+ }
784
+
766
785
  /* ============================================
767
786
  8. Component Styles
768
787
  ============================================ */