From 5b1e15c5bb783b371212aa81ea3fb445f6b6a591 Mon Sep 17 00:00:00 2001 From: Trezy Date: Thu, 1 Aug 2024 10:10:37 -0500 Subject: [PATCH] refactor: remove extensions from imports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some environments were complaining about having `.ts` on all the imports. That's _stupid_ because it's closer to the actual import spec, but whatever. 🤷🏻‍♂️ --- src/components/Application.ts | 8 +-- src/components/Context.ts | 2 +- src/core/createRoot.ts | 20 +++---- src/core/reconciler.ts | 56 +++++++++---------- src/core/roots.ts | 2 +- src/global.ts | 4 +- src/helpers/afterActiveInstanceBlur.ts | 2 +- src/helpers/appendChild.ts | 6 +- src/helpers/applyProps.ts | 18 +++--- src/helpers/attach.ts | 2 +- src/helpers/beforeActiveInstanceBlur.ts | 2 +- src/helpers/catalogue.ts | 2 +- src/helpers/clearContainer.ts | 2 +- src/helpers/commitUpdate.ts | 10 ++-- src/helpers/createInstance.ts | 20 +++---- src/helpers/createTextInstance.ts | 4 +- src/helpers/detach.ts | 2 +- src/helpers/detachDeletedInstance.ts | 2 +- src/helpers/diffProps.ts | 10 ++-- src/helpers/extend.ts | 2 +- src/helpers/finalizeInitialChildren.ts | 2 +- src/helpers/gentleCloneProps.ts | 4 +- src/helpers/getChildHostContext.ts | 2 +- src/helpers/getCurrentEventPriority.ts | 2 +- src/helpers/getInstanceFromNode.ts | 2 +- src/helpers/getInstanceFromScope.ts | 2 +- src/helpers/getPublicInstance.ts | 2 +- src/helpers/getRootHostContext.ts | 2 +- src/helpers/hideInstance.ts | 2 +- src/helpers/insertBefore.ts | 10 ++-- src/helpers/isDiffSet.ts | 2 +- src/helpers/log.ts | 2 +- src/helpers/prepareForCommit.ts | 2 +- src/helpers/prepareInstance.ts | 4 +- src/helpers/preparePortalMount.ts | 2 +- src/helpers/prepareScopeUpdate.ts | 2 +- src/helpers/prepareUpdate.ts | 8 +-- src/helpers/removeChild.ts | 6 +- src/helpers/resetAfterCommit.ts | 2 +- src/helpers/shouldSetTextContent.ts | 2 +- src/helpers/switchInstance.ts | 8 +-- src/helpers/unhideInstance.ts | 2 +- src/hooks/useApp.ts | 2 +- src/hooks/useApplication.ts | 2 +- src/hooks/useAsset.ts | 8 +-- src/hooks/useAssets.ts | 12 ++-- src/hooks/useExtend.ts | 2 +- src/hooks/useSuspenseAssets.ts | 8 +-- src/hooks/useTick.ts | 8 +-- src/index.ts | 24 ++++---- src/typedefs/ApplicationProps.ts | 2 +- src/typedefs/BasePixiReactNode.ts | 2 +- src/typedefs/DiffSet.ts | 2 +- src/typedefs/EventHandlers.ts | 2 +- src/typedefs/HostConfig.ts | 6 +- src/typedefs/InstanceState.ts | 2 +- src/typedefs/InternalState.ts | 2 +- src/typedefs/NamespacedPixiElements.ts | 2 +- src/typedefs/PixiElements.ts | 6 +- src/typedefs/PixiReactChildNode.ts | 2 +- src/typedefs/PixiReactNode.ts | 12 ++-- src/typedefs/Root.ts | 4 +- src/typedefs/UpdatePayload.ts | 2 +- src/typedefs/UseAssetsResult.ts | 2 +- test/unit/core/createRoot.test.ts | 2 +- .../helpers/afterActiveInstanceBlur.test.ts | 2 +- test/unit/helpers/appendChild.test.ts | 4 +- test/unit/helpers/applyProps.test.ts | 4 +- test/unit/index.test.ts | 24 ++++---- 69 files changed, 199 insertions(+), 199 deletions(-) diff --git a/src/components/Application.ts b/src/components/Application.ts index b53baa8d..571278f3 100644 --- a/src/components/Application.ts +++ b/src/components/Application.ts @@ -5,16 +5,16 @@ import { useCallback, useRef, } from 'react'; -import { createRoot } from '../core/createRoot.ts'; -import { useIsomorphicLayoutEffect } from '../hooks/useIsomorphicLayoutEffect.ts'; +import { createRoot } from '../core/createRoot'; +import { useIsomorphicLayoutEffect } from '../hooks/useIsomorphicLayoutEffect'; import type { Application as PixiApplication } from 'pixi.js'; import type { ForwardRefRenderFunction, MutableRefObject, } from 'react'; -import type { ApplicationProps } from '../typedefs/ApplicationProps.ts'; -import type { Root } from '../typedefs/Root.ts'; +import type { ApplicationProps } from '../typedefs/ApplicationProps'; +import type { Root } from '../typedefs/Root'; const originalDefaultTextStyle = { ...TextStyle.defaultTextStyle }; diff --git a/src/components/Context.ts b/src/components/Context.ts index 820767fa..f7468a44 100644 --- a/src/components/Context.ts +++ b/src/components/Context.ts @@ -1,6 +1,6 @@ import { createContext } from 'react'; -import type { ApplicationState } from '../typedefs/ApplicationState.ts'; +import type { ApplicationState } from '../typedefs/ApplicationState'; export const Context = createContext({} as ApplicationState); diff --git a/src/core/createRoot.ts b/src/core/createRoot.ts index 15400fbb..1c062157 100644 --- a/src/core/createRoot.ts +++ b/src/core/createRoot.ts @@ -1,19 +1,19 @@ import { Application } from 'pixi.js'; import { createElement } from 'react'; import { ConcurrentRoot } from 'react-reconciler/constants.js'; -import { ContextProvider } from '../components/Context.ts'; -import { isReadOnlyProperty } from '../helpers/isReadOnlyProperty.ts'; -import { log } from '../helpers/log.ts'; -import { prepareInstance } from '../helpers/prepareInstance.ts'; -import { reconciler } from './reconciler.ts'; -import { roots } from './roots.ts'; +import { ContextProvider } from '../components/Context'; +import { isReadOnlyProperty } from '../helpers/isReadOnlyProperty'; +import { log } from '../helpers/log'; +import { prepareInstance } from '../helpers/prepareInstance'; +import { reconciler } from './reconciler'; +import { roots } from './roots'; import type { ApplicationOptions } from 'pixi.js'; import type { ReactNode } from 'react'; -import type { ApplicationState } from '../typedefs/ApplicationState.ts'; -import type { CreateRootOptions } from '../typedefs/CreateRootOptions.ts'; -import type { HostConfig } from '../typedefs/HostConfig.ts'; -import type { InternalState } from '../typedefs/InternalState.ts'; +import type { ApplicationState } from '../typedefs/ApplicationState'; +import type { CreateRootOptions } from '../typedefs/CreateRootOptions'; +import type { HostConfig } from '../typedefs/HostConfig'; +import type { InternalState } from '../typedefs/InternalState'; /** Creates a new root for a Pixi React app. */ export function createRoot( diff --git a/src/core/reconciler.ts b/src/core/reconciler.ts index 008cfcf7..f2709970 100644 --- a/src/core/reconciler.ts +++ b/src/core/reconciler.ts @@ -1,34 +1,34 @@ /* eslint-disable no-empty-function */ import Reconciler from 'react-reconciler'; -import { version } from '../../package.json' assert { type: 'json' }; -import { afterActiveInstanceBlur } from '../helpers/afterActiveInstanceBlur.ts'; -import { appendChild } from '../helpers/appendChild.ts'; -import { beforeActiveInstanceBlur } from '../helpers/beforeActiveInstanceBlur.ts'; -import { clearContainer } from '../helpers/clearContainer.ts'; -import { commitUpdate } from '../helpers/commitUpdate.ts'; -import { createInstance } from '../helpers/createInstance.ts'; -import { createTextInstance } from '../helpers/createTextInstance.ts'; -import { detachDeletedInstance } from '../helpers/detachDeletedInstance.ts'; -import { finalizeInitialChildren } from '../helpers/finalizeInitialChildren.ts'; -import { getChildHostContext } from '../helpers/getChildHostContext.ts'; -import { getCurrentEventPriority } from '../helpers/getCurrentEventPriority.ts'; -import { getInstanceFromNode } from '../helpers/getInstanceFromNode.ts'; -import { getInstanceFromScope } from '../helpers/getInstanceFromScope.ts'; -import { getPublicInstance } from '../helpers/getPublicInstance.ts'; -import { getRootHostContext } from '../helpers/getRootHostContext.ts'; -import { hideInstance } from '../helpers/hideInstance.ts'; -import { insertBefore } from '../helpers/insertBefore.ts'; -import { prepareForCommit } from '../helpers/prepareForCommit.ts'; -import { preparePortalMount } from '../helpers/preparePortalMount.ts'; -import { prepareScopeUpdate } from '../helpers/prepareScopeUpdate.ts'; -import { prepareUpdate } from '../helpers/prepareUpdate.ts'; -import { removeChild } from '../helpers/removeChild.ts'; -import { resetAfterCommit } from '../helpers/resetAfterCommit.ts'; -import { shouldSetTextContent } from '../helpers/shouldSetTextContent.ts'; -import { unhideInstance } from '../helpers/unhideInstance.ts'; +import packageData from '../../package.json' assert { type: 'json' }; +import { afterActiveInstanceBlur } from '../helpers/afterActiveInstanceBlur'; +import { appendChild } from '../helpers/appendChild'; +import { beforeActiveInstanceBlur } from '../helpers/beforeActiveInstanceBlur'; +import { clearContainer } from '../helpers/clearContainer'; +import { commitUpdate } from '../helpers/commitUpdate'; +import { createInstance } from '../helpers/createInstance'; +import { createTextInstance } from '../helpers/createTextInstance'; +import { detachDeletedInstance } from '../helpers/detachDeletedInstance'; +import { finalizeInitialChildren } from '../helpers/finalizeInitialChildren'; +import { getChildHostContext } from '../helpers/getChildHostContext'; +import { getCurrentEventPriority } from '../helpers/getCurrentEventPriority'; +import { getInstanceFromNode } from '../helpers/getInstanceFromNode'; +import { getInstanceFromScope } from '../helpers/getInstanceFromScope'; +import { getPublicInstance } from '../helpers/getPublicInstance'; +import { getRootHostContext } from '../helpers/getRootHostContext'; +import { hideInstance } from '../helpers/hideInstance'; +import { insertBefore } from '../helpers/insertBefore'; +import { prepareForCommit } from '../helpers/prepareForCommit'; +import { preparePortalMount } from '../helpers/preparePortalMount'; +import { prepareScopeUpdate } from '../helpers/prepareScopeUpdate'; +import { prepareUpdate } from '../helpers/prepareUpdate'; +import { removeChild } from '../helpers/removeChild'; +import { resetAfterCommit } from '../helpers/resetAfterCommit'; +import { shouldSetTextContent } from '../helpers/shouldSetTextContent'; +import { unhideInstance } from '../helpers/unhideInstance'; -import type { HostConfig } from '../typedefs/HostConfig.ts'; +import type { HostConfig } from '../typedefs/HostConfig'; const reconcilerConfig: Reconciler.HostConfig< HostConfig['type'], @@ -89,7 +89,7 @@ const reconciler = Reconciler(reconcilerConfig); reconciler.injectIntoDevTools({ bundleType: process.env.NODE_ENV === 'production' ? 0 : 1, rendererPackageName: '@pixi/react', - version, + version: packageData.version, }); export { reconciler }; diff --git a/src/core/roots.ts b/src/core/roots.ts index b06cb968..26f6f480 100644 --- a/src/core/roots.ts +++ b/src/core/roots.ts @@ -1,4 +1,4 @@ -import type { Root } from '../typedefs/Root.ts'; +import type { Root } from '../typedefs/Root'; /** We store roots here since we can render to multiple canvases. */ export const roots: Map = new Map(); diff --git a/src/global.ts b/src/global.ts index 9f43a340..f7763403 100644 --- a/src/global.ts +++ b/src/global.ts @@ -1,5 +1,5 @@ -import type { NamespacedPixiElements } from './typedefs/NamespacedPixiElements.ts'; -import type { PixiElements } from './typedefs/PixiElements.ts'; +import type { NamespacedPixiElements } from './typedefs/NamespacedPixiElements'; +import type { PixiElements } from './typedefs/PixiElements'; declare global { diff --git a/src/helpers/afterActiveInstanceBlur.ts b/src/helpers/afterActiveInstanceBlur.ts index 6cc065db..37b9857a 100644 --- a/src/helpers/afterActiveInstanceBlur.ts +++ b/src/helpers/afterActiveInstanceBlur.ts @@ -1,4 +1,4 @@ -import { log } from './log.ts'; +import { log } from './log'; /** * No idea what this actually does. 🤷🏻‍♂️ diff --git a/src/helpers/appendChild.ts b/src/helpers/appendChild.ts index c735cf12..22170daa 100644 --- a/src/helpers/appendChild.ts +++ b/src/helpers/appendChild.ts @@ -2,10 +2,10 @@ import { Container, Filter, } from 'pixi.js'; -import { attach } from './attach.ts'; -import { log } from './log.ts'; +import { attach } from './attach'; +import { log } from './log'; -import type { HostConfig } from '../typedefs/HostConfig.ts'; +import type { HostConfig } from '../typedefs/HostConfig'; /** Adds elements to our application. */ export function appendChild( diff --git a/src/helpers/applyProps.ts b/src/helpers/applyProps.ts index aec8c0d1..1389e1df 100644 --- a/src/helpers/applyProps.ts +++ b/src/helpers/applyProps.ts @@ -5,23 +5,23 @@ import { import { PixiToReactEventPropNames, ReactToPixiEventPropNames, -} from '../constants/EventPropNames.ts'; +} from '../constants/EventPropNames'; import { isNull, isUndefined, -} from './compare.ts'; -import { diffProps } from './diffProps.ts'; -import { isDiffSet } from './isDiffSet.ts'; -import { isReadOnlyProperty } from './isReadOnlyProperty.ts'; -import { log } from './log.ts'; +} from './compare'; +import { diffProps } from './diffProps'; +import { isDiffSet } from './isDiffSet'; +import { isReadOnlyProperty } from './isReadOnlyProperty'; +import { log } from './log'; import type { FederatedPointerEvent, FederatedWheelEvent, } from 'pixi.js'; -import type { DiffSet } from '../typedefs/DiffSet.ts'; -import type { HostConfig } from '../typedefs/HostConfig.ts'; -import type { InstanceState } from '../typedefs/InstanceState.ts'; +import type { DiffSet } from '../typedefs/DiffSet'; +import type { HostConfig } from '../typedefs/HostConfig'; +import type { InstanceState } from '../typedefs/InstanceState'; const DEFAULT = '__default'; const DEFAULTS_CONTAINERS = new Map(); diff --git a/src/helpers/attach.ts b/src/helpers/attach.ts index 9b2bd656..31d6f880 100644 --- a/src/helpers/attach.ts +++ b/src/helpers/attach.ts @@ -1,6 +1,6 @@ import { Filter } from 'pixi.js'; -import type { HostConfig } from '../typedefs/HostConfig.ts'; +import type { HostConfig } from '../typedefs/HostConfig'; export function attach( parentInstance: HostConfig['containerInstance'], diff --git a/src/helpers/beforeActiveInstanceBlur.ts b/src/helpers/beforeActiveInstanceBlur.ts index 36230ea6..96e8479c 100644 --- a/src/helpers/beforeActiveInstanceBlur.ts +++ b/src/helpers/beforeActiveInstanceBlur.ts @@ -1,4 +1,4 @@ -import { log } from './log.ts'; +import { log } from './log'; /** * No idea what this actually does. 🤷🏻‍♂️ diff --git a/src/helpers/catalogue.ts b/src/helpers/catalogue.ts index 340d0eb3..d93c2092 100644 --- a/src/helpers/catalogue.ts +++ b/src/helpers/catalogue.ts @@ -1,4 +1,4 @@ -import type { HostConfig } from '../typedefs/HostConfig.ts'; +import type { HostConfig } from '../typedefs/HostConfig'; export const catalogue: { [name: string]: { diff --git a/src/helpers/clearContainer.ts b/src/helpers/clearContainer.ts index b1fd0442..e63dcff5 100644 --- a/src/helpers/clearContainer.ts +++ b/src/helpers/clearContainer.ts @@ -1,4 +1,4 @@ -import { log } from './log.ts'; +import { log } from './log'; /** Mutate and remove all children from a container. */ export function clearContainer() diff --git a/src/helpers/commitUpdate.ts b/src/helpers/commitUpdate.ts index a631fa5e..683141de 100644 --- a/src/helpers/commitUpdate.ts +++ b/src/helpers/commitUpdate.ts @@ -1,10 +1,10 @@ -import { applyProps } from '../helpers/applyProps.ts'; -import { log } from '../helpers/log.ts'; -import { switchInstance } from './switchInstance.ts'; +import { applyProps } from '../helpers/applyProps'; +import { log } from '../helpers/log'; +import { switchInstance } from './switchInstance'; import type { Fiber } from 'react-reconciler'; -import type { HostConfig } from '../typedefs/HostConfig.ts'; -import type { UpdatePayload } from '../typedefs/UpdatePayload.ts'; +import type { HostConfig } from '../typedefs/HostConfig'; +import type { UpdatePayload } from '../typedefs/UpdatePayload'; export function commitUpdate( instance: HostConfig['instance'], diff --git a/src/helpers/createInstance.ts b/src/helpers/createInstance.ts index c1a4517e..71c5799f 100644 --- a/src/helpers/createInstance.ts +++ b/src/helpers/createInstance.ts @@ -1,13 +1,13 @@ -import { PixiReactIgnoredProps } from '../constants/PixiReactIgnoredProps.ts'; -import { applyProps } from './applyProps.ts'; -import { catalogue } from './catalogue.ts'; -import { convertStringToPascalCase } from './convertStringToPascalCase.ts'; -import { gentleCloneProps } from './gentleCloneProps.ts'; -import { log } from './log.ts'; -import { parseComponentType } from './parseComponentType.ts'; -import { prepareInstance } from './prepareInstance.ts'; - -import type { HostConfig } from '../typedefs/HostConfig.ts'; +import { PixiReactIgnoredProps } from '../constants/PixiReactIgnoredProps'; +import { applyProps } from './applyProps'; +import { catalogue } from './catalogue'; +import { convertStringToPascalCase } from './convertStringToPascalCase'; +import { gentleCloneProps } from './gentleCloneProps'; +import { log } from './log'; +import { parseComponentType } from './parseComponentType'; +import { prepareInstance } from './prepareInstance'; + +import type { HostConfig } from '../typedefs/HostConfig'; export function createInstance( type: HostConfig['type'], diff --git a/src/helpers/createTextInstance.ts b/src/helpers/createTextInstance.ts index d3cff3f1..fd9fc2d8 100644 --- a/src/helpers/createTextInstance.ts +++ b/src/helpers/createTextInstance.ts @@ -1,6 +1,6 @@ -import { log } from './log.ts'; +import { log } from './log'; -import type { HostConfig } from '../typedefs/HostConfig.ts'; +import type { HostConfig } from '../typedefs/HostConfig'; /** Always throws, because we don't support this (yet). */ export function createTextInstance( diff --git a/src/helpers/detach.ts b/src/helpers/detach.ts index f03121cf..d8ac3c90 100644 --- a/src/helpers/detach.ts +++ b/src/helpers/detach.ts @@ -1,6 +1,6 @@ import { Filter } from 'pixi.js'; -import type { HostConfig } from '../typedefs/HostConfig.ts'; +import type { HostConfig } from '../typedefs/HostConfig'; export function detach( childInstance: HostConfig['instance'], diff --git a/src/helpers/detachDeletedInstance.ts b/src/helpers/detachDeletedInstance.ts index bc795e0c..b5cfbdec 100644 --- a/src/helpers/detachDeletedInstance.ts +++ b/src/helpers/detachDeletedInstance.ts @@ -1,4 +1,4 @@ -import { log } from './log.ts'; +import { log } from './log'; /** No idea what this actually does. 🤷🏻‍♂️ */ export function detachDeletedInstance() diff --git a/src/helpers/diffProps.ts b/src/helpers/diffProps.ts index a907046c..1ef2c3e3 100644 --- a/src/helpers/diffProps.ts +++ b/src/helpers/diffProps.ts @@ -1,12 +1,12 @@ import { PixiToReactEventPropNames, ReactToPixiEventPropNames, -} from '../constants/EventPropNames.ts'; -import { isEqual } from './compare.ts'; -import { gentleCloneProps } from './gentleCloneProps.ts'; +} from '../constants/EventPropNames'; +import { isEqual } from './compare'; +import { gentleCloneProps } from './gentleCloneProps'; -import type { Change } from '../typedefs/Change.ts'; -import type { HostConfig } from '../typedefs/HostConfig.ts'; +import type { Change } from '../typedefs/Change'; +import type { HostConfig } from '../typedefs/HostConfig'; const DEFAULT = '__default'; diff --git a/src/helpers/extend.ts b/src/helpers/extend.ts index b4f628b3..069a5c7e 100644 --- a/src/helpers/extend.ts +++ b/src/helpers/extend.ts @@ -1,4 +1,4 @@ -import { catalogue } from './catalogue.ts'; +import { catalogue } from './catalogue'; export function extend(objects: { [key: string]: new (...args: any) => any }) { diff --git a/src/helpers/finalizeInitialChildren.ts b/src/helpers/finalizeInitialChildren.ts index a0740f3a..2cb8d49a 100644 --- a/src/helpers/finalizeInitialChildren.ts +++ b/src/helpers/finalizeInitialChildren.ts @@ -1,4 +1,4 @@ -import { log } from './log.ts'; +import { log } from './log'; /** Applies final mutations during the render phase. */ export function finalizeInitialChildren() diff --git a/src/helpers/gentleCloneProps.ts b/src/helpers/gentleCloneProps.ts index b45910b4..9b65dbca 100644 --- a/src/helpers/gentleCloneProps.ts +++ b/src/helpers/gentleCloneProps.ts @@ -1,5 +1,5 @@ -import { ReactIgnoredProps } from '../constants/ReactIgnoredProps.ts'; -import { gentleClone } from './gentleClone.ts'; +import { ReactIgnoredProps } from '../constants/ReactIgnoredProps'; +import { gentleClone } from './gentleClone'; /** Clones a props object, excluding keys that are special to React and Pixi React. */ export function gentleCloneProps( diff --git a/src/helpers/getChildHostContext.ts b/src/helpers/getChildHostContext.ts index 26ae3e65..62bdc1e0 100644 --- a/src/helpers/getChildHostContext.ts +++ b/src/helpers/getChildHostContext.ts @@ -1,4 +1,4 @@ -import { log } from './log.ts'; +import { log } from './log'; export function getChildHostContext(parentHostContext: T) { diff --git a/src/helpers/getCurrentEventPriority.ts b/src/helpers/getCurrentEventPriority.ts index 37184c88..b815daf5 100644 --- a/src/helpers/getCurrentEventPriority.ts +++ b/src/helpers/getCurrentEventPriority.ts @@ -3,7 +3,7 @@ import { DefaultEventPriority, DiscreteEventPriority, } from 'react-reconciler/constants.js'; -import { log } from './log.ts'; +import { log } from './log'; export function getCurrentEventPriority() { diff --git a/src/helpers/getInstanceFromNode.ts b/src/helpers/getInstanceFromNode.ts index e26841a1..9933730b 100644 --- a/src/helpers/getInstanceFromNode.ts +++ b/src/helpers/getInstanceFromNode.ts @@ -1,4 +1,4 @@ -import { log } from './log.ts'; +import { log } from './log'; /** No idea what this actually does. 🤷🏻‍♂️ */ export function getInstanceFromNode() diff --git a/src/helpers/getInstanceFromScope.ts b/src/helpers/getInstanceFromScope.ts index 8789d330..d3d672ee 100644 --- a/src/helpers/getInstanceFromScope.ts +++ b/src/helpers/getInstanceFromScope.ts @@ -1,4 +1,4 @@ -import { log } from './log.ts'; +import { log } from './log'; /** Always throws because we don't support this. */ export function getInstanceFromScope(scope: any) diff --git a/src/helpers/getPublicInstance.ts b/src/helpers/getPublicInstance.ts index 72592823..d1051c42 100644 --- a/src/helpers/getPublicInstance.ts +++ b/src/helpers/getPublicInstance.ts @@ -1,4 +1,4 @@ -import { log } from './log.ts'; +import { log } from './log'; export function getPublicInstance(instance: T) { diff --git a/src/helpers/getRootHostContext.ts b/src/helpers/getRootHostContext.ts index b68f6670..5ea0367e 100644 --- a/src/helpers/getRootHostContext.ts +++ b/src/helpers/getRootHostContext.ts @@ -1,4 +1,4 @@ -import { log } from './log.ts'; +import { log } from './log'; /** Retrieves the host context from the root container. */ export function getRootHostContext() diff --git a/src/helpers/hideInstance.ts b/src/helpers/hideInstance.ts index c814adc4..8c7d0d73 100644 --- a/src/helpers/hideInstance.ts +++ b/src/helpers/hideInstance.ts @@ -3,7 +3,7 @@ import { Filter, } from 'pixi.js'; -import type { HostConfig } from '../typedefs/HostConfig.ts'; +import type { HostConfig } from '../typedefs/HostConfig'; export function hideInstance( instance: HostConfig['instance'] diff --git a/src/helpers/insertBefore.ts b/src/helpers/insertBefore.ts index 24cd518c..e0bb0a53 100644 --- a/src/helpers/insertBefore.ts +++ b/src/helpers/insertBefore.ts @@ -2,12 +2,12 @@ import { Container, Filter, } from 'pixi.js'; -import { attach } from './attach.ts'; -import { detach } from './detach.ts'; -import { invariant } from './invariant.ts'; -import { log } from './log.ts'; +import { attach } from './attach'; +import { detach } from './detach'; +import { invariant } from './invariant'; +import { log } from './log'; -import type { HostConfig } from '../typedefs/HostConfig.ts'; +import type { HostConfig } from '../typedefs/HostConfig'; export function insertBefore( parentInstance: HostConfig['containerInstance'], diff --git a/src/helpers/isDiffSet.ts b/src/helpers/isDiffSet.ts index 5ee7b373..0d5f2c19 100644 --- a/src/helpers/isDiffSet.ts +++ b/src/helpers/isDiffSet.ts @@ -1,4 +1,4 @@ -import type { DiffSet } from '../typedefs/DiffSet.ts'; +import type { DiffSet } from '../typedefs/DiffSet'; /** Whether the input is a diff set. */ export function isDiffSet(input: any): input is DiffSet diff --git a/src/helpers/log.ts b/src/helpers/log.ts index 689f591c..e1bd3407 100644 --- a/src/helpers/log.ts +++ b/src/helpers/log.ts @@ -1,4 +1,4 @@ -import { store } from '../store.ts'; +import { store } from '../store'; export type LogType = 'error' | 'info' | 'log' | 'warn'; diff --git a/src/helpers/prepareForCommit.ts b/src/helpers/prepareForCommit.ts index 587adbd9..d4d588f4 100644 --- a/src/helpers/prepareForCommit.ts +++ b/src/helpers/prepareForCommit.ts @@ -1,4 +1,4 @@ -import { log } from './log.ts'; +import { log } from './log'; /** Store info before React starts making changes tothe tree. */ export function prepareForCommit() diff --git a/src/helpers/prepareInstance.ts b/src/helpers/prepareInstance.ts index 3645e6e1..d5e29bdf 100644 --- a/src/helpers/prepareInstance.ts +++ b/src/helpers/prepareInstance.ts @@ -2,8 +2,8 @@ import type { Container, Filter, } from 'pixi.js'; -import type { HostConfig } from '../typedefs/HostConfig.ts'; -import type { InstanceState } from '../typedefs/InstanceState.ts'; +import type { HostConfig } from '../typedefs/HostConfig'; +import type { InstanceState } from '../typedefs/InstanceState'; /** Create the instance with the provided sate and attach the component to it. */ export function prepareInstance( diff --git a/src/helpers/preparePortalMount.ts b/src/helpers/preparePortalMount.ts index 673aca62..09fbf61e 100644 --- a/src/helpers/preparePortalMount.ts +++ b/src/helpers/preparePortalMount.ts @@ -1,4 +1,4 @@ -import { log } from './log.ts'; +import { log } from './log'; /** Called if the container is being used as a portal target. */ export function preparePortalMount() diff --git a/src/helpers/prepareScopeUpdate.ts b/src/helpers/prepareScopeUpdate.ts index 05dc859e..0051da62 100644 --- a/src/helpers/prepareScopeUpdate.ts +++ b/src/helpers/prepareScopeUpdate.ts @@ -1,4 +1,4 @@ -import { log } from './log.ts'; +import { log } from './log'; /** No idea what this actually does. 🤷🏻‍♂️ */ export function prepareScopeUpdate() diff --git a/src/helpers/prepareUpdate.ts b/src/helpers/prepareUpdate.ts index 3a902417..317f033a 100644 --- a/src/helpers/prepareUpdate.ts +++ b/src/helpers/prepareUpdate.ts @@ -1,8 +1,8 @@ -import { diffProps } from './diffProps.ts'; -import { log } from './log.ts'; +import { diffProps } from './diffProps'; +import { log } from './log'; -import type { HostConfig } from '../typedefs/HostConfig.ts'; -import type { UpdatePayload } from '../typedefs/UpdatePayload.ts'; +import type { HostConfig } from '../typedefs/HostConfig'; +import type { UpdatePayload } from '../typedefs/UpdatePayload'; export function prepareUpdate( _instance: HostConfig['instance'], diff --git a/src/helpers/removeChild.ts b/src/helpers/removeChild.ts index 60f22099..032fe6b5 100644 --- a/src/helpers/removeChild.ts +++ b/src/helpers/removeChild.ts @@ -1,8 +1,8 @@ import { Filter } from 'pixi.js'; -import { detach } from './detach.ts'; -import { log } from './log.ts'; +import { detach } from './detach'; +import { log } from './log'; -import type { HostConfig } from '../typedefs/HostConfig.ts'; +import type { HostConfig } from '../typedefs/HostConfig'; /** Removes elements from our scene and disposes of them. */ export function removeChild( diff --git a/src/helpers/resetAfterCommit.ts b/src/helpers/resetAfterCommit.ts index 0226c87a..8aab142c 100644 --- a/src/helpers/resetAfterCommit.ts +++ b/src/helpers/resetAfterCommit.ts @@ -1,4 +1,4 @@ -import { log } from './log.ts'; +import { log } from './log'; /** Restore anything stored in `prepareForCommit`. */ export function resetAfterCommit() diff --git a/src/helpers/shouldSetTextContent.ts b/src/helpers/shouldSetTextContent.ts index b00b2dbb..8737f54f 100644 --- a/src/helpers/shouldSetTextContent.ts +++ b/src/helpers/shouldSetTextContent.ts @@ -1,4 +1,4 @@ -import { log } from './log.ts'; +import { log } from './log'; /** Determines whether to set the text content of a node. */ export function shouldSetTextContent() diff --git a/src/helpers/switchInstance.ts b/src/helpers/switchInstance.ts index b00202ad..cb405557 100644 --- a/src/helpers/switchInstance.ts +++ b/src/helpers/switchInstance.ts @@ -1,9 +1,9 @@ -import { appendChild } from './appendChild.ts'; -import { createInstance } from './createInstance.ts'; -import { removeChild } from './removeChild.ts'; +import { appendChild } from './appendChild'; +import { createInstance } from './createInstance'; +import { removeChild } from './removeChild'; import type { Fiber } from 'react-reconciler'; -import type { HostConfig } from '../typedefs/HostConfig.ts'; +import type { HostConfig } from '../typedefs/HostConfig'; export function switchInstance( instance: HostConfig['instance'], diff --git a/src/helpers/unhideInstance.ts b/src/helpers/unhideInstance.ts index f42ccc23..598703d0 100644 --- a/src/helpers/unhideInstance.ts +++ b/src/helpers/unhideInstance.ts @@ -3,7 +3,7 @@ import { Filter, } from 'pixi.js'; -import type { HostConfig } from '../typedefs/HostConfig.ts'; +import type { HostConfig } from '../typedefs/HostConfig'; export function unhideInstance( instance: HostConfig['instance'], diff --git a/src/hooks/useApp.ts b/src/hooks/useApp.ts index 6691b126..848217d5 100644 --- a/src/hooks/useApp.ts +++ b/src/hooks/useApp.ts @@ -1,6 +1,6 @@ import { Application } from 'pixi.js'; import { useContext } from 'react'; -import { Context } from '../components/Context.ts'; +import { Context } from '../components/Context'; import { invariant } from '../helpers/invariant'; /** diff --git a/src/hooks/useApplication.ts b/src/hooks/useApplication.ts index cea75e7a..96c38731 100644 --- a/src/hooks/useApplication.ts +++ b/src/hooks/useApplication.ts @@ -1,6 +1,6 @@ import { Application } from 'pixi.js'; import { useContext } from 'react'; -import { Context } from '../components/Context.ts'; +import { Context } from '../components/Context'; import { invariant } from '../helpers/invariant'; /** diff --git a/src/hooks/useAsset.ts b/src/hooks/useAsset.ts index c647120d..e3a4e5b7 100644 --- a/src/hooks/useAsset.ts +++ b/src/hooks/useAsset.ts @@ -2,15 +2,15 @@ import { Assets, Cache, } from 'pixi.js'; -import { getAssetKey } from '../helpers/getAssetKey.ts'; +import { getAssetKey } from '../helpers/getAssetKey'; import type { ProgressCallback, UnresolvedAsset, } from 'pixi.js'; -import type { AssetRetryOptions } from '../typedefs/AssetRetryOptions.ts'; -import type { AssetRetryState } from '../typedefs/AssetRetryState.ts'; -import type { ErrorCallback } from '../typedefs/ErrorCallback.ts'; +import type { AssetRetryOptions } from '../typedefs/AssetRetryOptions'; +import type { AssetRetryState } from '../typedefs/AssetRetryState'; +import type { ErrorCallback } from '../typedefs/ErrorCallback'; const errorCache: Map = new Map(); diff --git a/src/hooks/useAssets.ts b/src/hooks/useAssets.ts index d276bae9..8544780d 100644 --- a/src/hooks/useAssets.ts +++ b/src/hooks/useAssets.ts @@ -3,13 +3,13 @@ import { Cache, } from 'pixi.js'; import { useState } from 'react'; -import { UseAssetsStatus } from '../constants/UseAssetsStatus.ts'; -import { getAssetKey } from '../helpers/getAssetKey.ts'; +import { UseAssetsStatus } from '../constants/UseAssetsStatus'; +import { getAssetKey } from '../helpers/getAssetKey'; -import type { AssetRetryState } from '../typedefs/AssetRetryState.ts'; -import type { UnresolvedAsset } from '../typedefs/UnresolvedAsset.ts'; -import type { UseAssetsOptions } from '../typedefs/UseAssetsOptions.ts'; -import type { UseAssetsResult } from '../typedefs/UseAssetsResult.ts'; +import type { AssetRetryState } from '../typedefs/AssetRetryState'; +import type { UnresolvedAsset } from '../typedefs/UnresolvedAsset'; +import type { UseAssetsOptions } from '../typedefs/UseAssetsOptions'; +import type { UseAssetsResult } from '../typedefs/UseAssetsResult'; const errorCache: Map = new Map(); diff --git a/src/hooks/useExtend.ts b/src/hooks/useExtend.ts index 3accf8c2..ca7a6c77 100644 --- a/src/hooks/useExtend.ts +++ b/src/hooks/useExtend.ts @@ -1,5 +1,5 @@ import { useMemo } from 'react'; -import { extend } from '../helpers/extend.ts'; +import { extend } from '../helpers/extend'; /** Expose Pixi.js components for use in JSX. */ export function useExtend( diff --git a/src/hooks/useSuspenseAssets.ts b/src/hooks/useSuspenseAssets.ts index f3e24eda..a19ff2fe 100644 --- a/src/hooks/useSuspenseAssets.ts +++ b/src/hooks/useSuspenseAssets.ts @@ -2,11 +2,11 @@ import { Assets, Cache, } from 'pixi.js'; -import { getAssetKey } from '../helpers/getAssetKey.ts'; +import { getAssetKey } from '../helpers/getAssetKey'; -import type { AssetRetryState } from '../typedefs/AssetRetryState.ts'; -import type { UnresolvedAsset } from '../typedefs/UnresolvedAsset.ts'; -import type { UseAssetsOptions } from '../typedefs/UseAssetsOptions.ts'; +import type { AssetRetryState } from '../typedefs/AssetRetryState'; +import type { UnresolvedAsset } from '../typedefs/UnresolvedAsset'; +import type { UseAssetsOptions } from '../typedefs/UseAssetsOptions'; const errorCache: Map = new Map(); diff --git a/src/hooks/useTick.ts b/src/hooks/useTick.ts index 754c9b55..befc3581 100644 --- a/src/hooks/useTick.ts +++ b/src/hooks/useTick.ts @@ -1,9 +1,9 @@ -import { invariant } from '../helpers/invariant.ts'; -import { useApplication } from './useApplication.ts'; -import { useIsomorphicLayoutEffect } from './useIsomorphicLayoutEffect.ts'; +import { invariant } from '../helpers/invariant'; +import { useApplication } from './useApplication'; +import { useIsomorphicLayoutEffect } from './useIsomorphicLayoutEffect'; import type { TickerCallback } from 'pixi.js'; -import type { UseTickOptions } from '../typedefs/UseTickOptions.ts'; +import type { UseTickOptions } from '../typedefs/UseTickOptions'; /** Attaches a callback to the application's Ticker. */ export function useTick( diff --git a/src/index.ts b/src/index.ts index 4658bc50..4c3f3fc9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -5,15 +5,15 @@ Be aware that you are using a beta version of Pixi React. - All functionality that's deprecated in the beta version WILL BE REMOVED for the production release. `); -export { Application } from './components/Application.ts'; -export { UseAssetsStatus } from './constants/UseAssetsStatus.ts'; -export { createRoot } from './core/createRoot.ts'; -export * from './global.ts'; -export { extend } from './helpers/extend.ts'; -export { useApp } from './hooks/useApp.ts'; -export { useApplication } from './hooks/useApplication.ts'; -export { useAsset } from './hooks/useAsset.ts'; -export { useAssets } from './hooks/useAssets.ts'; -export { useExtend } from './hooks/useExtend.ts'; -export { useSuspenseAssets } from './hooks/useSuspenseAssets.ts'; -export { useTick } from './hooks/useTick.ts'; +export { Application } from './components/Application'; +export { UseAssetsStatus } from './constants/UseAssetsStatus'; +export { createRoot } from './core/createRoot'; +export * from './global'; +export { extend } from './helpers/extend'; +export { useApp } from './hooks/useApp'; +export { useApplication } from './hooks/useApplication'; +export { useAsset } from './hooks/useAsset'; +export { useAssets } from './hooks/useAssets'; +export { useExtend } from './hooks/useExtend'; +export { useSuspenseAssets } from './hooks/useSuspenseAssets'; +export { useTick } from './hooks/useTick'; diff --git a/src/typedefs/ApplicationProps.ts b/src/typedefs/ApplicationProps.ts index e702fcd8..c551ad7d 100644 --- a/src/typedefs/ApplicationProps.ts +++ b/src/typedefs/ApplicationProps.ts @@ -8,7 +8,7 @@ import type { Key, RefObject, } from 'react'; -import type { PixiReactChildNode } from './PixiReactChildNode.ts'; +import type { PixiReactChildNode } from './PixiReactChildNode'; export interface BaseApplicationProps { diff --git a/src/typedefs/BasePixiReactNode.ts b/src/typedefs/BasePixiReactNode.ts index 2ef7fbdf..da678597 100644 --- a/src/typedefs/BasePixiReactNode.ts +++ b/src/typedefs/BasePixiReactNode.ts @@ -2,6 +2,6 @@ import type { Container, Filter, } from 'pixi.js'; -import type { PixiReactNode } from './PixiReactNode.ts'; +import type { PixiReactNode } from './PixiReactNode'; export type BasePixiReactNode any = typeof Container | typeof Filter> = PixiReactNode; diff --git a/src/typedefs/DiffSet.ts b/src/typedefs/DiffSet.ts index eac8c621..843cf312 100644 --- a/src/typedefs/DiffSet.ts +++ b/src/typedefs/DiffSet.ts @@ -1,4 +1,4 @@ -import type { Change } from './Change.ts'; +import type { Change } from './Change'; export interface DiffSet { diff --git a/src/typedefs/EventHandlers.ts b/src/typedefs/EventHandlers.ts index 8ab30c82..4f4f62cd 100644 --- a/src/typedefs/EventHandlers.ts +++ b/src/typedefs/EventHandlers.ts @@ -3,7 +3,7 @@ import type { FederatedPointerEvent, FederatedWheelEvent, } from 'pixi.js'; -import type { ReactToPixiEventPropNames } from '../constants/EventPropNames.ts'; +import type { ReactToPixiEventPropNames } from '../constants/EventPropNames'; export type EventHandlers = { -readonly [K in keyof typeof ReactToPixiEventPropNames]?: diff --git a/src/typedefs/HostConfig.ts b/src/typedefs/HostConfig.ts index 1e02d267..09d4087f 100644 --- a/src/typedefs/HostConfig.ts +++ b/src/typedefs/HostConfig.ts @@ -2,9 +2,9 @@ import type { Container, Filter, } from 'pixi.js'; -import type { NamespacedPixiElements } from './NamespacedPixiElements.ts'; -import type { PixiElements } from './PixiElements.ts'; -import type { PixiReactNode } from './PixiReactNode.ts'; +import type { NamespacedPixiElements } from './NamespacedPixiElements'; +import type { PixiElements } from './PixiElements'; +import type { PixiReactNode } from './PixiReactNode'; export interface HostConfig { diff --git a/src/typedefs/InstanceState.ts b/src/typedefs/InstanceState.ts index 12559282..9aaa0f38 100644 --- a/src/typedefs/InstanceState.ts +++ b/src/typedefs/InstanceState.ts @@ -1,5 +1,5 @@ import type { Filter } from 'pixi.js'; -import type { HostConfig } from './HostConfig.ts'; +import type { HostConfig } from './HostConfig'; export interface InstanceState { diff --git a/src/typedefs/InternalState.ts b/src/typedefs/InternalState.ts index 981df500..bd4ecbe6 100644 --- a/src/typedefs/InternalState.ts +++ b/src/typedefs/InternalState.ts @@ -1,4 +1,4 @@ -import type { HostConfig } from './HostConfig.ts'; +import type { HostConfig } from './HostConfig'; export interface InternalState { diff --git a/src/typedefs/NamespacedPixiElements.ts b/src/typedefs/NamespacedPixiElements.ts index 909ed306..9526d38c 100644 --- a/src/typedefs/NamespacedPixiElements.ts +++ b/src/typedefs/NamespacedPixiElements.ts @@ -1,4 +1,4 @@ -import type { PixiElements } from './PixiElements.ts'; +import type { PixiElements } from './PixiElements'; export type NamespacedPixiElements = { [K in keyof PixiElements as `pixi${Capitalize}`]: PixiElements[K]; diff --git a/src/typedefs/PixiElements.ts b/src/typedefs/PixiElements.ts index 7c974ebf..eb271c51 100644 --- a/src/typedefs/PixiElements.ts +++ b/src/typedefs/PixiElements.ts @@ -1,7 +1,7 @@ import type * as PIXI from 'pixi.js'; -import type { NameOverrides } from '../constants/NameOverrides.ts'; -import type { PixiComponents } from './PixiComponents.ts'; -import type { PixiReactElementProps } from './PixiReactNode.ts'; +import type { NameOverrides } from '../constants/NameOverrides'; +import type { PixiComponents } from './PixiComponents'; +import type { PixiReactElementProps } from './PixiReactNode'; export type PixiElements = { [K in PixiComponents as K extends keyof typeof NameOverrides ? typeof NameOverrides[K] : Uncapitalize]: { diff --git a/src/typedefs/PixiReactChildNode.ts b/src/typedefs/PixiReactChildNode.ts index 250633b1..3e1d20f6 100644 --- a/src/typedefs/PixiReactChildNode.ts +++ b/src/typedefs/PixiReactChildNode.ts @@ -1,4 +1,4 @@ import type { ReactNode } from 'react'; -import type { BasePixiReactNode } from './BasePixiReactNode.ts'; +import type { BasePixiReactNode } from './BasePixiReactNode'; export type PixiReactChildNode = BasePixiReactNode | Iterable | ReactNode; diff --git a/src/typedefs/PixiReactNode.ts b/src/typedefs/PixiReactNode.ts index 322af1c7..23077b6a 100644 --- a/src/typedefs/PixiReactNode.ts +++ b/src/typedefs/PixiReactNode.ts @@ -6,12 +6,12 @@ import type { Key, Ref, } from 'react'; -import type { PixiToReactEventPropNames } from '../constants/EventPropNames.ts'; -import type { ConstructorOptions } from './ConstructorOptions.ts'; -import type { DrawCallback } from './DrawCallback.ts'; -import type { EventHandlers } from './EventHandlers.ts'; -import type { InstanceState } from './InstanceState.ts'; -import type { PixiReactChildNode } from './PixiReactChildNode.ts'; +import type { PixiToReactEventPropNames } from '../constants/EventPropNames'; +import type { ConstructorOptions } from './ConstructorOptions'; +import type { DrawCallback } from './DrawCallback'; +import type { EventHandlers } from './EventHandlers'; +import type { InstanceState } from './InstanceState'; +import type { PixiReactChildNode } from './PixiReactChildNode'; export interface BaseNodeProps any = typeof Container> { diff --git a/src/typedefs/Root.ts b/src/typedefs/Root.ts index 23f1c19e..234b0ac5 100644 --- a/src/typedefs/Root.ts +++ b/src/typedefs/Root.ts @@ -1,7 +1,7 @@ import type { Container } from 'pixi.js'; import type { Fiber } from 'react-reconciler'; -import type { ApplicationState } from './ApplicationState.ts'; -import type { InternalState } from './InternalState.ts'; +import type { ApplicationState } from './ApplicationState'; +import type { InternalState } from './InternalState'; export interface Root { diff --git a/src/typedefs/UpdatePayload.ts b/src/typedefs/UpdatePayload.ts index 34da0f40..8a0c0f7d 100644 --- a/src/typedefs/UpdatePayload.ts +++ b/src/typedefs/UpdatePayload.ts @@ -1,4 +1,4 @@ -import type { DiffSet } from './DiffSet.ts'; +import type { DiffSet } from './DiffSet'; export interface UpdatePayload { diff --git a/src/typedefs/UseAssetsResult.ts b/src/typedefs/UseAssetsResult.ts index d3ca87c8..e3cfb2b8 100644 --- a/src/typedefs/UseAssetsResult.ts +++ b/src/typedefs/UseAssetsResult.ts @@ -1,4 +1,4 @@ -import type { UseAssetsStatus } from '../constants/UseAssetsStatus.ts'; +import type { UseAssetsStatus } from '../constants/UseAssetsStatus'; export interface UseAssetsResult { diff --git a/test/unit/core/createRoot.test.ts b/test/unit/core/createRoot.test.ts index bb5ac4a7..e650f1ec 100644 --- a/test/unit/core/createRoot.test.ts +++ b/test/unit/core/createRoot.test.ts @@ -4,7 +4,7 @@ import { expect, it, } from 'vitest'; -import { createRoot } from '../../../src/core/createRoot.ts'; +import { createRoot } from '../../../src/core/createRoot'; describe('createRoot', () => { diff --git a/test/unit/helpers/afterActiveInstanceBlur.test.ts b/test/unit/helpers/afterActiveInstanceBlur.test.ts index 6cff3bc0..a5977a45 100644 --- a/test/unit/helpers/afterActiveInstanceBlur.test.ts +++ b/test/unit/helpers/afterActiveInstanceBlur.test.ts @@ -3,7 +3,7 @@ import { expect, it, } from 'vitest'; -import { afterActiveInstanceBlur } from '../../../src/helpers/afterActiveInstanceBlur.ts'; +import { afterActiveInstanceBlur } from '../../../src/helpers/afterActiveInstanceBlur'; describe('afterActiveInstanceBlur', () => { diff --git a/test/unit/helpers/appendChild.test.ts b/test/unit/helpers/appendChild.test.ts index a09e7e9e..c3ed82fd 100644 --- a/test/unit/helpers/appendChild.test.ts +++ b/test/unit/helpers/appendChild.test.ts @@ -4,8 +4,8 @@ import { expect, it, } from 'vitest'; -import { appendChild } from '../../../src/helpers/appendChild.ts'; -import { prepareInstance } from '../../../src/helpers/prepareInstance.ts'; +import { appendChild } from '../../../src/helpers/appendChild'; +import { prepareInstance } from '../../../src/helpers/prepareInstance'; describe('appendChild', () => { diff --git a/test/unit/helpers/applyProps.test.ts b/test/unit/helpers/applyProps.test.ts index 6410e97c..628b592e 100644 --- a/test/unit/helpers/applyProps.test.ts +++ b/test/unit/helpers/applyProps.test.ts @@ -4,8 +4,8 @@ import { expect, it, } from 'vitest'; -import { applyProps } from '../../../src/helpers/applyProps.ts'; -import { prepareInstance } from '../../../src/helpers/prepareInstance.ts'; +import { applyProps } from '../../../src/helpers/applyProps'; +import { prepareInstance } from '../../../src/helpers/prepareInstance'; describe('applyProps', () => { diff --git a/test/unit/index.test.ts b/test/unit/index.test.ts index 9b36d412..0b99ef48 100644 --- a/test/unit/index.test.ts +++ b/test/unit/index.test.ts @@ -3,18 +3,18 @@ import { expect, it, } from 'vitest'; -import { Application } from '../../src/components/Application.ts'; -import { UseAssetsStatus } from '../../src/constants/UseAssetsStatus.ts'; -import { createRoot } from '../../src/core/createRoot.ts'; -import { extend } from '../../src/helpers/extend.ts'; -import { useApp } from '../../src/hooks/useApp.ts'; -import { useApplication } from '../../src/hooks/useApplication.ts'; -import { useAsset } from '../../src/hooks/useAsset.ts'; -import { useAssets } from '../../src/hooks/useAssets.ts'; -import { useExtend } from '../../src/hooks/useExtend.ts'; -import { useSuspenseAssets } from '../../src/hooks/useSuspenseAssets.ts'; -import { useTick } from '../../src/hooks/useTick.ts'; -import * as PixiReact from '../../src/index.ts'; +import { Application } from '../../src/components/Application'; +import { UseAssetsStatus } from '../../src/constants/UseAssetsStatus'; +import { createRoot } from '../../src/core/createRoot'; +import { extend } from '../../src/helpers/extend'; +import { useApp } from '../../src/hooks/useApp'; +import { useApplication } from '../../src/hooks/useApplication'; +import { useAsset } from '../../src/hooks/useAsset'; +import { useAssets } from '../../src/hooks/useAssets'; +import { useExtend } from '../../src/hooks/useExtend'; +import { useSuspenseAssets } from '../../src/hooks/useSuspenseAssets'; +import { useTick } from '../../src/hooks/useTick'; +import * as PixiReact from '../../src/index'; describe('exports', () => {