@breakside/jskit 2022.6.1 → 2022.9.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/Frameworks/DOM.jsframework/Info.json +2 -2
- package/Frameworks/DOM.jsframework/io.breakside.JSKit.DOM-bundle.js +2 -2
- package/Frameworks/FontKit.jsframework/Info.json +2 -2
- package/Frameworks/FontKit.jsframework/io.breakside.JSKit.FontKit-bundle.js +2 -2
- package/Frameworks/Foundation.jsframework/Info.json +2 -2
- package/Frameworks/Foundation.jsframework/JS/JSImage.js +1 -1
- package/Frameworks/Foundation.jsframework/JS/JSXMLParser.js +81 -8
- package/Frameworks/Foundation.jsframework/io.breakside.JSKit.Foundation-bundle.js +2 -2
- package/Frameworks/SecurityKit.jsframework/Info.json +2 -2
- package/Frameworks/SecurityKit.jsframework/io.breakside.JSKit.SecurityKit-bundle.js +2 -2
- package/Info.json +2 -2
- package/Node/Docs/DocComponent.js +11 -0
- package/Node/io.breakside.jskit-bundle.js +2 -2
- package/Root/Frameworks/APIKit/Info.yaml +1 -1
- package/Root/Frameworks/APIKitTesting/Info.yaml +1 -1
- package/Root/Frameworks/AuthKit/Info.yaml +1 -1
- package/Root/Frameworks/CSSOM/Info.yaml +1 -1
- package/Root/Frameworks/ChartKit/Info.yaml +1 -1
- package/Root/Frameworks/ConferenceKit/Info.yaml +1 -1
- package/Root/Frameworks/DBKit/DBRedisStore.js +2 -1
- package/Root/Frameworks/DBKit/Info.yaml +1 -1
- package/Root/Frameworks/DOM/Info.yaml +1 -1
- package/Root/Frameworks/Dispatch/Info.yaml +1 -1
- package/Root/Frameworks/Dispatch/JSHTMLDispatchQueue.js +4 -2
- package/Root/Frameworks/FontKit/Info.yaml +1 -1
- package/Root/Frameworks/Foundation/Info.yaml +1 -1
- package/Root/Frameworks/Foundation/JSImage.js +1 -1
- package/Root/Frameworks/Foundation/JSXMLParser.js +81 -8
- package/Root/Frameworks/ImageKit/Info.yaml +1 -1
- package/Root/Frameworks/MediaKit/Info.yaml +1 -1
- package/Root/Frameworks/MediaKitUI/Info.yaml +1 -1
- package/Root/Frameworks/NotificationKit/Info.yaml +1 -1
- package/Root/Frameworks/PDFKit/Info.yaml +1 -1
- package/Root/Frameworks/QRKit/Info.yaml +1 -1
- package/Root/Frameworks/SearchKit/Info.yaml +1 -1
- package/Root/Frameworks/SecurityKit/Info.yaml +1 -1
- package/Root/Frameworks/ServerKit/Info.yaml +1 -1
- package/Root/Frameworks/ServerKit/SKHTTPServer+Node.js +8 -0
- package/Root/Frameworks/ServerKit/SKHTTPServer.js +1 -1
- package/Root/Frameworks/ServerKit/SKNodeHTTPRequest.js +3 -0
- package/Root/Frameworks/ServerKitTesting/Info.yaml +1 -1
- package/Root/Frameworks/TestKit/Info.yaml +1 -1
- package/Root/Frameworks/UIKit/Info.yaml +1 -1
- package/Root/Frameworks/UIKit/UICollectionView.js +17 -23
- package/Root/Frameworks/UIKit/UIScene.js +5 -1
- package/Root/Frameworks/UIKitTesting/Info.yaml +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"JSBundleType": "framework",
|
|
3
3
|
"JSBundleIdentifier": "io.breakside.JSKit.DOM",
|
|
4
|
-
"JSBundleVersion": "2022.
|
|
4
|
+
"JSBundleVersion": "2022.9.0",
|
|
5
5
|
"JSDevelopmentLanguage": "en",
|
|
6
6
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
7
7
|
"JSBundleEnvironments": {
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
"node": "DOM+Node.js"
|
|
10
10
|
},
|
|
11
11
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
12
|
-
"GitRevision": "
|
|
12
|
+
"GitRevision": "5ede7ae27af07f45b758866e3bdb9b120359da00"
|
|
13
13
|
}
|
|
@@ -3,7 +3,7 @@ JSBundle.bundles['io.breakside.JSKit.DOM'] = {
|
|
|
3
3
|
"Info": {
|
|
4
4
|
"JSBundleType": "framework",
|
|
5
5
|
"JSBundleIdentifier": "io.breakside.JSKit.DOM",
|
|
6
|
-
"JSBundleVersion": "2022.
|
|
6
|
+
"JSBundleVersion": "2022.9.0",
|
|
7
7
|
"JSDevelopmentLanguage": "en",
|
|
8
8
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
9
9
|
"JSBundleEnvironments": {
|
|
@@ -11,7 +11,7 @@ JSBundle.bundles['io.breakside.JSKit.DOM'] = {
|
|
|
11
11
|
"node": "DOM+Node.js"
|
|
12
12
|
},
|
|
13
13
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
14
|
-
"GitRevision": "
|
|
14
|
+
"GitRevision": "5ede7ae27af07f45b758866e3bdb9b120359da00"
|
|
15
15
|
},
|
|
16
16
|
"Resources": [],
|
|
17
17
|
"ResourceLookup": {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"JSBundleType": "framework",
|
|
3
3
|
"JSBundleIdentifier": "io.breakside.JSKit.FontKit",
|
|
4
|
-
"JSBundleVersion": "2022.
|
|
4
|
+
"JSBundleVersion": "2022.9.0",
|
|
5
5
|
"JSDevelopmentLanguage": "en",
|
|
6
6
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
7
7
|
"JSBundleEnvironments": {
|
|
8
8
|
"html": "FontKit+HTML.js"
|
|
9
9
|
},
|
|
10
10
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
11
|
-
"GitRevision": "
|
|
11
|
+
"GitRevision": "5ede7ae27af07f45b758866e3bdb9b120359da00"
|
|
12
12
|
}
|
|
@@ -3,14 +3,14 @@ JSBundle.bundles['io.breakside.JSKit.FontKit'] = {
|
|
|
3
3
|
"Info": {
|
|
4
4
|
"JSBundleType": "framework",
|
|
5
5
|
"JSBundleIdentifier": "io.breakside.JSKit.FontKit",
|
|
6
|
-
"JSBundleVersion": "2022.
|
|
6
|
+
"JSBundleVersion": "2022.9.0",
|
|
7
7
|
"JSDevelopmentLanguage": "en",
|
|
8
8
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
9
9
|
"JSBundleEnvironments": {
|
|
10
10
|
"html": "FontKit+HTML.js"
|
|
11
11
|
},
|
|
12
12
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
13
|
-
"GitRevision": "
|
|
13
|
+
"GitRevision": "5ede7ae27af07f45b758866e3bdb9b120359da00"
|
|
14
14
|
},
|
|
15
15
|
"Resources": [],
|
|
16
16
|
"ResourceLookup": {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"JSBundleType": "framework",
|
|
3
3
|
"JSBundleIdentifier": "io.breakside.JSKit.Foundation",
|
|
4
|
-
"JSBundleVersion": "2022.
|
|
4
|
+
"JSBundleVersion": "2022.9.0",
|
|
5
5
|
"JSDevelopmentLanguage": "en",
|
|
6
6
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
7
7
|
"JSBundleEnvironments": {
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
"node": "Foundation+Node.js"
|
|
10
10
|
},
|
|
11
11
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
12
|
-
"GitRevision": "
|
|
12
|
+
"GitRevision": "5ede7ae27af07f45b758866e3bdb9b120359da00"
|
|
13
13
|
}
|
|
@@ -417,7 +417,7 @@ _JSDataImage.sizeFromSVGData = function(data){
|
|
|
417
417
|
size.width = px(attrs.width);
|
|
418
418
|
size.height = px(attrs.height);
|
|
419
419
|
}else if (attrs.viewBox){
|
|
420
|
-
var box = attrs.viewBox.split(/\s+/).map(function(n){ parseInt(n); });
|
|
420
|
+
var box = attrs.viewBox.split(/\s+/).map(function(n){ return parseInt(n); });
|
|
421
421
|
size.width = box[2];
|
|
422
422
|
size.height = box[3];
|
|
423
423
|
}
|
|
@@ -36,6 +36,7 @@ JSClass("JSXMLParser", JSObject, {
|
|
|
36
36
|
var c;
|
|
37
37
|
var lineNumber = 1;
|
|
38
38
|
var lineOffset;
|
|
39
|
+
var entityMap = JSCopy(defaultEntityMap);
|
|
39
40
|
var readToken = function(){
|
|
40
41
|
if (offset >= length){
|
|
41
42
|
return null;
|
|
@@ -131,8 +132,77 @@ JSClass("JSXMLParser", JSObject, {
|
|
|
131
132
|
return {kind: 'PI', name: name, value: readUntil('?>')};
|
|
132
133
|
}
|
|
133
134
|
if (token == '<!DOCTYPE'){
|
|
134
|
-
|
|
135
|
-
|
|
135
|
+
readWhitespace();
|
|
136
|
+
name = readName();
|
|
137
|
+
readWhitespace();
|
|
138
|
+
var doctype = {kind: 'Doctype', name: name, publicId: null, systemId: null, entities: {}};
|
|
139
|
+
if (offset < length && input[offset] !== '>'){
|
|
140
|
+
if (input[offset] != '['){
|
|
141
|
+
name = readName();
|
|
142
|
+
readWhitespace();
|
|
143
|
+
if (name == "SYSTEM"){
|
|
144
|
+
if (offset < length && (input[offset] == "'" || input[offset] == '"')){
|
|
145
|
+
doctype.systemId = readAttributeValue();
|
|
146
|
+
readWhitespace();
|
|
147
|
+
}else{
|
|
148
|
+
throw new Error("Expecting quote at " + lineNumber + ':' + (offset - lineOffset));
|
|
149
|
+
}
|
|
150
|
+
}else if (name === "PUBLIC"){
|
|
151
|
+
if (offset < length && (input[offset] == "'" || input[offset] == '"')){
|
|
152
|
+
doctype.publicId = readAttributeValue();
|
|
153
|
+
readWhitespace();
|
|
154
|
+
if (offset < length && (input[offset] == "'" || input[offset] == '"')){
|
|
155
|
+
doctype.systemId = readAttributeValue();
|
|
156
|
+
readWhitespace();
|
|
157
|
+
}else{
|
|
158
|
+
throw new Error("Expecting quote at " + lineNumber + ':' + (offset - lineOffset));
|
|
159
|
+
}
|
|
160
|
+
}else{
|
|
161
|
+
throw new Error("Expecting quote at " + lineNumber + ':' + (offset - lineOffset));
|
|
162
|
+
}
|
|
163
|
+
}else{
|
|
164
|
+
throw new Error("Expecting SYSTEM or PUBLIC at " + lineNumber + ':' + (offset - lineOffset));
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
if (offset < length && input[offset] == '['){
|
|
168
|
+
++offset;
|
|
169
|
+
readWhitespace();
|
|
170
|
+
while (offset < length && input[offset] !== ']'){
|
|
171
|
+
token = readToken();
|
|
172
|
+
if (token == '<!'){
|
|
173
|
+
name = readName();
|
|
174
|
+
if (name === "ENTITY"){
|
|
175
|
+
readWhitespace();
|
|
176
|
+
if (offset >= length){
|
|
177
|
+
throw new Error("Expecting ENTITY name at " + lineNumber + ':' + (offset - lineOffset));
|
|
178
|
+
}
|
|
179
|
+
name = readName();
|
|
180
|
+
readWhitespace();
|
|
181
|
+
if (offset >= length){
|
|
182
|
+
throw new Error("Expecting ENTITY value at " + lineNumber + ':' + (offset - lineOffset));
|
|
183
|
+
}
|
|
184
|
+
entityMap[name] = readAttributeValue();
|
|
185
|
+
}
|
|
186
|
+
readUntil('>');
|
|
187
|
+
}else if (token == '<?'){
|
|
188
|
+
readUntil('?>');
|
|
189
|
+
}else if (token == '<!--'){
|
|
190
|
+
readUntil('-->');
|
|
191
|
+
}
|
|
192
|
+
readWhitespace();
|
|
193
|
+
}
|
|
194
|
+
if (offset >= length || input[offset] !== ']'){
|
|
195
|
+
throw new Error("Expecting ] at end of DOCTYPE at " + lineNumber + ':' + (offset - lineOffset));
|
|
196
|
+
}
|
|
197
|
+
++offset;
|
|
198
|
+
readWhitespace();
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
if (offset >= length || input[offset] !== '>'){
|
|
202
|
+
throw new Error("Expecting > at end of DOCTYPE at " + lineNumber + ':' + (offset - lineOffset));
|
|
203
|
+
}
|
|
204
|
+
++offset;
|
|
205
|
+
return doctype;
|
|
136
206
|
}
|
|
137
207
|
if (token == '<![CDATA['){
|
|
138
208
|
return {kind: 'CDATA', value: readUntil(']]>')};
|
|
@@ -154,7 +224,7 @@ JSClass("JSXMLParser", JSObject, {
|
|
|
154
224
|
if (offset < length && input[offset] == '='){
|
|
155
225
|
++offset;
|
|
156
226
|
readWhitespace();
|
|
157
|
-
attributes.push({name: attrName, value: textByDecodingEntities(readAttributeValue())});
|
|
227
|
+
attributes.push({name: attrName, value: textByDecodingEntities(readAttributeValue(), entityMap)});
|
|
158
228
|
}else{
|
|
159
229
|
attributes.push({name: attrName, value: null});
|
|
160
230
|
}
|
|
@@ -189,7 +259,7 @@ JSClass("JSXMLParser", JSObject, {
|
|
|
189
259
|
++offset;
|
|
190
260
|
return {kind: 'ElementEnd', name: name};
|
|
191
261
|
}
|
|
192
|
-
return {kind: 'Text', value: textByDecodingEntities(token)};
|
|
262
|
+
return {kind: 'Text', value: textByDecodingEntities(token, entityMap)};
|
|
193
263
|
};
|
|
194
264
|
var readUntil = function(token){
|
|
195
265
|
var index = input.indexOf(token, offset);
|
|
@@ -267,7 +337,10 @@ JSClass("JSXMLParser", JSObject, {
|
|
|
267
337
|
}
|
|
268
338
|
obj = readObject();
|
|
269
339
|
var elementNameStack = [];
|
|
270
|
-
var namespaces = {
|
|
340
|
+
var namespaces = {
|
|
341
|
+
':default:': null,
|
|
342
|
+
'xml': 'http://www.w3.org/XML/1998/namespace'
|
|
343
|
+
};
|
|
271
344
|
var namespacesStack = [];
|
|
272
345
|
var hasDocumentElement = false;
|
|
273
346
|
var hasSentDoctype = false;
|
|
@@ -361,7 +434,7 @@ JSClass("JSXMLParser", JSObject, {
|
|
|
361
434
|
|
|
362
435
|
});
|
|
363
436
|
|
|
364
|
-
var textByDecodingEntities = function(text){
|
|
437
|
+
var textByDecodingEntities = function(text, map){
|
|
365
438
|
var index = text.indexOf('&');
|
|
366
439
|
var length = text.length;
|
|
367
440
|
var end;
|
|
@@ -390,7 +463,7 @@ var textByDecodingEntities = function(text){
|
|
|
390
463
|
value = String.fromCharCode(code);
|
|
391
464
|
}
|
|
392
465
|
}else{
|
|
393
|
-
value =
|
|
466
|
+
value = map[entity] || null;
|
|
394
467
|
if (value === null){
|
|
395
468
|
throw new Error("Cannot lookup entity: &" + entity + ';');
|
|
396
469
|
}
|
|
@@ -404,7 +477,7 @@ var textByDecodingEntities = function(text){
|
|
|
404
477
|
return text;
|
|
405
478
|
};
|
|
406
479
|
|
|
407
|
-
var
|
|
480
|
+
var defaultEntityMap = {
|
|
408
481
|
'lt': '<',
|
|
409
482
|
'LT': '<',
|
|
410
483
|
'gt': '>',
|
|
@@ -3,7 +3,7 @@ JSBundle.bundles['io.breakside.JSKit.Foundation'] = {
|
|
|
3
3
|
"Info": {
|
|
4
4
|
"JSBundleType": "framework",
|
|
5
5
|
"JSBundleIdentifier": "io.breakside.JSKit.Foundation",
|
|
6
|
-
"JSBundleVersion": "2022.
|
|
6
|
+
"JSBundleVersion": "2022.9.0",
|
|
7
7
|
"JSDevelopmentLanguage": "en",
|
|
8
8
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
9
9
|
"JSBundleEnvironments": {
|
|
@@ -11,7 +11,7 @@ JSBundle.bundles['io.breakside.JSKit.Foundation'] = {
|
|
|
11
11
|
"node": "Foundation+Node.js"
|
|
12
12
|
},
|
|
13
13
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
14
|
-
"GitRevision": "
|
|
14
|
+
"GitRevision": "5ede7ae27af07f45b758866e3bdb9b120359da00"
|
|
15
15
|
},
|
|
16
16
|
"Resources": [
|
|
17
17
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"JSBundleType": "framework",
|
|
3
3
|
"JSBundleIdentifier": "io.breakside.JSKit.SecurityKit",
|
|
4
|
-
"JSBundleVersion": "2022.
|
|
4
|
+
"JSBundleVersion": "2022.9.0",
|
|
5
5
|
"JSDevelopmentLanguage": "en",
|
|
6
6
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
7
7
|
"JSBundleEnvironments": {
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
"node": "SecurityKit+Node.js"
|
|
10
10
|
},
|
|
11
11
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
12
|
-
"GitRevision": "
|
|
12
|
+
"GitRevision": "5ede7ae27af07f45b758866e3bdb9b120359da00"
|
|
13
13
|
}
|
|
@@ -3,7 +3,7 @@ JSBundle.bundles['io.breakside.JSKit.SecurityKit'] = {
|
|
|
3
3
|
"Info": {
|
|
4
4
|
"JSBundleType": "framework",
|
|
5
5
|
"JSBundleIdentifier": "io.breakside.JSKit.SecurityKit",
|
|
6
|
-
"JSBundleVersion": "2022.
|
|
6
|
+
"JSBundleVersion": "2022.9.0",
|
|
7
7
|
"JSDevelopmentLanguage": "en",
|
|
8
8
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
9
9
|
"JSBundleEnvironments": {
|
|
@@ -11,7 +11,7 @@ JSBundle.bundles['io.breakside.JSKit.SecurityKit'] = {
|
|
|
11
11
|
"node": "SecurityKit+Node.js"
|
|
12
12
|
},
|
|
13
13
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
14
|
-
"GitRevision": "
|
|
14
|
+
"GitRevision": "5ede7ae27af07f45b758866e3bdb9b120359da00"
|
|
15
15
|
},
|
|
16
16
|
"Resources": [],
|
|
17
17
|
"ResourceLookup": {
|
package/Info.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"JSBundleType": "node",
|
|
3
3
|
"JSBundleIdentifier": "io.breakside.jskit",
|
|
4
|
-
"JSBundleVersion": "2022.
|
|
4
|
+
"JSBundleVersion": "2022.9.0",
|
|
5
5
|
"JSExecutableName": "jskit",
|
|
6
6
|
"NPMOrganization": "breakside",
|
|
7
7
|
"JSResources": [
|
|
8
8
|
"Tests/HTMLTestRunner.js",
|
|
9
9
|
"Tests/NodeTestRunner.js"
|
|
10
10
|
],
|
|
11
|
-
"GitRevision": "
|
|
11
|
+
"GitRevision": "5ede7ae27af07f45b758866e3bdb9b120359da00"
|
|
12
12
|
}
|
|
@@ -275,6 +275,16 @@ JSClass("DocComponent", JSObject, {
|
|
|
275
275
|
script = head.appendChild(document.createElement('script'));
|
|
276
276
|
script.appendChild(document.createTextNode(googleAnalyticsTemplate.replacingTemplateParameters({TRACKING_ID: page.googleAnalytics, PATH: path})));
|
|
277
277
|
}
|
|
278
|
+
if (page.telemetryKey){
|
|
279
|
+
let path = this.outputURL.removingFileExtension().encodedStringRelativeTo(documentation.wwwURL);
|
|
280
|
+
if (path == 'index'){
|
|
281
|
+
path = '/';
|
|
282
|
+
}else{
|
|
283
|
+
path = '/' + path;
|
|
284
|
+
}
|
|
285
|
+
let script = head.appendChild(document.createElement('script'));
|
|
286
|
+
script.appendChild(document.createTextNode(telemetryTemplate.replacingTemplateParameters({KEY: page.telemetryKey, PATH: path})));
|
|
287
|
+
}
|
|
278
288
|
var breadcrumb = this.jsonLdBreadcrumbList();
|
|
279
289
|
if (breadcrumb){
|
|
280
290
|
let script = head.appendChild(document.createElement("script"));
|
|
@@ -884,6 +894,7 @@ JSClass("DocComponent", JSObject, {
|
|
|
884
894
|
});
|
|
885
895
|
|
|
886
896
|
var googleAnalyticsTemplate = "window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', '{{TRACKING_ID}}', {page_path: '{{PATH}}'});";
|
|
897
|
+
var telemetryTemplate = "(function(w, d){ var key = '{{KEY}}'; var s = d.createElement('script'); s.async = true; s.src = 'https://api.telemetry.rocketlaunch.studio/client/telemetry.js'; s.setAttribute('data-key', key); var e = (d.currentScript || d.head.childNodes[d.head.childNodes.length - 1]); e.parentNode.insertBefore(s, e); w._telemetry = function(){ _telemetry.q.push(arguments); }; _telemetry.q = []; })(window, document); _telemetry('count', 'screen', '{{PATH}}');";
|
|
887
898
|
|
|
888
899
|
DocComponent.Environments = [{id: 'html', name: 'HTML'}, {id: 'node', name: 'Node'}];
|
|
889
900
|
|
|
@@ -3,14 +3,14 @@ JSBundle.bundles['io.breakside.jskit'] = {
|
|
|
3
3
|
"Info": {
|
|
4
4
|
"JSBundleType": "node",
|
|
5
5
|
"JSBundleIdentifier": "io.breakside.jskit",
|
|
6
|
-
"JSBundleVersion": "2022.
|
|
6
|
+
"JSBundleVersion": "2022.9.0",
|
|
7
7
|
"JSExecutableName": "jskit",
|
|
8
8
|
"NPMOrganization": "breakside",
|
|
9
9
|
"JSResources": [
|
|
10
10
|
"Tests/HTMLTestRunner.js",
|
|
11
11
|
"Tests/NodeTestRunner.js"
|
|
12
12
|
],
|
|
13
|
-
"GitRevision": "
|
|
13
|
+
"GitRevision": "5ede7ae27af07f45b758866e3bdb9b120359da00"
|
|
14
14
|
},
|
|
15
15
|
"Resources": [
|
|
16
16
|
{
|
|
@@ -246,7 +246,8 @@ JSClass("DBRedisStore", DBObjectStore, {
|
|
|
246
246
|
this.cleanupWatchClientQueueTimer.invalidate();
|
|
247
247
|
this.cleanupWatchClientQueueTimer = null;
|
|
248
248
|
}
|
|
249
|
-
|
|
249
|
+
completion.call(target, this.watchClientQueue.shift());
|
|
250
|
+
return;
|
|
250
251
|
}
|
|
251
252
|
logger.info("opening watch client to %{public}:%d", this.url.host, this.url.port || 6379);
|
|
252
253
|
var client = this.redis.createClient({url: this.url.encodedString, legacyMode: true});
|
|
@@ -417,7 +417,7 @@ _JSDataImage.sizeFromSVGData = function(data){
|
|
|
417
417
|
size.width = px(attrs.width);
|
|
418
418
|
size.height = px(attrs.height);
|
|
419
419
|
}else if (attrs.viewBox){
|
|
420
|
-
var box = attrs.viewBox.split(/\s+/).map(function(n){ parseInt(n); });
|
|
420
|
+
var box = attrs.viewBox.split(/\s+/).map(function(n){ return parseInt(n); });
|
|
421
421
|
size.width = box[2];
|
|
422
422
|
size.height = box[3];
|
|
423
423
|
}
|
|
@@ -36,6 +36,7 @@ JSClass("JSXMLParser", JSObject, {
|
|
|
36
36
|
var c;
|
|
37
37
|
var lineNumber = 1;
|
|
38
38
|
var lineOffset;
|
|
39
|
+
var entityMap = JSCopy(defaultEntityMap);
|
|
39
40
|
var readToken = function(){
|
|
40
41
|
if (offset >= length){
|
|
41
42
|
return null;
|
|
@@ -131,8 +132,77 @@ JSClass("JSXMLParser", JSObject, {
|
|
|
131
132
|
return {kind: 'PI', name: name, value: readUntil('?>')};
|
|
132
133
|
}
|
|
133
134
|
if (token == '<!DOCTYPE'){
|
|
134
|
-
|
|
135
|
-
|
|
135
|
+
readWhitespace();
|
|
136
|
+
name = readName();
|
|
137
|
+
readWhitespace();
|
|
138
|
+
var doctype = {kind: 'Doctype', name: name, publicId: null, systemId: null, entities: {}};
|
|
139
|
+
if (offset < length && input[offset] !== '>'){
|
|
140
|
+
if (input[offset] != '['){
|
|
141
|
+
name = readName();
|
|
142
|
+
readWhitespace();
|
|
143
|
+
if (name == "SYSTEM"){
|
|
144
|
+
if (offset < length && (input[offset] == "'" || input[offset] == '"')){
|
|
145
|
+
doctype.systemId = readAttributeValue();
|
|
146
|
+
readWhitespace();
|
|
147
|
+
}else{
|
|
148
|
+
throw new Error("Expecting quote at " + lineNumber + ':' + (offset - lineOffset));
|
|
149
|
+
}
|
|
150
|
+
}else if (name === "PUBLIC"){
|
|
151
|
+
if (offset < length && (input[offset] == "'" || input[offset] == '"')){
|
|
152
|
+
doctype.publicId = readAttributeValue();
|
|
153
|
+
readWhitespace();
|
|
154
|
+
if (offset < length && (input[offset] == "'" || input[offset] == '"')){
|
|
155
|
+
doctype.systemId = readAttributeValue();
|
|
156
|
+
readWhitespace();
|
|
157
|
+
}else{
|
|
158
|
+
throw new Error("Expecting quote at " + lineNumber + ':' + (offset - lineOffset));
|
|
159
|
+
}
|
|
160
|
+
}else{
|
|
161
|
+
throw new Error("Expecting quote at " + lineNumber + ':' + (offset - lineOffset));
|
|
162
|
+
}
|
|
163
|
+
}else{
|
|
164
|
+
throw new Error("Expecting SYSTEM or PUBLIC at " + lineNumber + ':' + (offset - lineOffset));
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
if (offset < length && input[offset] == '['){
|
|
168
|
+
++offset;
|
|
169
|
+
readWhitespace();
|
|
170
|
+
while (offset < length && input[offset] !== ']'){
|
|
171
|
+
token = readToken();
|
|
172
|
+
if (token == '<!'){
|
|
173
|
+
name = readName();
|
|
174
|
+
if (name === "ENTITY"){
|
|
175
|
+
readWhitespace();
|
|
176
|
+
if (offset >= length){
|
|
177
|
+
throw new Error("Expecting ENTITY name at " + lineNumber + ':' + (offset - lineOffset));
|
|
178
|
+
}
|
|
179
|
+
name = readName();
|
|
180
|
+
readWhitespace();
|
|
181
|
+
if (offset >= length){
|
|
182
|
+
throw new Error("Expecting ENTITY value at " + lineNumber + ':' + (offset - lineOffset));
|
|
183
|
+
}
|
|
184
|
+
entityMap[name] = readAttributeValue();
|
|
185
|
+
}
|
|
186
|
+
readUntil('>');
|
|
187
|
+
}else if (token == '<?'){
|
|
188
|
+
readUntil('?>');
|
|
189
|
+
}else if (token == '<!--'){
|
|
190
|
+
readUntil('-->');
|
|
191
|
+
}
|
|
192
|
+
readWhitespace();
|
|
193
|
+
}
|
|
194
|
+
if (offset >= length || input[offset] !== ']'){
|
|
195
|
+
throw new Error("Expecting ] at end of DOCTYPE at " + lineNumber + ':' + (offset - lineOffset));
|
|
196
|
+
}
|
|
197
|
+
++offset;
|
|
198
|
+
readWhitespace();
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
if (offset >= length || input[offset] !== '>'){
|
|
202
|
+
throw new Error("Expecting > at end of DOCTYPE at " + lineNumber + ':' + (offset - lineOffset));
|
|
203
|
+
}
|
|
204
|
+
++offset;
|
|
205
|
+
return doctype;
|
|
136
206
|
}
|
|
137
207
|
if (token == '<![CDATA['){
|
|
138
208
|
return {kind: 'CDATA', value: readUntil(']]>')};
|
|
@@ -154,7 +224,7 @@ JSClass("JSXMLParser", JSObject, {
|
|
|
154
224
|
if (offset < length && input[offset] == '='){
|
|
155
225
|
++offset;
|
|
156
226
|
readWhitespace();
|
|
157
|
-
attributes.push({name: attrName, value: textByDecodingEntities(readAttributeValue())});
|
|
227
|
+
attributes.push({name: attrName, value: textByDecodingEntities(readAttributeValue(), entityMap)});
|
|
158
228
|
}else{
|
|
159
229
|
attributes.push({name: attrName, value: null});
|
|
160
230
|
}
|
|
@@ -189,7 +259,7 @@ JSClass("JSXMLParser", JSObject, {
|
|
|
189
259
|
++offset;
|
|
190
260
|
return {kind: 'ElementEnd', name: name};
|
|
191
261
|
}
|
|
192
|
-
return {kind: 'Text', value: textByDecodingEntities(token)};
|
|
262
|
+
return {kind: 'Text', value: textByDecodingEntities(token, entityMap)};
|
|
193
263
|
};
|
|
194
264
|
var readUntil = function(token){
|
|
195
265
|
var index = input.indexOf(token, offset);
|
|
@@ -267,7 +337,10 @@ JSClass("JSXMLParser", JSObject, {
|
|
|
267
337
|
}
|
|
268
338
|
obj = readObject();
|
|
269
339
|
var elementNameStack = [];
|
|
270
|
-
var namespaces = {
|
|
340
|
+
var namespaces = {
|
|
341
|
+
':default:': null,
|
|
342
|
+
'xml': 'http://www.w3.org/XML/1998/namespace'
|
|
343
|
+
};
|
|
271
344
|
var namespacesStack = [];
|
|
272
345
|
var hasDocumentElement = false;
|
|
273
346
|
var hasSentDoctype = false;
|
|
@@ -361,7 +434,7 @@ JSClass("JSXMLParser", JSObject, {
|
|
|
361
434
|
|
|
362
435
|
});
|
|
363
436
|
|
|
364
|
-
var textByDecodingEntities = function(text){
|
|
437
|
+
var textByDecodingEntities = function(text, map){
|
|
365
438
|
var index = text.indexOf('&');
|
|
366
439
|
var length = text.length;
|
|
367
440
|
var end;
|
|
@@ -390,7 +463,7 @@ var textByDecodingEntities = function(text){
|
|
|
390
463
|
value = String.fromCharCode(code);
|
|
391
464
|
}
|
|
392
465
|
}else{
|
|
393
|
-
value =
|
|
466
|
+
value = map[entity] || null;
|
|
394
467
|
if (value === null){
|
|
395
468
|
throw new Error("Cannot lookup entity: &" + entity + ';');
|
|
396
469
|
}
|
|
@@ -404,7 +477,7 @@ var textByDecodingEntities = function(text){
|
|
|
404
477
|
return text;
|
|
405
478
|
};
|
|
406
479
|
|
|
407
|
-
var
|
|
480
|
+
var defaultEntityMap = {
|
|
408
481
|
'lt': '<',
|
|
409
482
|
'LT': '<',
|
|
410
483
|
'gt': '>',
|
|
@@ -85,6 +85,10 @@ SKHTTPServer.definePropertiesFromExtensions({
|
|
|
85
85
|
_handleNodeRequest: function(nodeRequest, nodeResponse){
|
|
86
86
|
try{
|
|
87
87
|
var request = SKNodeHTTPRequest.initWithNodeRequest(nodeRequest, nodeResponse);
|
|
88
|
+
if (request === null){
|
|
89
|
+
nodeRequest.socket.destroy();
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
88
92
|
if (this.tlsCertificate && this.tlsPrivateKey){
|
|
89
93
|
request.url.scheme = "https";
|
|
90
94
|
}
|
|
@@ -98,6 +102,10 @@ SKHTTPServer.definePropertiesFromExtensions({
|
|
|
98
102
|
_handleNodeUpgrade: function(nodeRequest, socket, headPacket){
|
|
99
103
|
try{
|
|
100
104
|
var request = SKNodeHTTPRequest.initWithNodeRequest(nodeRequest, null);
|
|
105
|
+
if (request === null){
|
|
106
|
+
nodeRequest.socket.destroy();
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
101
109
|
this.handleUpgrade(request);
|
|
102
110
|
}catch(e){
|
|
103
111
|
nodeRequest.socket.destroy();
|
|
@@ -148,7 +148,7 @@ JSClass("SKHTTPServer", JSObject, {
|
|
|
148
148
|
if (this.delegate && this.delegate.serverRouteNotFoundForRequest){
|
|
149
149
|
this.delegate.serverRouteNotFoundForRequest(this, request);
|
|
150
150
|
}
|
|
151
|
-
request.logger.
|
|
151
|
+
request.logger.info("%{public} %{public} No route for request", request.method, request.url.path);
|
|
152
152
|
throw new SKHTTPError(SKHTTPResponse.StatusCode.notFound);
|
|
153
153
|
}
|
|
154
154
|
|
|
@@ -25,6 +25,9 @@ JSClass("SKNodeHTTPRequest", SKHTTPRequest, {
|
|
|
25
25
|
|
|
26
26
|
initWithNodeRequest: function(nodeRequest, nodeResponse){
|
|
27
27
|
var url = JSURL.initWithString(nodeRequest.url);
|
|
28
|
+
if (url === null){
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
28
31
|
if (url.pathComponents.length === 0){
|
|
29
32
|
url.path = "/";
|
|
30
33
|
}
|
|
@@ -19,6 +19,8 @@
|
|
|
19
19
|
// #import "UICollectionViewLayout.js"
|
|
20
20
|
"use strict";
|
|
21
21
|
|
|
22
|
+
(function(){
|
|
23
|
+
|
|
22
24
|
JSProtocol("UICollectionViewDelegate", JSProtocol, {
|
|
23
25
|
|
|
24
26
|
// Selection
|
|
@@ -289,9 +291,6 @@ JSClass("UICollectionView", UIScrollView, {
|
|
|
289
291
|
if (this._visibleElements.length === 0){
|
|
290
292
|
return;
|
|
291
293
|
}
|
|
292
|
-
var firstVisibleElement = this._visibleElements[0];
|
|
293
|
-
var lastVisibleElement = this._visibleElements[this._visibleElements.length - 1];
|
|
294
|
-
var searcher = JSBinarySearcher(this._visibleElements, VisibleElement.indexPathCompare);
|
|
295
294
|
|
|
296
295
|
indexPaths = JSCopy(indexPaths);
|
|
297
296
|
indexPaths.sort(function(a, b){
|
|
@@ -301,28 +300,25 @@ JSClass("UICollectionView", UIScrollView, {
|
|
|
301
300
|
var i, l;
|
|
302
301
|
var indexPath;
|
|
303
302
|
var comparison;
|
|
304
|
-
var elementIndex;
|
|
303
|
+
var elementIndex = 0;
|
|
304
|
+
var elementCount = this._visibleElements.length;
|
|
305
305
|
var cell;
|
|
306
306
|
var element;
|
|
307
307
|
|
|
308
308
|
for (i = 0, l = indexPaths.length; i < l; ++i){
|
|
309
309
|
indexPath = indexPaths[i];
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
element.view.removeFromSuperview();
|
|
323
|
-
element.view = cell;
|
|
324
|
-
}
|
|
325
|
-
}
|
|
310
|
+
while (elementIndex < elementCount && !this._visibleElements[elementIndex].indexPath.isEqual(indexPath)){
|
|
311
|
+
++elementIndex;
|
|
312
|
+
}
|
|
313
|
+
if (elementIndex < elementCount){
|
|
314
|
+
element = this._visibleElements[elementIndex];
|
|
315
|
+
cell = element.view;
|
|
316
|
+
this._enqueueReusableCell(cell);
|
|
317
|
+
cell = this._createCellWithAttributes(element.attributes);
|
|
318
|
+
if (cell !== element.view){
|
|
319
|
+
this._elementsContainerView.insertSubviewBelowSibling(cell, element.view);
|
|
320
|
+
element.view.removeFromSuperview();
|
|
321
|
+
element.view = cell;
|
|
326
322
|
}
|
|
327
323
|
}
|
|
328
324
|
}
|
|
@@ -1249,6 +1245,4 @@ VisibleElement.prototype = Object.create(Function.prototype, {
|
|
|
1249
1245
|
|
|
1250
1246
|
});
|
|
1251
1247
|
|
|
1252
|
-
|
|
1253
|
-
return indexPath.compare(element.indexPath);
|
|
1254
|
-
};
|
|
1248
|
+
})();
|
|
@@ -56,6 +56,10 @@ JSClass("UIScene", JSObject, {
|
|
|
56
56
|
},
|
|
57
57
|
|
|
58
58
|
show: function(){
|
|
59
|
+
if (UIScene._visible !== null){
|
|
60
|
+
UIScene._visible.close();
|
|
61
|
+
}
|
|
62
|
+
UIScene._visible = this;
|
|
59
63
|
if (this.menuBar){
|
|
60
64
|
this.application.windowServer.menuBar = this.menuBar;
|
|
61
65
|
}
|
|
@@ -67,7 +71,6 @@ JSClass("UIScene", JSObject, {
|
|
|
67
71
|
if (window !== null){
|
|
68
72
|
window.makeKey();
|
|
69
73
|
}
|
|
70
|
-
UIScene._visible = this;
|
|
71
74
|
},
|
|
72
75
|
|
|
73
76
|
close: function(){
|
|
@@ -80,6 +83,7 @@ JSClass("UIScene", JSObject, {
|
|
|
80
83
|
window = windowServer.windowStack[i];
|
|
81
84
|
window.close();
|
|
82
85
|
}
|
|
86
|
+
UIScene._visible = null;
|
|
83
87
|
},
|
|
84
88
|
|
|
85
89
|
});
|