@breakside/jskit 2024.24.0 → 2024.25.1
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/JSColor.js +16 -0
- package/Frameworks/Foundation.jsframework/JS/JSColorSpace.js +2 -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 +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/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/JSColor.js +16 -0
- package/Root/Frameworks/Foundation/JSColorSpace.js +2 -0
- 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/JSColor+UIKit.js +14 -9
- package/Root/Frameworks/UIKit/UINavigationBar.js +7 -0
- package/Root/Frameworks/UIKit/UIPopupButton.js +18 -0
- package/Root/Frameworks/UIKit/UIWindow.js +4 -0
- 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": "2024.
|
|
4
|
+
"JSBundleVersion": "2024.25.1",
|
|
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": "e1aafbd217207180caaadd8e3cd66d5daed8d47b"
|
|
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": "2024.
|
|
6
|
+
"JSBundleVersion": "2024.25.1",
|
|
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": "e1aafbd217207180caaadd8e3cd66d5daed8d47b"
|
|
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": "2024.
|
|
4
|
+
"JSBundleVersion": "2024.25.1",
|
|
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": "e1aafbd217207180caaadd8e3cd66d5daed8d47b"
|
|
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": "2024.
|
|
6
|
+
"JSBundleVersion": "2024.25.1",
|
|
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": "e1aafbd217207180caaadd8e3cd66d5daed8d47b"
|
|
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": "2024.
|
|
4
|
+
"JSBundleVersion": "2024.25.1",
|
|
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": "e1aafbd217207180caaadd8e3cd66d5daed8d47b"
|
|
13
13
|
}
|
|
@@ -309,6 +309,22 @@ JSClass('JSColor', JSObject, {
|
|
|
309
309
|
return JSColor.initWithSpaceAndComponents(space, components);
|
|
310
310
|
},
|
|
311
311
|
|
|
312
|
+
luminance: JSReadOnlyProperty(),
|
|
313
|
+
|
|
314
|
+
getLuminance: function(){
|
|
315
|
+
var xyzColor = this.colorInSpace(JSColorSpace.xyz);
|
|
316
|
+
return xyzColor.components[1];
|
|
317
|
+
},
|
|
318
|
+
|
|
319
|
+
contrastRatioWithColor: function(other){
|
|
320
|
+
var l1 = this.luminance;
|
|
321
|
+
var l2 = other.luminance;
|
|
322
|
+
if (l1 > l2){
|
|
323
|
+
return (l1 + 0.05) / (l2 + 0.05);
|
|
324
|
+
}
|
|
325
|
+
return (l2 + 0.05) / (l1 + 0.05);
|
|
326
|
+
},
|
|
327
|
+
|
|
312
328
|
rgbaHexStringRepresentation: function(){
|
|
313
329
|
var color = this.rgbaColor();
|
|
314
330
|
var r = Math.round(color.red * 255);
|
|
@@ -87,6 +87,7 @@ JSClass("JSColorSpace", JSObject, {
|
|
|
87
87
|
JSClass("JSXYZColorSpace", JSColorSpace, {
|
|
88
88
|
|
|
89
89
|
name: "xyz",
|
|
90
|
+
numberOfComponents: 3,
|
|
90
91
|
|
|
91
92
|
initWithWhitepoint: function(mediaWhitepoint){
|
|
92
93
|
if (mediaWhitepoint === JSColorSpace.Whitepoint.profileConnection){
|
|
@@ -163,6 +164,7 @@ JSClass("JSXYZScaledColorSpace", JSXYZColorSpace, {
|
|
|
163
164
|
JSClass("JSLabColorSpace", JSColorSpace, {
|
|
164
165
|
|
|
165
166
|
name: "lab",
|
|
167
|
+
numberOfComponents: 3,
|
|
166
168
|
|
|
167
169
|
init: function(){
|
|
168
170
|
},
|
|
@@ -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": "2024.
|
|
6
|
+
"JSBundleVersion": "2024.25.1",
|
|
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": "e1aafbd217207180caaadd8e3cd66d5daed8d47b"
|
|
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": "2024.
|
|
4
|
+
"JSBundleVersion": "2024.25.1",
|
|
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": "e1aafbd217207180caaadd8e3cd66d5daed8d47b"
|
|
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": "2024.
|
|
6
|
+
"JSBundleVersion": "2024.25.1",
|
|
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": "e1aafbd217207180caaadd8e3cd66d5daed8d47b"
|
|
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": "2024.
|
|
4
|
+
"JSBundleVersion": "2024.25.1",
|
|
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": "e1aafbd217207180caaadd8e3cd66d5daed8d47b"
|
|
12
12
|
}
|
|
@@ -3,14 +3,14 @@ JSBundle.bundles['io.breakside.jskit'] = {
|
|
|
3
3
|
"Info": {
|
|
4
4
|
"JSBundleType": "node",
|
|
5
5
|
"JSBundleIdentifier": "io.breakside.jskit",
|
|
6
|
-
"JSBundleVersion": "2024.
|
|
6
|
+
"JSBundleVersion": "2024.25.1",
|
|
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": "e1aafbd217207180caaadd8e3cd66d5daed8d47b"
|
|
14
14
|
},
|
|
15
15
|
"Resources": [
|
|
16
16
|
{
|
|
@@ -309,6 +309,22 @@ JSClass('JSColor', JSObject, {
|
|
|
309
309
|
return JSColor.initWithSpaceAndComponents(space, components);
|
|
310
310
|
},
|
|
311
311
|
|
|
312
|
+
luminance: JSReadOnlyProperty(),
|
|
313
|
+
|
|
314
|
+
getLuminance: function(){
|
|
315
|
+
var xyzColor = this.colorInSpace(JSColorSpace.xyz);
|
|
316
|
+
return xyzColor.components[1];
|
|
317
|
+
},
|
|
318
|
+
|
|
319
|
+
contrastRatioWithColor: function(other){
|
|
320
|
+
var l1 = this.luminance;
|
|
321
|
+
var l2 = other.luminance;
|
|
322
|
+
if (l1 > l2){
|
|
323
|
+
return (l1 + 0.05) / (l2 + 0.05);
|
|
324
|
+
}
|
|
325
|
+
return (l2 + 0.05) / (l1 + 0.05);
|
|
326
|
+
},
|
|
327
|
+
|
|
312
328
|
rgbaHexStringRepresentation: function(){
|
|
313
329
|
var color = this.rgbaColor();
|
|
314
330
|
var r = Math.round(color.red * 255);
|
|
@@ -87,6 +87,7 @@ JSClass("JSColorSpace", JSObject, {
|
|
|
87
87
|
JSClass("JSXYZColorSpace", JSColorSpace, {
|
|
88
88
|
|
|
89
89
|
name: "xyz",
|
|
90
|
+
numberOfComponents: 3,
|
|
90
91
|
|
|
91
92
|
initWithWhitepoint: function(mediaWhitepoint){
|
|
92
93
|
if (mediaWhitepoint === JSColorSpace.Whitepoint.profileConnection){
|
|
@@ -163,6 +164,7 @@ JSClass("JSXYZScaledColorSpace", JSXYZColorSpace, {
|
|
|
163
164
|
JSClass("JSLabColorSpace", JSColorSpace, {
|
|
164
165
|
|
|
165
166
|
name: "lab",
|
|
167
|
+
numberOfComponents: 3,
|
|
166
168
|
|
|
167
169
|
init: function(){
|
|
168
170
|
},
|
|
@@ -30,13 +30,17 @@ JSColor.definePropertiesFromExtensions({
|
|
|
30
30
|
JSColor.defineInitMethod("initWithUIStyles");
|
|
31
31
|
|
|
32
32
|
// Common Colors
|
|
33
|
-
JSColorSpace.ui.setStylesForName("background", JSColor.white, JSColor.initWithWhite(0.15));
|
|
34
|
-
JSColorSpace.ui.setStylesForName("
|
|
35
|
-
JSColorSpace.ui.setStylesForName("
|
|
36
|
-
JSColorSpace.ui.setStylesForName("
|
|
37
|
-
JSColorSpace.ui.setStylesForName("
|
|
38
|
-
JSColorSpace.ui.setStylesForName("
|
|
39
|
-
JSColorSpace.ui.
|
|
33
|
+
JSColorSpace.ui.setStylesForName("background", JSColor.white, JSColor.initWithWhite(0.15), JSColor.white, JSColor.initWithWhite(0.15));
|
|
34
|
+
JSColorSpace.ui.setStylesForName("shadedBackground", JSColor.initWithWhite(0.85), JSColor.initWithWhite(0.30), JSColor.white.colorDarkenedByPercentage(0.2), JSColor.black.colorLightenedByPercentage(0.3));
|
|
35
|
+
JSColorSpace.ui.setStylesForName("secondaryShadedBackground", JSColor.initWithWhite(0.965), JSColor.initWithWhite(0.25), JSColor.white, JSColor.black);
|
|
36
|
+
JSColorSpace.ui.setStylesForName("separator", JSColor.initWithWhite(0.85), JSColor.initWithWhite(0.30), JSColor.initWithWhite(0.5), JSColor.initWithWhite(0.5));
|
|
37
|
+
JSColorSpace.ui.setStylesForName("secondarySeparator", JSColor.initWithWhite(0.965), JSColor.initWithWhite(0.25), JSColor.initWithWhite(0.5), JSColor.initWithWhite(0.5));
|
|
38
|
+
JSColorSpace.ui.setStylesForName("text", JSColor.black.colorWithAlpha(0.9), JSColor.white.colorWithAlpha(0.9), JSColor.black, JSColor.white);
|
|
39
|
+
JSColorSpace.ui.setStylesForName("secondaryText", JSColor.black.colorWithAlpha(0.6), JSColor.white.colorWithAlpha(0.6), JSColor.black, JSColor.white);
|
|
40
|
+
JSColorSpace.ui.setStylesForName("highlight", JSColor.initWithRGBA(0, 0.5, 1), JSColor.initWithRGBA(0, 0.5, 1), JSColor.initWithRGBA(0, 0.5, 1), JSColor.initWithRGBA(0, 0.5, 1));
|
|
41
|
+
JSColorSpace.ui.setStylesForName("mutedHighlight", JSColor.black.colorWithAlpha(0.15), JSColor.white.colorWithAlpha(0.1), JSColor.black.colorWithAlpha(0.4), JSColor.white.colorWithAlpha(0.3));
|
|
42
|
+
JSColorSpace.ui.setStylesForName("highlightedText", JSColor.white, JSColor.white, JSColor.white, JSColor.white);
|
|
43
|
+
JSColorSpace.ui.setColorForName("placeholderText", JSColor.black.colorWithAlpha(0.3), JSColor.white.colorWithAlpha(0.3), JSColor.black.colorWithAlpha(0.7), JSColor.white.colorWithAlpha(0.7));
|
|
40
44
|
JSColorSpace.ui.setStylesForName("destructive", JSColor.initWithRGBA(0.8,0,0), JSColor.initWithRGBA(1,0.5,0.5));
|
|
41
45
|
|
|
42
46
|
// Control Colors
|
|
@@ -58,14 +62,15 @@ JSColorSpace.ui.setStylesForName("disabledControlTitle", JSColor.initWithWhite(0
|
|
|
58
62
|
JSColorSpace.ui.setColorForName("controlShadow", JSColor.black.colorWithAlpha(0.1));
|
|
59
63
|
|
|
60
64
|
// Window Colors
|
|
61
|
-
JSColorSpace.ui.setStylesForName("window", JSColor.initWithWhite(0.94), JSColor.initWithWhite(0.2));
|
|
65
|
+
JSColorSpace.ui.setStylesForName("window", JSColor.initWithWhite(0.94), JSColor.initWithWhite(0.2), JSColor.white, JSColor.initWithWhite(0.2));
|
|
66
|
+
JSColorSpace.ui.setStylesForName("windowBorder", JSColor.clear, JSColor.white.colorWithAlpha(0.1), JSColor.black, JSColor.white);
|
|
62
67
|
JSColorSpace.ui.setColorForName("windowShadow", JSColor.black.colorWithAlpha(0.4));
|
|
63
68
|
JSColorSpace.ui.setColorForName("toolbarTitle", JSColor.text.colorWithAlpha(0.6));
|
|
64
69
|
|
|
65
70
|
// Tooltip Colors
|
|
66
71
|
JSColorSpace.ui.setColorForName("tooltip", JSColor.window);
|
|
67
72
|
JSColorSpace.ui.setColorForName("tooltipText", JSColor.text);
|
|
68
|
-
JSColorSpace.ui.setStylesForName("tooltipBorder", JSColor.initWithWhite(0.7), JSColor.black);
|
|
73
|
+
JSColorSpace.ui.setStylesForName("tooltipBorder", JSColor.initWithWhite(0.7), JSColor.black, JSColor.black, JSColor.white);
|
|
69
74
|
JSColorSpace.ui.setColorForName("tooltipShadow", JSColor.black.colorWithAlpha(0.2));
|
|
70
75
|
|
|
71
76
|
// Menu Colors
|
|
@@ -309,6 +309,7 @@ JSClass("UINavigationBarDefaultStyler", UINavigationBarStyler, {
|
|
|
309
309
|
disabledItemColor: null,
|
|
310
310
|
itemInsets: null,
|
|
311
311
|
itemTitleInsets: null,
|
|
312
|
+
itemSpacing: 0,
|
|
312
313
|
backButtonTitleInsets: null,
|
|
313
314
|
backButtonImage: null,
|
|
314
315
|
backButtonColor: null,
|
|
@@ -738,6 +739,9 @@ JSClass("UINavigationBarDefaultStyler", UINavigationBarStyler, {
|
|
|
738
739
|
xLeft = this.titleInsets.left;
|
|
739
740
|
}
|
|
740
741
|
for (i = 0, l = props.leftBarItemViews.length; i < l; ++i){
|
|
742
|
+
if (i > 0){
|
|
743
|
+
xLeft += this.itemSpacing;
|
|
744
|
+
}
|
|
741
745
|
barItemView = props.leftBarItemViews[i];
|
|
742
746
|
barItemView.sizeToFitSize(JSSize(xRight - xLeft, itemHeight));
|
|
743
747
|
barItemView.untransformedFrame = JSRect(JSPoint(xLeft, y + (itemHeight - barItemView.bounds.size.height) / 2), barItemView.bounds.size);
|
|
@@ -749,6 +753,9 @@ JSClass("UINavigationBarDefaultStyler", UINavigationBarStyler, {
|
|
|
749
753
|
xRight -= barItemView.bounds.size.width;
|
|
750
754
|
barItemView.untransformedFrame = JSRect(JSPoint(xRight, y + (itemHeight - barItemView.bounds.size.height) / 2), barItemView.bounds.size);
|
|
751
755
|
barItemView.hidden = xRight < xLeft;
|
|
756
|
+
if (i > 0){
|
|
757
|
+
xRight -= this.itemSpacing;
|
|
758
|
+
}
|
|
752
759
|
}
|
|
753
760
|
|
|
754
761
|
var availableTitleWidth = xRight - xLeft;
|
|
@@ -797,6 +797,11 @@ JSClass("UIPopupButtonImageStyler", UIPopupButtonStyler, {
|
|
|
797
797
|
overBackgroundColor: null,
|
|
798
798
|
cornerRadius: 0,
|
|
799
799
|
titleInsets: null,
|
|
800
|
+
normalBorderColor: null,
|
|
801
|
+
disabledBorderColor: null,
|
|
802
|
+
overBorderColor: null,
|
|
803
|
+
activeBorderColor: null,
|
|
804
|
+
borderWidth: 0,
|
|
800
805
|
|
|
801
806
|
init: function(){
|
|
802
807
|
this.initWithColor(JSColor.text);
|
|
@@ -863,6 +868,14 @@ JSClass("UIPopupButtonImageStyler", UIPopupButtonStyler, {
|
|
|
863
868
|
this.disabledBackgroundColor = this.normalBackgroundColor.colorWithAlpha(0.5);
|
|
864
869
|
}
|
|
865
870
|
}
|
|
871
|
+
if (this.normalBorderColor !== null){
|
|
872
|
+
if (this.activeBorderColor === null){
|
|
873
|
+
this.activeBorderColor = this.normalBorderColor.colorDarkenedByPercentage(0.2);
|
|
874
|
+
}
|
|
875
|
+
if (this.disabledBorderColor === null){
|
|
876
|
+
this.disabledBorderColor = this.normalBorderColor.colorWithAlpha(0.5);
|
|
877
|
+
}
|
|
878
|
+
}
|
|
866
879
|
},
|
|
867
880
|
|
|
868
881
|
initializeControl: function(button){
|
|
@@ -875,6 +888,7 @@ JSClass("UIPopupButtonImageStyler", UIPopupButtonStyler, {
|
|
|
875
888
|
button._imageView.hidden = false;
|
|
876
889
|
button.cornerRadius = this.cornerRadius;
|
|
877
890
|
button.titleInsets = this.titleInsets;
|
|
891
|
+
button.borderWidth = this.borderWidth;
|
|
878
892
|
this.updateControl(button);
|
|
879
893
|
},
|
|
880
894
|
|
|
@@ -882,15 +896,19 @@ JSClass("UIPopupButtonImageStyler", UIPopupButtonStyler, {
|
|
|
882
896
|
if (!button.enabled){
|
|
883
897
|
button._imageView.templateColor = this.disabledColor;
|
|
884
898
|
button.backgroundColor = this.normalBackgroundColor;
|
|
899
|
+
button.borderColor = this.normalBorderColor;
|
|
885
900
|
}else if (button.active){
|
|
886
901
|
button._imageView.templateColor = this.activeColor;
|
|
887
902
|
button.backgroundColor = this.activeBackgroundColor;
|
|
903
|
+
button.borderColor = this.activeBorderColor;
|
|
888
904
|
}else{
|
|
889
905
|
button._imageView.templateColor = this.normalColor;
|
|
890
906
|
if (this.showsOverState && button.over){
|
|
891
907
|
button.backgroundColor = this.overBackgroundColor;
|
|
908
|
+
button.borderColor = this.overBorderColor;
|
|
892
909
|
}else{
|
|
893
910
|
button.backgroundColor = this.normalBackgroundColor;
|
|
911
|
+
button.borderColor = this.normalBorderColor;
|
|
894
912
|
}
|
|
895
913
|
}
|
|
896
914
|
},
|
|
@@ -1458,6 +1458,8 @@ JSClass("UIWindowDefaultStyler", UIWindowStyler, {
|
|
|
1458
1458
|
window.shadowRadius = this.shadowRadius;
|
|
1459
1459
|
window.cornerRadius = this.cornerRadius;
|
|
1460
1460
|
window.backgroundColor = this.backgroundColor;
|
|
1461
|
+
window.borderWidth = 1;
|
|
1462
|
+
window.borderColor = JSColor.windowBorder;
|
|
1461
1463
|
|
|
1462
1464
|
this.updateWindow(window);
|
|
1463
1465
|
},
|
|
@@ -1677,6 +1679,8 @@ JSClass("UIWindowTitlelessStyler", UIWindowStyler, {
|
|
|
1677
1679
|
window.shadowRadius = this.shadowRadius;
|
|
1678
1680
|
window.cornerRadius = this.cornerRadius;
|
|
1679
1681
|
window.backgroundColor = this.backgroundColor;
|
|
1682
|
+
window.borderWidth = 1;
|
|
1683
|
+
window.borderColor = JSColor.windowBorder;
|
|
1680
1684
|
|
|
1681
1685
|
this.updateWindow(window);
|
|
1682
1686
|
},
|