markdown-flow-ui 0.2.25-dev.1 → 0.2.25-dev.3
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/dist/components/Slide/Slide.cjs +1 -1
- package/dist/components/Slide/Slide.cjs.map +1 -1
- package/dist/components/Slide/Slide.d.ts +17 -0
- package/dist/components/Slide/Slide.es.js +786 -738
- package/dist/components/Slide/Slide.es.js.map +1 -1
- package/dist/components/Slide/index.d.ts +1 -1
- package/dist/components/Slide/utils/requestedStepNavigation.cjs +2 -0
- package/dist/components/Slide/utils/requestedStepNavigation.cjs.map +1 -0
- package/dist/components/Slide/utils/requestedStepNavigation.d.ts +9 -0
- package/dist/components/Slide/utils/requestedStepNavigation.es.js +18 -0
- package/dist/components/Slide/utils/requestedStepNavigation.es.js.map +1 -0
- package/dist/components/Slide/utils/requestedStepNavigation.test.d.ts +1 -0
- package/dist/components/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ import { getInteractionDefaultSelectedValues, getInteractionDefaultValues } from
|
|
|
5
5
|
import { default as useSlide } from './useSlide.js';
|
|
6
6
|
export default Slide;
|
|
7
7
|
export { Slide, applyDiffElement, applyUnifiedDiff, parseUnifiedDiff, splitDiffContent, Player, useSlide, getInteractionDefaultValues, getInteractionDefaultSelectedValues, };
|
|
8
|
-
export type { SlideInteractionTexts, SlideFullscreenHeader, SlidePlayerControlsVisibility, SlideProps, } from './Slide.js';
|
|
8
|
+
export type { SlideInteractionTexts, SlideFullscreenHeader, SlidePlaybackPosition, SlidePlaybackResumeRequest, SlidePlayerControlsVisibility, SlideProps, } from './Slide.js';
|
|
9
9
|
export type { InteractionDefaultResolver, InteractionDefaultResolverParams, InteractionDefaultValueOptions, InteractionDefaultValues, InteractionParseResult, } from '../../lib/interaction-defaults.js';
|
|
10
10
|
export type { Element, ElementAudioSegment, ElementSubtitleCue, SlidePlayerCustomActionContext, SlidePlayerCustomActions, } from './types.js';
|
|
11
11
|
export type { PlayerProps, SlidePlayerNavigationContext, SlidePlayerTexts, } from './Player.js';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=({currentStepIndex:i,requestedStepIndex:e,slideStepCount:n})=>{if(typeof e!="number"||!Number.isFinite(e))return null;const t=Math.max(0,Math.trunc(e));return{isAvailable:t<n,isPending:t!==i,targetStepIndex:t}};exports.resolveRequestedStepNavigation=a;
|
|
2
|
+
//# sourceMappingURL=requestedStepNavigation.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requestedStepNavigation.cjs","sources":["../../../../src/components/Slide/utils/requestedStepNavigation.ts"],"sourcesContent":["export const resolveRequestedStepNavigation = ({\n currentStepIndex,\n requestedStepIndex,\n slideStepCount,\n}: {\n currentStepIndex: number;\n requestedStepIndex: number | undefined;\n slideStepCount: number;\n}) => {\n if (\n typeof requestedStepIndex !== \"number\" ||\n !Number.isFinite(requestedStepIndex)\n ) {\n return null;\n }\n\n const targetStepIndex = Math.max(0, Math.trunc(requestedStepIndex));\n\n return {\n isAvailable: targetStepIndex < slideStepCount,\n isPending: targetStepIndex !== currentStepIndex,\n targetStepIndex,\n };\n};\n"],"names":["resolveRequestedStepNavigation","currentStepIndex","requestedStepIndex","slideStepCount","targetStepIndex"],"mappings":"gFAAO,MAAMA,EAAiC,CAAC,CAC7C,iBAAAC,EACA,mBAAAC,EACA,eAAAC,CACF,IAIM,CACJ,GACE,OAAOD,GAAuB,UAC9B,CAAC,OAAO,SAASA,CAAkB,EAEnC,OAAO,KAGT,MAAME,EAAkB,KAAK,IAAI,EAAG,KAAK,MAAMF,CAAkB,CAAC,EAElE,MAAO,CACL,YAAaE,EAAkBD,EAC/B,UAAWC,IAAoBH,EAC/B,gBAAAG,CAAA,CAEJ"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const resolveRequestedStepNavigation: ({ currentStepIndex, requestedStepIndex, slideStepCount, }: {
|
|
2
|
+
currentStepIndex: number;
|
|
3
|
+
requestedStepIndex: number | undefined;
|
|
4
|
+
slideStepCount: number;
|
|
5
|
+
}) => {
|
|
6
|
+
isAvailable: boolean;
|
|
7
|
+
isPending: boolean;
|
|
8
|
+
targetStepIndex: number;
|
|
9
|
+
} | null;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const e = ({
|
|
2
|
+
currentStepIndex: n,
|
|
3
|
+
requestedStepIndex: t,
|
|
4
|
+
slideStepCount: a
|
|
5
|
+
}) => {
|
|
6
|
+
if (typeof t != "number" || !Number.isFinite(t))
|
|
7
|
+
return null;
|
|
8
|
+
const i = Math.max(0, Math.trunc(t));
|
|
9
|
+
return {
|
|
10
|
+
isAvailable: i < a,
|
|
11
|
+
isPending: i !== n,
|
|
12
|
+
targetStepIndex: i
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
e as resolveRequestedStepNavigation
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=requestedStepNavigation.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requestedStepNavigation.es.js","sources":["../../../../src/components/Slide/utils/requestedStepNavigation.ts"],"sourcesContent":["export const resolveRequestedStepNavigation = ({\n currentStepIndex,\n requestedStepIndex,\n slideStepCount,\n}: {\n currentStepIndex: number;\n requestedStepIndex: number | undefined;\n slideStepCount: number;\n}) => {\n if (\n typeof requestedStepIndex !== \"number\" ||\n !Number.isFinite(requestedStepIndex)\n ) {\n return null;\n }\n\n const targetStepIndex = Math.max(0, Math.trunc(requestedStepIndex));\n\n return {\n isAvailable: targetStepIndex < slideStepCount,\n isPending: targetStepIndex !== currentStepIndex,\n targetStepIndex,\n };\n};\n"],"names":["resolveRequestedStepNavigation","currentStepIndex","requestedStepIndex","slideStepCount","targetStepIndex"],"mappings":"AAAO,MAAMA,IAAiC,CAAC;AAAA,EAC7C,kBAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,gBAAAC;AACF,MAIM;AACJ,MACE,OAAOD,KAAuB,YAC9B,CAAC,OAAO,SAASA,CAAkB;AAEnC,WAAO;AAGT,QAAME,IAAkB,KAAK,IAAI,GAAG,KAAK,MAAMF,CAAkB,CAAC;AAElE,SAAO;AAAA,IACL,aAAaE,IAAkBD;AAAA,IAC/B,WAAWC,MAAoBH;AAAA,IAC/B,iBAAAG;AAAA,EAAA;AAEJ;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -16,7 +16,7 @@ export type { ContentRenderProps, ContentRenderTypewriterPacing, ContentRenderTy
|
|
|
16
16
|
export type { MarkdownFlowLocale } from '../lib/locale.js';
|
|
17
17
|
export type { OnSendContentParams, CustomRenderBarProps } from './types.js';
|
|
18
18
|
export type { EditMode, UploadProps, ImageResource, } from './MarkdownFlowEditor/index.js';
|
|
19
|
-
export type { Element, ElementSubtitleCue, SlideInteractionTexts, SlidePlayerControlsVisibility, SlideProps, } from './Slide/index.js';
|
|
19
|
+
export type { Element, ElementSubtitleCue, SlideInteractionTexts, SlidePlaybackPosition, SlidePlaybackResumeRequest, SlidePlayerControlsVisibility, SlideProps, } from './Slide/index.js';
|
|
20
20
|
export type { InteractionDefaultResolver, InteractionDefaultResolverParams, InteractionDefaultValueOptions, InteractionDefaultValues, InteractionParseResult, } from '../lib/interaction-defaults.js';
|
|
21
21
|
export type { PlayerProps, SlidePlayerNavigationContext } from './Slide/index.js';
|
|
22
22
|
export type { UseSlideResult } from './Slide/index.js';
|