66 >
77 <!-- @slot Optional injection of a heading element for the filmstrip -->
88 <slot name =" heading" />
9- <CdrFilmstripEngine
9+ <CdrSurfaceScroll
1010 :class =" classAttr"
1111 :id =" filmstripId"
1212 :description =" description"
2525 v-bind =" frameProps"
2626 />
2727 </template >
28- </CdrFilmstripEngine >
28+ </CdrSurfaceScroll >
2929 </div >
3030</template >
3131
3232<script setup lang="ts">
33- import CdrFilmstripEngine from ' ./CdrFilmstripEngine .vue' ;
33+ import CdrSurfaceScroll from ' ../surfaceScroll/CdrSurfaceScroll .vue' ;
3434import { useResizeObserver , useDebounceFn } from ' @vueuse/core' ;
3535import type {
36- CdrFilmstripFrame ,
37- CdrFilmstripArrowClickPayload ,
3836 CdrFilmstripResizePayload ,
3937 CdrFilmstripEventEmitter ,
4038 CdrFilmstripConfig ,
4139 CdrFilmstrip ,
42- CdrFilmstripScrollPayload ,
4340 CdrFilmstripAdapter ,
4441} from ' ./interfaces' ;
42+ import type {
43+ CdrSurfaceScrollFrame ,
44+ CdrSurfaceScrollArrowClickPayload ,
45+ CdrSurfaceScrollPayload ,
46+ } from ' ../surfaceScroll/interfaces' ;
4547import { computed , h , provide , ref , useAttrs , useId , watch } from ' vue' ;
4648import { CdrFilmstripEventKey } from ' ../../types/symbols' ;
4749
4850/**
4951 * Responsive, accessible filmstrip for displaying a horizontal list of content frames.
5052 *
51- * @uses CdrFilmstripEngine
53+ * @uses CdrSurfaceScroll
5254 */
5355defineOptions ({ name: ' CdrFilmstrip' });
5456
@@ -70,7 +72,7 @@ const props = withDefaults(defineProps<CdrFilmstrip<unknown>>(), {
7072 * @default defaultAdapter
7173 */
7274 adapter : (): CdrFilmstripAdapter <Record <string , unknown >> => {
73- return (_modelData : unknown ): CdrFilmstripConfig <Record <string , unknown >> => {
75+ return (): CdrFilmstripConfig <Record <string , unknown >> => {
7476 console .warn (` No adapter provided for CdrFilmstrip ` );
7577 return {
7678 frames: [],
@@ -87,13 +89,13 @@ const emit = defineEmits<{
8789 * Emitted when a user clicks the navigation arrows.
8890 * @param payload - The arrow click event metadata.
8991 */
90- (e : ' arrowClick' , payload : CdrFilmstripArrowClickPayload ): void ;
92+ (e : ' arrowClick' , payload : CdrSurfaceScrollArrowClickPayload ): void ;
9193
9294 /**
9395 * Emitted when the filmstrip scrolls to a new frame.
9496 * @param payload - The scroll event metadata including target index.
9597 */
96- (e : ' scrollNavigate' , payload : CdrFilmstripScrollPayload ): void ;
98+ (e : ' scrollNavigate' , payload : CdrSurfaceScrollPayload ): void ;
9799
98100 /**
99101 * Emitted when the layout changes due to screen or container resize.
@@ -128,7 +130,7 @@ const emitEvent: CdrFilmstripEventEmitter = (eventName, payload) => {
128130const attrs = useAttrs ();
129131/**
130132 * Extracts the class attribute from the component's attributes.
131- * This class is applied to the CdrFilmstripEngine for styling purposes.
133+ * This class is applied to the CdrSurfaceScroll for styling purposes.
132134 */
133135const classAttr = attrs .class || ' ' ;
134136
@@ -167,9 +169,9 @@ const framesToScroll = ref<number>(framesToShow.value);
167169/**
168170 * Extracts frames from the resolved filmstrip model.
169171 *
170- * @returns {CdrFilmstripFrame <never>[]} An array of frames to be rendered by the filmstrip engine.
172+ * @returns {CdrSurfaceScrollFrame <never>[]} An array of frames to be rendered by the filmstrip engine.
171173 */
172- const frames = computed (() => filmstripConfig .value .frames as CdrFilmstripFrame <never >[]);
174+ const frames = computed (() => filmstripConfig .value .frames as CdrSurfaceScrollFrame <never >[]);
173175
174176/**
175177 * Checks if the filmstrip has any frames to display.
@@ -233,10 +235,10 @@ const dataAttributes = computed(() => filmstripConfig.value?.dataAttributes || {
233235 * Handles arrow click events for navigating through the filmstrip.
234236 * Constructs an arrow click payload and emits the 'arrowClick' event.
235237 *
236- * @param {CdrFilmstripArrowClickPayload } param0 - The arrow click event payload.
238+ * @param {CdrSurfaceScrollArrowClickPayload } param0 - The arrow click event payload.
237239 */
238- function onArrowClick({ event , direction }: CdrFilmstripArrowClickPayload ) {
239- const arrowClickPayload: CdrFilmstripArrowClickPayload = {
240+ function onArrowClick({ event , direction }: CdrSurfaceScrollArrowClickPayload ) {
241+ const arrowClickPayload: CdrSurfaceScrollArrowClickPayload = {
240242 event ,
241243 direction ,
242244 model: props .model as Record <string , unknown >,
@@ -248,10 +250,10 @@ function onArrowClick({ event, direction }: CdrFilmstripArrowClickPayload) {
248250 * Handles scroll navigation events in the filmstrip.
249251 * Constructs a scroll payload and emits the 'scrollNavigate' event.
250252 *
251- * @param {CdrFilmstripScrollPayload } param0 - The scroll event payload.
253+ * @param {CdrSurfaceScrollPayload } param0 - The scroll event payload.
252254 */
253- function onScrollNavigate({ index , event }: CdrFilmstripScrollPayload ): void {
254- const scrollPayload: CdrFilmstripScrollPayload = {
255+ function onScrollNavigate({ index , event }: CdrSurfaceScrollPayload ): void {
256+ const scrollPayload: CdrSurfaceScrollPayload = {
255257 event ,
256258 index ,
257259 model: props .model as Record <string , unknown >,
0 commit comments