decktile 0.4.2__tar.gz → 0.4.3__tar.gz

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.
Files changed (59) hide show
  1. {decktile-0.4.2 → decktile-0.4.3}/PKG-INFO +26 -1
  2. {decktile-0.4.2 → decktile-0.4.3}/README.md +25 -0
  3. {decktile-0.4.2 → decktile-0.4.3}/pyproject.toml +1 -1
  4. {decktile-0.4.2 → decktile-0.4.3}/src/decktile/render/templates/base.css +38 -0
  5. {decktile-0.4.2 → decktile-0.4.3}/tests/test_html.py +34 -0
  6. {decktile-0.4.2 → decktile-0.4.3}/LICENSE +0 -0
  7. {decktile-0.4.2 → decktile-0.4.3}/NOTICE +0 -0
  8. {decktile-0.4.2 → decktile-0.4.3}/src/decktile/__init__.py +0 -0
  9. {decktile-0.4.2 → decktile-0.4.3}/src/decktile/__main__.py +0 -0
  10. {decktile-0.4.2 → decktile-0.4.3}/src/decktile/assets/lucide/VENDORED.md +0 -0
  11. {decktile-0.4.2 → decktile-0.4.3}/src/decktile/assets/lucide/lucide.css +0 -0
  12. {decktile-0.4.2 → decktile-0.4.3}/src/decktile/assets/lucide/lucide.ttf +0 -0
  13. {decktile-0.4.2 → decktile-0.4.3}/src/decktile/chart_themes/kubecon_na.toml +0 -0
  14. {decktile-0.4.2 → decktile-0.4.3}/src/decktile/chart_themes/ossummit_europe.toml +0 -0
  15. {decktile-0.4.2 → decktile-0.4.3}/src/decktile/cli.py +0 -0
  16. {decktile-0.4.2 → decktile-0.4.3}/src/decktile/parser/__init__.py +0 -0
  17. {decktile-0.4.2 → decktile-0.4.3}/src/decktile/parser/ast.py +0 -0
  18. {decktile-0.4.2 → decktile-0.4.3}/src/decktile/parser/markdown.py +0 -0
  19. {decktile-0.4.2 → decktile-0.4.3}/src/decktile/plugins/cards.py +0 -0
  20. {decktile-0.4.2 → decktile-0.4.3}/src/decktile/plugins/directives.py +0 -0
  21. {decktile-0.4.2 → decktile-0.4.3}/src/decktile/plugins/fenced.py +0 -0
  22. {decktile-0.4.2 → decktile-0.4.3}/src/decktile/plugins/layouts.py +0 -0
  23. {decktile-0.4.2 → decktile-0.4.3}/src/decktile/plugins/lucide.py +0 -0
  24. {decktile-0.4.2 → decktile-0.4.3}/src/decktile/plugins/lucide_font.py +0 -0
  25. {decktile-0.4.2 → decktile-0.4.3}/src/decktile/render/__init__.py +0 -0
  26. {decktile-0.4.2 → decktile-0.4.3}/src/decktile/render/html.py +0 -0
  27. {decktile-0.4.2 → decktile-0.4.3}/src/decktile/render/ir.py +0 -0
  28. {decktile-0.4.2 → decktile-0.4.3}/src/decktile/render/odf/__init__.py +0 -0
  29. {decktile-0.4.2 → decktile-0.4.3}/src/decktile/render/odf/geometry.py +0 -0
  30. {decktile-0.4.2 → decktile-0.4.3}/src/decktile/render/odf/shapes.py +0 -0
  31. {decktile-0.4.2 → decktile-0.4.3}/src/decktile/render/odf/styles.py +0 -0
  32. {decktile-0.4.2 → decktile-0.4.3}/src/decktile/render/odp.py +0 -0
  33. {decktile-0.4.2 → decktile-0.4.3}/src/decktile/render/pdf.py +0 -0
  34. {decktile-0.4.2 → decktile-0.4.3}/src/decktile/render/pdg.py +0 -0
  35. {decktile-0.4.2 → decktile-0.4.3}/src/decktile/render/seaborn.py +0 -0
  36. {decktile-0.4.2 → decktile-0.4.3}/src/decktile/render/templates/decktile.js +0 -0
  37. {decktile-0.4.2 → decktile-0.4.3}/src/decktile/render/templates/shell.html +0 -0
  38. {decktile-0.4.2 → decktile-0.4.3}/src/decktile/theme/__init__.py +0 -0
  39. {decktile-0.4.2 → decktile-0.4.3}/src/decktile/theme/loader.py +0 -0
  40. {decktile-0.4.2 → decktile-0.4.3}/src/decktile/theme/parser.py +0 -0
  41. {decktile-0.4.2 → decktile-0.4.3}/src/decktile/themes/default.css +0 -0
  42. {decktile-0.4.2 → decktile-0.4.3}/src/decktile/themes/kcd_vietnam.css +0 -0
  43. {decktile-0.4.2 → decktile-0.4.3}/src/decktile/themes/kubecon_china.css +0 -0
  44. {decktile-0.4.2 → decktile-0.4.3}/src/decktile/themes/kubecon_japan.css +0 -0
  45. {decktile-0.4.2 → decktile-0.4.3}/src/decktile/themes/kubecon_na.css +0 -0
  46. {decktile-0.4.2 → decktile-0.4.3}/src/decktile/themes/ossummit_europe.css +0 -0
  47. {decktile-0.4.2 → decktile-0.4.3}/src/decktile/themes/ossummit_korea.css +0 -0
  48. {decktile-0.4.2 → decktile-0.4.3}/src/decktile/themes/skeleton/preview.deck.md +0 -0
  49. {decktile-0.4.2 → decktile-0.4.3}/src/decktile/themes/skeleton/theme.toml +0 -0
  50. {decktile-0.4.2 → decktile-0.4.3}/tests/__init__.py +0 -0
  51. {decktile-0.4.2 → decktile-0.4.3}/tests/test_cli.py +0 -0
  52. {decktile-0.4.2 → decktile-0.4.3}/tests/test_geometry.py +0 -0
  53. {decktile-0.4.2 → decktile-0.4.3}/tests/test_ir.py +0 -0
  54. {decktile-0.4.2 → decktile-0.4.3}/tests/test_odf_shapes.py +0 -0
  55. {decktile-0.4.2 → decktile-0.4.3}/tests/test_odp.py +0 -0
  56. {decktile-0.4.2 → decktile-0.4.3}/tests/test_parser.py +0 -0
  57. {decktile-0.4.2 → decktile-0.4.3}/tests/test_pdg.py +0 -0
  58. {decktile-0.4.2 → decktile-0.4.3}/tests/test_seaborn_styles.py +0 -0
  59. {decktile-0.4.2 → decktile-0.4.3}/tests/test_video.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: decktile
