@qooxdoo/framework 7.5.0 → 7.6.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 (120) hide show
  1. package/Manifest.json +169 -44
  2. package/bin/deploy/qx +7 -5
  3. package/lib/compiler/compile-info.json +70 -62
  4. package/lib/compiler/index.js +3809 -2695
  5. package/lib/resource/qx/tool/cli/templates/skeleton/desktop/source/class/custom/Application.tmpl.js +7 -7
  6. package/lib/resource/qx/tool/cli/templates/skeleton/desktop/source/class/custom/test/DemoTest.tmpl.js +10 -10
  7. package/lib/resource/qx/tool/cli/templates/skeleton/mobile/source/class/custom/Application.tmpl.js +6 -6
  8. package/lib/resource/qx/tool/cli/templates/skeleton/mobile/source/class/custom/page/Login.tmpl.js +9 -9
  9. package/lib/resource/qx/tool/cli/templates/skeleton/mobile/source/class/custom/page/Overview.tmpl.js +5 -5
  10. package/lib/resource/qx/tool/cli/templates/skeleton/package/source/class/custom/demo/Application.tmpl.js +7 -7
  11. package/lib/resource/qx/tool/cli/templates/skeleton/package/source/class/custom/test/DemoTest.tmpl.js +10 -10
  12. package/lib/resource/qx/tool/cli/templates/skeleton/server/source/class/custom/Application.tmpl.js +6 -6
  13. package/lib/resource/qx/tool/cli/templates/skeleton/server/source/class/custom/test/DemoTest.tmpl.js +12 -12
  14. package/lib/resource/qx/tool/schema/Manifest-1-0-0.json +79 -26
  15. package/lib/resource/qx/tool/schema/Manifest-2-0-0.json +17 -26
  16. package/lib/resource/qx/tool/schema/compile-1-0-0.json +40 -53
  17. package/lib/resource/qx/tool/website/src/about.md +1 -1
  18. package/package.json +3 -3
  19. package/source/class/qx/bom/Font.js +36 -0
  20. package/source/class/qx/bom/webfonts/Validator.js +31 -6
  21. package/source/class/qx/bom/webfonts/WebFont.js +60 -64
  22. package/source/class/qx/bom/webfonts/WebFontLoader.js +461 -0
  23. package/source/class/qx/core/Object.js +1 -1
  24. package/source/class/qx/data/Array.js +27 -0
  25. package/source/class/qx/dev/FakeServer.js +1 -1
  26. package/source/class/qx/event/handler/Focus.js +2 -1
  27. package/source/class/qx/event/handler/GestureCore.js +1 -1
  28. package/source/class/qx/test/bom/webfonts/Validator.js +0 -6
  29. package/source/class/qx/test/core/Environment.js +8 -8
  30. package/source/class/qx/test/core/Validation.js +2 -2
  31. package/source/class/qx/test/dev/unit/Requirements.js +6 -6
  32. package/source/class/qx/test/io/transport/Websocket.js +1 -1
  33. package/source/class/qx/test/ui/basic/Image.js +3 -3
  34. package/source/class/qx/test/ui/basic/Label.js +0 -65
  35. package/source/class/qx/test/ui/form/Field.js +56 -52
  36. package/source/class/qx/theme/IndigoDark.js +1 -1
  37. package/source/class/qx/theme/classic/Font.js +7 -23
  38. package/source/class/qx/theme/iconfont/LoadMaterialIcons.js +2 -4
  39. package/source/class/qx/theme/iconfont/LoadMaterialIconsOutlined.js +2 -4
  40. package/source/class/qx/theme/iconfont/LoadMaterialIconsRound.js +2 -4
  41. package/source/class/qx/theme/iconfont/LoadMaterialIconsSharp.js +2 -4
  42. package/source/class/qx/theme/iconfont/LoadMaterialIconsTwoTone.js +2 -4
  43. package/source/class/qx/theme/indigo/DecorationDark.js +30 -0
  44. package/source/class/qx/theme/indigo/Font.js +8 -15
  45. package/source/class/qx/theme/manager/Font.js +151 -38
  46. package/source/class/qx/theme/modern/Font.js +1 -0
  47. package/source/class/qx/theme/simple/Font.js +3 -1
  48. package/source/class/qx/theme/tangible/Appearance.js +1 -0
  49. package/source/class/qx/theme/tangible/Font.js +9 -62
  50. package/source/class/qx/theme/tangible/Image.js +1 -4
  51. package/source/class/qx/tool/cli/Application.js +4 -1
  52. package/source/class/qx/tool/cli/Cli.js +34 -23
  53. package/source/class/qx/tool/cli/Watch.js +8 -6
  54. package/source/class/qx/tool/cli/api/CompilerApi.js +8 -0
  55. package/source/class/qx/tool/cli/commands/Add.js +1 -1
  56. package/source/class/qx/tool/cli/commands/Compile.js +24 -1
  57. package/source/class/qx/tool/cli/commands/Config.js +16 -141
  58. package/source/class/qx/tool/cli/commands/ExportGlyphs.js +134 -0
  59. package/source/class/qx/tool/cli/commands/Lint.js +1 -1
  60. package/source/class/qx/tool/cli/commands/Package.js +3 -0
  61. package/source/class/qx/tool/cli/commands/Pkg.js +1 -1
  62. package/source/class/qx/tool/cli/commands/Run.js +6 -7
  63. package/source/class/qx/tool/cli/commands/Serve.js +29 -36
  64. package/source/class/qx/tool/cli/commands/Test.js +3 -2
  65. package/source/class/qx/tool/cli/commands/add/Script.js +3 -1
  66. package/source/class/qx/tool/cli/commands/config/Delete.js +47 -0
  67. package/source/class/qx/tool/cli/commands/config/Get.js +52 -0
  68. package/source/class/qx/tool/cli/commands/config/List.js +81 -0
  69. package/source/class/qx/tool/cli/commands/config/Set.js +61 -0
  70. package/source/class/qx/tool/cli/commands/package/Install.js +3 -0
  71. package/source/class/qx/tool/cli/commands/package/Update.js +3 -3
  72. package/source/class/qx/tool/compiler/Analyser.js +45 -0
  73. package/source/class/qx/tool/compiler/ClassFile.js +43 -1
  74. package/source/class/qx/tool/compiler/Console.js +6 -1
  75. package/source/class/qx/tool/compiler/app/Application.js +19 -0
  76. package/source/class/qx/tool/compiler/app/Cldr.js +63 -26
  77. package/source/class/qx/tool/compiler/app/Library.js +51 -2
  78. package/source/class/qx/tool/compiler/app/ManifestFont.js +181 -0
  79. package/source/class/qx/tool/compiler/app/WebFont.js +144 -234
  80. package/source/class/qx/tool/compiler/makers/AppMaker.js +13 -0
  81. package/source/class/qx/tool/compiler/resources/ImageLoader.js +22 -12
  82. package/source/class/qx/tool/compiler/resources/Manager.js +2 -2
  83. package/source/class/qx/tool/compiler/resources/MetaLoader.js +7 -2
  84. package/source/class/qx/tool/compiler/resources/ResourceLoader.js +21 -0
  85. package/source/class/qx/tool/compiler/targets/Target.js +186 -67
  86. package/source/class/qx/tool/migration/M7_5_6.js +75 -0
  87. package/source/class/qx/tool/utils/Http.js +69 -0
  88. package/source/class/qx/ui/basic/Image.js +6 -2
  89. package/source/class/qx/ui/basic/Label.js +20 -38
  90. package/source/class/qx/ui/core/Widget.js +13 -42
  91. package/source/class/qx/ui/form/AbstractField.js +8 -2
  92. package/source/class/qx/ui/form/FileSelectorButton.js +5 -0
  93. package/source/class/qx/ui/table/pane/FocusIndicator.js +5 -4
  94. package/source/class/qx/ui/table/pane/Pane.js +14 -0
  95. package/source/class/qx/ui/table/pane/Scroller.js +3 -3
  96. package/source/class/qx/ui/virtual/core/Scroller.js +8 -2
  97. package/source/class/qx/ui/window/Window.js +9 -8
  98. package/source/resource/qx/iconfont/MaterialIcons/materialicons.json +10912 -0
  99. package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined.json +10967 -0
  100. package/source/resource/qx/iconfont/MaterialIcons/materialiconsround.json +10992 -0
  101. package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp.json +10992 -0
  102. package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone.json +9947 -0
  103. package/source/resource/qx/iconfont/MaterialIcons/x.json +10967 -0
  104. package/source/resource/qx/iconfont/export-glyphs.sh +22 -0
  105. package/source/resource/qx/mobile/scss/common/_gradients.scss +1 -1
  106. package/source/resource/qx/tool/cli/templates/skeleton/desktop/source/class/custom/Application.tmpl.js +7 -7
  107. package/source/resource/qx/tool/cli/templates/skeleton/desktop/source/class/custom/test/DemoTest.tmpl.js +10 -10
  108. package/source/resource/qx/tool/cli/templates/skeleton/mobile/source/class/custom/Application.tmpl.js +6 -6
  109. package/source/resource/qx/tool/cli/templates/skeleton/mobile/source/class/custom/page/Login.tmpl.js +9 -9
  110. package/source/resource/qx/tool/cli/templates/skeleton/mobile/source/class/custom/page/Overview.tmpl.js +5 -5
  111. package/source/resource/qx/tool/cli/templates/skeleton/package/source/class/custom/demo/Application.tmpl.js +7 -7
  112. package/source/resource/qx/tool/cli/templates/skeleton/package/source/class/custom/test/DemoTest.tmpl.js +10 -10
  113. package/source/resource/qx/tool/cli/templates/skeleton/server/source/class/custom/Application.tmpl.js +6 -6
  114. package/source/resource/qx/tool/cli/templates/skeleton/server/source/class/custom/test/DemoTest.tmpl.js +12 -12
  115. package/source/resource/qx/tool/schema/Manifest-1-0-0.json +79 -26
  116. package/source/resource/qx/tool/schema/Manifest-2-0-0.json +17 -26
  117. package/source/resource/qx/tool/schema/compile-1-0-0.json +40 -53
  118. package/source/resource/qx/tool/website/src/about.md +1 -1
  119. package/source/class/qx/bom/webfonts/Manager.js +0 -652
  120. package/source/class/qx/test/bom/webfonts/Manager.js +0 -238
