@reslide-dev/core 0.2.1 → 0.2.2

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.
@@ -670,6 +670,35 @@ function ProgressBar() {
670
670
  });
671
671
  }
672
672
  //#endregion
673
+ //#region src/SlideNumber.tsx
674
+ /**
675
+ * Displays the current slide number in the bottom-right corner.
676
+ * Automatically reads state from DeckContext.
677
+ */
678
+ function SlideNumber() {
679
+ const { currentSlide, totalSlides } = useDeck();
680
+ return /* @__PURE__ */ jsxs("div", {
681
+ className: "reslide-slide-number",
682
+ style: {
683
+ position: "absolute",
684
+ bottom: "0.75rem",
685
+ right: "1rem",
686
+ fontSize: "0.75rem",
687
+ fontFamily: "system-ui, sans-serif",
688
+ fontVariantNumeric: "tabular-nums",
689
+ color: "var(--slide-text, #1a1a1a)",
690
+ opacity: .4,
691
+ pointerEvents: "none",
692
+ zIndex: 10
693
+ },
694
+ children: [
695
+ currentSlide + 1,
696
+ " / ",
697
+ totalSlides
698
+ ]
699
+ });
700
+ }
701
+ //#endregion
673
702
  //#region src/SlideTransition.tsx
674
703
  const DURATION = 300;
675
704
  function SlideTransition({ children, currentSlide, transition }) {
@@ -934,6 +963,7 @@ function Deck({ children, transition = "none" }) {
934
963
  disabled: isDrawing
935
964
  }),
936
965
  !isOverview && !isPrinting && /* @__PURE__ */ jsx(ProgressBar, {}),
966
+ !isOverview && !isPrinting && /* @__PURE__ */ jsx(SlideNumber, {}),
937
967
  !isOverview && !isPrinting && /* @__PURE__ */ jsx(DrawingLayer, {
938
968
  active: isDrawing,
939
969
  currentSlide
@@ -1746,4 +1776,4 @@ function Mermaid({ children }) {
1746
1776
  });
1747
1777
  }
1748
1778
  //#endregion
