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