blecsd 0.1.1 → 0.3.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.
- package/LICENSE +4 -2
- package/README.md +209 -66
- package/dist/3d/index.d.ts +2 -2
- package/dist/3d/index.js +1 -1
- package/dist/audio/index.d.ts +2 -2
- package/dist/{border-D_Jb4ZJV.d.ts → border-Jb7TrMob.d.ts} +20 -10
- package/dist/chunk-2IEMMRUO.js +1 -0
- package/dist/chunk-3AV52GY5.js +1 -0
- package/dist/chunk-3LHLSY3Y.js +1 -0
- package/dist/chunk-3O4TQHGK.js +4 -0
- package/dist/chunk-3UJWZ5ZN.js +1 -0
- package/dist/chunk-5N3O25O7.js +1 -0
- package/dist/chunk-6M2J5QUA.js +1 -0
- package/dist/chunk-7IQEUVGF.js +1 -0
- package/dist/chunk-A6M6TFBL.js +1 -0
- package/dist/chunk-CUEUJAHK.js +3 -0
- package/dist/chunk-D42Q2KKR.js +1 -0
- package/dist/chunk-DYEXOFUU.js +2 -0
- package/dist/chunk-DYU72XLL.js +1 -0
- package/dist/chunk-E4CJRSND.js +1 -0
- package/dist/chunk-EAY7B5GL.js +1 -0
- package/dist/chunk-FCMTWFSE.js +1 -0
- package/dist/chunk-FL56THSI.js +25 -0
- package/dist/{chunk-2UBBZFE4.js → chunk-G437VE43.js} +1 -1
- package/dist/chunk-GGXNWT36.js +8 -0
- package/dist/chunk-HLFORKXS.js +1 -0
- package/dist/chunk-J7MBKEBY.js +1 -0
- package/dist/{chunk-TYMY2TBR.js → chunk-JHCKPCUH.js} +3 -3
- package/dist/chunk-K3SX2LY5.js +1 -0
- package/dist/chunk-LDAFEXN5.js +1 -0
- package/dist/chunk-MKMFUXLB.js +33 -0
- package/dist/chunk-MQWPHPUM.js +1 -0
- package/dist/chunk-MTI376CU.js +5 -0
- package/dist/chunk-MTV2RJZD.js +1 -0
- package/dist/chunk-NPDPBAW6.js +4 -0
- package/dist/chunk-OB66FB4F.js +1 -0
- package/dist/chunk-OR3BZY7C.js +1 -0
- package/dist/{chunk-VNZ6CWJA.js → chunk-R7AICVRN.js} +2 -2
- package/dist/{chunk-3B7MIVW6.js → chunk-RZ7FGVI6.js} +1 -1
- package/dist/chunk-UMGTXSQB.js +11 -0
- package/dist/chunk-X3Q3T2SS.js +4 -0
- package/dist/{chunk-JKVHO4LH.js → chunk-XZJRWFOS.js} +1 -1
- package/dist/chunk-ZAHG7Y3X.js +1 -0
- package/dist/cli/init.d.ts +1 -1
- package/dist/componentStorage-CJTh-TPO.d.ts +246 -0
- package/dist/components/index.d.ts +1942 -514
- package/dist/components/index.js +1 -1
- package/dist/core/index.d.ts +857 -259
- package/dist/core/index.js +1 -1
- package/dist/debug/index.d.ts +491 -98
- package/dist/debug/index.js +1 -1
- package/dist/dirtyTracking-C4v8MmM9.d.ts +235 -0
- package/dist/errors/index.d.ts +12 -12
- package/dist/errors/index.js +1 -1
- package/dist/{events-BbbxkgvX.d.ts → events-9ForpTfM.d.ts} +75 -2
- package/dist/game/index.d.ts +7 -7
- package/dist/game/index.js +1 -1
- package/dist/{gameLoop-BIPW7-OY.d.ts → gameLoop-C-Ez_i54.d.ts} +2 -2
- package/dist/{index-zSGJ2eUk.d.ts → index-DBS5Uefn.d.ts} +2 -2
- package/dist/index.d.ts +283 -20
- package/dist/index.js +3 -1
- package/dist/input/index.d.ts +1 -1
- package/dist/input/index.js +1 -1
- package/dist/{inputActions-CefRUBuT.d.ts → inputActions-CRsUtTHM.d.ts} +10 -721
- package/dist/packedStore-BgvnEdE7.d.ts +191 -0
- package/dist/{renderable-jTMOA-GK.d.ts → renderable-CwqGwrEV.d.ts} +9 -9
- package/dist/{scheduler-DcfoFuum.d.ts → scheduler-CMcYew9Z.d.ts} +65 -3
- package/dist/systems/index.d.ts +356 -55
- package/dist/systems/index.js +1 -1
- package/dist/terminal/index.d.ts +2233 -2299
- package/dist/terminal/index.js +1 -1
- package/dist/{tilemap-D1HJvKy3.d.ts → tilemap-BirMJdbu.d.ts} +92 -3
- package/dist/{types-BcsvoKzf.d.ts → types-CPB4CpbH.d.ts} +2 -2
- package/dist/utils/index.d.ts +27 -180
- package/dist/utils/index.js +1 -1
- package/dist/{virtualScrollback-DvZTRU8a.d.ts → virtualScrollback-D9uLFe8l.d.ts} +4 -4
- package/dist/{virtualViewport-Dx2iJliO.d.ts → virtualViewport-Bpv6jlKt.d.ts} +283 -761
- package/dist/widgets/bigText.d.ts +1 -1
- package/dist/widgets/bigText.js +1 -1
- package/dist/widgets/index.d.ts +10519 -5463
- package/dist/widgets/index.js +1 -1
- package/package.json +102 -6
- package/dist/chunk-35I22JJO.js +0 -1
- package/dist/chunk-3EGGGI5J.js +0 -3
- package/dist/chunk-4X4N4HNQ.js +0 -2
- package/dist/chunk-AQ7LW75B.js +0 -1
- package/dist/chunk-AXZQAH4X.js +0 -1
- package/dist/chunk-BCADUCOZ.js +0 -1
- package/dist/chunk-EJ5WVDDZ.js +0 -6
- package/dist/chunk-FT7BMYSN.js +0 -1
- package/dist/chunk-FYEBZAWN.js +0 -1
- package/dist/chunk-GYHI26UE.js +0 -1
- package/dist/chunk-H2YAOJDW.js +0 -1
- package/dist/chunk-K2B2OXQ5.js +0 -5
- package/dist/chunk-K37L3G4Z.js +0 -4
- package/dist/chunk-KD55INV7.js +0 -1
- package/dist/chunk-KFAK4A3G.js +0 -1
- package/dist/chunk-LCN2ZITE.js +0 -1
- package/dist/chunk-OUXUPF3V.js +0 -33
- package/dist/chunk-P6CJO3BC.js +0 -1
- package/dist/chunk-PI5UOHOH.js +0 -1
- package/dist/chunk-PSXXMBVJ.js +0 -1
- package/dist/chunk-TRK4422V.js +0 -12
- package/dist/chunk-W5OU7Z6J.js +0 -1
- package/dist/chunk-WNG4A3K7.js +0 -4
- package/dist/chunk-XRJNAHNG.js +0 -19
- package/dist/chunk-XZA63ZPO.js +0 -1
- package/dist/chunk-YAMOSPWB.js +0 -4
- package/dist/chunk-YD6ULIUR.js +0 -1
- package/dist/{keyParser-Bwm8-l7v.d.ts → keyParser-BnHbg2iD.d.ts} +1 -1
package/dist/terminal/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{Qa as BAR_CURSOR_CHAR,e as BEL,Oa as BLOCK_CURSOR_CHAR,a as CSI,xa as CleanupManager,w as ClipboardSelection,V as CursorPositionSchema,t as CursorShape,c as DCS,n as DEC_SPECIAL_GRAPHICS,x as DEFAULT_CLIPBOARD_MAX_SIZE,gd as DEFAULT_INPUT_SANITIZE_OPTIONS,ka as DEFAULT_QUERY_TIMEOUT,sd as DEFAULT_SANITIZE_OPTIONS,f as ESC,xc as FocusEventSchema,Mb as GpmButton,Nb as GpmClientConfigSchema,Lb as GpmEventType,oa as GraphicsProtocol,$a as HIDE_TERMINAL_CURSOR,h as HYPERLINK_ALLOWED_PROTOCOLS,Ac as InputHandlerConfigSchema,fd as InputSanitizeOptionsSchema,sc as KeyEventSchema,Cc as KittyFlags,na as KittyKeyboardLevel,D as LocatorButton,C as LocatorEvent,db as LogLevel,ma as MAX_QUERY_TIMEOUT,la as MIN_QUERY_TIMEOUT,k as MediaCopyMode,wc as MouseEventSchema,A as MouseMode,Xb as MouseTrackingMode,pa as NegotiationTiming,qa as NegotiatorConfigSchema,b as OSC,J as PasteConfigSchema,I as PasteEventSchema,Xc as ProgramConfigSchema,U as ResponseType,r as SGR,ab as SHOW_TERMINAL_CURSOR,d as ST,rd as SanitizeOptionsSchema,Pa as UNDERLINE_CURSOR_CHAR,o as UNICODE_TO_ASCII,Nc as activateProtocol,Va as addCursor,dc as areKeysEnabled,q as boxDrawing,v as bracketedPaste,Tb as buildGpmConnectPacket,wa as capabilityQuery,yd as categorizeEscapeSequences,p as charset,Ca as chunkText,kb as clearLog,y as clipboard,eb as configureDebugLogger,ud as containsEscapeSequences,Ea as createArtificialCursor,ra as createCapabilityNegotiator,Ba as createClipboardManager,Sa as createCursorCell,Ta as createCursorManager,hb as createDebugLogger,Fb as createFocusTracker,Wb as createGpmClient,_b as createInputControl,Bc as createInputHandler,Kc as createKittyConfig,Lc as createKittyProtocolState,Q as createPasteState,Yc as createProgram,$c as createResizeHandler,wd as createSafeStringBuilder,zd as createSuspendManager,Cd as createSynchronizedOutput,Id as createThrottledResize,Ed as createTput,s as cursor,Oc as deactivateProtocol,Kd as debounceResize,lb as debugLoggers,ac as destroyInputControl,Ub as detectVirtualConsole,T as disableBracketedPaste,Hb as disableFocusTracking,kc as disableInput,cc as disableKeys,fc as disableMouse,bd as disableResizeHandling,rc as disableWorldInput,nc as disableWorldKeys,pc as disableWorldMouse,jb as dumpRaw,ib as dumpTerminalState,S as enableBracketedPaste,Gb as enableFocusTracking,jc as enableInput,bc as enableKeys,ec as enableMouse,ad as enableResizeHandling,qc as enableWorldInput,mc as enableWorldKeys,oc as enableWorldMouse,Sc as exec,Tc as execSync,xd as extractEscapeSequences,P as extractPasteContent,O as findPasteEnd,Ec as generatePopSequence,Dc as generatePushSequence,Fc as generateQuerySequence,vb as getColorDepth,_a as getCursorAt,Uc as getDefaultEditor,sa as getDefaultNegotiator,Fd as getDefaultTput,Hd as getDefaultXtermData,Ib as getFocusTracker,$b as getInputControl,Yb as getInputControlEventBus,gb as getLogFile,hc as getMouseMode,Ua as getPrimaryCursor,Zc as getResizeEventBus,cd as getResizeHandler,ua as getTerminalCapabilities,Db as getTerminalFocusEventBus,Cb as getTerminalInfo,Bb as getTerminalVersion,Ya as getVisibleCursors,Pb as gpmButtonToMouseButton,Sb as gpmEventToMouseEvent,Qb as gpmTypeToMouseAction,va as hasCapability,pd as hasControlChars,qd as hasNullBytes,bb as hideTerminalCursor,j as hyperlink,sb as isAlacritty,Ab as isBracketedPasteSupported,ga as isCharCellSize,wb as isColorSupported,Z as isCursorPosition,Na as isCursorVisible,fb as isDebugLoggingEnabled,_ as isDeviceStatus,Vb as isGpmAvailable,i as isHyperlinkAllowed,rb as isITerm2,aa as isIconLabel,lc as isInputEnabled,tb as isKitty,Ic as isKittyKeyEvent,Gc as isKittyResponse,Qc as isKittySupported,ha as isLocatorPosition,zc as isMouseBuffer,gc as isMouseEnabled,tc as isMouseSequence,zb as isMouseSupported,M as isPasteStart,X as isPrimaryDA,vd as isSafeForTerminal,nb as isScreen,fa as isScreenSize,Y as isSecondaryDA,Dd as isSyncOutputSupported,Jb as isTerminalFocused,ea as isTextAreaSize,mb as isTmux,xb as isTrueColorSupported,yb as isUnicodeSupported,ia as isUnknown,ob as isVSCode,qb as isVTE,od as isValidUtf8String,ca as isWindowPosition,da as isWindowSizePixels,ba as isWindowState,$ as isWindowTitle,ub as isWindowsTerminal,pb as isXterm,Pc as kittyKeyToName,E as locator,l as mediaCopy,N as mightBePasteStart,B as mouse,Ga as moveCursorBy,Fa as moveCursorTo,Aa as onExit,Ob as parseGpmEventBuffer,Rb as parseGpmModifiers,vc as parseKeyBuffer,uc as parseKeySequence,Jc as parseKittyKeyEvent,Hc as parseKittyQueryResponse,yc as parseMouseSequence,W as parseResponse,R as processPasteBuffer,Wc as processUtils,ja as query,Vc as readEditor,m as rectangle,ya as registerForCleanup,Wa as removeCursor,Ra as renderCursor,md as replaceInvalidUtf16,Ma as resetCursorBlink,ta as resetDefaultNegotiator,Gd as resetDefaultTput,Zb as resetInputControlEventBus,_c as resetResizeEventBus,Eb as resetTerminalFocusEventBus,nd as restrictToAscii,td as sanitizeForTerminal,K as sanitizePastedText,hd as sanitizeTextInput,id as sanitizeTextInputDetailed,G as screen,Ja as setCursorBlink,Ka as setCursorColors,Ia as setCursorShape,Ha as setCursorVisible,ic as setMouseMode,ed as setupSigwinchHandler,cb as showTerminalCursor,Rc as spawn,Da as streamPaste,ld as stripC1Controls,kd as stripControlChars,jd as stripNullBytes,F as style,Bd as suspend,Ad as suspendSequences,u as sync,Jd as throttleResize,H as title,z as tmux,Kb as triggerFocusEvent,dd as triggerResize,L as truncatePaste,za as unregisterFromCleanup,Za as updateAllCursorBlinks,La as updateCursorBlink,Xa as updateCursorInManager,Mc as updateProtocolState,g as windowOps}from'../chunk-UMGTXSQB.js';import'../chunk-J7MBKEBY.js';export{a as createDoubleBuffer}from'../chunk-4LWWONFK.js';import'../chunk-FGHEFXLK.js';export{c as AttributeSchema,b as ColorType,d as DEFAULT_ATTRIBUTE,a as TextStyle,h as applySgrCodes,j as attrCode,l as attrToSgrCodes,o as attributesEqual,f as cloneAttribute,k as codeAttr,e as createAttribute,g as extractSgrCodes,n as hasStyle,q as packRgb,i as parseSgrString,m as sgrReset,r as stripAnsi,p as unpackRgb,s as visibleLength}from'../chunk-AEJIX2MW.js';export{a as Attr,c as CELL_DEFAULT_BG,b as CELL_DEFAULT_FG,d as DEFAULT_CHAR,l as cellIndex,g as cellsEqual,q as clearBuffer,f as cloneCell,u as copyRegion,e as createCell,k as createScreenBuffer,v as diffBuffers,r as fillRect,n as getCell,h as hasAttr,m as isInBounds,s as resizeBuffer,o as setCell,p as setChar,i as withAttr,j as withoutAttr,t as writeString}from'../chunk-C5PCEQ6G.js';import'../chunk-XQIGERNI.js';import'../chunk-MTV2RJZD.js';import'../chunk-3AV52GY5.js';import'../chunk-6M2J5QUA.js';import'../chunk-K3SX2LY5.js';import'../chunk-OR3BZY7C.js';import'../chunk-DYU72XLL.js';import'../chunk-ZAHG7Y3X.js';import'../chunk-Z4EZERNE.js';import'../chunk-SHUC6JWA.js';import'../chunk-G7GIWWLE.js';import'../chunk-PXXGH3BV.js';import'../chunk-5PELJRUQ.js';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { E as Entity, W as World } from './types-
|
|
1
|
+
import { E as Entity, W as World } from './types-CPB4CpbH.js';
|
|
2
|
+
import { P as PackedStore } from './packedStore-BgvnEdE7.js';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Collision component for entity collision detection.
|
|
@@ -524,6 +525,26 @@ interface EmitterAppearance {
|
|
|
524
525
|
/** Whether particles should fade out (default: true) */
|
|
525
526
|
fadeOut?: boolean;
|
|
526
527
|
}
|
|
528
|
+
/**
|
|
529
|
+
* Data stored per tracked particle in the packed store.
|
|
530
|
+
* Associates a particle entity with the emitter that spawned it.
|
|
531
|
+
*
|
|
532
|
+
* @example
|
|
533
|
+
* ```typescript
|
|
534
|
+
* import { getParticleTrackingStore, getStoreData } from 'blecsd';
|
|
535
|
+
*
|
|
536
|
+
* const store = getParticleTrackingStore();
|
|
537
|
+
* const data = getStoreData(store);
|
|
538
|
+
* for (let i = 0; i < store.size; i++) {
|
|
539
|
+
* const entry = data[i];
|
|
540
|
+
* if (entry) console.log(entry.particleId, entry.emitterId);
|
|
541
|
+
* }
|
|
542
|
+
* ```
|
|
543
|
+
*/
|
|
544
|
+
interface TrackedParticle {
|
|
545
|
+
readonly particleId: number;
|
|
546
|
+
readonly emitterId: number;
|
|
547
|
+
}
|
|
527
548
|
/**
|
|
528
549
|
* Sets particle data on an entity.
|
|
529
550
|
*
|
|
@@ -639,16 +660,58 @@ declare function setEmitterAppearance(eid: Entity, appearance: EmitterAppearance
|
|
|
639
660
|
declare function getEmitterAppearance(eid: Entity): EmitterAppearance | undefined;
|
|
640
661
|
/**
|
|
641
662
|
* Gets the set of particle entity IDs spawned by an emitter.
|
|
663
|
+
*
|
|
664
|
+
* Iterates the packed store's dense data array using a linear for-loop
|
|
665
|
+
* and collects particles matching the given emitter.
|
|
666
|
+
*
|
|
667
|
+
* @param eid - The emitter entity ID
|
|
668
|
+
* @returns ReadonlySet of particle entity IDs belonging to this emitter
|
|
669
|
+
*
|
|
670
|
+
* @example
|
|
671
|
+
* ```typescript
|
|
672
|
+
* import { getEmitterParticles } from 'blecsd';
|
|
673
|
+
*
|
|
674
|
+
* const particles = getEmitterParticles(emitterEntity);
|
|
675
|
+
* for (const pid of particles) {
|
|
676
|
+
* console.log('tracked particle:', pid);
|
|
677
|
+
* }
|
|
678
|
+
* ```
|
|
642
679
|
*/
|
|
643
680
|
declare function getEmitterParticles(eid: Entity): ReadonlySet<number>;
|
|
644
681
|
/**
|
|
645
682
|
* Tracks a particle as belonging to an emitter.
|
|
683
|
+
*
|
|
684
|
+
* Adds the particle to the packed store and records the handle
|
|
685
|
+
* in the index for O(1) removal later.
|
|
686
|
+
*
|
|
687
|
+
* @param emitterId - The emitter entity ID
|
|
688
|
+
* @param particleId - The particle entity ID
|
|
689
|
+
*
|
|
690
|
+
* @example
|
|
691
|
+
* ```typescript
|
|
692
|
+
* import { trackParticle } from 'blecsd';
|
|
693
|
+
*
|
|
694
|
+
* trackParticle(emitterEntity, particleEntity);
|
|
695
|
+
* ```
|
|
646
696
|
*/
|
|
647
697
|
declare function trackParticle(emitterId: Entity, particleId: Entity): void;
|
|
648
698
|
/**
|
|
649
699
|
* Untracks a particle from its emitter.
|
|
700
|
+
*
|
|
701
|
+
* Removes the particle from the packed store using its handle.
|
|
702
|
+
* The generation is bumped so any outstanding handles become invalid.
|
|
703
|
+
*
|
|
704
|
+
* @param _emitterId - The emitter entity ID (unused, kept for API compat)
|
|
705
|
+
* @param particleId - The particle entity ID
|
|
706
|
+
*
|
|
707
|
+
* @example
|
|
708
|
+
* ```typescript
|
|
709
|
+
* import { untrackParticle } from 'blecsd';
|
|
710
|
+
*
|
|
711
|
+
* untrackParticle(emitterEntity, particleEntity);
|
|
712
|
+
* ```
|
|
650
713
|
*/
|
|
651
|
-
declare function untrackParticle(
|
|
714
|
+
declare function untrackParticle(_emitterId: Entity, particleId: Entity): void;
|
|
652
715
|
/**
|
|
653
716
|
* Activates an emitter.
|
|
654
717
|
*/
|
|
@@ -673,8 +736,34 @@ declare function setEmitterSpeed(world: World, eid: Entity, speed: number): void
|
|
|
673
736
|
* Sets the emitter gravity.
|
|
674
737
|
*/
|
|
675
738
|
declare function setEmitterGravity(world: World, eid: Entity, gravity: number): void;
|
|
739
|
+
/**
|
|
740
|
+
* Returns the packed store used for particle tracking.
|
|
741
|
+
*
|
|
742
|
+
* The store's dense data array can be iterated with a linear for-loop
|
|
743
|
+
* via `getStoreData()` for cache-friendly per-frame processing.
|
|
744
|
+
*
|
|
745
|
+
* @returns The packed store of tracked particles
|
|
746
|
+
*
|
|
747
|
+
* @example
|
|
748
|
+
* ```typescript
|
|
749
|
+
* import { getParticleTrackingStore, getStoreData } from 'blecsd';
|
|
750
|
+
*
|
|
751
|
+
* const store = getParticleTrackingStore();
|
|
752
|
+
* const data = getStoreData(store);
|
|
753
|
+
* for (let i = 0; i < store.size; i++) {
|
|
754
|
+
* const entry = data[i];
|
|
755
|
+
* if (entry) {
|
|
756
|
+
* // Process entry.particleId, entry.emitterId
|
|
757
|
+
* }
|
|
758
|
+
* }
|
|
759
|
+
* ```
|
|
760
|
+
*/
|
|
761
|
+
declare function getParticleTrackingStore(): Readonly<PackedStore<TrackedParticle>>;
|
|
676
762
|
/**
|
|
677
763
|
* Resets all particle/emitter side stores. Useful for testing.
|
|
764
|
+
*
|
|
765
|
+
* Creates a fresh PackedStore rather than clearing, to ensure
|
|
766
|
+
* generation counters start at zero for clean test isolation.
|
|
678
767
|
*/
|
|
679
768
|
declare function resetParticleStore(): void;
|
|
680
769
|
|
|
@@ -1208,4 +1297,4 @@ interface RenderedTileCell {
|
|
|
1208
1297
|
*/
|
|
1209
1298
|
declare function renderTileMapArea(dataId: number, tilesetId: number, viewX: number, viewY: number, viewWidth: number, viewHeight: number): RenderedTileCell[][];
|
|
1210
1299
|
|
|
1211
|
-
export {
|
|
1300
|
+
export { hasTileMap as $, type AABB as A, fillTiles as B, Collider as C, DEFAULT_LAYER as D, EMPTY_TILE as E, getCollider as F, getColliderAABB as G, getEmitter as H, getEmitterAppearance as I, getEmitterParticles as J, getLayerCount as K, getParticle as L, getParticleColor as M, getParticleProgress as N, getParticleTrackingStore as O, Particle as P, getTile as Q, type RenderedTileCell as R, getTileData as S, type TileDefinition as T, getTileMap as U, getTileMapDataId as V, getTileset as W, getTilesetByName as X, hasCollider as Y, hasEmitter as Z, hasParticle as _, type ColliderData as a, interpolateColor as a0, isEmitterActive as a1, isLayerVisible as a2, isParticleDead as a3, isTrigger as a4, pauseEmitter as a5, registerTileset as a6, removeCollider as a7, removeEmitter as a8, removeParticle as a9, unregisterTileset as aA, untrackParticle as aB, removeTileData as aa, removeTileMap as ab, renderTileMapArea as ac, resetParticleStore as ad, resetTileMapStore as ae, resetTilesetStore as af, setCollider as ag, setCollisionLayer as ah, setCollisionMask as ai, setEmitter as aj, setEmitterAppearance as ak, setEmitterGravity as al, setEmitterRate as am, setEmitterSpeed as an, setLayerVisible as ao, setParticle as ap, setTile as aq, setTileMap as ar, setTrigger as as, testAABBOverlap as at, testCircleAABBOverlap as au, testCircleOverlap as av, testCollision as aw, tileMapStore as ax, tilesetStore as ay, trackParticle as az, type ColliderOptions as b, ColliderType as c, type CollisionPair as d, DEFAULT_MASK as e, type EmitterAppearance as f, type EmitterData as g, type EmitterOptions as h, type ParticleData as i, ParticleEmitter as j, type ParticleOptions as k, TileMap as l, type TileMapComponentData as m, type TileMapData as n, type TileMapLayer as o, type TileMapOptions as p, type TilesetData as q, type TilesetOptions as r, type TrackedParticle as s, activateEmitter as t, addLayer as u, canLayersCollide as v, collisionPairKey as w, createCollisionPair as x, createTileData as y, fillTileRect as z };
|
|
@@ -55,8 +55,8 @@ declare enum LoopPhase {
|
|
|
55
55
|
UPDATE = 2,
|
|
56
56
|
/** Post-update logic */
|
|
57
57
|
LATE_UPDATE = 3,
|
|
58
|
-
/**
|
|
59
|
-
|
|
58
|
+
/** Animation, physics, tweens, and transitions */
|
|
59
|
+
ANIMATION = 4,
|
|
60
60
|
/** UI layout calculation */
|
|
61
61
|
LAYOUT = 5,
|
|
62
62
|
/** Render to screen buffer */
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h as BorderCharset } from '../border-Jb7TrMob.js';
|
|
2
2
|
export { c as colorToHex, h as hexToColor, p as packColor, a as parseColor, u as unpackColor } from '../color-B78w3zH-.js';
|
|
3
|
-
|
|
3
|
+
export { C as ComponentMemoryReport, a as ComponentStore, b as ComponentStoreConfig, S as SparseStorageConfig, c as SparseStore, T as TypedArrayPool, d as createComponentStore, e as createSparseStore, f as createTypedArrayPool, g as estimateMemoryUsage, h as getComponentMemoryReport, i as isWithinMemoryBounds } from '../componentStorage-CJTh-TPO.js';
|
|
4
4
|
import { z } from 'zod';
|
|
5
|
-
import { S as StyleData } from '../renderable-
|
|
5
|
+
import { S as StyleData } from '../renderable-CwqGwrEV.js';
|
|
6
6
|
export { C as CHUNKED_THRESHOLD, L as LineIndexSchema, a as LineRangeParamsSchema, b as LineStoreStats, T as TrimParamsSchema, c as VirtualizedLineInfo, d as VirtualizedLineRange, V as VirtualizedLineStore, e as VisibleLinesParamsSchema, f as appendLinesToStore, g as appendToStore, h as createEmptyLineStore, i as createLineStore, j as createLineStoreFromLines, k as exportContent, l as exportLineRange, m as getByteSize, n as getLineAtIndex, o as getLineForOffset, p as getLineInfo, q as getLineStoreLineCount, r as getLineStoreRange, s as getLineStoreVisibleLines, t as getOffsetForLine, u as getStoreStats, v as isStoreEmpty, w as trimLineStore } from '../virtualizedLineStore-DwPEvPkk.js';
|
|
7
|
-
export { C as COMPRESSION_RATIO, a as Chunk, D as DEFAULT_CHUNK_SIZE, b as DEFAULT_MAX_CACHED, c as DEFAULT_MAX_MEMORY, L as LineRange, S as ScrollbackBuffer, d as ScrollbackConfig, e as ScrollbackLine, f as ScrollbackStats, g as appendLine, h as appendLines, i as clearScrollback, j as compressOldChunks, k as createScrollbackBuffer, l as decompressAll, m as exportToText, n as getLineRange, o as getMemoryUsage, p as getScrollbackLine, q as getScrollbackStats, r as getVisibleLines, s as jumpToLine, t as loadFromText, v as scrollBy, w as scrollToBottom, x as scrollToTop, u as trimToLineCount } from '../virtualScrollback-
|
|
7
|
+
export { C as COMPRESSION_RATIO, a as Chunk, D as DEFAULT_CHUNK_SIZE, b as DEFAULT_MAX_CACHED, c as DEFAULT_MAX_MEMORY, L as LineRange, S as ScrollbackBuffer, d as ScrollbackConfig, e as ScrollbackLine, f as ScrollbackStats, g as appendLine, h as appendLines, i as clearScrollback, j as compressOldChunks, k as createScrollbackBuffer, l as decompressAll, m as exportToText, n as getLineRange, o as getMemoryUsage, p as getScrollbackLine, q as getScrollbackStats, r as getVisibleLines, s as jumpToLine, t as loadFromText, v as scrollBy, w as scrollToBottom, x as scrollToTop, u as trimToLineCount } from '../virtualScrollback-D9uLFe8l.js';
|
|
8
|
+
import '../types-CPB4CpbH.js';
|
|
8
9
|
import 'bitecs';
|
|
9
10
|
|
|
10
11
|
/**
|
|
@@ -438,161 +439,6 @@ declare function replaceChange(startLine: number, startColumn: number, endLine:
|
|
|
438
439
|
*/
|
|
439
440
|
declare function destroyCoalescer(state: MutableCoalescingState): FlushResult | undefined;
|
|
440
441
|
|
|
441
|
-
/**
|
|
442
|
-
* Memory-efficient component storage utilities.
|
|
443
|
-
*
|
|
444
|
-
* Provides helpers for measuring, optimizing, and managing memory
|
|
445
|
-
* for large entity counts. Includes sparse storage for rarely-used
|
|
446
|
-
* components and memory pool pre-allocation.
|
|
447
|
-
*
|
|
448
|
-
* @module utils/componentStorage
|
|
449
|
-
*/
|
|
450
|
-
|
|
451
|
-
/**
|
|
452
|
-
* Memory usage report for component storage.
|
|
453
|
-
*/
|
|
454
|
-
interface ComponentMemoryReport {
|
|
455
|
-
/** Total bytes used by all components */
|
|
456
|
-
readonly totalBytes: number;
|
|
457
|
-
/** Per-component byte usage */
|
|
458
|
-
readonly componentBytes: ReadonlyMap<string, number>;
|
|
459
|
-
/** Number of entities tracked */
|
|
460
|
-
readonly entityCount: number;
|
|
461
|
-
/** Average bytes per entity */
|
|
462
|
-
readonly avgBytesPerEntity: number;
|
|
463
|
-
/** Memory efficiency ratio (used / allocated) */
|
|
464
|
-
readonly efficiency: number;
|
|
465
|
-
}
|
|
466
|
-
/**
|
|
467
|
-
* Configuration for sparse component storage.
|
|
468
|
-
*/
|
|
469
|
-
interface SparseStorageConfig {
|
|
470
|
-
/** Initial capacity (default: 64) */
|
|
471
|
-
readonly initialCapacity: number;
|
|
472
|
-
/** Growth factor when expanding (default: 2) */
|
|
473
|
-
readonly growthFactor: number;
|
|
474
|
-
/** Maximum capacity before warning (default: 100000) */
|
|
475
|
-
readonly maxCapacity: number;
|
|
476
|
-
}
|
|
477
|
-
/**
|
|
478
|
-
* A sparse component store using Map for memory efficiency.
|
|
479
|
-
* Suitable for components that only a small fraction of entities use.
|
|
480
|
-
*/
|
|
481
|
-
interface SparseStore<T> {
|
|
482
|
-
/** Gets value for an entity */
|
|
483
|
-
get(eid: Entity): T | undefined;
|
|
484
|
-
/** Sets value for an entity */
|
|
485
|
-
set(eid: Entity, value: T): void;
|
|
486
|
-
/** Checks if entity has a value */
|
|
487
|
-
has(eid: Entity): boolean;
|
|
488
|
-
/** Removes value for an entity */
|
|
489
|
-
delete(eid: Entity): boolean;
|
|
490
|
-
/** Number of stored entries */
|
|
491
|
-
readonly size: number;
|
|
492
|
-
/** Iterates over all entries */
|
|
493
|
-
entries(): IterableIterator<[Entity, T]>;
|
|
494
|
-
/** Clears all data */
|
|
495
|
-
clear(): void;
|
|
496
|
-
/** Estimated memory usage in bytes */
|
|
497
|
-
memoryUsage(): number;
|
|
498
|
-
}
|
|
499
|
-
/**
|
|
500
|
-
* Pre-allocated typed array pool for SoA components.
|
|
501
|
-
*/
|
|
502
|
-
interface TypedArrayPool {
|
|
503
|
-
/** Allocates a Float32Array from the pool */
|
|
504
|
-
allocateF32(size: number): Float32Array;
|
|
505
|
-
/** Allocates a Uint32Array from the pool */
|
|
506
|
-
allocateU32(size: number): Uint32Array;
|
|
507
|
-
/** Allocates a Uint8Array from the pool */
|
|
508
|
-
allocateU8(size: number): Uint8Array;
|
|
509
|
-
/** Returns an array to the pool */
|
|
510
|
-
release(arr: ArrayBufferView): void;
|
|
511
|
-
/** Total bytes allocated */
|
|
512
|
-
readonly totalAllocated: number;
|
|
513
|
-
/** Total bytes in free pool */
|
|
514
|
-
readonly totalFree: number;
|
|
515
|
-
/** Clears the pool */
|
|
516
|
-
reset(): void;
|
|
517
|
-
}
|
|
518
|
-
/**
|
|
519
|
-
* Creates a sparse component store backed by a Map.
|
|
520
|
-
* Ideal for components present on <10% of entities.
|
|
521
|
-
*
|
|
522
|
-
* @param _config - Optional configuration
|
|
523
|
-
* @returns A new sparse store
|
|
524
|
-
*
|
|
525
|
-
* @example
|
|
526
|
-
* ```typescript
|
|
527
|
-
* import { createSparseStore } from 'blecsd';
|
|
528
|
-
*
|
|
529
|
-
* const debugInfo = createSparseStore<{ label: string }>();
|
|
530
|
-
* debugInfo.set(eid, { label: 'Player' });
|
|
531
|
-
* ```
|
|
532
|
-
*/
|
|
533
|
-
declare function createSparseStore<T>(_config?: Partial<SparseStorageConfig>): SparseStore<T>;
|
|
534
|
-
/**
|
|
535
|
-
* Creates a typed array pool for pre-allocation.
|
|
536
|
-
* Reduces GC pressure from repeated allocation of component arrays.
|
|
537
|
-
*
|
|
538
|
-
* @returns A new typed array pool
|
|
539
|
-
*
|
|
540
|
-
* @example
|
|
541
|
-
* ```typescript
|
|
542
|
-
* import { createTypedArrayPool } from 'blecsd';
|
|
543
|
-
*
|
|
544
|
-
* const pool = createTypedArrayPool();
|
|
545
|
-
* const positions = pool.allocateF32(10000); // Pre-allocate for 10K entities
|
|
546
|
-
* ```
|
|
547
|
-
*/
|
|
548
|
-
declare function createTypedArrayPool(): TypedArrayPool;
|
|
549
|
-
/**
|
|
550
|
-
* Estimates memory usage for a given entity count with standard components.
|
|
551
|
-
*
|
|
552
|
-
* @param entityCount - Number of entities to estimate for
|
|
553
|
-
* @param componentCount - Average number of components per entity
|
|
554
|
-
* @param bytesPerComponent - Average bytes per component field (default: 4 for f32)
|
|
555
|
-
* @param fieldsPerComponent - Average fields per component (default: 4)
|
|
556
|
-
* @returns Estimated memory in bytes
|
|
557
|
-
*
|
|
558
|
-
* @example
|
|
559
|
-
* ```typescript
|
|
560
|
-
* import { estimateMemoryUsage } from 'blecsd';
|
|
561
|
-
*
|
|
562
|
-
* const bytes = estimateMemoryUsage(100000, 5);
|
|
563
|
-
* console.log(`~${(bytes / 1024 / 1024).toFixed(1)}MB for 100K entities`);
|
|
564
|
-
* ```
|
|
565
|
-
*/
|
|
566
|
-
declare function estimateMemoryUsage(entityCount: number, componentCount: number, bytesPerComponent?: number, fieldsPerComponent?: number): number;
|
|
567
|
-
/**
|
|
568
|
-
* Generates a component memory report.
|
|
569
|
-
*
|
|
570
|
-
* @param world - The ECS world
|
|
571
|
-
* @param components - Named components to measure
|
|
572
|
-
* @returns Memory report
|
|
573
|
-
*
|
|
574
|
-
* @example
|
|
575
|
-
* ```typescript
|
|
576
|
-
* import { getComponentMemoryReport, Position, Velocity } from 'blecsd';
|
|
577
|
-
*
|
|
578
|
-
* const report = getComponentMemoryReport(world, {
|
|
579
|
-
* Position: Position,
|
|
580
|
-
* Velocity: Velocity,
|
|
581
|
-
* });
|
|
582
|
-
* console.log(`Total: ${report.totalBytes} bytes`);
|
|
583
|
-
* ```
|
|
584
|
-
*/
|
|
585
|
-
declare function getComponentMemoryReport(_world: World, components: Record<string, Record<string, ArrayLike<number>>>): ComponentMemoryReport;
|
|
586
|
-
/**
|
|
587
|
-
* Checks if entity count is within safe memory bounds.
|
|
588
|
-
*
|
|
589
|
-
* @param entityCount - Current entity count
|
|
590
|
-
* @param maxMemoryMB - Maximum memory in MB (default: 100)
|
|
591
|
-
* @param avgComponentsPerEntity - Average components per entity (default: 5)
|
|
592
|
-
* @returns Whether the entity count is within bounds
|
|
593
|
-
*/
|
|
594
|
-
declare function isWithinMemoryBounds(entityCount: number, maxMemoryMB?: number, avgComponentsPerEntity?: number): boolean;
|
|
595
|
-
|
|
596
442
|
/**
|
|
597
443
|
* Cursor/caret navigation for huge documents.
|
|
598
444
|
*
|
|
@@ -906,9 +752,9 @@ interface DiffLine {
|
|
|
906
752
|
/** Line content */
|
|
907
753
|
readonly content: string;
|
|
908
754
|
/** Old line number (for remove/context) */
|
|
909
|
-
readonly oldLineNo?: number;
|
|
755
|
+
readonly oldLineNo?: number | undefined;
|
|
910
756
|
/** New line number (for add/context) */
|
|
911
|
-
readonly newLineNo?: number;
|
|
757
|
+
readonly newLineNo?: number | undefined;
|
|
912
758
|
}
|
|
913
759
|
/**
|
|
914
760
|
* A chunk/hunk in a diff.
|
|
@@ -961,9 +807,9 @@ interface SideBySideEntry<T extends SideBySideEntryType = SideBySideEntryType> {
|
|
|
961
807
|
*/
|
|
962
808
|
interface SideBySideLine {
|
|
963
809
|
/** Left (old) line */
|
|
964
|
-
readonly left?: SideBySideEntry<'remove' | 'context'
|
|
810
|
+
readonly left?: SideBySideEntry<'remove' | 'context'> | undefined;
|
|
965
811
|
/** Right (new) line */
|
|
966
|
-
readonly right?: SideBySideEntry<'add' | 'context'
|
|
812
|
+
readonly right?: SideBySideEntry<'add' | 'context'> | undefined;
|
|
967
813
|
}
|
|
968
814
|
/**
|
|
969
815
|
* Visible lines result for virtualized rendering.
|
|
@@ -1904,19 +1750,19 @@ declare function updateTotalLines(state: MutableFoldState, totalLines: number):
|
|
|
1904
1750
|
*/
|
|
1905
1751
|
interface FuzzyOptions {
|
|
1906
1752
|
/** Whether to ignore case (default: true) */
|
|
1907
|
-
readonly caseSensitive?: boolean;
|
|
1753
|
+
readonly caseSensitive?: boolean | undefined;
|
|
1908
1754
|
/** Minimum score threshold (0-1, default: 0) */
|
|
1909
|
-
readonly threshold?: number;
|
|
1755
|
+
readonly threshold?: number | undefined;
|
|
1910
1756
|
/** Maximum number of results to return (default: unlimited) */
|
|
1911
|
-
readonly limit?: number;
|
|
1757
|
+
readonly limit?: number | undefined;
|
|
1912
1758
|
/** Bonus for consecutive character matches (default: 0.3) */
|
|
1913
|
-
readonly consecutiveBonus?: number;
|
|
1759
|
+
readonly consecutiveBonus?: number | undefined;
|
|
1914
1760
|
/** Bonus for matches at word boundaries (default: 0.2) */
|
|
1915
|
-
readonly wordBoundaryBonus?: number;
|
|
1761
|
+
readonly wordBoundaryBonus?: number | undefined;
|
|
1916
1762
|
/** Bonus for exact prefix match (default: 0.5) */
|
|
1917
|
-
readonly prefixBonus?: number;
|
|
1763
|
+
readonly prefixBonus?: number | undefined;
|
|
1918
1764
|
/** Penalty per character distance between matches (default: 0.1) */
|
|
1919
|
-
readonly gapPenalty?: number;
|
|
1765
|
+
readonly gapPenalty?: number | undefined;
|
|
1920
1766
|
}
|
|
1921
1767
|
/**
|
|
1922
1768
|
* A single fuzzy match result.
|
|
@@ -1936,7 +1782,7 @@ interface FuzzyMatch<T = string> {
|
|
|
1936
1782
|
*/
|
|
1937
1783
|
interface FuzzySearchOptions<T> extends FuzzyOptions {
|
|
1938
1784
|
/** Function to extract searchable text from an item */
|
|
1939
|
-
readonly getText?: (item: T) => string;
|
|
1785
|
+
readonly getText?: ((item: T) => string) | undefined;
|
|
1940
1786
|
}
|
|
1941
1787
|
/**
|
|
1942
1788
|
* Zod schema for fuzzy options.
|
|
@@ -2979,14 +2825,14 @@ interface CodeData {
|
|
|
2979
2825
|
interface ListData {
|
|
2980
2826
|
readonly kind: 'list';
|
|
2981
2827
|
readonly ordered: boolean;
|
|
2982
|
-
readonly start?: number;
|
|
2828
|
+
readonly start?: number | undefined;
|
|
2983
2829
|
readonly items: readonly ListItem[];
|
|
2984
2830
|
}
|
|
2985
2831
|
interface ListItem {
|
|
2986
2832
|
readonly content: string;
|
|
2987
2833
|
readonly inline: readonly InlineElement[];
|
|
2988
2834
|
readonly indent: number;
|
|
2989
|
-
readonly checked?: boolean;
|
|
2835
|
+
readonly checked?: boolean | undefined;
|
|
2990
2836
|
}
|
|
2991
2837
|
interface TableData {
|
|
2992
2838
|
readonly kind: 'table';
|
|
@@ -3028,12 +2874,12 @@ interface RenderedLine {
|
|
|
3028
2874
|
* Line style information.
|
|
3029
2875
|
*/
|
|
3030
2876
|
interface LineStyle {
|
|
3031
|
-
readonly fg?: number;
|
|
3032
|
-
readonly bg?: number;
|
|
3033
|
-
readonly bold?: boolean;
|
|
3034
|
-
readonly italic?: boolean;
|
|
3035
|
-
readonly underline?: boolean;
|
|
3036
|
-
readonly dim?: boolean;
|
|
2877
|
+
readonly fg?: number | undefined;
|
|
2878
|
+
readonly bg?: number | undefined;
|
|
2879
|
+
readonly bold?: boolean | undefined;
|
|
2880
|
+
readonly italic?: boolean | undefined;
|
|
2881
|
+
readonly underline?: boolean | undefined;
|
|
2882
|
+
readonly dim?: boolean | undefined;
|
|
3037
2883
|
}
|
|
3038
2884
|
/**
|
|
3039
2885
|
* Markdown parse result.
|
|
@@ -4332,6 +4178,7 @@ declare function searchReverse(text: string, query: string, options?: SearchOpti
|
|
|
4332
4178
|
* Text wrapping utilities with Unicode and ANSI support.
|
|
4333
4179
|
* @module utils/textWrap
|
|
4334
4180
|
*/
|
|
4181
|
+
|
|
4335
4182
|
/**
|
|
4336
4183
|
* Text alignment options.
|
|
4337
4184
|
*/
|
|
@@ -6101,4 +5948,4 @@ declare function getCategories(corpus: readonly WidthTestCase[]): readonly Width
|
|
|
6101
5948
|
*/
|
|
6102
5949
|
declare function formatTestReport(results: WidthTestResult): string;
|
|
6103
5950
|
|
|
6104
|
-
export { AMBIGUOUS_RANGES, type Alignment, AlignmentSchema, AttrFlags, BOX_ASCII, BOX_BOLD, BOX_DASHED, BOX_DOUBLE, BOX_ROUNDED, BOX_SINGLE, type BlockData, type BlockType, type BlockquoteData, type BoxChars, COMBINING_RANGES, COMBINING_SET, type Cell, type CellBuffer, type CoalescingConfig, type CoalescingState, type CodeData, type CodePointRange, type
|
|
5951
|
+
export { AMBIGUOUS_RANGES, type Alignment, AlignmentSchema, AttrFlags, BOX_ASCII, BOX_BOLD, BOX_DASHED, BOX_DOUBLE, BOX_ROUNDED, BOX_SINGLE, type BlockData, type BlockType, type BlockquoteData, type BoxChars, COMBINING_RANGES, COMBINING_SET, type Cell, type CellBuffer, type CoalescingConfig, type CoalescingState, type CodeData, type CodePointRange, type ContentChunk, type ContentSource, type CursorNavConfig, type CursorPosition, DEFAULT_BATCH_SIZE, DEFAULT_COLLAPSE_THRESHOLD, DEFAULT_CONTEXT, DEFAULT_HIGHLIGHT_BATCH, DEFAULT_PARSE_BATCH, DEFAULT_SEARCH_BATCH, DEFAULT_TIMEOUT, type DiffCache, type DiffChunk, type DiffConfig, type DiffLine, type DiffResult, type DiffType, type DirtyRegion, type DropUnicodeOptions, EMOJI_WIDE_RANGES, EMPTY_STATE, FULLWIDTH_RANGES, type FastWrapOptions, type FlushResult, type FoldConfig, type FoldRegion, type FoldStats, type FuzzyMatch, type FuzzyOptions, FuzzyOptionsSchema, type FuzzySearchOptions, GRAMMARS, GRAMMAR_GO, GRAMMAR_JAVASCRIPT, GRAMMAR_JSON, GRAMMAR_PLAINTEXT, GRAMMAR_PYTHON, GRAMMAR_RUST, GRAMMAR_SHELL, type Grammar, type GraphemeSliceResult, type GutterConfig, type GutterLine, type GutterResult, HIGH_SURROGATE_END, HIGH_SURROGATE_START, type HeadingData, type HighlightCache, type HighlightResult, type HighlightStats, type HrData, type HtmlData, type InlineElement, type InlineType, type KnownBadSequence, LEAF_MAX_SIZE, LEAF_MIN_SIZE, LOW_SURROGATE_END, LOW_SURROGATE_START, type LazyContentConfig, type LazyContentState, type LineEntry, type LineIndex, type LineInfo, type LineNumberMode, type LinePosition, type LineState, type LineStyle, type ListData, type ListItem, MAX_DEPTH, MAX_PARAGRAPH_CHUNK, type MarkdownBlock, type MarkdownCache, type MarkdownParseResult, type MarkdownStats, type NavigationResult, type ParagraphData, type ParsedContent, ParsedContentSchema, type ProgressiveSearchResult, type ProgressiveWrapResult, type RenderBoxOptions, type RenderedLine, type Rope, type RopeLeaf, type RopeNode, type RopeStats, type SearchCache, type SearchMatch, type SearchOptions, type SearchResult, type SideBySideLine, type SliceResult, type StyleAttr, type StyleInput, type TableCell, type TableData, type TerminalWidthProfile, TerminalWidthProfileSchema, type TextAlign, type TextChange, type TextSegment, TextSegmentSchema, type Token, type TokenType, type ViewportState, type VisibleDiff, type VisibleLine, type VisibleMarkdown, WIDE_RANGES, WORD_BOUNDARY_AFTER, WORD_BOUNDARY_BEFORE, type WidthOptions, type WidthOverride, WidthOverrideSchema, type WidthTestCase, type WidthTestCategory, type WidthTestFailure, type WidthTestResult, type WrapCache, type WrapCacheStats, type WrapEntry, type WrapOptions, ZERO_WIDTH_RANGES, addFoldRegion, alignLine, append, attrToTag, attrsToStyle, attrsToTags, boyerMooreHorspool, bufferToString$1 as bufferToString, buildLineIndex, buildLineIndexFromLengths, buildTestCorpus, centerByWidth, charAt, charAtCodePoint, charWidth, charWidthAt, characters, charsetToBoxChars, clampCursor, cleanTags, clearDiffCache, clearHighlightCache, clearLazyContent, clearMarkdownCache, clearSearchCache, clearWidthOverrides, clearWrapCache, codePointAt, codePointLength, codePointToSurrogatePair, codePointWidth, codePoints, collapseChunk, collapseUnchanged, colorToTag, columnAtIndex, computeDiff, computeDiffCached, computeDigitWidth, computeGutterWidth, computeVisibleGutter, continueHighlight, continueWrap, createArraySource, createCellBuffer, createCoalescer, createCursor, createDiffCache, createEmptyRope, createFoldState, createGutterConfig, createHighlightCache, createLazyContent, createMarkdownCache, createNavConfig, createRope, createSearchCache, createTaggedText, createViewport, createWrapCache, decodeStyleAttr, deleteChange, deleteRange, destroyCoalescer, detectLanguage, detectLanguageFromContent, dropUnicode, encodeStyleAttr, index as encoding, ensureCursorVisible, escapeTags, evictChunks, expandAll, expandChunk, fillRect, filterByCategory, findAllFiles, findFile, findNearestMatch, flushChanges, foldAll, foldAtDepth, foldRegion, formatDate, formatLineNumber, formatTestReport, fromCodePoint, fuzzyFilter, fuzzyMatch, fuzzySearch, fuzzySearchBy, fuzzyTest, generateCloseTags, generateTags, getAllFoldRegions, getCategories, getCharWidth, getCoalescingState, getCombiningCharCount, getDiffStats, getFoldAtLine, getFoldStats, getGrammarByName, getHighlightStats, getKnownBadSequences, getLazyContentState, getLazyLines, getLength, getLine, getLineCount, getLineEnd, getLineForIndex, getLineStart, getLines, getTotalLineCount as getMarkdownLineCount, getMarkdownStats, getMatchAt, getMatchStatus, getNewlineCount, getNextMatch, getOverrideCount, getOverrideWidth, getPreviousMatch, getSideBySideView, getStats, getText, getTotalLineCount$1 as getTotalLineCount, getVisibleDiffLines, getVisibleFoldLines, getVisibleMarkdown, getVisibleMatches, getVisibleWidth, getWrapCacheStats, goToEnd, goToLine, goToStart, graphemeAt, graphemeClusters, graphemeCount, graphemeWidth, groupBy, gutterWidthChanged, hasGraphemeSegmenter, hasTags, hasWideChars, hasZeroWidthChars, highlightMatch, highlightVisibleFirst, highlightWithCache, indexAtColumn, insert, insertChange, installWidthOverrides, invalidateAll, invalidateAllLines, invalidateLine, invalidateLines$1 as invalidateLines, invalidateLines as invalidateMarkdownLines, invalidateParagraph, invalidateRange, isAmbiguousChar, isAstral, isBMP, isCombiningChar, isCombiningCharBinarySearch, isEmpty, isHighSurrogate, isLowSurrogate, isRangeLoaded, isSurrogate, isSurrogateCode, isValidCodePoint, isWideChar, isZeroWidthChar, lineForOffset, lineToPosition, measureWidthWithOverrides, merge, mergeSegments, moveCursorDown, moveCursorLeft, moveCursorRight, moveCursorUp, normalizeNFC, normalizeNFD, normalizeNFKC, normalizeNFKD, offsetForLine, originalToVisibleLine, padEndByWidth, padHeight, padStartByWidth, pageDown, pageUp, parseInline, parseMarkdown, parseMarkdownCached, parseTags, parseUnifiedDiff, parsedToTaggedText, partition, positionToLine, positionToLineColumn, prefetchAround, prepend, queueChange, removeFoldRegion, renderBlock, renderBox, renderGutterBlock, renderHLine, renderMarkdown, renderText, renderVLine, replaceChange, replaceRange, resizeWrapCache, reverseGraphemes, runWidthTests, sattr, sattrAddFlag, sattrCopy, sattrEmpty, sattrEqual, sattrFromStyleData, sattrHasFlag, sattrInvert, sattrMerge, sattrRemoveFlag, search, searchBatch, searchLiteral, searchRegex, searchReverse, searchWithCache, segmentToTaggedText, setGrammar, shallowMerge, sliceByWidth, sliceByWidthGrapheme, sliceCodePoints, sliceGraphemes, sortBy, sortByIndex, sortByName, sortByPriority, strWidth, stringWidth, stringWidthGrapheme, stripAnsi, stripCombining, stripControl, stripTags, stripZeroWidth, styleToAttrs, substring, surrogatePairToCodePoint, taggedLength, toAscii, toCodePoints, toGraphemes, toUnifiedDiff, toggleChunk, toggleFold, tokenizeLine, truncate, truncateByWidth, truncateWithEllipsis, truncateWithEllipsisGrapheme, unfoldAll, unfoldRegion, unique, uniqueBy, unixTimestamp, unixTimestampMs, updateSearchQuery, updateTotalLines, verify, visibleToOriginalLine, wordWrap, wrapText, wrapVisibleFirst, wrapWithCache, wrapWithTags };
|
package/dist/utils/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{Ha as AMBIGUOUS_RANGES,le as AlignmentSchema,Qd as AttrFlags,f as BOX_ASCII,e as BOX_BOLD,g as BOX_DASHED,c as BOX_DOUBLE,d as BOX_ROUNDED,b as BOX_SINGLE,za as COMBINING_RANGES,Aa as COMBINING_SET,Ib as DEFAULT_BATCH_SIZE,P as DEFAULT_COLLAPSE_THRESHOLD,O as DEFAULT_CONTEXT,Kc as DEFAULT_HIGHLIGHT_BATCH,gd as DEFAULT_PARSE_BATCH,xe as DEFAULT_SEARCH_BATCH,we as DEFAULT_TIMEOUT,Ia as EMOJI_WIDE_RANGES,Lc as EMPTY_STATE,Fa as FULLWIDTH_RANGES,Tc as GRAMMARS,Pc as GRAMMAR_GO,Mc as GRAMMAR_JAVASCRIPT,Rc as GRAMMAR_JSON,Sc as GRAMMAR_PLAINTEXT,Nc as GRAMMAR_PYTHON,Oc as GRAMMAR_RUST,Qc as GRAMMAR_SHELL,fa as HIGH_SURROGATE_END,ea as HIGH_SURROGATE_START,sd as LEAF_MAX_SIZE,td as LEAF_MIN_SIZE,ha as LOW_SURROGATE_END,ga as LOW_SURROGATE_START,ud as MAX_DEPTH,Hb as MAX_PARAGRAPH_CHUNK,ve as ParsedContentSchema,vb as TerminalWidthProfileSchema,ue as TextSegmentSchema,Ea as WIDE_RANGES,ze as WORD_BOUNDARY_AFTER,ye as WORD_BOUNDARY_BEFORE,ub as WidthOverrideSchema,Ga as ZERO_WIDTH_RANGES,Wb as addFoldRegion,Kd as append,ne as attrToTag,Sd as attrsToStyle,re as attrsToTags,Ae as boyerMooreHorspool,n as bufferToString,w as buildLineIndex,x as buildLineIndexFromLengths,wb as buildTestCorpus,pb as centerByWidth,Bd as charAt,xa as charAtCodePoint,gb as charWidth,hb as charWidthAt,sa as characters,a as charsetToBoxChars,E as clampCursor,fe as cleanTags,S as clearDiffCache,Vc as clearHighlightCache,zc as clearLazyContent,kd as clearMarkdownCache,He as clearSearchCache,zb as clearWidthOverrides,Kb as clearWrapCache,oa as codePointAt,ta as codePointLength,na as codePointToSurrogatePair,fb as codePointWidth,qa as codePoints,V as collapseChunk,Y as collapseUnchanged,me as colorToTag,rb as columnAtIndex,Q as computeDiff,T as computeDiffCached,Dc as computeDigitWidth,Ec as computeGutterWidth,Hc as computeVisibleGutter,cd as continueHighlight,Ob as continueWrap,Cc as createArraySource,h as createCellBuffer,o as createCoalescer,A as createCursor,R as createDiffCache,wd as createEmptyRope,Vb as createFoldState,Fc as createGutterConfig,Uc as createHighlightCache,vc as createLazyContent,jd as createMarkdownCache,C as createNavConfig,vd as createRope,Ge as createSearchCache,he as createTaggedText,B as createViewport,Jb as createWrapCache,ce as decodeStyleAttr,t as deleteChange,Md as deleteRange,v as destroyCoalescer,dd as detectLanguage,ed as detectLanguageFromContent,Ya as dropUnicode,be as encodeStyleAttr,da as encoding,D as ensureCursorVisible,ge as escapeTags,yc as evictChunks,X as expandAll,U as expandChunk,l as fillRect,Eb as filterByCategory,qc as findAllFiles,pc as findFile,Ne as findNearestMatch,q as flushChanges,$b as foldAll,bc as foldAtDepth,Yb as foldRegion,Gc as formatLineNumber,Gb as formatTestReport,pa as fromCodePoint,pe as generateCloseTags,oe as generateTags,dc as getAllFoldRegions,Fb as getCategories,Ma as getCharWidth,r as getCoalescingState,Da as getCombiningCharCount,ca as getDiffStats,cc as getFoldAtLine,hc as getFoldStats,fd as getGrammarByName,Xc as getHighlightStats,xb as getKnownBadSequences,Ac as getLazyContentState,wc as getLazyLines,xd as getLength,Hd as getLine,zd as getLineCount,Gd as getLineEnd,Ed as getLineForIndex,Fd as getLineStart,Id as getLines,qd as getMarkdownLineCount,rd as getMarkdownStats,Me as getMatchAt,Pe as getMatchStatus,yd as getNewlineCount,Ke as getNextMatch,Ab as getOverrideCount,Bb as getOverrideWidth,Le as getPreviousMatch,$ as getSideBySideView,Od as getStats,Dd as getText,_ as getTotalLineCount,Z as getVisibleDiffLines,ec as getVisibleFoldLines,pd as getVisibleMarkdown,Oe as getVisibleMatches,Ub as getWrapCacheStats,L as goToEnd,H as goToLine,K as goToStart,Qa as graphemeAt,Na as graphemeClusters,Pa as graphemeCount,Sa as graphemeWidth,tc as groupBy,Ic as gutterWidthChanged,Wa as hasGraphemeSegmenter,ke as hasTags,sb as hasWideChars,tb as hasZeroWidthChars,bd as highlightVisibleFirst,ad as highlightWithCache,qb as indexAtColumn,Jd as insert,s as insertChange,yb as installWidthOverrides,Rb as invalidateAll,_c as invalidateAllLines,Zc as invalidateLine,Yc as invalidateLines,md as invalidateMarkdownLines,Qb as invalidateParagraph,Pb as invalidateRange,La as isAmbiguousChar,wa as isAstral,va as isBMP,Ba as isCombiningChar,Ca as isCombiningCharBinarySearch,Ad as isEmpty,ia as isHighSurrogate,ja as isLowSurrogate,Bc as isRangeLoaded,la as isSurrogate,ka as isSurrogateCode,ua as isValidCodePoint,Ja as isWideChar,Ka as isZeroWidthChar,y as lineForOffset,Sb as lineToPosition,Cb as measureWidthWithOverrides,jc as merge,ie as mergeSegments,G as moveCursorDown,M as moveCursorLeft,N as moveCursorRight,F as moveCursorUp,bb as normalizeNFC,cb as normalizeNFD,db as normalizeNFKC,eb as normalizeNFKD,z as offsetForLine,gc as originalToVisibleLine,nb as padEndByWidth,ob as padStartByWidth,J as pageDown,I as pageUp,hd as parseInline,id as parseMarkdown,ld as parseMarkdownCached,de as parseTags,ba as parseUnifiedDiff,te as parsedToTaggedText,uc as partition,Tb as positionToLine,Be as positionToLineColumn,xc as prefetchAround,Ld as prepend,p as queueChange,Xb as removeFoldRegion,nd as renderBlock,i as renderBox,Jc as renderGutterBlock,j as renderHLine,od as renderMarkdown,m as renderText,k as renderVLine,u as replaceChange,Nd as replaceRange,Lb as resizeWrapCache,Xa as reverseGraphemes,Db as runWidthTests,Td as sattr,Zd as sattrAddFlag,Wd as sattrCopy,ae as sattrEmpty,Vd as sattrEqual,Ud as sattrFromStyleData,Yd as sattrHasFlag,$d as sattrInvert,Xd as sattrMerge,_d as sattrRemoveFlag,Ee as search,Fe as searchBatch,Ce as searchLiteral,De as searchRegex,Qe as searchReverse,Je as searchWithCache,se as segmentToTaggedText,Wc as setGrammar,kc as shallowMerge,kb as sliceByWidth,Ua as sliceByWidthGrapheme,ya as sliceCodePoints,Ra as sliceGraphemes,oc as sortBy,mc as sortByIndex,lc as sortByName,nc as sortByPriority,jb as strWidth,ib as stringWidth,Ta as stringWidthGrapheme,$a as stripCombining,ab as stripControl,ee as stripTags,_a as stripZeroWidth,Rd as styleToAttrs,Cd as substring,ma as surrogatePairToCodePoint,je as taggedLength,Za as toAscii,ra as toCodePoints,Oa as toGraphemes,aa as toUnifiedDiff,W as toggleChunk,_b as toggleFold,$c as tokenizeLine,lb as truncateByWidth,mb as truncateWithEllipsis,Va as truncateWithEllipsisGrapheme,ac as unfoldAll,Zb as unfoldRegion,rc as unique,sc as uniqueBy,Ie as updateSearchQuery,ic as updateTotalLines,Pd as verify,fc as visibleToOriginalLine,Nb as wrapVisibleFirst,Mb as wrapWithCache,qe as wrapWithTags}from'../chunk-MKMFUXLB.js';export{a as FuzzyOptionsSchema,h as formatDate,f as fuzzyFilter,b as fuzzyMatch,c as fuzzySearch,d as fuzzySearchBy,g as fuzzyTest,e as highlightMatch,i as unixTimestamp,j as unixTimestampMs}from'../chunk-2IEMMRUO.js';export{d as COMPRESSION_RATIO,a as DEFAULT_CHUNK_SIZE,b as DEFAULT_MAX_CACHED,c as DEFAULT_MAX_MEMORY,g as appendLine,h as appendLines,f as clearScrollback,u as compressOldChunks,e as createScrollbackBuffer,v as decompressAll,s as exportToText,j as getLineRange,q as getMemoryUsage,i as getScrollbackLine,p as getScrollbackStats,k as getVisibleLines,l as jumpToLine,r as loadFromText,m as scrollBy,o as scrollToBottom,n as scrollToTop,t as trimToLineCount}from'../chunk-JHCKPCUH.js';export{e as CHUNKED_THRESHOLD,a as LineIndexSchema,b as LineRangeParamsSchema,d as TrimParamsSchema,c as VisibleLinesParamsSchema,n as appendLinesToStore,m as appendToStore,h as createEmptyLineStore,f as createLineStore,g as createLineStoreFromLines,u as exportContent,v as exportLineRange,p as getByteSize,i as getLineAtIndex,s as getLineForOffset,j as getLineInfo,o as getLineStoreLineCount,k as getLineStoreRange,l as getLineStoreVisibleLines,t as getOffsetForLine,r as getStoreStats,q as isStoreEmpty,w as trimLineStore}from'../chunk-VOCM5T2G.js';export{a as createComponentStore,b as createSparseStore,c as createTypedArrayPool,d as estimateMemoryUsage,e as getComponentMemoryReport,f as isWithinMemoryBounds}from'../chunk-EAY7B5GL.js';import'../chunk-K3SX2LY5.js';import'../chunk-DYU72XLL.js';export{d as alignLine,b as getVisibleWidth,g as padHeight,a as stripAnsi,c as truncate,e as wordWrap,f as wrapText}from'../chunk-NPDPBAW6.js';export{d as colorToHex,c as hexToColor,a as packColor,e as parseColor,b as unpackColor}from'../chunk-SHUC6JWA.js';import'../chunk-PXXGH3BV.js';import'../chunk-5PELJRUQ.js';
|
|
@@ -16,11 +16,11 @@ interface ScrollbackLine {
|
|
|
16
16
|
/** The text content of the line */
|
|
17
17
|
readonly text: string;
|
|
18
18
|
/** ANSI formatting preserved */
|
|
19
|
-
readonly ansi?: string;
|
|
19
|
+
readonly ansi?: string | undefined;
|
|
20
20
|
/** Timestamp when line was added */
|
|
21
|
-
readonly timestamp?: number;
|
|
21
|
+
readonly timestamp?: number | undefined;
|
|
22
22
|
/** Custom metadata */
|
|
23
|
-
readonly meta?: Record<string, unknown
|
|
23
|
+
readonly meta?: Record<string, unknown> | undefined;
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
26
|
* A chunk of lines.
|
|
@@ -37,7 +37,7 @@ interface Chunk {
|
|
|
37
37
|
/** Whether this chunk is compressed */
|
|
38
38
|
compressed: boolean;
|
|
39
39
|
/** Compressed data (when compressed=true) */
|
|
40
|
-
compressedData?: string;
|
|
40
|
+
compressedData?: string | undefined;
|
|
41
41
|
/** Approximate memory usage in bytes */
|
|
42
42
|
memorySize: number;
|
|
43
43
|
/** Last access time for LRU */
|