@breakside/jskit 2024.50.2 → 2024.53.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/Frameworks/DOM.jsframework/Info.json +2 -2
  2. package/Frameworks/DOM.jsframework/io.breakside.JSKit.DOM-bundle.js +2 -2
  3. package/Frameworks/FontKit.jsframework/Info.json +2 -2
  4. package/Frameworks/FontKit.jsframework/io.breakside.JSKit.FontKit-bundle.js +2 -2
  5. package/Frameworks/Foundation.jsframework/Info.json +2 -2
  6. package/Frameworks/Foundation.jsframework/JS/JSImage.js +32 -1
  7. package/Frameworks/Foundation.jsframework/io.breakside.JSKit.Foundation-bundle.js +2 -2
  8. package/Frameworks/SecurityKit.jsframework/Info.json +2 -2
  9. package/Frameworks/SecurityKit.jsframework/io.breakside.JSKit.SecurityKit-bundle.js +2 -2
  10. package/Info.json +2 -2
  11. package/Node/io.breakside.jskit-bundle.js +2 -2
  12. package/Root/Frameworks/APIKit/Info.yaml +1 -1
  13. package/Root/Frameworks/APIKitTesting/Info.yaml +1 -1
  14. package/Root/Frameworks/AuthKit/Info.yaml +1 -1
  15. package/Root/Frameworks/CSSOM/Info.yaml +1 -1
  16. package/Root/Frameworks/ChartKit/Info.yaml +1 -1
  17. package/Root/Frameworks/ConferenceKit/Info.yaml +1 -1
  18. package/Root/Frameworks/DBKit/Info.yaml +1 -1
  19. package/Root/Frameworks/DOM/Info.yaml +1 -1
  20. package/Root/Frameworks/Dispatch/Info.yaml +1 -1
  21. package/Root/Frameworks/FontKit/Info.yaml +1 -1
  22. package/Root/Frameworks/Foundation/Info.yaml +1 -1
  23. package/Root/Frameworks/Foundation/JSImage.js +32 -1
  24. package/Root/Frameworks/ImageKit/IKBitmap.js +2 -1
  25. package/Root/Frameworks/ImageKit/IKBitmapContext.js +11 -2
  26. package/Root/Frameworks/ImageKit/IKEncoder.js +11 -1
  27. package/Root/Frameworks/ImageKit/IKHTMLCanvasBitmapContext.js +1 -1
  28. package/Root/Frameworks/ImageKit/Info.yaml +1 -1
  29. package/Root/Frameworks/MediaKit/Info.yaml +1 -1
  30. package/Root/Frameworks/MediaKitUI/Info.yaml +1 -1
  31. package/Root/Frameworks/NotificationKit/Info.yaml +1 -1
  32. package/Root/Frameworks/PDFKit/Info.yaml +1 -1
  33. package/Root/Frameworks/QRKit/Info.yaml +1 -1
  34. package/Root/Frameworks/SearchKit/Info.yaml +1 -1
  35. package/Root/Frameworks/SecurityKit/Info.yaml +1 -1
  36. package/Root/Frameworks/ServerKit/Info.yaml +1 -1
  37. package/Root/Frameworks/ServerKitTesting/Info.yaml +1 -1
  38. package/Root/Frameworks/TestKit/Info.yaml +1 -1
  39. package/Root/Frameworks/UIKit/Info.yaml +1 -1
  40. package/Root/Frameworks/UIKitTesting/Info.yaml +1 -1
  41. 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.50.2",
4
+ "JSBundleVersion": "2024.53.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": "d0b2dd4c2ee08e4be22753820ed9f9a9e69c9d63"
12
+ "GitRevision": "de89f6567404b0884955f0be47fde7b672bb999b"
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.50.2",
6
+ "JSBundleVersion": "2024.53.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": "d0b2dd4c2ee08e4be22753820ed9f9a9e69c9d63"
14
+ "GitRevision": "de89f6567404b0884955f0be47fde7b672bb999b"
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.50.2",
4
+ "JSBundleVersion": "2024.53.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": "d0b2dd4c2ee08e4be22753820ed9f9a9e69c9d63"
11
+ "GitRevision": "de89f6567404b0884955f0be47fde7b672bb999b"
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.50.2",
6
+ "JSBundleVersion": "2024.53.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": "d0b2dd4c2ee08e4be22753820ed9f9a9e69c9d63"
13
+ "GitRevision": "de89f6567404b0884955f0be47fde7b672bb999b"
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.50.2",
4
+ "JSBundleVersion": "2024.53.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": "d0b2dd4c2ee08e4be22753820ed9f9a9e69c9d63"
12
+ "GitRevision": "de89f6567404b0884955f0be47fde7b672bb999b"
13
13
  }
