@breakside/jskit 2026.6.0 → 2026.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/JSContext.js +23 -1
- package/Frameworks/Foundation.jsframework/JS/JSGradient.js +25 -0
- package/Frameworks/Foundation.jsframework/JS/JSPath.js +80 -0
- package/Frameworks/Foundation.jsframework/JS/JSRect.js +12 -0
- 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/io.breakside.jskit-bundle.js +4 -4
- package/Resources/doc-default.css +8 -0
- 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/Info.yaml +1 -1
- package/Root/Frameworks/DOM/Info.yaml +1 -1
- package/Root/Frameworks/Dispatch/Info.yaml +1 -1
- package/Root/Frameworks/FontKit/Info.yaml +1 -1
- package/Root/Frameworks/Foundation/Info.yaml +1 -1
- package/Root/Frameworks/Foundation/JSContext.js +23 -1
- package/Root/Frameworks/Foundation/JSGradient.js +25 -0
- package/Root/Frameworks/Foundation/JSPath.js +80 -0
- package/Root/Frameworks/Foundation/JSRect.js +12 -0
- package/Root/Frameworks/ImageKit/IKHTMLCanvasBitmapContext.js +91 -13
- 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/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/UIApplication.js +5 -1
- package/Root/Frameworks/UIKit/UIHTMLApplication.js +24 -0
- package/Root/Frameworks/UIKit/UIHTMLDisplayServerCanvasContext.js +87 -13
- package/Root/Frameworks/UIKit/UIHTMLWindowServer.js +17 -3
- package/Root/Frameworks/UIKit/UIKit.js +2 -0
- package/Root/Frameworks/UIKit/UILayer.js +6 -0
- package/Root/Frameworks/UIKit/UIPopupWindow.js +15 -5
- package/Root/Frameworks/UIKit/UITextAction.js +16 -0
- package/Root/Frameworks/UIKit/UITextActionsMenu.js +95 -0
- package/Root/Frameworks/UIKit/UITextEditor.js +57 -7
- package/Root/Frameworks/UIKit/UITextField.js +102 -0
- package/Root/Frameworks/UIKit/en.lproj/Localizable.strings.yaml +4 -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": "2026.
|
|
4
|
+
"JSBundleVersion": "2026.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": "7481a2557e5555dbf2a58e88ba6720b16de86277"
|
|
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": "2026.
|
|
6
|
+
"JSBundleVersion": "2026.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": "7481a2557e5555dbf2a58e88ba6720b16de86277"
|
|
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": "2026.
|
|
4
|
+
"JSBundleVersion": "2026.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": "7481a2557e5555dbf2a58e88ba6720b16de86277"
|
|
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": "2026.
|
|
6
|
+
"JSBundleVersion": "2026.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": "7481a2557e5555dbf2a58e88ba6720b16de86277"
|
|
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": "2026.
|
|
4
|
+
"JSBundleVersion": "2026.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": "7481a2557e5555dbf2a58e88ba6720b16de86277"
|
|
13
13
|
}
|
|
@@ -209,7 +209,29 @@ JSClass("JSContext", JSObject, {
|
|
|
209
209
|
drawLinearGradient: function(gradient, rect){
|
|
210
210
|
},
|
|
211
211
|
|
|
212
|
-
drawRadialGradient: function(gradient, rect
|
|
212
|
+
drawRadialGradient: function(gradient, rect){
|
|
213
|
+
},
|
|
214
|
+
|
|
215
|
+
drawLinearGradientStroke: function(gradient, path){
|
|
216
|
+
// FIXME: gradient should be aligned to original path rect
|
|
217
|
+
var strokePath = path.pathThatFillsStroke(this.state.lineWidth, this.state.lineCap, this.state.lineJoin, this.state.miterLimit);
|
|
218
|
+
this.save();
|
|
219
|
+
var rect = strokePath.boundingRect;
|
|
220
|
+
this.addPath(path);
|
|
221
|
+
this.clip();
|
|
222
|
+
this.drawLinearGradient(gradient, rect);
|
|
223
|
+
this.restore();
|
|
224
|
+
},
|
|
225
|
+
|
|
226
|
+
drawRadialGradientStroke: function(gradient, path){
|
|
227
|
+
// FIXME: gradient should be aligned to original path rect
|
|
228
|
+
var strokePath = path.pathThatFillsStroke(this.state.lineWidth, this.state.lineCap, this.state.lineJoin, this.state.miterLimit);
|
|
229
|
+
this.save();
|
|
230
|
+
var rect = strokePath.boundingRect;
|
|
231
|
+
this.addPath(path);
|
|
232
|
+
this.clip();
|
|
233
|
+
this.drawRadialGradient(gradient, rect);
|
|
234
|
+
this.restore();
|
|
213
235
|
},
|
|
214
236
|
|
|
215
237
|
// ----------------------------------------------------------------------
|
|
@@ -86,6 +86,31 @@ JSClass('JSGradient', JSObject, {
|
|
|
86
86
|
}
|
|
87
87
|
},
|
|
88
88
|
|
|
89
|
+
initFromDictionary: function(dictionary){
|
|
90
|
+
if (dictionary === null || dictionary === undefined){
|
|
91
|
+
return null;
|
|
92
|
+
}
|
|
93
|
+
this.start = JSPoint(dictionary.x0, dictionary.y0);
|
|
94
|
+
this.end = JSPoint(dictionary.x1, dictionary.y1);
|
|
95
|
+
this.stops = [];
|
|
96
|
+
var i, l;
|
|
97
|
+
for (i = 0, l = dictionary.stops.length; i < l; ++i){
|
|
98
|
+
this.addStop(dictionary.stops[i][0], JSColor.initWithRGBAHexString(dictionary.stops[i][1]));
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
|
|
102
|
+
dictionaryRepresentation: function(){
|
|
103
|
+
return {
|
|
104
|
+
x0: this.start.x,
|
|
105
|
+
y0: this.start.y,
|
|
106
|
+
x1: this.end.x,
|
|
107
|
+
y1: this.end.y,
|
|
108
|
+
stops: this.stops.map(function(s){
|
|
109
|
+
return [s.position, s.color.rgbaHexStringRepresentation()];
|
|
110
|
+
})
|
|
111
|
+
};
|
|
112
|
+
},
|
|
113
|
+
|
|
89
114
|
initWithStops: function(position1, color1 /* , ... */){
|
|
90
115
|
this.init();
|
|
91
116
|
var args = Array.prototype.slice.call(arguments, 0);
|
|
@@ -838,6 +838,83 @@ JSClass("JSPath", JSObject, {
|
|
|
838
838
|
return JSRect(min, JSSize(max.x - min.x, max.y - min.y));
|
|
839
839
|
},
|
|
840
840
|
|
|
841
|
+
initWithSVGPathData: function(svgPathData){
|
|
842
|
+
if (svgPathData === null || svgPathData === undefined){
|
|
843
|
+
return null;
|
|
844
|
+
}
|
|
845
|
+
var parts = svgPathData.split(" ").filter(function(p){
|
|
846
|
+
return p !== "";
|
|
847
|
+
});
|
|
848
|
+
this.subpaths = [];
|
|
849
|
+
var part;
|
|
850
|
+
var subpath = null;
|
|
851
|
+
var point = JSPoint.Zero;
|
|
852
|
+
var cp1;
|
|
853
|
+
var cp2;
|
|
854
|
+
var curve;
|
|
855
|
+
while (parts.length > 0){
|
|
856
|
+
part = parts.shift();
|
|
857
|
+
if (part === "M"){
|
|
858
|
+
if (parts.length < 2){
|
|
859
|
+
break;
|
|
860
|
+
}
|
|
861
|
+
point = JSPoint.Zero;
|
|
862
|
+
part = parts.shift();
|
|
863
|
+
point.x = parseFloat(part);
|
|
864
|
+
part = parts.shift();
|
|
865
|
+
point.y = parseFloat(part);
|
|
866
|
+
subpath = Subpath(point);
|
|
867
|
+
this.subpaths.push(subpath);
|
|
868
|
+
this._currentPoint = point;
|
|
869
|
+
}else if (part === "L"){
|
|
870
|
+
if (parts.length < 2){
|
|
871
|
+
break;
|
|
872
|
+
}
|
|
873
|
+
if (subpath === null){
|
|
874
|
+
subpath = Subpath(point);
|
|
875
|
+
this.subpaths.push(subpath);
|
|
876
|
+
}
|
|
877
|
+
point = JSPoint.Zero;
|
|
878
|
+
part = parts.shift();
|
|
879
|
+
point.x = parseFloat(part);
|
|
880
|
+
part = parts.shift();
|
|
881
|
+
point.y = parseFloat(part);
|
|
882
|
+
subpath.segments.push({type: JSPath.SegmentType.line, end: point});
|
|
883
|
+
this._currentPoint = point;
|
|
884
|
+
}else if (part === "C"){
|
|
885
|
+
if (parts.length < 6){
|
|
886
|
+
break;
|
|
887
|
+
}
|
|
888
|
+
if (subpath === null){
|
|
889
|
+
subpath = Subpath(point);
|
|
890
|
+
this.subpaths.push(subpath);
|
|
891
|
+
}
|
|
892
|
+
cp1 = JSPoint.Zero;
|
|
893
|
+
cp2 = JSPoint.Zero;
|
|
894
|
+
point = JSPoint.Zero;
|
|
895
|
+
part = parts.shift();
|
|
896
|
+
cp1.x = parseFloat(part);
|
|
897
|
+
part = parts.shift();
|
|
898
|
+
cp1.y = parseFloat(part);
|
|
899
|
+
part = parts.shift();
|
|
900
|
+
cp2.x = parseFloat(part);
|
|
901
|
+
part = parts.shift();
|
|
902
|
+
cp2.y = parseFloat(part);
|
|
903
|
+
part = parts.shift();
|
|
904
|
+
point.x = parseFloat(part);
|
|
905
|
+
part = parts.shift();
|
|
906
|
+
point.y = parseFloat(part);
|
|
907
|
+
subpath.segments.push({type: JSPath.SegmentType.curve, curve: JSCubicBezier(this._currentPoint, cp1, cp2, point)});
|
|
908
|
+
this._currentPoint = point;
|
|
909
|
+
}else if (part === "Z"){
|
|
910
|
+
if (subpath !== null){
|
|
911
|
+
subpath.closed = true;
|
|
912
|
+
subpath = null;
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
},
|
|
917
|
+
|
|
841
918
|
svgPathData: function(){
|
|
842
919
|
var subpath;
|
|
843
920
|
var segment;
|
|
@@ -868,6 +945,9 @@ JSClass("JSPath", JSObject, {
|
|
|
868
945
|
data += "Z ";
|
|
869
946
|
}
|
|
870
947
|
}
|
|
948
|
+
if (data.length > 0 && data[data.length - 1] == " "){
|
|
949
|
+
data = data.substr(0, data.length - 1);
|
|
950
|
+
}
|
|
871
951
|
return data;
|
|
872
952
|
},
|
|
873
953
|
|
|
@@ -77,6 +77,18 @@ JSRect.prototype = {
|
|
|
77
77
|
return JSRect(origin, size);
|
|
78
78
|
},
|
|
79
79
|
|
|
80
|
+
unioningRect: function(other){
|
|
81
|
+
var origin = JSPoint(
|
|
82
|
+
Math.min(this.origin.x, other.origin.x),
|
|
83
|
+
Math.min(this.origin.y, other.origin.y)
|
|
84
|
+
);
|
|
85
|
+
var size = JSSize(
|
|
86
|
+
Math.max(0, Math.max(this.origin.x + this.size.width, other.origin.x + other.size.width) - origin.x),
|
|
87
|
+
Math.max(0, Math.max(this.origin.y + this.size.height, other.origin.y + other.size.height) - origin.y)
|
|
88
|
+
);
|
|
89
|
+
return JSRect(origin, size);
|
|
90
|
+
},
|
|
91
|
+
|
|
80
92
|
isEqual: function(other){
|
|
81
93
|
return this.origin.isEqual(other.origin) && this.size.isEqual(other.size);
|
|
82
94
|
},
|
|
@@ -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": "2026.
|
|
6
|
+
"JSBundleVersion": "2026.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": "7481a2557e5555dbf2a58e88ba6720b16de86277"
|
|
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": "2026.
|
|
4
|
+
"JSBundleVersion": "2026.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": "7481a2557e5555dbf2a58e88ba6720b16de86277"
|
|
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": "2026.
|
|
6
|
+
"JSBundleVersion": "2026.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": "7481a2557e5555dbf2a58e88ba6720b16de86277"
|
|
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": "2026.
|
|
4
|
+
"JSBundleVersion": "2026.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": "7481a2557e5555dbf2a58e88ba6720b16de86277"
|
|
12
12
|
}
|
|
@@ -3,22 +3,22 @@ JSBundle.bundles['io.breakside.jskit'] = {
|
|
|
3
3
|
"Info": {
|
|
4
4
|
"JSBundleType": "node",
|
|
5
5
|
"JSBundleIdentifier": "io.breakside.jskit",
|
|
6
|
-
"JSBundleVersion": "2026.
|
|
6
|
+
"JSBundleVersion": "2026.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": "7481a2557e5555dbf2a58e88ba6720b16de86277"
|
|
14
14
|
},
|
|
15
15
|
"Resources": [
|
|
16
16
|
{
|
|
17
17
|
"path": "doc-default.css",
|
|
18
18
|
"ext": ".css",
|
|
19
|
-
"byte_size":
|
|
19
|
+
"byte_size": 11088,
|
|
20
20
|
"mimetype": "text/css",
|
|
21
|
-
"hash": "
|
|
21
|
+
"hash": "fb20238b7c988f0d959bad2d071b06000068a39d",
|
|
22
22
|
"nodeBundlePath": "Resources/doc-default.css"
|
|
23
23
|
},
|
|
24
24
|
{
|
|
@@ -21,6 +21,14 @@ article.doc h1,h2,h3,h4,h5,h5,b,strong{
|
|
|
21
21
|
font-weight: 600;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
article.doc > section > header > h1, article.doc > section > h1{
|
|
25
|
+
font-size: 1.4em;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
article.doc > section > section > header > h1{
|
|
29
|
+
font-size: 1em;
|
|
30
|
+
}
|
|
31
|
+
|
|
24
32
|
article.doc a{
|
|
25
33
|
text-decoration: none;
|
|
26
34
|
color: rgb(90,90,200);
|
|
@@ -209,7 +209,29 @@ JSClass("JSContext", JSObject, {
|
|
|
209
209
|
drawLinearGradient: function(gradient, rect){
|
|
210
210
|
},
|
|
211
211
|
|
|
212
|
-
drawRadialGradient: function(gradient, rect
|
|
212
|
+
drawRadialGradient: function(gradient, rect){
|
|
213
|
+
},
|
|
214
|
+
|
|
215
|
+
drawLinearGradientStroke: function(gradient, path){
|
|
216
|
+
// FIXME: gradient should be aligned to original path rect
|
|
217
|
+
var strokePath = path.pathThatFillsStroke(this.state.lineWidth, this.state.lineCap, this.state.lineJoin, this.state.miterLimit);
|
|
218
|
+
this.save();
|
|
219
|
+
var rect = strokePath.boundingRect;
|
|
220
|
+
this.addPath(path);
|
|
221
|
+
this.clip();
|
|
222
|
+
this.drawLinearGradient(gradient, rect);
|
|
223
|
+
this.restore();
|
|
224
|
+
},
|
|
225
|
+
|
|
226
|
+
drawRadialGradientStroke: function(gradient, path){
|
|
227
|
+
// FIXME: gradient should be aligned to original path rect
|
|
228
|
+
var strokePath = path.pathThatFillsStroke(this.state.lineWidth, this.state.lineCap, this.state.lineJoin, this.state.miterLimit);
|
|
229
|
+
this.save();
|
|
230
|
+
var rect = strokePath.boundingRect;
|
|
231
|
+
this.addPath(path);
|
|
232
|
+
this.clip();
|
|
233
|
+
this.drawRadialGradient(gradient, rect);
|
|
234
|
+
this.restore();
|
|
213
235
|
},
|
|
214
236
|
|
|
215
237
|
// ----------------------------------------------------------------------
|
|
@@ -86,6 +86,31 @@ JSClass('JSGradient', JSObject, {
|
|
|
86
86
|
}
|
|
87
87
|
},
|
|
88
88
|
|
|
89
|
+
initFromDictionary: function(dictionary){
|
|
90
|
+
if (dictionary === null || dictionary === undefined){
|
|
91
|
+
return null;
|
|
92
|
+
}
|
|
93
|
+
this.start = JSPoint(dictionary.x0, dictionary.y0);
|
|
94
|
+
this.end = JSPoint(dictionary.x1, dictionary.y1);
|
|
95
|
+
this.stops = [];
|
|
96
|
+
var i, l;
|
|
97
|
+
for (i = 0, l = dictionary.stops.length; i < l; ++i){
|
|
98
|
+
this.addStop(dictionary.stops[i][0], JSColor.initWithRGBAHexString(dictionary.stops[i][1]));
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
|
|
102
|
+
dictionaryRepresentation: function(){
|
|
103
|
+
return {
|
|
104
|
+
x0: this.start.x,
|
|
105
|
+
y0: this.start.y,
|
|
106
|
+
x1: this.end.x,
|
|
107
|
+
y1: this.end.y,
|
|
108
|
+
stops: this.stops.map(function(s){
|
|
109
|
+
return [s.position, s.color.rgbaHexStringRepresentation()];
|
|
110
|
+
})
|
|
111
|
+
};
|
|
112
|
+
},
|
|
113
|
+
|
|
89
114
|
initWithStops: function(position1, color1 /* , ... */){
|
|
90
115
|
this.init();
|
|
91
116
|
var args = Array.prototype.slice.call(arguments, 0);
|
|
@@ -838,6 +838,83 @@ JSClass("JSPath", JSObject, {
|
|
|
838
838
|
return JSRect(min, JSSize(max.x - min.x, max.y - min.y));
|
|
839
839
|
},
|
|
840
840
|
|
|
841
|
+
initWithSVGPathData: function(svgPathData){
|
|
842
|
+
if (svgPathData === null || svgPathData === undefined){
|
|
843
|
+
return null;
|
|
844
|
+
}
|
|
845
|
+
var parts = svgPathData.split(" ").filter(function(p){
|
|
846
|
+
return p !== "";
|
|
847
|
+
});
|
|
848
|
+
this.subpaths = [];
|
|
849
|
+
var part;
|
|
850
|
+
var subpath = null;
|
|
851
|
+
var point = JSPoint.Zero;
|
|
852
|
+
var cp1;
|
|
853
|
+
var cp2;
|
|
854
|
+
var curve;
|
|
855
|
+
while (parts.length > 0){
|
|
856
|
+
part = parts.shift();
|
|
857
|
+
if (part === "M"){
|
|
858
|
+
if (parts.length < 2){
|
|
859
|
+
break;
|
|
860
|
+
}
|
|
861
|
+
point = JSPoint.Zero;
|
|
862
|
+
part = parts.shift();
|
|
863
|
+
point.x = parseFloat(part);
|
|
864
|
+
part = parts.shift();
|
|
865
|
+
point.y = parseFloat(part);
|
|
866
|
+
subpath = Subpath(point);
|
|
867
|
+
this.subpaths.push(subpath);
|
|
868
|
+
this._currentPoint = point;
|
|
869
|
+
}else if (part === "L"){
|
|
870
|
+
if (parts.length < 2){
|
|
871
|
+
break;
|
|
872
|
+
}
|
|
873
|
+
if (subpath === null){
|
|
874
|
+
subpath = Subpath(point);
|
|
875
|
+
this.subpaths.push(subpath);
|
|
876
|
+
}
|
|
877
|
+
point = JSPoint.Zero;
|
|
878
|
+
part = parts.shift();
|
|
879
|
+
point.x = parseFloat(part);
|
|
880
|
+
part = parts.shift();
|
|
881
|
+
point.y = parseFloat(part);
|
|
882
|
+
subpath.segments.push({type: JSPath.SegmentType.line, end: point});
|
|
883
|
+
this._currentPoint = point;
|
|
884
|
+
}else if (part === "C"){
|
|
885
|
+
if (parts.length < 6){
|
|
886
|
+
break;
|
|
887
|
+
}
|
|
888
|
+
if (subpath === null){
|
|
889
|
+
subpath = Subpath(point);
|
|
890
|
+
this.subpaths.push(subpath);
|
|
891
|
+
}
|
|
892
|
+
cp1 = JSPoint.Zero;
|
|
893
|
+
cp2 = JSPoint.Zero;
|
|
894
|
+
point = JSPoint.Zero;
|
|
895
|
+
part = parts.shift();
|
|
896
|
+
cp1.x = parseFloat(part);
|
|
897
|
+
part = parts.shift();
|
|
898
|
+
cp1.y = parseFloat(part);
|
|
899
|
+
part = parts.shift();
|
|
900
|
+
cp2.x = parseFloat(part);
|
|
901
|
+
part = parts.shift();
|
|
902
|
+
cp2.y = parseFloat(part);
|
|
903
|
+
part = parts.shift();
|
|
904
|
+
point.x = parseFloat(part);
|
|
905
|
+
part = parts.shift();
|
|
906
|
+
point.y = parseFloat(part);
|
|
907
|
+
subpath.segments.push({type: JSPath.SegmentType.curve, curve: JSCubicBezier(this._currentPoint, cp1, cp2, point)});
|
|
908
|
+
this._currentPoint = point;
|
|
909
|
+
}else if (part === "Z"){
|
|
910
|
+
if (subpath !== null){
|
|
911
|
+
subpath.closed = true;
|
|
912
|
+
subpath = null;
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
},
|
|
917
|
+
|
|
841
918
|
svgPathData: function(){
|
|
842
919
|
var subpath;
|
|
843
920
|
var segment;
|
|
@@ -868,6 +945,9 @@ JSClass("JSPath", JSObject, {
|
|
|
868
945
|
data += "Z ";
|
|
869
946
|
}
|
|
870
947
|
}
|
|
948
|
+
if (data.length > 0 && data[data.length - 1] == " "){
|
|
949
|
+
data = data.substr(0, data.length - 1);
|
|
950
|
+
}
|
|
871
951
|
return data;
|
|
872
952
|
},
|
|
873
953
|
|