3
- Version: 0.4.2
3
+ Version: 0.4.3
4
4
  Summary: Markdown to designed slides: HTML, PDF and editable ODP
5
5
  Author-Email: Reza Jelveh <git@jelveh.me>
6
6
  License: Apache-2.0
@@ -188,6 +188,7 @@ places that should be one. PRs that consolidate repeated logic are welcome.
188
188
  | `@layout ecosystem` | Compact stacked layout for partner/device logos. Small labels, uniform image sizing |
189
189
  | `@layout timeline-vertical` | Cards alternate left/right of a central vertical spine, connected by stubs |
190
190
  | `@layout timeline-horizontal` | Cards alternate above/below a central horizontal spine |
191
+ | `@layout timeline-steps` | Agenda-style: equal columns, each on a rule from a marker at the top; `{label}` sits above the heading |
191
192
  | Custom | `@layout <name>` adds CSS class `layout-<name>`, style via frontmatter `style:` block |
192
193
 
193
194
  ### Compare layout
@@ -317,6 +318,30 @@ Next major
317
318
  title plus one short line) so the connector stub reliably reaches the
318
319
  spine regardless of content length.
319
320
 
321
+ `timeline-steps` is the agenda variant: no spine and no alternating, every
322
+ item gets a column with a marker and a rule down the slide.
323
+
324
+ ```markdown
325
+ @layout timeline-steps
326
+
327
+ ## Agenda
328
+
329
+ ::: grid {cols=3}
330
+ ::: card {label="Part"}
331
+ ### 01
332
+ Industry trends
333
+ :::
334
+ ::: card {label="Part"}
335
+ ### 02
336
+ About HAMi
337
+ :::
338
+ ::: card {label="Part"}
339
+ ### 03
340
+ Use cases
341
+ :::
342
+ :::
343
+ ```
344
+
320
345
  ### Section labels and side images
321
346
 
322
347
  Ecosystem slides use `####` (h4) for section labels above grids, and
@@ -156,6 +156,7 @@ places that should be one. PRs that consolidate repeated logic are welcome.
156
156
  | `@layout ecosystem` | Compact stacked layout for partner/device logos. Small labels, uniform image sizing |
157
157
  | `@layout timeline-vertical` | Cards alternate left/right of a central vertical spine, connected by stubs |
158
158
  | `@layout timeline-horizontal` | Cards alternate above/below a central horizontal spine |
159
+ | `@layout timeline-steps` | Agenda-style: equal columns, each on a rule from a marker at the top; `{label}` sits above the heading |
159
160
  | Custom | `@layout <name>` adds CSS class `layout-<name>`, style via frontmatter `style:` block |
160
161
 
161
162
  ### Compare layout
@@ -285,6 +286,30 @@ Next major
285
286
  title plus one short line) so the connector stub reliably reaches the
286
287
  spine regardless of content length.
287
288
 
289
+ `timeline-steps` is the agenda variant: no spine and no alternating, every
290
+ item gets a column with a marker and a rule down the slide.
291
+
292
+ ```markdown
293
+ @layout timeline-steps
294
+
295
+ ## Agenda
296
+
297
+ ::: grid {cols=3}
298
+ ::: card {label="Part"}
299
+ ### 01
300
+ Industry trends
301
+ :::
302
+ ::: card {label="Part"}
303
+ ### 02
304
+ About HAMi
305
+ :::
306
+ ::: card {label="Part"}
307
+ ### 03
308
+ Use cases
309
+ :::
310
+ :::
311
+ ```
312
+
288
313
  ### Section labels and side images
