ruby_wasm_ui 0.8.1 → 0.8.2
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.
- checksums.yaml +4 -4
- data/README.md +1 -3
- data/examples/src/todos/index.html +23 -0
- data/examples/src/todos/index.rb +237 -0
- data/examples/src/todos/todos_repository.rb +23 -0
- data/{packages/npm-packages/runtime/src → lib}/ruby_wasm_ui/version.rb +1 -1
- data/lib/ruby_wasm_ui.rb +14 -0
- data/package-lock.json +2 -2
- data/package.json +1 -1
- data/packages/npm-packages/runtime/package-lock.json +2 -2
- data/packages/npm-packages/runtime/package.json +3 -3
- data/packages/npm-packages/runtime/src/ruby_wasm_ui +1 -0
- data/packages/npm-packages/runtime/src/ruby_wasm_ui.rb +1 -0
- metadata +28 -25
- data/lib/ruby_wasm_ui +0 -1
- data/lib/ruby_wasm_ui.rb +0 -1
- data/packages/npm-packages/runtime/src/ruby_wasm_ui.rb +0 -14
- /data/{packages/npm-packages/runtime/src → lib}/ruby_wasm_ui/app.rb +0 -0
- /data/{packages/npm-packages/runtime/src → lib}/ruby_wasm_ui/component.rb +0 -0
- /data/{packages/npm-packages/runtime/src → lib}/ruby_wasm_ui/dispatcher.rb +0 -0
- /data/{packages/npm-packages/runtime/src → lib}/ruby_wasm_ui/dom/attributes.rb +0 -0
- /data/{packages/npm-packages/runtime/src → lib}/ruby_wasm_ui/dom/destroy_dom.rb +0 -0
- /data/{packages/npm-packages/runtime/src → lib}/ruby_wasm_ui/dom/events.rb +0 -0
- /data/{packages/npm-packages/runtime/src → lib}/ruby_wasm_ui/dom/mount_dom.rb +0 -0
- /data/{packages/npm-packages/runtime/src → lib}/ruby_wasm_ui/dom/patch_dom.rb +0 -0
- /data/{packages/npm-packages/runtime/src → lib}/ruby_wasm_ui/dom/scheduler.rb +0 -0
- /data/{packages/npm-packages/runtime/src → lib}/ruby_wasm_ui/dom.rb +0 -0
- /data/{packages/npm-packages/runtime/src → lib}/ruby_wasm_ui/nodes_equal.rb +0 -0
- /data/{packages/npm-packages/runtime/src → lib}/ruby_wasm_ui/template/build_conditional_group.rb +0 -0
- /data/{packages/npm-packages/runtime/src → lib}/ruby_wasm_ui/template/build_for_group.rb +0 -0
- /data/{packages/npm-packages/runtime/src → lib}/ruby_wasm_ui/template/build_vdom.rb +0 -0
- /data/{packages/npm-packages/runtime/src → lib}/ruby_wasm_ui/template/parser.rb +0 -0
- /data/{packages/npm-packages/runtime/src → lib}/ruby_wasm_ui/template.rb +0 -0
- /data/{packages/npm-packages/runtime/src → lib}/ruby_wasm_ui/utils/arrays.rb +0 -0
- /data/{packages/npm-packages/runtime/src → lib}/ruby_wasm_ui/utils/objects.rb +0 -0
- /data/{packages/npm-packages/runtime/src → lib}/ruby_wasm_ui/utils/props.rb +0 -0
- /data/{packages/npm-packages/runtime/src → lib}/ruby_wasm_ui/utils/strings.rb +0 -0
- /data/{packages/npm-packages/runtime/src → lib}/ruby_wasm_ui/utils.rb +0 -0
- /data/{packages/npm-packages/runtime/src → lib}/ruby_wasm_ui/vdom.rb +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a999410f2d0e3c789843f58022405b1f9af0bd5640efb042ccc41464beb9e70d
|
|
4
|
+
data.tar.gz: 92733ff997682478437f0df8f21fa3a4d0903ebf20fb1dd17c4923686b4e19df
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 35e4dcd436516375d2dc7e993580b1dd0cb73f3e8f6c55fbf4729ec6923f1b5655c724422e9356d65c6386c941838f6479281e002923f9f09071264e57681943
|
|
7
|
+
data.tar.gz: 62b4a4bb92dc563ce77c6ad0ee761acffd7c39b32c438bc1ca2732b1e729bd25062c8681553768f1061963962337825bad2de8674d902363eff78f5e52456572
|
data/README.md
CHANGED
|
@@ -21,7 +21,7 @@ Create an HTML file:
|
|
|
21
21
|
<!DOCTYPE html>
|
|
22
22
|
<html>
|
|
23
23
|
<head>
|
|
24
|
-
<script src="https://unpkg.com/ruby-wasm-ui@0.8.
|
|
24
|
+
<script src="https://unpkg.com/ruby-wasm-ui@0.8.2"></script>
|
|
25
25
|
<script defer type="text/ruby" src="app.rb"></script>
|
|
26
26
|
</head>
|
|
27
27
|
<body>
|
|
@@ -167,8 +167,6 @@ my-app/
|
|
|
167
167
|
Your `src/app.rb` file can use `ruby_wasm_ui` just like in the Quick Start example:
|
|
168
168
|
|
|
169
169
|
```ruby
|
|
170
|
-
require "js"
|
|
171
|
-
|
|
172
170
|
CounterComponent = RubyWasmUi.define_component(
|
|
173
171
|
state: ->(props) {
|
|
174
172
|
{ count: props[:count] || 0 }
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<title>Todos</title>
|
|
6
|
+
<script type="module">
|
|
7
|
+
import { DefaultRubyVM } from "https://cdn.jsdelivr.net/npm/@ruby/wasm-wasi@2.7.2/dist/browser/+esm";
|
|
8
|
+
const response = await fetch("../../src.wasm");
|
|
9
|
+
const module = await WebAssembly.compileStreaming(response);
|
|
10
|
+
const { vm } = await DefaultRubyVM(module);
|
|
11
|
+
vm.evalAsync(`
|
|
12
|
+
require "ruby_wasm_ui"
|
|
13
|
+
require_relative './src/todos/todos_repository.rb'
|
|
14
|
+
require_relative './src/todos/index.rb'
|
|
15
|
+
`);
|
|
16
|
+
</script>
|
|
17
|
+
</head>
|
|
18
|
+
<body>
|
|
19
|
+
<h1>Todos</h1>
|
|
20
|
+
|
|
21
|
+
<div id="app"></div>
|
|
22
|
+
</body>
|
|
23
|
+
</html>
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
# Main App component - coordinates all other components
|
|
2
|
+
AppComponent = RubyWasmUi.define_component(
|
|
3
|
+
# Initialize application state
|
|
4
|
+
state: ->(props) {
|
|
5
|
+
{
|
|
6
|
+
todos: [
|
|
7
|
+
{ id: rand(10000), text: "Walk the dog" },
|
|
8
|
+
{ id: rand(10000), text: "Water the plants" },
|
|
9
|
+
{ id: rand(10000), text: "Sand the chairs" }
|
|
10
|
+
]
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
on_mounted: -> {
|
|
15
|
+
update_state(todos: TodosRepository.read_todos)
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
# Render the complete application
|
|
19
|
+
template: ->() {
|
|
20
|
+
RubyWasmUi::Template::Parser.parse_and_eval(<<~HTML, binding)
|
|
21
|
+
<template>
|
|
22
|
+
<h1>My TODOs</h1>
|
|
23
|
+
<CreateTodoComponent
|
|
24
|
+
on="{ add: ->(text) { add_todo(text) } }"
|
|
25
|
+
/>
|
|
26
|
+
<TodoListComponent
|
|
27
|
+
todos="{state[:todos]}"
|
|
28
|
+
on="{
|
|
29
|
+
remove: ->(id) { remove_todo(id) },
|
|
30
|
+
edit: ->(payload) { edit_todo(payload) }
|
|
31
|
+
}"
|
|
32
|
+
/>
|
|
33
|
+
</template>
|
|
34
|
+
HTML
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
# Component methods
|
|
38
|
+
methods: {
|
|
39
|
+
# Add a new TODO to the list
|
|
40
|
+
# @param text [String] The TODO text
|
|
41
|
+
add_todo: ->(text) {
|
|
42
|
+
todo = { id: rand(10000), text: text }
|
|
43
|
+
new_todos = state[:todos] + [todo]
|
|
44
|
+
update_state(todos: new_todos)
|
|
45
|
+
TodosRepository.write_todos(new_todos)
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
# Remove a TODO from the list
|
|
49
|
+
# @param id [Integer] Id of TODO to remove
|
|
50
|
+
remove_todo: ->(id) {
|
|
51
|
+
new_todos = state[:todos].dup
|
|
52
|
+
new_todos.delete_at(new_todos.index { |todo| todo[:id] == id })
|
|
53
|
+
update_state(todos: new_todos)
|
|
54
|
+
TodosRepository.write_todos(new_todos)
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
# Edit an existing TODO
|
|
58
|
+
# @param payload [Hash] Contains edited text and index
|
|
59
|
+
edit_todo: ->(payload) {
|
|
60
|
+
edited = payload[:edited]
|
|
61
|
+
id = payload[:id]
|
|
62
|
+
new_todos = state[:todos].dup
|
|
63
|
+
new_todos[new_todos.index { |todo| todo[:id] == id }] = new_todos[new_todos.index { |todo| todo[:id] == id }].merge(text: edited)
|
|
64
|
+
update_state(todos: new_todos)
|
|
65
|
+
TodosRepository.write_todos(new_todos)
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
# CreateTodo component - handles new TODO input
|
|
71
|
+
CreateTodoComponent = RubyWasmUi.define_component(
|
|
72
|
+
# Initialize component state
|
|
73
|
+
state: ->(props) {
|
|
74
|
+
{ text: "" }
|
|
75
|
+
},
|
|
76
|
+
|
|
77
|
+
# Render the new TODO input form
|
|
78
|
+
template: ->() {
|
|
79
|
+
RubyWasmUi::Template::Parser.parse_and_eval(<<~HTML, binding)
|
|
80
|
+
<div>
|
|
81
|
+
<label for="todo-input" type="text">New TODO</label>
|
|
82
|
+
<input
|
|
83
|
+
type="text"
|
|
84
|
+
id="todo-input"
|
|
85
|
+
value="{state[:text]}"
|
|
86
|
+
on="{
|
|
87
|
+
input: ->(e) { update_state(text: e[:target][:value]) },
|
|
88
|
+
keydown: ->(e) {
|
|
89
|
+
if e[:key] == 'Enter' && state[:text].to_s.length >= 3
|
|
90
|
+
add_todo
|
|
91
|
+
end
|
|
92
|
+
}
|
|
93
|
+
}"
|
|
94
|
+
/>
|
|
95
|
+
<button disabled="{state[:text].to_s.length < 3}" on="{ click: ->() { add_todo } }">
|
|
96
|
+
Add
|
|
97
|
+
</button>
|
|
98
|
+
</div>
|
|
99
|
+
HTML
|
|
100
|
+
},
|
|
101
|
+
|
|
102
|
+
# Component methods
|
|
103
|
+
methods: {
|
|
104
|
+
# Add a new TODO and emit event to parent
|
|
105
|
+
add_todo: ->() {
|
|
106
|
+
emit("add", state[:text])
|
|
107
|
+
update_state(text: "")
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
# TodoList component - manages the list of TODO items
|
|
113
|
+
TodoListComponent = RubyWasmUi.define_component(
|
|
114
|
+
# Render the TODO list
|
|
115
|
+
template: ->() {
|
|
116
|
+
todos = props[:todos]
|
|
117
|
+
|
|
118
|
+
RubyWasmUi::Template::Parser.parse_and_eval(<<~HTML, binding)
|
|
119
|
+
<ul>
|
|
120
|
+
<TodoItemComponent
|
|
121
|
+
r-for="{todo in todos}"
|
|
122
|
+
key="{todo[:id]}"
|
|
123
|
+
todo="{todo[:text]}"
|
|
124
|
+
id="{todo[:id]}"
|
|
125
|
+
on="{
|
|
126
|
+
remove: ->(id) { emit('remove', id) },
|
|
127
|
+
edit: ->(payload) { emit('edit', payload) }
|
|
128
|
+
}"
|
|
129
|
+
/>
|
|
130
|
+
</ul>
|
|
131
|
+
HTML
|
|
132
|
+
},
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
# TodoItem component - handles individual TODO items
|
|
136
|
+
TodoItemComponent = RubyWasmUi.define_component(
|
|
137
|
+
# Initialize component state with editing capabilities
|
|
138
|
+
state: ->(props) {
|
|
139
|
+
{
|
|
140
|
+
original: props[:todo],
|
|
141
|
+
edited: props[:todo],
|
|
142
|
+
is_editing: false
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
|
|
146
|
+
# Render TODO item using r-if and r-else for conditional rendering
|
|
147
|
+
template: ->() {
|
|
148
|
+
RubyWasmUi::Template::Parser.parse_and_eval(<<~HTML, binding)
|
|
149
|
+
<template>
|
|
150
|
+
<TodoItemEditComponent
|
|
151
|
+
r-if="{state[:is_editing]}"
|
|
152
|
+
edited="{state[:edited]}"
|
|
153
|
+
on="{
|
|
154
|
+
input: ->(value) { input_value(value) },
|
|
155
|
+
save: ->() { save_edition },
|
|
156
|
+
cancel: ->() { cancel_edition }
|
|
157
|
+
}"
|
|
158
|
+
/>
|
|
159
|
+
<TodoItemViewComponent
|
|
160
|
+
r-else
|
|
161
|
+
original="{state[:original]}"
|
|
162
|
+
id="{props[:id]}"
|
|
163
|
+
on="{
|
|
164
|
+
editing: ->() { editing },
|
|
165
|
+
remove: ->(id) { emit('remove', id) }
|
|
166
|
+
}"
|
|
167
|
+
/>
|
|
168
|
+
</template>
|
|
169
|
+
HTML
|
|
170
|
+
},
|
|
171
|
+
|
|
172
|
+
# Component methods
|
|
173
|
+
methods: {
|
|
174
|
+
input_value: ->(value) {
|
|
175
|
+
update_state(edited: value)
|
|
176
|
+
},
|
|
177
|
+
|
|
178
|
+
editing: ->() {
|
|
179
|
+
update_state(is_editing: true)
|
|
180
|
+
},
|
|
181
|
+
|
|
182
|
+
# Save the edited TODO
|
|
183
|
+
save_edition: ->() {
|
|
184
|
+
update_state(is_editing: false, original: state[:edited])
|
|
185
|
+
emit("edit", { edited: state[:edited], id: props[:id] })
|
|
186
|
+
},
|
|
187
|
+
|
|
188
|
+
# Cancel editing and revert changes
|
|
189
|
+
cancel_edition: ->() {
|
|
190
|
+
update_state(edited: state[:original], is_editing: false)
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
)
|
|
194
|
+
|
|
195
|
+
# TodoItemEdit component - handles TODO editing mode
|
|
196
|
+
TodoItemEditComponent = RubyWasmUi.define_component(
|
|
197
|
+
# Render TODO item in edit mode
|
|
198
|
+
template: ->() {
|
|
199
|
+
RubyWasmUi::Template::Parser.parse_and_eval(<<~HTML, binding)
|
|
200
|
+
<li>
|
|
201
|
+
<input
|
|
202
|
+
value="{props[:edited]}"
|
|
203
|
+
type="text"
|
|
204
|
+
on="{ input: ->(e) { emit('input', e[:target][:value]) } }"
|
|
205
|
+
/>
|
|
206
|
+
<button on="{ click: ->() { emit('save') } }">
|
|
207
|
+
Save
|
|
208
|
+
</button>
|
|
209
|
+
<button on="{ click: ->() { emit('cancel') } }">
|
|
210
|
+
Cancel
|
|
211
|
+
</button>
|
|
212
|
+
</li>
|
|
213
|
+
HTML
|
|
214
|
+
},
|
|
215
|
+
)
|
|
216
|
+
|
|
217
|
+
# TodoItemView component - handles TODO display mode
|
|
218
|
+
TodoItemViewComponent = RubyWasmUi.define_component(
|
|
219
|
+
# Render TODO item in view mode
|
|
220
|
+
template: ->() {
|
|
221
|
+
RubyWasmUi::Template::Parser.parse_and_eval(<<~HTML, binding)
|
|
222
|
+
<li>
|
|
223
|
+
<span on="{ dblclick: ->() { emit('editing') } }">
|
|
224
|
+
{props[:original]}
|
|
225
|
+
</span>
|
|
226
|
+
<button on="{ click: ->() { emit('remove', props[:id]) } }">
|
|
227
|
+
Done
|
|
228
|
+
</button>
|
|
229
|
+
</li>
|
|
230
|
+
HTML
|
|
231
|
+
},
|
|
232
|
+
)
|
|
233
|
+
|
|
234
|
+
# Create and mount the application
|
|
235
|
+
app = RubyWasmUi::App.create(AppComponent)
|
|
236
|
+
app_element = JS.global[:document].getElementById("app")
|
|
237
|
+
app.mount(app_element)
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
require "json"
|
|
2
|
+
|
|
3
|
+
# Repository class for managing todos in local storage
|
|
4
|
+
class TodosRepository
|
|
5
|
+
class << self
|
|
6
|
+
# Read todos from local storage
|
|
7
|
+
# @return [Array] Array of todo items
|
|
8
|
+
def read_todos
|
|
9
|
+
todos_json = JS.global[:localStorage].getItem('todos') || '[]'
|
|
10
|
+
JSON.parse(todos_json.to_s).map do |todo|
|
|
11
|
+
{ id: todo["id"], text: todo["text"] }
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# Write todos to local storage
|
|
16
|
+
# @param todos [Array] Array of todo items to be stored
|
|
17
|
+
# @return [void]
|
|
18
|
+
def write_todos(todos)
|
|
19
|
+
todos_json = JSON.generate(todos)
|
|
20
|
+
JS.global[:localStorage].setItem('todos', todos_json)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
data/lib/ruby_wasm_ui.rb
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "ruby_wasm_ui/app"
|
|
4
|
+
require_relative "ruby_wasm_ui/component"
|
|
5
|
+
require_relative "ruby_wasm_ui/dispatcher"
|
|
6
|
+
require_relative "ruby_wasm_ui/dom"
|
|
7
|
+
require_relative "ruby_wasm_ui/nodes_equal"
|
|
8
|
+
require_relative "ruby_wasm_ui/template"
|
|
9
|
+
require_relative "ruby_wasm_ui/utils"
|
|
10
|
+
require_relative "ruby_wasm_ui/vdom"
|
|
11
|
+
require_relative "ruby_wasm_ui/version"
|
|
12
|
+
|
|
13
|
+
module RubyWasmUi
|
|
14
|
+
end
|
data/package-lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ruby-wasm-ui-project",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "ruby-wasm-ui-project",
|
|
9
|
-
"version": "0.8.
|
|
9
|
+
"version": "0.8.2",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"workspaces": [
|
|
12
12
|
"packages/*"
|
data/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ruby-wasm-ui",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "ruby-wasm-ui",
|
|
9
|
-
"version": "0.8.
|
|
9
|
+
"version": "0.8.2",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"@rollup/plugin-replace": "^6.0.2",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ruby-wasm-ui",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/ruby-wasm-ui.js",
|
|
6
6
|
"files": [
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
],
|
|
11
11
|
"scripts": {
|
|
12
12
|
"prepack": "npm run build",
|
|
13
|
-
"build": "NODE_ENV=production rollup -c",
|
|
14
|
-
"build:dev": "NODE_ENV=development rollup -c",
|
|
13
|
+
"build": "rm -rf dist && NODE_ENV=production rollup -c",
|
|
14
|
+
"build:dev": "rm -rf dist && NODE_ENV=development rollup -c",
|
|
15
15
|
"lint": "eslint src",
|
|
16
16
|
"lint:fix": "eslint src --fix",
|
|
17
17
|
"test": "vitest",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
../../../../lib/ruby_wasm_ui
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
../../../../lib/ruby_wasm_ui.rb
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ruby_wasm_ui
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.8.
|
|
4
|
+
version: 0.8.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- t0yohei
|
|
@@ -89,8 +89,33 @@ files:
|
|
|
89
89
|
- examples/package.json
|
|
90
90
|
- examples/src/counter/index.html
|
|
91
91
|
- examples/src/counter/index.rb
|
|
92
|
-
-
|
|
92
|
+
- examples/src/todos/index.html
|
|
93
|
+
- examples/src/todos/index.rb
|
|
94
|
+
- examples/src/todos/todos_repository.rb
|
|
93
95
|
- lib/ruby_wasm_ui.rb
|
|
96
|
+
- lib/ruby_wasm_ui/app.rb
|
|
97
|
+
- lib/ruby_wasm_ui/component.rb
|
|
98
|
+
- lib/ruby_wasm_ui/dispatcher.rb
|
|
99
|
+
- lib/ruby_wasm_ui/dom.rb
|
|
100
|
+
- lib/ruby_wasm_ui/dom/attributes.rb
|
|
101
|
+
- lib/ruby_wasm_ui/dom/destroy_dom.rb
|
|
102
|
+
- lib/ruby_wasm_ui/dom/events.rb
|
|
103
|
+
- lib/ruby_wasm_ui/dom/mount_dom.rb
|
|
104
|
+
- lib/ruby_wasm_ui/dom/patch_dom.rb
|
|
105
|
+
- lib/ruby_wasm_ui/dom/scheduler.rb
|
|
106
|
+
- lib/ruby_wasm_ui/nodes_equal.rb
|
|
107
|
+
- lib/ruby_wasm_ui/template.rb
|
|
108
|
+
- lib/ruby_wasm_ui/template/build_conditional_group.rb
|
|
109
|
+
- lib/ruby_wasm_ui/template/build_for_group.rb
|
|
110
|
+
- lib/ruby_wasm_ui/template/build_vdom.rb
|
|
111
|
+
- lib/ruby_wasm_ui/template/parser.rb
|
|
112
|
+
- lib/ruby_wasm_ui/utils.rb
|
|
113
|
+
- lib/ruby_wasm_ui/utils/arrays.rb
|
|
114
|
+
- lib/ruby_wasm_ui/utils/objects.rb
|
|
115
|
+
- lib/ruby_wasm_ui/utils/props.rb
|
|
116
|
+
- lib/ruby_wasm_ui/utils/strings.rb
|
|
117
|
+
- lib/ruby_wasm_ui/vdom.rb
|
|
118
|
+
- lib/ruby_wasm_ui/version.rb
|
|
94
119
|
- package-lock.json
|
|
95
120
|
- package.json
|
|
96
121
|
- packages/npm-packages/runtime/Gemfile
|
|
@@ -114,30 +139,8 @@ files:
|
|
|
114
139
|
- packages/npm-packages/runtime/spec/spec_helper.rb
|
|
115
140
|
- packages/npm-packages/runtime/src/__tests__/sample.test.js
|
|
116
141
|
- packages/npm-packages/runtime/src/index.js
|
|
142
|
+
- packages/npm-packages/runtime/src/ruby_wasm_ui
|
|
117
143
|
- packages/npm-packages/runtime/src/ruby_wasm_ui.rb
|
|
118
|
-
- packages/npm-packages/runtime/src/ruby_wasm_ui/app.rb
|
|
119
|
-
- packages/npm-packages/runtime/src/ruby_wasm_ui/component.rb
|
|
120
|
-
- packages/npm-packages/runtime/src/ruby_wasm_ui/dispatcher.rb
|
|
121
|
-
- packages/npm-packages/runtime/src/ruby_wasm_ui/dom.rb
|
|
122
|
-
- packages/npm-packages/runtime/src/ruby_wasm_ui/dom/attributes.rb
|
|
123
|
-
- packages/npm-packages/runtime/src/ruby_wasm_ui/dom/destroy_dom.rb
|
|
124
|
-
- packages/npm-packages/runtime/src/ruby_wasm_ui/dom/events.rb
|
|
125
|
-
- packages/npm-packages/runtime/src/ruby_wasm_ui/dom/mount_dom.rb
|
|
126
|
-
- packages/npm-packages/runtime/src/ruby_wasm_ui/dom/patch_dom.rb
|
|
127
|
-
- packages/npm-packages/runtime/src/ruby_wasm_ui/dom/scheduler.rb
|
|
128
|
-
- packages/npm-packages/runtime/src/ruby_wasm_ui/nodes_equal.rb
|
|
129
|
-
- packages/npm-packages/runtime/src/ruby_wasm_ui/template.rb
|
|
130
|
-
- packages/npm-packages/runtime/src/ruby_wasm_ui/template/build_conditional_group.rb
|
|
131
|
-
- packages/npm-packages/runtime/src/ruby_wasm_ui/template/build_for_group.rb
|
|
132
|
-
- packages/npm-packages/runtime/src/ruby_wasm_ui/template/build_vdom.rb
|
|
133
|
-
- packages/npm-packages/runtime/src/ruby_wasm_ui/template/parser.rb
|
|
134
|
-
- packages/npm-packages/runtime/src/ruby_wasm_ui/utils.rb
|
|
135
|
-
- packages/npm-packages/runtime/src/ruby_wasm_ui/utils/arrays.rb
|
|
136
|
-
- packages/npm-packages/runtime/src/ruby_wasm_ui/utils/objects.rb
|
|
137
|
-
- packages/npm-packages/runtime/src/ruby_wasm_ui/utils/props.rb
|
|
138
|
-
- packages/npm-packages/runtime/src/ruby_wasm_ui/utils/strings.rb
|
|
139
|
-
- packages/npm-packages/runtime/src/ruby_wasm_ui/vdom.rb
|
|
140
|
-
- packages/npm-packages/runtime/src/ruby_wasm_ui/version.rb
|
|
141
144
|
- packages/npm-packages/runtime/vitest.config.js
|
|
142
145
|
- playwright.config.js
|
|
143
146
|
- sig/ruby_wasm_ui.rbs
|
data/lib/ruby_wasm_ui
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
../packages/npm-packages/runtime/src/ruby_wasm_ui
|
data/lib/ruby_wasm_ui.rb
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
../packages/npm-packages/runtime/src/ruby_wasm_ui.rb
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require_relative "ruby_wasm_ui/app"
|
|
4
|
-
require_relative "ruby_wasm_ui/component"
|
|
5
|
-
require_relative "ruby_wasm_ui/dispatcher"
|
|
6
|
-
require_relative "ruby_wasm_ui/dom"
|
|
7
|
-
require_relative "ruby_wasm_ui/nodes_equal"
|
|
8
|
-
require_relative "ruby_wasm_ui/template"
|
|
9
|
-
require_relative "ruby_wasm_ui/utils"
|
|
10
|
-
require_relative "ruby_wasm_ui/vdom"
|
|
11
|
-
require_relative "ruby_wasm_ui/version"
|
|
12
|
-
|
|
13
|
-
module RubyWasmUi
|
|
14
|
-
end
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/data/{packages/npm-packages/runtime/src → lib}/ruby_wasm_ui/template/build_conditional_group.rb
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|