diff --git a/.changeset/mean-pans-study.md b/.changeset/mean-pans-study.md new file mode 100644 index 0000000000..96f3a51a21 --- /dev/null +++ b/.changeset/mean-pans-study.md @@ -0,0 +1,6 @@ +--- +"@latticexyz/cli": patch +"@latticexyz/std-client": patch +--- + +Generated `contractComponents` now properly import `World` as type diff --git a/.prettierignore b/.prettierignore index 50f1dc1280..cb96b10c21 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,4 +1,5 @@ dist **/types/ethers-contracts **/.next -templates/phaser/packages/art \ No newline at end of file +templates/phaser/packages/art +**/contractComponents.ts diff --git a/e2e/packages/client-vanilla/src/mud/contractComponents.ts b/e2e/packages/client-vanilla/src/mud/contractComponents.ts index 9ffa13a377..4c59ed6f18 100644 --- a/e2e/packages/client-vanilla/src/mud/contractComponents.ts +++ b/e2e/packages/client-vanilla/src/mud/contractComponents.ts @@ -1,6 +1,10 @@ /* Autogenerated file. Do not edit manually. */ -import { defineComponent, Type as RecsType, World } from "@latticexyz/recs"; +import { + defineComponent, + Type as RecsType, + type World, +} from "@latticexyz/recs"; export function defineContractComponents(world: World) { return { diff --git a/examples/minimal/packages/client-phaser/src/mud/contractComponents.ts b/examples/minimal/packages/client-phaser/src/mud/contractComponents.ts index 5ab7b05983..e9ccad3633 100644 --- a/examples/minimal/packages/client-phaser/src/mud/contractComponents.ts +++ b/examples/minimal/packages/client-phaser/src/mud/contractComponents.ts @@ -1,6 +1,10 @@ /* Autogenerated file. Do not edit manually. */ -import { defineComponent, Type as RecsType, World } from "@latticexyz/recs"; +import { + defineComponent, + Type as RecsType, + type World, +} from "@latticexyz/recs"; export function defineContractComponents(world: World) { return { diff --git a/examples/minimal/packages/client-react/src/mud/contractComponents.ts b/examples/minimal/packages/client-react/src/mud/contractComponents.ts index 5ab7b05983..e9ccad3633 100644 --- a/examples/minimal/packages/client-react/src/mud/contractComponents.ts +++ b/examples/minimal/packages/client-react/src/mud/contractComponents.ts @@ -1,6 +1,10 @@ /* Autogenerated file. Do not edit manually. */ -import { defineComponent, Type as RecsType, World } from "@latticexyz/recs"; +import { + defineComponent, + Type as RecsType, + type World, +} from "@latticexyz/recs"; export function defineContractComponents(world: World) { return { diff --git a/examples/minimal/packages/client-vanilla/src/mud/contractComponents.ts b/examples/minimal/packages/client-vanilla/src/mud/contractComponents.ts index 5ab7b05983..e9ccad3633 100644 --- a/examples/minimal/packages/client-vanilla/src/mud/contractComponents.ts +++ b/examples/minimal/packages/client-vanilla/src/mud/contractComponents.ts @@ -1,6 +1,10 @@ /* Autogenerated file. Do not edit manually. */ -import { defineComponent, Type as RecsType, World } from "@latticexyz/recs"; +import { + defineComponent, + Type as RecsType, + type World, +} from "@latticexyz/recs"; export function defineContractComponents(world: World) { return { diff --git a/packages/cli/src/render-ts/renderRecsV1Tables.ts b/packages/cli/src/render-ts/renderRecsV1Tables.ts index e3b53d0609..39c015e853 100644 --- a/packages/cli/src/render-ts/renderRecsV1Tables.ts +++ b/packages/cli/src/render-ts/renderRecsV1Tables.ts @@ -6,7 +6,7 @@ export function renderRecsV1Tables(options: RecsV1TableOptions) { return `/* Autogenerated file. Do not edit manually. */ -import { defineComponent, Type as RecsType, World } from "@latticexyz/recs"; +import { defineComponent, Type as RecsType, type World } from "@latticexyz/recs"; export function defineContractComponents(world: World) { return { diff --git a/packages/std-client/src/mud-definitions/store/contractComponents.ts b/packages/std-client/src/mud-definitions/store/contractComponents.ts index 30372c5ff5..76d47f99bc 100644 --- a/packages/std-client/src/mud-definitions/store/contractComponents.ts +++ b/packages/std-client/src/mud-definitions/store/contractComponents.ts @@ -1,6 +1,10 @@ /* Autogenerated file. Do not edit manually. */ -import { defineComponent, Type as RecsType, World } from "@latticexyz/recs"; +import { + defineComponent, + Type as RecsType, + type World, +} from "@latticexyz/recs"; export function defineContractComponents(world: World) { return { diff --git a/packages/std-client/src/mud-definitions/world/contractComponents.ts b/packages/std-client/src/mud-definitions/world/contractComponents.ts index f697d8a359..09bde1b123 100644 --- a/packages/std-client/src/mud-definitions/world/contractComponents.ts +++ b/packages/std-client/src/mud-definitions/world/contractComponents.ts @@ -1,6 +1,10 @@ /* Autogenerated file. Do not edit manually. */ -import { defineComponent, Type as RecsType, World } from "@latticexyz/recs"; +import { + defineComponent, + Type as RecsType, + type World, +} from "@latticexyz/recs"; export function defineContractComponents(world: World) { return { diff --git a/templates/phaser/packages/client/src/mud/contractComponents.ts b/templates/phaser/packages/client/src/mud/contractComponents.ts index 943b86184e..4b8147ca25 100644 --- a/templates/phaser/packages/client/src/mud/contractComponents.ts +++ b/templates/phaser/packages/client/src/mud/contractComponents.ts @@ -1,6 +1,10 @@ /* Autogenerated file. Do not edit manually. */ -import { defineComponent, Type as RecsType, World } from "@latticexyz/recs"; +import { + defineComponent, + Type as RecsType, + type World, +} from "@latticexyz/recs"; export function defineContractComponents(world: World) { return { diff --git a/templates/react/packages/client/src/mud/contractComponents.ts b/templates/react/packages/client/src/mud/contractComponents.ts index 943b86184e..4b8147ca25 100644 --- a/templates/react/packages/client/src/mud/contractComponents.ts +++ b/templates/react/packages/client/src/mud/contractComponents.ts @@ -1,6 +1,10 @@ /* Autogenerated file. Do not edit manually. */ -import { defineComponent, Type as RecsType, World } from "@latticexyz/recs"; +import { + defineComponent, + Type as RecsType, + type World, +} from "@latticexyz/recs"; export function defineContractComponents(world: World) { return { diff --git a/templates/threejs/packages/client/src/mud/contractComponents.ts b/templates/threejs/packages/client/src/mud/contractComponents.ts index 40e0720d05..4aa48fd895 100644 --- a/templates/threejs/packages/client/src/mud/contractComponents.ts +++ b/templates/threejs/packages/client/src/mud/contractComponents.ts @@ -1,6 +1,10 @@ /* Autogenerated file. Do not edit manually. */ -import { defineComponent, Type as RecsType, World } from "@latticexyz/recs"; +import { + defineComponent, + Type as RecsType, + type World, +} from "@latticexyz/recs"; export function defineContractComponents(world: World) { return { diff --git a/templates/vanilla/packages/client/src/mud/contractComponents.ts b/templates/vanilla/packages/client/src/mud/contractComponents.ts index 943b86184e..4b8147ca25 100644 --- a/templates/vanilla/packages/client/src/mud/contractComponents.ts +++ b/templates/vanilla/packages/client/src/mud/contractComponents.ts @@ -1,6 +1,10 @@ /* Autogenerated file. Do not edit manually. */ -import { defineComponent, Type as RecsType, World } from "@latticexyz/recs"; +import { + defineComponent, + Type as RecsType, + type World, +} from "@latticexyz/recs"; export function defineContractComponents(world: World) { return {