juxscript 1.0.45 → 1.0.46

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.
Files changed (2) hide show
  1. package/README.md +50 -238
  2. package/package.json +15 -24
package/README.md CHANGED
@@ -1,271 +1,83 @@
1
- # The web needs a higher level of abstraction: Meet **JUX**
1
+ # JUX - JavaScript UX Authorship Platform
2
2
 
3
+ > Say goodbye to markup `</</>>>`. Build reactive UIs with pure JavaScript.
3
4
 
4
- ```diff
5
- - IF YOU ARE CURRENTLY USING THIS PACKAGE COOL! But it is still a little fragile.
6
- - We are working on opening our repo to public and working on our documentation pages.
7
- + Stay tuned! For now, you will see our roadmap here!
5
+ [![npm version](https://img.shields.io/npm/v/juxscript.svg)](https://www.npmjs.com/package/juxscript)
6
+ [![License](https://img.shields.io/npm/l/juxscript.svg)](https://github.com/jux/juxscript/blob/main/LICENSE)
8
7
 
9
- ```
10
- - [X] Router
11
- - [ ] Cross Page Store.
12
- - [ ] Distributable Bundle (Static Sites)
13
- - [ ] Tree Shake/Efficiencies.
14
-
15
- - [ ] Data
16
- - [ ] Drivers: File, S3, Database.
17
- - [ ] const d = jux.data('id',{});
18
- - [ ] d.driver(file|s3|database)
19
- - [ ] d.items([] | juxitem)
20
- - [ ] d.store(callback)
21
-
22
- - [X] Layouts (100% done.)
23
- - [ ] *Authoring Layout Pages* - `docs`
24
- - [ ] *Authoring Application Pages* - `docs`
25
- - [ ] *Authoring Custom Components* - `docs`
26
-
27
- - [ ] Render Dependency Tree
28
- > Idea here is, one element may be a predicate for another. Will need promises. **predicting problems with slow-loading components that depend on containers from other components. May to to separate concerns with container "building" vs. content addition OR use async processes (promises).
29
- - [X] Reactivity (90% done.)
30
- - [ ] Client Components (99% of what would be needed.)
31
- - [X] Charts
32
- - [X] Poor Intellisense support? Could be this issue. - fixed.
33
- - [ ] Api Wrapper
34
- - [X] Params/Active State for Menu/Nav matching - built in.
35
- - [ ] CDN Bundle (import CDN/'state', 'jux' from cdn.)
36
- - [ ] Icon
37
-
38
- - [ ] Quickstart Boilerplates (20% done,notion.jux)
39
- - [ ] Mobile Nav
40
- - [ ] `npx jux present notion|default` etc..
41
- - [ ] Server side components (api and database)
42
- - [ ] Quick deploy option
43
-
44
-
45
- ## *JUX* Authoring UI's in pure javascript.
8
+ ## 🚀 Quick Start
46
9
 
47
- > Build beautiful, reactive UI's using only javascript. **No markup required.**
48
- > A clean authorship layer capable of being taught to non-developers, strong enough to be used by real developers.
10
+ Create a new JUX app in one command:
49
11
 
50
- >> **jux** challenges the idea that markup based systems are the most efficient way to author web applications.
51
- ## AI friendly - **use less tokens!**
52
-
53
-
54
- ```diff
55
- - Markup is expensive!
56
- Have you ever considered the energy requirements to ship chunks of HTML markup like Vue or React components?
12
+ ```bash
13
+ npx jux create my-app
14
+ cd my-app
15
+ npm run dev
57
16
  ```
58
17
 
59
- - [ ] Build a code calculator (token calculator)
60
- > As a user, I want to be efficient with the LLM's. I want my code to be clean. I want to avoid repeating myself. I ultimately, want to write less code. Less code is better code.
61
-
62
- ## Ecosystem friendly (NPM)
63
-
64
- > Because it is just javascript, .jux files work with any npm package you want to throw at it with standard ESM syntax.
65
-
66
- ## GETTING STARTED
18
+ Or add JUX to an existing project:
67
19
 
68
20
  ```bash
69
- # New project
70
- mkdir my-project
71
- cd my-project
72
- npm init -y
73
21
  npm install juxscript
74
-
75
- # Initialize (creates jux/ directory)
76
22
  npx jux init
77
-
78
- # Builds jux-dist and serves index.jux
79
23
  npx jux serve
80
24
  ```
81
- > install
82
- `npm i juxscript`
83
-
84
- >> Your IDE must be setup to read .jux files as .js files. In VS Code, this is do in the `.vscode/settings.json`. Here is an example.
85
-
86
- ```json
87
- //.vscode/settings.json
88
- {
89
- "files.associations": {
90
- "*.jux": "javascript",
91
- "*.juxt": "javascript"
92
- },
93
- "javascript.validate.enable": false,
94
- "[javascript]": {
95
- "editor.defaultFormatter": "vscode.typescript-language-features"
96
- }
97
- }
98
- ```
99
-
100
- > building and serving the `examples` project directory.
101
- `npm run dev`
102
-
103
- > building only (the `examples` project directory)
104
- `npm run build:examples`
105
-
106
-
107
- # Authoring in Jux
108
-
109
- 1. Build a Layout Page you can reuse.
110
- Check out the presets, they speed this process up. Just modify them with your goals, such as logo, menu options, nav etc.
111
- 2. Build your Pages
112
- Just get to work, using the **jux** component library to build most of what you need, filling in any details with *javascript* logically arranged the way you want. Think, authoring SFC but with only the composition layer.
113
- 3. Test it out!
114
- Jux comes with a watcher system built in, so you can see your edits to *.jux* files live.
115
-
116
- # GOAL: Eliminating the Markup System of building UI's.
117
- > HTML markup is the equivalent of still writing in `C` ro `C++` despite the availability of more functional levels of abstraction like `python`.
118
- > To remove the requirement for markup, **jux** must address the utility of markup.
119
-
120
- ## Layouts
121
-
122
- ### Grid System
123
- - [ ] Laying out JUX files in a rational way.
124
- > Develop a higher-level layout javascript grammar for building layouts and palettes of style using *ZERO markup*.
125
25
 
126
- - [ ] A Partial View Strategy
127
- >>> As a dev I may need to load partial pages/components into other pages. This should avoid noisy wrappers and ideally be just javascript imports of jux objects.
26
+ ## Features
128
27
 
129
- ### Components
28
+ - 🎨 **No markup** - Build UIs with pure JavaScript
29
+ - ⚡ **Reactive** - Built-in state management with automatic DOM updates
30
+ - 🧩 **Component-based** - Reusable, composable UI components
31
+ - 🔥 **Hot reload** - Instant feedback during development
32
+ - 📦 **Zero config** - Works out of the box
33
+ - 🎯 **Type-safe** - Full TypeScript support
130
34
 
131
- We have constructed the most helpful components for building 99% of core business/saas web applications, that present beautifully on the page and are created purely with javascript.
132
- > https://www.shadcn-vue.com/docs/components
133
- > Run time slots.. Example, `table.slot(columnName -> object);`
134
-
135
- # Backend
136
-
137
- ### Routing & Views
138
- - [X] Subviews architecture
139
- - [X] Nested routing support
140
- - [X] View composition
141
- - [X] Layout system
142
- - [X] User views
143
- - [X] `profile.jux` - User
144
-
145
- ### Server Docs/Documentation.
146
-
147
- - [ ] Should *jux* ship with a server at all? Or merely for demos.
148
-
149
- > What is the server even doing? Is it merely a matter of understanding that JUX builder/compilation gives you a mirror of how you setup your project. It can be as flat or deep as you would like.
150
-
151
- > *At this point*, we are speaking almost 100% towards UI interfaces.
152
- > Servers should be 'loosely coupled.'. This allows for a standard.
153
- >>> In the future, we could introduce an *auto api* feature, similar to *next.js* api heuristic for folders and files.
154
- ---
155
-
156
-
157
- [ **@jesseallenrxtrail -> Discuss.** ]
158
-
159
- ### Chore: Commit to building more in package directory.
160
-
161
- > We can experiment with our example project, using a simple `express` server, running. What third-party integration do we need?
162
- - [ ] Chore: Cleanup our `machinery/server.js` to separate concerns and build our actual endpoints we need to build software here.
163
-
164
- #### Alternative Chore: package this for `npmjs.org`, combine with our existing project, re-author frontend in *jux*.
165
-
166
- - [ ] Alternative Chore: package this for `npmjs.org` and ship it.
167
- - [ ] Start a brand new project.
168
- - [ ] Build the server aspect in `flask` (already done).
169
- - [ ] Author the frontend in **jux** instead of **vue**.
170
-
171
- > This may require us to move our 'complilation error module', `lib/components/error-handler.ts` to the front-end for display without a 'server call' at all?
172
- - [ ] Chore for this? This takes more analysis, discussion.
173
-
174
- > How and what will we wire for backend and what **jux** components will we support for working with backends.
175
- - [ X ] SQL Database (query component)
176
- - [ ] Chore: This is currently supported. Needs revisiting and testing
177
- > API's
178
- - [ ] Base payload creater and consumer as a **jux** component. *jux.api*??
179
-
180
- ---
181
-
182
- # Jux Configs
183
-
184
- > Jux configs.. `jux.config.js` what should this entail?
185
- Currently it looks like this:
186
- - [ ] Chore: **WHAT IS ACTUALLY BEING USED AND WHERE?**
35
+ ## 📖 Example
187
36
 
188
37
  ```javascript
