create-arona-app 0.0.1-dev.1748629324347.5a2f8d0 → 0.0.1-dev.ff9c398

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -24,6 +24,7 @@ The following templates are available:
24
24
 
25
25
  - `default` - A basic Arona app setup with essential features
26
26
  - `rick-and-morty` - An example app that demonstrates API integration with the Rick and Morty API
27
+ - `simple` - A basic Arona app setup with essential features
27
28
 
28
29
  ## Features
29
30
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-arona-app",
3
- "version": "0.0.1-dev.1748629324347.5a2f8d0",
3
+ "version": "0.0.1-dev.ff9c398",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/djobbo/arona.git"
@@ -9,7 +9,7 @@
9
9
  "description": "Create a new Arona app with a single command",
10
10
  "type": "module",
11
11
  "bin": {
12
- "create-arona-app": "./bin/create-arona-app.js"
12
+ "create-arona-app": "bin/create-arona-app.js"
13
13
  },
14
14
  "files": [
15
15
  "bin",
@@ -15,7 +15,7 @@
15
15
  "typescript": "^5.8.3"
16
16
  },
17
17
  "dependencies": {
18
- "@arona/discord": "workspace:*",
18
+ "@arona/discord": "0.0.0-dev",
19
19
  "@fontsource/slackey": "^5.2.5"
20
20
  }
21
21
  }
@@ -14,7 +14,7 @@
14
14
  "typescript": "^5.8.3"
15
15
  },
16
16
  "dependencies": {
17
- "@arona/discord": "workspace:*",
17
+ "@arona/discord": "0.0.0-dev",
18
18
  "@tanstack/react-query": "^5.76.1",
19
19
  "discord.js": "^14.19.3"
20
20
  }
@@ -0,0 +1,17 @@
1
+ # {{projectName}}
2
+
3
+ This project was created using [create-arona-app](https://github.com/djobbo/arona).
4
+
5
+ ## Getting Started
6
+
7
+ First, install the dependencies:
8
+
9
+ ```bash
10
+ {{installCommand}}
11
+ ```
12
+
13
+ Then, run the development server:
14
+
15
+ ```bash
16
+ {{devCommand}}
17
+ ```
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "@arona-ex/simple",
3
+ "description": "A basic Arona app setup with essential features",
4
+ "module": "index.ts",
5
+ "type": "module",
6
+ "private": true,
7
+ "scripts": {
8
+ "dev": "arona dev ./src/index.tsx",
9
+ "build": "arona build ./src/index.tsx"
10
+ },
11
+ "devDependencies": {
12
+ "@types/bun": "latest"
13
+ },
14
+ "peerDependencies": {
15
+ "typescript": "^5.8.3"
16
+ },
17
+ "dependencies": {
18
+ "@arona/discord": "0.0.0-dev",
19
+ "@fontsource/slackey": "^5.2.5"
20
+ }
21
+ }
@@ -0,0 +1,38 @@
1
+ import { useModal, Text, ActionRow, Button, Modal, TextInput, Container, Separator, Select, Option, Section } from '@arona/discord'
2
+ import { useState } from 'react'
3
+ import { Message } from 'discord.js'
4
+
5
+ type AppProps = {
6
+ message: Message
7
+ }
8
+
9
+ export const App = ({message}: AppProps) => {
10
+ const [count, setCount] = useState(0)
11
+ const {openModal} = useModal()
12
+
13
+ return (
14
+ <>
15
+ <Text>-# Original Message: `{message.content}`</Text>
16
+ <Container accentColor="Red">
17
+ <Section accessory={
18
+ <Button onClick={() => setCount(count + 1)}>Add One</Button>
19
+ }>
20
+ <Text># Count `{count}`</Text>
21
+ </Section>
22
+ </Container>
23
+ <Select onChange={(value) => console.log(value)} maxValues={2}>
24
+ <Option value='1'>1</Option>
25
+ <Option value='2'>2</Option>
26
+ <Option value='3' selected>3</Option>
27
+ </Select>
28
+ <Button onClick={openModal(() => (
29
+ <Modal title="test">
30
+ <TextInput label="test" name="test" onChange={(value) => console.log(value)} />
31
+ </Modal>
32
+ ))}>Open Modal</Button>
33
+ <Separator/>
34
+ <Text>-# Updated At `{new Date().toISOString()}`</Text>
35
+ </>
36
+ )
37
+ }
38
+
@@ -0,0 +1,33 @@
1
+ import { AronaDiscordClient, render, renderMessage, Text } from "@arona/discord"
2
+ import { Events, GatewayIntentBits } from "discord.js"
3
+ import { App } from './app'
4
+
5
+ const client = new AronaDiscordClient({
6
+ token: process.env.DISCORD_APP_TOKEN!,
7
+ clientId: process.env.DISCORD_APP_ID!,
8
+ devGuildId: process.env.DISCORD_DEV_GUILD_ID,
9
+ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent],
10
+ })
11
+
12
+ client.once(Events.ClientReady, () => {
13
+ console.log(`🚀 Logged in as ${client.user?.tag}`)
14
+ })
15
+
16
+ client.on(Events.MessageCreate, async (message) => {
17
+ if (message.author.bot) return
18
+
19
+ const testMessage = await renderMessage(
20
+ message,
21
+ () => <App message={message} />,
22
+ )
23
+
24
+
25
+ if (!testMessage) return
26
+
27
+
28
+ await renderMessage(testMessage, () => {
29
+ return <Text>test</Text>
30
+ })
31
+ })
32
+
33
+ await client.login()
@@ -0,0 +1,28 @@
1
+ {
2
+ "compilerOptions": {
3
+ // Environment setup & latest features
4
+ "lib": ["ESNext"],
5
+ "target": "ESNext",
6
+ "module": "ESNext",
7
+ "moduleDetection": "force",
8
+ "jsx": "react-jsx",
9
+ "allowJs": true,
10
+
11
+ // Bundler mode
12
+ "moduleResolution": "bundler",
13
+ "allowImportingTsExtensions": true,
14
+ "verbatimModuleSyntax": true,
15
+ "noEmit": true,
16
+
17
+ // Best practices
18
+ "strict": true,
19
+ "skipLibCheck": true,
20
+ "noFallthroughCasesInSwitch": true,
21
+ "noUncheckedIndexedAccess": true,
22
+
23
+ // Some stricter flags (disabled by default)
24
+ "noUnusedLocals": false,
25
+ "noUnusedParameters": false,
26
+ "noPropertyAccessFromIndexSignature": false
27
+ }
28
+ }