create-pixi-vn 0.1.9 → 0.2.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 +35 -2
- package/dist/index.mjs +1 -1
- package/package.json +2 -1
- package/template-react-vite-muijoy/README.md +3 -3
- package/template-react-vite-muijoy/package-lock.json +9933 -9821
- package/template-react-vite-muijoy/package.json +12 -12
- package/template-react-vite-muijoy/src/AppRoutes.tsx +4 -2
- package/template-react-vite-muijoy/src/atoms/canGoBackState.ts +2 -2
- package/template-react-vite-muijoy/src/atoms/choiceMenuState.ts +2 -2
- package/template-react-vite-muijoy/src/atoms/hideNextButtonState.ts +2 -2
- package/template-react-vite-muijoy/src/atoms/reloadInterfaceDataEventAtom.ts +6 -0
- package/template-react-vite-muijoy/src/atoms/textInputOptionsState.ts +6 -0
- package/template-react-vite-muijoy/src/components/ModalDialog.tsx +4 -4
- package/template-react-vite-muijoy/src/interceptors/DialogueDataEventInterceptor.tsx +2 -2
- package/template-react-vite-muijoy/src/interceptors/EventInterceptor.tsx +2 -2
- package/template-react-vite-muijoy/src/main.tsx +13 -4
- package/template-react-vite-muijoy/src/screens/ChoicesMenu.tsx +2 -2
- package/template-react-vite-muijoy/src/screens/History.tsx +2 -2
- package/template-react-vite-muijoy/src/screens/MainMenu.tsx +3 -3
- package/template-react-vite-muijoy/src/screens/QuickActions.tsx +2 -2
- package/template-react-vite-muijoy/src/screens/QuickLoadAlert.tsx +2 -2
- package/template-react-vite-muijoy/src/screens/Settings.tsx +4 -4
- package/template-react-vite-muijoy/src/screens/TextInput.tsx +37 -0
- package/template-react-vite-muijoy/src/utility/ActionsUtility.ts +6 -1
- package/template-react-vite-muijoy/src/utility/useMyNavigate.ts +3 -0
- package/template-react-vite-muijoy/src/values/translations/strings_en.json +43 -42
- package/template-react-vite-muijoy-multidevice/README.md +14 -11
- package/template-react-vite-muijoy-multidevice/package-lock.json +221 -211
- package/template-react-vite-muijoy-multidevice/package.json +13 -14
- package/template-react-vite-muijoy-multidevice/src/AppRoutes.tsx +4 -2
- package/template-react-vite-muijoy-multidevice/src/atoms/canGoBackState.ts +2 -2
- package/template-react-vite-muijoy-multidevice/src/atoms/choiceMenuState.ts +2 -2
- package/template-react-vite-muijoy-multidevice/src/atoms/hideNextButtonState.ts +2 -2
- package/template-react-vite-muijoy-multidevice/src/atoms/reloadInterfaceDataEventAtom.ts +6 -0
- package/template-react-vite-muijoy-multidevice/src/atoms/textInputOptionsState.ts +6 -0
- package/template-react-vite-muijoy-multidevice/src/components/ModalDialog.tsx +4 -4
- package/template-react-vite-muijoy-multidevice/src/interceptors/DialogueDataEventInterceptor.tsx +2 -2
- package/template-react-vite-muijoy-multidevice/src/interceptors/EventInterceptor.tsx +2 -2
- package/template-react-vite-muijoy-multidevice/src/main.tsx +13 -4
- package/template-react-vite-muijoy-multidevice/src/screens/ChoicesMenu.tsx +2 -2
- package/template-react-vite-muijoy-multidevice/src/screens/History.tsx +2 -2
- package/template-react-vite-muijoy-multidevice/src/screens/MainMenu.tsx +3 -3
- package/template-react-vite-muijoy-multidevice/src/screens/QuickActions.tsx +2 -2
- package/template-react-vite-muijoy-multidevice/src/screens/QuickLoadAlert.tsx +2 -2
- package/template-react-vite-muijoy-multidevice/src/screens/Settings.tsx +4 -4
- package/template-react-vite-muijoy-multidevice/src/screens/TextInput.tsx +37 -0
- package/template-react-vite-muijoy-multidevice/src/utility/ActionsUtility.ts +6 -1
- package/template-react-vite-muijoy-multidevice/src/utility/useMyNavigate.ts +3 -0
- package/template-react-vite-muijoy-multidevice/src/values/translations/strings_en.json +43 -42
- package/template-react-vite-muijoy/src/atoms/reloadInterfaceDataEventState.ts +0 -6
- package/template-react-vite-muijoy-multidevice/src/atoms/reloadInterfaceDataEventState.ts +0 -6
package/README.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
|
-
|
|
1
|
+
# Getting Started
|
|
2
|
+
|
|
3
|
+
You can start using Pixi’VN by initializing a new project.
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
* [Node.js](https://nodejs.org/) version 18 or higher.
|
|
8
|
+
* Text Editor with TypeScript support.
|
|
9
|
+
* [Visual Studio Code](https://code.visualstudio.com/) is recommended.
|
|
10
|
+
|
|
11
|
+
## Project Initialization
|
|
12
|
+
|
|
13
|
+
To initialize a new project, you can use the following command:
|
|
2
14
|
|
|
3
15
|
```bash
|
|
4
|
-
|
|
16
|
+
# npm
|
|
17
|
+
npm create pixi-vn@latest
|
|
18
|
+
|
|
19
|
+
# yarn
|
|
20
|
+
yarn create pixi-vn@latest
|
|
21
|
+
|
|
22
|
+
# pnpm
|
|
23
|
+
pnpm create pixi-vn@latest
|
|
24
|
+
|
|
25
|
+
# bun
|
|
26
|
+
bun create pixi-vn@latest
|
|
5
27
|
```
|
|
28
|
+
|
|
29
|
+
The supported template presets are:
|
|
30
|
+
|
|
31
|
+
* **[Basic Visual Novel - Web page (Vite + React + MUI joy)](https://github.com/DRincs-Productions/pixi-vn-react-template)**
|
|
32
|
+
* **[Basic Visual Novel - Multi Device (Vite + React + MUI joy + Electron Forge)](https://github.com/DRincs-Productions/pixi-vn-react-template/tree/electron)**
|
|
33
|
+
|
|
34
|
+
( More templates will be added in the future, see this [issue](https://github.com/DRincs-Productions/pixi-vn/issues/162) for more information )
|
|
35
|
+
|
|
36
|
+
After the project is initialized, you can open the project directory with your text editor (VSCode is recommended) and start developing your visual novel.
|
|
37
|
+
|
|
38
|
+
Into all templates there is a `README.md` file with more information about the project.
|
package/dist/index.mjs
CHANGED
|
@@ -47,7 +47,7 @@ Filtered results for: ${this.inputValue?this.inputValue:N.gray("Enter something
|
|
|
47
47
|
`),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
48
48
|
`),this.close()}_(t,s){return t.toLowerCase()==="y"?(this.value=!0,this.submit()):t.toLowerCase()==="n"?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(De.hide):this.out.write(Rr(this.outputText,this.out.columns)),super.render(),this.outputText=[Ie.symbol(this.done,this.aborted),Te.bold(this.msg),Ie.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:Te.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(Ar.line+De.to(0)+this.outputText))}}var Nr=jr,Fr={TextPrompt:hi,SelectPrompt:pi,TogglePrompt:wi,DatePrompt:lr,NumberPrompt:pr,MultiselectPrompt:Se,AutocompletePrompt:Mr,AutocompleteMultiselectPrompt:Dr,ConfirmPrompt:Nr};(function(e){const t=e,s=Fr,i=r=>r;function n(r,l,d={}){return new Promise((h,y)=>{const f=new s[r](l),a=d.onAbort||i,c=d.onSubmit||i,g=d.onExit||i;f.on("state",l.onState||i),f.on("submit",$=>h(c($))),f.on("exit",$=>h(g($))),f.on("abort",$=>y(a($)))})}t.text=r=>n("TextPrompt",r),t.password=r=>(r.style="password",t.text(r)),t.invisible=r=>(r.style="invisible",t.text(r)),t.number=r=>n("NumberPrompt",r),t.date=r=>n("DatePrompt",r),t.confirm=r=>n("ConfirmPrompt",r),t.list=r=>{const l=r.separator||",";return n("TextPrompt",r,{onSubmit:d=>d.split(l).map(h=>h.trim())})},t.toggle=r=>n("TogglePrompt",r),t.select=r=>n("SelectPrompt",r),t.multiselect=r=>{r.choices=[].concat(r.choices||[]);const l=d=>d.filter(h=>h.selected).map(h=>h.value);return n("MultiselectPrompt",r,{onAbort:l,onSubmit:l})},t.autocompleteMultiselect=r=>{r.choices=[].concat(r.choices||[]);const l=d=>d.filter(h=>h.selected).map(h=>h.value);return n("AutocompleteMultiselectPrompt",r,{onAbort:l,onSubmit:l})};const o=(r,l)=>Promise.resolve(l.filter(d=>d.title.slice(0,r.length).toLowerCase()===r.toLowerCase()));t.autocomplete=r=>(r.suggest=r.suggest||o,r.choices=[].concat(r.choices||[]),n("AutocompletePrompt",r))})(ne);const jt=ne,Lr=["suggest","format","onState","validate","onRender","type"],_e=()=>{};async function Y(e=[],{onSubmit:t=_e,onCancel:s=_e}={}){const i={},n=Y._override||{};e=[].concat(e);let o,r,l,d,h,y;const f=async(a,c,g=!1)=>{if(!(!g&&a.validate&&a.validate(c)!==!0))return a.format?await a.format(c,i):c};for(r of e)if({name:d,type:h}=r,typeof h=="function"&&(h=await h(o,{...i},r),r.type=h),!!h){for(let a in r){if(Lr.includes(a))continue;let c=r[a];r[a]=typeof c=="function"?await c(o,{...i},y):c}if(y=r,typeof r.message!="string")throw new Error("prompt message is required");if({name:d,type:h}=r,jt[h]===void 0)throw new Error(`prompt type (${h}) is not defined`);if(n[r.name]!==void 0&&(o=await f(r,n[r.name]),o!==void 0)){i[d]=o;continue}try{o=Y._injected?Yr(Y._injected,r.initial):await jt[h](r),i[d]=o=await f(r,o,!0),l=await t(r,o,i)}catch{l=!await s(r,i)}if(l)return i}return i}function Yr(e,t){const s=e.shift();if(s instanceof Error)throw s;return s===void 0?t:s}function Hr(e){Y._injected=(Y._injected||[]).concat(e)}function Vr(e){Y._override=Object.assign({},e)}var Br=Object.assign(Y,{prompt:Y,prompts:jt,inject:Hr,override:Vr});const Re=ct(Br),et=Ms(process.argv.slice(2),{default:{help:!1},alias:{h:"help",t:"template"},string:["_"]}),Nt=process.cwd(),kr=`Usage: create-pixi-vn [OPTION]... [DIRECTORY]
|
|
49
49
|
|
|
50
|
-
Create a new Pixi
|
|
50
|
+
Create a new Pixi\u2019VN project.
|
|
51
51
|
With no arguments, start the CLI in interactive mode.
|
|
52
52
|
|
|
53
53
|
Options:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Pixi
|
|
1
|
+
# Pixi’VN template (React + Vite + MUI joy)
|
|
2
2
|
|
|
3
|
-
This is a template for creating visual novels in React. It uses the Pixi
|
|
3
|
+
This is a template for creating visual novels in React. It uses the Pixi’VN library and Vite as a build tool.
|
|
4
4
|
This Template contains basic functionality inspired by the widespread Visual Noval engine Ren'Py.
|
|
5
5
|
|
|
6
6
|
## Overview
|
|
@@ -58,7 +58,7 @@ This template uses the following libraries:
|
|
|
58
58
|
|
|
59
59
|
Core libraries:
|
|
60
60
|
|
|
61
|
-
* [Pixi
|
|
61
|
+
* [Pixi’VN](https://www.npmjs.com/package/@drincs/pixi-vn): A visual novel library for PixiJS.
|
|
62
62
|
* [Vite](https://vitejs.dev/): A build tool that aims to provide a faster and leaner development experience for modern web projects.
|
|
63
63
|
* [Vite Checker](https://www.npmjs.com/package/vite-plugin-checker): A Vite plugin that checks TypeScript types and ESLint on each build.
|
|
64
64
|
* [PWA Vite Plugin](https://vite-pwa-org.netlify.app): A Vite plugin that provides PWA support. This allows the possibility of installing the game as a Progressive Web App.
|