atome 0.5.7.5.1 → 0.5.7.5.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cfe78ba10396036f7ff7cfcb324d6e121006e841e276f0602b5ffd50e480df9f
4
- data.tar.gz: 713ee69cadbee8b0fd7d7ae7456589537c8e815e138881b183bf5eda1b4612c4
3
+ metadata.gz: cfe68326ce8511009dd9226874a9478fed337b58b33914588569477c53fc5f60
4
+ data.tar.gz: f4c496a1eed0f0ca66a8a4cc742e83c962578fa6dd23f58af4a2dda0cf658d0e
5
5
  SHA512:
6
- metadata.gz: d67424076d1715af0771efee85a60eeaa140900125e1458319c84746b00a0d3651ab0f46c530e43f3c9fa539cdc1259f532fae5ad188636dd538b6249bdc131e
7
- data.tar.gz: ff448ccf270a36189e590bafb6030cea066f35f2a960801ea6af81c70fbea9908c3d897bf04c7a214cfc0f1bb13c0a114e4b61eec69079f50ed366241cb391d6
6
+ metadata.gz: 22530cfa45962c787536df528f4609511868ecd99994b9dd1fe9f83ceca55517d69a04ce86a0cb92663c030cab0693161b3940f20a6b220aaeb3acc907976dfa
7
+ data.tar.gz: cb0f7b157205cd44f2cb254f0b3808908f740268f9dba7b8dd34323399cee13ceb9ab5387992b2816df3f8492c968fc93cbfd2d55965ac5e0bfc3cb21265b653
data/Gemfile CHANGED
@@ -1,15 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- source "https://rubygems.org"
3
+ source 'https://rubygems.org'
4
4
 
5
5
  # Specify your gem's dependencies in atome.gemspec
6
6
  gemspec
7
7
 
8
- gem "rake", "~> 13.0"
8
+ gem 'rake', '~> 13.0'
9
9
 
10
10
  gem 'faye-websocket'
11
11
 
12
- gem "minitest", "~> 5.0"
12
+ gem 'minitest', '~> 5.0'
13
13
 
14
14
  gem 'rubocop', group: 'development', require: false
15
- gem 'rubocop', group: 'development', require: false
15
+
data/atome.gemspec CHANGED
@@ -71,7 +71,7 @@ Gem::Specification.new do |spec|
71
71
  spec.add_runtime_dependency "opal", "~> 1.8"
72
72
  spec.add_runtime_dependency 'parser', '~> 3.1'
73
73
  spec.add_runtime_dependency 'puma', '~> 6.0'
74
- spec.add_runtime_dependency 'rack', '~> 2.2'
74
+ spec.add_runtime_dependency 'rack', '~> 3.1.7'
75
75
  spec.add_runtime_dependency 'rack-unreloader', '~> 1.8'
76
76
  spec.add_runtime_dependency 'rake', '~> 13.0'
77
77
  spec.add_runtime_dependency 'roda', '~> 3.5'
@@ -80,7 +80,7 @@ Gem::Specification.new do |spec|
80
80
  spec.add_runtime_dependency 'rufus-scheduler', '~> 3.8'
81
81
  spec.add_runtime_dependency 'securerandom', '~> 0.2'
82
82
  spec.add_runtime_dependency 'sequel', '~> 5.5'
83
- spec.add_runtime_dependency 'sqlite3', '~> 1.4'
83
+ spec.add_runtime_dependency 'sqlite3', '~> 2.0.2'
84
84
  spec.add_runtime_dependency 'uglifier', '~> 0.1'
85
85
  # spec.add_runtime_dependency 'atome_eVe', '>= 0.1.0.0.7'
86
86
  # spec.add_runtime_dependency 'webrick', '~> 1.7.0'
@@ -569,7 +569,7 @@ JS
569
569
  # convert any foreign object (think HTML) to a pseudo atome objet , that embed foreign objet
570
570
  end
571
571
 
