@qooxdoo/framework 7.5.1 → 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.
- package/Manifest.json +169 -44
- package/lib/compiler/compile-info.json +76 -68
- package/lib/compiler/index.js +3683 -2588
- package/lib/resource/qx/tool/schema/Manifest-1-0-0.json +79 -26
- package/lib/resource/qx/tool/schema/Manifest-2-0-0.json +17 -26
- package/lib/resource/qx/tool/schema/compile-1-0-0.json +40 -53
- package/package.json +2 -2
- package/source/class/qx/bom/Font.js +36 -0
- package/source/class/qx/bom/webfonts/Validator.js +31 -6
- package/source/class/qx/bom/webfonts/WebFont.js +60 -64
- package/source/class/qx/bom/webfonts/WebFontLoader.js +461 -0
- package/source/class/qx/core/Object.js +1 -1
- package/source/class/qx/data/Array.js +27 -0
- package/source/class/qx/dev/FakeServer.js +1 -1
- package/source/class/qx/event/handler/Focus.js +2 -1
- package/source/class/qx/event/handler/GestureCore.js +1 -1
- package/source/class/qx/test/bom/webfonts/Validator.js +0 -6
- package/source/class/qx/test/core/Environment.js +8 -8
- package/source/class/qx/test/core/Validation.js +2 -2
- package/source/class/qx/test/dev/unit/Requirements.js +6 -6
- package/source/class/qx/test/ui/basic/Image.js +3 -3
- package/source/class/qx/test/ui/basic/Label.js +0 -65
- package/source/class/qx/test/ui/form/Field.js +56 -52
- package/source/class/qx/theme/classic/Font.js +7 -23
- package/source/class/qx/theme/iconfont/LoadMaterialIcons.js +2 -4
- package/source/class/qx/theme/iconfont/LoadMaterialIconsOutlined.js +2 -4
- package/source/class/qx/theme/iconfont/LoadMaterialIconsRound.js +2 -4
- package/source/class/qx/theme/iconfont/LoadMaterialIconsSharp.js +2 -4
- package/source/class/qx/theme/iconfont/LoadMaterialIconsTwoTone.js +2 -4
- package/source/class/qx/theme/indigo/Font.js +8 -15
- package/source/class/qx/theme/manager/Font.js +151 -38
- package/source/class/qx/theme/modern/Font.js +1 -0
- package/source/class/qx/theme/simple/Font.js +3 -1
- package/source/class/qx/theme/tangible/Appearance.js +1 -0
- package/source/class/qx/theme/tangible/Font.js +9 -62
- package/source/class/qx/theme/tangible/Image.js +1 -4
- package/source/class/qx/tool/cli/Cli.js +12 -0
- package/source/class/qx/tool/cli/Watch.js +3 -0
- package/source/class/qx/tool/cli/api/CompilerApi.js +8 -0
- package/source/class/qx/tool/cli/commands/Add.js +1 -1
- package/source/class/qx/tool/cli/commands/Compile.js +22 -0
- package/source/class/qx/tool/cli/commands/Config.js +16 -141
- package/source/class/qx/tool/cli/commands/ExportGlyphs.js +134 -0
- package/source/class/qx/tool/cli/commands/Package.js +3 -0
- package/source/class/qx/tool/cli/commands/Pkg.js +1 -1
- package/source/class/qx/tool/cli/commands/config/Delete.js +47 -0
- package/source/class/qx/tool/cli/commands/config/Get.js +52 -0
- package/source/class/qx/tool/cli/commands/config/List.js +81 -0
- package/source/class/qx/tool/cli/commands/config/Set.js +61 -0
- package/source/class/qx/tool/cli/commands/package/Update.js +3 -3
- package/source/class/qx/tool/compiler/Analyser.js +45 -0
- package/source/class/qx/tool/compiler/ClassFile.js +41 -0
- package/source/class/qx/tool/compiler/Console.js +6 -1
- package/source/class/qx/tool/compiler/app/Application.js +19 -0
- package/source/class/qx/tool/compiler/app/Library.js +51 -2
- package/source/class/qx/tool/compiler/app/ManifestFont.js +181 -0
- package/source/class/qx/tool/compiler/app/WebFont.js +144 -234
- package/source/class/qx/tool/compiler/makers/AppMaker.js +13 -0
- package/source/class/qx/tool/compiler/resources/ImageLoader.js +22 -12
- package/source/class/qx/tool/compiler/resources/Manager.js +2 -2
- package/source/class/qx/tool/compiler/resources/MetaLoader.js +7 -2
- package/source/class/qx/tool/compiler/resources/ResourceLoader.js +21 -0
- package/source/class/qx/tool/compiler/targets/Target.js +186 -67
- package/source/class/qx/tool/migration/M7_5_6.js +75 -0
- package/source/class/qx/tool/utils/Http.js +69 -0
- package/source/class/qx/ui/basic/Label.js +20 -38
- package/source/class/qx/ui/form/AbstractField.js +8 -2
- package/source/class/qx/ui/form/FileSelectorButton.js +5 -0
- package/source/class/qx/ui/table/pane/FocusIndicator.js +5 -4
- package/source/class/qx/ui/table/pane/Pane.js +14 -0
- package/source/class/qx/ui/table/pane/Scroller.js +3 -3
- package/source/class/qx/ui/virtual/core/Scroller.js +8 -2
- package/source/class/qx/ui/window/Window.js +9 -8
- package/source/resource/qx/iconfont/MaterialIcons/materialicons.json +10912 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsoutlined.json +10967 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconsround.json +10992 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconssharp.json +10992 -0
- package/source/resource/qx/iconfont/MaterialIcons/materialiconstwotone.json +9947 -0
- package/source/resource/qx/iconfont/MaterialIcons/x.json +10967 -0
- package/source/resource/qx/iconfont/export-glyphs.sh +22 -0
- package/source/resource/qx/tool/schema/Manifest-1-0-0.json +79 -26
- package/source/resource/qx/tool/schema/Manifest-2-0-0.json +17 -26
- package/source/resource/qx/tool/schema/compile-1-0-0.json +40 -53
- package/source/class/qx/bom/webfonts/Manager.js +0 -652
- package/source/class/qx/test/bom/webfonts/Manager.js +0 -238
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
/* ************************************************************************
|
|
2
|
-
|
|
3
|
-
qooxdoo - the new era of web development
|
|
4
|
-
|
|
5
|
-
http://qooxdoo.org
|
|
6
|
-
|
|
7
|
-
Copyright:
|
|
8
|
-
2007-2011 1&1 Internet AG, Germany, http://www.1und1.de
|
|
9
|
-
|
|
10
|
-
License:
|
|
11
|
-
MIT: https://opensource.org/licenses/MIT
|
|
12
|
-
See the LICENSE file in the project's top-level directory for details.
|
|
13
|
-
|
|
14
|
-
************************************************************************ */
|
|
15
|
-
|
|
16
|
-
/* ************************************************************************
|
|
17
|
-
************************************************************************ */
|
|
18
|
-
/**
|
|
19
|
-
*
|
|
20
|
-
* @asset(qx/test/webfonts/*)
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
qx.Class.define("qx.test.bom.webfonts.Manager", {
|
|
24
|
-
extend: qx.test.bom.webfonts.Abstract,
|
|
25
|
-
|
|
26
|
-
include: [qx.dev.unit.MRequirements],
|
|
27
|
-
|
|
28
|
-
members: {
|
|
29
|
-
__fontDefinitions: {
|
|
30
|
-
finelinerScript: {
|
|
31
|
-
family: "FinelinerScriptRegular",
|
|
32
|
-
source: [
|
|
33
|
-
qx.util.ResourceManager.getInstance().toUri(
|
|
34
|
-
"qx/test/webfonts/fineliner_script-webfont.woff"
|
|
35
|
-
),
|
|
36
|
-
|
|
37
|
-
qx.util.ResourceManager.getInstance().toUri(
|
|
38
|
-
"qx/test/webfonts/fineliner_script-webfont.ttf"
|
|
39
|
-
),
|
|
40
|
-
|
|
41
|
-
qx.util.ResourceManager.getInstance().toUri(
|
|
42
|
-
"qx/test/webfonts/fineliner_script-webfont.eot"
|
|
43
|
-
)
|
|
44
|
-
]
|
|
45
|
-
},
|
|
46
|
-
|
|
47
|
-
fontawesome: {
|
|
48
|
-
family: "FontAwesome",
|
|
49
|
-
source: [
|
|
50
|
-
qx.util.ResourceManager.getInstance().toUri(
|
|
51
|
-
"qx/test/webfonts/fontawesome-webfont.woff"
|
|
52
|
-
),
|
|
53
|
-
|
|
54
|
-
qx.util.ResourceManager.getInstance().toUri(
|
|
55
|
-
"qx/test/webfonts/fontawesome-webfont.ttf"
|
|
56
|
-
),
|
|
57
|
-
|
|
58
|
-
qx.util.ResourceManager.getInstance().toUri(
|
|
59
|
-
"qx/test/webfonts/fontawesome-webfont.eot"
|
|
60
|
-
)
|
|
61
|
-
]
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
invalid: {
|
|
65
|
-
family: "MonkeypooBold",
|
|
66
|
-
source: ["404.woff", "404.ttf", "404.eot"]
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
|
|
70
|
-
__findRule(familyName) {
|
|
71
|
-
var reg = new RegExp("@font-face.*?" + familyName, "m");
|
|
72
|
-
var helper = function (cssText) {
|
|
73
|
-
cssText = cssText.replace(/\n/g, "").replace(/\r/g, "");
|
|
74
|
-
if (reg.exec(cssText)) {
|
|
75
|
-
return true;
|
|
76
|
-
}
|
|
77
|
-
return false;
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
for (var i = 0, l = document.styleSheets.length; i < l; i++) {
|
|
81
|
-
var sheet = document.styleSheets[i];
|
|
82
|
-
if (sheet.cssText) {
|
|
83
|
-
if (helper(sheet.cssText)) {
|
|
84
|
-
return true;
|
|
85
|
-
}
|
|
86
|
-
} else if (sheet.cssRules) {
|
|
87
|
-
for (var j = 0, m = sheet.cssRules.length; j < m; j++) {
|
|
88
|
-
if (helper(sheet.cssRules[j].cssText)) {
|
|
89
|
-
return true;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
return false;
|
|
95
|
-
},
|
|
96
|
-
|
|
97
|
-
setUp() {
|
|
98
|
-
this.require(["webFontSupport"]);
|
|
99
|
-
this.__nodesBefore = document.body.childNodes.length;
|
|
100
|
-
this.__sheetsBefore = document.styleSheets.length;
|
|
101
|
-
this.__manager = qx.bom.webfonts.Manager.getInstance();
|
|
102
|
-
},
|
|
103
|
-
|
|
104
|
-
tearDown() {
|
|
105
|
-
this.__manager.dispose();
|
|
106
|
-
qx.bom.webfonts.Manager.VALIDATION_TIMEOUT = 5000;
|
|
107
|
-
delete qx.bom.webfonts.Manager.$$instance;
|
|
108
|
-
this.__manager = null;
|
|
109
|
-
this.assertEquals(
|
|
110
|
-
this.__nodesBefore,
|
|
111
|
-
document.body.childNodes.length,
|
|
112
|
-
"Manager did not remove all nodes!"
|
|
113
|
-
);
|
|
114
|
-
|
|
115
|
-
this.assertEquals(
|
|
116
|
-
this.__sheetsBefore,
|
|
117
|
-
document.styleSheets.length,
|
|
118
|
-
"Manager did not remove stylesheet!"
|
|
119
|
-
);
|
|
120
|
-
},
|
|
121
|
-
|
|
122
|
-
"test: create rule for valid font"() {
|
|
123
|
-
var font = new qx.bom.webfonts.WebFont();
|
|
124
|
-
font.set({
|
|
125
|
-
size: 18,
|
|
126
|
-
family: ["monospace"],
|
|
127
|
-
sources: [this.__fontDefinitions.finelinerScript]
|
|
128
|
-
});
|
|
129
|
-
|
|
130
|
-
qx.event.Timer.once(
|
|
131
|
-
function () {
|
|
132
|
-
this.resume(function () {
|
|
133
|
-
var foundRule = this.__findRule(
|
|
134
|
-
this.__fontDefinitions.finelinerScript.family
|
|
135
|
-
);
|
|
136
|
-
|
|
137
|
-
this.assertTrue(
|
|
138
|
-
foundRule,
|
|
139
|
-
"@font-face rule not found in document styles!"
|
|
140
|
-
);
|
|
141
|
-
}, this);
|
|
142
|
-
},
|
|
143
|
-
this,
|
|
144
|
-
2000
|
|
145
|
-
);
|
|
146
|
-
|
|
147
|
-
this.wait(3000);
|
|
148
|
-
},
|
|
149
|
-
|
|
150
|
-
"test: do not create rule for invalid font"() {
|
|
151
|
-
qx.bom.webfonts.Manager.VALIDATION_TIMEOUT = 100;
|
|
152
|
-
var font = new qx.bom.webfonts.WebFont();
|
|
153
|
-
font.set({
|
|
154
|
-
family: ["monospace"],
|
|
155
|
-
sources: [this.__fontDefinitions.invalid]
|
|
156
|
-
});
|
|
157
|
-
|
|
158
|
-
var that = this;
|
|
159
|
-
window.setTimeout(function () {
|
|
160
|
-
that.resume(function () {
|
|
161
|
-
var foundRule = this.__findRule(
|
|
162
|
-
this.__fontDefinitions.invalid.family
|
|
163
|
-
);
|
|
164
|
-
|
|
165
|
-
this.assertFalse(
|
|
166
|
-
foundRule,
|
|
167
|
-
"@font-face rule for invalid font found in document styles!"
|
|
168
|
-
);
|
|
169
|
-
}, that);
|
|
170
|
-
}, 2000);
|
|
171
|
-
|
|
172
|
-
this.wait(3000);
|
|
173
|
-
},
|
|
174
|
-
|
|
175
|
-
"test: load webfont whith custom comparisonString"() {
|
|
176
|
-
qx.bom.webfonts.Manager.VALIDATION_TIMEOUT = 100;
|
|
177
|
-
var font = new qx.bom.webfonts.WebFont();
|
|
178
|
-
font.set({
|
|
179
|
-
family: ["fontawesome"],
|
|
180
|
-
comparisonString: "\uf206\uf1e3\uf118\uf2a7",
|
|
181
|
-
sources: [this.__fontDefinitions.fontawesome]
|
|
182
|
-
});
|
|
183
|
-
|
|
184
|
-
var that = this;
|
|
185
|
-
window.setTimeout(function () {
|
|
186
|
-
that.resume(function () {
|
|
187
|
-
var foundRule = this.__findRule(
|
|
188
|
-
this.__fontDefinitions.fontawesome.family
|
|
189
|
-
);
|
|
190
|
-
|
|
191
|
-
this.assertTrue(
|
|
192
|
-
foundRule,
|
|
193
|
-
"@font-face rule for custom comparisonString font not found in document styles!"
|
|
194
|
-
);
|
|
195
|
-
}, that);
|
|
196
|
-
}, 2000);
|
|
197
|
-
|
|
198
|
-
this.wait(3000);
|
|
199
|
-
},
|
|
200
|
-
|
|
201
|
-
"test: load webfont with custom version"() {
|
|
202
|
-
var font = new qx.bom.webfonts.WebFont();
|
|
203
|
-
font.set({
|
|
204
|
-
family: ["monospace"],
|
|
205
|
-
version: "1.0",
|
|
206
|
-
sources: [this.__fontDefinitions.finelinerScript]
|
|
207
|
-
});
|
|
208
|
-
|
|
209
|
-
qx.event.Timer.once(
|
|
210
|
-
function () {
|
|
211
|
-
this.resume(function () {
|
|
212
|
-
var foundRule = false;
|
|
213
|
-
// it is browser dependent which type of font is loaded (woff, eot or ttf) so we have to
|
|
214
|
-
// check all given types, stopping the loop if the font rule was found
|
|
215
|
-
for (
|
|
216
|
-
var n = 0;
|
|
217
|
-
n < this.__fontDefinitions.finelinerScript.source.length &&
|
|
218
|
-
foundRule === false;
|
|
219
|
-
n++
|
|
220
|
-
) {
|
|
221
|
-
foundRule = this.__findRule(
|
|
222
|
-
this.__fontDefinitions.finelinerScript.source[n] + "\\?1\\.0"
|
|
223
|
-
);
|
|
224
|
-
}
|
|
225
|
-
this.assertTrue(
|
|
226
|
-
foundRule,
|
|
227
|
-
"@font-face rule for custom version not found in document styles!"
|
|
228
|
-
);
|
|
229
|
-
}, this);
|
|
230
|
-
},
|
|
231
|
-
this,
|
|
232
|
-
2000
|
|
233
|
-
);
|
|
234
|
-
|
|
235
|
-
this.wait(3000);
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
});
|