rikiki-deck 0.2.0 → 0.3.0

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 (76) hide show
  1. package/README.md +38 -9
  2. package/dist/atoms/deck-badge.d.ts +0 -1
  3. package/dist/atoms/deck-code.d.ts +0 -1
  4. package/dist/atoms/deck-kicker.d.ts +0 -1
  5. package/dist/atoms/deck-punch.d.ts +0 -1
  6. package/dist/click-stages.js +1 -1
  7. package/dist/deck-help.js +6 -3
  8. package/dist/deck-mermaid.js +3 -3
  9. package/dist/deck-overview.js +14 -2
  10. package/dist/deck-root.js +8 -6
  11. package/dist/deck-transition.js +1 -1
  12. package/dist/index.d.ts +0 -1
  13. package/dist/index.js +43 -41
  14. package/dist/layouts/deck-cover.d.ts +0 -1
  15. package/dist/layouts/deck-feature-cards.d.ts +0 -1
  16. package/dist/layouts/deck-feature.d.ts +0 -1
  17. package/dist/layouts/deck-photo.d.ts +0 -1
  18. package/dist/layouts/deck-section.d.ts +0 -1
  19. package/dist/layouts/deck-split.d.ts +0 -1
  20. package/dist/layouts/deck-takeaway.d.ts +0 -1
  21. package/dist/livereload.d.ts +0 -1
  22. package/dist/molecules/deck-callout.d.ts +0 -1
  23. package/dist/molecules/deck-card.d.ts +0 -1
  24. package/dist/molecules/deck-grid.d.ts +0 -1
  25. package/dist/molecules/deck-md.d.ts +0 -1
  26. package/dist/molecules/deck-mermaid.d.ts +6 -1
  27. package/dist/molecules/deck-metric.d.ts +0 -1
  28. package/dist/molecules/deck-shortcut.d.ts +0 -1
  29. package/dist/molecules/deck-stack.d.ts +0 -1
  30. package/dist/molecules/deck-stat.d.ts +0 -1
  31. package/dist/molecules/deck-step-list.d.ts +0 -1
  32. package/dist/molecules/deck-tier-list.d.ts +0 -1
  33. package/dist/plugins/click-stages.d.ts +0 -1
  34. package/dist/plugins/shiki.d.ts +0 -1
  35. package/dist/runtime/deck-help.d.ts +0 -1
  36. package/dist/runtime/deck-notes.d.ts +0 -1
  37. package/dist/runtime/deck-overview.d.ts +0 -1
  38. package/dist/runtime/deck-presenter.d.ts +0 -1
  39. package/dist/runtime/deck-root.d.ts +32 -2
  40. package/dist/runtime/deck-transition.d.ts +0 -1
  41. package/dist/shared-styles.d.ts +0 -1
  42. package/dist/standalone.js +59 -42
  43. package/package.json +1 -1
  44. package/dist/atoms/deck-badge.d.ts.map +0 -1
  45. package/dist/atoms/deck-code.d.ts.map +0 -1
  46. package/dist/atoms/deck-kicker.d.ts.map +0 -1
  47. package/dist/atoms/deck-punch.d.ts.map +0 -1
  48. package/dist/index.d.ts.map +0 -1
  49. package/dist/layouts/deck-cover.d.ts.map +0 -1
  50. package/dist/layouts/deck-feature-cards.d.ts.map +0 -1
  51. package/dist/layouts/deck-feature.d.ts.map +0 -1
  52. package/dist/layouts/deck-photo.d.ts.map +0 -1
  53. package/dist/layouts/deck-section.d.ts.map +0 -1
  54. package/dist/layouts/deck-split.d.ts.map +0 -1
  55. package/dist/layouts/deck-takeaway.d.ts.map +0 -1
  56. package/dist/livereload.d.ts.map +0 -1
  57. package/dist/molecules/deck-callout.d.ts.map +0 -1
  58. package/dist/molecules/deck-card.d.ts.map +0 -1
  59. package/dist/molecules/deck-grid.d.ts.map +0 -1
  60. package/dist/molecules/deck-md.d.ts.map +0 -1
  61. package/dist/molecules/deck-mermaid.d.ts.map +0 -1
  62. package/dist/molecules/deck-metric.d.ts.map +0 -1
  63. package/dist/molecules/deck-shortcut.d.ts.map +0 -1
  64. package/dist/molecules/deck-stack.d.ts.map +0 -1
  65. package/dist/molecules/deck-stat.d.ts.map +0 -1
  66. package/dist/molecules/deck-step-list.d.ts.map +0 -1
  67. package/dist/molecules/deck-tier-list.d.ts.map +0 -1
  68. package/dist/plugins/click-stages.d.ts.map +0 -1
  69. package/dist/plugins/shiki.d.ts.map +0 -1
  70. package/dist/runtime/deck-help.d.ts.map +0 -1
  71. package/dist/runtime/deck-notes.d.ts.map +0 -1
  72. package/dist/runtime/deck-overview.d.ts.map +0 -1
  73. package/dist/runtime/deck-presenter.d.ts.map +0 -1
  74. package/dist/runtime/deck-root.d.ts.map +0 -1
  75. package/dist/runtime/deck-transition.d.ts.map +0 -1
  76. package/dist/shared-styles.d.ts.map +0 -1