1749
- export { ClickNavigation as C, useDeck as S, NavigationBar as _, PresenterView as a, DrawingLayer as b, Mark as c, Slide as d, Deck as f, useSlideIndex as g, SlideIndexContext as h, GlobalLayer as i, Click as l, PrintView as m, Toc as n, SlotRight as o, ProgressBar as p, Draggable as r, Notes as s, Mermaid as t, ClickSteps as u, isPresenterView as v, DeckContext as x, openPresenterWindow as y };
1779
+ export { useDeck as C, DeckContext as S, useSlideIndex as _, PresenterView as a, openPresenterWindow as b, Mark as c, Slide as d, Deck as f, SlideIndexContext as g, PrintView as h, GlobalLayer as i, Click as l, ProgressBar as m, Toc as n, SlotRight as o, SlideNumber as p, Draggable as r, Notes as s, Mermaid as t, ClickSteps as u, NavigationBar as v, ClickNavigation as w, DrawingLayer as x, isPresenterView as y };
package/dist/index.d.mts CHANGED
@@ -101,6 +101,13 @@ declare function NavigationBar({
101
101
  //#region src/ProgressBar.d.ts
102
102
  declare function ProgressBar(): react_jsx_runtime0.JSX.Element;
103
103
  //#endregion
104
+ //#region src/SlideNumber.d.ts
105
+ /**
106
+ * Displays the current slide number in the bottom-right corner.
107
+ * Automatically reads state from DeckContext.
108
+ */
109
+ declare function SlideNumber(): react_jsx_runtime0.JSX.Element;
110
+ //#endregion
104
111
  //#region src/ReslideEmbed.d.ts
105
112
  interface ReslideEmbedProps {
106
113
  /** Compiled MDX code from compileMdxSlides() */
@@ -175,4 +182,4 @@ declare function useDeck(): DeckContextValue;
175
182
  declare const SlideIndexContext: react.Context<number | null>;
176
183
  declare function useSlideIndex(): number;
177
184
  //#endregion
178
- export { Click, ClickNavigation, type ClickProps, ClickSteps, CodeEditor, type CodeEditorProps, Deck, type DeckActions, DeckContext, type DeckContextValue, type DeckProps, type DeckState, Draggable, type DraggableProps, DrawingLayer, type DrawingLayerProps, GlobalLayer, type GlobalLayerProps, Mark, type MarkProps, Mermaid, type MermaidProps, NavigationBar, Notes, type NotesProps, PresenterView, type PresenterViewProps, PrintView, ProgressBar, ReslideEmbed, type ReslideEmbedProps, Slide, SlideIndexContext, type SlideProps, SlotRight, Toc, type TocProps, type TransitionType, isPresenterView, openPresenterWindow, useDeck, useSlideIndex };
185
+ export { Click, ClickNavigation, type ClickProps, ClickSteps, CodeEditor, type CodeEditorProps, Deck, type DeckActions, DeckContext, type DeckContextValue, type DeckProps, type DeckState, Draggable, type DraggableProps, DrawingLayer, type DrawingLayerProps, GlobalLayer, type GlobalLayerProps, Mark, type MarkProps, Mermaid, type MermaidProps, NavigationBar, Notes, type NotesProps, PresenterView, type PresenterViewProps, PrintView, ProgressBar, ReslideEmbed, type ReslideEmbedProps, Slide, SlideIndexContext, SlideNumber, type SlideProps, SlotRight, Toc, type TocProps, type TransitionType, isPresenterView, openPresenterWindow, useDeck, useSlideIndex };
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { C as ClickNavigation, S as useDeck, _ as NavigationBar, a as PresenterView, b as DrawingLayer, c as Mark, d as Slide, f as Deck, g as useSlideIndex, h as SlideIndexContext, i as GlobalLayer, l as Click, m as PrintView, n as Toc, o as SlotRight, p as ProgressBar, r as Draggable, s as Notes, t as Mermaid, u as ClickSteps, v as isPresenterView, x as DeckContext, y as openPresenterWindow } from "./Mermaid-BtXG2Ea2.mjs";
1
+ import { C as useDeck, S as DeckContext, _ as useSlideIndex, a as PresenterView, b as openPresenterWindow, c as Mark, d as Slide, f as Deck, g as SlideIndexContext, h as PrintView, i as GlobalLayer, l as Click, m as ProgressBar, n as Toc, o as SlotRight, p as SlideNumber, r as Draggable, s as Notes, t as Mermaid, u as ClickSteps, v as NavigationBar, w as ClickNavigation, x as DrawingLayer, y as isPresenterView } from "./Mermaid-CUCMRIkQ.mjs";
2
2
  import { Fragment, useCallback, useEffect, useRef, useState } from "react";
3
3
  import * as runtime from "react/jsx-runtime";
4
4
  import { jsx } from "react/jsx-runtime";
@@ -117,7 +117,10 @@ const builtinComponents = {
117
117
  Notes,
118
118
  SlotRight,
119
119
  GlobalLayer,
120
- Draggable
120
+ Draggable,
121
+ Mermaid,
122
+ Toc,
123
+ CodeEditor
121
124
  };
122
125
  /**
123
126
  * Renders compiled MDX slides as a full reslide presentation.
@@ -177,4 +180,4 @@ function ReslideEmbed({ code, transition, components: userComponents, className,
177
180
  });
178
181
  }
179
182
  //#endregion
180
- export { Click, ClickNavigation, ClickSteps, CodeEditor, Deck, DeckContext, Draggable, DrawingLayer, GlobalLayer, Mark, Mermaid, NavigationBar, Notes, PresenterView, PrintView, ProgressBar, ReslideEmbed, Slide, SlideIndexContext, SlotRight, Toc, isPresenterView, openPresenterWindow, useDeck, useSlideIndex };
183
+ export { Click, ClickNavigation, ClickSteps, CodeEditor, Deck, DeckContext, Draggable, DrawingLayer, GlobalLayer, Mark, Mermaid, NavigationBar, Notes, PresenterView, PrintView, ProgressBar, ReslideEmbed, Slide, SlideIndexContext, SlideNumber, SlotRight, Toc, isPresenterView, openPresenterWindow, useDeck, useSlideIndex };
@@ -1,4 +1,4 @@
1
- import { a as PresenterView, c as Mark, d as Slide, f as Deck, i as GlobalLayer, l as Click, n as Toc, o as SlotRight, r as Draggable, s as Notes, t as Mermaid, u as ClickSteps, v as isPresenterView } from "./Mermaid-BtXG2Ea2.mjs";
1
+ import { a as PresenterView, c as Mark, d as Slide, f as Deck, i as GlobalLayer, l as Click, n as Toc, o as SlotRight, r as Draggable, s as Notes, t as Mermaid, u as ClickSteps, y as isPresenterView } from "./Mermaid-CUCMRIkQ.mjs";
2
2
  //#region src/mdx-components.ts
3
3
  const reslideComponents = {
4
4
  Deck,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reslide-dev/core",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Framework-agnostic React presentation components",
5
5
  "license": "MIT",
6
6
  "files": [