rip-lang 3.12.0 → 3.12.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 CHANGED
@@ -9,7 +9,7 @@
9
9
  </p>
10
10
 
11
11
  <p align="center">
12
- <a href="CHANGELOG.md"><img src="https://img.shields.io/badge/version-3.12.0-blue.svg" alt="Version"></a>
12
+ <a href="CHANGELOG.md"><img src="https://img.shields.io/badge/version-3.12.1-blue.svg" alt="Version"></a>
13
13
  <a href="#zero-dependencies"><img src="https://img.shields.io/badge/dependencies-ZERO-brightgreen.svg" alt="Dependencies"></a>
14
14
  <a href="#"><img src="https://img.shields.io/badge/tests-1%2C243%2F1%2C243-brightgreen.svg" alt="Tests"></a>
15
15
  <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green.svg" alt="License"></a>
@@ -280,7 +280,7 @@ export Home = component
280
280
 
281
281
  That's it. The runtime auto-detects inline `data-name` components, compiles them, and launches the app with hash routing — no bootstrap script needed. Two keywords (`component` and `render`) are all the language adds. Everything else (`:=` state, `~=` computed, methods, lifecycle) is standard Rip.
282
282
 
283
- See [@rip-lang/ui](packages/ui/) for the full framework: file-based router, reactive stash, component store, and renderer. **[Try the demo](https://shreeve.github.io/rip-lang/demo.html)** — a complete app in one HTML file.
283
+ The UI framework is built into rip-lang: file-based router, reactive stash, component store, and renderer. **[Try the demo](https://shreeve.github.io/rip-lang/demo.html)** — a complete app in one HTML file.
284
284
 
285
285
  ---
286
286
 
@@ -361,7 +361,7 @@ Rip includes optional packages for full-stack development:
361
361
  | [@rip-lang/api](packages/api/) | 1.1.10 | HTTP framework (Sinatra-style routing, 37 validators) |
362
362
  | [@rip-lang/server](packages/server/) | 1.1.19 | Multi-worker app server (hot reload, HTTPS, mDNS) |
363
363
  | [@rip-lang/db](packages/db/) | 1.2.0 | DuckDB server with official UI + ActiveRecord-style client |
364
- | [@rip-lang/ui](packages/ui/) | 0.3.19 | Zero-build reactive web framework (auto-launch, stash, router) |
364
+ | [@rip-lang/grid](packages/grid/) | 0.2.0 | Reactive data grid |
365
365
  | [@rip-lang/swarm](packages/swarm/) | 1.1.4 | Parallel job runner with worker pool |
366
366
  | [@rip-lang/csv](packages/csv/) | 1.1.4 | CSV parser + writer |
367
367
  | [@rip-lang/schema](packages/schema/) | 0.2.1 | Unified schema → TypeScript types, SQL DDL, validation, ORM |
package/docs/RIP-LANG.md CHANGED
@@ -1212,7 +1212,7 @@ Rip includes optional packages for full-stack development. All are written in Ri
1212
1212
  ```bash
1213
1213
  bun add @rip-lang/api # Web framework
1214
1214
  bun add @rip-lang/server # Production server
1215
- bun add @rip-lang/ui # Reactive web UI
1215
+ bun add @rip-lang/grid # Reactive data grid
1216
1216
  bun add @rip-lang/db # DuckDB server + client
1217
1217
  bun add @rip-lang/schema # ORM + validation
1218
1218
  bun add @rip-lang/swarm # Parallel job runner
@@ -1287,17 +1287,17 @@ rip-server myapp # Named (accessible at myapp.local)
1287
1287
  rip-server http:3000 # HTTP on specific port
1288
1288
  ```
1289
1289
 
1290
- ## @rip-lang/ui — Reactive Web Framework
1290
+ ## Rip UI — Reactive Web Framework (built into rip-lang)
1291
1291
 
1292
1292
  Zero-build reactive framework. Ships the compiler to the browser and compiles `.rip` components on demand. File-based routing, unified reactive stash, and SSE hot reload.
1293
1293
 
1294
1294
  ```coffee
1295
1295
  # Server setup (index.rip)
1296
1296
  import { get, use, start, notFound } from '@rip-lang/api'
1297
- import { ripUI } from '@rip-lang/ui/serve'
1297
+ import { ripApp } from '@rip-lang/api/app'
1298
1298
 
1299
1299
  dir = import.meta.dir
1300
- use ripUI dir: dir, components: 'routes', includes: ['ui'], watch: true
1300
+ use ripApp dir: dir, components: 'routes', includes: ['ui'], watch: true
1301
1301
  get '/css/*' -> @send "#{dir}/css/#{@req.path.slice(5)}"
1302
1302
  notFound -> @send "#{dir}/index.html", 'text/html; charset=UTF-8'
1303
1303
  start port: 3000
@@ -515,7 +515,7 @@ if (typeof globalThis !== 'undefined') {
515
515
  `:"",$=U.slice(0,u).join(`
516
516
  `)}let Y=new p().tokenize($);if(this.options.showTokens)Y.forEach((Q)=>console.log(`${Q[0].padEnd(12)} ${JSON.stringify(Q[1])}`)),console.log();let F=null,_=null;if(this.options.types==="emit"||this.options.types==="check"||this.options.types===!0)_=[...Y];Y=Y.filter((Q)=>Q[0]!=="TYPE_DECL");while(Y.length>0&&Y[0][0]==="TERMINATOR")Y.shift();if(Y.every((Q)=>Q[0]==="TERMINATOR")){if(_)F=T1(_,["program"]);return{tokens:Y,sexpr:["program"],code:"",dts:F,data:A,reactiveVars:{}}}a.lexer={tokens:Y,pos:0,setInput:function(){},lex:function(){if(this.pos>=this.tokens.length)return 1;let Q=this.tokens[this.pos++],D=Q[1];if(Q.data)D=new String(D),Object.assign(D,Q.data);return this.text=D,this.loc=Q.loc,Q[0]}};let X;try{X=a.parse($)}catch(Q){if(/\?\s*\([^)]*\?[^)]*:[^)]*\)\s*:/.test($)||/\?\s+\w+\s+\?\s+/.test($))throw Error("Nested ternary operators are not supported. Use if/else statements instead.");throw Q}if(this.options.showSExpr)console.log(x(X,0,!0)),console.log();let R=null;if(this.options.sourceMap){let Q=(this.options.filename||"output")+".js",D=this.options.filename||"input.rip";R=new j1(Q,D,$)}let H=new y({dataSection:A,skipPreamble:this.options.skipPreamble,reactiveVars:this.options.reactiveVars,sourceMap:R}),w=H.compile(X),Z=R?R.toJSON():null,K=R?R.toReverseMap():null;if(Z&&this.options.sourceMap==="inline"){let Q=typeof Buffer<"u"?Buffer.from(Z).toString("base64"):btoa(Z);w+=`
517
517
  //# sourceMappingURL=data:application/json;base64,${Q}`}else if(Z&&this.options.filename)w+=`
518
- //# sourceMappingURL=${this.options.filename}.js.map`;if(_)F=T1(_,X);return{tokens:Y,sexpr:X,code:w,dts:F,map:Z,reverseMap:K,data:A,reactiveVars:H.reactiveVars}}compileToJS($){return this.compile($).code}compileToSExpr($){return this.compile($).sexpr}}X2(y,p);y.prototype.generateEnum=a1;function h1($,W={}){return new M1(W).compile($)}function d($,W={}){return new M1(W).compileToJS($)}function w1(){return new y({}).getReactiveRuntime()}function C1(){return new y({}).getComponentRuntime()}var T3="3.12.0",S3="2026-02-21@23:49:57GMT";if(typeof globalThis<"u"&&!globalThis.__rip)Function(w1())();var L3=($)=>{let W=$.match(/^[ \t]*(?=\S)/gm),A=Math.min(...(W||[]).map((U)=>U.length));return $.replace(RegExp(`^[ ]{${A}}`,"gm"),"").trim()};async function V3(){let $=document.querySelectorAll('script[type="text/rip"]');for(let W of $){if(W.hasAttribute("data-rip-processed"))continue;if(W.hasAttribute("data-name"))continue;try{let A;if(W.src){let u=await fetch(W.src);if(!u.ok){console.error(`Rip: failed to fetch ${W.src} (${u.status})`);continue}A=await u.text()}else A=L3(W.textContent);let U;try{U=d(A)}catch(u){console.error("Rip compile error:",u.message),console.error("Source:",A);continue}await(0,eval)(`(async()=>{
518
+ //# sourceMappingURL=${this.options.filename}.js.map`;if(_)F=T1(_,X);return{tokens:Y,sexpr:X,code:w,dts:F,map:Z,reverseMap:K,data:A,reactiveVars:H.reactiveVars}}compileToJS($){return this.compile($).code}compileToSExpr($){return this.compile($).sexpr}}X2(y,p);y.prototype.generateEnum=a1;function h1($,W={}){return new M1(W).compile($)}function d($,W={}){return new M1(W).compileToJS($)}function w1(){return new y({}).getReactiveRuntime()}function C1(){return new y({}).getComponentRuntime()}var T3="3.12.1",S3="2026-02-22@00:08:28GMT";if(typeof globalThis<"u"&&!globalThis.__rip)Function(w1())();var L3=($)=>{let W=$.match(/^[ \t]*(?=\S)/gm),A=Math.min(...(W||[]).map((U)=>U.length));return $.replace(RegExp(`^[ ]{${A}}`,"gm"),"").trim()};async function V3(){let $=document.querySelectorAll('script[type="text/rip"]');for(let W of $){if(W.hasAttribute("data-rip-processed"))continue;if(W.hasAttribute("data-name"))continue;try{let A;if(W.src){let u=await fetch(W.src);if(!u.ok){console.error(`Rip: failed to fetch ${W.src} (${u.status})`);continue}A=await u.text()}else A=L3(W.textContent);let U;try{U=d(A)}catch(u){console.error("Rip compile error:",u.message),console.error("Source:",A);continue}await(0,eval)(`(async()=>{
519
519
  ${U}
520
520
  })()`),W.setAttribute("data-rip-processed","true")}catch(A){console.error("Rip runtime error:",A)}}}async function t($){for(let[Y,F]of Object.entries(t.modules))if($.includes(Y))return F;let W=await fetch($).then((Y)=>{if(!Y.ok)throw Error(`importRip: ${$} (${Y.status})`);return Y.text()}),A=d(W),U=`// ${$}
521
521
  `,u=new Blob([U+A],{type:"application/javascript"});return await import(URL.createObjectURL(u))}t.modules={};function j3($){try{let W=$.replace(/^/gm," "),U=d(`do ->
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rip-lang",
3
- "version": "3.12.0",
3
+ "version": "3.12.1",
4
4
  "description": "A modern language that compiles to JavaScript",
5
5
  "type": "module",
6
6
  "main": "src/compiler.js",