@@ -1,3 +1,2 @@
1
1
  export declare function toggleHelp(host: HTMLElement): void;
2
2
  export declare function closeHelp(host: HTMLElement): void;
3
- //# sourceMappingURL=deck-help.d.ts.map
@@ -10,4 +10,3 @@ declare global {
10
10
  'deck-notes': DeckNotes;
11
11
  }
12
12
  }
13
- //# sourceMappingURL=deck-notes.d.ts.map
@@ -13,4 +13,3 @@ export interface OverviewOptions {
13
13
  }
14
14
  export declare function mountOverview(host: HTMLElement, opts: OverviewOptions): () => void;
15
15
  export {};
16
- //# sourceMappingURL=deck-overview.d.ts.map
@@ -1,3 +1,2 @@
1
1
  import type { DeckRoot } from './deck-root.js';
2
2
  export declare function installPresenter(host: DeckRoot): void;
3
- //# sourceMappingURL=deck-presenter.d.ts.map
@@ -21,6 +21,13 @@ export declare class DeckRoot extends LitElement {
21
21
  /** Enable pointer-driven horizontal swipe for navigation (touch + mouse).
22
22
  * Translates a swipe ≥ 60 px into an advance / back navigation. */
23
23
  swipe: boolean;
24
+ /** Mouse navigation · enabled by default. Set to "none" to disable, or to a
25
+ * space-separated subset of "click wheel arrows aux" to pick mechanisms. */
26
+ mouseNav: string | null;
27
+ /** Navigation model · `nav="2d"` opts into chapter/slide grid navigation
28
+ * (←→ between chapters, ↑↓ within). Default is linear: arrows always move to
29
+ * the next/previous slide regardless of `<deck-section>` structure. */
30
+ nav: string | null;
24
31
  private slides;
25
32
  private chapters;
26
33
  private _overviewTeardown;
@@ -30,6 +37,10 @@ export declare class DeckRoot extends LitElement {
30
37
  private _swipeStartX;
31
38
  private _swipeStartY;
32
39
  private _swipePointerId;
40
+ private _navDownX;
41
+ private _navDownY;
42
+ private _wheelAccum;
43
+ private _wheelLockUntil;
33
44
  firstUpdated(): void;
34
45
  disconnectedCallback(): void;
35
46
  private _startAutoplay;
@@ -37,12 +48,31 @@ export declare class DeckRoot extends LitElement {
37
48
  private _autoTick;
38
49
  private _onHoverEnter;
39
50
  private _onHoverLeave;
51
+ /** Any explicit user navigation resets the autoplay countdown so the press
52
+ * isn't immediately followed by an auto-advance. */
53
+ private _restartAutoplay;
40
54
  private _onPointerDown;
41
55
  private _onPointerUp;
56
+ private _onNavPointerDown;
57
+ /** Click anywhere → advance (Shift+click → back) · PowerPoint-style.
58
+ * Skips interactive targets, our own chrome, text selections and drags. */
59
+ private _onClickNav;
60
+ /** Wheel over a scrollable descendant (overflowing code block, …) must stay
61
+ * a native scroll · only wheel on the deck shell itself navigates. */
62
+ private _wheelTargetScrolls;
63
+ private _onWheel;
64
+ /** Mouse back/forward buttons (3/4) · act on mouseup, suppress the
65
+ * browser's history navigation best-effort on auxclick. */
66
+ private _onAuxUp;
67
+ private _onAuxClick;
42
68
  /** Group slides into chapters bounded by <deck-section> markers. */
43
69
  private _buildChapters;
44
- /** True when at least one chapter has multiple slides and there are 2+ chapters. */
70
+ /** 2D navigation is opt-in via `nav="2d"` · it also needs the structure to
71
+ * make sense (2+ chapters, at least one with multiple slides). Without the
72
+ * opt-in, arrows stay linear so a sectioned deck doesn't surprise the author
73
+ * by remapping ← / → to chapter jumps. */
45
74
  private _has2DNav;
75
+ private _mouseEnabled;
46
76
  /** Flat index → {chapter, intra-chapter index}. */
47
77
  private _coords;
48
78
  private _flatFromCoords;
@@ -66,6 +96,7 @@ export declare class DeckRoot extends LitElement {
66
96
  private _applyStep;
67
97
  private _updateUI;
68
98
  updated(): void;
99
+ private _navArrows;
69
100
  render(): unknown;
70
101
  }
71
102
  declare global {
@@ -73,4 +104,3 @@ declare global {
73
104
  'deck-root': DeckRoot;
74
105
  }
75
106
  }
76
- //# sourceMappingURL=deck-root.d.ts.map
@@ -1,3 +1,2 @@
1
1
  import type { DeckRoot } from './deck-root.js';
2
2
  export declare function installTransitions(host: DeckRoot): () => void;
3
- //# sourceMappingURL=deck-transition.d.ts.map
@@ -2,4 +2,3 @@ export declare const slideShell: import("lit").CSSResult;
2
2
  export declare const typo: import("lit").CSSResult;
3
3
  export declare const helpers: import("lit").CSSResult;
4
4
  export declare const slideBase: import("lit").CSSResult[];
5
- //# sourceMappingURL=shared-styles.d.ts.map