omarchy-ui 0.0.5-x86_64-linux → 0.0.7-x86_64-linux

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: 3fbf5b96c9328c174f2b4f23eaa0d77c94abef05b7248e8c8dfe3c9faccb8295
4
- data.tar.gz: 3e132767616cad3a67a1422dbb37797f9f7d82a2f3e4230aaf46e036c73a11d2
3
+ metadata.gz: d389e6d9a8382cb8feec3a900ce2b4ee14001d214a069e96be8e7567e549f39e
4
+ data.tar.gz: 77d33296ea0cc16f08a93bb94a17607a3b50d19e036f2649304a89fcc4b9f455
5
5
  SHA512:
6
- metadata.gz: c50abde08e09b6fbdfaedcedd5fbb11ba7b4a2acbdce67ad147f620981b11bd534857cfcc40c846007603333547a94b64c7d648acdcd07e16d0a1b0811044980
7
- data.tar.gz: f8ac9e2883b7a34423c01007171d0baf417dd19ef7c290a65609d16fc283130dfb3a44a0a744def7a0c52b18ad3d074cb7e3d572ed9c4efa21da799436b0086f
6
+ metadata.gz: 2be91201712539398abbf26b03cc3298947d2ff040da32e7171009ef70fdb4127adb7ab5992088176a5f28d5f901cdf4bcdfec68e65c13123bcb3fc61c2206f7
7
+ data.tar.gz: 89953562fbc3a943290234a297e5cd0f6ecf98b9f7b17a9188a5072716cf42e39e7281c724b97d2b4926df7aabd973485dbbc012ad3285447aaf36de9a7f5514
data/README.md CHANGED
@@ -10,7 +10,7 @@
10
10
  </p>
11
11
 
12
12
  <p align="center">
13
- <img alt="Omarchy UI 0.0.5" src="https://img.shields.io/badge/Omarchy_UI-0.0.5-b7ff5a?style=flat-square&labelColor=111711">
13
+ <img alt="Omarchy UI 0.0.7" src="https://img.shields.io/badge/Omarchy_UI-0.0.7-b7ff5a?style=flat-square&labelColor=111711">
14
14
  <img alt="Ruby 3.1 or newer" src="https://img.shields.io/badge/Ruby-3.1%2B-cc342d?style=flat-square&logo=ruby&logoColor=white">
15
15
  <img alt="Zui 0.0.10" src="https://img.shields.io/badge/Zui-0.0.10-7ee14b?style=flat-square&labelColor=111711">
16
16
  <img alt="241 components" src="https://img.shields.io/badge/components-241-75d943?style=flat-square&labelColor=111711">
@@ -63,9 +63,10 @@ and the Omarchy adapter.
63
63
  - Ruby 3.1 or newer while installing the gem and developing applications;
64
64
  - optional Qt modules for components that use features such as Quick 3D or Multimedia.
65
65
 
66
- The finished Omarchy bundle includes the framework and mruby executable, so the destination does
67
- not need the Ruby interpreter or framework gems. A component fails with an explicit error when its
68
- required Qt module or resource is unavailable; Omarchy UI never substitutes a different component.
66
+ The finished Omarchy bundle includes the Omarchy adapter, mruby executable, and a Zui-generated QML
67
+ runtime tree-shaken to the components referenced by that application. The destination does not need
68
+ Ruby or framework gems. A component fails with an explicit error when its required Qt module or
69
+ resource is unavailable; Omarchy UI never substitutes a different component.
69
70
 
70
71
  ## Quick start
71
72
 
@@ -101,7 +102,7 @@ counter/
101
102
  omarchy_ui run main.rb
