valence-cli 1.3.1 → 1.3.3
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 +56 -21
- package/README.original.md +56 -21
- package/dist/README.md +56 -21
- package/dist/commands/add.d.ts.map +1 -1
- package/dist/commands/add.js +5 -1
- package/dist/commands/add.js.map +1 -1
- package/dist/commands/features/intro.d.ts +2 -0
- package/dist/commands/features/intro.d.ts.map +1 -0
- package/dist/commands/features/intro.js +75 -0
- package/dist/commands/features/intro.js.map +1 -0
- package/dist/commands/features/native.d.ts.map +1 -1
- package/dist/commands/features/native.js +0 -8
- package/dist/commands/features/native.js.map +1 -1
- package/dist/commands/features/tailwind.d.ts.map +1 -1
- package/dist/commands/features/tailwind.js +8 -8
- package/dist/commands/features/tailwind.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/templates/index.d.ts +1 -0
- package/dist/templates/index.d.ts.map +1 -1
- package/dist/templates/index.js +1 -0
- package/dist/templates/index.js.map +1 -1
- package/dist/templates/intro.d.ts +2 -0
- package/dist/templates/intro.d.ts.map +1 -0
- package/dist/templates/intro.js +120 -0
- package/dist/templates/intro.js.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -35,46 +35,54 @@ valence start
|
|
|
35
35
|
## 🛠 Commands
|
|
36
36
|
|
|
37
37
|
### `valence new <name>`
|
|
38
|
+
|
|
38
39
|
Scaffolds a new high-performance project. You will be prompted to select your engine:
|
|
39
40
|
|
|
40
41
|
* **3D (Babylon.js)**: Full 3D capabilities with Havok Physics, XR, and Inspector support.
|
|
41
42
|
* **2D (Phaser)**: Fast 2D game engine with configured scenes and arcade physics.
|
|
42
43
|
|
|
43
44
|
**Both environments include:**
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
|
|
46
|
+
* **Angular**: Latest CLI, SCSS, Routing.
|
|
47
|
+
* **Electron**: TypeScript Main/Preload processes, securely configured.
|
|
48
|
+
* **Forge**: Configured for building `.exe` / `.zip` / installers.
|
|
49
|
+
* **Valence UI**: Premium glassmorphic HUD with FPS and status tracking.
|
|
48
50
|
|
|
49
51
|
### `valence start`
|
|
52
|
+
|
|
50
53
|
Runs the application in **Development Mode**:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
54
|
+
|
|
55
|
+
* Cleans previous builds.
|
|
56
|
+
* Builds Angular (Dev config).
|
|
57
|
+
* Compiles Electron (TypeScript).
|
|
58
|
+
* Launches Electron window with live reload enabled.
|
|
55
59
|
|
|
56
60
|
### `valence build`
|
|
61
|
+
|
|
57
62
|
Compiles the application for **Production**:
|
|
58
|
-
- Outputs to `dist/browser` (Angular) and `dist/electron` (Main Process).
|
|
59
|
-
- Optimizes assets.
|
|
60
|
-
- Enforces relative paths (`baseHref="./"`) for Electron compatibility.
|
|
61
63
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
+
* Outputs to `dist/browser` (Angular) and `dist/electron` (Main Process).
|
|
65
|
+
* Optimizes assets.
|
|
66
|
+
* Enforces relative paths (`baseHref="./"`) for Electron compatibility.
|
|
67
|
+
|
|
64
68
|
|
|
65
69
|
### `valence package`
|
|
70
|
+
|
|
66
71
|
Packages the application for distribution:
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
72
|
+
|
|
73
|
+
* Runs `valence build`.
|
|
74
|
+
* Executes **Electron Forge** to generate installers (e.g., Windows Squirrel.exe, Zip).
|
|
75
|
+
* Artifacts saved to `out/`.
|
|
70
76
|
|
|
71
77
|
### `valence publish`
|
|
78
|
+
|
|
72
79
|
Automates the release pipeline:
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
80
|
+
|
|
81
|
+
* Bumps project version (patch).
|
|
82
|
+
* Updates `README.md` version badges.
|
|
83
|
+
* Builds & Packages.
|
|
84
|
+
* Generates `RELEASES_README.md` entry.
|
|
85
|
+
* Publishes via Electron Forge.
|
|
78
86
|
|
|
79
87
|
---
|
|
80
88
|
|
|
@@ -85,13 +93,16 @@ Valence can automatically inject core game systems into your project.
|
|
|
85
93
|
### `valence add <feature>`
|
|
86
94
|
|
|
87
95
|
#### Core Systems
|
|
96
|
+
|
|
88
97
|
* **`input`**: Unified Action Mapping (Keyboard/Gamepad) via Angular Signals.
|
|
89
98
|
* **`audio`**: Channel-based audio manager (Master/Music/SFX) using Howler.js.
|
|
90
99
|
* **`storage`**: Secure, atomic file I/O for save games (Write-Temp-Rename pattern) via Electron IPC.
|
|
91
100
|
* **`settings`**: Centralized configuration manager (Audio/Graphics) persisted to storage.
|
|
92
101
|
* **`state`**: Strict Game State Machine (Boot, Menu, Gameplay, Paused) via Signals.
|
|
102
|
+
* **`intro`**: Cinematic splash screen displaying technology stack (Valence, Angular, Electron, Babylon.js).
|
|
93
103
|
|
|
94
104
|
#### 3D Features (Babylon.js)
|
|
105
|
+
|
|
95
106
|
* **`physics`**: Installs Havok engine (WASM) & initializes physics.
|
|
96
107
|
* **`inspector`**: Installs & binds Babylon Inspector to `Ctrl+I`.
|
|
97
108
|
* **`gui`**: Installs `lil-gui` debug panel.
|
|
@@ -100,6 +111,7 @@ Valence can automatically inject core game systems into your project.
|
|
|
100
111
|
* **`xr`**: Initializes WebXR (VR/AR) experience.
|
|
101
112
|
|
|
102
113
|
#### Universal Features
|
|
114
|
+
|
|
103
115
|
* **`tailwind`**: Configures TailwindCSS with Angular.
|
|
104
116
|
* **`multiplayer`**: Scaffolds Colyseus server & client.
|
|
105
117
|
* **`pipeline`**: Enables Asset Optimization Pipeline (sharp).
|
|
@@ -107,22 +119,43 @@ Valence can automatically inject core game systems into your project.
|
|
|
107
119
|
|
|
108
120
|
---
|
|
109
121
|
|
|
122
|
+
## 🎨 Templates
|
|
123
|
+
|
|
124
|
+
### `valence template <name>`
|
|
125
|
+
|
|
126
|
+
Instantly hot-swaps the 3D scene in `valence-engine.service.ts` with a pre-built archetype:
|
|
127
|
+
|
|
128
|
+
* **`orbit`**: Standard OrbitCamera setup with a sphere (Default).
|
|
129
|
+
* **`fps`**: First-Person Shooter setup with WASD movement, gravity, and collisions.
|
|
130
|
+
* **`platformer`**: Third-Person setup with a capsule player and follow camera.
|
|
131
|
+
* **`iso`**: Isometric (Cavalier) Orthographic projection with tile grid.
|
|
132
|
+
* **`gallery`**: Slow-walking "Museum" setup with raycast interaction.
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
110
136
|
## 🎲 Generators
|
|
111
137
|
|
|
112
138
|
### `valence generate scene <name>`
|
|
139
|
+
|
|
113
140
|
*Alias: `valence g scene <name>`*
|
|
141
|
+
|
|
114
142
|
Scaffolds a new Scene component:
|
|
143
|
+
|
|
115
144
|
* **3D**: Pre-wired Babylon.js `Scene` with Camera/Light/Resize handling.
|
|
116
145
|
* **2D**: Pre-wired Phaser `Scene` class with lifecycle methods.
|
|
117
146
|
|
|
118
147
|
### `valence generate bridge <name>`
|
|
148
|
+
|
|
119
149
|
*Alias: `valence g bridge <name>`*
|
|
150
|
+
|
|
120
151
|
Generates a type-safe IPC communication channel:
|
|
152
|
+
|
|
121
153
|
* **Main Process**: Registers `ipcMain.handle`.
|
|
122
154
|
* **Preload**: Exposes `contextBridge` API.
|
|
123
155
|
* **Service**: Creates Angular service wrapper.
|
|
124
156
|
|
|
125
157
|
### `valence codegen assets`
|
|
158
|
+
|
|
126
159
|
Scans `src/assets` and generates typed constants in `core/asset-keys.ts` for IntelliSense.
|
|
127
160
|
|
|
128
161
|
---
|
|
@@ -130,7 +163,9 @@ Scans `src/assets` and generates typed constants in `core/asset-keys.ts` for Int
|
|
|
130
163
|
## 🩺 Diagnostics
|
|
131
164
|
|
|
132
165
|
### `valence doctor`
|
|
166
|
+
|
|
133
167
|
Diagnoses your development environment (Node, NPM, Git).
|
|
134
168
|
|
|
135
169
|
### `valence verify`
|
|
170
|
+
|
|
136
171
|
Performs deep health check of project structure and configuration.
|
package/README.original.md
CHANGED
|
@@ -35,46 +35,54 @@ valence start
|
|
|
35
35
|
## 🛠 Commands
|
|
36
36
|
|
|
37
37
|
### `valence new <name>`
|
|
38
|
+
|
|
38
39
|
Scaffolds a new high-performance project. You will be prompted to select your engine:
|
|
39
40
|
|
|
40
41
|
* **3D (Babylon.js)**: Full 3D capabilities with Havok Physics, XR, and Inspector support.
|
|
41
42
|
* **2D (Phaser)**: Fast 2D game engine with configured scenes and arcade physics.
|
|
42
43
|
|
|
43
44
|
**Both environments include:**
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
|
|
46
|
+
* **Angular**: Latest CLI, SCSS, Routing.
|
|
47
|
+
* **Electron**: TypeScript Main/Preload processes, securely configured.
|
|
48
|
+
* **Forge**: Configured for building `.exe` / `.zip` / installers.
|
|
49
|
+
* **Valence UI**: Premium glassmorphic HUD with FPS and status tracking.
|
|
48
50
|
|
|
49
51
|
### `valence start`
|
|
52
|
+
|
|
50
53
|
Runs the application in **Development Mode**:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
54
|
+
|
|
55
|
+
* Cleans previous builds.
|
|
56
|
+
* Builds Angular (Dev config).
|
|
57
|
+
* Compiles Electron (TypeScript).
|
|
58
|
+
* Launches Electron window with live reload enabled.
|
|
55
59
|
|
|
56
60
|
### `valence build`
|
|
61
|
+
|
|
57
62
|
Compiles the application for **Production**:
|
|
58
|
-
- Outputs to `dist/browser` (Angular) and `dist/electron` (Main Process).
|
|
59
|
-
- Optimizes assets.
|
|
60
|
-
- Enforces relative paths (`baseHref="./"`) for Electron compatibility.
|
|
61
63
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
+
* Outputs to `dist/browser` (Angular) and `dist/electron` (Main Process).
|
|
65
|
+
* Optimizes assets.
|
|
66
|
+
* Enforces relative paths (`baseHref="./"`) for Electron compatibility.
|
|
67
|
+
|
|
64
68
|
|
|
65
69
|
### `valence package`
|
|
70
|
+
|
|
66
71
|
Packages the application for distribution:
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
72
|
+
|
|
73
|
+
* Runs `valence build`.
|
|
74
|
+
* Executes **Electron Forge** to generate installers (e.g., Windows Squirrel.exe, Zip).
|
|
75
|
+
* Artifacts saved to `out/`.
|
|
70
76
|
|
|
71
77
|
### `valence publish`
|
|
78
|
+
|
|
72
79
|
Automates the release pipeline:
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
80
|
+
|
|
81
|
+
* Bumps project version (patch).
|
|
82
|
+
* Updates `README.md` version badges.
|
|
83
|
+
* Builds & Packages.
|
|
84
|
+
* Generates `RELEASES_README.md` entry.
|
|
85
|
+
* Publishes via Electron Forge.
|
|
78
86
|
|
|
79
87
|
---
|
|
80
88
|
|
|
@@ -85,13 +93,16 @@ Valence can automatically inject core game systems into your project.
|
|
|
85
93
|
### `valence add <feature>`
|
|
86
94
|
|
|
87
95
|
#### Core Systems
|
|
96
|
+
|
|
88
97
|
* **`input`**: Unified Action Mapping (Keyboard/Gamepad) via Angular Signals.
|
|
89
98
|
* **`audio`**: Channel-based audio manager (Master/Music/SFX) using Howler.js.
|
|
90
99
|
* **`storage`**: Secure, atomic file I/O for save games (Write-Temp-Rename pattern) via Electron IPC.
|
|
91
100
|
* **`settings`**: Centralized configuration manager (Audio/Graphics) persisted to storage.
|
|
92
101
|
* **`state`**: Strict Game State Machine (Boot, Menu, Gameplay, Paused) via Signals.
|
|
102
|
+
* **`intro`**: Cinematic splash screen displaying technology stack (Valence, Angular, Electron, Babylon.js).
|
|
93
103
|
|
|
94
104
|
#### 3D Features (Babylon.js)
|
|
105
|
+
|
|
95
106
|
* **`physics`**: Installs Havok engine (WASM) & initializes physics.
|
|
96
107
|
* **`inspector`**: Installs & binds Babylon Inspector to `Ctrl+I`.
|
|
97
108
|
* **`gui`**: Installs `lil-gui` debug panel.
|
|
@@ -100,6 +111,7 @@ Valence can automatically inject core game systems into your project.
|
|
|
100
111
|
* **`xr`**: Initializes WebXR (VR/AR) experience.
|
|
101
112
|
|
|
102
113
|
#### Universal Features
|
|
114
|
+
|
|
103
115
|
* **`tailwind`**: Configures TailwindCSS with Angular.
|
|
104
116
|
* **`multiplayer`**: Scaffolds Colyseus server & client.
|
|
105
117
|
* **`pipeline`**: Enables Asset Optimization Pipeline (sharp).
|
|
@@ -107,22 +119,43 @@ Valence can automatically inject core game systems into your project.
|
|
|
107
119
|
|
|
108
120
|
---
|
|
109
121
|
|
|
122
|
+
## 🎨 Templates
|
|
123
|
+
|
|
124
|
+
### `valence template <name>`
|
|
125
|
+
|
|
126
|
+
Instantly hot-swaps the 3D scene in `valence-engine.service.ts` with a pre-built archetype:
|
|
127
|
+
|
|
128
|
+
* **`orbit`**: Standard OrbitCamera setup with a sphere (Default).
|
|
129
|
+
* **`fps`**: First-Person Shooter setup with WASD movement, gravity, and collisions.
|
|
130
|
+
* **`platformer`**: Third-Person setup with a capsule player and follow camera.
|
|
131
|
+
* **`iso`**: Isometric (Cavalier) Orthographic projection with tile grid.
|
|
132
|
+
* **`gallery`**: Slow-walking "Museum" setup with raycast interaction.
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
110
136
|
## 🎲 Generators
|
|
111
137
|
|
|
112
138
|
### `valence generate scene <name>`
|
|
139
|
+
|
|
113
140
|
*Alias: `valence g scene <name>`*
|
|
141
|
+
|
|
114
142
|
Scaffolds a new Scene component:
|
|
143
|
+
|
|
115
144
|
* **3D**: Pre-wired Babylon.js `Scene` with Camera/Light/Resize handling.
|
|
116
145
|
* **2D**: Pre-wired Phaser `Scene` class with lifecycle methods.
|
|
117
146
|
|
|
118
147
|
### `valence generate bridge <name>`
|
|
148
|
+
|
|
119
149
|
*Alias: `valence g bridge <name>`*
|
|
150
|
+
|
|
120
151
|
Generates a type-safe IPC communication channel:
|
|
152
|
+
|
|
121
153
|
* **Main Process**: Registers `ipcMain.handle`.
|
|
122
154
|
* **Preload**: Exposes `contextBridge` API.
|
|
123
155
|
* **Service**: Creates Angular service wrapper.
|
|
124
156
|
|
|
125
157
|
### `valence codegen assets`
|
|
158
|
+
|
|
126
159
|
Scans `src/assets` and generates typed constants in `core/asset-keys.ts` for IntelliSense.
|
|
127
160
|
|
|
128
161
|
---
|
|
@@ -130,7 +163,9 @@ Scans `src/assets` and generates typed constants in `core/asset-keys.ts` for Int
|
|
|
130
163
|
## 🩺 Diagnostics
|
|
131
164
|
|
|
132
165
|
### `valence doctor`
|
|
166
|
+
|
|
133
167
|
Diagnoses your development environment (Node, NPM, Git).
|
|
134
168
|
|
|
135
169
|
### `valence verify`
|
|
170
|
+
|
|
136
171
|
Performs deep health check of project structure and configuration.
|
package/dist/README.md
CHANGED
|
@@ -35,46 +35,54 @@ valence start
|
|
|
35
35
|
## 🛠 Commands
|
|
36
36
|
|
|
37
37
|
### `valence new <name>`
|
|
38
|
+
|
|
38
39
|
Scaffolds a new high-performance project. You will be prompted to select your engine:
|
|
39
40
|
|
|
40
41
|
* **3D (Babylon.js)**: Full 3D capabilities with Havok Physics, XR, and Inspector support.
|
|
41
42
|
* **2D (Phaser)**: Fast 2D game engine with configured scenes and arcade physics.
|
|
42
43
|
|
|
43
44
|
**Both environments include:**
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
|
|
46
|
+
* **Angular**: Latest CLI, SCSS, Routing.
|
|
47
|
+
* **Electron**: TypeScript Main/Preload processes, securely configured.
|
|
48
|
+
* **Forge**: Configured for building `.exe` / `.zip` / installers.
|
|
49
|
+
* **Valence UI**: Premium glassmorphic HUD with FPS and status tracking.
|
|
48
50
|
|
|
49
51
|
### `valence start`
|
|
52
|
+
|
|
50
53
|
Runs the application in **Development Mode**:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
54
|
+
|
|
55
|
+
* Cleans previous builds.
|
|
56
|
+
* Builds Angular (Dev config).
|
|
57
|
+
* Compiles Electron (TypeScript).
|
|
58
|
+
* Launches Electron window with live reload enabled.
|
|
55
59
|
|
|
56
60
|
### `valence build`
|
|
61
|
+
|
|
57
62
|
Compiles the application for **Production**:
|
|
58
|
-
- Outputs to `dist/browser` (Angular) and `dist/electron` (Main Process).
|
|
59
|
-
- Optimizes assets.
|
|
60
|
-
- Enforces relative paths (`baseHref="./"`) for Electron compatibility.
|
|
61
63
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
+
* Outputs to `dist/browser` (Angular) and `dist/electron` (Main Process).
|
|
65
|
+
* Optimizes assets.
|
|
66
|
+
* Enforces relative paths (`baseHref="./"`) for Electron compatibility.
|
|
67
|
+
|
|
64
68
|
|
|
65
69
|
### `valence package`
|
|
70
|
+
|
|
66
71
|
Packages the application for distribution:
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
72
|
+
|
|
73
|
+
* Runs `valence build`.
|
|
74
|
+
* Executes **Electron Forge** to generate installers (e.g., Windows Squirrel.exe, Zip).
|
|
75
|
+
* Artifacts saved to `out/`.
|
|
70
76
|
|
|
71
77
|
### `valence publish`
|
|
78
|
+
|
|
72
79
|
Automates the release pipeline:
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
80
|
+
|
|
81
|
+
* Bumps project version (patch).
|
|
82
|
+
* Updates `README.md` version badges.
|
|
83
|
+
* Builds & Packages.
|
|
84
|
+
* Generates `RELEASES_README.md` entry.
|
|
85
|
+
* Publishes via Electron Forge.
|
|
78
86
|
|
|
79
87
|
---
|
|
80
88
|
|
|
@@ -85,13 +93,16 @@ Valence can automatically inject core game systems into your project.
|
|
|
85
93
|
### `valence add <feature>`
|
|
86
94
|
|
|
87
95
|
#### Core Systems
|
|
96
|
+
|
|
88
97
|
* **`input`**: Unified Action Mapping (Keyboard/Gamepad) via Angular Signals.
|
|
89
98
|
* **`audio`**: Channel-based audio manager (Master/Music/SFX) using Howler.js.
|
|
90
99
|
* **`storage`**: Secure, atomic file I/O for save games (Write-Temp-Rename pattern) via Electron IPC.
|
|
91
100
|
* **`settings`**: Centralized configuration manager (Audio/Graphics) persisted to storage.
|
|
92
101
|
* **`state`**: Strict Game State Machine (Boot, Menu, Gameplay, Paused) via Signals.
|
|
102
|
+
* **`intro`**: Cinematic splash screen displaying technology stack (Valence, Angular, Electron, Babylon.js).
|
|
93
103
|
|
|
94
104
|
#### 3D Features (Babylon.js)
|
|
105
|
+
|
|
95
106
|
* **`physics`**: Installs Havok engine (WASM) & initializes physics.
|
|
96
107
|
* **`inspector`**: Installs & binds Babylon Inspector to `Ctrl+I`.
|
|
97
108
|
* **`gui`**: Installs `lil-gui` debug panel.
|
|
@@ -100,6 +111,7 @@ Valence can automatically inject core game systems into your project.
|
|
|
100
111
|
* **`xr`**: Initializes WebXR (VR/AR) experience.
|
|
101
112
|
|
|
102
113
|
#### Universal Features
|
|
114
|
+
|
|
103
115
|
* **`tailwind`**: Configures TailwindCSS with Angular.
|
|
104
116
|
* **`multiplayer`**: Scaffolds Colyseus server & client.
|
|
105
117
|
* **`pipeline`**: Enables Asset Optimization Pipeline (sharp).
|
|
@@ -107,22 +119,43 @@ Valence can automatically inject core game systems into your project.
|
|
|
107
119
|
|
|
108
120
|
---
|
|
109
121
|
|
|
122
|
+
## 🎨 Templates
|
|
123
|
+
|
|
124
|
+
### `valence template <name>`
|
|
125
|
+
|
|
126
|
+
Instantly hot-swaps the 3D scene in `valence-engine.service.ts` with a pre-built archetype:
|
|
127
|
+
|
|
128
|
+
* **`orbit`**: Standard OrbitCamera setup with a sphere (Default).
|
|
129
|
+
* **`fps`**: First-Person Shooter setup with WASD movement, gravity, and collisions.
|
|
130
|
+
* **`platformer`**: Third-Person setup with a capsule player and follow camera.
|
|
131
|
+
* **`iso`**: Isometric (Cavalier) Orthographic projection with tile grid.
|
|
132
|
+
* **`gallery`**: Slow-walking "Museum" setup with raycast interaction.
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
110
136
|
## 🎲 Generators
|
|
111
137
|
|
|
112
138
|
### `valence generate scene <name>`
|
|
139
|
+
|
|
113
140
|
*Alias: `valence g scene <name>`*
|
|
141
|
+
|
|
114
142
|
Scaffolds a new Scene component:
|
|
143
|
+
|
|
115
144
|
* **3D**: Pre-wired Babylon.js `Scene` with Camera/Light/Resize handling.
|
|
116
145
|
* **2D**: Pre-wired Phaser `Scene` class with lifecycle methods.
|
|
117
146
|
|
|
118
147
|
### `valence generate bridge <name>`
|
|
148
|
+
|
|
119
149
|
*Alias: `valence g bridge <name>`*
|
|
150
|
+
|
|
120
151
|
Generates a type-safe IPC communication channel:
|
|
152
|
+
|
|
121
153
|
* **Main Process**: Registers `ipcMain.handle`.
|
|
122
154
|
* **Preload**: Exposes `contextBridge` API.
|
|
123
155
|
* **Service**: Creates Angular service wrapper.
|
|
124
156
|
|
|
125
157
|
### `valence codegen assets`
|
|
158
|
+
|
|
126
159
|
Scans `src/assets` and generates typed constants in `core/asset-keys.ts` for IntelliSense.
|
|
127
160
|
|
|
128
161
|
---
|
|
@@ -130,7 +163,9 @@ Scans `src/assets` and generates typed constants in `core/asset-keys.ts` for Int
|
|
|
130
163
|
## 🩺 Diagnostics
|
|
131
164
|
|
|
132
165
|
### `valence doctor`
|
|
166
|
+
|
|
133
167
|
Diagnoses your development environment (Node, NPM, Git).
|
|
134
168
|
|
|
135
169
|
### `valence verify`
|
|
170
|
+
|
|
136
171
|
Performs deep health check of project structure and configuration.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../../src/commands/add.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"add.d.ts","sourceRoot":"","sources":["../../src/commands/add.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,UAAU,GAAU,SAAS,MAAM,kBAoD/C,CAAA"}
|
package/dist/commands/add.js
CHANGED
|
@@ -12,6 +12,7 @@ import { addAudio } from './features/audio.js';
|
|
|
12
12
|
import { addStorage } from './features/storage.js';
|
|
13
13
|
import { addSettings } from './features/settings.js';
|
|
14
14
|
import { addState } from './features/state.js';
|
|
15
|
+
import { addIntro } from './features/intro.js';
|
|
15
16
|
export const addFeature = async (feature) => {
|
|
16
17
|
const cwd = process.cwd();
|
|
17
18
|
const packageJsonPath = path.join(cwd, 'package.json');
|
|
@@ -86,8 +87,11 @@ export const addFeature = async (feature) => {
|
|
|
86
87
|
case 'state':
|
|
87
88
|
await addState(cwd);
|
|
88
89
|
break;
|
|
90
|
+
case 'intro':
|
|
91
|
+
await addIntro(cwd);
|
|
92
|
+
break;
|
|
89
93
|
default:
|
|
90
|
-
throw new Error(`Unknown feature: ${feature}. Available: physics, inspector, gui, materials, skybox, xr, tailwind, multiplayer, pipeline, native, input, audio, storage, settings, state`);
|
|
94
|
+
throw new Error(`Unknown feature: ${feature}. Available: physics, inspector, gui, materials, skybox, xr, tailwind, multiplayer, pipeline, native, input, audio, storage, settings, state, intro`);
|
|
91
95
|
}
|
|
92
96
|
};
|
|
93
97
|
//# sourceMappingURL=add.js.map
|
package/dist/commands/add.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add.js","sourceRoot":"","sources":["../../src/commands/add.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC5F,OAAO,EAAE,QAAQ,EAA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CAAC;YAAC,MAAM;QAC/C,KAAK,OAAO;YAAE,MAAM,QAAQ,CAAC,GAAG,CAAC,CAAC;YAAC,MAAM;QACzC,KAAK,OAAO;YAAE,MAAM,QAAQ,CAAC,GAAG,CAAC,CAAC;YAAC,MAAM;QACzC;YACI,MAAM,IAAI,KAAK,CAAC,oBAAoB,OAAO,qJAAqJ,CAAC,CAAC;IAC1M,CAAC;AACL,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intro.d.ts","sourceRoot":"","sources":["../../../src/commands/features/intro.ts"],"names":[],"mappings":"AASA,wBAAsB,QAAQ,CAAC,GAAG,EAAE,MAAM,iBAwEzC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
import * as path from 'path';
|
|
3
|
+
import fs from 'fs-extra';
|
|
4
|
+
import { Project, SyntaxKind, ArrayLiteralExpression, ObjectLiteralExpression, PropertyAssignment } from 'ts-morph';
|
|
5
|
+
import { runStage } from '../../utils/logger.js';
|
|
6
|
+
import { modifyFile } from '../../utils/files.js';
|
|
7
|
+
import { ensureNamedImport } from '../../utils/ast.js';
|
|
8
|
+
import { splashComponentTemplate } from '../../templates.js';
|
|
9
|
+
export async function addIntro(cwd) {
|
|
10
|
+
console.log(chalk.cyan('\nAdding Intro Splash Screen...\n'));
|
|
11
|
+
await runStage('Creating Components', async () => {
|
|
12
|
+
const componentPath = path.join(cwd, 'src/app/core/ui/splash/splash.component.ts');
|
|
13
|
+
await fs.ensureDir(path.dirname(componentPath));
|
|
14
|
+
if (!await fs.pathExists(componentPath)) {
|
|
15
|
+
await fs.writeFile(componentPath, splashComponentTemplate.trim());
|
|
16
|
+
}
|
|
17
|
+
return 'SplashComponent created';
|
|
18
|
+
});
|
|
19
|
+
await runStage('Injecting into App', async () => {
|
|
20
|
+
const appHtmlPath = path.join(cwd, 'src/app/app.component.html');
|
|
21
|
+
const appTsPath = path.join(cwd, 'src/app/app.component.ts');
|
|
22
|
+
// 1. Modify HTML (Prepend)
|
|
23
|
+
await modifyFile(appHtmlPath, (content) => {
|
|
24
|
+
if (content.includes('app-splash'))
|
|
25
|
+
return content;
|
|
26
|
+
return `<app-splash *ngIf="showSplash" (complete)="onIntroComplete()"></app-splash>\n` + content;
|
|
27
|
+
});
|
|
28
|
+
// 2. Modify TS (AST)
|
|
29
|
+
const project = new Project();
|
|
30
|
+
const sourceFile = project.addSourceFileAtPath(appTsPath);
|
|
31
|
+
const classDecl = sourceFile.getClass('AppComponent');
|
|
32
|
+
if (!classDecl)
|
|
33
|
+
throw new Error('AppComponent class not found');
|
|
34
|
+
// Add Imports
|
|
35
|
+
ensureNamedImport(sourceFile, './core/ui/splash/splash.component', 'SplashComponent');
|
|
36
|
+
ensureNamedImport(sourceFile, '@angular/common', 'CommonModule');
|
|
37
|
+
// Add to Component Imports
|
|
38
|
+
const decorator = classDecl.getDecorator('Component');
|
|
39
|
+
if (decorator) {
|
|
40
|
+
const arg = decorator.getArguments()[0];
|
|
41
|
+
if (arg && arg.getKind() === SyntaxKind.ObjectLiteralExpression) {
|
|
42
|
+
const obj = arg;
|
|
43
|
+
const importsProp = obj.getProperty('imports');
|
|
44
|
+
if (importsProp && importsProp.getKind() === SyntaxKind.PropertyAssignment) {
|
|
45
|
+
const initializer = importsProp.getInitializer();
|
|
46
|
+
if (initializer && initializer.getKind() === SyntaxKind.ArrayLiteralExpression) {
|
|
47
|
+
const array = initializer;
|
|
48
|
+
const elements = array.getElements().map(e => e.getText());
|
|
49
|
+
if (!elements.includes('SplashComponent'))
|
|
50
|
+
array.addElement('SplashComponent');
|
|
51
|
+
if (!elements.includes('CommonModule'))
|
|
52
|
+
array.addElement('CommonModule');
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
// Add Logic
|
|
58
|
+
if (!classDecl.getProperty('showSplash')) {
|
|
59
|
+
classDecl.addProperty({
|
|
60
|
+
name: 'showSplash',
|
|
61
|
+
initializer: 'true'
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
if (!classDecl.getMethod('onIntroComplete')) {
|
|
65
|
+
classDecl.addMethod({
|
|
66
|
+
name: 'onIntroComplete',
|
|
67
|
+
statements: 'this.showSplash = false;'
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
await sourceFile.save();
|
|
71
|
+
return 'App component updated';
|
|
72
|
+
});
|
|
73
|
+
console.log(chalk.bold.green('\n✓ Intro Splash Ready!'));
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=intro.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intro.js","sourceRoot":"","sources":["../../../src/commands/features/intro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AACpH,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAE7D,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,GAAW;IACtC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC,CAAC;IAE7D,MAAM,QAAQ,CAAC,qBAAqB,EAAE,KAAK,IAAI,EAAE;QAC7C,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,4CAA4C,CAAC,CAAC;QACnF,MAAM,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,a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BACvB,UAAU,EAAE,0BAA0B;aACzC,CAAC,CAAC;QACP,CAAC;QAED,MAAM,UAAU,CAAC,IAAI,EAAE,CAAC;QACxB,OAAO,uBAAuB,CAAC;IACnC,CAAC,CAAC,CAAC;IAEH,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC,CAAC;AAC7D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native.d.ts","sourceRoot":"","sources":["../../../src/commands/features/native.ts"],"names":[],"mappings":"AAWA,wBAAsB,SAAS,CAAC,GAAG,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"native.d.ts","sourceRoot":"","sources":["../../../src/commands/features/native.ts"],"names":[],"mappings":"AAWA,wBAAsB,SAAS,CAAC,GAAG,EAAE,MAAM,iBA0E1C"}
|
|
@@ -26,14 +26,6 @@ export async function addNative(cwd) {
|
|
|
26
26
|
await fs.writeFile(path.join(nativeDir, 'src', 'lib.rs'), nativeLibRs.trim());
|
|
27
27
|
return 'Native files created';
|
|
28
28
|
});
|
|
29
|
-
// 2. Install Deps - Skipped (No npm deps needed for direct cargo build)
|
|
30
|
-
/*
|
|
31
|
-
await runStage('Installing Native Deps', async (spinner) => {
|
|
32
|
-
const nativeDir = path.join(cwd, 'native');
|
|
33
|
-
await execWithScrollingLogger(spinner, 'npm', ['install'], { cwd: nativeDir, title: 'Installing neon...', rows: 5 });
|
|
34
|
-
return 'Neon installed';
|
|
35
|
-
});
|
|
36
|
-
*/
|
|
37
29
|
await runStage('Linking Native Module', async (spinner) => {
|
|
38
30
|
const rootPkgPath = path.join(cwd, 'package.json');
|
|
39
31
|
const rootPkg = await fs.readJSON(rootPkgPath);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native.js","sourceRoot":"","sources":["../../../src/commands/features/native.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAA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AM,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;gBAClF,OAAO,uBAAuB,CAAC;YACpC,CAAC;iBAAM,CAAC;gBACH,MAAM,IAAI,KAAK,CAAC,+BAA+B,SAAS,EAAE,CAAC,CAAC;YACjE,CAAC;QACL,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACT,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,iEAAiE,CAAC,CAAC,CAAC;YAC9F,8CAA8C;YAC9C,MAAM,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC;YACxD,OAAO,sCAAsC,CAAC;QAClD,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC,CAAC;IAC1D,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,yDAAyD,CAAC,CAAC,CAAC;AACvF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tailwind.d.ts","sourceRoot":"","sources":["../../../src/commands/features/tailwind.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tailwind.d.ts","sourceRoot":"","sources":["../../../src/commands/features/tailwind.ts"],"names":[],"mappings":"AAOA,wBAAsB,WAAW,CAAC,GAAG,EAAE,MAAM,iBA4C5C"}
|
|
@@ -2,6 +2,7 @@ import chalk from 'chalk';
|
|
|
2
2
|
import * as path from 'path';
|
|
3
3
|
import fs from 'fs-extra';
|
|
4
4
|
import { runStage, execWithScrollingLogger } from '../../utils/logger.js';
|
|
5
|
+
import { modifyFile } from '../../utils/files.js';
|
|
5
6
|
import { VERSIONS } from '../../constants/versions.js';
|
|
6
7
|
export async function addTailwind(cwd) {
|
|
7
8
|
console.log(chalk.cyan('\nAdding TailwindCSS...\n'));
|
|
@@ -32,14 +33,13 @@ module.exports = {
|
|
|
32
33
|
});
|
|
33
34
|
await runStage('Updating Styles', async () => {
|
|
34
35
|
const stylesPath = path.join(cwd, 'src/styles.scss');
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
return 'styles.scss updated';
|
|
36
|
+
const directives = `@tailwind base;\n@tailwind components;\n@tailwind utilities;\n`;
|
|
37
|
+
const modified = await modifyFile(stylesPath, (content) => {
|
|
38
|
+
if (content.includes('@tailwind base'))
|
|
39
|
+
return content;
|
|
40
|
+
return directives + content;
|
|
41
|
+
});
|
|
42
|
+
return modified ? 'styles.scss updated' : 'styles.scss already configured';
|
|
43
43
|
});
|
|
44
44
|
console.log(chalk.bold.green('\n✓ TailwindCSS Ready!'));
|
|
45
45
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tailwind.js","sourceRoot":"","sources":["../../../src/commands/features/tailwind.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAEvD,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,GAAW;IACzC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC,CAAC;IAErD,MAAM,QAAQ,CAAC,yBAAyB,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;QACxD,MAAM,uBAAuB,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC,SAAS,EAAE,IAAI;YAC1D,eAA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UAAU,GAAG,gEAAgE,CAAC;QAEpF,MAAM,QAAQ,GAAG,MAAM,UAAU,CAAC,UAAU,EAAE,CAAC,OAAO,EAAE,EAAE;YACrD,IAAI,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC;gBAAE,OAAO,OAAO,CAAC;YACvD,OAAO,UAAU,GAAG,OAAO,CAAC;QACjC,CAAC,CAAC,CAAC;QAEH,OAAO,QAAQ,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,gCAAgC,CAAC;IAC/E,CAAC,CAAC,CAAC;IAEH,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC,CAAC;AAC5D,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import { codegen } from './commands/codegen.js';
|
|
|
14
14
|
import { verify } from './commands/verify.js';
|
|
15
15
|
const program = new Command();
|
|
16
16
|
program
|
|
17
|
-
.version('1.
|
|
17
|
+
.version('1.3.2')
|
|
18
18
|
.description('Valence CLI - Scaffolding for Angular + Electron + Babylon.js');
|
|
19
19
|
const actionWrapper = (fn) => {
|
|
20
20
|
return async (...args) => {
|
|
@@ -47,7 +47,7 @@ program
|
|
|
47
47
|
}));
|
|
48
48
|
program
|
|
49
49
|
.command('add <feature>')
|
|
50
|
-
.description('Add a capability to existing project (physics, inspector, gui, materials, skybox, xr, tailwind)')
|
|
50
|
+
.description('Add a capability to existing project (physics, inspector, gui, materials, skybox, xr, tailwind, intro)')
|
|
51
51
|
.action(actionWrapper(async (feature) => {
|
|
52
52
|
await addFeature(feature);
|
|
53
53
|
}));
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,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,CAAC,CAAC;AAER,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/templates/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/templates/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC"}
|
package/dist/templates/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/templates/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/templates/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const splashComponentTemplate = "\n/* eslint-disable */\nimport { Component, OnInit, signal, output } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { animate, style, transition, trigger } from '@angular/animations';\n\n@Component({\n selector: 'app-splash',\n standalone: true,\n imports: [CommonModule],\n animations: [\n trigger('fade', [\n transition(':enter', [\n style({ opacity: 0 }),\n animate('500ms ease-out', style({ opacity: 1 }))\n ]),\n transition(':leave', [\n animate('500ms ease-in', style({ opacity: 0 }))\n ])\n ])\n ],\n template: '<div class=\"splash-container\" @fade>' +\n ' <div class=\"logo-wrapper\" *ngIf=\"currentStep() < logos.length\">' +\n ' <div class=\"logo\" [innerHTML]=\"currentLogo()\"></div>' +\n ' <div class=\"label\">{{ currentLabel() }}</div>' +\n ' </div>' +\n '</div>',\n styles: ['' +\n '.splash-container {' +\n ' position: fixed;' +\n ' top: 0;' +\n ' left: 0;' +\n ' width: 100vw;' +\n ' height: 100vh;' +\n ' background: #050505;' +\n ' z-index: 9999;' +\n ' display: flex;' +\n ' align-items: center;' +\n ' justify-content: center;' +\n ' color: white;' +\n \" font-family: 'Inter', sans-serif;\" +\n '}' +\n '.logo-wrapper {' +\n ' display: flex;' +\n ' flex-direction: column;' +\n ' align-items: center;' +\n ' gap: 20px;' +\n ' animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);' +\n '}' +\n '.logo {' +\n ' width: 120px;' +\n ' height: 120px;' +\n '}' +\n '.label {' +\n ' font-size: 1.5rem;' +\n ' font-weight: 300;' +\n ' letter-spacing: 2px;' +\n ' opacity: 0.8;' +\n '}' +\n '@keyframes popIn {' +\n ' from { transform: scale(0.8); opacity: 0; }' +\n ' to { transform: scale(1); opacity: 1; }' +\n '}'\n ]\n})\nexport class SplashComponent implements OnInit {\n complete = output<void>();\n \n protected currentStep = signal(0);\n \n // SVGs for technologies\n protected logos = [\n { \n label: 'POWERED BY', \n svg: '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"><path d=\"M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5\"/></svg>'\n }, \n {\n label: 'ANGULAR',\n svg: '<svg viewBox=\"0 0 24 24\" fill=\"#DD0031\"><path d=\"M12 2L2 7l10 5 10-5-10-5z\"/><path d=\"M12 22l10-5V7l-10 5-10-5v10l10 5z\" opacity=\".5\"/></svg>'\n },\n {\n label: 'ELECTRON',\n svg: '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#47848F\" stroke-width=\"2\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M12 2a15 15 0 0 1 0 20M2 12a15 15 0 0 1 20 0\"/></svg>'\n },\n {\n label: 'BABYLON.JS',\n svg: '<svg viewBox=\"0 0 24 24\" fill=\"#BBBBBB\"><path d=\"M12 2L2 7v10l10 5 10-5V7L12 2zm0 2.8l7 3.5v7l-7 3.5-7-3.5v-7l7-3.5z\"/></svg>'\n },\n {\n label: 'VALENCE',\n svg: '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#ffffff\" stroke-width=\"2\"><path d=\"M12 2L2 22h20L12 2zm0 4l6 12H6l6-12z\"/></svg>'\n }\n ];\n\n protected currentLogo() {\n return this.logos[this.currentStep()]?.svg;\n }\n\n protected currentLabel() {\n return this.logos[this.currentStep()]?.label;\n }\n\n ngOnInit() {\n this.nextStep();\n }\n\n private nextStep() {\n if (this.currentStep() >= this.logos.length) {\n this.complete.emit();\n return;\n }\n\n setTimeout(() => {\n this.currentStep.update(v => v + 1);\n this.nextStep();\n }, 1500); // 1.5s per logo\n }\n}\n";
|
|
2
|
+
//# sourceMappingURL=intro.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intro.d.ts","sourceRoot":"","sources":["../../src/templates/intro.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,0jHAsHnC,CAAC"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
export const splashComponentTemplate = `
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
import { Component, OnInit, signal, output } from '@angular/core';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import { animate, style, transition, trigger } from '@angular/animations';
|
|
6
|
+
|
|
7
|
+
@Component({
|
|
8
|
+
selector: 'app-splash',
|
|
9
|
+
standalone: true,
|
|
10
|
+
imports: [CommonModule],
|
|
11
|
+
animations: [
|
|
12
|
+
trigger('fade', [
|
|
13
|
+
transition(':enter', [
|
|
14
|
+
style({ opacity: 0 }),
|
|
15
|
+
animate('500ms ease-out', style({ opacity: 1 }))
|
|
16
|
+
]),
|
|
17
|
+
transition(':leave', [
|
|
18
|
+
animate('500ms ease-in', style({ opacity: 0 }))
|
|
19
|
+
])
|
|
20
|
+
])
|
|
21
|
+
],
|
|
22
|
+
template: '<div class="splash-container" @fade>' +
|
|
23
|
+
' <div class="logo-wrapper" *ngIf="currentStep() < logos.length">' +
|
|
24
|
+
' <div class="logo" [innerHTML]="currentLogo()"></div>' +
|
|
25
|
+
' <div class="label">{{ currentLabel() }}</div>' +
|
|
26
|
+
' </div>' +
|
|
27
|
+
'</div>',
|
|
28
|
+
styles: ['' +
|
|
29
|
+
'.splash-container {' +
|
|
30
|
+
' position: fixed;' +
|
|
31
|
+
' top: 0;' +
|
|
32
|
+
' left: 0;' +
|
|
33
|
+
' width: 100vw;' +
|
|
34
|
+
' height: 100vh;' +
|
|
35
|
+
' background: #050505;' +
|
|
36
|
+
' z-index: 9999;' +
|
|
37
|
+
' display: flex;' +
|
|
38
|
+
' align-items: center;' +
|
|
39
|
+
' justify-content: center;' +
|
|
40
|
+
' color: white;' +
|
|
41
|
+
" font-family: 'Inter', sans-serif;" +
|
|
42
|
+
'}' +
|
|
43
|
+
'.logo-wrapper {' +
|
|
44
|
+
' display: flex;' +
|
|
45
|
+
' flex-direction: column;' +
|
|
46
|
+
' align-items: center;' +
|
|
47
|
+
' gap: 20px;' +
|
|
48
|
+
' animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);' +
|
|
49
|
+
'}' +
|
|
50
|
+
'.logo {' +
|
|
51
|
+
' width: 120px;' +
|
|
52
|
+
' height: 120px;' +
|
|
53
|
+
'}' +
|
|
54
|
+
'.label {' +
|
|
55
|
+
' font-size: 1.5rem;' +
|
|
56
|
+
' font-weight: 300;' +
|
|
57
|
+
' letter-spacing: 2px;' +
|
|
58
|
+
' opacity: 0.8;' +
|
|
59
|
+
'}' +
|
|
60
|
+
'@keyframes popIn {' +
|
|
61
|
+
' from { transform: scale(0.8); opacity: 0; }' +
|
|
62
|
+
' to { transform: scale(1); opacity: 1; }' +
|
|
63
|
+
'}'
|
|
64
|
+
]
|
|
65
|
+
})
|
|
66
|
+
export class SplashComponent implements OnInit {
|
|
67
|
+
complete = output<void>();
|
|
68
|
+
|
|
69
|
+
protected currentStep = signal(0);
|
|
70
|
+
|
|
71
|
+
// SVGs for technologies
|
|
72
|
+
protected logos = [
|
|
73
|
+
{
|
|
74
|
+
label: 'POWERED BY',
|
|
75
|
+
svg: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5"/></svg>'
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
label: 'ANGULAR',
|
|
79
|
+
svg: '<svg viewBox="0 0 24 24" fill="#DD0031"><path d="M12 2L2 7l10 5 10-5-10-5z"/><path d="M12 22l10-5V7l-10 5-10-5v10l10 5z" opacity=".5"/></svg>'
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
label: 'ELECTRON',
|
|
83
|
+
svg: '<svg viewBox="0 0 24 24" fill="none" stroke="#47848F" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="M12 2a15 15 0 0 1 0 20M2 12a15 15 0 0 1 20 0"/></svg>'
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
label: 'BABYLON.JS',
|
|
87
|
+
svg: '<svg viewBox="0 0 24 24" fill="#BBBBBB"><path d="M12 2L2 7v10l10 5 10-5V7L12 2zm0 2.8l7 3.5v7l-7 3.5-7-3.5v-7l7-3.5z"/></svg>'
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
label: 'VALENCE',
|
|
91
|
+
svg: '<svg viewBox="0 0 24 24" fill="none" stroke="#ffffff" stroke-width="2"><path d="M12 2L2 22h20L12 2zm0 4l6 12H6l6-12z"/></svg>'
|
|
92
|
+
}
|
|
93
|
+
];
|
|
94
|
+
|
|
95
|
+
protected currentLogo() {
|
|
96
|
+
return this.logos[this.currentStep()]?.svg;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
protected currentLabel() {
|
|
100
|
+
return this.logos[this.currentStep()]?.label;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
ngOnInit() {
|
|
104
|
+
this.nextStep();
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
private nextStep() {
|
|
108
|
+
if (this.currentStep() >= this.logos.length) {
|
|
109
|
+
this.complete.emit();
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
setTimeout(() => {
|
|
114
|
+
this.currentStep.update(v => v + 1);
|
|
115
|
+
this.nextStep();
|
|
116
|
+
}, 1500); // 1.5s per logo
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
`;
|
|
120
|
+
//# sourceMappingURL=intro.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intro.js","sourceRoot":"","sources":["../../src/templates/intro.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,uBAAuB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsHtC,CAAC"}
|