572
- def touch_allow(allow)
572
+ def allow_right_touch(allow)
573
573
  if allow
574
574
  JS.eval('document.removeEventListener("contextmenu", window.preventDefaultAction);')
575
575
  else
@@ -21,13 +21,12 @@ new({ particle: :message, category: :communication, type: :hash }) do |params, b
21
21
  end
22
22
 
23
23
 
24
-
25
24
  new({ particle: :int8, category: :communication, type: :int })
26
25
 
27
- # new({ particle: :language, category: :communication, type: :string }) do |params|
28
- # @data = int8[params]
29
- # params
30
- # end
26
+ new({ particle: :language, category: :communication, type: :string }) do |params|
27
+ @data = int8[params]
28
+ params
29
+ end
31
30
  # method below are used for communication with native core
32
31
  def receptor(msg)
33
32
  parsed = JSON.parse(msg)
@@ -202,7 +202,7 @@ end
202
202
 
203
203
  # Universe.allow_localstorage = true # to stop data to be stored in localstorage
204
204
  # Universe.allow_sync= false # to stop data to be sync on server
205
- touch_allow(false) # this lock the system right click in web view
205
+ allow_right_touch(false) # this lock the system right click in web view
206
206
  # add a few default font
207
207
  A.add_text_visual({ path: 'Roboto', name: 'Roboto-Bold' })
208
208
  A.add_text_visual({ path: 'Roboto', name: 'Roboto-Thin' })
data/lib/atome/version.rb CHANGED
@@ -3,5 +3,5 @@
3
3
  # return atome version
4
4
 
5
5
  class Atome
6
- VERSION = '0.5.7.5.1'
6
+ VERSION = '0.5.7.5.4'
7
7
  end
@@ -149,6 +149,35 @@ class Atome
149
149
  end
150
150
 
151
151
  end
152
+
153
+ def drop_down(params, &code)
154
+
155
+
156
+ data_f = params.delete(:data)
157
+ text_f = params.delete(:text) || {component: {size: 12}, color: :lightgray}
158
+ margin = params.delete(:margin) || 6
159
+ default_params = { width: 150,
160
+ height: 25,
161
+ smooth:3,
162
+ shadow: { blur: 12, alpha: 0.3,left: 0, top: 0 }
163
+ }
164
+ params=default_params.merge(params)
165
+
166
+ b=grab(:view).box(params.merge({depth: 33333, left: to_px(:left), top: to_px(:top)}))
167
+ item_height=(params[:height]+margin)
168
+ item_height = text_f[:component][:size]+margin*2 if text_f[:component][:size] > item_height
169
+ b.height(data_f.length*item_height)
170
+ temp_width=0
171
+ data_f.each_with_index do |label, index|
172
+ item_f= b.text(text_f.merge({ left: margin, data: label, position: :absolute, top: item_height * index + margin }))
173
+ temp_width=item_f.to_px(:width) if item_f.to_px(:width) > temp_width
174
+ item_f.touch(:down) do
175
+ code.call(label)
176
+ b.delete(true)
177
+ end
178
+ end
179
+ b.width(temp_width+margin*2)
180
+ end
152
181
  end
153
182
 
154
183
  new(molecule: :input) do |params, bloc|
@@ -668,8 +697,6 @@ new(molecule: :show) do |page_id, &bloc|
668
697
  new_page
669
698
  end
670
699
 
671
-
672
-
673
700
  new(molecule: :buttons) do |params, &bloc|
674
701
 
675
702
  keys_to_keep = [:inactive, :active]
@@ -707,4 +734,5 @@ new(molecule: :buttons) do |params, &bloc|
707
734
  main.create_new_button(item_id, index, label, code)
708
735
  end
709
736
  main
710
- end
737
+ end
738
+
@@ -7,7 +7,7 @@ b=box({left: 99})
7
7
 
8
8
  b.touch(true) do
9
9
  allow_copy(true)
10
- touch_allow(true)
10
+ allow_right_touch(true)
11
11
  end
