markdown-flow-ui 0.2.24 → 0.2.25-dev.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.
@@ -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;"}
package/package.json CHANGED
@@ -182,7 +182,7 @@
182
182
  ]
183
183
  }
184
184
  },
185
- "version": "0.2.24",
185
+ "version": "0.2.25-dev.2",
186
186
  "type": "module",
187
187
  "exports": {
188
188
  ".": {