289
314
 
290
315
  Ecosystem slides use `####` (h4) for section labels above grids, and
@@ -23,7 +23,7 @@ dependencies = [
23
23
  ]
24
24
  requires-python = ">=3.11"
25
25
  readme = "README.md"
26
- version = "0.4.2"
26
+ version = "0.4.3"
27
27
 
28
28
  [project.license]
29
29
  text = "Apache-2.0"
@@ -576,6 +576,44 @@ LOGO_CSS
576
576
  }
577
577
  .layout-timeline-horizontal .card:nth-child(even)::after { top: -2em; }
578
578
  .layout-timeline-horizontal .card:nth-child(odd)::after { bottom: -2em; }
579
+ /* timeline-steps: the agenda variant of the timeline. Items sit side by side
580
+ in equal columns, each on its own rule that runs from a marker at the top
581
+ down to the bottom of the slide; nothing alternates. {label="Part"} prints
582
+ above the card's ### heading instead of on a spine. Themes restyle the
583
+ marker (::before) and the rule (border-left). */
584
+ .layout-timeline-steps .slide-body { display: flex; flex-direction: column; padding-bottom: 0; }
585
+ .layout-timeline-steps .grid { display: flex; flex-direction: row; flex: 1; gap: 0; margin: 2em 0 0; padding-left: 0.4em; } /* room for the first marker */
586
+ .layout-timeline-steps .card {
587
+ flex: 1 1 0;
588
+ min-width: 0;
589
+ position: relative;
590
+ display: flex;
591
+ flex-direction: column;
592
+ background: none;
593
+ border: none;
594
+ border-left: 0.06em solid var(--color-accent-primary);
595
+ border-radius: 0;
596
+ padding: 0.4em 0.8em 0 1em;
597
+ }
598
+ .layout-timeline-steps .card::before {
599
+ content: "";
600
+ position: absolute;
601
+ left: -0.33em;
602
+ top: -0.3em;
603
+ width: 0.6em;
604
+ height: 0.6em;
605
+ border-radius: 50%;
606
+ background: var(--color-accent-primary);
607
+ }
608
+ .layout-timeline-steps .timeline-label {
609
+ position: static;
610
+ font-size: 0.75em;
611
+ font-weight: 400;
612
+ color: inherit;
613
+ margin-bottom: 0.1em;
614
+ }
615
+ .layout-timeline-steps .card h3 { font-size: 2.4em; line-height: 1; margin: 0 0 0.4em; }
616
+
579
617
  /* {label="..."}: short name printed directly on the spine, next to
580
618
  this card's own dot -- distinct from the card's fuller ### header */
581
619
  .timeline-label {
@@ -247,3 +247,37 @@ def test_grid_fill_spreads_rows_over_the_slide():
247
247
  filled, _ = row2_y("fill")
248
248
  assert filled > plain + h * 0.1
249
249
  assert "grid fill" in _full_page(md % "fill")
250
+
251
+
252
+ def test_timeline_steps_columns_with_label_above_heading():
253
+ """timeline-steps: equal columns side by side, {label} above the ### heading."""
254
+ from weasyprint import HTML
255
+
256
+ from decktile.render.ir import assemble_css
257
+
258
+ md = "---\ntitle: t\n---\n\n@layout timeline-steps\n\n## Agenda\n\n::: grid {cols=4}\n"
259
+ md += "".join(f'::: card {{label="Part"}}\n### 0{i}\nTopic {i}\n:::\n' for i in range(1, 5)) + ":::\n"
260
+ css = assemble_css(base_css(), default_theme(), (1280, 720))
261
+ page = HTML(string=render(parse(md), default_theme(), css, (1280, 720))).render().pages[0]._page_box
262
+
263
+ def walk(box):
264
+ yield box
265
+ for c in getattr(box, "children", []):
266
+ yield from walk(c)
267
+
268
+ def cls(b):
269
+ el = getattr(b, "element", None)
270
+ return el.get("class", "") if el is not None else ""
271
+
272
+ cards = [b for b in walk(page) if getattr(b, "element_tag", "") == "div" and cls(b).split()[:1] == ["card"]]
273
+ cards = list({id(b.element): b for b in cards}.values())
274
+ assert len(cards) == 4
275
+ xs = [c.position_x for c in cards]
276
+ ws = [c.width for c in cards]
277
+ assert xs == sorted(xs) and len({round(x) for x in xs}) == 4
278
+ assert max(ws) - min(ws) < 2
279
+ ys = {round(c.position_y) for c in cards}
280
+ assert len(ys) == 1 # nothing alternates
281
+ label = next(b for b in walk(page) if "timeline-label" in cls(b))
282
+ h3 = next(b for b in walk(page) if getattr(b, "element_tag", "") == "h3")
283
+ assert label.position_y < h3.position_y
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes