@opentui/core 0.5.0 → 0.5.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/index.bun.js CHANGED
@@ -44,7 +44,7 @@ import {
44
44
  mergeKeyAliases,
45
45
  mergeKeyBindings,
46
46
  wrapWithDelegates
47
- } from "./chunk-bun-v3e63tzw.js";
47
+ } from "./chunk-bun-8fkgaxc6.js";
48
48
  import {
49
49
  ASCIIFontSelectionHelper,
50
50
  ATTRIBUTE_BASE_BITS,
@@ -195,7 +195,7 @@ import {
195
195
  visualizeRenderableTree,
196
196
  white,
197
197
  yellow
198
- } from "./chunk-bun-ctxxvhwz.js";
198
+ } from "./chunk-bun-83ry0rzt.js";
199
199
  // src/post/effects.ts
200
200
  function toU8(value) {
201
201
  return Math.round(Math.max(0, Math.min(1, Number.isFinite(value) ? value : 0)) * 255);
@@ -5680,6 +5680,7 @@ var STATUS_CODES = [
5680
5680
  "internal-error",
5681
5681
  "unsupported-feature"
5682
5682
  ];
5683
+ var INVALID_ARGUMENT_STATUS = 7;
5683
5684
 
5684
5685
  class ImageError extends Error {
5685
5686
  code;
@@ -6041,6 +6042,11 @@ class NativeImage {
6041
6042
  }
6042
6043
  takeRaw() {
6043
6044
  const handle = this.guard();
6045
+ const materializeStatus = this.lib.imageMaterialize(handle);
6046
+ if (materializeStatus === INVALID_ARGUMENT_STATUS) {
6047
+ throw new Error("Cannot transfer image pixels while native buffers retain the image");
6048
+ }
6049
+ checkStatus(materializeStatus);
6044
6050
  const pointer = this.lib.imageGetPixelsPtr(handle);
6045
6051
  if (!pointer)
6046
6052
  throw new Error("Cannot transfer image pixels while native buffers retain the image");
@@ -15124,5 +15130,5 @@ export {
15124
15130
  ACHROMATOPSIA_MATRIX
15125
15131
  };
15126
15132
 
15127
- //# debugId=B425557204321C4364756E2164756E21
15133
+ //# debugId=C7BF2F4EAE2A734364756E2164756E21
15128
15134
  //# sourceMappingURL=index.bun.js.map