kawaijs 0.1.0 → 0.1.1
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 +109 -0
- package/package.json +3 -2
package/README.md
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# 🌸 Kawaijs
|
|
4
|
+
|
|
5
|
+
**A modern, web-native visual novel engine and toolchain inspired by Ren'Py.**
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/kawaijs)
|
|
8
|
+
[](https://github.com/biagio-scaglia/KawaiJS/blob/main/LICENSE)
|
|
9
|
+
[](https://github.com/biagio-scaglia/KawaiJS)
|
|
10
|
+
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 📖 Introduction
|
|
16
|
+
|
|
17
|
+
**Kawaijs** is a developer-friendly, web-native visual novel engine and toolchain. It bridges the clean, human-friendly authoring experience of Ren'Py with modern Web technologies (HTML5, standard CSS, and TypeScript).
|
|
18
|
+
|
|
19
|
+
Write your story in **Kawa Script** (`.kawa`), style dialogue boxes and choices with **standard CSS**, and deploy anywhere as a pure static web application.
|
|
20
|
+
|
|
21
|
+
```text
|
|
22
|
+
character yumia "Yumia" #f43f5e
|
|
23
|
+
|
|
24
|
+
label start:
|
|
25
|
+
scene bg classroom with fade
|
|
26
|
+
show yumia happy at center
|
|
27
|
+
|
|
28
|
+
yumia "Good morning! Are you ready for the festival?"
|
|
29
|
+
|
|
30
|
+
menu:
|
|
31
|
+
"Yes, absolutely!":
|
|
32
|
+
jump ready
|
|
33
|
+
|
|
34
|
+
"Not yet...":
|
|
35
|
+
jump not_ready
|
|
36
|
+
|
|
37
|
+
label ready:
|
|
38
|
+
show yumia excited
|
|
39
|
+
yumia "Awesome! Let's get to work."
|
|
40
|
+
return
|
|
41
|
+
|
|
42
|
+
label not_ready:
|
|
43
|
+
yumia "Don't worry, we still have time."
|
|
44
|
+
return
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## 🚀 Quick Start
|
|
50
|
+
|
|
51
|
+
### 1. Scaffold a New Visual Novel
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npx kawaijs create my-novel
|
|
55
|
+
cd my-novel
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### 2. Validate Your Script
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
npx kawaijs validate
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## ✨ Features
|
|
67
|
+
|
|
68
|
+
- **🌐 Web-Native**: Runs directly in modern browsers with zero backend dependencies. Deploy to GitHub Pages, Netlify, Vercel, Cloudflare Pages, or itch.io.
|
|
69
|
+
- **✍️ Writer-Friendly**: Indentation-based Kawa Script designed for narrative designers and story writers.
|
|
70
|
+
- **🎨 Deep CSS Theming**: Customize dialogue boxes, choice overlays, buttons, fonts, and animations using standard CSS and CSS custom properties.
|
|
71
|
+
- **⏱️ Deterministic Rollback**: Step backwards through dialogue and choices with instant snapshot rollbacks (`vm.rollback()`).
|
|
72
|
+
- **💾 Save & Load**: Built-in persistence for game save slots using LocalStorage / IndexedDB.
|
|
73
|
+
- **📦 Modular Architecture**: Decoupled compiler (`@kawaijs/parser`), headless state machine (`@kawaijs/runtime`), and presentation layer (`@kawaijs/renderer-dom`).
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## 💻 CLI Usage
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
# Create a new visual novel project
|
|
81
|
+
kawa create <project-name>
|
|
82
|
+
|
|
83
|
+
# Validate syntax, jump labels, and asset links
|
|
84
|
+
kawa validate [path]
|
|
85
|
+
|
|
86
|
+
# Show version
|
|
87
|
+
kawa version
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## 📦 Modular Packages
|
|
93
|
+
|
|
94
|
+
Kawaijs is built as a clean modular toolkit:
|
|
95
|
+
|
|
96
|
+
| Package | Description |
|
|
97
|
+
| :--- | :--- |
|
|
98
|
+
| [`kawaijs`](https://www.npmjs.com/package/kawaijs) | All-in-one engine bundle & CLI |
|
|
99
|
+
| [`@kawaijs/ast`](https://www.npmjs.com/package/@kawaijs/ast) | Syntax AST & Story IR type definitions |
|
|
100
|
+
| [`@kawaijs/parser`](https://www.npmjs.com/package/@kawaijs/parser) | Indentation Lexer, Parser & Diagnostic error reporter |
|
|
101
|
+
| [`@kawaijs/runtime`](https://www.npmjs.com/package/@kawaijs/runtime) | Headless Story VM, rollback engine & persistence |
|
|
102
|
+
| [`@kawaijs/renderer-dom`](https://www.npmjs.com/package/@kawaijs/renderer-dom) | Semantic DOM renderer & CSS design system |
|
|
103
|
+
| [`@kawaijs/cli`](https://www.npmjs.com/package/@kawaijs/cli) | Dedicated CLI binary package |
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## 📜 License
|
|
108
|
+
|
|
109
|
+
MIT License © 2026 [Biagio Scaglia](https://github.com/biagio-scaglia)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kawaijs",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Web-native visual novel engine and toolchain inspired by Ren'Py",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
},
|
|
12
12
|
"files": [
|
|
13
13
|
"dist",
|
|
14
|
-
"bin"
|
|
14
|
+
"bin",
|
|
15
|
+
"README.md"
|
|
15
16
|
],
|
|
16
17
|
"publishConfig": {
|
|
17
18
|
"access": "public"
|