Skip to content

Commit

Permalink
fix remnant errors
Browse files Browse the repository at this point in the history
  • Loading branch information
cliffordkleinsr committed Oct 5, 2024
1 parent 6263c15 commit 971c2d0
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import { getContext } from 'svelte';
import { get, type Writable } from 'svelte/store';
// @ts-ignore
import { ScaleCorrectionContext, ScaleCorrectionParentContext } from '../../context/ScaleCorrectionProvider.svelte';
import type { MotionContextProps } from '$lib/motion-start/context/MotionContext';
import type { MotionContextProps } from '../../context/MotionContext/index.js'
// '$lib/motion-start/context/MotionContext';

export const scaleCorrection = () => {
const scaleCorrectionContext = getContext<Writable<MotionContextProps>>(ScaleCorrectionContext);
const scaleCorrectionParentContext = getContext<Writable<unknown[]>>(ScaleCorrectionParentContext);
const afterU = (nc = false) => {
/* Second part of the updater calling in child layouts first.*/
const scc = get(scaleCorrectionContext);
// @ts-expect-error
// @ts-ignore
scc.forEach((v: { afterU: (arg0: boolean) => void }, i: any) => {
v.afterU?.(true);
});
Expand Down
2 changes: 1 addition & 1 deletion src/lib/motion-start/context/MotionContext/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ export interface MotionContextProps {
animate?: string | string[];
}


//@ts-ignore
export { MotionContext, useVisualElementContext, default as UseVisualElementContext } from "./MotionContext.svelte";

1 change: 1 addition & 0 deletions src/lib/motion-start/events/use-pointer-event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ export interface UsePointerEventProps {
options?: AddEventListenerOptions;
}

// @ts-ignore
export { default as UsePointerEvent, addPointerEvent } from './UsePointerEvent.svelte';
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ class VisualElementDragControls {
/**
* Attach a pointerdown event listener on this DOM element to initiate drag tracking.
*/
var stopPointerListener = addPointerEvent(element, 'pointerdown', (event) => {
var stopPointerListener = addPointerEvent(element, 'pointerdown', (event: PointerEvent) => {
var _a = this.props,
drag = _a.drag,
_b = _a.dragListener,
Expand Down
1 change: 1 addition & 0 deletions src/lib/motion-start/motion/features/layout/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Copyright (c) 2018 Framer B.V.
import { AnimateLayoutContextProvider } from './Animate.js';
import { MeasureContextProvider } from './Measure.js';


var layoutAnimations = {
measureLayout: MeasureContextProvider,
layoutAnimation: AnimateLayoutContextProvider,
Expand Down
1 change: 1 addition & 0 deletions src/lib/motion-start/render/dom/create-motion-class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Copyright (c) 2018 Framer B.V.
import Motion from '../../motion/Motion.svelte';
import { loadFeatures } from '../../motion/features/definitions';


export const createMotionClass = (features: Parameters<typeof loadFeatures>[0]) => {
features && loadFeatures(features);
return Motion;
Expand Down
49 changes: 49 additions & 0 deletions tsconfig.vitest-temp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"compilerOptions": {
"paths": {
"$lib": [
"../src/lib"
],
"$lib/*": [
"../src/lib/*"
]
},
"rootDirs": [
"..",
"./types"
],
"verbatimModuleSyntax": true,
"isolatedModules": true,
"lib": [
"esnext",
"DOM",
"DOM.Iterable"
],
"moduleResolution": "Bundler",
"module": "ESNext",
"noEmit": true,
"target": "ES2020",
"useDefineForClassFields": true,
"sourceMap": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true,
"declaration": true,
"declarationMap": true,
"types": [
"vitest/globals"
],
"emitDeclarationOnly": false,
"incremental": true,
"tsBuildInfoFile": "D:/clidoProjects/libraries/motion-start/node_modules/vitest/dist/chunks/tsconfig.tmp.tsbuildinfo"
},
"include": [
"src",
"src/**/*.{test,spec}-d.ts"
],
"exclude": [
"node_modules",
".svelte-kit"
]
}

0 comments on commit 971c2d0

Please sign in to comment.