diff --git a/.prettierignore b/.prettierignore
index 63dcce30..29b28d8d 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -1,5 +1,6 @@
**/*/target
**/*/dist
+**/*/.next
packages/torii-client/wasm
packages/torii-client/pkg
packages/torii-wasm/pkg/
diff --git a/examples/clients/react/react-app/favicon.ico b/examples/clients/react/react-app/favicon.ico
new file mode 100644
index 00000000..21c80f81
Binary files /dev/null and b/examples/clients/react/react-app/favicon.ico differ
diff --git a/examples/clients/react/react-app/index.html b/examples/clients/react/react-app/index.html
index e5adf396..a2e0aeb3 100644
--- a/examples/clients/react/react-app/index.html
+++ b/examples/clients/react/react-app/index.html
@@ -4,6 +4,7 @@
Dojo React Vite
+
diff --git a/examples/clients/react/react-nextjs/.eslintrc.cjs b/examples/clients/react/react-nextjs/.eslintrc.cjs
new file mode 100644
index 00000000..957fd794
--- /dev/null
+++ b/examples/clients/react/react-nextjs/.eslintrc.cjs
@@ -0,0 +1,15 @@
+module.exports = {
+ env: { browser: true, es2020: true },
+ extends: [
+ // "eslint:recommended",
+ // "plugin:@typescript-eslint/recommended",
+ "plugin:react-hooks/recommended",
+ "plugin:@next/next/recommended",
+ ],
+ parser: "@typescript-eslint/parser",
+ parserOptions: { ecmaVersion: "latest", sourceType: "module" },
+ plugins: ["react-refresh"],
+ rules: {
+ "react-refresh/only-export-components": "warn",
+ },
+};
diff --git a/examples/clients/react/react-nextjs/.gitignore b/examples/clients/react/react-nextjs/.gitignore
new file mode 100644
index 00000000..fd3dbb57
--- /dev/null
+++ b/examples/clients/react/react-nextjs/.gitignore
@@ -0,0 +1,36 @@
+# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
+
+# dependencies
+/node_modules
+/.pnp
+.pnp.js
+.yarn/install-state.gz
+
+# testing
+/coverage
+
+# next.js
+/.next/
+/out/
+
+# production
+/build
+
+# misc
+.DS_Store
+*.pem
+
+# debug
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+
+# local env files
+.env*.local
+
+# vercel
+.vercel
+
+# typescript
+*.tsbuildinfo
+next-env.d.ts
diff --git a/examples/clients/react/react-nextjs/README.md b/examples/clients/react/react-nextjs/README.md
new file mode 100644
index 00000000..aed8152f
--- /dev/null
+++ b/examples/clients/react/react-nextjs/README.md
@@ -0,0 +1,7 @@
+## Dojo React next.js app
+
+[book](https://book.dojoengine.org/)
+
+## Notes
+
+- Using next.js 13, need to figure out how to use wasm in version 14
diff --git a/examples/clients/react/react-nextjs/next.config.mjs b/examples/clients/react/react-nextjs/next.config.mjs
new file mode 100644
index 00000000..8c899091
--- /dev/null
+++ b/examples/clients/react/react-nextjs/next.config.mjs
@@ -0,0 +1,21 @@
+/** @type {import('next').NextConfig} */
+const nextConfig = {
+ reactStrictMode: true,
+ // future: {
+ // webpack5: false,
+ // },
+ // experimental: {
+ // esmExternals: 'loose',
+ // },
+ webpack: (config, { nextRuntime, isServer }) => {
+ // console.log(`nextRuntime:`,isServer,nextRuntime)
+ // allow wasm
+ config.experiments = {
+ asyncWebAssembly: true,
+ layers: true,
+ };
+ return config;
+ },
+};
+
+export default nextConfig;
diff --git a/examples/clients/react/react-nextjs/next_fix.sh b/examples/clients/react/react-nextjs/next_fix.sh
new file mode 100755
index 00000000..f990f7a5
--- /dev/null
+++ b/examples/clients/react/react-nextjs/next_fix.sh
@@ -0,0 +1,4 @@
+export WASM_PACKAGE="./node_modules/@dojoengine/torii-client//node_modules/@dojoengine/torii-wasm/package.json"
+ls -l $WASM_PACKAGE
+sed -i '' -e 's/node/web/' $WASM_PACKAGE
+ls -l $WASM_PACKAGE
diff --git a/examples/clients/react/react-nextjs/package.json b/examples/clients/react/react-nextjs/package.json
new file mode 100644
index 00000000..d7037f62
--- /dev/null
+++ b/examples/clients/react/react-nextjs/package.json
@@ -0,0 +1,41 @@
+{
+ "name": "react-nextjs",
+ "version": "0.1.0",
+ "private": false,
+ "type": "module",
+ "scripts": {
+ "dev": "NODE_OPTIONS='--experimental-wasm-modules' next dev",
+ "build": "tsc && NODE_OPTIONS='--experimental-wasm-modules' next build",
+ "start": "next start",
+ "lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0"
+ },
+ "dependencies": {
+ "@dojoengine/core": "workspace:*",
+ "@dojoengine/create-burner": "workspace:*",
+ "@dojoengine/react": "workspace:*",
+ "@dojoengine/recs": "2.0.13",
+ "@dojoengine/state": "workspace:*",
+ "@dojoengine/torii-client": "workspace:*",
+ "@dojoengine/utils": "workspace:*",
+ "@latticexyz/react": "^2.0.12",
+ "@latticexyz/utils": "^2.0.12",
+ "next": "^13.5.6",
+ "react": "^18",
+ "react-dom": "^18",
+ "starknet": "6.11.0"
+ },
+ "devDependencies": {
+ "@next/eslint-plugin-next": "^14.0.3",
+ "@types/node": "^20",
+ "@types/react": "^18",
+ "@types/react-dom": "^18",
+ "@typescript-eslint/eslint-plugin": "^5.59.0",
+ "@typescript-eslint/parser": "^5.59.0",
+ "eslint": "^8.38.0",
+ "eslint-plugin-react-hooks": "^4.6.0",
+ "eslint-plugin-react-refresh": "^0.3.4",
+ "postcss": "^8",
+ "tailwindcss": "^3.4.1",
+ "typescript": "^5.5.4"
+ }
+}
diff --git a/examples/clients/react/react-nextjs/postcss.config.mjs b/examples/clients/react/react-nextjs/postcss.config.mjs
new file mode 100644
index 00000000..6f943477
--- /dev/null
+++ b/examples/clients/react/react-nextjs/postcss.config.mjs
@@ -0,0 +1,8 @@
+/** @type {import('postcss-load-config').Config} */
+const config = {
+ plugins: {
+ tailwindcss: {},
+ },
+};
+
+export default config;
diff --git a/examples/clients/react/react-nextjs/public/favicon.ico b/examples/clients/react/react-nextjs/public/favicon.ico
new file mode 100644
index 00000000..21c80f81
Binary files /dev/null and b/examples/clients/react/react-nextjs/public/favicon.ico differ
diff --git a/examples/clients/react/react-nextjs/src/App.tsx b/examples/clients/react/react-nextjs/src/App.tsx
new file mode 100644
index 00000000..4b0b6590
--- /dev/null
+++ b/examples/clients/react/react-nextjs/src/App.tsx
@@ -0,0 +1,172 @@
+import { useComponentValue, useQuerySync } from "@dojoengine/react";
+import { Entity } from "@dojoengine/recs";
+import { useEffect, useState } from "react";
+import { Direction } from "./utils";
+import { getEntityIdFromKeys } from "@dojoengine/utils";
+import { useDojo } from "./dojo/useDojo";
+
+function App() {
+ const {
+ setup: {
+ systemCalls: { spawn, move },
+ clientComponents: { Position, Moves, DirectionsAvailable },
+ toriiClient,
+ contractComponents,
+ },
+ account,
+ } = useDojo();
+
+ useQuerySync(toriiClient, contractComponents as any, []);
+
+ const [clipboardStatus, setClipboardStatus] = useState({
+ message: "",
+ isError: false,
+ });
+
+ // entity id we are syncing
+ const entityId = getEntityIdFromKeys([
+ BigInt(account?.account.address),
+ ]) as Entity;
+
+ // get current component values
+ const position = useComponentValue(Position, entityId);
+ const moves = useComponentValue(Moves, entityId);
+ const directions = useComponentValue(DirectionsAvailable, entityId);
+
+ const handleRestoreBurners = async () => {
+ try {
+ await account?.applyFromClipboard();
+ setClipboardStatus({
+ message: "Burners restored successfully!",
+ isError: false,
+ });
+ } catch (error) {
+ setClipboardStatus({
+ message: `Failed to restore burners from clipboard`,
+ isError: true,
+ });
+ }
+ };
+
+ useEffect(() => {
+ if (clipboardStatus.message) {
+ const timer = setTimeout(() => {
+ setClipboardStatus({ message: "", isError: false });
+ }, 3000);
+
+ return () => clearTimeout(timer);
+ }
+ }, [clipboardStatus.message]);
+
+ return (
+ <>
+
+ {account && account?.list().length > 0 && (
+
+ )}
+
+ {clipboardStatus.message && (
+
+ {clipboardStatus.message}
+
+ )}
+
+
+
{`burners deployed: ${account.count}`}
+
+ select signer:{" "}
+
+
+
+
+
+ You will need to Authorise the contracts before you can
+ use a burner. See readme.
+
+
+
+
+
+
+
+ Moves Left: {moves ? `${moves.remaining}` : "Need to Spawn"}
+
+
+ Position:{" "}
+ {position
+ ? `${position?.vec.x}, ${position?.vec.y}`
+ : "Need to Spawn"}
+
+
+
{moves && moves.last_direction}
+
+
+
Available Positions
+ {directions?.directions.map((a: string, index: number) => (
+
+ {a}
+
+ ))}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ >
+ );
+}
+
+export default App;
diff --git a/examples/clients/react/react-nextjs/src/dojo/DojoContext.tsx b/examples/clients/react/react-nextjs/src/dojo/DojoContext.tsx
new file mode 100644
index 00000000..cebee9dc
--- /dev/null
+++ b/examples/clients/react/react-nextjs/src/dojo/DojoContext.tsx
@@ -0,0 +1,83 @@
+import { BurnerAccount, useBurnerManager } from "@dojoengine/create-burner";
+import { ReactNode, createContext, useContext, useMemo } from "react";
+import { Account } from "starknet";
+import { SetupResult } from "./generated/setup";
+
+interface DojoContextType extends SetupResult {
+ masterAccount: Account;
+ account: BurnerAccount;
+}
+
+export const DojoContext = createContext(null);
+
+export const DojoProvider = ({
+ children,
+ value,
+}: {
+ children: ReactNode;
+ value: SetupResult;
+}) => {
+ const currentValue = useContext(DojoContext);
+ if (currentValue) throw new Error("DojoProvider can only be used once");
+
+ const {
+ config: { masterAddress, masterPrivateKey },
+ burnerManager,
+ dojoProvider,
+ } = value;
+
+ const masterAccount = useMemo(
+ () =>
+ new Account(
+ dojoProvider.provider,
+ masterAddress,
+ masterPrivateKey,
+ "1"
+ ),
+ [masterAddress, masterPrivateKey, dojoProvider.provider]
+ );
+
+ const {
+ create,
+ list,
+ get,
+ select,
+ deselect,
+ remove,
+ clear,
+ account,
+ isDeploying,
+ count,
+ copyToClipboard,
+ applyFromClipboard,
+ checkIsDeployed,
+ } = useBurnerManager({
+ burnerManager,
+ });
+
+ return (
+
+ {children}
+
+ );
+};
diff --git a/examples/clients/react/react-nextjs/src/dojo/createClientComponents.ts b/examples/clients/react/react-nextjs/src/dojo/createClientComponents.ts
new file mode 100644
index 00000000..550ad13b
--- /dev/null
+++ b/examples/clients/react/react-nextjs/src/dojo/createClientComponents.ts
@@ -0,0 +1,16 @@
+import { overridableComponent } from "@dojoengine/recs";
+import { ContractComponents } from "./generated/contractComponents";
+
+export type ClientComponents = ReturnType;
+
+export function createClientComponents({
+ contractComponents,
+}: {
+ contractComponents: ContractComponents;
+}) {
+ return {
+ ...contractComponents,
+ Position: overridableComponent(contractComponents.Position),
+ Moves: overridableComponent(contractComponents.Moves),
+ };
+}
diff --git a/examples/clients/react/react-nextjs/src/dojo/createSystemCalls.ts b/examples/clients/react/react-nextjs/src/dojo/createSystemCalls.ts
new file mode 100644
index 00000000..4ddebcc8
--- /dev/null
+++ b/examples/clients/react/react-nextjs/src/dojo/createSystemCalls.ts
@@ -0,0 +1,142 @@
+import { AccountInterface } from "starknet";
+import {
+ Entity,
+ Has,
+ HasValue,
+ World,
+ defineSystem,
+ getComponentValue,
+} from "@dojoengine/recs";
+import { uuid } from "@latticexyz/utils";
+import { ClientComponents } from "./createClientComponents";
+import { Direction } from "../utils";
+import { getEntityIdFromKeys } from "@dojoengine/utils";
+import type { IWorld } from "./generated/generated";
+
+export type SystemCalls = ReturnType;
+
+export function createSystemCalls(
+ { client }: { client: IWorld },
+ { Position, Moves }: ClientComponents,
+ world: World
+) {
+ const spawn = async (account: AccountInterface) => {
+ const entityId = getEntityIdFromKeys([
+ BigInt(account.address),
+ ]) as Entity;
+
+ const movesId = uuid();
+ Moves.addOverride(movesId, {
+ entity: entityId,
+ value: {
+ player: BigInt(entityId),
+ remaining:
+ (getComponentValue(Moves, entityId)?.remaining || 0) + 100,
+ },
+ });
+
+ const positionId = uuid();
+ Position.addOverride(positionId, {
+ entity: entityId,
+ value: {
+ player: BigInt(entityId),
+ vec: {
+ x: 10 + (getComponentValue(Position, entityId)?.vec.x || 0),
+ y: 10 + (getComponentValue(Position, entityId)?.vec.y || 0),
+ },
+ },
+ });
+
+ try {
+ await client.actions.spawn({
+ account,
+ });
+
+ // Wait for the indexer to update the entity
+ // By doing this we keep the optimistic UI in sync with the actual state
+ await new Promise((resolve) => {
+ defineSystem(
+ world,
+ [
+ Has(Moves),
+ HasValue(Moves, { player: BigInt(account.address) }),
+ ],
+ () => {
+ resolve();
+ }
+ );
+ });
+ } catch (e) {
+ console.log(e);
+ Position.removeOverride(positionId);
+ Moves.removeOverride(movesId);
+ } finally {
+ Position.removeOverride(positionId);
+ Moves.removeOverride(movesId);
+ }
+ };
+
+ const move = async (account: AccountInterface, direction: Direction) => {
+ // const entityId = getEntityIdFromKeys([
+ // BigInt(account.address),
+ // ]) as Entity;
+
+ // Update the state before the transaction
+ // const positionId = uuid();
+ // Position.addOverride(positionId, {
+ // entity: entityId,
+ // value: {
+ // player: BigInt(entityId),
+ // vec: updatePositionWithDirection(
+ // direction,
+ // getComponentValue(Position, entityId) as any
+ // ).vec,
+ // },
+ // });
+
+ // // Update the state before the transaction
+ // const movesId = uuid();
+ // Moves.addOverride(movesId, {
+ // entity: entityId,
+ // value: {
+ // player: BigInt(entityId),
+ // remaining:
+ // (getComponentValue(Moves, entityId)?.remaining || 0) - 1,
+ // },
+ // });
+
+ try {
+ await client.actions.move({
+ account,
+ direction,
+ });
+
+ // Wait for the indexer to update the entity
+ // By doing this we keep the optimistic UI in sync with the actual state
+ await new Promise((resolve) => {
+ defineSystem(
+ world,
+ [
+ Has(Moves),
+ HasValue(Moves, { player: BigInt(account.address) }),
+ ],
+ () => {
+ resolve();
+ }
+ );
+ });
+ } catch (e) {
+ console.log(e);
+ // Position.removeOverride(positionId);
+ // Moves.removeOverride(movesId);
+ } finally {
+ // Position.removeOverride(positionId);
+ // Moves.removeOverride(movesId);
+ }
+ };
+
+ return {
+ spawn,
+ move,
+ };
+}
diff --git a/examples/clients/react/react-nextjs/src/dojo/generated/contractComponents.ts b/examples/clients/react/react-nextjs/src/dojo/generated/contractComponents.ts
new file mode 100644
index 00000000..596871c8
--- /dev/null
+++ b/examples/clients/react/react-nextjs/src/dojo/generated/contractComponents.ts
@@ -0,0 +1,63 @@
+/*
+ * Autogenerated file. Do not edit manually.
+ * Generated using @dojoengine/core
+ * Command: npx @dojoengine/core
+ */
+
+import { defineComponent, Type as RecsType, World } from "@dojoengine/recs";
+
+export type ContractComponents = Awaited<
+ ReturnType
+>;
+
+export function defineContractComponents(world: World) {
+ return {
+ DirectionsAvailable: (() => {
+ return defineComponent(
+ world,
+ { player: RecsType.BigInt, directions: RecsType.StringArray },
+ {
+ metadata: {
+ name: "dojo_starter-DirectionsAvailable",
+ types: ["contractaddress"],
+ customTypes: ["Direction"],
+ },
+ }
+ );
+ })(),
+ Moves: (() => {
+ return defineComponent(
+ world,
+ {
+ player: RecsType.BigInt,
+ remaining: RecsType.Number,
+ last_direction: RecsType.Number,
+ can_move: RecsType.Boolean,
+ },
+ {
+ metadata: {
+ name: "dojo_starter-Moves",
+ types: ["contractaddress", "u8", "enum", "bool"],
+ customTypes: ["Direction"],
+ },
+ }
+ );
+ })(),
+ Position: (() => {
+ return defineComponent(
+ world,
+ {
+ player: RecsType.BigInt,
+ vec: { x: RecsType.Number, y: RecsType.Number },
+ },
+ {
+ metadata: {
+ name: "dojo_starter-Position",
+ types: ["contractaddress", "u32", "u32"],
+ customTypes: ["Vec2"],
+ },
+ }
+ );
+ })(),
+ };
+}
diff --git a/examples/clients/react/react-nextjs/src/dojo/generated/generated.ts b/examples/clients/react/react-nextjs/src/dojo/generated/generated.ts
new file mode 100644
index 00000000..b10d2654
--- /dev/null
+++ b/examples/clients/react/react-nextjs/src/dojo/generated/generated.ts
@@ -0,0 +1,60 @@
+import { Account, AccountInterface } from "starknet";
+import { DojoProvider } from "@dojoengine/core";
+import { Direction } from "../../utils";
+
+const NAMESPACE = "dojo_starter";
+
+export interface IWorld {
+ actions: {
+ spawn: (props: { account: AccountInterface }) => Promise;
+ move: (props: MoveProps) => Promise;
+ };
+}
+
+export interface MoveProps {
+ account: Account | AccountInterface;
+ direction: Direction;
+}
+
+const handleError = (action: string, error: unknown) => {
+ console.error(`Error executing ${action}:`, error);
+ throw error;
+};
+
+export const setupWorld = async (provider: DojoProvider): Promise => {
+ const actions = () => ({
+ spawn: async ({ account }: { account: AccountInterface }) => {
+ try {
+ return await provider.execute(
+ account,
+ {
+ contractName: "actions",
+ entrypoint: "spawn",
+ calldata: [],
+ },
+ NAMESPACE
+ );
+ } catch (error) {
+ handleError("spawn", error);
+ }
+ },
+
+ move: async ({ account, direction }: MoveProps) => {
+ try {
+ return await provider.execute(
+ account,
+ {
+ contractName: "actions",
+ entrypoint: "move",
+ calldata: [direction],
+ },
+ NAMESPACE
+ );
+ } catch (error) {
+ handleError("move", error);
+ }
+ },
+ });
+
+ return { actions: actions() };
+};
diff --git a/examples/clients/react/react-nextjs/src/dojo/generated/setup.ts b/examples/clients/react/react-nextjs/src/dojo/generated/setup.ts
new file mode 100644
index 00000000..dd51a3a4
--- /dev/null
+++ b/examples/clients/react/react-nextjs/src/dojo/generated/setup.ts
@@ -0,0 +1,71 @@
+import { DojoConfig, DojoProvider } from "@dojoengine/core";
+import * as torii from "@dojoengine/torii-client";
+import { createClientComponents } from "../createClientComponents";
+import { createSystemCalls } from "../createSystemCalls";
+import { defineContractComponents } from "./contractComponents";
+import { world } from "./world";
+import { setupWorld } from "./generated";
+import { Account, ArraySignatureType } from "starknet";
+import { BurnerManager } from "@dojoengine/create-burner";
+
+export type SetupResult = Awaited>;
+
+export async function setup({ ...config }: DojoConfig) {
+ console.log(torii.poseidonHash(["1"]));
+ // torii client
+ const toriiClient = await torii.createClient({
+ rpcUrl: config.rpcUrl,
+ toriiUrl: config.toriiUrl,
+ relayUrl: "",
+ worldAddress: config.manifest.world.address || "",
+ });
+
+ // create contract components
+ const contractComponents = defineContractComponents(world);
+
+ // create client components
+ const clientComponents = createClientComponents({ contractComponents });
+
+ // create dojo provider
+ const dojoProvider = new DojoProvider(config.manifest, config.rpcUrl);
+
+ // setup world
+ const client = await setupWorld(dojoProvider);
+
+ // create burner manager
+ const burnerManager = new BurnerManager({
+ masterAccount: new Account(
+ {
+ nodeUrl: config.rpcUrl,
+ },
+ config.masterAddress,
+ config.masterPrivateKey
+ ),
+ accountClassHash: config.accountClassHash,
+ rpcProvider: dojoProvider.provider,
+ feeTokenAddress: config.feeTokenAddress,
+ });
+
+ try {
+ await burnerManager.init();
+ if (burnerManager.list().length === 0) {
+ await burnerManager.create();
+ }
+ } catch (e) {
+ console.error(e);
+ }
+
+ return {
+ client,
+ clientComponents,
+ contractComponents,
+ systemCalls: createSystemCalls({ client }, clientComponents, world),
+ publish: (typedData: string, signature: ArraySignatureType) => {
+ toriiClient.publishMessage(typedData, signature);
+ },
+ config,
+ dojoProvider,
+ burnerManager,
+ toriiClient,
+ };
+}
diff --git a/examples/clients/react/react-nextjs/src/dojo/generated/world.ts b/examples/clients/react/react-nextjs/src/dojo/generated/world.ts
new file mode 100644
index 00000000..960676e5
--- /dev/null
+++ b/examples/clients/react/react-nextjs/src/dojo/generated/world.ts
@@ -0,0 +1,3 @@
+import { createWorld } from "@dojoengine/recs";
+
+export const world = createWorld();
diff --git a/examples/clients/react/react-nextjs/src/dojo/useDojo.tsx b/examples/clients/react/react-nextjs/src/dojo/useDojo.tsx
new file mode 100644
index 00000000..9a77177e
--- /dev/null
+++ b/examples/clients/react/react-nextjs/src/dojo/useDojo.tsx
@@ -0,0 +1,15 @@
+import { useContext } from "react";
+import { DojoContext } from "./DojoContext";
+
+export const useDojo = () => {
+ const context = useContext(DojoContext);
+ if (!context)
+ throw new Error(
+ "The `useDojo` hook must be used within a `DojoProvider`"
+ );
+
+ return {
+ setup: context,
+ account: context.account,
+ };
+};
diff --git a/examples/clients/react/react-nextjs/src/dojoConfig.ts b/examples/clients/react/react-nextjs/src/dojoConfig.ts
new file mode 100644
index 00000000..3491f0a5
--- /dev/null
+++ b/examples/clients/react/react-nextjs/src/dojoConfig.ts
@@ -0,0 +1,7 @@
+import manifest from "../../../../dojo/dojo-starter/manifests/dev/deployment/manifest.json";
+
+import { createDojoConfig } from "@dojoengine/core";
+
+export const dojoConfig = createDojoConfig({
+ manifest,
+});
diff --git a/examples/clients/react/react-nextjs/src/pages/_app.tsx b/examples/clients/react/react-nextjs/src/pages/_app.tsx
new file mode 100644
index 00000000..4fa1d952
--- /dev/null
+++ b/examples/clients/react/react-nextjs/src/pages/_app.tsx
@@ -0,0 +1,6 @@
+import "@/styles/globals.css";
+import type { AppProps } from "next/app";
+
+export default function App({ Component, pageProps }: AppProps) {
+ return ;
+}
diff --git a/examples/clients/react/react-nextjs/src/pages/_document.tsx b/examples/clients/react/react-nextjs/src/pages/_document.tsx
new file mode 100644
index 00000000..2f4bae41
--- /dev/null
+++ b/examples/clients/react/react-nextjs/src/pages/_document.tsx
@@ -0,0 +1,13 @@
+import { Html, Head, Main, NextScript } from "next/document";
+
+export default function Document() {
+ return (
+
+
+
+
+
+
+
+ );
+}
diff --git a/examples/clients/react/react-nextjs/src/pages/index.tsx b/examples/clients/react/react-nextjs/src/pages/index.tsx
new file mode 100644
index 00000000..1df5bb9d
--- /dev/null
+++ b/examples/clients/react/react-nextjs/src/pages/index.tsx
@@ -0,0 +1,28 @@
+import { useEffect, useState } from "react";
+import { DojoProvider } from "../dojo/DojoContext";
+import { dojoConfig } from "../dojoConfig";
+import { setup, SetupResult } from "../dojo/generated/setup";
+import App from "@/App";
+
+export default function Home() {
+ const [setupResult, setSetupResult] = useState(null);
+ useEffect(() => {
+ setup(dojoConfig)
+ .then((result) => {
+ setSetupResult(result);
+ })
+ .catch((e) => {
+ console.error(e);
+ });
+ }, []);
+
+ if (!setupResult) {
+ return Loading....
;
+ }
+
+ return (
+
+
+
+ );
+}
diff --git a/examples/clients/react/react-nextjs/src/styles/globals.css b/examples/clients/react/react-nextjs/src/styles/globals.css
new file mode 100644
index 00000000..34c47ab7
--- /dev/null
+++ b/examples/clients/react/react-nextjs/src/styles/globals.css
@@ -0,0 +1,33 @@
+@tailwind base;
+@tailwind components;
+@tailwind utilities;
+
+:root {
+ --foreground-rgb: 0, 0, 0;
+ --background-start-rgb: 214, 219, 220;
+ --background-end-rgb: 255, 255, 255;
+}
+
+@media (prefers-color-scheme: dark) {
+ :root {
+ --foreground-rgb: 255, 255, 255;
+ --background-start-rgb: 0, 0, 0;
+ --background-end-rgb: 0, 0, 0;
+ }
+}
+
+body {
+ color: rgb(var(--foreground-rgb));
+ background: linear-gradient(
+ to bottom,
+ transparent,
+ rgb(var(--background-end-rgb))
+ )
+ rgb(var(--background-start-rgb));
+}
+
+@layer utilities {
+ .text-balance {
+ text-wrap: balance;
+ }
+}
diff --git a/examples/clients/react/react-nextjs/src/utils/index.ts b/examples/clients/react/react-nextjs/src/utils/index.ts
new file mode 100644
index 00000000..1ec8b000
--- /dev/null
+++ b/examples/clients/react/react-nextjs/src/utils/index.ts
@@ -0,0 +1,29 @@
+export enum Direction {
+ Left = 1,
+ Right = 2,
+ Up = 3,
+ Down = 4,
+}
+
+export function updatePositionWithDirection(
+ direction: Direction,
+ value: { vec: { x: number; y: number } }
+) {
+ switch (direction) {
+ case Direction.Left:
+ value.vec.x--;
+ break;
+ case Direction.Right:
+ value.vec.x++;
+ break;
+ case Direction.Up:
+ value.vec.y--;
+ break;
+ case Direction.Down:
+ value.vec.y++;
+ break;
+ default:
+ throw new Error("Invalid direction provided");
+ }
+ return value;
+}
diff --git a/examples/clients/react/react-nextjs/tailwind.config.ts b/examples/clients/react/react-nextjs/tailwind.config.ts
new file mode 100644
index 00000000..2541a080
--- /dev/null
+++ b/examples/clients/react/react-nextjs/tailwind.config.ts
@@ -0,0 +1,20 @@
+import type { Config } from "tailwindcss";
+
+const config: Config = {
+ content: [
+ "./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
+ "./src/components/**/*.{js,ts,jsx,tsx,mdx}",
+ "./src/app/**/*.{js,ts,jsx,tsx,mdx}",
+ ],
+ theme: {
+ extend: {
+ backgroundImage: {
+ "gradient-radial": "radial-gradient(var(--tw-gradient-stops))",
+ "gradient-conic":
+ "conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))",
+ },
+ },
+ },
+ plugins: [],
+};
+export default config;
diff --git a/examples/clients/react/react-nextjs/tsconfig.json b/examples/clients/react/react-nextjs/tsconfig.json
new file mode 100644
index 00000000..ecc3ef58
--- /dev/null
+++ b/examples/clients/react/react-nextjs/tsconfig.json
@@ -0,0 +1,35 @@
+{
+ "compilerOptions": {
+ "module": "ESNext",
+ "target": "ESNext",
+ "lib": ["ESNext", "DOM", "DOM.Iterable"],
+ "allowJs": true,
+ "skipLibCheck": true,
+ "strict": true,
+ "noEmit": true,
+ "esModuleInterop": true,
+ "moduleResolution": "node",
+ "resolveJsonModule": true,
+ "isolatedModules": true,
+ "jsx": "preserve",
+ "incremental": true,
+ "plugins": [
+ {
+ "name": "next"
+ }
+ ],
+ "paths": {
+ "@/*": ["./src/*"]
+ },
+ // allows VSCode to prompt for path rename when files are moved/renamed
+ "baseUrl": "."
+ },
+ "include": [
+ "./src",
+ "./dist/types/**/*.ts",
+ "./next-env.d.ts",
+ "**/*.ts",
+ "**/*.tsx"
+ ],
+ "exclude": ["node_modules"]
+}
diff --git a/examples/clients/react/react-phaser-example/favicon.ico b/examples/clients/react/react-phaser-example/favicon.ico
new file mode 100644
index 00000000..21c80f81
Binary files /dev/null and b/examples/clients/react/react-phaser-example/favicon.ico differ
diff --git a/examples/clients/react/react-phaser-example/index.html b/examples/clients/react/react-phaser-example/index.html
index 5b6420e9..eede8c64 100644
--- a/examples/clients/react/react-phaser-example/index.html
+++ b/examples/clients/react/react-phaser-example/index.html
@@ -4,6 +4,7 @@
+
🪨 v 📄 x ✂️
diff --git a/examples/clients/react/react-pwa-app/favicon.ico b/examples/clients/react/react-pwa-app/favicon.ico
new file mode 100644
index 00000000..21c80f81
Binary files /dev/null and b/examples/clients/react/react-pwa-app/favicon.ico differ
diff --git a/examples/clients/react/react-threejs/favicon.ico b/examples/clients/react/react-threejs/favicon.ico
new file mode 100644
index 00000000..21c80f81
Binary files /dev/null and b/examples/clients/react/react-threejs/favicon.ico differ
diff --git a/examples/clients/react/react-threejs/index.html b/examples/clients/react/react-threejs/index.html
index 77a16e06..434ac694 100644
--- a/examples/clients/react/react-threejs/index.html
+++ b/examples/clients/react/react-threejs/index.html
@@ -9,6 +9,7 @@
href="https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap"
rel="stylesheet"
/>
+
Dojo React Three Fibre Starter
diff --git a/package.json b/package.json
index 4a98a16b..e961406e 100644
--- a/package.json
+++ b/package.json
@@ -12,8 +12,9 @@
"build-utils-wasm": "pnpm --dir packages/utils-wasm build",
"build-phaser": "pnpm --dir examples/clients/react/react-phaser-example build",
"build-react-app": "pnpm --dir examples/clients/react/react-app build",
- "build-threejs": "pnpm --dir examples/clients/react/react-threejs build",
"build-react-pwa-app": "pnpm --dir examples/clients/react/react-pwa-app build",
+ "build-react-nextjs": "pnpm --dir examples/clients/react/react-nextjs build",
+ "build-threejs": "pnpm --dir examples/clients/react/react-threejs build",
"build-vue-app": "pnpm --dir examples/clients/vue/vue-app build",
"build-vanilla-phaser": "pnpm --dir examples/clients/vanilla/phaser build",
"build": "bash ./scripts/build-packages.sh",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index efc933b4..312e1428 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -23,13 +23,13 @@ importers:
version: 9.1.5
lerna:
specifier: ^8.1.5
- version: 8.1.8(@swc/core@1.7.14)(encoding@0.1.13)
+ version: 8.1.8(@swc/core@1.7.14(@swc/helpers@0.5.5))(encoding@0.1.13)
prettier:
specifier: ^3.0.3
version: 3.3.3
tsup:
specifier: ^8.1.0
- version: 8.2.4(@swc/core@1.7.14)(jiti@1.21.6)(postcss@8.4.41)(typescript@5.5.4)(yaml@2.5.0)
+ version: 8.2.4(@swc/core@1.7.14(@swc/helpers@0.5.5))(jiti@1.21.6)(postcss@8.4.41)(typescript@5.5.4)(yaml@2.5.0)
typedoc:
specifier: ^0.25.4
version: 0.25.13(typescript@5.5.4)
@@ -162,10 +162,10 @@ importers:
version: 6.11.0(encoding@0.1.13)
vite-plugin-top-level-await:
specifier: ^1.3.1
- version: 1.4.4(rollup@4.21.0)(vite@4.5.3(@types/node@20.16.1))
+ version: 1.4.4(@swc/helpers@0.5.5)(rollup@4.21.0)(vite@4.5.3(@types/node@20.16.1)(terser@5.31.6))
vite-plugin-wasm:
specifier: ^3.2.2
- version: 3.3.0(vite@4.5.3(@types/node@20.16.1))
+ version: 3.3.0(vite@4.5.3(@types/node@20.16.1)(terser@5.31.6))
devDependencies:
'@types/node':
specifier: ^20.4.8
@@ -201,6 +201,85 @@ importers:
specifier: ^4.3.9
version: 4.5.3(@types/node@20.16.1)(terser@5.31.6)
+ examples/clients/react/react-nextjs:
+ dependencies:
+ '@dojoengine/core':
+ specifier: workspace:*
+ version: link:../../../../packages/core
+ '@dojoengine/create-burner':
+ specifier: workspace:*
+ version: link:../../../../packages/create-burner
+ '@dojoengine/react':
+ specifier: workspace:*
+ version: link:../../../../packages/react
+ '@dojoengine/recs':
+ specifier: 2.0.13
+ version: 2.0.13(typescript@5.5.4)(zod@3.23.8)
+ '@dojoengine/state':
+ specifier: workspace:*
+ version: link:../../../../packages/state
+ '@dojoengine/torii-client':
+ specifier: workspace:*
+ version: link:../../../../packages/torii-client
+ '@dojoengine/utils':
+ specifier: workspace:*
+ version: link:../../../../packages/utils
+ '@latticexyz/react':
+ specifier: ^2.0.12
+ version: 2.1.1(typescript@5.5.4)(zod@3.23.8)
+ '@latticexyz/utils':
+ specifier: ^2.0.12
+ version: 2.1.1
+ next:
+ specifier: ^13.5.6
+ version: 13.5.6(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ react:
+ specifier: ^18
+ version: 18.3.1
+ react-dom:
+ specifier: ^18
+ version: 18.3.1(react@18.3.1)
+ starknet:
+ specifier: 6.11.0
+ version: 6.11.0(encoding@0.1.13)
+ devDependencies:
+ '@next/eslint-plugin-next':
+ specifier: ^14.0.3
+ version: 14.2.6
+ '@types/node':
+ specifier: ^20
+ version: 20.16.1
+ '@types/react':
+ specifier: ^18
+ version: 18.3.4
+ '@types/react-dom':
+ specifier: ^18
+ version: 18.3.0
+ '@typescript-eslint/eslint-plugin':
+ specifier: ^5.59.0
+ version: 5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4)
+ '@typescript-eslint/parser':
+ specifier: ^5.59.0
+ version: 5.62.0(eslint@8.57.0)(typescript@5.5.4)
+ eslint:
+ specifier: ^8.38.0
+ version: 8.57.0
+ eslint-plugin-react-hooks:
+ specifier: ^4.6.0
+ version: 4.6.2(eslint@8.57.0)
+ eslint-plugin-react-refresh:
+ specifier: ^0.3.4
+ version: 0.3.5(eslint@8.57.0)
+ postcss:
+ specifier: ^8
+ version: 8.4.41
+ tailwindcss:
+ specifier: ^3.4.1
+ version: 3.4.10
+ typescript:
+ specifier: ^5.5.4
+ version: 5.5.4
+
examples/clients/react/react-phaser-example:
dependencies:
'@dojoengine/core':
@@ -289,10 +368,10 @@ importers:
version: 1.0.7(tailwindcss@3.4.10)
vite-plugin-top-level-await:
specifier: ^1.3.1
- version: 1.4.4(rollup@4.21.0)(vite@4.5.3(@types/node@20.16.1))
+ version: 1.4.4(@swc/helpers@0.5.5)(rollup@4.21.0)(vite@4.5.3(@types/node@20.16.1)(terser@5.31.6))
vite-plugin-wasm:
specifier: ^3.2.2
- version: 3.3.0(vite@4.5.3(@types/node@20.16.1))
+ version: 3.3.0(vite@4.5.3(@types/node@20.16.1)(terser@5.31.6))
zustand:
specifier: ^4.4.1
version: 4.5.5(@types/react@18.3.4)(react@18.3.1)
@@ -401,10 +480,10 @@ importers:
version: 6.11.0(encoding@0.1.13)
vite-plugin-top-level-await:
specifier: ^1.3.1
- version: 1.4.4(rollup@2.79.1)(vite@4.5.3(@types/node@20.16.1)(terser@5.31.6))
+ version: 1.4.4(@swc/helpers@0.5.5)(rollup@2.79.1)(vite@4.5.3(@types/node@20.16.1)(terser@5.31.6))
vite-plugin-wasm:
specifier: ^3.2.2
- version: 3.3.0(vite@4.5.3(@types/node@20.16.1))
+ version: 3.3.0(vite@4.5.3(@types/node@20.16.1)(terser@5.31.6))
devDependencies:
'@graphql-codegen/cli':
specifier: ^5.0.0
@@ -513,7 +592,7 @@ importers:
version: 8.17.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(three@0.160.1)
'@storybook/builder-vite':
specifier: ^7.6.10
- version: 7.6.20(encoding@0.1.13)(typescript@5.5.4)(vite@4.5.3(@types/node@20.16.1))
+ version: 7.6.20(encoding@0.1.13)(typescript@5.5.4)(vite@4.5.3(@types/node@20.16.1)(terser@5.31.6))
'@types/three':
specifier: ^0.160.0
version: 0.160.0
@@ -579,13 +658,13 @@ importers:
version: 0.160.1
vite-plugin-svgr:
specifier: ^4.2.0
- version: 4.2.0(rollup@4.21.0)(typescript@5.5.4)(vite@4.5.3(@types/node@20.16.1))
+ version: 4.2.0(rollup@4.21.0)(typescript@5.5.4)(vite@4.5.3(@types/node@20.16.1)(terser@5.31.6))
vite-plugin-top-level-await:
specifier: ^1.3.1
- version: 1.4.4(rollup@4.21.0)(vite@4.5.3(@types/node@20.16.1))
+ version: 1.4.4(@swc/helpers@0.5.5)(rollup@4.21.0)(vite@4.5.3(@types/node@20.16.1)(terser@5.31.6))
vite-plugin-wasm:
specifier: ^3.2.2
- version: 3.3.0(vite@4.5.3(@types/node@20.16.1))
+ version: 3.3.0(vite@4.5.3(@types/node@20.16.1)(terser@5.31.6))
zustand:
specifier: ^4.4.7
version: 4.5.5(@types/react@18.3.4)(react@18.3.1)
@@ -610,7 +689,7 @@ importers:
version: 7.6.20(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4)
'@storybook/react-vite':
specifier: ^7.6.10
- version: 7.6.20(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(rollup@4.21.0)(typescript@5.5.4)(vite@4.5.3(@types/node@20.16.1))
+ version: 7.6.20(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(rollup@4.21.0)(typescript@5.5.4)(vite@4.5.3(@types/node@20.16.1)(terser@5.31.6))
'@storybook/test':
specifier: ^7.6.10
version: 7.6.20
@@ -692,13 +771,13 @@ importers:
version: 5.5.4
vite:
specifier: ^5.3.5
- version: 5.4.2(@types/node@20.16.1)
+ version: 5.4.2(@types/node@20.16.1)(terser@5.31.6)
vite-plugin-top-level-await:
specifier: ^1.4.2
- version: 1.4.4(rollup@4.21.0)(vite@5.4.2(@types/node@20.16.1))
+ version: 1.4.4(@swc/helpers@0.5.5)(rollup@4.21.0)(vite@5.4.2(@types/node@20.16.1)(terser@5.31.6))
vite-plugin-wasm:
specifier: ^3.3.0
- version: 3.3.0(vite@5.4.2(@types/node@20.16.1))
+ version: 3.3.0(vite@5.4.2(@types/node@20.16.1)(terser@5.31.6))
examples/clients/vue/vue-app:
dependencies:
@@ -731,23 +810,23 @@ importers:
version: 6.11.0(encoding@0.1.13)
vite-plugin-top-level-await:
specifier: ^1.4.1
- version: 1.4.4(rollup@4.21.0)(vite@5.4.2(@types/node@20.16.1))
+ version: 1.4.4(@swc/helpers@0.5.5)(rollup@4.21.0)(vite@5.4.2(@types/node@20.16.1)(terser@5.31.6))
vite-plugin-wasm:
specifier: ^3.3.0
- version: 3.3.0(vite@5.4.2(@types/node@20.16.1))
+ version: 3.3.0(vite@5.4.2(@types/node@20.16.1)(terser@5.31.6))
vue:
specifier: ^3.4.19
version: 3.4.38(typescript@5.5.4)
devDependencies:
'@vitejs/plugin-vue':
specifier: ^5.0.4
- version: 5.1.2(vite@5.4.2(@types/node@20.16.1))(vue@3.4.38(typescript@5.5.4))
+ version: 5.1.2(vite@5.4.2(@types/node@20.16.1)(terser@5.31.6))(vue@3.4.38(typescript@5.5.4))
typescript:
specifier: ^5.2.2
version: 5.5.4
vite:
specifier: ^5.1.4
- version: 5.4.2(@types/node@20.16.1)
+ version: 5.4.2(@types/node@20.16.1)(terser@5.31.6)
vue-tsc:
specifier: ^2.0.4
version: 2.0.29(typescript@5.5.4)
@@ -772,16 +851,16 @@ importers:
version: 6.4.18
'@vitest/coverage-v8':
specifier: ^1.3.0
- version: 1.6.0(vitest@1.6.0(@types/node@20.16.1)(jsdom@24.1.1))
+ version: 1.6.0(vitest@1.6.0(@types/node@20.16.1)(jsdom@24.1.1)(terser@5.31.6))
tsup:
specifier: ^8.0.1
- version: 8.2.4(@swc/core@1.7.14)(jiti@1.21.6)(postcss@8.4.41)(typescript@5.5.4)(yaml@2.5.0)
+ version: 8.2.4(@swc/core@1.7.14(@swc/helpers@0.5.5))(jiti@1.21.6)(postcss@8.4.41)(typescript@5.5.4)(yaml@2.5.0)
typescript:
specifier: ^5.5.4
version: 5.5.4
vitest:
specifier: ^1.1.0
- version: 1.6.0(@types/node@20.16.1)(jsdom@24.1.1)
+ version: 1.6.0(@types/node@20.16.1)(jsdom@24.1.1)(terser@5.31.6)
packages/create-burner:
dependencies:
@@ -842,19 +921,19 @@ importers:
version: 0.0.114
'@vitest/coverage-v8':
specifier: ^1.3.0
- version: 1.6.0(vitest@1.6.0(@types/node@18.19.45)(jsdom@24.1.1))
+ version: 1.6.0(vitest@1.6.0(@types/node@18.19.45)(jsdom@24.1.1)(terser@5.31.6))
jsdom:
specifier: ^24.0.0
version: 24.1.1
tsup:
specifier: ^8.0.1
- version: 8.2.4(@swc/core@1.7.14)(jiti@1.21.6)(postcss@8.4.41)(typescript@5.5.4)(yaml@2.5.0)
+ version: 8.2.4(@swc/core@1.7.14(@swc/helpers@0.5.5))(jiti@1.21.6)(postcss@8.4.41)(typescript@5.5.4)(yaml@2.5.0)
typescript:
specifier: ^5.5.4
version: 5.5.4
vitest:
specifier: ^1.2.2
- version: 1.6.0(@types/node@18.19.45)(jsdom@24.1.1)
+ version: 1.6.0(@types/node@18.19.45)(jsdom@24.1.1)(terser@5.31.6)
packages/create-dojo:
dependencies:
@@ -870,7 +949,7 @@ importers:
version: 6.0.6
tsup:
specifier: ^8.0.1
- version: 8.2.4(@swc/core@1.7.14)(jiti@1.21.6)(postcss@8.4.41)(typescript@5.5.4)(yaml@2.5.0)
+ version: 8.2.4(@swc/core@1.7.14(@swc/helpers@0.5.5))(jiti@1.21.6)(postcss@8.4.41)(typescript@5.5.4)(yaml@2.5.0)
typescript:
specifier: ^5.5.4
version: 5.5.4
@@ -943,7 +1022,7 @@ importers:
version: 0.0.114
tsup:
specifier: ^8.0.1
- version: 8.2.4(@swc/core@1.7.14)(jiti@1.21.6)(postcss@8.4.41)(typescript@5.5.4)(yaml@2.5.0)
+ version: 8.2.4(@swc/core@1.7.14(@swc/helpers@0.5.5))(jiti@1.21.6)(postcss@8.4.41)(typescript@5.5.4)(yaml@2.5.0)
typescript:
specifier: ^5.5.4
version: 5.5.4
@@ -964,14 +1043,14 @@ importers:
version: 6.11.0(encoding@0.1.13)
vitest:
specifier: ^1.6.0
- version: 1.6.0(@types/node@20.16.1)(jsdom@24.1.1)
+ version: 1.6.0(@types/node@20.16.1)(jsdom@24.1.1)(terser@5.31.6)
zustand:
specifier: ^4.5.2
version: 4.5.5(@types/react@18.3.4)(react@18.3.1)
devDependencies:
tsup:
specifier: ^8.0.1
- version: 8.2.4(@swc/core@1.7.14)(jiti@1.21.6)(postcss@8.4.41)(typescript@5.5.4)(yaml@2.5.0)
+ version: 8.2.4(@swc/core@1.7.14(@swc/helpers@0.5.5))(jiti@1.21.6)(postcss@8.4.41)(typescript@5.5.4)(yaml@2.5.0)
typescript:
specifier: ^5.5.4
version: 5.5.4
@@ -987,13 +1066,13 @@ importers:
devDependencies:
tsup:
specifier: ^8.0.1
- version: 8.2.4(@swc/core@1.7.14)(jiti@1.21.6)(postcss@8.4.41)(typescript@5.5.4)(yaml@2.5.0)
+ version: 8.2.4(@swc/core@1.7.14(@swc/helpers@0.5.5))(jiti@1.21.6)(postcss@8.4.41)(typescript@5.5.4)(yaml@2.5.0)
packages/torii-wasm:
devDependencies:
tsup:
specifier: ^8.1.0
- version: 8.2.4(@swc/core@1.7.14)(jiti@1.21.6)(postcss@8.4.41)(typescript@5.5.4)(yaml@2.5.0)
+ version: 8.2.4(@swc/core@1.7.14(@swc/helpers@0.5.5))(jiti@1.21.6)(postcss@8.4.41)(typescript@5.5.4)(yaml@2.5.0)
typescript:
specifier: ^5.5.4
version: 5.5.4
@@ -1024,22 +1103,22 @@ importers:
version: 6.4.18
'@vitest/coverage-v8':
specifier: ^1.3.0
- version: 1.6.0(vitest@1.6.0(@types/node@20.16.1)(jsdom@24.1.1))
+ version: 1.6.0(vitest@1.6.0(@types/node@20.16.1)(jsdom@24.1.1)(terser@5.31.6))
tsup:
specifier: ^8.0.1
- version: 8.2.4(@swc/core@1.7.14)(jiti@1.21.6)(postcss@8.4.41)(typescript@5.5.4)(yaml@2.5.0)
+ version: 8.2.4(@swc/core@1.7.14(@swc/helpers@0.5.5))(jiti@1.21.6)(postcss@8.4.41)(typescript@5.5.4)(yaml@2.5.0)
typescript:
specifier: ^5.5.4
version: 5.5.4
vitest:
specifier: ^1.1.0
- version: 1.6.0(@types/node@20.16.1)(jsdom@24.1.1)
+ version: 1.6.0(@types/node@20.16.1)(jsdom@24.1.1)(terser@5.31.6)
packages/utils-wasm:
devDependencies:
tsup:
specifier: ^8.0.1
- version: 8.2.4(@swc/core@1.7.14)(jiti@1.21.6)(postcss@8.4.41)(typescript@5.5.4)(yaml@2.5.0)
+ version: 8.2.4(@swc/core@1.7.14(@swc/helpers@0.5.5))(jiti@1.21.6)(postcss@8.4.41)(typescript@5.5.4)(yaml@2.5.0)
typescript:
specifier: ^5.5.4
version: 5.5.4
@@ -3055,6 +3134,66 @@ packages:
'@ndelangen/get-tarball@3.0.9':
resolution: {integrity: sha512-9JKTEik4vq+yGosHYhZ1tiH/3WpUS0Nh0kej4Agndhox8pAdWhEx5knFVRcb/ya9knCRCs1rPxNrSXTDdfVqpA==}
+ '@next/env@13.5.6':
+ resolution: {integrity: sha512-Yac/bV5sBGkkEXmAX5FWPS9Mmo2rthrOPRQQNfycJPkjUAUclomCPH7QFVCDQ4Mp2k2K1SSM6m0zrxYrOwtFQw==}
+
+ '@next/eslint-plugin-next@14.2.6':
+ resolution: {integrity: sha512-d3+p4AjIYmhqzYHhhmkRYYN6ZU35TwZAKX08xKRfnHkz72KhWL2kxMFsDptpZs5e8bBGdepn7vn1+9DaF8iX+A==}
+
+ '@next/swc-darwin-arm64@13.5.6':
+ resolution: {integrity: sha512-5nvXMzKtZfvcu4BhtV0KH1oGv4XEW+B+jOfmBdpFI3C7FrB/MfujRpWYSBBO64+qbW8pkZiSyQv9eiwnn5VIQA==}
+ engines: {node: '>= 10'}
+ cpu: [arm64]
+ os: [darwin]
+
+ '@next/swc-darwin-x64@13.5.6':
+ resolution: {integrity: sha512-6cgBfxg98oOCSr4BckWjLLgiVwlL3vlLj8hXg2b+nDgm4bC/qVXXLfpLB9FHdoDu4057hzywbxKvmYGmi7yUzA==}
+ engines: {node: '>= 10'}
+ cpu: [x64]
+ os: [darwin]
+
+ '@next/swc-linux-arm64-gnu@13.5.6':
+ resolution: {integrity: sha512-txagBbj1e1w47YQjcKgSU4rRVQ7uF29YpnlHV5xuVUsgCUf2FmyfJ3CPjZUvpIeXCJAoMCFAoGnbtX86BK7+sg==}
+ engines: {node: '>= 10'}
+ cpu: [arm64]
+ os: [linux]
+
+ '@next/swc-linux-arm64-musl@13.5.6':
+ resolution: {integrity: sha512-cGd+H8amifT86ZldVJtAKDxUqeFyLWW+v2NlBULnLAdWsiuuN8TuhVBt8ZNpCqcAuoruoSWynvMWixTFcroq+Q==}
+ engines: {node: '>= 10'}
+ cpu: [arm64]
+ os: [linux]
+
+ '@next/swc-linux-x64-gnu@13.5.6':
+ resolution: {integrity: sha512-Mc2b4xiIWKXIhBy2NBTwOxGD3nHLmq4keFk+d4/WL5fMsB8XdJRdtUlL87SqVCTSaf1BRuQQf1HvXZcy+rq3Nw==}
+ engines: {node: '>= 10'}
+ cpu: [x64]
+ os: [linux]
+
+ '@next/swc-linux-x64-musl@13.5.6':
+ resolution: {integrity: sha512-CFHvP9Qz98NruJiUnCe61O6GveKKHpJLloXbDSWRhqhkJdZD2zU5hG+gtVJR//tyW897izuHpM6Gtf6+sNgJPQ==}
+ engines: {node: '>= 10'}
+ cpu: [x64]
+ os: [linux]
+
+ '@next/swc-win32-arm64-msvc@13.5.6':
+ resolution: {integrity: sha512-aFv1ejfkbS7PUa1qVPwzDHjQWQtknzAZWGTKYIAaS4NMtBlk3VyA6AYn593pqNanlicewqyl2jUhQAaFV/qXsg==}
+ engines: {node: '>= 10'}
+ cpu: [arm64]
+ os: [win32]
+
+ '@next/swc-win32-ia32-msvc@13.5.6':
+ resolution: {integrity: sha512-XqqpHgEIlBHvzwG8sp/JXMFkLAfGLqkbVsyN+/Ih1mR8INb6YCc2x/Mbwi6hsAgUnqQztz8cvEbHJUbSl7RHDg==}
+ engines: {node: '>= 10'}
+ cpu: [ia32]
+ os: [win32]
+
+ '@next/swc-win32-x64-msvc@13.5.6':
+ resolution: {integrity: sha512-Cqfe1YmOS7k+5mGu92nl5ULkzpKuxJrP3+4AEuPmrpFZ3BHxTY3TnHmU1On3bFmFFs6FbTcdF58CCUProGpIGQ==}
+ engines: {node: '>= 10'}
+ cpu: [x64]
+ os: [win32]
+
'@noble/curves@1.0.0':
resolution: {integrity: sha512-2upgEu0iLiDVDZkNLeFV2+ht0BAVgQnEmCk6JsOch9Rp8xfkMCbvbAZlA2pBHQc73dbl+vFOXfqkf4uemdn0bw==}
@@ -4387,6 +4526,12 @@ packages:
'@swc/counter@0.1.3':
resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==}
+ '@swc/helpers@0.5.2':
+ resolution: {integrity: sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw==}
+
+ '@swc/helpers@0.5.5':
+ resolution: {integrity: sha512-KGYxvIOXcceOAbEk4bi/dVLEK9z8sZ0uBB3Il5b1rhfClSpcX0yfRO0KmTkqR2cnQDymwLB+25ZyMzICg/cm/A==}
+
'@swc/types@0.1.12':
resolution: {integrity: sha512-wBJA+SdtkbFhHjTMYH+dEH1y4VpfGdAc2Kw/LK09i9bXd/K6j6PkDcFCEzb6iVfZMkPRrl/q0e3toqTAJdkIVA==}
@@ -5500,6 +5645,9 @@ packages:
resolution: {integrity: sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==}
engines: {node: '>= 12'}
+ client-only@0.0.1:
+ resolution: {integrity: sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==}
+
cliui@6.0.0:
resolution: {integrity: sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==}
@@ -6612,6 +6760,11 @@ packages:
glob-to-regexp@0.4.1:
resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==}
+ glob@10.3.10:
+ resolution: {integrity: sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==}
+ engines: {node: '>=16 || 14 >=14.17'}
+ hasBin: true
+
glob@10.4.5:
resolution: {integrity: sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==}
hasBin: true
@@ -7206,6 +7359,10 @@ packages:
peerDependencies:
react: '>=18.0'
+ jackspeak@2.3.6:
+ resolution: {integrity: sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==}
+ engines: {node: '>=14'}
+
jackspeak@3.4.3:
resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==}
@@ -8208,6 +8365,21 @@ packages:
neo-async@2.6.2:
resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==}
+ next@13.5.6:
+ resolution: {integrity: sha512-Y2wTcTbO4WwEsVb4A8VSnOsG1I9ok+h74q0ZdxkwM3EODqrs4pasq7O0iUxbcS9VtWMicG7f3+HAj0r1+NtKSw==}
+ engines: {node: '>=16.14.0'}
+ hasBin: true
+ peerDependencies:
+ '@opentelemetry/api': ^1.1.0
+ react: ^18.2.0
+ react-dom: ^18.2.0
+ sass: ^1.3.0
+ peerDependenciesMeta:
+ '@opentelemetry/api':
+ optional: true
+ sass:
+ optional: true
+
no-case@3.0.4:
resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==}
@@ -8762,6 +8934,10 @@ packages:
postcss-value-parser@4.2.0:
resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==}
+ postcss@8.4.31:
+ resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==}
+ engines: {node: ^10 || ^12 || >=14}
+
postcss@8.4.38:
resolution: {integrity: sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==}
engines: {node: ^10 || ^12 || >=14}
@@ -9650,6 +9826,19 @@ packages:
react: '>= 16.8.0'
react-dom: '>= 16.8.0'
+ styled-jsx@5.1.1:
+ resolution: {integrity: sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw==}
+ engines: {node: '>= 12.0.0'}
+ peerDependencies:
+ '@babel/core': '*'
+ babel-plugin-macros: '*'
+ react: '>= 16.8.0 || 17.x.x || ^18.0.0-0'
+ peerDependenciesMeta:
+ '@babel/core':
+ optional: true
+ babel-plugin-macros:
+ optional: true
+
stylis@4.3.2:
resolution: {integrity: sha512-bhtUjWd/z6ltJiQwg0dUfxEJ+W+jdqQd8TbWLWyeIJHlnsqmGLRFFd8e5mA0AZi/zx90smXRlN66YMTcaSFifg==}
@@ -10420,6 +10609,10 @@ packages:
resolution: {integrity: sha512-AmboGZEnZoIcVCzSlkLEmNFEqJN+IwgshJ5S7pi30uNUTce4LvWkifQzsQRxnWj47G8gkqZxlyGlyQplsnIS7w==}
hasBin: true
+ watchpack@2.4.0:
+ resolution: {integrity: sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==}
+ engines: {node: '>=10.13.0'}
+
watchpack@2.4.2:
resolution: {integrity: sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==}
engines: {node: '>=10.13.0'}
@@ -13182,7 +13375,7 @@ snapshots:
'@types/yargs': 17.0.33
chalk: 4.1.2
- '@joshwooding/vite-plugin-react-docgen-typescript@0.3.0(typescript@5.5.4)(vite@4.5.3(@types/node@20.16.1))':
+ '@joshwooding/vite-plugin-react-docgen-typescript@0.3.0(typescript@5.5.4)(vite@4.5.3(@types/node@20.16.1)(terser@5.31.6))':
dependencies:
glob: 7.2.3
glob-promise: 4.2.2(glob@7.2.3)
@@ -13376,12 +13569,12 @@ snapshots:
proxy-deep: 3.1.1
rxjs: 7.5.5
- '@lerna/create@8.1.8(@swc/core@1.7.14)(encoding@0.1.13)(typescript@5.5.4)':
+ '@lerna/create@8.1.8(@swc/core@1.7.14(@swc/helpers@0.5.5))(encoding@0.1.13)(typescript@5.5.4)':
dependencies:
'@npmcli/arborist': 7.5.4
'@npmcli/package-json': 5.2.0
'@npmcli/run-script': 8.1.0
- '@nx/devkit': 19.6.2(nx@19.6.2(@swc/core@1.7.14))
+ '@nx/devkit': 19.6.2(nx@19.6.2(@swc/core@1.7.14(@swc/helpers@0.5.5)))
'@octokit/plugin-enterprise-rest': 6.0.1
'@octokit/rest': 19.0.11(encoding@0.1.13)
aproba: 2.0.0
@@ -13420,7 +13613,7 @@ snapshots:
npm-package-arg: 11.0.2
npm-packlist: 8.0.2
npm-registry-fetch: 17.1.0
- nx: 19.6.2(@swc/core@1.7.14)
+ nx: 19.6.2(@swc/core@1.7.14(@swc/helpers@0.5.5))
p-map: 4.0.0
p-map-series: 2.1.0
p-queue: 6.6.2
@@ -13492,6 +13685,39 @@ snapshots:
pump: 3.0.0
tar-fs: 2.1.1
+ '@next/env@13.5.6': {}
+
+ '@next/eslint-plugin-next@14.2.6':
+ dependencies:
+ glob: 10.3.10
+
+ '@next/swc-darwin-arm64@13.5.6':
+ optional: true
+
+ '@next/swc-darwin-x64@13.5.6':
+ optional: true
+
+ '@next/swc-linux-arm64-gnu@13.5.6':
+ optional: true
+
+ '@next/swc-linux-arm64-musl@13.5.6':
+ optional: true
+
+ '@next/swc-linux-x64-gnu@13.5.6':
+ optional: true
+
+ '@next/swc-linux-x64-musl@13.5.6':
+ optional: true
+
+ '@next/swc-win32-arm64-msvc@13.5.6':
+ optional: true
+
+ '@next/swc-win32-ia32-msvc@13.5.6':
+ optional: true
+
+ '@next/swc-win32-x64-msvc@13.5.6':
+ optional: true
+
'@noble/curves@1.0.0':
dependencies:
'@noble/hashes': 1.3.0
@@ -13662,29 +13888,29 @@ snapshots:
- bluebird
- supports-color
- '@nrwl/devkit@19.6.2(nx@19.6.2(@swc/core@1.7.14))':
+ '@nrwl/devkit@19.6.2(nx@19.6.2(@swc/core@1.7.14(@swc/helpers@0.5.5)))':
dependencies:
- '@nx/devkit': 19.6.2(nx@19.6.2(@swc/core@1.7.14))
+ '@nx/devkit': 19.6.2(nx@19.6.2(@swc/core@1.7.14(@swc/helpers@0.5.5)))
transitivePeerDependencies:
- nx
- '@nrwl/tao@19.6.2(@swc/core@1.7.14)':
+ '@nrwl/tao@19.6.2(@swc/core@1.7.14(@swc/helpers@0.5.5))':
dependencies:
- nx: 19.6.2(@swc/core@1.7.14)
+ nx: 19.6.2(@swc/core@1.7.14(@swc/helpers@0.5.5))
tslib: 2.6.3
transitivePeerDependencies:
- '@swc-node/register'
- '@swc/core'
- debug
- '@nx/devkit@19.6.2(nx@19.6.2(@swc/core@1.7.14))':
+ '@nx/devkit@19.6.2(nx@19.6.2(@swc/core@1.7.14(@swc/helpers@0.5.5)))':
dependencies:
- '@nrwl/devkit': 19.6.2(nx@19.6.2(@swc/core@1.7.14))
+ '@nrwl/devkit': 19.6.2(nx@19.6.2(@swc/core@1.7.14(@swc/helpers@0.5.5)))
ejs: 3.1.10
enquirer: 2.3.6
ignore: 5.3.2
minimatch: 9.0.3
- nx: 19.6.2(@swc/core@1.7.14)
+ nx: 19.6.2(@swc/core@1.7.14(@swc/helpers@0.5.5))
semver: 7.6.3
tmp: 0.2.3
tslib: 2.6.3
@@ -14481,7 +14707,7 @@ snapshots:
'@scure/bip32@1.3.2':
dependencies:
'@noble/curves': 1.2.0
- '@noble/hashes': 1.3.2
+ '@noble/hashes': 1.3.3
'@scure/base': 1.1.7
'@scure/bip32@1.4.0':
@@ -14492,7 +14718,7 @@ snapshots:
'@scure/bip39@1.2.1':
dependencies:
- '@noble/hashes': 1.3.2
+ '@noble/hashes': 1.3.3
'@scure/base': 1.1.7
'@scure/bip39@1.3.0':
@@ -14744,7 +14970,7 @@ snapshots:
- encoding
- supports-color
- '@storybook/builder-vite@7.6.20(encoding@0.1.13)(typescript@5.5.4)(vite@4.5.3(@types/node@20.16.1))':
+ '@storybook/builder-vite@7.6.20(encoding@0.1.13)(typescript@5.5.4)(vite@4.5.3(@types/node@20.16.1)(terser@5.31.6))':
dependencies:
'@storybook/channels': 7.6.20
'@storybook/client-logger': 7.6.20
@@ -15061,13 +15287,13 @@ snapshots:
react: 18.3.1
react-dom: 18.3.1(react@18.3.1)
- '@storybook/react-vite@7.6.20(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(rollup@4.21.0)(typescript@5.5.4)(vite@4.5.3(@types/node@20.16.1))':
+ '@storybook/react-vite@7.6.20(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(rollup@4.21.0)(typescript@5.5.4)(vite@4.5.3(@types/node@20.16.1)(terser@5.31.6))':
dependencies:
- '@joshwooding/vite-plugin-react-docgen-typescript': 0.3.0(typescript@5.5.4)(vite@4.5.3(@types/node@20.16.1))
+ '@joshwooding/vite-plugin-react-docgen-typescript': 0.3.0(typescript@5.5.4)(vite@4.5.3(@types/node@20.16.1)(terser@5.31.6))
'@rollup/pluginutils': 5.1.0(rollup@4.21.0)
- '@storybook/builder-vite': 7.6.20(encoding@0.1.13)(typescript@5.5.4)(vite@4.5.3(@types/node@20.16.1))
+ '@storybook/builder-vite': 7.6.20(encoding@0.1.13)(typescript@5.5.4)(vite@4.5.3(@types/node@20.16.1)(terser@5.31.6))
'@storybook/react': 7.6.20(encoding@0.1.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.4)
- '@vitejs/plugin-react': 3.1.0(vite@4.5.3(@types/node@20.16.1))
+ '@vitejs/plugin-react': 3.1.0(vite@4.5.3(@types/node@20.16.1)(terser@5.31.6))
magic-string: 0.30.11
react: 18.3.1
react-docgen: 7.0.3
@@ -15270,7 +15496,7 @@ snapshots:
'@swc/core-win32-x64-msvc@1.7.14':
optional: true
- '@swc/core@1.7.14':
+ '@swc/core@1.7.14(@swc/helpers@0.5.5)':
dependencies:
'@swc/counter': 0.1.3
'@swc/types': 0.1.12
@@ -15285,9 +15511,20 @@ snapshots:
'@swc/core-win32-arm64-msvc': 1.7.14
'@swc/core-win32-ia32-msvc': 1.7.14
'@swc/core-win32-x64-msvc': 1.7.14
+ '@swc/helpers': 0.5.5
'@swc/counter@0.1.3': {}
+ '@swc/helpers@0.5.2':
+ dependencies:
+ tslib: 2.6.3
+
+ '@swc/helpers@0.5.5':
+ dependencies:
+ '@swc/counter': 0.1.3
+ tslib: 2.6.3
+ optional: true
+
'@swc/types@0.1.12':
dependencies:
'@swc/counter': 0.1.3
@@ -15717,7 +15954,7 @@ snapshots:
sharp-ico: 0.1.5
unconfig: 0.3.13
- '@vitejs/plugin-react@3.1.0(vite@4.5.3(@types/node@20.16.1))':
+ '@vitejs/plugin-react@3.1.0(vite@4.5.3(@types/node@20.16.1)(terser@5.31.6))':
dependencies:
'@babel/core': 7.25.2
'@babel/plugin-transform-react-jsx-self': 7.24.7(@babel/core@7.25.2)
@@ -15739,12 +15976,12 @@ snapshots:
transitivePeerDependencies:
- supports-color
- '@vitejs/plugin-vue@5.1.2(vite@5.4.2(@types/node@20.16.1))(vue@3.4.38(typescript@5.5.4))':
+ '@vitejs/plugin-vue@5.1.2(vite@5.4.2(@types/node@20.16.1)(terser@5.31.6))(vue@3.4.38(typescript@5.5.4))':
dependencies:
- vite: 5.4.2(@types/node@20.16.1)
+ vite: 5.4.2(@types/node@20.16.1)(terser@5.31.6)
vue: 3.4.38(typescript@5.5.4)
- '@vitest/coverage-v8@1.6.0(vitest@1.6.0(@types/node@18.19.45)(jsdom@24.1.1))':
+ '@vitest/coverage-v8@1.6.0(vitest@1.6.0(@types/node@18.19.45)(jsdom@24.1.1)(terser@5.31.6))':
dependencies:
'@ampproject/remapping': 2.3.0
'@bcoe/v8-coverage': 0.2.3
@@ -15759,11 +15996,11 @@ snapshots:
std-env: 3.7.0
strip-literal: 2.1.0
test-exclude: 6.0.0
- vitest: 1.6.0(@types/node@18.19.45)(jsdom@24.1.1)
+ vitest: 1.6.0(@types/node@18.19.45)(jsdom@24.1.1)(terser@5.31.6)
transitivePeerDependencies:
- supports-color
- '@vitest/coverage-v8@1.6.0(vitest@1.6.0(@types/node@20.16.1)(jsdom@24.1.1))':
+ '@vitest/coverage-v8@1.6.0(vitest@1.6.0(@types/node@20.16.1)(jsdom@24.1.1)(terser@5.31.6))':
dependencies:
'@ampproject/remapping': 2.3.0
'@bcoe/v8-coverage': 0.2.3
@@ -15778,7 +16015,7 @@ snapshots:
std-env: 3.7.0
strip-literal: 2.1.0
test-exclude: 6.0.0
- vitest: 1.6.0(@types/node@20.16.1)(jsdom@24.1.1)
+ vitest: 1.6.0(@types/node@20.16.1)(jsdom@24.1.1)(terser@5.31.6)
transitivePeerDependencies:
- supports-color
@@ -16642,6 +16879,8 @@ snapshots:
cli-width@4.1.0: {}
+ client-only@0.0.1: {}
+
cliui@6.0.0:
dependencies:
string-width: 4.2.3
@@ -18043,6 +18282,14 @@ snapshots:
glob-to-regexp@0.4.1: {}
+ glob@10.3.10:
+ dependencies:
+ foreground-child: 3.3.0
+ jackspeak: 2.3.6
+ minimatch: 9.0.5
+ minipass: 7.1.2
+ path-scurry: 1.11.1
+
glob@10.4.5:
dependencies:
foreground-child: 3.3.0
@@ -18629,6 +18876,12 @@ snapshots:
'@types/react-reconciler': 0.28.8
react: 18.3.1
+ jackspeak@2.3.6:
+ dependencies:
+ '@isaacs/cliui': 8.0.2
+ optionalDependencies:
+ '@pkgjs/parseargs': 0.11.0
+
jackspeak@3.4.3:
dependencies:
'@isaacs/cliui': 8.0.2
@@ -18879,13 +19132,13 @@ snapshots:
dotenv: 16.4.5
dotenv-expand: 10.0.0
- lerna@8.1.8(@swc/core@1.7.14)(encoding@0.1.13):
+ lerna@8.1.8(@swc/core@1.7.14(@swc/helpers@0.5.5))(encoding@0.1.13):
dependencies:
- '@lerna/create': 8.1.8(@swc/core@1.7.14)(encoding@0.1.13)(typescript@5.5.4)
+ '@lerna/create': 8.1.8(@swc/core@1.7.14(@swc/helpers@0.5.5))(encoding@0.1.13)(typescript@5.5.4)
'@npmcli/arborist': 7.5.4
'@npmcli/package-json': 5.2.0
'@npmcli/run-script': 8.1.0
- '@nx/devkit': 19.6.2(nx@19.6.2(@swc/core@1.7.14))
+ '@nx/devkit': 19.6.2(nx@19.6.2(@swc/core@1.7.14(@swc/helpers@0.5.5)))
'@octokit/plugin-enterprise-rest': 6.0.1
'@octokit/rest': 19.0.11(encoding@0.1.13)
aproba: 2.0.0
@@ -18930,7 +19183,7 @@ snapshots:
npm-package-arg: 11.0.2
npm-packlist: 8.0.2
npm-registry-fetch: 17.1.0
- nx: 19.6.2(@swc/core@1.7.14)
+ nx: 19.6.2(@swc/core@1.7.14(@swc/helpers@0.5.5))
p-map: 4.0.0
p-map-series: 2.1.0
p-pipe: 3.1.0
@@ -19464,6 +19717,31 @@ snapshots:
neo-async@2.6.2: {}
+ next@13.5.6(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
+ dependencies:
+ '@next/env': 13.5.6
+ '@swc/helpers': 0.5.2
+ busboy: 1.6.0
+ caniuse-lite: 1.0.30001651
+ postcss: 8.4.31
+ react: 18.3.1
+ react-dom: 18.3.1(react@18.3.1)
+ styled-jsx: 5.1.1(react@18.3.1)
+ watchpack: 2.4.0
+ optionalDependencies:
+ '@next/swc-darwin-arm64': 13.5.6
+ '@next/swc-darwin-x64': 13.5.6
+ '@next/swc-linux-arm64-gnu': 13.5.6
+ '@next/swc-linux-arm64-musl': 13.5.6
+ '@next/swc-linux-x64-gnu': 13.5.6
+ '@next/swc-linux-x64-musl': 13.5.6
+ '@next/swc-win32-arm64-msvc': 13.5.6
+ '@next/swc-win32-ia32-msvc': 13.5.6
+ '@next/swc-win32-x64-msvc': 13.5.6
+ transitivePeerDependencies:
+ - '@babel/core'
+ - babel-plugin-macros
+
no-case@3.0.4:
dependencies:
lower-case: 2.0.2
@@ -19609,10 +19887,10 @@ snapshots:
nwsapi@2.2.12: {}
- nx@19.6.2(@swc/core@1.7.14):
+ nx@19.6.2(@swc/core@1.7.14(@swc/helpers@0.5.5)):
dependencies:
'@napi-rs/wasm-runtime': 0.2.4
- '@nrwl/tao': 19.6.2(@swc/core@1.7.14)
+ '@nrwl/tao': 19.6.2(@swc/core@1.7.14(@swc/helpers@0.5.5))
'@yarnpkg/lockfile': 1.1.0
'@yarnpkg/parsers': 3.0.0-rc.46
'@zkochan/js-yaml': 0.0.7
@@ -19657,7 +19935,7 @@ snapshots:
'@nx/nx-linux-x64-musl': 19.6.2
'@nx/nx-win32-arm64-msvc': 19.6.2
'@nx/nx-win32-x64-msvc': 19.6.2
- '@swc/core': 1.7.14
+ '@swc/core': 1.7.14(@swc/helpers@0.5.5)
transitivePeerDependencies:
- debug
@@ -20066,6 +20344,12 @@ snapshots:
postcss-value-parser@4.2.0: {}
+ postcss@8.4.31:
+ dependencies:
+ nanoid: 3.3.7
+ picocolors: 1.0.1
+ source-map-js: 1.2.0
+
postcss@8.4.38:
dependencies:
nanoid: 3.3.7
@@ -21067,6 +21351,11 @@ snapshots:
stylis: 4.3.2
tslib: 2.6.2
+ styled-jsx@5.1.1(react@18.3.1):
+ dependencies:
+ client-only: 0.0.1
+ react: 18.3.1
+
stylis@4.3.2: {}
sucrase@3.35.0:
@@ -21356,7 +21645,7 @@ snapshots:
tslib@2.6.3: {}
- tsup@8.2.4(@swc/core@1.7.14)(jiti@1.21.6)(postcss@8.4.41)(typescript@5.5.4)(yaml@2.5.0):
+ tsup@8.2.4(@swc/core@1.7.14(@swc/helpers@0.5.5))(jiti@1.21.6)(postcss@8.4.41)(typescript@5.5.4)(yaml@2.5.0):
dependencies:
bundle-require: 5.0.0(esbuild@0.23.1)
cac: 6.7.14
@@ -21375,7 +21664,7 @@ snapshots:
sucrase: 3.35.0
tree-kill: 1.2.2
optionalDependencies:
- '@swc/core': 1.7.14
+ '@swc/core': 1.7.14(@swc/helpers@0.5.5)
postcss: 8.4.41
typescript: 5.5.4
transitivePeerDependencies:
@@ -21704,13 +21993,13 @@ snapshots:
- utf-8-validate
- zod
- vite-node@1.6.0(@types/node@18.19.45):
+ vite-node@1.6.0(@types/node@18.19.45)(terser@5.31.6):
dependencies:
cac: 6.7.14
debug: 4.3.6
pathe: 1.1.2
picocolors: 1.0.1
- vite: 5.4.2(@types/node@18.19.45)
+ vite: 5.4.2(@types/node@18.19.45)(terser@5.31.6)
transitivePeerDependencies:
- '@types/node'
- less
@@ -21722,13 +22011,13 @@ snapshots:
- supports-color
- terser
- vite-node@1.6.0(@types/node@20.16.1):
+ vite-node@1.6.0(@types/node@20.16.1)(terser@5.31.6):
dependencies:
cac: 6.7.14
debug: 4.3.6
pathe: 1.1.2
picocolors: 1.0.1
- vite: 5.4.2(@types/node@20.16.1)
+ vite: 5.4.2(@types/node@20.16.1)(terser@5.31.6)
transitivePeerDependencies:
- '@types/node'
- less
@@ -21753,7 +22042,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
- vite-plugin-svgr@4.2.0(rollup@4.21.0)(typescript@5.5.4)(vite@4.5.3(@types/node@20.16.1)):
+ vite-plugin-svgr@4.2.0(rollup@4.21.0)(typescript@5.5.4)(vite@4.5.3(@types/node@20.16.1)(terser@5.31.6)):
dependencies:
'@rollup/pluginutils': 5.1.0(rollup@4.21.0)
'@svgr/core': 8.1.0(typescript@5.5.4)
@@ -21764,43 +22053,43 @@ snapshots:
- supports-color
- typescript
- vite-plugin-top-level-await@1.4.4(rollup@2.79.1)(vite@4.5.3(@types/node@20.16.1)(terser@5.31.6)):
+ vite-plugin-top-level-await@1.4.4(@swc/helpers@0.5.5)(rollup@2.79.1)(vite@4.5.3(@types/node@20.16.1)(terser@5.31.6)):
dependencies:
'@rollup/plugin-virtual': 3.0.2(rollup@2.79.1)
- '@swc/core': 1.7.14
+ '@swc/core': 1.7.14(@swc/helpers@0.5.5)
uuid: 10.0.0
vite: 4.5.3(@types/node@20.16.1)(terser@5.31.6)
transitivePeerDependencies:
- '@swc/helpers'
- rollup
- vite-plugin-top-level-await@1.4.4(rollup@4.21.0)(vite@4.5.3(@types/node@20.16.1)):
+ vite-plugin-top-level-await@1.4.4(@swc/helpers@0.5.5)(rollup@4.21.0)(vite@4.5.3(@types/node@20.16.1)(terser@5.31.6)):
dependencies:
'@rollup/plugin-virtual': 3.0.2(rollup@4.21.0)
- '@swc/core': 1.7.14
+ '@swc/core': 1.7.14(@swc/helpers@0.5.5)
uuid: 10.0.0
vite: 4.5.3(@types/node@20.16.1)(terser@5.31.6)
transitivePeerDependencies:
- '@swc/helpers'
- rollup
- vite-plugin-top-level-await@1.4.4(rollup@4.21.0)(vite@5.4.2(@types/node@20.16.1)):
+ vite-plugin-top-level-await@1.4.4(@swc/helpers@0.5.5)(rollup@4.21.0)(vite@5.4.2(@types/node@20.16.1)(terser@5.31.6)):
dependencies:
'@rollup/plugin-virtual': 3.0.2(rollup@4.21.0)
- '@swc/core': 1.7.14
+ '@swc/core': 1.7.14(@swc/helpers@0.5.5)
uuid: 10.0.0
- vite: 5.4.2(@types/node@20.16.1)
+ vite: 5.4.2(@types/node@20.16.1)(terser@5.31.6)
transitivePeerDependencies:
- '@swc/helpers'
- rollup
- vite-plugin-wasm@3.3.0(vite@4.5.3(@types/node@20.16.1)):
+ vite-plugin-wasm@3.3.0(vite@4.5.3(@types/node@20.16.1)(terser@5.31.6)):
dependencies:
vite: 4.5.3(@types/node@20.16.1)(terser@5.31.6)
- vite-plugin-wasm@3.3.0(vite@5.4.2(@types/node@20.16.1)):
+ vite-plugin-wasm@3.3.0(vite@5.4.2(@types/node@20.16.1)(terser@5.31.6)):
dependencies:
- vite: 5.4.2(@types/node@20.16.1)
+ vite: 5.4.2(@types/node@20.16.1)(terser@5.31.6)
vite@4.5.3(@types/node@20.16.1)(terser@5.31.6):
dependencies:
@@ -21812,7 +22101,7 @@ snapshots:
fsevents: 2.3.3
terser: 5.31.6
- vite@5.4.2(@types/node@18.19.45):
+ vite@5.4.2(@types/node@18.19.45)(terser@5.31.6):
dependencies:
esbuild: 0.21.5
postcss: 8.4.41
@@ -21820,8 +22109,9 @@ snapshots:
optionalDependencies:
'@types/node': 18.19.45
fsevents: 2.3.3
+ terser: 5.31.6
- vite@5.4.2(@types/node@20.16.1):
+ vite@5.4.2(@types/node@20.16.1)(terser@5.31.6):
dependencies:
esbuild: 0.21.5
postcss: 8.4.41
@@ -21829,8 +22119,9 @@ snapshots:
optionalDependencies:
'@types/node': 20.16.1
fsevents: 2.3.3
+ terser: 5.31.6
- vitest@1.6.0(@types/node@18.19.45)(jsdom@24.1.1):
+ vitest@1.6.0(@types/node@18.19.45)(jsdom@24.1.1)(terser@5.31.6):
dependencies:
'@vitest/expect': 1.6.0
'@vitest/runner': 1.6.0
@@ -21849,8 +22140,8 @@ snapshots:
strip-literal: 2.1.0
tinybench: 2.9.0
tinypool: 0.8.4
- vite: 5.4.2(@types/node@18.19.45)
- vite-node: 1.6.0(@types/node@18.19.45)
+ vite: 5.4.2(@types/node@18.19.45)(terser@5.31.6)
+ vite-node: 1.6.0(@types/node@18.19.45)(terser@5.31.6)
why-is-node-running: 2.3.0
optionalDependencies:
'@types/node': 18.19.45
@@ -21865,7 +22156,7 @@ snapshots:
- supports-color
- terser
- vitest@1.6.0(@types/node@20.16.1)(jsdom@24.1.1):
+ vitest@1.6.0(@types/node@20.16.1)(jsdom@24.1.1)(terser@5.31.6):
dependencies:
'@vitest/expect': 1.6.0
'@vitest/runner': 1.6.0
@@ -21884,8 +22175,8 @@ snapshots:
strip-literal: 2.1.0
tinybench: 2.9.0
tinypool: 0.8.4
- vite: 5.4.2(@types/node@20.16.1)
- vite-node: 1.6.0(@types/node@20.16.1)
+ vite: 5.4.2(@types/node@20.16.1)(terser@5.31.6)
+ vite-node: 1.6.0(@types/node@20.16.1)(terser@5.31.6)
why-is-node-running: 2.3.0
optionalDependencies:
'@types/node': 20.16.1
@@ -21945,6 +22236,11 @@ snapshots:
transitivePeerDependencies:
- debug
+ watchpack@2.4.0:
+ dependencies:
+ glob-to-regexp: 0.4.1
+ graceful-fs: 4.2.11
+
watchpack@2.4.2:
dependencies:
glob-to-regexp: 0.4.1
diff --git a/readme.md b/readme.md
index 30727123..52402c7a 100644
--- a/readme.md
+++ b/readme.md
@@ -27,6 +27,7 @@ npx @dojoengine/create-dojo
- [React-app](./examples/clients/react/react-app) - A vite react app example using Dojo
- [React-phaser](./examples/clients/react/react-phaser-example) - A vite phaser react app using Dojo
+- [React-nextjs](./examples/clients/react/react-nextjs) - A next.js react app example using Dojo
- [Torii-bot](./examples/clients/node/torii-bot) - A small discord bot for interacting with Torii
- [vue-app](./examples/clients/vue/vue-app) - A vite vue app example using Dojo
- [Vanilla-phaser](./examples/clients/vanilla/phaser) - A vanilla phaser example using Dojo
diff --git a/scripts/build-examples.sh b/scripts/build-examples.sh
index 87293e0c..3846995e 100755
--- a/scripts/build-examples.sh
+++ b/scripts/build-examples.sh
@@ -10,4 +10,5 @@ pnpm run build-threejs
pnpm run build-react-pwa-app
pnpm run build-vanilla-phaser
pnpm run build-vue-app
+pnpm run build-react-nextjs