@@ -4,10 +4,7 @@
4
4
  "$id": "https://qooxdoo.org/schema/Manifest-2-0-0.json",
5
5
  "description": "qooxdoo's Manifest files serve to provide meta information for a library in a structured way. Their syntax is in JSON. They have a more informational part (keyed info), which is more interesting for human readers, a technical part (named provides) that is used in the processing of generator configurations, and a part named externalResources to include CSS and Javascript files.",
6
6
  "type": "object",
7
- "required": [
8
- "provides",
9
- "$schema"
10
- ],
7
+ "required": ["provides", "$schema"],
11
8
  "additionalProperties": false,
12
9
  "properties": {
13
10
  "$schema": {
@@ -15,7 +12,8 @@
15
12
  "description": "the json schema of the version of Manifest.json",
16
13
  "enum": [
17
14
  "https://qooxdoo.org/schema/Manifest-2-0-0.json",
18
- "https://raw.githubusercontent.com/qooxdoo/qooxdoo/master/source/resource/qx/tool/schema/Manifest-2-0-0.json"
15
+ "https://raw.githubusercontent.com/qooxdoo/qooxdoo/master/source/resource/qx/tool/schema/Manifest-2-0-0.json",
16
+ "./source/resource/qx/tool/schema/Manifest-2-0-0.json"
19
17
  ]
20
18
  },
21
19
  "info": {
@@ -56,22 +54,16 @@
56
54
  "type": "array",
57
55
  "items": {
58
56
  "type": "object",
59
- "required": [
60
- "name", "email"
61
- ],
57
+ "required": ["name", "email"],
62
58
  "additionalProperties": false,
63
59
  "properties": {
64
60
  "name": {
65
61
  "type": "string",
66
- "examples": [
67
- "First Author"
68
- ]
62
+ "examples": ["First Author"]
69
63
  },
70
64
  "email": {
71
65
  "type": "string",
72
- "examples": [
73
- "first.author@site.domain"
74
- ]
66
+ "examples": ["first.author@site.domain"]
75
67
  },
76
68
  "maintainer": {
77
69
  "type": "boolean"
@@ -106,10 +98,7 @@
106
98
  }
107
99
  },
108
100
  "provides": {
109
- "required": [
110
- "namespace",
111
- "class"
112
- ],
101
+ "required": ["namespace", "class"],
113
102
  "additionalProperties": false,
114
103
  "type": "object",
115
104
  "properties": {
@@ -141,14 +130,16 @@
141
130
  "type": "object",
142
131
  "description": "Maps environment check IDs to classes"
143
132
  },
133
+ "fonts": {
134
+ "type": "object",
135
+ "description": "Defines fonts provided by"
136
+ },
144
137
  "webfonts": {
145
- "type":"array",
138
+ "type": "array",
146
139
  "description": "A list of webfont definitions",
147
140
  "items": {
148
141
  "type": "object",
149
- "required": [
150
- "name", "resources"
151
- ],
142
+ "required": ["name", "resources"],
152
143
  "additionalProperties": false,
153
144
  "properties": {
154
145
  "name": {
@@ -156,7 +147,7 @@
156
147
  "description": "Font name"
157
148
  },
158
149
  "defaultSize": {
159
- "type":"number",
150
+ "type": "number",
160
151
  "description": "Default font size"
161
152
  },
162
153
  "mapping": {
@@ -171,7 +162,7 @@
171
162
  "type": "array",
172
163
  "minItems": 1,
173
164
  "items": {
174
- "type":"string",
165
+ "type": "string",
175
166
  "description": "Path to the webfont file relative to the resource folder"
176
167
  }
177
168
  }
@@ -179,7 +170,7 @@
179
170
  }
180
171
  },
181
172
  "application": {
182
- "type":"object"
173
+ "type": "object"
183
174
  }
184
175
  }
185
176
  },
@@ -196,7 +187,7 @@
196
187
  "additionalProperties": false
197
188
  },
198
189
  "externalResources": {
199
- "type":"object",
190
+ "type": "object",
200
191
  "description": "Static Javascript and CSS files that shall be always included without further processing by qooxdoo. All paths are relative to the resource folder stated in the 'provides' section.",
201
192
  "properties": {
202
193
  "css": {
@@ -4,11 +4,7 @@
4
4
  "$id": "https://qooxdoo.org/schema/compile-1-0-0.json",
5
5
  "description": "compile.json controls the qx compile command, and while you can use command line parameters to compile an application, most applications will require one.",
6
6
  "type": "object",
7
- "required": [
8
- "applications",
9
- "targets",
10
- "$schema"
11
- ],
7
+ "required": ["applications", "targets", "$schema"],
12
8
  "additionalProperties": false,
13
9
  "properties": {
14
10
  "$schema": {
@@ -21,7 +17,7 @@
21
17
  },
22
18
  "run": {
23
19
  "type": "object",
24
- "required": [ "application" ],
20
+ "required": ["application"],
25
21
  "properties": {
26
22
  "application": {
27
23
  "description": "The name of the application, as specified in the applications[] array",
@@ -54,18 +50,15 @@
54
50
  }
55
51
  },
56
52
  "applications": {
57
- "type":"array",
53
+ "type": "array",
58
54
  "description": "Each entry describes an application to be compiled.",
59
55
  "minItems": 1,
60
56
  "items": {
61
57
  "type": "object",
62
- "required": [
63
- "class",
64
- "name"
65
- ],
58
+ "required": ["class", "name"],
66
59
  "additionalProperties": false,
67
60
  "properties": {
68
- "class" : {
61
+ "class": {
69
62
  "description": "The class name of the main application class (it typically inherits from `qx.application.Standalone` for web applications)",
70
63
  "type": "string"
71
64
  },
@@ -122,7 +115,7 @@
122
115
  },
123
116
  "environment": {
124
117
  "$ref": "#/properties/environment"
125
- },
118
+ },
126
119
  "outputPath": {
127
120
  "description": "The directory to place the application files (e.g. index.js and resource.js), relative to the target output directory",
128
121
  "type": "string"
@@ -136,9 +129,7 @@
136
129
  "description": "An array of class names which are to be included in the compilation, regardless of whether the compiler can detect if they are needed (for example, your application dynamically choose class names on the fly). Wildcards are supported by adding a *.",
137
130
  "type": "array",
138
131
  "uniqueItems": true,
139
- "examples": [
140
- "qx.util.format.*"
141
- ],
132
+ "examples": ["qx.util.format.*"],
142
133
  "items": {
143
134
  "type": "string"
144
135
  }
@@ -147,9 +138,7 @@
147
138
  "description": "An array of class names which are to be excluded from the application, regardless of whether the compiler thinks that they are needed. Wildcards are supported by adding a *. Note that exclude takes priority over include",
148
139
  "type": "array",
149
140
  "uniqueItems": true,
150
- "examples": [
151
- "qx.util.format.NumberFormat"
152
- ],
141
+ "examples": ["qx.util.format.NumberFormat"],
153
142
  "items": {
154
143
  "type": "string"
155
144
  }
@@ -166,9 +155,7 @@
166
155
  "runWhenWatching": {
167
156
  "description": "If provided then the compiler will run this command every time this application is compiled, killing any previous instance if necessary",
168
157
  "type": "object",
169
- "required": [
170
- "command"
171
- ],
158
+ "required": ["command"],
172
159
  "properties": {
173
160
  "command": {
174
161
  "description": "The command line to run",
@@ -185,15 +172,12 @@
185
172
  }
186
173
  }
187
174
  },
188
- "targets" : {
175
+ "targets": {
189
176
  "type": "array",
190
177
  "minItems": 1,
191
178
  "items": {
192
179
  "type": "object",
193
- "required": [
194
- "type",
195
- "outputPath"
196
- ],
180
+ "required": ["type", "outputPath"],
197
181
  "additionalProperties": false,
198
182
  "properties": {
199
183
  "type": {
@@ -240,7 +224,7 @@
240
224
  },
241
225
  "uri": {
242
226
  "description": "this sets the URI used to access the target output directory, i.e. the directory which will contain resources/ and transpiled/",
243
- "type":"string"
227
+ "type": "string"
244
228
  },
245
229
  "environment": {
246
230
  "$ref": "#/properties/environment"
@@ -252,21 +236,34 @@
252
236
  "type": "string"
253
237
  }
254
238
  },
239
+ "fonts": {
240
+ "local": {
241
+ "description": "Whether to prefer local fonts over CDNs",
242
+ "type": "boolean"
243
+ },
244
+ "types": {
245
+ "description": "Types of fonts (ttf, woff, etc) to allow, default is ttf",
246
+ "type": "array",
247
+ "items": {
248
+ "type": "string"
249
+ }
250
+ }
251
+ },
255
252
  "addTimestampsToUrls": {
256
253
  "description": "if true (default), the target will add the files timestamp to each URL to allow for strong caching parameters",
257
- "type":"boolean"
254
+ "type": "boolean"
258
255
  },
259
256
  "writeCompileInfo": {
260
257
  "description": "if true, the target will write a compile-info.json and resources.json into the application's output directory, containing the data structures required to generate an application",
261
- "type":"boolean"
258
+ "type": "boolean"
262
259
  },
263
260
  "typescript": {
264
- "type": ["boolean","string"],
261
+ "type": ["boolean", "string"],
265
262
  "description": "When true, output the typescript definition into ``./compiled/source/qooxdoo.d.ts`. If you use a string instead of true, the string is the name of the file which is generated inside the target output directory"
266
263
  },
267
264
  "mangle-privates": {
268
265
  "description": " Whether and how to mangle private identifiers.",
269
- "type": ["boolean","string"],
266
+ "type": ["boolean", "string"],
270
267
  "pattern": "^(off|readable|unreadable)$"
271
268
  },
272
269
  "minify": {
@@ -274,10 +271,10 @@
274
271
  "type": "string",
275
272
  "pattern": "^(off|minify|mangle|beautify)$"
276
273
  },
277
- "deploy-source-maps": {
274
+ "deploy-source-maps": {
278
275
  "description": "If true, the source maps will be deployed.",
279
276
  "type": "boolean"
280
- },
277
+ },
281
278
  "save-source-in-map": {
282
279
  "description": "If true, the source file will be saved in the map file if the target supports it.",
283
280
  "type": "boolean"
@@ -323,9 +320,7 @@
323
320
  "description": "An array of class names which are to be included in the compilation, regardless of whether the compiler can detect if they are needed (for example, your application dynamically choose class names on the fly). Wildcards are supported by adding a *.",
324
321
  "type": "array",
325
322
  "uniqueItems": true,
326
- "examples": [
327
- "qx.util.format.*"
328
- ],
323
+ "examples": ["qx.util.format.*"],
329
324
  "items": {
330
325
  "type": "string"
331
326
  }
@@ -334,9 +329,7 @@
334
329
  "description": "An array of class names which are to be excluded from the application, regardless of whether the compiler thinks that they are needed. Wildcards are supported by adding a *. Note that exclude takes priority over include",
335
330
  "type": "array",
336
331
  "uniqueItems": true,
337
- "examples": [
338
- "qx.util.format.NumberFormat"
339
- ],
332
+ "examples": ["qx.util.format.NumberFormat"],
340
333
  "items": {
341
334
  "type": "string"
342
335
  }
@@ -346,9 +339,7 @@
346
339
  "type": "object",
347
340
  "patternProperties": {
348
341
  "^\\S+$": {
349
- "required": [
350
- "include"
351
- ],
342
+ "required": ["include"],
352
343
  "additionalProperties": false,
353
344
  "properties": {
354
345
  "include": {
@@ -371,16 +362,14 @@
371
362
  },
372
363
  "path-mappings": {
373
364
  "description": " generic means to locate files on disk inside the URI address space of the application",
374
- "type":"object",
365
+ "type": "object",
375
366
  "patternProperties": {
376
367
  "^\\S+$": {
377
368
  "description": "virtual path as seen from the browser",
378
369
  "type": "string"
379
370
  }
380
371
  },
381
- "examples": [
382
- { "../qooxdoo": "/some/virtual/uri/path/qooxdoo"}
383
- ]
372
+ "examples": [{ "../qooxdoo": "/some/virtual/uri/path/qooxdoo" }]
384
373
  },
385
374
  "locales": {
386
375
  "description": "Include other translations than 'en'",
@@ -420,9 +409,7 @@
420
409
  "description": "An array of names which the compiler should ignore. Same as @ignore in source code",
421
410
  "type": "array",
422
411
  "uniqueItems": true,
423
- "examples": [
424
- "modules.*"
425
- ],
412
+ "examples": ["modules.*"],
426
413
  "items": {
427
414
  "type": "string"
428
415
  }
@@ -438,7 +425,7 @@
438
425
  "type": "object",
439
426
  "description": "List of additional babel plugins to enable, eg TC39 proposals; note that some proposals will work out of the box and some will require upgrades to QxCompiler before they work properly - your mileage may vary. Each key in this object is the NPM name of the plugin, and the value is either true (enabled), false (ignore), or an object which is options to pass to the preset",
440
427
  "additionalProperties": {
441
- "type": [ "boolean", "object" ]
428
+ "type": ["boolean", "object"]
442
429
  }
443
430
  }
444
431
  }
@@ -462,14 +449,14 @@
462
449
  "properties": {
463
450
  "include": {
464
451
  "description": "An array of namespaces to include in the bundle. Can contain wildcards.",
465
- "type": ["array","string"],
452
+ "type": ["array", "string"],
466
453
  "items": {
467
454
  "type": "string"
468
455
  }
469
456
  },
470
457
  "exclude": {
471
458
  "description": "An array of namespaces to exclude from the bundle. Can contain wildcards.",
472
- "type": ["array","string"],
459
+ "type": ["array", "string"],
473
460
  "items": {
474
461
  "type": "string"
475
462
  }
@@ -8,7 +8,7 @@ This is the built in web server for Qooxdoo, serving your application.
8
8
 
9
9
  You can find Qooxdoo on the web at http://www.qooxdoo.org and on GitHub at http://github.com/qooxdoo/qooxdoo.
10
10
 
11
- If you have questions, please ask them at [StackOverflow](https://stackoverflow.com/questions/tagged/qooxdoo) and make sure you use the "qooxdoo" tag when you post.
11
+ If you have questions, please ask them at [Stack Overflow](https://stackoverflow.com/questions/tagged/qooxdoo) and make sure you use the "qooxdoo" tag when you post.
12
12
 
13
13
  If you want to discuss anything, please contact us using Gitter in the [qooxdoo/qooxdoo](http://gitter.im/qooxdoo/qooxdoo) group, either [via a web browser](http://gitter.im/qooxdoo/qooxdoo) or via the Gitter app.
14
14
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qooxdoo/framework",
3
- "version": "7.5.0",
3
+ "version": "7.6.0",
4
4
  "description": "The JS Framework for Coders",
5
5
  "author": "The qooxdoo project",
6
6
  "keywords": [
@@ -118,8 +118,8 @@
118
118
  "tmp": "0.2.1",
119
119
  "unset-value": "^1.0.0",
120
120
  "upath": "^1.2.0",
121
- "update-notifier": "^4.1.3",
122
- "xml2js": "^0.4.23",
121
+ "update-notifier": "^6.0.2",
122
+ "xml2js": "^0.5.0",
123
123
  "yargs": "^15.4.1"
124
124
  },
125
125
  "devDependencies": {
@@ -265,6 +265,16 @@ qx.Class.define("qx.bom.Font", {
265
265
  check: "Integer",
266
266
  nullable: true,
267
267
  apply: "_applyLetterSpacing"
268
+ },
269
+
270
+ /**
271
+ * This specifies the name of the font defined in Manifest.json in `provides.fonts` - setting it will
272
+ * copy the values from the Manifest into this font definition
273
+ */
274
+ fontName: {
275
+ check: "String",
276
+ nullable: true,
277
+ apply: "_applyFontName"
268
278
  }
269
279
  },
270
280
 
@@ -277,6 +287,13 @@ qx.Class.define("qx.bom.Font", {
277
287
  members: {
278
288
  __lookupMap: null,
279
289
 
290
+ /**
291
+ * Called by the theme manager when all the properties to be set, have been set
292
+ */
293
+ loadComplete() {
294
+ // Nothing
295
+ },
296
+
280
297
  // property apply
281
298
  _applySize(value, old) {
282
299
  this.__lookupMap.fontSize = value === null ? null : value + "px";
@@ -310,6 +327,25 @@ qx.Class.define("qx.bom.Font", {
310
327
  this.__lookupMap.fontFamily = family;
311
328
  },
312
329
 
330
+ // property apply
331
+ _applyFontName(value) {
332
+ if (value) {
333
+ let data =
334
+ qx.theme.manager.Font.getInstance().getManifestFonts()[value];
335
+ if (!data) {
336
+ this.warn("Cannot find a font called " + value);
337
+ } else {
338
+ let toSet = {};
339
+ ["family", "comparisonString"].forEach(name => {
340
+ if (data[name] !== undefined) {
341
+ toSet[name] = data[name];
342
+ }
343
+ });
344
+ this.set(toSet);
345
+ }
346
+ }
347
+ },
348
+
313
349
  // property apply
314
350
  _applyBold(value, old) {
315
351
  this.__lookupMap.fontWeight =
@@ -53,6 +53,7 @@ qx.Class.define("qx.bom.webfonts.Validator", {
53
53
  this.setFontFamily(fontFamily);
54
54
  this.__requestedHelpers = this._getRequestedHelpers();
55
55
  }
56
+ this.__promiseValid = new qx.Promise();
56
57
  },
57
58
 
58
59
  /*
@@ -186,6 +187,7 @@ qx.Class.define("qx.bom.webfonts.Validator", {
186
187
  __requestedHelpers: null,
187
188
  __checkTimer: null,
188
189
  __checkStarted: null,
190
+ __promiseValid: null,
189
191
 
190
192
  /*
191
193
  ---------------------------------------------------------------------------
@@ -215,6 +217,15 @@ qx.Class.define("qx.bom.webfonts.Validator", {
215
217
  }
216
218
  },
217
219
 
220
+ /**
221
+ * Waits for the font to become invalid or valid
222
+ *
223
+ * @returns {Boolean} whether valid or not
224
+ */
225
+ async isValid() {
226
+ return await this.__promiseValid;
227
+ },
228
+
218
229
  /*
219
230
  ---------------------------------------------------------------------------
220
231
  PROTECTED API
@@ -380,17 +391,31 @@ qx.Class.define("qx.bom.webfonts.Validator", {
380
391
  */
381
392
  __onTimerInterval() {
382
393
  if (this._isFontValid()) {
383
- this.__checkTimer.stop();
384
- this._reset();
385
- this.fireDataEvent("changeStatus", {
386
- family: this.getFontFamily(),
387
- valid: true
388
- });
394
+ const setValidImpl = () => {
395
+ this.__checkTimer.stop();
396
+ this._reset();
397
+ this.__promiseValid.resolve(true);
398
+ this.fireDataEvent("changeStatus", {
399
+ family: this.getFontFamily(),
400
+ valid: true
401
+ });
402
+ };
403
+
404
+ // safari has trouble resizing, adding it again fixed the issue [BUG #8786]
405
+ if (
406
+ qx.core.Environment.get("browser.name") == "safari" &&
407
+ parseFloat(qx.core.Environment.get("browser.version")) >= 8
408
+ ) {
409
+ setTimeout(setValidImpl, 100);
410
+ } else {
411
+ setValidImpl();
412
+ }
389
413
  } else {
390
414
  var now = new Date().getTime();
391
415
  if (now - this.__checkStarted >= this.getTimeout()) {
392
416
  this.__checkTimer.stop();
393
417
  this._reset();
418
+ this.__promiseValid.resolve(false);
394
419
  this.fireDataEvent("changeStatus", {
395
420
  family: this.getFontFamily(),
396
421
  valid: false