@cascadetui/core 0.1.6 → 0.1.7

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.js CHANGED
@@ -153,7 +153,7 @@ import {
153
153
  white,
154
154
  wrapWithDelegates,
155
155
  yellow
156
- } from "./index-rj3f00a6.js";
156
+ } from "./index-r7vqrd61.js";
157
157
  // src/text-buffer-view.ts
158
158
  class TextBufferView {
159
159
  lib;
@@ -2730,6 +2730,24 @@ class BoxRenderable extends Renderable {
2730
2730
  this.requestRender();
2731
2731
  }
2732
2732
  }
2733
+ clear() {
2734
+ const trace = this.ctx.trace;
2735
+ const traceEnabled = trace?.enabled === true;
2736
+ const traceStart = traceEnabled ? trace.now() : 0;
2737
+ const children = this.getChildren();
2738
+ this.beginRenderBatch();
2739
+ try {
2740
+ for (const child of children) {
2741
+ this.remove(child.id);
2742
+ child.destroyRecursively();
2743
+ }
2744
+ } finally {
2745
+ this.endRenderBatch();
2746
+ }
2747
+ if (traceEnabled) {
2748
+ trace.write(`trace.container.clear id=${this.id} count=${children.length} ms=${(trace.now() - traceStart).toFixed(3)}`);
2749
+ }
2750
+ }
2733
2751
  }
2734
2752
  // src/renderables/TextBufferRenderable.ts
2735
2753
  class TextBufferRenderable extends Renderable {
@@ -12407,5 +12425,5 @@ export {
12407
12425
  ASCIIFont
12408
12426
  };
12409
12427
 
12410
- //# debugId=0605AEDD3A1567CB64756E2164756E21
12428
+ //# debugId=FC3249AEF487030064756E2164756E21
12411
12429
  //# sourceMappingURL=index.js.map