12
12
 
13
13
 
@@ -1,5 +1,4 @@
1
1
  # frozen_string_literal: true
2
- # class Atome
3
2
 
4
3
  b=box({ left: 12, id: :the_first_box })
5
4
  b.touch(true) do
@@ -10,7 +9,7 @@ b.touch(true) do
10
9
  else
11
10
  b.color(:red)
12
11
  end
13
- touch_allow(alt)
12
+ allow_right_touch(alt)
14
13
 
15
14
  end
16
15
 
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+
4
+ data_f = %w[initiate suspect prospect abandoned finished archived]
5
+
6
+ d_d_l = box({ id: :the_ddl, width: 160 })
7
+ d_d_l.touch(:down) do
8
+ grab(:view).drop_down({ data: data_f, }) do |params|
9
+ d_d_l.clear(true)
10
+ d_d_l.text(params)
11
+ end
12
+ end
13
+
@@ -85,7 +85,6 @@ new({ tool: :rotate }) do |params|
85
85
  }
86
86
  post_code = lambda { |params|
87
87
  # puts "post_creation_code,atome_touched: #{:params}"
88
-
89
88
  }
90
89
 
91
90
  zone_spe = lambda { |current_tool|
@@ -2,3 +2,4 @@
2
2
  # will have compiled files and executables
3
3
  /target/
4
4
 
5
+ /Cargo.lock
@@ -1,7 +1,7 @@
1
1
  [package]
2
2
  name = "atome"
3
3
  version = "0.0.0"
4
- description = "A Tauri App"
4
+ description = "atome"
5
5
  authors = ["you"]
6
6
  license = ""
7
7
  repository = ""
@@ -16,7 +16,7 @@ tauri-build = {version = "1.2", features = [] }
16
16
  [dependencies]
17
17
  serde_json = "1.0"
18
18
  serde = { version = "1.0", features = ["derive"] }
19
- tauri = {version = "1.5", features = ["api-all"] }
19
+ tauri = {version = "1.6", features = ["api-all"] }
20
20
 
21
21
  [features]
22
22
  # by default Tauri runs in production mode
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: atome
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.7.5.1
4
+ version: 0.5.7.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean-Eric Godard
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-07-17 00:00:00.000000000 Z
11
+ date: 2024-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eventmachine
@@ -184,14 +184,14 @@ dependencies:
184
184
  requirements:
185
185
  - - "~>"
186
186
  - !ruby/object:Gem::Version
187
- version: '2.2'
187
+ version: 3.1.7
188
188
  type: :runtime
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
192
  - - "~>"
193
193
  - !ruby/object:Gem::Version
194
- version: '2.2'
194
+ version: 3.1.7
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: rack-unreloader
197
197
  requirement: !ruby/object:Gem::Requirement
@@ -310,14 +310,14 @@ dependencies:
310
310
  requirements:
311
311
  - - "~>"
312
312
  - !ruby/object:Gem::Version
313
- version: '1.4'
313
+ version: 2.0.2
314
314
  type: :runtime
315
315
  prerelease: false
316
316
  version_requirements: !ruby/object:Gem::Requirement
317
317
  requirements:
318
318
  - - "~>"
319
319
  - !ruby/object:Gem::Version
320
- version: '1.4'
320
+ version: 2.0.2
321
321
  - !ruby/object:Gem::Dependency
322
322
  name: uglifier
323
323
  requirement: !ruby/object:Gem::Requirement
@@ -573,6 +573,7 @@ files:
573
573
  - vendor/assets/application/examples/display_bck.rb
574
574
  - vendor/assets/application/examples/drag.rb
575
575
  - vendor/assets/application/examples/drop.rb
576
+ - vendor/assets/application/examples/drop_down_list.rb
576
577
  - vendor/assets/application/examples/duplicate.rb
577
578
  - vendor/assets/application/examples/edit.rb
578
579
  - vendor/assets/application/examples/encode.rb