buninu-browser 0.3.0 → 0.4.0

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.
Files changed (239) hide show
  1. package/LICENSES/jsmdcui.txt +22 -0
  2. package/README.md +19 -4
  3. package/frontends/wayland/LICENSE-land +21 -0
  4. package/frontends/wayland/README.md +123 -0
  5. package/frontends/wayland/casty/LICENSE +21 -0
  6. package/frontends/wayland/casty/bookmarks.js +32 -0
  7. package/frontends/wayland/casty/click.js +96 -0
  8. package/frontends/wayland/casty/commands.js +61 -0
  9. package/frontends/wayland/casty/config.js +45 -0
  10. package/frontends/wayland/casty/download-directory.js +28 -0
  11. package/frontends/wayland/casty/download.js +49 -0
  12. package/frontends/wayland/casty/hints.js +334 -0
  13. package/frontends/wayland/casty/keys.js +56 -0
  14. package/frontends/wayland/casty/page-commands.js +80 -0
  15. package/frontends/wayland/casty/prompt-width.js +148 -0
  16. package/frontends/wayland/casty/urlbar.js +606 -0
  17. package/frontends/wayland/client.js +88 -0
  18. package/frontends/wayland/clipboard.js +80 -0
  19. package/frontends/wayland/index.js +116 -0
  20. package/frontends/wayland/input.js +56 -0
  21. package/frontends/wayland/protocol.js +55 -0
  22. package/frontends/wayland/protocols/wayland.xml +3248 -0
  23. package/frontends/wayland/protocols/xdg-shell.xml +1415 -0
  24. package/frontends/wayland/transport.js +120 -0
  25. package/frontends/wayland/urlbar.js +158 -0
  26. package/index.js +28 -1
  27. package/lib/clipboard-command.js +10 -0
  28. package/lib/clipboard-powershell.js +22 -0
  29. package/lib/clipboard.js +37 -2
  30. package/lib/document-types.js +11 -0
  31. package/lib/headless-shell.js +47 -8
  32. package/lib/layout/text-layout.js +17 -9
  33. package/lib/paint/display-list.js +5 -1
  34. package/lib/qml/README.md +971 -0
  35. package/lib/qml/builtins.js +700 -0
  36. package/lib/qml/canvas-dom.js +115 -0
  37. package/lib/qml/document.js +1176 -0
  38. package/lib/qml/format.js +9 -0
  39. package/lib/qml/host.js +324 -0
  40. package/lib/qml/images.js +199 -0
  41. package/lib/qml/launcher.js +132 -0
  42. package/lib/qml/loader.js +517 -0
  43. package/lib/qml/media-renderer.js +49 -0
  44. package/lib/qml/media.js +86 -0
  45. package/lib/qml/models.js +622 -0
  46. package/lib/qml/parser.js +381 -0
  47. package/lib/qml/qs +5 -0
  48. package/lib/qml/qscasty +3 -0
  49. package/lib/qml/qsheadless +3 -0
  50. package/lib/qml/qswayland +3 -0
  51. package/lib/qml/reactive.js +159 -0
  52. package/lib/qml/runtime.js +3381 -0
  53. package/lib/qml/shapes.js +243 -0
  54. package/lib/qml/text.js +109 -0
  55. package/lib/qml/textures.js +123 -0
  56. package/lib/qml/wayland-clipboard.js +32 -0
  57. package/lib/qml/worker-thread.js +70 -0
  58. package/lib/render-tree/index.js +16 -1
  59. package/lib/renderer/bindings.js +11 -0
  60. package/lib/renderer/canvas-2d.js +13 -0
  61. package/lib/renderer/host.js +31 -6
  62. package/lib/renderer/main.js +19 -6
  63. package/lib/renderer/page-realm.js +16 -1
  64. package/lib/renderer/page-renderer.js +230 -13
  65. package/lib/renderer/text-input-paint.js +54 -0
  66. package/lib/renderer/text-input.js +57 -0
  67. package/lib/style/computed-style.js +2 -2
  68. package/package.json +1 -1
  69. package/test/clipboard.test.js +19 -0
  70. package/test/fixtures/flea-helpers/Dockerfile +36 -0
  71. package/test/fixtures/flea-helpers/bat.mjs +43 -0
  72. package/test/fixtures/flea-helpers/bin/bat +3 -0
  73. package/test/fixtures/flea-helpers/bin/bwrap +10 -0
  74. package/test/fixtures/flea-helpers/bin/bwrap-real-filter +9 -0
  75. package/test/fixtures/flea-helpers/bin/glow +3 -0
  76. package/test/fixtures/flea-helpers/bin/qs +3 -0
  77. package/test/fixtures/flea-helpers/bin/unsupported +3 -0
  78. package/test/fixtures/flea-helpers/check-highlighting.mjs +47 -0
  79. package/test/fixtures/flea-helpers/check-media.mjs +29 -0
  80. package/test/fixtures/flea-helpers/check-preview.mjs +27 -0
  81. package/test/fixtures/flea-helpers/check.mjs +36 -0
  82. package/test/fixtures/flea-helpers/highlight-cases.json +227 -0
  83. package/test/fixtures/flea-helpers/source-mime.xml +28 -0
  84. package/test/fixtures/flea-helpers/syntax-compat.mjs +23 -0
  85. package/test/fixtures/flea-thumbnail-stub/flea-placeholder.thumbnailer +4 -0
  86. package/test/fixtures/flea-thumbnail-stub/flea-thumbnail-stub +3 -0
  87. package/test/fixtures/qml/flea/EscapeHint.qml +11 -0
  88. package/test/fixtures/qml/flea/LICENSE +21 -0
  89. package/test/fixtures/qml/flea/README.md +25 -0
  90. package/test/fixtures/qml/flea/Theme.qml +8 -0
  91. package/test/fixtures/qml/flea/demo.qml +24 -0
  92. package/test/fixtures/qml/flea/qmldir +3 -0
  93. package/test/fixtures/qml/flea-theme/LICENSE-Flea +21 -0
  94. package/test/fixtures/qml/flea-theme/LICENSE-Omarchy +20 -0
  95. package/test/fixtures/qml/flea-theme/README.md +70 -0
  96. package/test/fixtures/qml/flea-theme/button.qml +17 -0
  97. package/test/fixtures/qml/flea-theme/demo.qml +27 -0
  98. package/test/fixtures/qml/flea-theme/field.qml +21 -0
  99. package/test/fixtures/qml/flea-theme/imports/qs/Commons/BorderGeometry.js +373 -0
  100. package/test/fixtures/qml/flea-theme/imports/qs/Commons/Color.qml +258 -0
  101. package/test/fixtures/qml/flea-theme/imports/qs/Commons/I18n.qml +118 -0
  102. package/test/fixtures/qml/flea-theme/imports/qs/Commons/Numbers.js +19 -0
  103. package/test/fixtures/qml/flea-theme/imports/qs/Commons/Plural.js +91 -0
  104. package/test/fixtures/qml/flea-theme/imports/qs/Commons/Style.qml +561 -0
  105. package/test/fixtures/qml/flea-theme/imports/qs/Commons/Util.qml +188 -0
  106. package/test/fixtures/qml/flea-theme/imports/qs/Commons/qmldir +13 -0
  107. package/test/fixtures/qml/flea-theme/segment.qml +17 -0
  108. package/test/fixtures/qml/flea-theme/settings.qml +58 -0
  109. package/test/fixtures/qml/flea-theme/text-metrics.qml +10 -0
  110. package/test/fixtures/qml/flea-theme/ui/DialogButton.qml +150 -0
  111. package/test/fixtures/qml/flea-theme/ui/DialogField.qml +147 -0
  112. package/test/fixtures/qml/flea-theme/ui/EscapeHint.qml +11 -0
  113. package/test/fixtures/qml/flea-theme/ui/Glass.qml +114 -0
  114. package/test/fixtures/qml/flea-theme/ui/Glyph.qml +54 -0
  115. package/test/fixtures/qml/flea-theme/ui/GlyphSolid.qml +22 -0
  116. package/test/fixtures/qml/flea-theme/ui/Reveal.qml +54 -0
  117. package/test/fixtures/qml/flea-theme/ui/SettingsRuler.qml +85 -0
  118. package/test/fixtures/qml/flea-theme/ui/SettingsSegment.qml +85 -0
  119. package/test/fixtures/qml/flea-theme/ui/StableModel.qml +89 -0
  120. package/test/fixtures/qml/flea-theme/ui/Theme.qml +460 -0
  121. package/test/fixtures/qml/flea-theme/ui/ThemeColors.qml +43 -0
  122. package/test/fixtures/qml/flea-theme/ui/ViewState.qml +565 -0
  123. package/test/fixtures/qml/flea-theme/ui/js/Anchor.js +379 -0
  124. package/test/fixtures/qml/flea-theme/ui/js/AnchorHold.js +162 -0
  125. package/test/fixtures/qml/flea-theme/ui/js/Archive.js +157 -0
  126. package/test/fixtures/qml/flea-theme/ui/js/BackReturn.js +110 -0
  127. package/test/fixtures/qml/flea-theme/ui/js/Buttons.js +54 -0
  128. package/test/fixtures/qml/flea-theme/ui/js/ColumnMenu.js +111 -0
  129. package/test/fixtures/qml/flea-theme/ui/js/Columns.js +298 -0
  130. package/test/fixtures/qml/flea-theme/ui/js/Contrast.js +157 -0
  131. package/test/fixtures/qml/flea-theme/ui/js/Density.js +44 -0
  132. package/test/fixtures/qml/flea-theme/ui/js/DirSizes.js +129 -0
  133. package/test/fixtures/qml/flea-theme/ui/js/ExtThumbs.js +115 -0
  134. package/test/fixtures/qml/flea-theme/ui/js/Filter.js +284 -0
  135. package/test/fixtures/qml/flea-theme/ui/js/FolderSorts.js +108 -0
  136. package/test/fixtures/qml/flea-theme/ui/js/Format.js +305 -0
  137. package/test/fixtures/qml/flea-theme/ui/js/Icons.js +206 -0
  138. package/test/fixtures/qml/flea-theme/ui/js/Input.js +39 -0
  139. package/test/fixtures/qml/flea-theme/ui/js/KeyName.js +64 -0
  140. package/test/fixtures/qml/flea-theme/ui/js/Keymap.js +370 -0
  141. package/test/fixtures/qml/flea-theme/ui/js/Kinds.js +145 -0
  142. package/test/fixtures/qml/flea-theme/ui/js/Lists.js +11 -0
  143. package/test/fixtures/qml/flea-theme/ui/js/MakeDefault.js +186 -0
  144. package/test/fixtures/qml/flea-theme/ui/js/Match.js +27 -0
  145. package/test/fixtures/qml/flea-theme/ui/js/Material.js +109 -0
  146. package/test/fixtures/qml/flea-theme/ui/js/Menu.js +513 -0
  147. package/test/fixtures/qml/flea-theme/ui/js/Motion.js +16 -0
  148. package/test/fixtures/qml/flea-theme/ui/js/Mounts.js +320 -0
  149. package/test/fixtures/qml/flea-theme/ui/js/MouseNav.js +13 -0
  150. package/test/fixtures/qml/flea-theme/ui/js/Nav.js +328 -0
  151. package/test/fixtures/qml/flea-theme/ui/js/Palette.js +33 -0
  152. package/test/fixtures/qml/flea-theme/ui/js/Places.js +236 -0
  153. package/test/fixtures/qml/flea-theme/ui/js/Protocols.js +296 -0
  154. package/test/fixtures/qml/flea-theme/ui/js/RecentMode.js +154 -0
  155. package/test/fixtures/qml/flea-theme/ui/js/Search.js +396 -0
  156. package/test/fixtures/qml/flea-theme/ui/js/Settings.js +476 -0
  157. package/test/fixtures/qml/flea-theme/ui/js/SettingsAbout.js +99 -0
  158. package/test/fixtures/qml/flea-theme/ui/js/SettingsShelf.js +52 -0
  159. package/test/fixtures/qml/flea-theme/ui/js/Sort.js +127 -0
  160. package/test/fixtures/qml/flea-theme/ui/js/StateWords.js +42 -0
  161. package/test/fixtures/qml/flea-theme/ui/js/Swap.js +166 -0
  162. package/test/fixtures/qml/flea-theme/ui/js/TextSize.js +107 -0
  163. package/test/fixtures/qml/flea-theme/ui/js/Thumbs.js +158 -0
  164. package/test/fixtures/qml/flea-theme/ui/js/UiState.js +438 -0
  165. package/test/fixtures/qml/flea-theme/ui/js/Update.js +132 -0
  166. package/test/fixtures/qml/flea-theme/ui/js/UserDirs.js +56 -0
  167. package/test/fixtures/qml/flea-theme/ui/qmldir +227 -0
  168. package/test/fixtures/qml/hello.qml +26 -0
  169. package/test/fixtures/qml/imports/Demo/Toolkit/VersionLabel.qml +2 -0
  170. package/test/fixtures/qml/imports/Demo/Toolkit/VersionLabelNew.qml +2 -0
  171. package/test/fixtures/qml/imports/Demo/Toolkit/qmldir +3 -0
  172. package/test/fixtures/qml/imports/components/Badge.qml +15 -0
  173. package/test/fixtures/qml/imports/logic/base.js +2 -0
  174. package/test/fixtures/qml/imports/logic/counter.js +4 -0
  175. package/test/fixtures/qml/imports/logic/math.js +3 -0
  176. package/test/fixtures/qml/imports/logic/shared.js +3 -0
  177. package/test/fixtures/qml/imports/main.qml +21 -0
  178. package/test/fixtures/qml/imports/theme/Theme.qml +8 -0
  179. package/test/fixtures/qml/imports/theme/qmldir +2 -0
  180. package/test/fixtures/qml/multiply.qml +61 -0
  181. package/test/fixtures/qml-canvas-dom.js +90 -0
  182. package/test/fixtures/qml-media-audio.js +39 -0
  183. package/test/helpers/flea-sandbox.js +48 -0
  184. package/test/helpers/quickshell-fixture.js +125 -0
  185. package/test/html-clipboard-wayland.test.js +47 -0
  186. package/test/index.test.js +13 -0
  187. package/test/manual-casty-without-qml.js +87 -0
  188. package/test/manual-flea-application.js +49 -0
  189. package/test/manual-flea-binary.js +62 -0
  190. package/test/manual-flea-qml.js +9 -0
  191. package/test/manual-flea-settings.js +40 -0
  192. package/test/manual-flea-theme.js +40 -0
  193. package/test/manual-qml-removal.js +46 -0
  194. package/test/manual-without-qml.js +45 -0
  195. package/test/qml-canvas-dom.test.js +37 -0
  196. package/test/qml-clipboard-bridge.test.js +25 -0
  197. package/test/qml-clipboard-wayland.test.js +40 -0
  198. package/test/qml-connections-timing.test.js +73 -0
  199. package/test/qml-dynamic.test.js +401 -0
  200. package/test/qml-flea-app.test.js +146 -0
  201. package/test/qml-flea-backend.test.js +78 -0
  202. package/test/qml-flea-columns-backend.test.js +38 -0
  203. package/test/qml-flea-compile.test.js +78 -0
  204. package/test/qml-flea-launcher.test.js +88 -0
  205. package/test/qml-flea-markdown-backend.test.js +31 -0
  206. package/test/qml-flea-media.test.js +28 -0
  207. package/test/qml-flea-navigation-backend.test.js +35 -0
  208. package/test/qml-flea-navigation-timing.test.js +147 -0
  209. package/test/qml-flea-preview-backend.test.js +53 -0
  210. package/test/qml-flea-previews.test.js +163 -0
  211. package/test/qml-flea-rows.test.js +101 -0
  212. package/test/qml-flea-textures.test.js +59 -0
  213. package/test/qml-flea-view-switch.test.js +33 -0
  214. package/test/qml-flea-wayland.test.js +68 -0
  215. package/test/qml-flea.test.js +34 -0
  216. package/test/qml-host.test.js +238 -0
  217. package/test/qml-imports.test.js +102 -0
  218. package/test/qml-inherited-handlers.test.js +51 -0
  219. package/test/qml-input-selection.test.js +66 -0
  220. package/test/qml-interactions.test.js +309 -0
  221. package/test/qml-language.test.js +167 -0
  222. package/test/qml-launcher.test.js +54 -0
  223. package/test/qml-layout-text.test.js +205 -0
  224. package/test/qml-media.test.js +63 -0
  225. package/test/qml-persisted-delegates.test.js +45 -0
  226. package/test/qml-quickshell-controls.test.js +65 -0
  227. package/test/qml-quickshell-settings.test.js +62 -0
  228. package/test/qml-repeater.test.js +72 -0
  229. package/test/qml-style-updates.test.js +124 -0
  230. package/test/qml-textures.test.js +66 -0
  231. package/test/qml-views.test.js +332 -0
  232. package/test/qml-worker.test.js +69 -0
  233. package/test/qml.test.js +83 -0
  234. package/test/renderer-host.test.js +11 -0
  235. package/test/text-input-pointer.test.js +31 -0
  236. package/test/text-input-scroll.test.js +29 -0
  237. package/test/text-input.test.js +47 -0
  238. package/test/wayland-frontend.test.js +83 -0
  239. package/test/wayland-urlbar.test.js +38 -0