102
103
  ```
103
104
 
104
- `run` bundles the project's Ruby entry point, prepares the versioned Zui catalog and Omarchy host,
105
+ `run` bundles the project's Ruby entry point, asks Zui to tree-shake the QML runtime, prepares the Omarchy host,
105
106
  then launches it through Quickshell.
106
107
 
107
108
  ## Application model
@@ -333,7 +334,7 @@ omarchy_ui <command> [arguments]
333
334
  | --- | --- | --- |
334
335
  | `omarchy_ui new NAME` | One application name | Creates a new application directory using a URL-safe form of the name |
335
336
  | `omarchy_ui run FILE` | One Ruby entry point | Runs an application through the Omarchy/Quickshell host |
336
- | `omarchy_ui bundle [DIRECTORY]` | Zero or one project directory | Creates `dist/<project-name>` with the application, adapter, catalog, and runtime |
337
+ | `omarchy_ui bundle [DIRECTORY]` | Zero or one project directory | Creates `dist/<project-name>` with the application, Omarchy adapter, runtime, and tree-shaken Zui QML |
337
338
  | `omarchy_ui validate [DIRECTORY]` | Zero or one plugin directory | Stages the complete plugin and delegates validation to `omarchy plugin validate` |
338
339
  | `omarchy_ui push [DIRECTORY]` | Optional `--no-enable` and `--no-restart` | Atomically installs and activates a validated plugin |
339
340
  | `omarchy_ui version` | None | Prints the installed Omarchy UI version |
@@ -360,9 +361,10 @@ dist/my-application/
360
361
  ├── Service.qml # process and surface bridge
361
362
  ├── Panel.qml # shell panel adapter
362
363
  ├── BarWidget.qml # shell bar adapter
363
- ├── ControlNode.qml # Zui protocol router
364
- ├── Components/ # complete native catalog
365
- ├── Controls/ Theme/ Fonts/ # Zui presentation modules
364
+ ├── ControlNode.qml # generated Zui protocol renderer
365
+ ├── Components/Builtins/ # only component adapters selected by Zui
366
+ ├── Controls/ Theme/ Fonts/ # generated renderer dependencies
367
+ ├── zui-tree-shake.json # auditable selected-component report
366
368
  ├── Commons@ Ui@ # links to Omarchy's shell modules
367
369
  ├── omarchy-ui-runtime # embedded mruby executable
368
370
  ├── omarchy-ui-runtime.sha256
@@ -372,7 +374,8 @@ dist/my-application/
372
374
 
373
375
  Plugin bundles use the same runtime package and are validated against their manifest before the
374
376
  bundle command succeeds. Generated packages exclude `.git`, previous `dist` output, and stale
375
- adapter/runtime files.
377
+ adapter/runtime files before regenerating the minimal QML package. Omarchy UI pins Zui 0.0.10 so the
378
+ tree-shaken QML exactly matches the Zui core embedded in the deterministic mruby runtime.
376
379
 
377
380
  ## Component catalog
378
381
 
@@ -459,9 +462,9 @@ The dependency direction is deliberate:
459
462
  integration, plugin lifecycle commands, and Omarchy packaging.
460
463
  - **Applications own** Ruby source, assets, state, behavior, and reusable UI modules.
461
464
 
462
- At run, bundle, validation, or push time, the adapter installs Zui's versioned QML package, removes
463
- the standard desktop entry point, and overlays the four Omarchy host files. It does not copy or fork
464
- Zui component implementations in this repository. Read the full [QML ownership and adapter
465
+ At bundle, validation, and push time, Omarchy UI asks Zui to analyze the bundled Ruby syntax and
466
+ generate only the required component adapters plus their renderer dependencies. The four Omarchy
467
+ host files then replace Zui's generic desktop host. Read the full [QML ownership and adapter
465
468
  boundary](docs/qml-support.md).
466
469
 
467
470
  ## Runtime integrity
data/Service.qml CHANGED
@@ -14,7 +14,6 @@ Item {
14
14
  readonly property string rubyProgram: pluginDir + "/main.rb"
15
15
  property string program: ""
16
16
  readonly property string effectiveRubyProgram: program !== "" ? program : rubyProgram
17
-
18
17
  property bool ready: false
19
18
  property bool stopping: false
20
19
  property string lastError: ""
@@ -1,6 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "fileutils"
4
+ require "json"
5
+ require "tmpdir"
4
6
 
5
7
  module OmarchyUI
6
8
  module Runtime
@@ -8,12 +10,14 @@ module OmarchyUI
8
10
 
9
11
  BUNDLED = File.expand_path("../../vendor/runtime/x86_64-linux/omarchy-ui-runtime", __dir__)
10
12
  ADAPTER_FILES = %w[Service.qml Panel.qml BarWidget.qml App.qml].freeze
11
- CORE_FILES = %w[ControlNode.qml Components Controls Theme Fonts].freeze
12
- FILES = (ADAPTER_FILES + ["ControlNode.qml"]).freeze
13
+ ZUI_GENERATED_ENTRIES = %w[Desktop.qml ControlNode.qml Components Controls Theme Fonts].freeze
14
+ TREE_SHAKE_REPORT = "zui-tree-shake.json"
15
+ FILES = (ADAPTER_FILES + %w[ControlNode.qml]).freeze
13
16
  AUDIT_FILES = %w[
14
17
  omarchy-ui-runtime.sha256 runtime-provenance.json RUNTIME_PROVENANCE.md
15
18
  ].freeze
16
- GENERATED_ENTRIES = (ADAPTER_FILES + CORE_FILES + %w[Desktop.qml omarchy-ui-runtime]).freeze
19
+ GENERATED_ENTRIES = (ADAPTER_FILES + ZUI_GENERATED_ENTRIES +
20
+ [TREE_SHAKE_REPORT, "omarchy-ui-runtime"]).freeze
17
21
 
18
22
  def executable
19
23
  override = ENV["OMARCHY_UI_RUNTIME"]
@@ -35,12 +39,24 @@ module OmarchyUI
35
39
  FileUtils.rm_f(temporary) if temporary && File.exist?(temporary)
36
40
  end
37
41
 
38
- def install_package(path, framework_root: FRAMEWORK_ROOT)
39
- Zui::Runtime.install_qml(path)
40
- FileUtils.rm_f(File.join(path, "Desktop.qml"))
42
+ def install_package(path, framework_root: FRAMEWORK_ROOT, project: path)
43
+ FileUtils.mkdir_p(path)
44
+ GENERATED_ENTRIES.each do |entry|
45
+ generated = File.join(path, entry)
46
+ File.directory?(generated) ? FileUtils.remove_entry(generated) : FileUtils.rm_f(generated)
47
+ end
48
+ report = install_tree_shaken_zui(path, project:)
41
49
  ADAPTER_FILES.each do |file|
42
50
  FileUtils.cp(File.join(framework_root, file), File.join(path, file))
43
51
  end
52
+ File.write(File.join(path, TREE_SHAKE_REPORT), JSON.pretty_generate({
53
+ "zui_version" => Zui::VERSION,
54
+ "components" => report.components.map(&:to_s),
55
+ "before_bytes" => report.before_bytes,
56
+ "after_bytes" => report.after_bytes,
57
+ "saved_bytes" => report.saved_bytes,
58
+ "warnings" => report.warnings
59
+ }) + "\n")
44
60
 
45
61
  if File.file?(BUNDLED)
46
62
  destination = File.join(path, "omarchy-ui-runtime")
@@ -54,10 +70,22 @@ module OmarchyUI
54
70
  path
55
71
  end
56
72
 
57
- def install_components(path, **)
58
- Zui::Runtime.install_qml(path)
59
- FileUtils.rm_f(File.join(path, "Desktop.qml"))
60
- path
73
+ def install_components(path, **options)
74
+ install_package(path, **options)
75
+ end
76
+
77
+ def install_tree_shaken_zui(destination, project:)
78
+ Dir.mktmpdir("omarchy-ui-zui-") do |temporary|
79
+ qml = File.join(temporary, "qml")
80
+ native = File.join(temporary, "native")
81
+ FileUtils.mkdir_p(native)
82
+ Zui::Runtime.install_qml(qml)
83
+ report = Zui::TreeShaker.new(project:, framework: qml, native:).shake!
84
+ FileUtils.rm_f([File.join(qml, "Desktop.qml"), File.join(qml, "Service.qml")])
85
+ entries = Dir.children(qml).map { |entry| File.join(qml, entry) }
86
+ FileUtils.cp_r(entries, destination) unless entries.empty?
87
+ return report
88
+ end
61
89
  end
62
90
  end
63
91
  end
data/lib/omarchy_ui.rb CHANGED
@@ -11,7 +11,7 @@ rescue LoadError
11
11
  end
12
12
 
13
13
  module OmarchyUI
14
- VERSION = "0.0.5"
14
+ VERSION = "0.0.7"
15
15
  ZUI_VERSION = Zui::VERSION
16
16
  FRAMEWORK_ROOT = File.expand_path("..", __dir__)
17
17
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omarchy-ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.7
5
5
  platform: x86_64-linux
6
6
  authors:
7
7
  - Adam Moussa Ali
@@ -13,14 +13,14 @@ dependencies:
13
13
  name: zui
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
- - - "~>"
16
+ - - '='
17
17
  - !ruby/object:Gem::Version
18
18
  version: 0.0.10
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
- - - "~>"
23
+ - - '='
24
24
  - !ruby/object:Gem::Version
25
25
  version: 0.0.10
26
26
  description: The Omarchy adapter for the platform-neutral Zui desktop framework.