@slidev-react/core 0.2.4 → 0.2.6
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.
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { LayoutRegistry, ThemeMDXComponents } from "../theme/types.js";
|
|
2
|
+
import { ComponentType, ReactNode } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/addon/types.d.ts
|
|
5
|
+
type AddonProviderComponent = ComponentType<{
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
}>;
|
|
8
|
+
interface SlideAddonDefinition {
|
|
9
|
+
id: string;
|
|
10
|
+
label: string;
|
|
11
|
+
experimental?: boolean;
|
|
12
|
+
provider?: AddonProviderComponent;
|
|
13
|
+
layouts?: LayoutRegistry;
|
|
14
|
+
mdxComponents?: ThemeMDXComponents;
|
|
15
|
+
}
|
|
16
|
+
interface ResolvedSlideAddons {
|
|
17
|
+
definitions: SlideAddonDefinition[];
|
|
18
|
+
providers: AddonProviderComponent[];
|
|
19
|
+
layouts: LayoutRegistry;
|
|
20
|
+
mdxComponents: ThemeMDXComponents;
|
|
21
|
+
}
|
|
22
|
+
declare function defineAddon(addon: SlideAddonDefinition): SlideAddonDefinition;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { AddonProviderComponent, ResolvedSlideAddons, SlideAddonDefinition, defineAddon };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BuiltinLayoutName, LayoutName, layoutNames } from "./slides/layout.js";
|
|
1
2
|
import { createSlideImageFileName, createSlideSnapshotFileName, resolveExportSlidesBaseName, trimPdfExtension } from "./presentation/export/fileNames.js";
|
|
2
3
|
import { SlideRange, clampSlideSelection, createRangesFromSlides, createSlideSelectionLabel, expandSlideSelection, parseSlideSelection, toPdfPageRanges } from "./presentation/export/selection.js";
|
|
3
4
|
import { PresentationExportMode, buildPrintExportUrl, buildSlidesUrl, resolvePresentationExportMode, resolvePrintExportWithClicks } from "./presentation/export/urls.js";
|
|
@@ -5,7 +6,6 @@ import { normalizeConfiguredCueCount, resolveCueTotal } from "./presentation/flo
|
|
|
5
6
|
import { AdvanceFlowInput, FlowNavigationResult, RetreatFlowInput, canAdvanceFlow, canRetreatFlow, clampCueIndex, resolveAdvanceFlow, resolveRetreatFlow } from "./presentation/flow/navigation.js";
|
|
6
7
|
import { normalizeCueStep } from "./presentation/flow/step.js";
|
|
7
8
|
import { PRESENTATION_PROTOCOL_VERSION, PresentationCursorState, PresentationDrawPoint, PresentationDrawStroke, PresentationDrawingsState, PresentationEnvelope, PresentationHeartbeatEnvelope, PresentationJoinEnvelope, PresentationLeaveEnvelope, PresentationPatchEnvelope, PresentationRole, PresentationSharedState, PresentationSnapshotEnvelope, PresentationSyncMode, SyncedPresentationRole, parsePresentationDrawingsState, parsePresentationEnvelope } from "./presentation/session/protocol.js";
|
|
8
|
-
import { BuiltinLayoutName, LayoutName, layoutNames } from "./slides/layout.js";
|
|
9
9
|
import { TransitionName, transitionNames } from "./slides/transition.js";
|
|
10
10
|
import { SlideComponent, SlideMeta, SlideUnit } from "./slides/slide.js";
|
|
11
11
|
import { DEFAULT_SLIDES_AR, DEFAULT_SLIDES_VIEWPORT, SlidesViewport, formatViewportAspectRatio, isPortraitViewport, resolvePrintPageSize, resolveSlidesViewportMeta } from "./slides/viewport.js";
|
|
@@ -21,8 +21,8 @@ interface PresentationDrawStroke {
|
|
|
21
21
|
type PresentationDrawingsState = Record<string, PresentationDrawStroke[]>;
|
|
22
22
|
interface PresentationSharedState {
|
|
23
23
|
page: number;
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
cue: number;
|
|
25
|
+
cueTotal: number;
|
|
26
26
|
timer: number;
|
|
27
27
|
cursor: PresentationCursorState | null;
|
|
28
28
|
drawings: PresentationDrawingsState;
|
|
@@ -23,8 +23,8 @@ const presentationDrawStrokeSchema = z.object({
|
|
|
23
23
|
const presentationDrawingsStateSchema = z.record(z.string(), z.array(presentationDrawStrokeSchema));
|
|
24
24
|
const presentationSharedStateSchema = z.object({
|
|
25
25
|
page: z.number(),
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
cue: z.number(),
|
|
27
|
+
cueTotal: z.number(),
|
|
28
28
|
timer: z.number(),
|
|
29
29
|
cursor: presentationCursorStateSchema.nullable(),
|
|
30
30
|
drawings: presentationDrawingsStateSchema,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slidev-react/core",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Pure presentation models, flow, and shared contracts for slidev-react",
|
|
6
6
|
"license": "MIT",
|
|
@@ -67,6 +67,10 @@
|
|
|
67
67
|
"./theme": {
|
|
68
68
|
"types": "./dist/theme/types.d.ts",
|
|
69
69
|
"import": "./dist/theme/types.js"
|
|
70
|
+
},
|
|
71
|
+
"./addon": {
|
|
72
|
+
"types": "./dist/addon/types.d.ts",
|
|
73
|
+
"import": "./dist/addon/types.js"
|
|
70
74
|
}
|
|
71
75
|
},
|
|
72
76
|
"dependencies": {
|