@@ -0,0 +1,227 @@
1
+ [
2
+ {
3
+ "name": "sample.js",
4
+ "lang": "js",
5
+ "text": "const answer = 42; // comment\n"
6
+ },
7
+ {
8
+ "name": "sample.mjs",
9
+ "lang": "JavaScript",
10
+ "text": "export const answer = 42;\n"
11
+ },
12
+ {
13
+ "name": "sample.cjs",
14
+ "lang": "node",
15
+ "text": "const answer = require(\"fs\");\n"
16
+ },
17
+ {
18
+ "name": "sample.jsx",
19
+ "lang": "jsx",
20
+ "text": "const answer = 42;\n"
21
+ },
22
+ {
23
+ "name": "sample.ts",
24
+ "lang": "ts",
25
+ "text": "const answer: number = 42;\n"
26
+ },
27
+ {
28
+ "name": "sample.tsx",
29
+ "lang": "tsx",
30
+ "text": "const answer: number = 42;\n"
31
+ },
32
+ {
33
+ "name": "sample.mts",
34
+ "lang": "typescript",
35
+ "text": "export const answer: number = 42;\n"
36
+ },
37
+ {
38
+ "name": "sample.py",
39
+ "lang": "python3",
40
+ "text": "def answer():\n return 42 # comment\n"
41
+ },
42
+ {
43
+ "name": "sample.sh",
44
+ "lang": "bash",
45
+ "text": "#!/bin/sh\necho \"$HOME\" # comment\n"
46
+ },
47
+ {
48
+ "name": "sample.zsh",
49
+ "lang": "zsh",
50
+ "text": "#!/bin/zsh\necho \"$HOME\"\n"
51
+ },
52
+ {
53
+ "name": "sample.fish",
54
+ "lang": "fish",
55
+ "text": "echo \"$HOME\"\n"
56
+ },
57
+ {
58
+ "name": "sample.json",
59
+ "lang": "json",
60
+ "text": "{\"answer\":42,\"ok\":true}\n"
61
+ },
62
+ {
63
+ "name": "sample.jsonc",
64
+ "lang": "jsonc",
65
+ "text": "{\"answer\":42} // comment\n"
66
+ },
67
+ {
68
+ "name": "sample.json5",
69
+ "lang": "json5",
70
+ "text": "{\"answer\":42}\n"
71
+ },
72
+ {
73
+ "name": "sample.jsonl",
74
+ "lang": "jsonl",
75
+ "text": "{\"answer\":42}\n"
76
+ },
77
+ {
78
+ "name": "sample.yaml",
79
+ "lang": "yml",
80
+ "text": "answer: 42 # comment\n"
81
+ },
82
+ {
83
+ "name": "sample.toml",
84
+ "lang": "toml",
85
+ "text": "answer = 42 # comment\n"
86
+ },
87
+ {
88
+ "name": "sample.ini",
89
+ "lang": "ini",
90
+ "text": "[section]\nanswer = 42\n"
91
+ },
92
+ {
93
+ "name": ".env",
94
+ "lang": "dotenv",
95
+ "text": "ANSWER=\"hello\" # comment\n"
96
+ },
97
+ {
98
+ "name": "sample.html",
99
+ "lang": "HTML",
100
+ "text": "<div class=\"hello\">world</div>\n"
101
+ },
102
+ {
103
+ "name": "sample.xml",
104
+ "lang": "xml",
105
+ "text": "<hello answer=\"42\"/>\n"
106
+ },
107
+ {
108
+ "name": "sample.css",
109
+ "lang": "css",
110
+ "text": "body { color: red; margin: 42px; }\n"
111
+ },
112
+ {
113
+ "name": "sample.scss",
114
+ "lang": "css",
115
+ "text": "body { color: red; }\n"
116
+ },
117
+ {
118
+ "name": "sample.sql",
119
+ "lang": "sql",
120
+ "text": "SELECT * FROM users WHERE id = 42;\n"
121
+ },
122
+ {
123
+ "name": "sample.c",
124
+ "lang": "c",
125
+ "text": "int main(void) { return 42; }\n"
126
+ },
127
+ {
128
+ "name": "sample.cpp",
129
+ "lang": "cpp",
130
+ "text": "int main() { return 42; }\n"
131
+ },
132
+ {
133
+ "name": "sample.cs",
134
+ "lang": "c#",
135
+ "text": "public class Hello { int answer = 42; }\n"
136
+ },
137
+ {
138
+ "name": "sample.go",
139
+ "lang": "golang",
140
+ "text": "package main\nfunc main() { println(42) }\n"
141
+ },
142
+ {
143
+ "name": "sample.rs",
144
+ "lang": "rs",
145
+ "text": "fn main() { let answer = 42; }\n"
146
+ },
147
+ {
148
+ "name": "sample.java",
149
+ "lang": "java",
150
+ "text": "public class Hello { int answer = 42; }\n"
151
+ },
152
+ {
153
+ "name": "sample.kt",
154
+ "lang": "kt",
155
+ "text": "val answer = 42\n"
156
+ },
157
+ {
158
+ "name": "sample.rb",
159
+ "lang": "rb",
160
+ "text": "def answer\n return 42\nend\n"
161
+ },
162
+ {
163
+ "name": "sample.php",
164
+ "lang": "php",
165
+ "text": "<?php echo \"hello\"; ?>\n"
166
+ },
167
+ {
168
+ "name": "sample.lua",
169
+ "lang": "lua",
170
+ "text": "local answer = 42 -- comment\n"
171
+ },
172
+ {
173
+ "name": "sample.pl",
174
+ "lang": "perl",
175
+ "text": "my $answer = 42; # comment\n"
176
+ },
177
+ {
178
+ "name": "sample.ps1",
179
+ "lang": "pwsh",
180
+ "text": "$answer = \"hello\" # comment\n"
181
+ },
182
+ {
183
+ "name": "sample.bat",
184
+ "lang": "cmd",
185
+ "text": "@echo off\nset ANSWER=42\nREM comment\n"
186
+ },
187
+ {
188
+ "name": "Dockerfile",
189
+ "lang": "docker",
190
+ "text": "FROM debian:13\nRUN echo hello\n"
191
+ },
192
+ {
193
+ "name": "Makefile",
194
+ "lang": "make",
195
+ "text": "all:\n\techo \"hello\" # comment\n"
196
+ },
197
+ {
198
+ "name": "CMakeLists.txt",
199
+ "lang": "cmake",
200
+ "text": "set(ANSWER 42) # comment\n"
201
+ },
202
+ {
203
+ "name": "sample.md",
204
+ "lang": "md",
205
+ "text": "# Heading\n**bold** and `code`\n"
206
+ },
207
+ {
208
+ "name": "sample.diff",
209
+ "lang": "diff",
210
+ "text": "--- a/file\n+++ b/file\n@@ -1 +1 @@\n-old\n+new\n"
211
+ },
212
+ {
213
+ "name": "sample.tf",
214
+ "lang": "tf",
215
+ "text": "variable \"answer\" { default = 42 }\n"
216
+ },
217
+ {
218
+ "name": "sample.vue",
219
+ "lang": "vue",
220
+ "text": "<template><div class=\"hello\">Hello</div></template>\n"
221
+ },
222
+ {
223
+ "name": "sample.svelte",
224
+ "lang": "svelte",
225
+ "text": "<script>const answer = 42;</script>\n"
226
+ }
227
+ ]
@@ -0,0 +1,28 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
3
+ <!-- Low priority: retain the distribution's more specific MIME definitions. -->
4
+ <mime-type type="text/x-buninu-source">
5
+ <comment>Source code</comment>
6
+ <sub-class-of type="text/plain"/>
7
+ <generic-icon name="text-x-script"/>
8
+ <glob pattern="*.jsonl" weight="10"/>
9
+ <glob pattern="*.ndjson" weight="10"/>
10
+ <glob pattern="*.jsonc" weight="10"/>
11
+ <glob pattern="*.json5" weight="10"/>
12
+ <glob pattern="*.jsx" weight="10"/>
13
+ <glob pattern="Dockerfile" weight="10"/>
14
+ <glob pattern="*.cjs" weight="10"/>
15
+ <glob pattern="*.ini" weight="10"/>
16
+ <glob pattern="*.mts" weight="10"/>
17
+ <glob pattern="*.cts" weight="10"/>
18
+ <glob pattern="*.vue" weight="10"/>
19
+ <glob pattern="*.svelte" weight="10"/>
20
+ </mime-type>
21
+ <!-- TSX is ambiguous: prefer TypeScript JSX over Debian's Tiled tileset rule (50). -->
22
+ <mime-type type="text/x-buninu-tsx">
23
+ <comment>TypeScript JSX source</comment>
24
+ <sub-class-of type="text/plain"/>
25
+ <generic-icon name="text-x-script"/>
26
+ <glob pattern="*.tsx" weight="60"/>
27
+ </mime-type>
28
+ </mime-info>
@@ -0,0 +1,23 @@
1
+ // jsmdcui 0.19.2's Micro rules contain Go regex flags/boundaries unsupported by JS.
2
+ // Adapt those rule objects locally; do not modify the installed npm package.
3
+ export function adaptSyntaxRules(definitions, SyntaxDefinition) {
4
+ function compile(pattern, original) {
5
+ if(typeof pattern!=='string'||!(/\(\?[ims]+\)|\\[<>]/.test(pattern)))return original;
6
+ const flags=new Set();
7
+ const source=pattern.replace(/\(\?([ims]+)\)/g,(_,letters)=>{for(const flag of letters)flags.add(flag);return '';})
8
+ .replaceAll('\\<','\\b(?=\\w)').replaceAll('\\>','(?<=\\w)\\b');
9
+ const regex=new SyntaxDefinition({}, {rules:[{compat:source}]}).rules[0]?.regex;
10
+ if(!regex)return original;
11
+ try{return new RegExp(regex.source,[...new Set([...regex.flags,...flags])].join(''));}catch{return original;}
12
+ }
13
+ function visit(rules) {
14
+ for(const rule of rules){
15
+ if(rule.type==='pattern')rule.regex=compile(rule.source,rule.regex);
16
+ if(rule.type==='region'){
17
+ for(const key of ['start','end','skip'])rule[key]=compile(rule.source?.[key],rule[key]);
18
+ visit(rule.rules);
19
+ }
20
+ }
21
+ }
22
+ for(const definition of definitions)visit(definition.rules);
23
+ }
@@ -0,0 +1,4 @@
1
+ [Thumbnailer Entry]
2
+ TryExec=/usr/local/bin/flea-thumbnail-stub
3
+ Exec=/usr/local/bin/flea-thumbnail-stub %i %o %s
4
+ MimeType=video/mp4;video/webm;video/x-matroska;video/quicktime;video/x-msvideo;video/mpeg;video/ogg;
@@ -0,0 +1,3 @@
1
+ #!/bin/sh
2
+ # Placeholder only: every video gets the same opaque PNG. Args: input output size.
3
+ printf '%s' 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR4nGMwsHAAAAFEAKn1rVKOAAAAAElFTkSuQmCC' | /usr/bin/base64 -d > "$2"
@@ -0,0 +1,11 @@
1
+ import QtQuick
2
+
3
+ // The word that closes a surface, in the corner every surface puts it in: Dialogs rule 7, and the
4
+ // spelling ui/SettingsPanel.qml already uses, so no two dialogs can name the way out differently.
5
+ Text {
6
+ text: "esc"
7
+ color: Theme.color.muted
8
+ font.family: Theme.font.family
9
+ font.pixelSize: Theme.font.caption
10
+ textFormat: Text.PlainText
11
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 GM
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,25 @@
1
+ # Flea leaf-component import test
2
+
3
+ `EscapeHint.qml` is an unchanged copy of `ui/EscapeHint.qml` from
4
+ https://github.com/thisisgm/flea at f21789e56cc4b0877caa3156fff7bce52a8dd9c2.
5
+ MIT, Copyright (c) 2026 GM; see LICENSE.
6
+
7
+ `demo.qml` now imports this component normally through `import "." as Flea`
8
+ and `qmldir`. Two instances share `Theme.qml`, a **local test theme** declared
9
+ as a real QML singleton. The button changes its property and both labels react.
10
+ There is no source-body inlining or injected global JavaScript Theme object.
11
+
12
+ This Theme.qml is our test implementation, not Flea's upstream Theme. The real
13
+ Flea Theme also needs Omarchy modules, Quickshell services and more QML syntax.
14
+ Those dependencies remain explicit compatibility gaps, not silent stubs.
15
+
16
+ ```sh
17
+ XDG_RUNTIME_DIR=/tmp WAYLAND_DISPLAY=wayland-buninu bun test/manual-flea-qml.js
18
+ bun test test/qml-flea.test.js
19
+ ```
20
+
21
+ EscapeHint 保留上游原碼與授權。範例透過真正的相對 import、qmldir 與 QML
22
+ singleton 載入兩個實例;按鈕會修改共用主題,兩個 esc 一起變色。
23
+ 不再拼接元件內容,也不注入 JS 全域 Theme。
24
+
25
+ Theme.qml 是明確標示的測試主題,並非 Flea 上游的 Omarchy 主題實作。
@@ -0,0 +1,8 @@
1
+ pragma Singleton
2
+ import QtQuick
3
+ // Test theme, not Flea's Omarchy-dependent Theme.qml. Loaded normally via qmldir.
4
+ QtObject {
5
+ property bool alternate: false
6
+ readonly property var color: ({muted: alternate ? "#ffcc66" : "#70e1e8"})
7
+ readonly property var font: ({family: "sans-serif", caption: 24})
8
+ }
@@ -0,0 +1,24 @@
1
+ import QtQuick
2
+ import QtQuick.Controls
3
+ import Quickshell
4
+ import "." as Flea
5
+ FloatingWindow {
6
+ title: "Browser — Flea real import test"
7
+ color: "#172b36"
8
+ Column {
9
+ width: parent.width - 64
10
+ anchors.centerIn: parent
11
+ spacing: 24
12
+ Text { text: "Flea EscapeHint.qml — real import"; color: "white"; font.pixelSize: 24 }
13
+ Text { text: "Local Theme.qml singleton (test theme)"; color: "#a9bcc6" }
14
+ Item {
15
+ width: parent.width; height: 50
16
+ Flea.EscapeHint { id: first }
17
+ Flea.EscapeHint { id: second; x: 180 }
18
+ }
19
+ Button {
20
+ text: "Toggle shared theme"
21
+ onClicked: { Flea.Theme.alternate = !Flea.Theme.alternate; }
22
+ }
23
+ }
24
+ }
@@ -0,0 +1,3 @@
1
+ module FleaLeafTest
2
+ EscapeHint EscapeHint.qml
3
+ singleton Theme Theme.qml
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 GM
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,20 @@
1
+ Copyright (c) David Heinemeier Hansson
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,70 @@
1
+ # Real Flea Theme fixture
2
+
3
+ Unmodified dependency sources, selected by the QML import graph:
4
+
5
+ - `ui/`: https://github.com/thisisgm/flea at `f21789e56cc4b0877caa3156fff7bce52a8dd9c2`, MIT (`LICENSE-Flea`).
6
+ - `imports/qs/Commons/`: https://github.com/basecamp/omarchy at `3c7027db2a4fa9fa6a49d7af7f87c27ac48e677d`, MIT (`LICENSE-Omarchy`).
7
+ - `demo.qml`: our test window. Both original qmldir files are preserved; entries outside the tested dependency graph are not bundled.
8
+
9
+ Unlike `../flea/`, this fixture uses the actual Theme.qml, ThemeColors.qml,
10
+ Glass.qml, ViewState.qml and Omarchy Color/Style/Util singletons. Nothing injects
11
+ fake Theme/Style values. Test HOME contains sample colors.toml and shell.toml;
12
+ these are input data, not substitute QML implementations.
13
+
14
+ `bun test/manual-flea-theme.js` opens it on the existing Wayland socket and creates
15
+ an isolated temporary HOME. Closing the window removes that temporary directory.
16
+ `bun test test/qml-host.test.js` verifies real palette parsing, measured column
17
+ widths, font size changes through the theme.name watch, process output and cleanup,
18
+ and return from local QML host mode to ordinary sandboxed HTML.
19
+
20
+ No running Hyprland or Flea Rust backend is required for this Theme test. Missing
21
+ hyprctl takes the upstream fallback paths; live Hyprland-dependent GlassTagger
22
+ creation and full Flea settings writes are not claimed as tested or supported.
23
+ The current test covers the Theme path on Land, not the entire Flea application.
24
+
25
+ 本目錄保留真正上游 QML/JS;Theme 及 Commons 不是 stub。手動示範使用獨立的
26
+ 臨時 HOME,讀入範例 TOML,關窗後移除。測試涵蓋主題讀取、文字尺寸、主題更新、
27
+ 程序輸出與清理,以及切回普通網頁的隔離。未宣稱完整 Flea 或 Hyprland 相容。
28
+
29
+ ## SettingsRuler
30
+
31
+ `ui/SettingsRuler.qml` is another unchanged file from the same Flea revision.
32
+ `settings.qml` is our interactive test wrapper: selecting a size changes the real
33
+ ViewState in memory; Theme updates both the original ruler and a text preview.
34
+ The wrapper does not call the persistent settings writer.
35
+
36
+ `test/qml-quickshell-settings.test.js` optionally runs the same wrapper and upstream
37
+ sources with a locally available Quickshell binary on an isolated Land instance.
38
+ Qt eagerly checks qmldir entries absent from this subset, so only its temporary
39
+ fixture copy filters those missing entries. No QML/JS source is replaced or stubbed.
40
+ The repository's original qmldir files remain unchanged.
41
+
42
+ SettingsRuler 來自同一上游版本,原檔未修改。互動範例只調整記憶體內的 ViewState,
43
+ 不寫個人設定;Quickshell 對照的暫存副本只刪除未打包檔案的 qmldir 索引。
44
+
45
+ ## Additional unchanged controls and models
46
+
47
+ The following files are copied byte-for-byte from the same Flea revision above:
48
+
49
+ - `ui/SettingsSegment.qml`, `ui/DialogButton.qml`, `ui/DialogField.qml`
50
+ - `ui/Glyph.qml`, `ui/GlyphSolid.qml`, `ui/Reveal.qml`, `ui/StableModel.qml`
51
+ - `ui/js/Icons.js`, `ui/js/Motion.js`
52
+
53
+ `button.qml`, `field.qml` and `segment.qml` are our small test wrappers, not
54
+ upstream files. DialogButton and DialogField are tested both through this browser
55
+ and the genuine Quickshell binary. StableModel is tested with a virtualized view,
56
+ including resizing and warm delegates. Source fixtures are not reformatted.
57
+
58
+ The larger `qml-flea-app`, `qml-flea-previews`, `qml-flea-compile` and
59
+ `qml-flea-wayland` opt-in tests read existing external checkouts instead of
60
+ bundling the entire Flea application. They use a temporary HOME and XDG state;
61
+ backend replies are never replaced. Without an explicitly supplied real FLEA_BIN,
62
+ the unavailable backend state is expected. Those tests do not claim file-manager
63
+ operations or mounting work.
64
+
65
+ 本輪新增的上述上游檔案均保持原文;三個 wrapper 是自製測試入口。
66
+ 完整主程式測試讀取隔壁既有 checkout,不把整個 Flea 打包進本專案,
67
+ 也不偽造後端服務。沒有實際後端時,不能據此宣稱檔案操作已通過。
68
+
69
+ `text-metrics.qml` is also our wrapper. It compares empty-string and multiline
70
+ line counts with the actual Quickshell binary; no Qt implementation source is used.
@@ -0,0 +1,17 @@
1
+ import QtQuick
2
+ import Quickshell
3
+ import "./ui" as Flea
4
+ FloatingWindow {
5
+ id: demo
6
+ width: 600; height: 320
7
+ color: Flea.Theme.color.background
8
+ title: "Flea buttons | "+presses
9
+ Component.onCompleted: action.forceActiveFocus()
10
+ property int presses: 0
11
+ Column {
12
+ x:24;y:24;spacing:24
13
+ Flea.DialogButton {id:action;label:"Activate";primary:true;tabStop:true;onActivated:demo.presses++}
14
+ Flea.DialogButton {label:"Disabled";available:false}
15
+ Text {id:status;text:"Activated: "+demo.presses;color:Flea.Theme.color.foreground}
16
+ }
17
+ }
@@ -0,0 +1,27 @@
1
+ import QtQuick
2
+ import QtQuick.Controls
3
+ import Quickshell
4
+ import "./ui" as Flea
5
+ FloatingWindow {
6
+ id: demo
7
+ property bool alternate: false
8
+ title: "Flea — real Theme and Omarchy Commons"
9
+ width: 800; height: 760
10
+ color: Flea.Theme.color.background
11
+ Column {
12
+ x: 24; y: 20; spacing: 12
13
+ Text {text: "Real Flea Theme"; color: Flea.Theme.color.foreground; font.pixelSize: 24}
14
+ Text {id: readiness; text: "Palette ready: " + Flea.Theme.ready; color: Flea.Theme.color.muted; font.pixelSize: 16}
15
+ Flea.EscapeHint {}
16
+ Button {
17
+ text: "Toggle palette"
18
+ onClicked: {
19
+ demo.alternate = !demo.alternate
20
+ Flea.Theme.applyColors(demo.alternate
21
+ ? 'background = "#202030"\nforeground = "#ffeebb"\naccent = "#ffcc66"\nred = "#ff3333"'
22
+ : 'background = "#101315"\nforeground = "#eeeeee"\naccent = "#70e1e8"\nred = "#ff3333"')
23
+ }
24
+ }
25
+ Text {id: metrics; text: Flea.Theme.tokens(); color: Flea.Theme.color.foreground; font.pixelSize: 13; font.family: Flea.Theme.font.family}
26
+ }
27
+ }
@@ -0,0 +1,21 @@
1
+ import QtQuick
2
+ import Quickshell
3
+ import "./ui" as Flea
4
+ FloatingWindow {
5
+ id:demo;width:600;height:320
6
+ property string source:"first"
7
+ property int edits:0
8
+ property int accepts:0
9
+ property int tabs:0
10
+ color:Flea.Theme.color.background
11
+ title:"Flea field | "+field.text+" | "+edits+":"+accepts+":"+tabs
12
+ Flea.DialogField {
13
+ id:field;x:24;y:24;width:300;label:"Name";text:demo.source
14
+ onEdited:demo.edits++
15
+ onAccepted:demo.accepts++
16
+ onTabbed:function(from,back){demo.tabs+=back?-1:1}
17
+ }
18
+ Text {id:status;y:150;text:field.text+"|"+demo.edits+":"+demo.accepts+":"+demo.tabs;color:Flea.Theme.color.foreground}
19
+ Flea.DialogButton {id:change;x:24;y:200;label:"Change";onActivated:demo.source="second"}
20
+ Component.onCompleted:field.takeFocus()
21
+ }