Move more stuff to services folder

This commit is contained in:
Misode
2021-11-03 01:27:49 +01:00
parent ce7baa571f
commit 95097e6091
22 changed files with 36 additions and 36 deletions

View File

@@ -2,8 +2,8 @@ import { getCurrentUrl, Link, route } from 'preact-router'
import { Btn, BtnMenu, Icons, Octicon } from '.'
import config from '../../config.json'
import { locale } from '../Locales'
import type { VersionId } from '../Schemas'
import { checkVersion } from '../Schemas'
import type { VersionId } from '../services'
import { checkVersion } from '../services'
import { cleanUrl, getGenerator } from '../Utils'
const Themes: Record<string, keyof typeof Octicon> = {

View File

@@ -2,7 +2,7 @@ import type { DataModel } from '@mcschema/core'
import { Path } from '@mcschema/core'
import { useState } from 'preact/hooks'
import { useModel } from '../../hooks'
import type { VersionId } from '../../Schemas'
import type { VersionId } from '../../services'
import { BiomeSourcePreview, DecoratorPreview, NoisePreview, NoiseSettingsPreview } from '../previews'
export const HasPreview = ['dimension', 'worldgen/noise', 'worldgen/noise_settings', 'worldgen/configured_feature']

View File

@@ -4,7 +4,7 @@ import { Btn, BtnMenu } from '..'
import { useModel } from '../../hooks'
import { locale } from '../../Locales'
import { transformOutput } from '../../schema/transformOutput'
import type { BlockStateRegistry } from '../../Schemas'
import type { BlockStateRegistry } from '../../services'
import { Store } from '../../Store'
import { message } from '../../Utils'

View File

@@ -2,7 +2,7 @@ import type { DataModel } from '@mcschema/core'
import { useErrorBoundary, useState } from 'preact/hooks'
import { useModel } from '../../hooks'
import { FullNode } from '../../schema/renderHtml'
import type { BlockStateRegistry, VersionId } from '../../Schemas'
import type { BlockStateRegistry, VersionId } from '../../services'
type TreePanelProps = {
lang: string,

View File

@@ -4,7 +4,7 @@ import { Btn, BtnInput, BtnMenu } from '..'
import { useCanvas } from '../../hooks'
import { locale } from '../../Locales'
import { noiseSettings } from '../../previews'
import { checkVersion } from '../../Schemas'
import { checkVersion } from '../../services'
import { randomSeed } from '../../Utils'
export const NoiseSettingsPreview = ({ lang, data, shown, version }: PreviewProps) => {

View File

@@ -1,5 +1,5 @@
import type { DataModel } from '@mcschema/core'
import type { VersionId } from '../../Schemas'
import type { VersionId } from '../../services'
export * from './BiomeSourcePreview'
export * from './DecoratorPreview'

View File

@@ -1,9 +1,9 @@
import { Howl } from 'howler'
import { useEffect, useRef, useState } from 'preact/hooks'
import { Btn, NumberInput, RangeInput, TextInput } from '..'
import { getResourceUrl } from '../../DataFetcher'
import { locale } from '../../Locales'
import type { SoundEvents, VersionAssets } from '../../Manifest'
import type { SoundEvents, VersionAssets } from '../../services'
import { getResourceUrl } from '../../services'
export interface SoundConfig {
id: string,