markdown-flow-ui 0.2.3-dev.1 → 0.2.3-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.
- package/dist/components/ContentRender/SandboxApp.cjs.js +2 -2
- package/dist/components/ContentRender/SandboxApp.cjs.js.map +1 -1
- package/dist/components/ContentRender/SandboxApp.es.js +95 -106
- package/dist/components/ContentRender/SandboxApp.es.js.map +1 -1
- package/dist/components/Slide/Slide.cjs.js +1 -1
- package/dist/components/Slide/Slide.cjs.js.map +1 -1
- package/dist/components/Slide/Slide.es.js +732 -776
- package/dist/components/Slide/Slide.es.js.map +1 -1
- package/dist/components/Slide/Slide.stories.d.ts +4 -4
- package/dist/components/Slide/constants.d.ts +0 -1
- package/dist/components/Slide/utils/interactionPlayback.cjs.js +1 -1
- package/dist/components/Slide/utils/interactionPlayback.cjs.js.map +1 -1
- package/dist/components/Slide/utils/interactionPlayback.d.ts +2 -1
- package/dist/components/Slide/utils/interactionPlayback.es.js +3 -2
- package/dist/components/Slide/utils/interactionPlayback.es.js.map +1 -1
- package/dist/components/Slide/utils/streamingNavigation.cjs.js +1 -1
- package/dist/components/Slide/utils/streamingNavigation.cjs.js.map +1 -1
- package/dist/components/Slide/utils/streamingNavigation.es.js +15 -9
- package/dist/components/Slide/utils/streamingNavigation.es.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/ContentRender/utils/link-targets.cjs.js +0 -2
- package/dist/components/ContentRender/utils/link-targets.cjs.js.map +0 -1
- package/dist/components/ContentRender/utils/link-targets.d.ts +0 -6
- package/dist/components/ContentRender/utils/link-targets.es.js +0 -26
- package/dist/components/ContentRender/utils/link-targets.es.js.map +0 -1
- package/dist/components/ContentRender/utils/link-targets.test.d.ts +0 -1
- package/dist/components/Slide/constants.cjs.js +0 -2
- package/dist/components/Slide/constants.cjs.js.map +0 -1
- package/dist/components/Slide/constants.es.js +0 -5
- package/dist/components/Slide/constants.es.js.map +0 -1
- package/dist/components/Slide/utils/imageOnlyStepVisualReady.cjs.js +0 -2
- package/dist/components/Slide/utils/imageOnlyStepVisualReady.cjs.js.map +0 -1
- package/dist/components/Slide/utils/imageOnlyStepVisualReady.d.ts +0 -13
- package/dist/components/Slide/utils/imageOnlyStepVisualReady.es.js +0 -12
- package/dist/components/Slide/utils/imageOnlyStepVisualReady.es.js.map +0 -1
- package/dist/components/Slide/utils/silentStepAutoAdvance.cjs.js +0 -2
- package/dist/components/Slide/utils/silentStepAutoAdvance.cjs.js.map +0 -1
- package/dist/components/Slide/utils/silentStepAutoAdvance.d.ts +0 -14
- package/dist/components/Slide/utils/silentStepAutoAdvance.es.js +0 -37
- package/dist/components/Slide/utils/silentStepAutoAdvance.es.js.map +0 -1
- package/dist/components/Slide/utils/silentStepAutoAdvance.test.d.ts +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interactionPlayback.cjs.js","sources":["../../../../src/components/Slide/utils/interactionPlayback.ts"],"sourcesContent":["interface ShouldPresentInteractionOverlayParams {\n hasInteraction: boolean;\n shouldBlockPlaybackForInteraction: boolean;\n shouldOpenInteractionOverlayAfterAudio: boolean;\n hasPlaybackContextChanged: boolean;\n hasResolvedCurrentInteraction: boolean;\n currentStepHasSpeakableElement: boolean;\n}\n\nexport const shouldPresentInteractionOverlay = ({\n hasInteraction,\n shouldBlockPlaybackForInteraction,\n shouldOpenInteractionOverlayAfterAudio,\n hasPlaybackContextChanged,\n hasResolvedCurrentInteraction,\n currentStepHasSpeakableElement,\n}: ShouldPresentInteractionOverlayParams) => {\n if (!hasInteraction) {\n return false;\n }\n\n if (shouldBlockPlaybackForInteraction) {\n return true;\n }\n\n if (shouldOpenInteractionOverlayAfterAudio) {\n return true;\n }\n\n // Re-open the interaction entry state whenever playback navigates into\n // the interaction step so the notes action stays highlighted for history\n // playback and manual prev/next navigation.\n if (hasPlaybackContextChanged) {\n return true;\n }\n\n if (!hasResolvedCurrentInteraction) {\n return false;\n }\n\n // Once a resolved interaction step starts receiving follow-up speech,\n // keep the overlay closed so the step can continue as normal playback.\n return !currentStepHasSpeakableElement;\n};\n\nexport interface ShouldRenderInteractionOverlayParams {\n hasActiveInteraction: boolean;\n isInteractionOverlayOpen: boolean;\n shouldBlockPlaybackForInteraction: boolean;\n playerControlsVisible: boolean;\n shouldMountPlayer: boolean;\n}\n\nexport const shouldRenderInteractionOverlay = ({\n hasActiveInteraction,\n isInteractionOverlayOpen,\n shouldBlockPlaybackForInteraction,\n playerControlsVisible,\n shouldMountPlayer,\n}: ShouldRenderInteractionOverlayParams) => {\n if (!hasActiveInteraction || !isInteractionOverlayOpen) {\n return false;\n }\n\n if (\n shouldBlockPlaybackForInteraction &&\n shouldMountPlayer &&\n !playerControlsVisible\n ) {\n return false;\n }\n\n return true;\n};\n"],"names":["shouldPresentInteractionOverlay","hasInteraction","shouldBlockPlaybackForInteraction","shouldOpenInteractionOverlayAfterAudio","hasPlaybackContextChanged","hasResolvedCurrentInteraction","currentStepHasSpeakableElement","shouldRenderInteractionOverlay","hasActiveInteraction","isInteractionOverlayOpen","playerControlsVisible","shouldMountPlayer"],"mappings":"gFASO,MAAMA,EAAkC,CAAC,CAC9C,eAAAC,EACA,kCAAAC,EACA,uCAAAC,EACA,0BAAAC,EACA,8BAAAC,EACA,+BAAAC,CACF,IACOL,EAIDC,GAIAC,GAOAC,EACK,GAGJC,EAME,CAACC,EALC,GAnBA,
|
|
1
|
+
{"version":3,"file":"interactionPlayback.cjs.js","sources":["../../../../src/components/Slide/utils/interactionPlayback.ts"],"sourcesContent":["interface ShouldPresentInteractionOverlayParams {\n hasInteraction: boolean;\n shouldBlockPlaybackForInteraction: boolean;\n shouldOpenInteractionOverlayAfterAudio: boolean;\n hasPlaybackContextChanged: boolean;\n hasResolvedCurrentInteraction: boolean;\n currentStepHasSpeakableElement: boolean;\n}\n\nexport const shouldPresentInteractionOverlay = ({\n hasInteraction,\n shouldBlockPlaybackForInteraction,\n shouldOpenInteractionOverlayAfterAudio,\n hasPlaybackContextChanged,\n hasResolvedCurrentInteraction,\n currentStepHasSpeakableElement,\n}: ShouldPresentInteractionOverlayParams) => {\n if (!hasInteraction) {\n return false;\n }\n\n if (shouldBlockPlaybackForInteraction) {\n return true;\n }\n\n if (shouldOpenInteractionOverlayAfterAudio) {\n return true;\n }\n\n // Re-open the interaction entry state whenever playback navigates into\n // the interaction step so the notes action stays highlighted for history\n // playback and manual prev/next navigation.\n if (hasPlaybackContextChanged) {\n return true;\n }\n\n if (!hasResolvedCurrentInteraction) {\n return false;\n }\n\n // Once a resolved interaction step starts receiving follow-up speech,\n // keep the overlay closed so the step can continue as normal playback.\n return !currentStepHasSpeakableElement;\n};\n\nexport interface ShouldRenderInteractionOverlayParams {\n hasActiveInteraction: boolean;\n isInteractionOverlayOpen: boolean;\n shouldBlockPlaybackForInteraction: boolean;\n playerControlsVisible: boolean;\n shouldMountPlayer: boolean;\n hasFocusedTextInput: boolean;\n}\n\nexport const shouldRenderInteractionOverlay = ({\n hasActiveInteraction,\n isInteractionOverlayOpen,\n shouldBlockPlaybackForInteraction,\n playerControlsVisible,\n shouldMountPlayer,\n hasFocusedTextInput,\n}: ShouldRenderInteractionOverlayParams) => {\n if (!hasActiveInteraction || !isInteractionOverlayOpen) {\n return false;\n }\n\n if (hasFocusedTextInput) {\n return true;\n }\n\n if (\n shouldBlockPlaybackForInteraction &&\n shouldMountPlayer &&\n !playerControlsVisible\n ) {\n return false;\n }\n\n return true;\n};\n"],"names":["shouldPresentInteractionOverlay","hasInteraction","shouldBlockPlaybackForInteraction","shouldOpenInteractionOverlayAfterAudio","hasPlaybackContextChanged","hasResolvedCurrentInteraction","currentStepHasSpeakableElement","shouldRenderInteractionOverlay","hasActiveInteraction","isInteractionOverlayOpen","playerControlsVisible","shouldMountPlayer","hasFocusedTextInput"],"mappings":"gFASO,MAAMA,EAAkC,CAAC,CAC9C,eAAAC,EACA,kCAAAC,EACA,uCAAAC,EACA,0BAAAC,EACA,8BAAAC,EACA,+BAAAC,CACF,IACOL,EAIDC,GAIAC,GAOAC,EACK,GAGJC,EAME,CAACC,EALC,GAnBA,GAoCEC,EAAiC,CAAC,CAC7C,qBAAAC,EACA,yBAAAC,EACA,kCAAAP,EACA,sBAAAQ,EACA,kBAAAC,EACA,oBAAAC,CACF,IACM,CAACJ,GAAwB,CAACC,EACrB,GAGLG,EACK,GAIP,EAAAV,GACAS,GACA,CAACD"}
|
|
@@ -13,6 +13,7 @@ export interface ShouldRenderInteractionOverlayParams {
|
|
|
13
13
|
shouldBlockPlaybackForInteraction: boolean;
|
|
14
14
|
playerControlsVisible: boolean;
|
|
15
15
|
shouldMountPlayer: boolean;
|
|
16
|
+
hasFocusedTextInput: boolean;
|
|
16
17
|
}
|
|
17
|
-
export declare const shouldRenderInteractionOverlay: ({ hasActiveInteraction, isInteractionOverlayOpen, shouldBlockPlaybackForInteraction, playerControlsVisible, shouldMountPlayer, }: ShouldRenderInteractionOverlayParams) => boolean;
|
|
18
|
+
export declare const shouldRenderInteractionOverlay: ({ hasActiveInteraction, isInteractionOverlayOpen, shouldBlockPlaybackForInteraction, playerControlsVisible, shouldMountPlayer, hasFocusedTextInput, }: ShouldRenderInteractionOverlayParams) => boolean;
|
|
18
19
|
export {};
|
|
@@ -10,8 +10,9 @@ const i = ({
|
|
|
10
10
|
isInteractionOverlayOpen: e,
|
|
11
11
|
shouldBlockPlaybackForInteraction: t,
|
|
12
12
|
playerControlsVisible: n,
|
|
13
|
-
shouldMountPlayer: u
|
|
14
|
-
|
|
13
|
+
shouldMountPlayer: u,
|
|
14
|
+
hasFocusedTextInput: f
|
|
15
|
+
}) => !r || !e ? !1 : f ? !0 : !(t && u && !n);
|
|
15
16
|
export {
|
|
16
17
|
i as shouldPresentInteractionOverlay,
|
|
17
18
|
s as shouldRenderInteractionOverlay
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interactionPlayback.es.js","sources":["../../../../src/components/Slide/utils/interactionPlayback.ts"],"sourcesContent":["interface ShouldPresentInteractionOverlayParams {\n hasInteraction: boolean;\n shouldBlockPlaybackForInteraction: boolean;\n shouldOpenInteractionOverlayAfterAudio: boolean;\n hasPlaybackContextChanged: boolean;\n hasResolvedCurrentInteraction: boolean;\n currentStepHasSpeakableElement: boolean;\n}\n\nexport const shouldPresentInteractionOverlay = ({\n hasInteraction,\n shouldBlockPlaybackForInteraction,\n shouldOpenInteractionOverlayAfterAudio,\n hasPlaybackContextChanged,\n hasResolvedCurrentInteraction,\n currentStepHasSpeakableElement,\n}: ShouldPresentInteractionOverlayParams) => {\n if (!hasInteraction) {\n return false;\n }\n\n if (shouldBlockPlaybackForInteraction) {\n return true;\n }\n\n if (shouldOpenInteractionOverlayAfterAudio) {\n return true;\n }\n\n // Re-open the interaction entry state whenever playback navigates into\n // the interaction step so the notes action stays highlighted for history\n // playback and manual prev/next navigation.\n if (hasPlaybackContextChanged) {\n return true;\n }\n\n if (!hasResolvedCurrentInteraction) {\n return false;\n }\n\n // Once a resolved interaction step starts receiving follow-up speech,\n // keep the overlay closed so the step can continue as normal playback.\n return !currentStepHasSpeakableElement;\n};\n\nexport interface ShouldRenderInteractionOverlayParams {\n hasActiveInteraction: boolean;\n isInteractionOverlayOpen: boolean;\n shouldBlockPlaybackForInteraction: boolean;\n playerControlsVisible: boolean;\n shouldMountPlayer: boolean;\n}\n\nexport const shouldRenderInteractionOverlay = ({\n hasActiveInteraction,\n isInteractionOverlayOpen,\n shouldBlockPlaybackForInteraction,\n playerControlsVisible,\n shouldMountPlayer,\n}: ShouldRenderInteractionOverlayParams) => {\n if (!hasActiveInteraction || !isInteractionOverlayOpen) {\n return false;\n }\n\n if (\n shouldBlockPlaybackForInteraction &&\n shouldMountPlayer &&\n !playerControlsVisible\n ) {\n return false;\n }\n\n return true;\n};\n"],"names":["shouldPresentInteractionOverlay","hasInteraction","shouldBlockPlaybackForInteraction","shouldOpenInteractionOverlayAfterAudio","hasPlaybackContextChanged","hasResolvedCurrentInteraction","currentStepHasSpeakableElement","shouldRenderInteractionOverlay","hasActiveInteraction","isInteractionOverlayOpen","playerControlsVisible","shouldMountPlayer"],"mappings":"AASO,MAAMA,IAAkC,CAAC;AAAA,EAC9C,gBAAAC;AAAA,EACA,mCAAAC;AAAA,EACA,wCAAAC;AAAA,EACA,2BAAAC;AAAA,EACA,+BAAAC;AAAA,EACA,gCAAAC;AACF,MACOL,IAIDC,KAIAC,KAOAC,IACK,KAGJC,IAME,CAACC,IALC,KAnBA,
|
|
1
|
+
{"version":3,"file":"interactionPlayback.es.js","sources":["../../../../src/components/Slide/utils/interactionPlayback.ts"],"sourcesContent":["interface ShouldPresentInteractionOverlayParams {\n hasInteraction: boolean;\n shouldBlockPlaybackForInteraction: boolean;\n shouldOpenInteractionOverlayAfterAudio: boolean;\n hasPlaybackContextChanged: boolean;\n hasResolvedCurrentInteraction: boolean;\n currentStepHasSpeakableElement: boolean;\n}\n\nexport const shouldPresentInteractionOverlay = ({\n hasInteraction,\n shouldBlockPlaybackForInteraction,\n shouldOpenInteractionOverlayAfterAudio,\n hasPlaybackContextChanged,\n hasResolvedCurrentInteraction,\n currentStepHasSpeakableElement,\n}: ShouldPresentInteractionOverlayParams) => {\n if (!hasInteraction) {\n return false;\n }\n\n if (shouldBlockPlaybackForInteraction) {\n return true;\n }\n\n if (shouldOpenInteractionOverlayAfterAudio) {\n return true;\n }\n\n // Re-open the interaction entry state whenever playback navigates into\n // the interaction step so the notes action stays highlighted for history\n // playback and manual prev/next navigation.\n if (hasPlaybackContextChanged) {\n return true;\n }\n\n if (!hasResolvedCurrentInteraction) {\n return false;\n }\n\n // Once a resolved interaction step starts receiving follow-up speech,\n // keep the overlay closed so the step can continue as normal playback.\n return !currentStepHasSpeakableElement;\n};\n\nexport interface ShouldRenderInteractionOverlayParams {\n hasActiveInteraction: boolean;\n isInteractionOverlayOpen: boolean;\n shouldBlockPlaybackForInteraction: boolean;\n playerControlsVisible: boolean;\n shouldMountPlayer: boolean;\n hasFocusedTextInput: boolean;\n}\n\nexport const shouldRenderInteractionOverlay = ({\n hasActiveInteraction,\n isInteractionOverlayOpen,\n shouldBlockPlaybackForInteraction,\n playerControlsVisible,\n shouldMountPlayer,\n hasFocusedTextInput,\n}: ShouldRenderInteractionOverlayParams) => {\n if (!hasActiveInteraction || !isInteractionOverlayOpen) {\n return false;\n }\n\n if (hasFocusedTextInput) {\n return true;\n }\n\n if (\n shouldBlockPlaybackForInteraction &&\n shouldMountPlayer &&\n !playerControlsVisible\n ) {\n return false;\n }\n\n return true;\n};\n"],"names":["shouldPresentInteractionOverlay","hasInteraction","shouldBlockPlaybackForInteraction","shouldOpenInteractionOverlayAfterAudio","hasPlaybackContextChanged","hasResolvedCurrentInteraction","currentStepHasSpeakableElement","shouldRenderInteractionOverlay","hasActiveInteraction","isInteractionOverlayOpen","playerControlsVisible","shouldMountPlayer","hasFocusedTextInput"],"mappings":"AASO,MAAMA,IAAkC,CAAC;AAAA,EAC9C,gBAAAC;AAAA,EACA,mCAAAC;AAAA,EACA,wCAAAC;AAAA,EACA,2BAAAC;AAAA,EACA,+BAAAC;AAAA,EACA,gCAAAC;AACF,MACOL,IAIDC,KAIAC,KAOAC,IACK,KAGJC,IAME,CAACC,IALC,KAnBA,IAoCEC,IAAiC,CAAC;AAAA,EAC7C,sBAAAC;AAAA,EACA,0BAAAC;AAAA,EACA,mCAAAP;AAAA,EACA,uBAAAQ;AAAA,EACA,mBAAAC;AAAA,EACA,qBAAAC;AACF,MACM,CAACJ,KAAwB,CAACC,IACrB,KAGLG,IACK,KAIP,EAAAV,KACAS,KACA,CAACD;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=r=>!!(r?.type==="interaction"&&(r.readonly||r.user_input?.trim())),M=(r,n)=>r.length<=n.length&&r.every((a,c)=>a===n[c]),f=(r,n)=>n.length<=r.length&&n.every((a,c)=>{const h=r[c];return a.type===h?.type&&a.sequence_number===h?.sequence_number&&a.content===h?.content}),k=({previousIndex:r,previousSlideElementList:n,nextSlideElementList:a})=>{if(a.length===0)return-1;const c=a.length>n.length&&M(n,a),h=n.length-1,t=r===h,g=r>=0?n[r]:void 0;return c&&t&&o(g)?n.length:a.length<n.length&&f(n,a)&&a.length>0?Math.min(r,a.length-1):r>=0&&r<a.length?r:-1};exports.resolveNextSlideIndexAfterMarkerAppend=k;
|
|
2
2
|
//# sourceMappingURL=streamingNavigation.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"streamingNavigation.cjs.js","sources":["../../../../src/components/Slide/utils/streamingNavigation.ts"],"sourcesContent":["import type { Element } from \"../types\";\n\ninterface ResolveNextSlideIndexParams {\n previousIndex: number;\n previousSlideElementList: Element[];\n nextSlideElementList: Element[];\n}\n\nconst isResolvedInteractionElement = (element?: Element) =>\n Boolean(\n element?.type === \"interaction\" &&\n (element.readonly || element.user_input?.trim())\n );\n\nconst hasStableMarkerPrefix = (\n previousSlideElementList: Element[],\n nextSlideElementList: Element[]\n) =>\n previousSlideElementList.length <= nextSlideElementList.length &&\n previousSlideElementList.every(\n (element, index) => element === nextSlideElementList[index]\n );\n\nexport const resolveNextSlideIndexAfterMarkerAppend = ({\n previousIndex,\n previousSlideElementList,\n nextSlideElementList,\n}: ResolveNextSlideIndexParams) => {\n if (nextSlideElementList.length === 0) {\n return -1;\n }\n\n const hasAppendedMarkers =\n nextSlideElementList.length > previousSlideElementList.length &&\n hasStableMarkerPrefix(previousSlideElementList, nextSlideElementList);\n const previousLastMarkerIndex = previousSlideElementList.length - 1;\n const wasFocusedOnPreviousLastMarker =\n previousIndex === previousLastMarkerIndex;\n const previousCurrentElement =\n previousIndex >= 0 ? previousSlideElementList[previousIndex] : undefined;\n\n // When a resolved interaction is already the terminal step and SSE appends\n // the first follow-up marker, jump into that new marker immediately instead\n // of waiting for the interaction auto-close and silent-step delay.\n if (\n hasAppendedMarkers &&\n wasFocusedOnPreviousLastMarker &&\n isResolvedInteractionElement(previousCurrentElement)\n ) {\n return previousSlideElementList.length;\n }\n\n if (previousIndex >= 0 && previousIndex < nextSlideElementList.length) {\n return previousIndex;\n }\n\n return -1;\n};\n"],"names":["isResolvedInteractionElement","element","hasStableMarkerPrefix","previousSlideElementList","nextSlideElementList","index","resolveNextSlideIndexAfterMarkerAppend","previousIndex","hasAppendedMarkers","previousLastMarkerIndex","wasFocusedOnPreviousLastMarker","previousCurrentElement"],"mappings":"gFAQA,MAAMA,EAAgCC,GACpC,GACEA,GAAS,OAAS,gBACfA,EAAQ,UAAYA,EAAQ,YAAY,KAAA,IAGzCC,EAAwB,CAC5BC,EACAC,IAEAD,EAAyB,QAAUC,EAAqB,QACxDD,EAAyB,MACvB,CAACF,EAASI,IAAUJ,IAAYG,EAAqBC,CAAK,CAC5D,
|
|
1
|
+
{"version":3,"file":"streamingNavigation.cjs.js","sources":["../../../../src/components/Slide/utils/streamingNavigation.ts"],"sourcesContent":["import type { Element } from \"../types\";\n\ninterface ResolveNextSlideIndexParams {\n previousIndex: number;\n previousSlideElementList: Element[];\n nextSlideElementList: Element[];\n}\n\nconst isResolvedInteractionElement = (element?: Element) =>\n Boolean(\n element?.type === \"interaction\" &&\n (element.readonly || element.user_input?.trim())\n );\n\nconst hasStableMarkerPrefix = (\n previousSlideElementList: Element[],\n nextSlideElementList: Element[]\n) =>\n previousSlideElementList.length <= nextSlideElementList.length &&\n previousSlideElementList.every(\n (element, index) => element === nextSlideElementList[index]\n );\n\nconst hasStableMarkerIdentityPrefix = (\n previousSlideElementList: Element[],\n nextSlideElementList: Element[]\n) =>\n nextSlideElementList.length <= previousSlideElementList.length &&\n nextSlideElementList.every((element, index) => {\n const previousElement = previousSlideElementList[index];\n\n return (\n element.type === previousElement?.type &&\n element.sequence_number === previousElement?.sequence_number &&\n element.content === previousElement?.content\n );\n });\n\nexport const resolveNextSlideIndexAfterMarkerAppend = ({\n previousIndex,\n previousSlideElementList,\n nextSlideElementList,\n}: ResolveNextSlideIndexParams) => {\n if (nextSlideElementList.length === 0) {\n return -1;\n }\n\n const hasAppendedMarkers =\n nextSlideElementList.length > previousSlideElementList.length &&\n hasStableMarkerPrefix(previousSlideElementList, nextSlideElementList);\n const previousLastMarkerIndex = previousSlideElementList.length - 1;\n const wasFocusedOnPreviousLastMarker =\n previousIndex === previousLastMarkerIndex;\n const previousCurrentElement =\n previousIndex >= 0 ? previousSlideElementList[previousIndex] : undefined;\n\n // When a resolved interaction is already the terminal step and SSE appends\n // the first follow-up marker, jump into that new marker immediately instead\n // of waiting for the interaction auto-close and silent-step delay.\n if (\n hasAppendedMarkers &&\n wasFocusedOnPreviousLastMarker &&\n isResolvedInteractionElement(previousCurrentElement)\n ) {\n return previousSlideElementList.length;\n }\n\n const hasTruncatedMarkers =\n nextSlideElementList.length < previousSlideElementList.length &&\n hasStableMarkerIdentityPrefix(\n previousSlideElementList,\n nextSlideElementList\n );\n\n if (hasTruncatedMarkers && nextSlideElementList.length > 0) {\n return Math.min(previousIndex, nextSlideElementList.length - 1);\n }\n\n if (previousIndex >= 0 && previousIndex < nextSlideElementList.length) {\n return previousIndex;\n }\n\n return -1;\n};\n"],"names":["isResolvedInteractionElement","element","hasStableMarkerPrefix","previousSlideElementList","nextSlideElementList","index","hasStableMarkerIdentityPrefix","previousElement","resolveNextSlideIndexAfterMarkerAppend","previousIndex","hasAppendedMarkers","previousLastMarkerIndex","wasFocusedOnPreviousLastMarker","previousCurrentElement"],"mappings":"gFAQA,MAAMA,EAAgCC,GACpC,GACEA,GAAS,OAAS,gBACfA,EAAQ,UAAYA,EAAQ,YAAY,KAAA,IAGzCC,EAAwB,CAC5BC,EACAC,IAEAD,EAAyB,QAAUC,EAAqB,QACxDD,EAAyB,MACvB,CAACF,EAASI,IAAUJ,IAAYG,EAAqBC,CAAK,CAC5D,EAEIC,EAAgC,CACpCH,EACAC,IAEAA,EAAqB,QAAUD,EAAyB,QACxDC,EAAqB,MAAM,CAACH,EAASI,IAAU,CAC7C,MAAME,EAAkBJ,EAAyBE,CAAK,EAEtD,OACEJ,EAAQ,OAASM,GAAiB,MAClCN,EAAQ,kBAAoBM,GAAiB,iBAC7CN,EAAQ,UAAYM,GAAiB,OAEzC,CAAC,EAEUC,EAAyC,CAAC,CACrD,cAAAC,EACA,yBAAAN,EACA,qBAAAC,CACF,IAAmC,CACjC,GAAIA,EAAqB,SAAW,EAClC,MAAO,GAGT,MAAMM,EACJN,EAAqB,OAASD,EAAyB,QACvDD,EAAsBC,EAA0BC,CAAoB,EAChEO,EAA0BR,EAAyB,OAAS,EAC5DS,EACJH,IAAkBE,EACdE,EACJJ,GAAiB,EAAIN,EAAyBM,CAAa,EAAI,OAKjE,OACEC,GACAE,GACAZ,EAA6Ba,CAAsB,EAE5CV,EAAyB,OAIhCC,EAAqB,OAASD,EAAyB,QACvDG,EACEH,EACAC,CAAA,GAGuBA,EAAqB,OAAS,EAChD,KAAK,IAAIK,EAAeL,EAAqB,OAAS,CAAC,EAG5DK,GAAiB,GAAKA,EAAgBL,EAAqB,OACtDK,EAGF,EACT"}
|
|
@@ -1,16 +1,22 @@
|
|
|
1
|
-
const
|
|
2
|
-
(
|
|
3
|
-
), k = ({
|
|
1
|
+
const t = (r) => !!(r?.type === "interaction" && (r.readonly || r.user_input?.trim())), M = (r, n) => r.length <= n.length && r.every(
|
|
2
|
+
(a, h) => a === n[h]
|
|
3
|
+
), k = (r, n) => n.length <= r.length && n.every((a, h) => {
|
|
4
|
+
const c = r[h];
|
|
5
|
+
return a.type === c?.type && a.sequence_number === c?.sequence_number && a.content === c?.content;
|
|
6
|
+
}), y = ({
|
|
4
7
|
previousIndex: r,
|
|
5
|
-
previousSlideElementList:
|
|
6
|
-
nextSlideElementList:
|
|
8
|
+
previousSlideElementList: n,
|
|
9
|
+
nextSlideElementList: a
|
|
7
10
|
}) => {
|
|
8
|
-
if (
|
|
11
|
+
if (a.length === 0)
|
|
9
12
|
return -1;
|
|
10
|
-
const
|
|
11
|
-
return
|
|
13
|
+
const h = a.length > n.length && M(n, a), c = n.length - 1, g = r === c, o = r >= 0 ? n[r] : void 0;
|
|
14
|
+
return h && g && t(o) ? n.length : a.length < n.length && k(
|
|
15
|
+
n,
|
|
16
|
+
a
|
|
17
|
+
) && a.length > 0 ? Math.min(r, a.length - 1) : r >= 0 && r < a.length ? r : -1;
|
|
12
18
|
};
|
|
13
19
|
export {
|
|
14
|
-
|
|
20
|
+
y as resolveNextSlideIndexAfterMarkerAppend
|
|
15
21
|
};
|
|
16
22
|
//# sourceMappingURL=streamingNavigation.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"streamingNavigation.es.js","sources":["../../../../src/components/Slide/utils/streamingNavigation.ts"],"sourcesContent":["import type { Element } from \"../types\";\n\ninterface ResolveNextSlideIndexParams {\n previousIndex: number;\n previousSlideElementList: Element[];\n nextSlideElementList: Element[];\n}\n\nconst isResolvedInteractionElement = (element?: Element) =>\n Boolean(\n element?.type === \"interaction\" &&\n (element.readonly || element.user_input?.trim())\n );\n\nconst hasStableMarkerPrefix = (\n previousSlideElementList: Element[],\n nextSlideElementList: Element[]\n) =>\n previousSlideElementList.length <= nextSlideElementList.length &&\n previousSlideElementList.every(\n (element, index) => element === nextSlideElementList[index]\n );\n\nexport const resolveNextSlideIndexAfterMarkerAppend = ({\n previousIndex,\n previousSlideElementList,\n nextSlideElementList,\n}: ResolveNextSlideIndexParams) => {\n if (nextSlideElementList.length === 0) {\n return -1;\n }\n\n const hasAppendedMarkers =\n nextSlideElementList.length > previousSlideElementList.length &&\n hasStableMarkerPrefix(previousSlideElementList, nextSlideElementList);\n const previousLastMarkerIndex = previousSlideElementList.length - 1;\n const wasFocusedOnPreviousLastMarker =\n previousIndex === previousLastMarkerIndex;\n const previousCurrentElement =\n previousIndex >= 0 ? previousSlideElementList[previousIndex] : undefined;\n\n // When a resolved interaction is already the terminal step and SSE appends\n // the first follow-up marker, jump into that new marker immediately instead\n // of waiting for the interaction auto-close and silent-step delay.\n if (\n hasAppendedMarkers &&\n wasFocusedOnPreviousLastMarker &&\n isResolvedInteractionElement(previousCurrentElement)\n ) {\n return previousSlideElementList.length;\n }\n\n if (previousIndex >= 0 && previousIndex < nextSlideElementList.length) {\n return previousIndex;\n }\n\n return -1;\n};\n"],"names":["isResolvedInteractionElement","element","hasStableMarkerPrefix","previousSlideElementList","nextSlideElementList","index","resolveNextSlideIndexAfterMarkerAppend","previousIndex","hasAppendedMarkers","previousLastMarkerIndex","wasFocusedOnPreviousLastMarker","previousCurrentElement"],"mappings":"AAQA,MAAMA,IAA+B,CAACC,MACpC,GACEA,GAAS,SAAS,kBACfA,EAAQ,YAAYA,EAAQ,YAAY,KAAA,KAGzCC,IAAwB,CAC5BC,GACAC,MAEAD,EAAyB,UAAUC,EAAqB,UACxDD,EAAyB;AAAA,EACvB,CAACF,GAASI,MAAUJ,MAAYG,EAAqBC,CAAK;AAC5D,
|
|
1
|
+
{"version":3,"file":"streamingNavigation.es.js","sources":["../../../../src/components/Slide/utils/streamingNavigation.ts"],"sourcesContent":["import type { Element } from \"../types\";\n\ninterface ResolveNextSlideIndexParams {\n previousIndex: number;\n previousSlideElementList: Element[];\n nextSlideElementList: Element[];\n}\n\nconst isResolvedInteractionElement = (element?: Element) =>\n Boolean(\n element?.type === \"interaction\" &&\n (element.readonly || element.user_input?.trim())\n );\n\nconst hasStableMarkerPrefix = (\n previousSlideElementList: Element[],\n nextSlideElementList: Element[]\n) =>\n previousSlideElementList.length <= nextSlideElementList.length &&\n previousSlideElementList.every(\n (element, index) => element === nextSlideElementList[index]\n );\n\nconst hasStableMarkerIdentityPrefix = (\n previousSlideElementList: Element[],\n nextSlideElementList: Element[]\n) =>\n nextSlideElementList.length <= previousSlideElementList.length &&\n nextSlideElementList.every((element, index) => {\n const previousElement = previousSlideElementList[index];\n\n return (\n element.type === previousElement?.type &&\n element.sequence_number === previousElement?.sequence_number &&\n element.content === previousElement?.content\n );\n });\n\nexport const resolveNextSlideIndexAfterMarkerAppend = ({\n previousIndex,\n previousSlideElementList,\n nextSlideElementList,\n}: ResolveNextSlideIndexParams) => {\n if (nextSlideElementList.length === 0) {\n return -1;\n }\n\n const hasAppendedMarkers =\n nextSlideElementList.length > previousSlideElementList.length &&\n hasStableMarkerPrefix(previousSlideElementList, nextSlideElementList);\n const previousLastMarkerIndex = previousSlideElementList.length - 1;\n const wasFocusedOnPreviousLastMarker =\n previousIndex === previousLastMarkerIndex;\n const previousCurrentElement =\n previousIndex >= 0 ? previousSlideElementList[previousIndex] : undefined;\n\n // When a resolved interaction is already the terminal step and SSE appends\n // the first follow-up marker, jump into that new marker immediately instead\n // of waiting for the interaction auto-close and silent-step delay.\n if (\n hasAppendedMarkers &&\n wasFocusedOnPreviousLastMarker &&\n isResolvedInteractionElement(previousCurrentElement)\n ) {\n return previousSlideElementList.length;\n }\n\n const hasTruncatedMarkers =\n nextSlideElementList.length < previousSlideElementList.length &&\n hasStableMarkerIdentityPrefix(\n previousSlideElementList,\n nextSlideElementList\n );\n\n if (hasTruncatedMarkers && nextSlideElementList.length > 0) {\n return Math.min(previousIndex, nextSlideElementList.length - 1);\n }\n\n if (previousIndex >= 0 && previousIndex < nextSlideElementList.length) {\n return previousIndex;\n }\n\n return -1;\n};\n"],"names":["isResolvedInteractionElement","element","hasStableMarkerPrefix","previousSlideElementList","nextSlideElementList","index","hasStableMarkerIdentityPrefix","previousElement","resolveNextSlideIndexAfterMarkerAppend","previousIndex","hasAppendedMarkers","previousLastMarkerIndex","wasFocusedOnPreviousLastMarker","previousCurrentElement"],"mappings":"AAQA,MAAMA,IAA+B,CAACC,MACpC,GACEA,GAAS,SAAS,kBACfA,EAAQ,YAAYA,EAAQ,YAAY,KAAA,KAGzCC,IAAwB,CAC5BC,GACAC,MAEAD,EAAyB,UAAUC,EAAqB,UACxDD,EAAyB;AAAA,EACvB,CAACF,GAASI,MAAUJ,MAAYG,EAAqBC,CAAK;AAC5D,GAEIC,IAAgC,CACpCH,GACAC,MAEAA,EAAqB,UAAUD,EAAyB,UACxDC,EAAqB,MAAM,CAACH,GAASI,MAAU;AAC7C,QAAME,IAAkBJ,EAAyBE,CAAK;AAEtD,SACEJ,EAAQ,SAASM,GAAiB,QAClCN,EAAQ,oBAAoBM,GAAiB,mBAC7CN,EAAQ,YAAYM,GAAiB;AAEzC,CAAC,GAEUC,IAAyC,CAAC;AAAA,EACrD,eAAAC;AAAA,EACA,0BAAAN;AAAA,EACA,sBAAAC;AACF,MAAmC;AACjC,MAAIA,EAAqB,WAAW;AAClC,WAAO;AAGT,QAAMM,IACJN,EAAqB,SAASD,EAAyB,UACvDD,EAAsBC,GAA0BC,CAAoB,GAChEO,IAA0BR,EAAyB,SAAS,GAC5DS,IACJH,MAAkBE,GACdE,IACJJ,KAAiB,IAAIN,EAAyBM,CAAa,IAAI;AAKjE,SACEC,KACAE,KACAZ,EAA6Ba,CAAsB,IAE5CV,EAAyB,SAIhCC,EAAqB,SAASD,EAAyB,UACvDG;AAAA,IACEH;AAAA,IACAC;AAAA,EAAA,KAGuBA,EAAqB,SAAS,IAChD,KAAK,IAAIK,GAAeL,EAAqB,SAAS,CAAC,IAG5DK,KAAiB,KAAKA,IAAgBL,EAAqB,SACtDK,IAGF;AACT;"}
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=t=>{const e=t?.trim().toLowerCase()??"";return!(!e||e.startsWith("#")||e.startsWith("javascript:")||e.startsWith("data:")||e.startsWith("mailto:")||e.startsWith("tel:"))},o=t=>t?.tagName?.toLowerCase()==="a",a=t=>{const e=t;if(!e)return null;if(typeof e.closest=="function"){const n=e.closest("a[href]");return o(n)?n:null}const r=e.parentElement?.closest("a[href]");return o(r)?r:null},l=t=>{const e=new Set((t??"").split(/\s+/).map(r=>r.trim()).filter(Boolean));return e.add("noopener"),e.add("noreferrer"),Array.from(e).join(" ")};exports.isAnchorElement=o;exports.mergeAnchorRelValue=l;exports.resolveClosestAnchor=a;exports.shouldForceAnchorHrefToNewTab=s;
|
|
2
|
-
//# sourceMappingURL=link-targets.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"link-targets.cjs.js","sources":["../../../../src/components/ContentRender/utils/link-targets.ts"],"sourcesContent":["export const shouldForceAnchorHrefToNewTab = (href: string | null) => {\n const normalizedHref = href?.trim().toLowerCase() ?? \"\";\n\n if (!normalizedHref) {\n return false;\n }\n\n if (\n normalizedHref.startsWith(\"#\") ||\n normalizedHref.startsWith(\"javascript:\") ||\n normalizedHref.startsWith(\"data:\") ||\n normalizedHref.startsWith(\"mailto:\") ||\n normalizedHref.startsWith(\"tel:\")\n ) {\n return false;\n }\n\n return true;\n};\n\nexport const isAnchorElement = (\n node: { tagName?: string | null } | null | undefined\n): node is HTMLAnchorElement => node?.tagName?.toLowerCase() === \"a\";\n\nexport const resolveClosestAnchor = (target: EventTarget | null) => {\n const candidate = target as {\n closest?: (selector: string) => Element | null;\n parentElement?: Element | null;\n } | null;\n\n if (!candidate) {\n return null;\n }\n\n if (typeof candidate.closest === \"function\") {\n const anchor = candidate.closest(\"a[href]\");\n return isAnchorElement(anchor) ? anchor : null;\n }\n\n const anchor = candidate.parentElement?.closest(\"a[href]\");\n return isAnchorElement(anchor) ? anchor : null;\n};\n\nexport const mergeAnchorRelValue = (rel: string | null) => {\n const tokens = new Set(\n (rel ?? \"\")\n .split(/\\s+/)\n .map((token) => token.trim())\n .filter(Boolean)\n );\n\n tokens.add(\"noopener\");\n tokens.add(\"noreferrer\");\n\n return Array.from(tokens).join(\" \");\n};\n"],"names":["shouldForceAnchorHrefToNewTab","href","normalizedHref","isAnchorElement","node","resolveClosestAnchor","target","candidate","anchor","mergeAnchorRelValue","rel","tokens","token"],"mappings":"gFAAO,MAAMA,EAAiCC,GAAwB,CACpE,MAAMC,EAAiBD,GAAM,KAAA,EAAO,eAAiB,GAMrD,MAJI,GAACC,GAKHA,EAAe,WAAW,GAAG,GAC7BA,EAAe,WAAW,aAAa,GACvCA,EAAe,WAAW,OAAO,GACjCA,EAAe,WAAW,SAAS,GACnCA,EAAe,WAAW,MAAM,EAMpC,EAEaC,EACXC,GAC8BA,GAAM,SAAS,gBAAkB,IAEpDC,EAAwBC,GAA+B,CAClE,MAAMC,EAAYD,EAKlB,GAAI,CAACC,EACH,OAAO,KAGT,GAAI,OAAOA,EAAU,SAAY,WAAY,CAC3C,MAAMC,EAASD,EAAU,QAAQ,SAAS,EAC1C,OAAOJ,EAAgBK,CAAM,EAAIA,EAAS,IAC5C,CAEA,MAAMA,EAASD,EAAU,eAAe,QAAQ,SAAS,EACzD,OAAOJ,EAAgBK,CAAM,EAAIA,EAAS,IAC5C,EAEaC,EAAuBC,GAAuB,CACzD,MAAMC,EAAS,IAAI,KAChBD,GAAO,IACL,MAAM,KAAK,EACX,IAAKE,GAAUA,EAAM,MAAM,EAC3B,OAAO,OAAO,CAAA,EAGnB,OAAAD,EAAO,IAAI,UAAU,EACrBA,EAAO,IAAI,YAAY,EAEhB,MAAM,KAAKA,CAAM,EAAE,KAAK,GAAG,CACpC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const shouldForceAnchorHrefToNewTab: (href: string | null) => boolean;
|
|
2
|
-
export declare const isAnchorElement: (node: {
|
|
3
|
-
tagName?: string | null;
|
|
4
|
-
} | null | undefined) => node is HTMLAnchorElement;
|
|
5
|
-
export declare const resolveClosestAnchor: (target: EventTarget | null) => HTMLAnchorElement | null;
|
|
6
|
-
export declare const mergeAnchorRelValue: (rel: string | null) => string;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
const s = (e) => {
|
|
2
|
-
const t = e?.trim().toLowerCase() ?? "";
|
|
3
|
-
return !(!t || t.startsWith("#") || t.startsWith("javascript:") || t.startsWith("data:") || t.startsWith("mailto:") || t.startsWith("tel:"));
|
|
4
|
-
}, n = (e) => e?.tagName?.toLowerCase() === "a", a = (e) => {
|
|
5
|
-
const t = e;
|
|
6
|
-
if (!t)
|
|
7
|
-
return null;
|
|
8
|
-
if (typeof t.closest == "function") {
|
|
9
|
-
const o = t.closest("a[href]");
|
|
10
|
-
return n(o) ? o : null;
|
|
11
|
-
}
|
|
12
|
-
const r = t.parentElement?.closest("a[href]");
|
|
13
|
-
return n(r) ? r : null;
|
|
14
|
-
}, l = (e) => {
|
|
15
|
-
const t = new Set(
|
|
16
|
-
(e ?? "").split(/\s+/).map((r) => r.trim()).filter(Boolean)
|
|
17
|
-
);
|
|
18
|
-
return t.add("noopener"), t.add("noreferrer"), Array.from(t).join(" ");
|
|
19
|
-
};
|
|
20
|
-
export {
|
|
21
|
-
n as isAnchorElement,
|
|
22
|
-
l as mergeAnchorRelValue,
|
|
23
|
-
a as resolveClosestAnchor,
|
|
24
|
-
s as shouldForceAnchorHrefToNewTab
|
|
25
|
-
};
|
|
26
|
-
//# sourceMappingURL=link-targets.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"link-targets.es.js","sources":["../../../../src/components/ContentRender/utils/link-targets.ts"],"sourcesContent":["export const shouldForceAnchorHrefToNewTab = (href: string | null) => {\n const normalizedHref = href?.trim().toLowerCase() ?? \"\";\n\n if (!normalizedHref) {\n return false;\n }\n\n if (\n normalizedHref.startsWith(\"#\") ||\n normalizedHref.startsWith(\"javascript:\") ||\n normalizedHref.startsWith(\"data:\") ||\n normalizedHref.startsWith(\"mailto:\") ||\n normalizedHref.startsWith(\"tel:\")\n ) {\n return false;\n }\n\n return true;\n};\n\nexport const isAnchorElement = (\n node: { tagName?: string | null } | null | undefined\n): node is HTMLAnchorElement => node?.tagName?.toLowerCase() === \"a\";\n\nexport const resolveClosestAnchor = (target: EventTarget | null) => {\n const candidate = target as {\n closest?: (selector: string) => Element | null;\n parentElement?: Element | null;\n } | null;\n\n if (!candidate) {\n return null;\n }\n\n if (typeof candidate.closest === \"function\") {\n const anchor = candidate.closest(\"a[href]\");\n return isAnchorElement(anchor) ? anchor : null;\n }\n\n const anchor = candidate.parentElement?.closest(\"a[href]\");\n return isAnchorElement(anchor) ? anchor : null;\n};\n\nexport const mergeAnchorRelValue = (rel: string | null) => {\n const tokens = new Set(\n (rel ?? \"\")\n .split(/\\s+/)\n .map((token) => token.trim())\n .filter(Boolean)\n );\n\n tokens.add(\"noopener\");\n tokens.add(\"noreferrer\");\n\n return Array.from(tokens).join(\" \");\n};\n"],"names":["shouldForceAnchorHrefToNewTab","href","normalizedHref","isAnchorElement","node","resolveClosestAnchor","target","candidate","anchor","mergeAnchorRelValue","rel","tokens","token"],"mappings":"AAAO,MAAMA,IAAgC,CAACC,MAAwB;AACpE,QAAMC,IAAiBD,GAAM,KAAA,EAAO,iBAAiB;AAMrD,SAJI,GAACC,KAKHA,EAAe,WAAW,GAAG,KAC7BA,EAAe,WAAW,aAAa,KACvCA,EAAe,WAAW,OAAO,KACjCA,EAAe,WAAW,SAAS,KACnCA,EAAe,WAAW,MAAM;AAMpC,GAEaC,IAAkB,CAC7BC,MAC8BA,GAAM,SAAS,kBAAkB,KAEpDC,IAAuB,CAACC,MAA+B;AAClE,QAAMC,IAAYD;AAKlB,MAAI,CAACC;AACH,WAAO;AAGT,MAAI,OAAOA,EAAU,WAAY,YAAY;AAC3C,UAAMC,IAASD,EAAU,QAAQ,SAAS;AAC1C,WAAOJ,EAAgBK,CAAM,IAAIA,IAAS;AAAA,EAC5C;AAEA,QAAMA,IAASD,EAAU,eAAe,QAAQ,SAAS;AACzD,SAAOJ,EAAgBK,CAAM,IAAIA,IAAS;AAC5C,GAEaC,IAAsB,CAACC,MAAuB;AACzD,QAAMC,IAAS,IAAI;AAAA,KAChBD,KAAO,IACL,MAAM,KAAK,EACX,IAAI,CAACE,MAAUA,EAAM,MAAM,EAC3B,OAAO,OAAO;AAAA,EAAA;AAGnB,SAAAD,EAAO,IAAI,UAAU,GACrBA,EAAO,IAAI,YAAY,GAEhB,MAAM,KAAKA,CAAM,EAAE,KAAK,GAAG;AACpC;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.cjs.js","sources":["../../../src/components/Slide/constants.ts"],"sourcesContent":["export const DEFAULT_FULLSCREEN_HINT_DURATION_MS = 3000;\n\nexport const DEFAULT_IMAGE_ONLY_AUTO_ADVANCE_DELAY_MS = 5000;\n"],"names":["DEFAULT_IMAGE_ONLY_AUTO_ADVANCE_DELAY_MS"],"mappings":"gFAEO,MAAMA,EAA2C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.es.js","sources":["../../../src/components/Slide/constants.ts"],"sourcesContent":["export const DEFAULT_FULLSCREEN_HINT_DURATION_MS = 3000;\n\nexport const DEFAULT_IMAGE_ONLY_AUTO_ADVANCE_DELAY_MS = 5000;\n"],"names":["DEFAULT_IMAGE_ONLY_AUTO_ADVANCE_DELAY_MS"],"mappings":"AAEO,MAAMA,IAA2C;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=15e3,t=e=>{const a=e.contentDocument;return!a||a.readyState!=="complete"?!1:Array.from(a.images??[]).every(r=>r.complete)},n=e=>e.every(t);exports.DEFAULT_IMAGE_ONLY_VISUAL_READY_TIMEOUT_MS=m;exports.areImageOnlyStepIframeVisualsReady=n;exports.isImageOnlyStepIframeVisualReady=t;
|
|
2
|
-
//# sourceMappingURL=imageOnlyStepVisualReady.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"imageOnlyStepVisualReady.cjs.js","sources":["../../../../src/components/Slide/utils/imageOnlyStepVisualReady.ts"],"sourcesContent":["export const DEFAULT_IMAGE_ONLY_VISUAL_READY_TIMEOUT_MS = 15000;\n\nexport interface ImageOnlyStepVisualReadyImageLike {\n complete: boolean;\n}\n\nexport interface ImageOnlyStepVisualReadyDocumentLike {\n readyState?: string;\n images?: ArrayLike<ImageOnlyStepVisualReadyImageLike>;\n}\n\nexport interface ImageOnlyStepVisualReadyIframeLike {\n contentDocument?: ImageOnlyStepVisualReadyDocumentLike | null;\n}\n\nexport const isImageOnlyStepIframeVisualReady = (\n iframe: ImageOnlyStepVisualReadyIframeLike\n) => {\n const iframeDocument = iframe.contentDocument;\n\n if (!iframeDocument || iframeDocument.readyState !== \"complete\") {\n return false;\n }\n\n return Array.from(iframeDocument.images ?? []).every(\n (image) => image.complete\n );\n};\n\nexport const areImageOnlyStepIframeVisualsReady = (\n iframes: ImageOnlyStepVisualReadyIframeLike[]\n) => iframes.every(isImageOnlyStepIframeVisualReady);\n"],"names":["DEFAULT_IMAGE_ONLY_VISUAL_READY_TIMEOUT_MS","isImageOnlyStepIframeVisualReady","iframe","iframeDocument","image","areImageOnlyStepIframeVisualsReady","iframes"],"mappings":"gFAAO,MAAMA,EAA6C,KAe7CC,EACXC,GACG,CACH,MAAMC,EAAiBD,EAAO,gBAE9B,MAAI,CAACC,GAAkBA,EAAe,aAAe,WAC5C,GAGF,MAAM,KAAKA,EAAe,QAAU,CAAA,CAAE,EAAE,MAC5CC,GAAUA,EAAM,QAAA,CAErB,EAEaC,EACXC,GACGA,EAAQ,MAAML,CAAgC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare const DEFAULT_IMAGE_ONLY_VISUAL_READY_TIMEOUT_MS = 15000;
|
|
2
|
-
export interface ImageOnlyStepVisualReadyImageLike {
|
|
3
|
-
complete: boolean;
|
|
4
|
-
}
|
|
5
|
-
export interface ImageOnlyStepVisualReadyDocumentLike {
|
|
6
|
-
readyState?: string;
|
|
7
|
-
images?: ArrayLike<ImageOnlyStepVisualReadyImageLike>;
|
|
8
|
-
}
|
|
9
|
-
export interface ImageOnlyStepVisualReadyIframeLike {
|
|
10
|
-
contentDocument?: ImageOnlyStepVisualReadyDocumentLike | null;
|
|
11
|
-
}
|
|
12
|
-
export declare const isImageOnlyStepIframeVisualReady: (iframe: ImageOnlyStepVisualReadyIframeLike) => boolean;
|
|
13
|
-
export declare const areImageOnlyStepIframeVisualsReady: (iframes: ImageOnlyStepVisualReadyIframeLike[]) => boolean;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
const n = 15e3, r = (e) => {
|
|
2
|
-
const t = e.contentDocument;
|
|
3
|
-
return !t || t.readyState !== "complete" ? !1 : Array.from(t.images ?? []).every(
|
|
4
|
-
(a) => a.complete
|
|
5
|
-
);
|
|
6
|
-
}, m = (e) => e.every(r);
|
|
7
|
-
export {
|
|
8
|
-
n as DEFAULT_IMAGE_ONLY_VISUAL_READY_TIMEOUT_MS,
|
|
9
|
-
m as areImageOnlyStepIframeVisualsReady,
|
|
10
|
-
r as isImageOnlyStepIframeVisualReady
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=imageOnlyStepVisualReady.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"imageOnlyStepVisualReady.es.js","sources":["../../../../src/components/Slide/utils/imageOnlyStepVisualReady.ts"],"sourcesContent":["export const DEFAULT_IMAGE_ONLY_VISUAL_READY_TIMEOUT_MS = 15000;\n\nexport interface ImageOnlyStepVisualReadyImageLike {\n complete: boolean;\n}\n\nexport interface ImageOnlyStepVisualReadyDocumentLike {\n readyState?: string;\n images?: ArrayLike<ImageOnlyStepVisualReadyImageLike>;\n}\n\nexport interface ImageOnlyStepVisualReadyIframeLike {\n contentDocument?: ImageOnlyStepVisualReadyDocumentLike | null;\n}\n\nexport const isImageOnlyStepIframeVisualReady = (\n iframe: ImageOnlyStepVisualReadyIframeLike\n) => {\n const iframeDocument = iframe.contentDocument;\n\n if (!iframeDocument || iframeDocument.readyState !== \"complete\") {\n return false;\n }\n\n return Array.from(iframeDocument.images ?? []).every(\n (image) => image.complete\n );\n};\n\nexport const areImageOnlyStepIframeVisualsReady = (\n iframes: ImageOnlyStepVisualReadyIframeLike[]\n) => iframes.every(isImageOnlyStepIframeVisualReady);\n"],"names":["DEFAULT_IMAGE_ONLY_VISUAL_READY_TIMEOUT_MS","isImageOnlyStepIframeVisualReady","iframe","iframeDocument","image","areImageOnlyStepIframeVisualsReady","iframes"],"mappings":"AAAO,MAAMA,IAA6C,MAe7CC,IAAmC,CAC9CC,MACG;AACH,QAAMC,IAAiBD,EAAO;AAE9B,SAAI,CAACC,KAAkBA,EAAe,eAAe,aAC5C,KAGF,MAAM,KAAKA,EAAe,UAAU,CAAA,CAAE,EAAE;AAAA,IAC7C,CAACC,MAAUA,EAAM;AAAA,EAAA;AAErB,GAEaC,IAAqC,CAChDC,MACGA,EAAQ,MAAML,CAAgC;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("../constants.cjs.js"),a=new Set(["img","md_img","svg"]),c=/<(img|svg)\b[^>]*>/i,i=/<!--[\s\S]*?-->/g,_=/<script\b[^>]*>[\s\S]*?<\/script>/gi,E=/<style\b[^>]*>[\s\S]*?<\/style>/gi,p=/<\/?\s*[a-zA-Z][a-zA-Z0-9:_-]*\b[^>]*>/g,A=/&(?:nbsp|ensp|emsp|thinsp|zwnj|zwj);/gi,T=/[\p{L}\p{N}]/u,S=e=>!!e&&!e?.is_marker&&e?.is_renderable!==!1,g=e=>T.test(e.replace(i," ").replace(_," ").replace(E," ").replace(p," ").replace(A," ").trim()),u=e=>e.type!=="html"||typeof e.content!="string"?!1:c.test(e.content)&&!g(e.content),r=({currentElementList:e,currentStepHasSpeakableElement:n,currentInteractionElement:o})=>{if(n||o)return!1;const s=e.filter(S);return s.length===0?!1:s.every(t=>a.has(t.type)||u(t))},M=({currentElementList:e,currentStepHasSpeakableElement:n,currentInteractionElement:o,markerAutoAdvanceDelay:s})=>{const t=r({currentElementList:e,currentStepHasSpeakableElement:n,currentInteractionElement:o});return{delayMs:t?l.DEFAULT_IMAGE_ONLY_AUTO_ADVANCE_DELAY_MS:s,usesImageOnlyDelay:t}};exports.resolveSilentStepAutoAdvanceBehavior=M;exports.shouldUseImageOnlySilentStepAutoAdvanceDelay=r;
|
|
2
|
-
//# sourceMappingURL=silentStepAutoAdvance.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"silentStepAutoAdvance.cjs.js","sources":["../../../../src/components/Slide/utils/silentStepAutoAdvance.ts"],"sourcesContent":["import type { Element } from \"../types\";\n\nimport { DEFAULT_IMAGE_ONLY_AUTO_ADVANCE_DELAY_MS } from \"../constants\";\n\nconst IMAGE_ONLY_ELEMENT_TYPES = new Set([\"img\", \"md_img\", \"svg\"]);\nconst COMPLETE_IMAGE_TAG_PATTERN = /<(img|svg)\\b[^>]*>/i;\nconst HTML_COMMENT_RE = /<!--[\\s\\S]*?-->/g;\nconst HTML_SCRIPT_RE = /<script\\b[^>]*>[\\s\\S]*?<\\/script>/gi;\nconst HTML_STYLE_RE = /<style\\b[^>]*>[\\s\\S]*?<\\/style>/gi;\nconst HTML_TAG_RE = /<\\/?\\s*[a-zA-Z][a-zA-Z0-9:_-]*\\b[^>]*>/g;\nconst HTML_SPACE_ENTITY_RE = /&(?:nbsp|ensp|emsp|thinsp|zwnj|zwj);/gi;\nconst MEANINGFUL_TEXT_RE = /[\\p{L}\\p{N}]/u;\n\nexport interface SilentStepAutoAdvanceDelayParams {\n currentElementList: Element[];\n currentStepHasSpeakableElement: boolean;\n currentInteractionElement?: Element;\n markerAutoAdvanceDelay: number;\n}\n\nexport interface SilentStepAutoAdvanceBehavior {\n delayMs: number;\n usesImageOnlyDelay: boolean;\n}\n\nconst isRenderableStepContentElement = (element?: Element) =>\n Boolean(element) && !element?.is_marker && element?.is_renderable !== false;\n\nconst hasMeaningfulHtmlText = (content: string) =>\n MEANINGFUL_TEXT_RE.test(\n content\n .replace(HTML_COMMENT_RE, \" \")\n .replace(HTML_SCRIPT_RE, \" \")\n .replace(HTML_STYLE_RE, \" \")\n .replace(HTML_TAG_RE, \" \")\n .replace(HTML_SPACE_ENTITY_RE, \" \")\n .trim()\n );\n\nconst isImageOnlyHtmlElement = (element: Element) => {\n if (element.type !== \"html\" || typeof element.content !== \"string\") {\n return false;\n }\n\n return (\n COMPLETE_IMAGE_TAG_PATTERN.test(element.content) &&\n !hasMeaningfulHtmlText(element.content)\n );\n};\n\nexport const shouldUseImageOnlySilentStepAutoAdvanceDelay = ({\n currentElementList,\n currentStepHasSpeakableElement,\n currentInteractionElement,\n}: Omit<SilentStepAutoAdvanceDelayParams, \"markerAutoAdvanceDelay\">) => {\n if (currentStepHasSpeakableElement || currentInteractionElement) {\n return false;\n }\n\n const stepContentElements = currentElementList.filter(\n isRenderableStepContentElement\n );\n\n if (stepContentElements.length === 0) {\n return false;\n }\n\n return stepContentElements.every(\n (element) =>\n IMAGE_ONLY_ELEMENT_TYPES.has(element.type) ||\n isImageOnlyHtmlElement(element)\n );\n};\n\nexport const resolveSilentStepAutoAdvanceDelay = ({\n currentElementList,\n currentStepHasSpeakableElement,\n currentInteractionElement,\n markerAutoAdvanceDelay,\n}: SilentStepAutoAdvanceDelayParams) =>\n resolveSilentStepAutoAdvanceBehavior({\n currentElementList,\n currentStepHasSpeakableElement,\n currentInteractionElement,\n markerAutoAdvanceDelay,\n }).delayMs;\n\nexport const resolveSilentStepAutoAdvanceBehavior = ({\n currentElementList,\n currentStepHasSpeakableElement,\n currentInteractionElement,\n markerAutoAdvanceDelay,\n}: SilentStepAutoAdvanceDelayParams): SilentStepAutoAdvanceBehavior => {\n const usesImageOnlyDelay = shouldUseImageOnlySilentStepAutoAdvanceDelay({\n currentElementList,\n currentStepHasSpeakableElement,\n currentInteractionElement,\n });\n\n return {\n delayMs: usesImageOnlyDelay\n ? DEFAULT_IMAGE_ONLY_AUTO_ADVANCE_DELAY_MS\n : markerAutoAdvanceDelay,\n usesImageOnlyDelay,\n };\n};\n"],"names":["IMAGE_ONLY_ELEMENT_TYPES","COMPLETE_IMAGE_TAG_PATTERN","HTML_COMMENT_RE","HTML_SCRIPT_RE","HTML_STYLE_RE","HTML_TAG_RE","HTML_SPACE_ENTITY_RE","MEANINGFUL_TEXT_RE","isRenderableStepContentElement","element","hasMeaningfulHtmlText","content","isImageOnlyHtmlElement","shouldUseImageOnlySilentStepAutoAdvanceDelay","currentElementList","currentStepHasSpeakableElement","currentInteractionElement","stepContentElements","resolveSilentStepAutoAdvanceBehavior","markerAutoAdvanceDelay","usesImageOnlyDelay","DEFAULT_IMAGE_ONLY_AUTO_ADVANCE_DELAY_MS"],"mappings":"uHAIMA,EAA2B,IAAI,IAAI,CAAC,MAAO,SAAU,KAAK,CAAC,EAC3DC,EAA6B,sBAC7BC,EAAkB,mBAClBC,EAAiB,sCACjBC,EAAgB,oCAChBC,EAAc,0CACdC,EAAuB,yCACvBC,EAAqB,gBAcrBC,EAAkCC,GACtC,EAAQA,GAAY,CAACA,GAAS,WAAaA,GAAS,gBAAkB,GAElEC,EAAyBC,GAC7BJ,EAAmB,KACjBI,EACG,QAAQT,EAAiB,GAAG,EAC5B,QAAQC,EAAgB,GAAG,EAC3B,QAAQC,EAAe,GAAG,EAC1B,QAAQC,EAAa,GAAG,EACxB,QAAQC,EAAsB,GAAG,EACjC,KAAA,CACL,EAEIM,EAA0BH,GAC1BA,EAAQ,OAAS,QAAU,OAAOA,EAAQ,SAAY,SACjD,GAIPR,EAA2B,KAAKQ,EAAQ,OAAO,GAC/C,CAACC,EAAsBD,EAAQ,OAAO,EAI7BI,EAA+C,CAAC,CAC3D,mBAAAC,EACA,+BAAAC,EACA,0BAAAC,CACF,IAAwE,CACtE,GAAID,GAAkCC,EACpC,MAAO,GAGT,MAAMC,EAAsBH,EAAmB,OAC7CN,CAAA,EAGF,OAAIS,EAAoB,SAAW,EAC1B,GAGFA,EAAoB,MACxBR,GACCT,EAAyB,IAAIS,EAAQ,IAAI,GACzCG,EAAuBH,CAAO,CAAA,CAEpC,EAeaS,EAAuC,CAAC,CACnD,mBAAAJ,EACA,+BAAAC,EACA,0BAAAC,EACA,uBAAAG,CACF,IAAuE,CACrE,MAAMC,EAAqBP,EAA6C,CACtE,mBAAAC,EACA,+BAAAC,EACA,0BAAAC,CAAA,CACD,EAED,MAAO,CACL,QAASI,EACLC,EAAAA,yCACAF,EACJ,mBAAAC,CAAA,CAEJ"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Element } from '../types';
|
|
2
|
-
export interface SilentStepAutoAdvanceDelayParams {
|
|
3
|
-
currentElementList: Element[];
|
|
4
|
-
currentStepHasSpeakableElement: boolean;
|
|
5
|
-
currentInteractionElement?: Element;
|
|
6
|
-
markerAutoAdvanceDelay: number;
|
|
7
|
-
}
|
|
8
|
-
export interface SilentStepAutoAdvanceBehavior {
|
|
9
|
-
delayMs: number;
|
|
10
|
-
usesImageOnlyDelay: boolean;
|
|
11
|
-
}
|
|
12
|
-
export declare const shouldUseImageOnlySilentStepAutoAdvanceDelay: ({ currentElementList, currentStepHasSpeakableElement, currentInteractionElement, }: Omit<SilentStepAutoAdvanceDelayParams, "markerAutoAdvanceDelay">) => boolean;
|
|
13
|
-
export declare const resolveSilentStepAutoAdvanceDelay: ({ currentElementList, currentStepHasSpeakableElement, currentInteractionElement, markerAutoAdvanceDelay, }: SilentStepAutoAdvanceDelayParams) => number;
|
|
14
|
-
export declare const resolveSilentStepAutoAdvanceBehavior: ({ currentElementList, currentStepHasSpeakableElement, currentInteractionElement, markerAutoAdvanceDelay, }: SilentStepAutoAdvanceDelayParams) => SilentStepAutoAdvanceBehavior;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { DEFAULT_IMAGE_ONLY_AUTO_ADVANCE_DELAY_MS as o } from "../constants.es.js";
|
|
2
|
-
const _ = /* @__PURE__ */ new Set(["img", "md_img", "svg"]), E = /<(img|svg)\b[^>]*>/i, a = /<!--[\s\S]*?-->/g, c = /<script\b[^>]*>[\s\S]*?<\/script>/gi, l = /<style\b[^>]*>[\s\S]*?<\/style>/gi, i = /<\/?\s*[a-zA-Z][a-zA-Z0-9:_-]*\b[^>]*>/g, p = /&(?:nbsp|ensp|emsp|thinsp|zwnj|zwj);/gi, T = /[\p{L}\p{N}]/u, A = (t) => !!t && !t?.is_marker && t?.is_renderable !== !1, g = (t) => T.test(
|
|
3
|
-
t.replace(a, " ").replace(c, " ").replace(l, " ").replace(i, " ").replace(p, " ").trim()
|
|
4
|
-
), M = (t) => t.type !== "html" || typeof t.content != "string" ? !1 : E.test(t.content) && !g(t.content), L = ({
|
|
5
|
-
currentElementList: t,
|
|
6
|
-
currentStepHasSpeakableElement: n,
|
|
7
|
-
currentInteractionElement: r
|
|
8
|
-
}) => {
|
|
9
|
-
if (n || r)
|
|
10
|
-
return !1;
|
|
11
|
-
const s = t.filter(
|
|
12
|
-
A
|
|
13
|
-
);
|
|
14
|
-
return s.length === 0 ? !1 : s.every(
|
|
15
|
-
(e) => _.has(e.type) || M(e)
|
|
16
|
-
);
|
|
17
|
-
}, m = ({
|
|
18
|
-
currentElementList: t,
|
|
19
|
-
currentStepHasSpeakableElement: n,
|
|
20
|
-
currentInteractionElement: r,
|
|
21
|
-
markerAutoAdvanceDelay: s
|
|
22
|
-
}) => {
|
|
23
|
-
const e = L({
|
|
24
|
-
currentElementList: t,
|
|
25
|
-
currentStepHasSpeakableElement: n,
|
|
26
|
-
currentInteractionElement: r
|
|
27
|
-
});
|
|
28
|
-
return {
|
|
29
|
-
delayMs: e ? o : s,
|
|
30
|
-
usesImageOnlyDelay: e
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
export {
|
|
34
|
-
m as resolveSilentStepAutoAdvanceBehavior,
|
|
35
|
-
L as shouldUseImageOnlySilentStepAutoAdvanceDelay
|
|
36
|
-
};
|
|
37
|
-
//# sourceMappingURL=silentStepAutoAdvance.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"silentStepAutoAdvance.es.js","sources":["../../../../src/components/Slide/utils/silentStepAutoAdvance.ts"],"sourcesContent":["import type { Element } from \"../types\";\n\nimport { DEFAULT_IMAGE_ONLY_AUTO_ADVANCE_DELAY_MS } from \"../constants\";\n\nconst IMAGE_ONLY_ELEMENT_TYPES = new Set([\"img\", \"md_img\", \"svg\"]);\nconst COMPLETE_IMAGE_TAG_PATTERN = /<(img|svg)\\b[^>]*>/i;\nconst HTML_COMMENT_RE = /<!--[\\s\\S]*?-->/g;\nconst HTML_SCRIPT_RE = /<script\\b[^>]*>[\\s\\S]*?<\\/script>/gi;\nconst HTML_STYLE_RE = /<style\\b[^>]*>[\\s\\S]*?<\\/style>/gi;\nconst HTML_TAG_RE = /<\\/?\\s*[a-zA-Z][a-zA-Z0-9:_-]*\\b[^>]*>/g;\nconst HTML_SPACE_ENTITY_RE = /&(?:nbsp|ensp|emsp|thinsp|zwnj|zwj);/gi;\nconst MEANINGFUL_TEXT_RE = /[\\p{L}\\p{N}]/u;\n\nexport interface SilentStepAutoAdvanceDelayParams {\n currentElementList: Element[];\n currentStepHasSpeakableElement: boolean;\n currentInteractionElement?: Element;\n markerAutoAdvanceDelay: number;\n}\n\nexport interface SilentStepAutoAdvanceBehavior {\n delayMs: number;\n usesImageOnlyDelay: boolean;\n}\n\nconst isRenderableStepContentElement = (element?: Element) =>\n Boolean(element) && !element?.is_marker && element?.is_renderable !== false;\n\nconst hasMeaningfulHtmlText = (content: string) =>\n MEANINGFUL_TEXT_RE.test(\n content\n .replace(HTML_COMMENT_RE, \" \")\n .replace(HTML_SCRIPT_RE, \" \")\n .replace(HTML_STYLE_RE, \" \")\n .replace(HTML_TAG_RE, \" \")\n .replace(HTML_SPACE_ENTITY_RE, \" \")\n .trim()\n );\n\nconst isImageOnlyHtmlElement = (element: Element) => {\n if (element.type !== \"html\" || typeof element.content !== \"string\") {\n return false;\n }\n\n return (\n COMPLETE_IMAGE_TAG_PATTERN.test(element.content) &&\n !hasMeaningfulHtmlText(element.content)\n );\n};\n\nexport const shouldUseImageOnlySilentStepAutoAdvanceDelay = ({\n currentElementList,\n currentStepHasSpeakableElement,\n currentInteractionElement,\n}: Omit<SilentStepAutoAdvanceDelayParams, \"markerAutoAdvanceDelay\">) => {\n if (currentStepHasSpeakableElement || currentInteractionElement) {\n return false;\n }\n\n const stepContentElements = currentElementList.filter(\n isRenderableStepContentElement\n );\n\n if (stepContentElements.length === 0) {\n return false;\n }\n\n return stepContentElements.every(\n (element) =>\n IMAGE_ONLY_ELEMENT_TYPES.has(element.type) ||\n isImageOnlyHtmlElement(element)\n );\n};\n\nexport const resolveSilentStepAutoAdvanceDelay = ({\n currentElementList,\n currentStepHasSpeakableElement,\n currentInteractionElement,\n markerAutoAdvanceDelay,\n}: SilentStepAutoAdvanceDelayParams) =>\n resolveSilentStepAutoAdvanceBehavior({\n currentElementList,\n currentStepHasSpeakableElement,\n currentInteractionElement,\n markerAutoAdvanceDelay,\n }).delayMs;\n\nexport const resolveSilentStepAutoAdvanceBehavior = ({\n currentElementList,\n currentStepHasSpeakableElement,\n currentInteractionElement,\n markerAutoAdvanceDelay,\n}: SilentStepAutoAdvanceDelayParams): SilentStepAutoAdvanceBehavior => {\n const usesImageOnlyDelay = shouldUseImageOnlySilentStepAutoAdvanceDelay({\n currentElementList,\n currentStepHasSpeakableElement,\n currentInteractionElement,\n });\n\n return {\n delayMs: usesImageOnlyDelay\n ? DEFAULT_IMAGE_ONLY_AUTO_ADVANCE_DELAY_MS\n : markerAutoAdvanceDelay,\n usesImageOnlyDelay,\n };\n};\n"],"names":["IMAGE_ONLY_ELEMENT_TYPES","COMPLETE_IMAGE_TAG_PATTERN","HTML_COMMENT_RE","HTML_SCRIPT_RE","HTML_STYLE_RE","HTML_TAG_RE","HTML_SPACE_ENTITY_RE","MEANINGFUL_TEXT_RE","isRenderableStepContentElement","element","hasMeaningfulHtmlText","content","isImageOnlyHtmlElement","shouldUseImageOnlySilentStepAutoAdvanceDelay","currentElementList","currentStepHasSpeakableElement","currentInteractionElement","stepContentElements","resolveSilentStepAutoAdvanceBehavior","markerAutoAdvanceDelay","usesImageOnlyDelay","DEFAULT_IMAGE_ONLY_AUTO_ADVANCE_DELAY_MS"],"mappings":";AAIA,MAAMA,IAA2B,oBAAI,IAAI,CAAC,OAAO,UAAU,KAAK,CAAC,GAC3DC,IAA6B,uBAC7BC,IAAkB,oBAClBC,IAAiB,uCACjBC,IAAgB,qCAChBC,IAAc,2CACdC,IAAuB,0CACvBC,IAAqB,iBAcrBC,IAAiC,CAACC,MACtC,EAAQA,KAAY,CAACA,GAAS,aAAaA,GAAS,kBAAkB,IAElEC,IAAwB,CAACC,MAC7BJ,EAAmB;AAAA,EACjBI,EACG,QAAQT,GAAiB,GAAG,EAC5B,QAAQC,GAAgB,GAAG,EAC3B,QAAQC,GAAe,GAAG,EAC1B,QAAQC,GAAa,GAAG,EACxB,QAAQC,GAAsB,GAAG,EACjC,KAAA;AACL,GAEIM,IAAyB,CAACH,MAC1BA,EAAQ,SAAS,UAAU,OAAOA,EAAQ,WAAY,WACjD,KAIPR,EAA2B,KAAKQ,EAAQ,OAAO,KAC/C,CAACC,EAAsBD,EAAQ,OAAO,GAI7BI,IAA+C,CAAC;AAAA,EAC3D,oBAAAC;AAAA,EACA,gCAAAC;AAAA,EACA,2BAAAC;AACF,MAAwE;AACtE,MAAID,KAAkCC;AACpC,WAAO;AAGT,QAAMC,IAAsBH,EAAmB;AAAA,IAC7CN;AAAA,EAAA;AAGF,SAAIS,EAAoB,WAAW,IAC1B,KAGFA,EAAoB;AAAA,IACzB,CAACR,MACCT,EAAyB,IAAIS,EAAQ,IAAI,KACzCG,EAAuBH,CAAO;AAAA,EAAA;AAEpC,GAeaS,IAAuC,CAAC;AAAA,EACnD,oBAAAJ;AAAA,EACA,gCAAAC;AAAA,EACA,2BAAAC;AAAA,EACA,wBAAAG;AACF,MAAuE;AACrE,QAAMC,IAAqBP,EAA6C;AAAA,IACtE,oBAAAC;AAAA,IACA,gCAAAC;AAAA,IACA,2BAAAC;AAAA,EAAA,CACD;AAED,SAAO;AAAA,IACL,SAASI,IACLC,IACAF;AAAA,IACJ,oBAAAC;AAAA,EAAA;AAEJ;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|