@@ -481,13 +481,44 @@ JSClass("_JSURLImage", JSImage, {
481
481
 
482
482
  });
483
483
 
484
- JSImage.resourceCache = function(names, bundle){
484
+ JSImage.resourceCache = function(names, bundleIdentifier, renderMode){
485
485
  var cache = {};
486
+ var bundle;
487
+ if (renderMode === undefined || renderMode === null){
488
+ if (typeof(bundleIdentifier) === "number"){
489
+ renderMode = bundleIdentifier;
490
+ bundleIdentifier = null;
491
+ }else{
492
+ renderMode = JSImage.RenderMode.original;
493
+ }
494
+ }
486
495
  var definePropertyFromName = function(name){
487
496
  Object.defineProperty(cache, name, {
488
497
  configurable: true,
489
498
  get: function(){
499
+ // one-time lazy init of `bundle`
500
+ if (bundle === undefined){
501
+ if (bundleIdentifier instanceof JSBundle){
502
+ // Original API passed a JSBundle object, but that
503
+ // wasn't workable for frameworks that wanted to
504
+ // use resourceCache during framework initialization,
505
+ // because the framework's bundle wasn't ready yet.
506
+ //
507
+ // So we changed the API to take a bundle identifier
508
+ // instead, but are leaving this check here to preserve
509
+ // backwards functionality with any code that passed a
510
+ // bundle object.
511
+ bundle = bundleIdentifier;
512
+ }else if (typeof(bundleIdentifier) === "string"){
513
+ bundle = JSBundle.initWithIdentifier(bundleIdentifier);
514
+ }else{
515
+ bundle = null;
516
+ }
517
+ }
490
518
  var img = JSImage.initWithResourceName(name, bundle);
519
+ if (renderMode !== JSImage.RenderMode.original){
520
+ img = img.imageWithRenderMode(renderMode);
521
+ }
491
522
  Object.defineProperty(this, name, {value: img});
492
523
  return img;
493
524
  }
@@ -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.50.2",
6
+ "JSBundleVersion": "2024.53.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": "d0b2dd4c2ee08e4be22753820ed9f9a9e69c9d63"
14
+ "GitRevision": "de89f6567404b0884955f0be47fde7b672bb999b"
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.50.2",
4
+ "JSBundleVersion": "2024.53.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": "d0b2dd4c2ee08e4be22753820ed9f9a9e69c9d63"
12
+ "GitRevision": "de89f6567404b0884955f0be47fde7b672bb999b"
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.50.2",
6
+ "JSBundleVersion": "2024.53.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": "d0b2dd4c2ee08e4be22753820ed9f9a9e69c9d63"
14
+ "GitRevision": "de89f6567404b0884955f0be47fde7b672bb999b"
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.50.2",
4
+ "JSBundleVersion": "2024.53.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": "d0b2dd4c2ee08e4be22753820ed9f9a9e69c9d63"
11
+ "GitRevision": "de89f6567404b0884955f0be47fde7b672bb999b"
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.50.2",
6
+ "JSBundleVersion": "2024.53.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": "d0b2dd4c2ee08e4be22753820ed9f9a9e69c9d63"
13
+ "GitRevision": "de89f6567404b0884955f0be47fde7b672bb999b"
14
14
  },
15
15
  "Resources": [
16
16
  {
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.APIKit
3
- JSBundleVersion: 2024.50.2
3
+ JSBundleVersion: 2024.53.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSIncludeDirectories:
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.APIKitTesting
3
- JSBundleVersion: 2024.50.2
3
+ JSBundleVersion: 2024.53.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSLicenseNotice: |
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.AuthKit
3
- JSBundleVersion: 2024.50.2
3
+ JSBundleVersion: 2024.53.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSLicenseNotice: |
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.CSSOM
3
- JSBundleVersion: 2024.50.2
3
+ JSBundleVersion: 2024.53.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.ChartKit
3
- JSBundleVersion: 2024.50.2
3
+ JSBundleVersion: 2024.53.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2021 Breakside Inc.
6
6
  # JSBundleEnvironments:
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.ConferenceKit
3
- JSBundleVersion: 2024.50.2
3
+ JSBundleVersion: 2024.53.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.DBKit
3
- JSBundleVersion: 2024.50.2
3
+ JSBundleVersion: 2024.53.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.DOM
3
- JSBundleVersion: 2024.50.2
3
+ JSBundleVersion: 2024.53.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.Dispatch
3
- JSBundleVersion: 2024.50.2
3
+ JSBundleVersion: 2024.53.0
4
4
  JSCopyright: Copyright © 2020 Breakside Inc.
5
5
  JSBundleEnvironments:
6
6
  html: Dispatch+HTML.js
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.FontKit
3
- JSBundleVersion: 2024.50.2
3
+ JSBundleVersion: 2024.53.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.Foundation
3
- JSBundleVersion: 2024.50.2
3
+ JSBundleVersion: 2024.53.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -481,13 +481,44 @@ JSClass("_JSURLImage", JSImage, {
481
481
 
482
482
  });
483
483
 
484
- JSImage.resourceCache = function(names, bundle){
484
+ JSImage.resourceCache = function(names, bundleIdentifier, renderMode){
485
485
  var cache = {};
486
+ var bundle;
487
+ if (renderMode === undefined || renderMode === null){
488
+ if (typeof(bundleIdentifier) === "number"){
489
+ renderMode = bundleIdentifier;
490
+ bundleIdentifier = null;
491
+ }else{
492
+ renderMode = JSImage.RenderMode.original;
493
+ }
494
+ }
486
495
  var definePropertyFromName = function(name){
487
496
  Object.defineProperty(cache, name, {
488
497
  configurable: true,
489
498
  get: function(){
499
+ // one-time lazy init of `bundle`
500
+ if (bundle === undefined){
501
+ if (bundleIdentifier instanceof JSBundle){
502
+ // Original API passed a JSBundle object, but that
503
+ // wasn't workable for frameworks that wanted to
504
+ // use resourceCache during framework initialization,
505
+ // because the framework's bundle wasn't ready yet.
506
+ //
507
+ // So we changed the API to take a bundle identifier
508
+ // instead, but are leaving this check here to preserve
509
+ // backwards functionality with any code that passed a
510
+ // bundle object.
511
+ bundle = bundleIdentifier;
512
+ }else if (typeof(bundleIdentifier) === "string"){
513
+ bundle = JSBundle.initWithIdentifier(bundleIdentifier);
514
+ }else{
515
+ bundle = null;
516
+ }
517
+ }
490
518
  var img = JSImage.initWithResourceName(name, bundle);
519
+ if (renderMode !== JSImage.RenderMode.original){
520
+ img = img.imageWithRenderMode(renderMode);
521
+ }
491
522
  Object.defineProperty(this, name, {value: img});
492
523
  return img;
493
524
  }
@@ -44,11 +44,12 @@ JSClass('IKBitmap', JSObject, {
44
44
  return decoder.getBitmap();
45
45
  },
46
46
 
47
- encodedData: function(format){
47
+ encodedData: function(format, lossyCompressionQuality){
48
48
  var encoder = IKEncoder.initWithFormat(format, this);
49
49
  if (encoder === null){
50
50
  return null;
51
51
  }
52
+ encoder.lossyCompressionQuality = lossyCompressionQuality;
52
53
  var encoded = encoder.getData();
53
54
  return encoded;
54
55
  },
@@ -20,6 +20,7 @@
20
20
  JSClass("IKBitmapContext", JSContext, {
21
21
 
22
22
  size: null,
23
+ lossyCompressionQuality: 0.92,
23
24
 
24
25
  bitmap: function(completion, target){
25
26
  if (!completion){
@@ -41,11 +42,19 @@ JSClass("IKBitmapContext", JSContext, {
41
42
  completion.call(target, null);
42
43
  return;
43
44
  }
44
- var encoded = bitmap.encodedData(encoding);
45
+ var encoded = bitmap.encodedData(encoding, this.lossyCompressionQuality);
45
46
  var image = JSImage.initWithData(encoded, bitmap.size);
46
47
  return completion.call(target, image);
47
48
  }, this);
48
49
  return completion.promise;
49
50
  },
50
51
 
51
- });
52
+ });
53
+
54
+ IKBitmapContext.LossyCompressionQuality = {
55
+ best: 1,
56
+ better: 0.95,
57
+ standard: 0.92,
58
+ low: 0.5,
59
+ platformDefault: -1
60
+ };
@@ -32,6 +32,8 @@ JSClass("IKEncoder", JSObject, {
32
32
 
33
33
  bitmap: null,
34
34
 
35
+ lossyCompressionQuality: 0.92,
36
+
35
37
  getData: function(){
36
38
  }
37
39
 
@@ -43,4 +45,12 @@ IKEncoder.$extend = function(extensions, name){
43
45
  var subclass = JSClass.prototype.$extend.call(this, extensions, name);
44
46
  this.EncoderClassesByFormat[extensions.format] = subclass;
45
47
  return subclass;
46
- };
48
+ };
49
+
50
+ IKEncoder.LossyCompressionQuality = {
51
+ best: 1,
52
+ better: 0.95,
53
+ standard: 0.92,
54
+ low: 0.5,
55
+ platformDefault: -1
56
+ };
@@ -79,7 +79,7 @@ JSClass("IKHTMLCanvasBitmapContext", IKBitmapContext, {
79
79
  completion.call(target, image);
80
80
  });
81
81
  reader.readAsArrayBuffer(blob);
82
- }, type);
82
+ }, type, this.lossyCompressionQuality);
83
83
  });
84
84
  return completion.promise;
85
85
  },
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.ImageKit
3
- JSBundleVersion: 2024.50.2
3
+ JSBundleVersion: 2024.53.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.MediaKit
3
- JSBundleVersion: 2024.50.2
3
+ JSBundleVersion: 2024.53.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.MediaKitUI
3
- JSBundleVersion: 2024.50.2
3
+ JSBundleVersion: 2024.53.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.NotificationKit
3
- JSBundleVersion: 2024.50.2
3
+ JSBundleVersion: 2024.53.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2021 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.PDFKit
3
- JSBundleVersion: 2024.50.2
3
+ JSBundleVersion: 2024.53.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSLicenseNotice: |
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.QRKit
3
- JSBundleVersion: 2024.50.2
3
+ JSBundleVersion: 2024.53.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSLicenseNotice: |
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.SearchKit
3
- JSBundleVersion: 2024.50.2
3
+ JSBundleVersion: 2024.53.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSLicenseNotice: |
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.SecurityKit
3
- JSBundleVersion: 2024.50.2
3
+ JSBundleVersion: 2024.53.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.ServerKit
3
- JSBundleVersion: 2024.50.2
3
+ JSBundleVersion: 2024.53.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.ServerKitTesting
3
- JSBundleVersion: 2024.50.2
3
+ JSBundleVersion: 2024.53.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSLicenseNotice: |
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.TestKit
3
- JSBundleVersion: 2024.50.2
3
+ JSBundleVersion: 2024.53.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSLicenseNotice: |
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.UIKit
3
- JSBundleVersion: 2024.50.2
3
+ JSBundleVersion: 2024.53.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments:
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.UIKitTesting
3
- JSBundleVersion: 2024.50.2
3
+ JSBundleVersion: 2024.53.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSLicenseNotice: |
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "node": ">=10.10.0"
10
10
  },
11
11
  "name": "@breakside/jskit",
12
- "version": "2024.50.2",
12
+ "version": "2024.53.0",
13
13
  "license": "SEE LICENSE IN LICENSE.txt",
14
14
  "files": [
15
15
  "*"