189
- export default {
190
- projectRoot: __dirname,
191
- distDir: path.join(__dirname, 'dist'),
192
- build: {
193
- minify: false
194
- },
195
-
196
- database: {
197
- // Default connection
198
- default: 'sqlite',
199
-
200
- // Named connections
201
- connections: {
202
- sqlite: {
203
- driver: 'sqlite',
204
- database: path.join(__dirname, 'db', 'jux.db')
205
- },
206
- ... // props to feed drivers for mysql/postgres
207
- }
208
- },
209
-
210
- server: {
211
- port: process.env.PORT || 3000,
212
- host: process.env.HOST || 'localhost'
213
- },
214
-
215
- };
216
- ```
217
- **As a user, I will want to control where JUX sends queries.**
218
- **As a user, I may want to specify a default proxy for backend. I may also want to specify, explicitly, URL's to hit other service endpoints**
219
- - [ ] Escape hatch (backend API proxy vs default)
220
- - [ ] As a user, I may want to run my own server for backend requests/proxies.
221
- - [ ] As a user, I may want to hit multiple endpoints in the same JUX file.
222
-
223
- ---
38
+ import { jux, state } from 'juxscript';
224
39
 
225
- # CORE
40
+ // Create reactive state
41
+ const count = state(0);
226
42
 
227
- ### STATIC SERVING (your local file system, s3 bucket static sites, any host that allows serving etc...)
228
- **Should JUX function, as a 100% client side app (STATIC WEBSITES)**
229
- - [ ] Chore: Discovery... I think the answer is yes. I think what might be missing is bundling.
230
- ![alt text](local.png)
43
+ // Build UI with fluent API
44
+ jux.button('increment')
45
+ .label('Click me!')
46
+ .bind('click', () => count.value++)
47
+ .render('#app');
231
48
 
232
- ---
233
- ## REACTIVITY LAYER.
234
- ### Goal for Reactivity
235
- > We are shooting for better than nasty amounts of javascript, not as sophisticated as vue/react.
236
-
237
- > As a user, I want changes in state of my objects to be consumable by other objects on the page so they can paint changes and interface with each other seamlessly.
238
- - [ ] Build a basic `v-model` strategy in pure javascript. Different than jquery, javascript etc.
239
- - [ ] Build standard eventing systems, listeners and emitters on components where they make sense.
240
- `
241
- # ROADMAP
49
+ jux.paragraph('counter')
50
+ .sync('text', count, val => `Count: ${val}`)
51
+ .render('#app');
52
+ ```
242
53
 
243
- ### KEY UI PAGES
244
- - [ ] JWT Authentication (`authJWT`) (demo `examples` only)
245
- - [ ] Token generation (demo `examples` only)
246
- - [ ] Token validation middleware (demo `examples` only)
247
- - [ ] Refresh token logic (demo `examples` only)
248
- - [ ] *Login system PAGES! Ships with `vendor` assets like lib files/layouts etc.*
249
- - [ ] Login
250
- - [ ] Logout
251
- - [ ] Profile
54
+ ## 📚 Documentation
252
55
 
56
+ - [Getting Started](https://juxscript.com/docs) _(coming soon)_
57
+ - [API Reference](https://juxscript.com/api) _(coming soon)_
58
+ - [Examples](https://github.com/juxscript/examples)
253
59
 
254
- ### Additional Features
255
- - [ ] API documentation
256
- - [ ] Testing setup
60
+ ## 🛠️ CLI Commands
257
61
 
62
+ ```bash
63
+ npx jux create <name> # Create new project
64
+ npx jux init # Initialize in existing directory
65
+ npx jux build # Build for production
66
+ npx jux serve # Start dev server with hot reload
67
+ ```
258
68
 
69
+ ## 🤝 Contributing
259
70
 
71
+ We welcome contributions! Please see [CONTRIBUTING.md](https://github.com/jux/juxscript/blob/main/CONTRIBUTING.md) for details.
260
72
 
73
+ ## 📄 License
261
74
 
262
- ### LAYOUT NOTES...
263
- ### Jux Standard Layout Regions
75
+ MIT © [Your Name]
264
76
 
265
- - [ ] CHORE : REVISIT! I think maybe we ship with our figma, notion, default etc. But then document how to build and reuse a .jux page as a layout using the `jux.layout` class.
77
+ ## Support
266
78
 
267
- ### Start with a layout page
79
+ If you find JUX useful, please star us on [GitHub](https://github.com/jux/juxscript)!
268
80
 
269
- You can build a simple one, or copy and use one of the Jux presets.
81
+ ---
270
82
 
271
- `npx jux preset notion|default|figma|slack|other`
83
+ **Need help?** Join our [Discord](https://discord.gg/juxscript) _(placeholder)_ or open an [issue](https://github.com/jux/juxscript/issues).
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "juxscript",
3
- "version": "1.0.45",
3
+ "version": "1.0.46",
4
+ "description": "Build reactive UIs with pure JavaScript - no markup needed. Say goodbye to </</>>>",
4
5
  "type": "module",
5
- "description": "A JavaScript UX authorship platform",
6
6
  "main": "lib/jux.js",
7
7
  "types": "lib/jux.d.ts",
8
8
  "access": "public",
@@ -39,29 +39,20 @@
39
39
  "jux": "./bin/cli.js"
40
40
  },
41
41
  "keywords": [
42
- "ui",
43
- "ux",
44
- "components",
45
- "framework",
42
+ "jux",
43
+ "ui-framework",
46
44
  "reactive",
47
- "javascript"
45
+ "components",
46
+ "no-markup",
47
+ "fluent-api",
48
+ "state-management",
49
+ "hot-reload",
50
+ "typescript"
48
51
  ],
49
- "scripts": {
50
- "build": "tsc",
51
- "dev": "tsc --watch",
52
- "prepublishOnly": "npm run build"
53
- },
54
- "dependencies": {
55
- "chokidar": "^3.5.3",
56
- "esbuild": "^0.19.0",
57
- "express": "^4.18.2",
58
- "glob": "^13.0.0",
59
- "ws": "^8.13.0"
52
+ "homepage": "https://juxscript.com",
53
+ "bugs": {
54
+ "url": "https://github.com/jux/juxscript/issues"
60
55
  },
61
- "devDependencies": {
62
- "@types/express": "^4.17.17",
63
- "@types/node": "^20.0.0",
64
- "@types/ws": "^8.5.5",
65
- "typescript": "^5.0.0"
66
- }
56
+ "author": "Your Name <your.email@example.com>",
57
+ "license": "MIT"
67
58
  }