@rip-lang/ui 0.3.12 → 0.3.14
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 +66 -0
- package/dist/rip-ui.min.js +3 -3
- package/dist/rip-ui.min.js.br +0 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -45,6 +45,72 @@ export Home = component
|
|
|
45
45
|
|
|
46
46
|
Run `bun index.rip`, open `http://localhost:3000`.
|
|
47
47
|
|
|
48
|
+
## The Two Keywords
|
|
49
|
+
|
|
50
|
+
Rip UI adds two keywords to the language: `component` and `render`. Each
|
|
51
|
+
serves a distinct role, and together they form a complete reactive UI model.
|
|
52
|
+
|
|
53
|
+
### `component` — the model
|
|
54
|
+
|
|
55
|
+
Raw Rip Lang has no concept of a self-contained, reusable UI unit. The
|
|
56
|
+
`component` keyword adds everything needed to manage interactive state:
|
|
57
|
+
|
|
58
|
+
- **Reactive state** (`:=`) — assignments create signals that trigger
|
|
59
|
+
updates automatically. `count := 0` is not a plain variable; changing
|
|
60
|
+
it updates the DOM.
|
|
61
|
+
- **Computed values** (`~=`) — derived values that recalculate when their
|
|
62
|
+
dependencies change. `remaining ~= todos.filter((t) -> not t.done).length`
|
|
63
|
+
- **Effects** (`~>`) — side effects that run whenever reactive dependencies
|
|
64
|
+
change. `~> @app.data.count = count`
|
|
65
|
+
- **Props** (`@` prefix, `=!` for readonly) — a public API for parent
|
|
66
|
+
components to pass data in, with signal passthrough for shared reactivity.
|
|
67
|
+
- **Lifecycle hooks** — `beforeMount`, `mounted`, `updated`, `beforeUnmount`,
|
|
68
|
+
`unmounted` for running code at specific points in a component's life.
|
|
69
|
+
- **Context API** — `setContext` and `getContext` for ancestor-to-descendant
|
|
70
|
+
data sharing without prop drilling.
|
|
71
|
+
- **Mount/unmount mechanics** — attaching to the DOM, cascading teardown
|
|
72
|
+
to children, and keep-alive caching across navigation.
|
|
73
|
+
- **Encapsulation** — each component is a class with its own scope, state,
|
|
74
|
+
and methods. No global variable collisions, no leaking internals.
|
|
75
|
+
|
|
76
|
+
A component without a render block can still hold state, run effects, and
|
|
77
|
+
participate in the component tree — it just has no visual output.
|
|
78
|
+
|
|
79
|
+
### `render` — the view
|
|
80
|
+
|
|
81
|
+
The `render` keyword provides a declarative template DSL for describing DOM
|
|
82
|
+
structure. It has its own lexer pass and syntax rules distinct from regular
|
|
83
|
+
Rip code:
|
|
84
|
+
|
|
85
|
+
- **Element creation** — tag names become DOM nodes: `div`, `h1`, `button`
|
|
86
|
+
- **CSS-selector shortcuts** — `div.card.active`, `#main`, `.card` (implicit `div`)
|
|
87
|
+
- **Dynamic classes** — `div.('card', active && 'active')` with CLSX semantics
|
|
88
|
+
- **Event handlers** — `@click: handler` compiles to `addEventListener`
|
|
89
|
+
- **Two-way binding** — `value <=> username` wires reactive read and write
|
|
90
|
+
- **Conditionals and loops** — `if`/`else` and `for item in items` with
|
|
91
|
+
anchor-based DOM insertion and keyed reconciliation
|
|
92
|
+
- **Children/slots** — `@children` receives child nodes, `#content` marks
|
|
93
|
+
layout insertion points
|
|
94
|
+
- **Component instantiation** — PascalCase names like `Card title: "Hello"`
|
|
95
|
+
resolve to components automatically, no imports needed
|
|
96
|
+
|
|
97
|
+
Render compiles to two methods: `_create()` builds the DOM tree once, and
|
|
98
|
+
`_setup()` wires reactive effects for fine-grained updates. There is no
|
|
99
|
+
virtual DOM — each reactive binding creates a direct DOM effect that updates
|
|
100
|
+
the specific text node or attribute that depends on it.
|
|
101
|
+
|
|
102
|
+
A render block can only exist inside a component. It needs the component's
|
|
103
|
+
signals, computed values, and lifecycle to have something to render and
|
|
104
|
+
react to.
|
|
105
|
+
|
|
106
|
+
### Together
|
|
107
|
+
|
|
108
|
+
`component` provides the **model** — state, reactivity, lifecycle, identity.
|
|
109
|
+
`render` provides the **view** — a concise way to describe what the DOM
|
|
110
|
+
should look like and how it stays in sync with that state. One defines
|
|
111
|
+
behavior, the other defines structure. Neither is useful without the other
|
|
112
|
+
in practice, but they are separate concerns with separate syntax.
|
|
113
|
+
|
|
48
114
|
## Component Composition
|
|
49
115
|
|
|
50
116
|
Page components in `pages/` map to routes via file-based routing. Shared
|
package/dist/rip-ui.min.js
CHANGED
|
@@ -18,11 +18,11 @@ Expecting ${f.join(", ")}, got '${this.tokenNames[E]||E}'`;else return`Parse err
|
|
|
18
18
|
${E}return ${q.join(`
|
|
19
19
|
`)};
|
|
20
20
|
})()`;return q.join(`
|
|
21
|
-
`)},W.generateInComponent=function(A,u){if(typeof A==="string"&&this.reactiveMembers&&this.reactiveMembers.has(A))return`this.${A}.value`;if(typeof A==="string"&&this.componentMembers&&this.componentMembers.has(A))return`this.${A}`;if(Array.isArray(A)&&this.reactiveMembers){let f=this.transformComponentMembers(A);return this.generate(f,u)}return this.generate(A,u)},W.generateRender=function(A,u,f,Y){throw Error("render blocks can only be used inside a component")},W.buildRender=function(A){this._elementCount=0,this._textCount=0,this._blockCount=0,this._createLines=[],this._setupLines=[],this._blockFactories=[];let u=this.is(A,"block")?A.slice(1):[A],f;if(u.length===0)f="null";else if(u.length===1)f=this.generateNode(u[0]);else{f=this.newElementVar("frag"),this._createLines.push(`${f} = document.createDocumentFragment();`);for(let Y of u){let _=this.generateNode(Y);this._createLines.push(`${f}.appendChild(${_});`)}}return{createLines:this._createLines,setupLines:this._setupLines,blockFactories:this._blockFactories,rootVar:f}},W.newBlockVar=function(){return`create_block_${this._blockCount++}`},W.newElementVar=function(A="el"){return`this._${A}${this._elementCount++}`},W.newTextVar=function(){return`this._t${this._textCount++}`},W.generateNode=function(A){if(typeof A==="string"||A instanceof String){let J=A.valueOf();if(J.startsWith('"')||J.startsWith("'")||J.startsWith("`")){let Z=this.newTextVar();return this._createLines.push(`${Z} = document.createTextNode(${J});`),Z}if(this.reactiveMembers&&this.reactiveMembers.has(J)){let Z=this.newTextVar();return this._createLines.push(`${Z} = document.createTextNode('');`),this._setupLines.push(`__effect(() => { ${Z}.data = this.${J}.value; });`),Z}let[R,Q]=J.split("#"),X=this.newElementVar();if(this._createLines.push(`${X} = document.createElement('${R||"div"}');`),Q)this._createLines.push(`${X}.id = '${Q}';`);return X}if(!Array.isArray(A)){let J=this.newElementVar("c");return this._createLines.push(`${J} = document.createComment('unknown');`),J}let[u,...f]=A,Y=typeof u==="string"?u:u instanceof String?u.valueOf():null;if(Y&&this.isComponent(Y))return this.generateChildComponent(Y,f);if(Y&&this.isHtmlTag(Y)){let[J,R]=Y.split("#");return this.generateTag(J||"div",[],f,R)}if(Y==="."){let[,J,R]=A;if(J==="this"&&typeof R==="string"){if(this.reactiveMembers&&this.reactiveMembers.has(R)){let w=this.newTextVar();return this._createLines.push(`${w} = document.createTextNode('');`),this._setupLines.push(`__effect(() => { ${w}.data = this.${R}.value; });`),w}let z=this.newElementVar("slot");return this._createLines.push(`${z} = this.${R} instanceof Node ? this.${R} : (this.${R} != null ? document.createTextNode(String(this.${R})) : document.createComment(''));`),z}let{tag:Q,classes:X,id:Z}=this.collectTemplateClasses(A);if(Q&&this.isHtmlTag(Q))return this.generateTag(Q,X,[],Z);let K=this.newTextVar(),D=this.generateInComponent(A,"value");return this._createLines.push(`${K} = document.createTextNode(String(${D}));`),K}if(Array.isArray(u)){if(Array.isArray(u[0])&&u[0][0]==="."&&(u[0][2]==="__clsx"||u[0][2]instanceof String&&u[0][2].valueOf()==="__clsx")){let X=typeof u[0][1]==="string"?u[0][1]:u[0][1].valueOf(),Z=u.slice(1);return this.generateDynamicTag(X,Z,f)}let{tag:J,classes:R,id:Q}=this.collectTemplateClasses(u);if(J&&this.isHtmlTag(J)){if(R.length===1&&R[0]==="__clsx")return this.generateDynamicTag(J,f,[]);return this.generateTag(J,R,f,Q)}}if(Y==="->"||Y==="=>")return this.generateTemplateBlock(f[1]);if(Y==="if")return this.generateConditional(A);if(Y==="for"||Y==="for-in"||Y==="for-of"||Y==="for-as")return this.generateTemplateLoop(A);let _=this.newTextVar(),F=this.generateInComponent(A,"value");if(this.hasReactiveDeps(A))this._createLines.push(`${_} = document.createTextNode('');`),this._setupLines.push(`__effect(() => { ${_}.data = ${F}; });`);else this._createLines.push(`${_} = document.createTextNode(String(${F}));`);return _},W.appendChildren=function(A,u){for(let f of u)if(this.is(f,"->")||this.is(f,"=>")){let Y=f[2];if(this.is(Y,"block"))for(let _ of Y.slice(1))if(this.is(_,"object"))this.generateAttributes(A,_);else{let F=this.generateNode(_);this._createLines.push(`${A}.appendChild(${F});`)}else if(Y){let _=this.generateNode(Y);this._createLines.push(`${A}.appendChild(${_});`)}}else if(this.is(f,"object"))this.generateAttributes(A,f);else if(typeof f==="string"||f instanceof String){let Y=this.newTextVar(),_=f.valueOf();if(_.startsWith('"')||_.startsWith("'")||_.startsWith("`"))this._createLines.push(`${Y} = document.createTextNode(${_});`);else if(this.reactiveMembers&&this.reactiveMembers.has(_))this._createLines.push(`${Y} = document.createTextNode('');`),this._setupLines.push(`__effect(() => { ${Y}.data = this.${_}.value; });`);else if(this.componentMembers&&this.componentMembers.has(_))this._createLines.push(`${Y} = document.createTextNode(String(this.${_}));`);else this._createLines.push(`${Y} = document.createTextNode(${this.generateInComponent(f,"value")});`);this._createLines.push(`${A}.appendChild(${Y});`)}else if(f){let Y=this.generateNode(f);this._createLines.push(`${A}.appendChild(${Y});`)}},W.generateTag=function(A,u,f,Y){let _=this.newElementVar();if(this._createLines.push(`${_} = document.createElement('${A}');`),Y)this._createLines.push(`${_}.id = '${Y}';`);if(u.length>0)this._createLines.push(`${_}.className = '${u.join(" ")}';`);return this.appendChildren(_,f),_},W.generateDynamicTag=function(A,u,f){let Y=this.newElementVar();this._createLines.push(`${Y} = document.createElement('${A}');`);let _=u.map((R)=>this.generateInComponent(R,"value")),F=this._pendingClassArgs,J=this._pendingClassEl;if(this._pendingClassArgs=_,this._pendingClassEl=Y,this.appendChildren(Y,f),this._pendingClassArgs.length>0){let R=this._pendingClassArgs.join(", ");this._setupLines.push(`__effect(() => { ${Y}.className = __clsx(${R}); });`)}return this._pendingClassArgs=F,this._pendingClassEl=J,Y},W.generateAttributes=function(A,u){let f=T3(u.slice(1));for(let Y=1;Y<u.length;Y++){let[_,F]=u[Y];if(this.is(_,".")&&_[1]==="this"){let J=_[2];if(typeof F==="string"&&this.componentMembers?.has(F))this._createLines.push(`${A}.addEventListener('${J}', (e) => __batch(() => this.${F}(e)));`);else{let R=this.generateInComponent(F,"value");this._createLines.push(`${A}.addEventListener('${J}', (e) => __batch(() => (${R})(e)));`)}continue}if(typeof _==="string"){if(_.startsWith('"')&&_.endsWith('"'))_=_.slice(1,-1);if(_==="class"||_==="className"){let R=this.generateInComponent(F,"value");if(this._pendingClassArgs&&this._pendingClassEl===A)this._pendingClassArgs.push(R);else if(this.hasReactiveDeps(F))this._setupLines.push(`__effect(() => { ${A}.className = __clsx(${R}); });`);else this._createLines.push(`${A}.className = ${R};`);continue}if(_==="ref"){let R=String(F).replace(/^["']|["']$/g,"");this._createLines.push(`this.${R} = ${A};`);continue}if(_.startsWith(R2)&&_.endsWith(Z2)){let R=_.slice(R2.length,-Z2.length),Q=this.generateInComponent(F,"value"),X,Z;if(R==="checked")X="change",Z="e.target.checked";else X="input",Z=f==="number"||f==="range"?"e.target.valueAsNumber":"e.target.value";this._setupLines.push(`__effect(() => { ${A}.${R} = ${Q}; });`),this._createLines.push(`${A}.addEventListener('${X}', (e) => ${Q} = ${Z});`);continue}let J=this.generateInComponent(F,"value");if((_==="value"||_==="checked")&&this.hasReactiveDeps(F)){this._setupLines.push(`__effect(() => { ${A}.${_} = ${J}; });`)
|
|
21
|
+
`)},W.generateInComponent=function(A,u){if(typeof A==="string"&&this.reactiveMembers&&this.reactiveMembers.has(A))return`this.${A}.value`;if(typeof A==="string"&&this.componentMembers&&this.componentMembers.has(A))return`this.${A}`;if(Array.isArray(A)&&this.reactiveMembers){let f=this.transformComponentMembers(A);return this.generate(f,u)}return this.generate(A,u)},W.generateRender=function(A,u,f,Y){throw Error("render blocks can only be used inside a component")},W.buildRender=function(A){this._elementCount=0,this._textCount=0,this._blockCount=0,this._createLines=[],this._setupLines=[],this._blockFactories=[];let u=this.is(A,"block")?A.slice(1):[A],f;if(u.length===0)f="null";else if(u.length===1)f=this.generateNode(u[0]);else{f=this.newElementVar("frag"),this._createLines.push(`${f} = document.createDocumentFragment();`);for(let Y of u){let _=this.generateNode(Y);this._createLines.push(`${f}.appendChild(${_});`)}}return{createLines:this._createLines,setupLines:this._setupLines,blockFactories:this._blockFactories,rootVar:f}},W.newBlockVar=function(){return`create_block_${this._blockCount++}`},W.newElementVar=function(A="el"){return`this._${A}${this._elementCount++}`},W.newTextVar=function(){return`this._t${this._textCount++}`},W.generateNode=function(A){if(typeof A==="string"||A instanceof String){let J=A.valueOf();if(J.startsWith('"')||J.startsWith("'")||J.startsWith("`")){let Z=this.newTextVar();return this._createLines.push(`${Z} = document.createTextNode(${J});`),Z}if(this.reactiveMembers&&this.reactiveMembers.has(J)){let Z=this.newTextVar();return this._createLines.push(`${Z} = document.createTextNode('');`),this._setupLines.push(`__effect(() => { ${Z}.data = this.${J}.value; });`),Z}let[R,Q]=J.split("#"),X=this.newElementVar();if(this._createLines.push(`${X} = document.createElement('${R||"div"}');`),Q)this._createLines.push(`${X}.id = '${Q}';`);return X}if(!Array.isArray(A)){let J=this.newElementVar("c");return this._createLines.push(`${J} = document.createComment('unknown');`),J}let[u,...f]=A,Y=typeof u==="string"?u:u instanceof String?u.valueOf():null;if(Y&&this.isComponent(Y))return this.generateChildComponent(Y,f);if(Y&&this.isHtmlTag(Y)){let[J,R]=Y.split("#");return this.generateTag(J||"div",[],f,R)}if(Y==="."){let[,J,R]=A;if(J==="this"&&typeof R==="string"){if(this.reactiveMembers&&this.reactiveMembers.has(R)){let w=this.newTextVar();return this._createLines.push(`${w} = document.createTextNode('');`),this._setupLines.push(`__effect(() => { ${w}.data = this.${R}.value; });`),w}let z=this.newElementVar("slot");return this._createLines.push(`${z} = this.${R} instanceof Node ? this.${R} : (this.${R} != null ? document.createTextNode(String(this.${R})) : document.createComment(''));`),z}let{tag:Q,classes:X,id:Z}=this.collectTemplateClasses(A);if(Q&&this.isHtmlTag(Q))return this.generateTag(Q,X,[],Z);let K=this.newTextVar(),D=this.generateInComponent(A,"value");return this._createLines.push(`${K} = document.createTextNode(String(${D}));`),K}if(Array.isArray(u)){if(Array.isArray(u[0])&&u[0][0]==="."&&(u[0][2]==="__clsx"||u[0][2]instanceof String&&u[0][2].valueOf()==="__clsx")){let X=typeof u[0][1]==="string"?u[0][1]:u[0][1].valueOf(),Z=u.slice(1);return this.generateDynamicTag(X,Z,f)}let{tag:J,classes:R,id:Q}=this.collectTemplateClasses(u);if(J&&this.isHtmlTag(J)){if(R.length===1&&R[0]==="__clsx")return this.generateDynamicTag(J,f,[]);return this.generateTag(J,R,f,Q)}}if(Y==="->"||Y==="=>")return this.generateTemplateBlock(f[1]);if(Y==="if")return this.generateConditional(A);if(Y==="for"||Y==="for-in"||Y==="for-of"||Y==="for-as")return this.generateTemplateLoop(A);let _=this.newTextVar(),F=this.generateInComponent(A,"value");if(this.hasReactiveDeps(A))this._createLines.push(`${_} = document.createTextNode('');`),this._setupLines.push(`__effect(() => { ${_}.data = ${F}; });`);else this._createLines.push(`${_} = document.createTextNode(String(${F}));`);return _},W.appendChildren=function(A,u){for(let f of u)if(this.is(f,"->")||this.is(f,"=>")){let Y=f[2];if(this.is(Y,"block"))for(let _ of Y.slice(1))if(this.is(_,"object"))this.generateAttributes(A,_);else{let F=this.generateNode(_);this._createLines.push(`${A}.appendChild(${F});`)}else if(Y){let _=this.generateNode(Y);this._createLines.push(`${A}.appendChild(${_});`)}}else if(this.is(f,"object"))this.generateAttributes(A,f);else if(typeof f==="string"||f instanceof String){let Y=this.newTextVar(),_=f.valueOf();if(_.startsWith('"')||_.startsWith("'")||_.startsWith("`"))this._createLines.push(`${Y} = document.createTextNode(${_});`);else if(this.reactiveMembers&&this.reactiveMembers.has(_))this._createLines.push(`${Y} = document.createTextNode('');`),this._setupLines.push(`__effect(() => { ${Y}.data = this.${_}.value; });`);else if(this.componentMembers&&this.componentMembers.has(_))this._createLines.push(`${Y} = document.createTextNode(String(this.${_}));`);else this._createLines.push(`${Y} = document.createTextNode(${this.generateInComponent(f,"value")});`);this._createLines.push(`${A}.appendChild(${Y});`)}else if(f){let Y=this.generateNode(f);this._createLines.push(`${A}.appendChild(${Y});`)}},W.generateTag=function(A,u,f,Y){let _=this.newElementVar();if(this._createLines.push(`${_} = document.createElement('${A}');`),Y)this._createLines.push(`${_}.id = '${Y}';`);if(u.length>0)this._createLines.push(`${_}.className = '${u.join(" ")}';`);return this.appendChildren(_,f),_},W.generateDynamicTag=function(A,u,f){let Y=this.newElementVar();this._createLines.push(`${Y} = document.createElement('${A}');`);let _=u.map((R)=>this.generateInComponent(R,"value")),F=this._pendingClassArgs,J=this._pendingClassEl;if(this._pendingClassArgs=_,this._pendingClassEl=Y,this.appendChildren(Y,f),this._pendingClassArgs.length>0){let R=this._pendingClassArgs.join(", ");this._setupLines.push(`__effect(() => { ${Y}.className = __clsx(${R}); });`)}return this._pendingClassArgs=F,this._pendingClassEl=J,Y},W.generateAttributes=function(A,u){let f=T3(u.slice(1));for(let Y=1;Y<u.length;Y++){let[_,F]=u[Y];if(this.is(_,".")&&_[1]==="this"){let J=_[2];if(typeof F==="string"&&this.componentMembers?.has(F))this._createLines.push(`${A}.addEventListener('${J}', (e) => __batch(() => this.${F}(e)));`);else{let R=this.generateInComponent(F,"value");this._createLines.push(`${A}.addEventListener('${J}', (e) => __batch(() => (${R})(e)));`)}continue}if(typeof _==="string"){if(_.startsWith('"')&&_.endsWith('"'))_=_.slice(1,-1);if(_==="class"||_==="className"){let R=this.generateInComponent(F,"value");if(this._pendingClassArgs&&this._pendingClassEl===A)this._pendingClassArgs.push(R);else if(this.hasReactiveDeps(F))this._setupLines.push(`__effect(() => { ${A}.className = __clsx(${R}); });`);else this._createLines.push(`${A}.className = ${R};`);continue}if(_==="ref"){let R=String(F).replace(/^["']|["']$/g,"");this._createLines.push(`this.${R} = ${A};`);continue}if(_.startsWith(R2)&&_.endsWith(Z2)){let R=_.slice(R2.length,-Z2.length),Q=this.generateInComponent(F,"value"),X,Z;if(R==="checked")X="change",Z="e.target.checked";else X="input",Z=f==="number"||f==="range"?"e.target.valueAsNumber":"e.target.value";this._setupLines.push(`__effect(() => { ${A}.${R} = ${Q}; });`),this._createLines.push(`${A}.addEventListener('${X}', (e) => ${Q} = ${Z});`);continue}let J=this.generateInComponent(F,"value");if((_==="value"||_==="checked")&&this.hasReactiveDeps(F)){if(this._setupLines.push(`__effect(() => { ${A}.${_} = ${J}; });`),this.isSimpleAssignable(F)){let R=_==="checked"?"change":"input",Q=_==="checked"?"e.target.checked":f==="number"||f==="range"?"e.target.valueAsNumber":"e.target.value";this._createLines.push(`${A}.addEventListener('${R}', (e) => { ${J} = ${Q}; });`)}continue}if(N3.has(_))if(this.hasReactiveDeps(F))this._setupLines.push(`__effect(() => { ${A}.toggleAttribute('${_}', !!${J}); });`);else this._createLines.push(`if (${J}) ${A}.setAttribute('${_}', '');`);else if(this.hasReactiveDeps(F))this._setupLines.push(`__effect(() => { ${A}.setAttribute('${_}', ${J}); });`);else this._createLines.push(`${A}.setAttribute('${_}', ${J});`)}}},W.generateTemplateBlock=function(A){if(!Array.isArray(A)||A[0]!=="block")return this.generateNode(A);let u=A.slice(1);if(u.length===0){let Y=this.newElementVar("empty");return this._createLines.push(`${Y} = document.createComment('');`),Y}if(u.length===1)return this.generateNode(u[0]);let f=this.newElementVar("frag");this._createLines.push(`${f} = document.createDocumentFragment();`);for(let Y of u){let _=this.generateNode(Y);this._createLines.push(`${f}.appendChild(${_});`)}return f},W.generateConditional=function(A){let[,u,f,Y]=A,_=this.newElementVar("anchor");this._createLines.push(`${_} = document.createComment('if');`);let F=this.generateInComponent(u,"value"),J=this.newBlockVar();this.generateConditionBranch(J,f);let R=null;if(Y)R=this.newBlockVar(),this.generateConditionBranch(R,Y);let Q=[];if(Q.push(`// Conditional: ${J}${R?" / "+R:""}`),Q.push("{"),Q.push(` const anchor = ${_};`),Q.push(" let currentBlock = null;"),Q.push(" let showing = null;"),Q.push(" __effect(() => {"),Q.push(` const show = !!(${F});`),Q.push(` const want = show ? 'then' : ${Y?"'else'":"null"};`),Q.push(" if (want === showing) return;"),Q.push(""),Q.push(" if (currentBlock) {"),Q.push(" currentBlock.d(true);"),Q.push(" currentBlock = null;"),Q.push(" }"),Q.push(" showing = want;"),Q.push(""),Q.push(" if (want === 'then') {"),Q.push(` currentBlock = ${J}(this);`),Q.push(" currentBlock.c();"),Q.push(" currentBlock.m(anchor.parentNode, anchor.nextSibling);"),Q.push(" currentBlock.p(this);"),Q.push(" }"),Y)Q.push(" if (want === 'else') {"),Q.push(` currentBlock = ${R}(this);`),Q.push(" currentBlock.c();"),Q.push(" currentBlock.m(anchor.parentNode, anchor.nextSibling);"),Q.push(" currentBlock.p(this);"),Q.push(" }");return Q.push(" });"),Q.push("}"),this._setupLines.push(Q.join(`
|
|
22
22
|
`)),_},W.generateConditionBranch=function(A,u){let f=this._createLines,Y=this._setupLines;this._createLines=[],this._setupLines=[];let _=this.generateTemplateBlock(u),F=this._createLines,J=this._setupLines;this._createLines=f,this._setupLines=Y;let R=(D)=>this.localizeVar(D),Q=[];Q.push(`function ${A}(ctx) {`);let X=new Set;for(let D of F){let z=D.match(/^this\.(_(?:el|t|anchor|frag|slot|c|inst|empty)\d+)\s*=/);if(z)X.add(z[1])}if(X.size>0)Q.push(` let ${[...X].join(", ")};`);let Z=J.length>0;if(Z)Q.push(" let disposers = [];");Q.push(" return {"),Q.push(" c() {");for(let D of F)Q.push(` ${R(D)}`);if(Q.push(" },"),Q.push(" m(target, anchor) {"),Q.push(` target.insertBefore(${R(_)}, anchor);`),Q.push(" },"),Q.push(" p(ctx) {"),Z){Q.push(" disposers.forEach(d => d());"),Q.push(" disposers = [];");for(let D of J){let w=R(D).replace(/__effect\(\(\) => \{/g,"disposers.push(__effect(() => {").replace(/\}\);$/gm,"}));");Q.push(` ${w}`)}}if(Q.push(" },"),Q.push(" d(detaching) {"),Z)Q.push(" disposers.forEach(d => d());");let K=Q2(_,F,R);if(K)for(let D of K)Q.push(` if (detaching) ${D}.remove();`);else Q.push(` if (detaching) ${R(_)}.remove();`);Q.push(" }"),Q.push(" };"),Q.push("}"),this._blockFactories.push(Q.join(`
|
|
23
23
|
`))},W.generateTemplateLoop=function(A){let[u,f,Y,_,F,J]=A,R=this.newBlockVar(),Q=this.newElementVar("anchor");this._createLines.push(`${Q} = document.createComment('for');`);let X=Array.isArray(f)?f:[f],Z=X[0],K=X[1]||"i",D=this.generateInComponent(Y,"value"),z=Z;if(this.is(J,"block")&&J.length>1){let T=J[1];if(Array.isArray(T))for(let L of T){if(this.is(L,"object"))for(let h=1;h<L.length;h++){let[m,e]=L[h];if(m==="key"){z=this.generate(e,"value");break}}if(z!==Z)break}}let w=this._createLines,O=this._setupLines;this._createLines=[],this._setupLines=[];let G=this.generateTemplateBlock(J),q=this._createLines,E=this._setupLines;this._createLines=w,this._setupLines=O;let H=(T)=>this.localizeVar(T),M=[];M.push(`function ${R}(ctx, ${Z}, ${K}) {`);let P=new Set;for(let T of q){let L=T.match(/^this\.(_(?:el|t|anchor|frag|slot|c|inst|empty)\d+)\s*=/);if(L)P.add(L[1])}if(P.size>0)M.push(` let ${[...P].join(", ")};`);let I=E.length>0;if(I)M.push(" let disposers = [];");M.push(" return {"),M.push(" c() {");for(let T of q)M.push(` ${H(T)}`);M.push(" },");let B=Q2(G,q,H);if(M.push(" m(target, anchor) {"),B)for(let T of B)M.push(` target.insertBefore(${T}, anchor);`);else M.push(` target.insertBefore(${H(G)}, anchor);`);if(M.push(" },"),M.push(` p(ctx, ${Z}, ${K}) {`),I){M.push(" disposers.forEach(d => d());"),M.push(" disposers = [];");for(let T of E){let h=H(T).replace(/__effect\(\(\) => \{/g,"disposers.push(__effect(() => {").replace(/\}\);$/gm,"}));");M.push(` ${h}`)}}if(M.push(" },"),M.push(" d(detaching) {"),I)M.push(" disposers.forEach(d => d());");if(B)for(let T of B)M.push(` if (detaching) ${T}.remove();`);else M.push(` if (detaching) ${H(G)}.remove();`);M.push(" }"),M.push(" };"),M.push("}"),this._blockFactories.push(M.join(`
|
|
24
24
|
`));let N=[];return N.push(`// Loop: ${R}`),N.push("{"),N.push(` const anchor = ${Q};`),N.push(" const map = new Map();"),N.push(" __effect(() => {"),N.push(` const items = ${D};`),N.push(" const parent = anchor.parentNode;"),N.push(" const newMap = new Map();"),N.push(""),N.push(` for (let ${K} = 0; ${K} < items.length; ${K}++) {`),N.push(` const ${Z} = items[${K}];`),N.push(` const key = ${z};`),N.push(" let block = map.get(key);"),N.push(" if (!block) {"),N.push(` block = ${R}(this, ${Z}, ${K});`),N.push(" block.c();"),N.push(" }"),N.push(" block.m(parent, anchor);"),N.push(` block.p(this, ${Z}, ${K});`),N.push(" newMap.set(key, block);"),N.push(" }"),N.push(""),N.push(" for (const [key, block] of map) {"),N.push(" if (!newMap.has(key)) block.d(true);"),N.push(" }"),N.push(""),N.push(" map.clear();"),N.push(" for (const [k, v] of newMap) map.set(k, v);"),N.push(" });"),N.push("}"),this._setupLines.push(N.join(`
|
|
25
|
-
`)),Q},W.generateChildComponent=function(A,u){let f=this.newElementVar("inst"),Y=this.newElementVar("el"),{propsCode:_,childrenSetupLines:F}=this.buildComponentProps(u);this._createLines.push(`${f} = new ${A}(${_});`),this._createLines.push(`${Y} = ${f}._create();`),this._createLines.push(`(this._children || (this._children = [])).push(${f});`),this._setupLines.push(`if (${f}._setup) ${f}._setup();`);for(let J of F)this._setupLines.push(J);return Y},W.buildComponentProps=function(A){let u=[],f=null,Y=[];for(let F of A)if(this.is(F,"object"))for(let J=1;J<F.length;J++){let[R,Q]=F[J];if(typeof R==="string"){let X=this.reactiveMembers;this.reactiveMembers=new Set;let Z=this.generateInComponent(Q,"value");this.reactiveMembers=X,u.push(`${R}: ${Z}`)}}else if(Array.isArray(F)&&(F[0]==="->"||F[0]==="=>")){let J=F[2];if(J){if(this.is(J,"block")){let R=[];for(let Q of J.slice(1))if(this.is(Q,"object"))for(let X=1;X<Q.length;X++){let[Z,K]=Q[X];if(typeof Z==="string"){let D=this.reactiveMembers;this.reactiveMembers=new Set;let z=this.generateInComponent(K,"value");this.reactiveMembers=D,u.push(`${Z}: ${z}`)}}else R.push(Q);J=R.length>0?["block",...R]:null}if(J){let R=this._createLines,Q=this._setupLines;this._createLines=[],this._setupLines=[],f=this.generateTemplateBlock(J);let X=this._createLines,Z=this._setupLines;this._createLines=R,this._setupLines=Q;for(let K of X)this._createLines.push(K);Y.push(...Z),u.push(`children: ${f}`)}}}return{propsCode:u.length>0?`{ ${u.join(", ")} }`:"{}",childrenSetupLines:Y}},W.hasReactiveDeps=function(A){if(typeof A==="string")return!!(this.reactiveMembers&&this.reactiveMembers.has(A));if(!Array.isArray(A))return!1;if(A[0]==="."&&A[1]==="this"&&typeof A[2]==="string")return!!(this.reactiveMembers&&this.reactiveMembers.has(A[2]));if(A[0]==="."&&this._rootsAtThis(A[1]))return!0;for(let u of A)if(this.hasReactiveDeps(u))return!0;return!1},W._rootsAtThis=function(A){if(typeof A==="string")return A==="this";if(!Array.isArray(A)||A[0]!==".")return!1;return this._rootsAtThis(A[1])},W.getComponentRuntime=function(){return`
|
|
25
|
+
`)),Q},W.generateChildComponent=function(A,u){let f=this.newElementVar("inst"),Y=this.newElementVar("el"),{propsCode:_,childrenSetupLines:F}=this.buildComponentProps(u);this._createLines.push(`${f} = new ${A}(${_});`),this._createLines.push(`${Y} = ${f}._create();`),this._createLines.push(`(this._children || (this._children = [])).push(${f});`),this._setupLines.push(`if (${f}._setup) ${f}._setup();`);for(let J of F)this._setupLines.push(J);return Y},W.buildComponentProps=function(A){let u=[],f=null,Y=[];for(let F of A)if(this.is(F,"object"))for(let J=1;J<F.length;J++){let[R,Q]=F[J];if(typeof R==="string"){let X=this.reactiveMembers;this.reactiveMembers=new Set;let Z=this.generateInComponent(Q,"value");this.reactiveMembers=X,u.push(`${R}: ${Z}`)}}else if(Array.isArray(F)&&(F[0]==="->"||F[0]==="=>")){let J=F[2];if(J){if(this.is(J,"block")){let R=[];for(let Q of J.slice(1))if(this.is(Q,"object"))for(let X=1;X<Q.length;X++){let[Z,K]=Q[X];if(typeof Z==="string"){let D=this.reactiveMembers;this.reactiveMembers=new Set;let z=this.generateInComponent(K,"value");this.reactiveMembers=D,u.push(`${Z}: ${z}`)}}else R.push(Q);J=R.length>0?["block",...R]:null}if(J){let R=this._createLines,Q=this._setupLines;this._createLines=[],this._setupLines=[],f=this.generateTemplateBlock(J);let X=this._createLines,Z=this._setupLines;this._createLines=R,this._setupLines=Q;for(let K of X)this._createLines.push(K);Y.push(...Z),u.push(`children: ${f}`)}}}return{propsCode:u.length>0?`{ ${u.join(", ")} }`:"{}",childrenSetupLines:Y}},W.hasReactiveDeps=function(A){if(typeof A==="string")return!!(this.reactiveMembers&&this.reactiveMembers.has(A));if(!Array.isArray(A))return!1;if(A[0]==="."&&A[1]==="this"&&typeof A[2]==="string")return!!(this.reactiveMembers&&this.reactiveMembers.has(A[2]));if(A[0]==="."&&this._rootsAtThis(A[1]))return!0;for(let u of A)if(this.hasReactiveDeps(u))return!0;return!1},W.isSimpleAssignable=function(A){if(typeof A==="string")return!!(this.reactiveMembers&&this.reactiveMembers.has(A));if(Array.isArray(A)&&A[0]==="."&&A[1]==="this"&&typeof A[2]==="string")return!!(this.reactiveMembers&&this.reactiveMembers.has(A[2]));return!1},W._rootsAtThis=function(A){if(typeof A==="string")return A==="this";if(!Array.isArray(A)||A[0]!==".")return!1;return this._rootsAtThis(A[1])},W.getComponentRuntime=function(){return`
|
|
26
26
|
// ============================================================================
|
|
27
27
|
// Rip Component Runtime
|
|
28
28
|
// ============================================================================
|
|
@@ -507,7 +507,7 @@ if (typeof globalThis !== 'undefined') {
|
|
|
507
507
|
`:"",$=W.slice(0,A).join(`
|
|
508
508
|
`)}let f=new p().tokenize($);if(this.options.showTokens)f.forEach((K)=>console.log(`${K[0].padEnd(12)} ${JSON.stringify(K[1])}`)),console.log();let Y=null,_=null;if(this.options.types==="emit"||this.options.types==="check"||this.options.types===!0)_=[...f];f=f.filter((K)=>K[0]!=="TYPE_DECL");while(f.length>0&&f[0][0]==="TERMINATOR")f.shift();if(f.every((K)=>K[0]==="TERMINATOR")){if(_)Y=B1(_,["program"]);return{tokens:f,sexpr:["program"],code:"",dts:Y,data:U,reactiveVars:{}}}o.lexer={tokens:f,pos:0,setInput:function(){},lex:function(){if(this.pos>=this.tokens.length)return 1;let K=this.tokens[this.pos++],D=K[1];if(K.data)D=new String(D),Object.assign(D,K.data);return this.text=D,this.loc=K.loc,K[0]}};let F;try{F=o.parse($)}catch(K){if(/\?\s*\([^)]*\?[^)]*:[^)]*\)\s*:/.test($)||/\?\s+\w+\s+\?\s+/.test($))throw Error("Nested ternary operators are not supported. Use if/else statements instead.");throw K}if(this.options.showSExpr)console.log(l(F,0,!0)),console.log();let J=null;if(this.options.sourceMap){let K=(this.options.filename||"output")+".js",D=this.options.filename||"input.rip";J=new V1(K,D,$)}let R=new y({dataSection:U,skipPreamble:this.options.skipPreamble,reactiveVars:this.options.reactiveVars,sourceMap:J}),Q=R.compile(F),X=J?J.toJSON():null,Z=J?J.toReverseMap():null;if(X&&this.options.sourceMap==="inline"){let K=typeof Buffer<"u"?Buffer.from(X).toString("base64"):btoa(X);Q+=`
|
|
509
509
|
//# sourceMappingURL=data:application/json;base64,${K}`}else if(X&&this.options.filename)Q+=`
|
|
510
|
-
//# sourceMappingURL=${this.options.filename}.js.map`;if(_)Y=B1(_,F);return{tokens:f,sexpr:F,code:Q,dts:Y,map:X,reverseMap:Z,data:U,reactiveVars:R.reactiveVars}}compileToJS($){return this.compile($).code}compileToSExpr($){return this.compile($).sexpr}}K2(y,p);y.prototype.generateEnum=o1;function j1($,U={}){return new D1(U).compile($)}function d($,U={}){return new D1(U).compileToJS($)}function w1(){return new y({}).getReactiveRuntime()}function h1(){return new y({}).getComponentRuntime()}var L3="3.9.3",V3="2026-02-19@
|
|
510
|
+
//# sourceMappingURL=${this.options.filename}.js.map`;if(_)Y=B1(_,F);return{tokens:f,sexpr:F,code:Q,dts:Y,map:X,reverseMap:Z,data:U,reactiveVars:R.reactiveVars}}compileToJS($){return this.compile($).code}compileToSExpr($){return this.compile($).sexpr}}K2(y,p);y.prototype.generateEnum=o1;function j1($,U={}){return new D1(U).compile($)}function d($,U={}){return new D1(U).compileToJS($)}function w1(){return new y({}).getReactiveRuntime()}function h1(){return new y({}).getComponentRuntime()}var L3="3.9.3",V3="2026-02-19@13:22:07GMT";if(typeof globalThis<"u"&&!globalThis.__rip)Function(w1())();var j3=($)=>{let U=$.match(/^[ \t]*(?=\S)/gm),W=Math.min(...(U||[]).map((A)=>A.length));return $.replace(RegExp(`^[ ]{${W}}`,"gm"),"").trim()};async function h3(){let $=document.querySelectorAll('script[type="text/rip"]');for(let U of $){if(U.hasAttribute("data-rip-processed"))continue;if(U.hasAttribute("data-name"))continue;try{let W;if(U.src){let u=await fetch(U.src);if(!u.ok){console.error(`Rip: failed to fetch ${U.src} (${u.status})`);continue}W=await u.text()}else W=j3(U.textContent);let A;try{A=d(W)}catch(u){console.error("Rip compile error:",u.message),console.error("Source:",W);continue}await(0,eval)(`(async()=>{
|
|
511
511
|
${A}
|
|
512
512
|
})()`),U.setAttribute("data-rip-processed","true")}catch(W){console.error("Rip runtime error:",W)}}}async function U1($){for(let[f,Y]of Object.entries(U1.modules))if($.includes(f))return Y;let U=await fetch($).then((f)=>{if(!f.ok)throw Error(`importRip: ${$} (${f.status})`);return f.text()}),W=d(U),A=new Blob([W],{type:"application/javascript"}),u=URL.createObjectURL(A);try{return await import(u)}finally{URL.revokeObjectURL(u)}}U1.modules={};function C3($){try{let U=$.replace(/^/gm," "),A=d(`do ->
|
|
513
513
|
${U}`).replace(/^let\s+[^;]+;\s*\n\s*/m,"");A=A.replace(/^const\s+(\w+)\s*=/gm,"globalThis.$1 =");let u=(0,eval)(A);if(u&&typeof u.then==="function")return u.then((f)=>{if(f!==void 0)globalThis._=f;return f});if(u!==void 0)globalThis._=u;return u}catch(U){console.error("Rip compilation error:",U.message);return}}if(typeof globalThis<"u")globalThis.rip=C3,globalThis.importRip=U1,globalThis.compileToJS=d,globalThis.__ripExports={compile:j1,compileToJS:d,formatSExpr:l,VERSION:L3,BUILD_DATE:V3,getReactiveRuntime:w1,getComponentRuntime:h1};if(typeof document<"u")globalThis.__ripScriptsReady=new Promise(($)=>{let U=()=>h3().then($);if(document.readyState==="loading")document.addEventListener("DOMContentLoaded",()=>queueMicrotask(U));else queueMicrotask(U)});var k1={};c2(k1,{throttle:()=>c3,stash:()=>L2,setContext:()=>B2,raw:()=>V2,launch:()=>l3,isStash:()=>y3,hold:()=>g3,hasContext:()=>P2,getContext:()=>O2,delay:()=>j2,debounce:()=>v3,createRouter:()=>C2,createResource:()=>b3,createRenderer:()=>y2,createComponents:()=>h2});var M2,v1,t,k,q1,X2,r,j,C1,Y1,_1,c1,D2,w2,z1,H1,z2,H2,q2,y1,b1,O2,G2,g1,P2,W1,l1,E2,I2,B2,N2,T2,x1,S2;({__state:j,__effect:r,__batch:X2}=globalThis.__rip);({setContext:B2,getContext:O2,hasContext:P2}=globalThis.__ripComponent||{});q1=Symbol("stash");k=Symbol("signals");t=Symbol("raw");v1=new WeakMap;C1=0;c1=j(0);g1=function($,U){let W;if(!$[k])Object.defineProperty($,k,{value:new Map,enumerable:!1});if(W=$[k].get(U),!W)W=j($[U]),$[k].set(U,W);return W};W1=function($){return g1($,Symbol.for("keys"))};S2=function($){let U;if(!($!=null&&typeof $==="object"))return $;if($[q1])return $;if($ instanceof Date||$ instanceof RegExp||$ instanceof Map||$ instanceof Set||$ instanceof Promise)return $;if(U=v1.get($),U)return U;return l1($)};l1=function($){let U,W;return W=null,U={get:function(A,u){let f,Y;if(u===q1)return!0;if(u===t)return A;if(typeof u==="symbol")return Reflect.get(A,u);if(u==="length"&&Array.isArray(A))return W1(A).value,A.length;if(u==="get")return function(_){return N2(W,_)};if(u==="set")return function(_,F){return T2(W,_,F)};if(f=g1(A,u),Y=f.value,Y!=null&&typeof Y==="object")return S2(Y);return Y},set:function(A,u,f){let Y,_;if(Y=A[u],_=f?.[t]?f[t]:f,_===Y)return!0;if(A[u]=_,A[k]?.has(u))A[k].get(u).value=_;if(Y===void 0&&_!==void 0)W1(A).value=++C1;return c1.value++,!0},deleteProperty:function(A,u){let f;if(delete A[u],f=A[k]?.get(u),f)f.value=void 0;return W1(A).value=++C1,!0},ownKeys:function(A){return W1(A).value,Reflect.ownKeys(A)}},W=new Proxy($,U),v1.set($,W),W};M2=/([./][^./\[\s]+|\[[-+]?\d+\]|\[(?:"[^"]+"|'[^']+')\])/;x1=function($){let U,W,A,u,f;A=("."+$).split(M2),A.shift(),f=[],W=0;while(W<A.length){if(u=A[W],U=u[0],U==="."||U==="/")f.push(u.slice(1));else if(U==="[")if(u[1]==='"'||u[1]==="'")f.push(u.slice(2,-2));else f.push(+u.slice(1,-1));W+=2}return f};N2=function($,U){let W,A;A=x1(U),W=$;for(let u of A){if(W==null)return;W=W[u]}return W};T2=function($,U,W){let A,u;u=x1(U),A=$;for(let f=0;f<u.length;f++){let Y=u[f];if(f===u.length-1)A[Y]=W;else{if(A[Y]==null)A[Y]={};A=A[Y]}}return W};_1=function($){return typeof $==="function"?$:function(){return $.value}};Y1=function($,U){let W;return W={read:function(){return $.read()}},Object.defineProperty(W,"value",{get:function(){return $.value},set:function(A){return U.value=A}}),W};q2=function($){let U;if(U=$.replace(/\.rip$/,""),U=U.replace(/\[\.\.\.(\w+)\]/g,"*$1"),U=U.replace(/\[(\w+)\]/g,":$1"),U==="index")return"/";return U=U.replace(/\/index$/,""),"/"+U};I2=function($){let U,W;return U=[],W=$.replace(/\*(\w+)/g,function(A,u){return U.push(u),"(.+)"}).replace(/:(\w+)/g,function(A,u){return U.push(u),"([^/]+)"}),{regex:new RegExp("^"+W+"$"),names:U}};E2=function($,U){let W,A;for(let u of U)if(W=$.match(u.regex.regex),W){A={};for(let f=0;f<u.regex.names.length;f++){let Y=u.regex.names[f];A[Y]=decodeURIComponent(W[f+1])}return{route:u,params:A}}return null};z1=function($,U="components"){let W,A,u,f,Y,_,F,J,R;F=[],u=new Map,W=$.listAll(U);for(let Q of W){if(_=Q.slice(U.length+1),!_.endsWith(".rip"))continue;if(f=_.split("/").pop(),f==="_layout.rip"){A=_==="_layout.rip"?"":_.slice(0,-12),u.set(A,Q);continue}if(f.startsWith("_"))continue;if(J=_.split("/"),J.length>1&&J.some(function(X,Z){return Z<J.length-1&&X.startsWith("_")}))continue;R=q2(_),Y=I2(R),F.push({pattern:R,regex:Y,file:Q,rel:_})}return F.sort(function(Q,X){let Z,K,D,z;if(K=(Q.pattern.match(/:/g)||[]).length,z=(X.pattern.match(/:/g)||[]).length,Z=Q.pattern.includes("*")?1:0,D=X.pattern.includes("*")?1:0,Z!==D)return Z-D;if(K!==z)return K-z;return Q.pattern.localeCompare(X.pattern)}),{routes:F,layouts:u}};G2=function($,U,W){let A,u,f,Y;if(A=[],f=$.slice(U.length+1),Y=f.split("/"),u="",W.has(""))A.push(W.get(""));for(let _=0;_<Y.length;_++){let F=Y[_];if(_===Y.length-1)break;if(u=u?u+"/"+F:F,W.has(u))A.push(W.get(u))}return A};D2=function($,U){if($.length!==U.length)return!1;for(let W=0;W<$.length;W++)if($[W]!==U[W])return!1;return!0};b1=function($){for(let U in $){let W=$[U];if(typeof W==="function"&&(W.prototype?.mount||W.prototype?._create))return W}return typeof $.default==="function"?$.default:void 0};y1=function($){let U;U={};for(let W in $){let A=$[W];if(typeof A==="function"&&(A.prototype?.mount||A.prototype?._create))U[W]=A}return U};H2=function($){let U;return U=$.split("/").pop().replace(/\.rip$/,""),U.replace(/(^|[-_])([a-z])/g,function(W,A,u){return u.toUpperCase()})};w2=function($,U="components"){let W,A,u;A={};for(let f of $.listAll(U)){if(!f.endsWith(".rip"))continue;if(W=f.split("/").pop(),W.startsWith("_"))continue;if(u=H2(f),A[u])console.warn(`[Rip] Component name collision: ${u} (${A[u]} vs ${f})`);A[u]=f}return A};H1=async function($,U,W=null,A=null,u=null){let f,Y,_,F,J,R,Q,X,Z,K,D;if(W&&A){if(Y=W.getCompiled(A),Y)return Y}if(R=U($),u){Z={};for(let z in u.map){let w=u.map[z];if(w!==A&&R.includes(`new ${z}(`)){if(!u.classes[z]){if(F=W.read(w),F){_=await H1(F,U,W,w,u),J=y1(_);for(let O in J){let G=J[O];u.classes[O]=G}}}if(u.classes[z])Z[z]=!0}}if(X=Object.keys(Z),X.length>0)K=`const {${X.join(", ")}} = globalThis['${u.key}'];
|
package/dist/rip-ui.min.js.br
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rip-lang/ui",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.14",
|
|
4
4
|
"description": "Zero-build reactive web framework — rip.js + ui.rip + launch(url)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "ui.rip",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"README.md"
|
|
40
40
|
],
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@rip-lang/api": ">=1.1.
|
|
42
|
+
"@rip-lang/api": ">=1.1.10"
|
|
43
43
|
},
|
|
44
44
|
"peerDependenciesMeta": {
|
|
45
45
|
"@rip-lang/api": {
|