latticesql 3.4.0 → 3.4.2
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/dist/cli.js +375 -79
- package/dist/index.cjs +372 -78
- package/dist/index.d.cts +28 -1
- package/dist/index.d.ts +28 -1
- package/dist/index.js +369 -75
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1816,6 +1816,16 @@ type RenderProgressCallback = (event: RenderProgress) => void;
|
|
|
1816
1816
|
interface RenderOptions {
|
|
1817
1817
|
onProgress?: RenderProgressCallback;
|
|
1818
1818
|
signal?: AbortSignal;
|
|
1819
|
+
/**
|
|
1820
|
+
* Incremental render scope. When set, ONLY the entity-context tables affected
|
|
1821
|
+
* by a change to one of these tables are re-rendered — the changed table itself
|
|
1822
|
+
* plus any entity context that SOURCES from it (cross-table dependents) — and
|
|
1823
|
+
* every other table's manifest entry + rendered files are left untouched. Used
|
|
1824
|
+
* by the auto-render that fires on a single write or a single remote (cloud)
|
|
1825
|
+
* change, so a one-row edit re-renders one entity instead of the whole tree.
|
|
1826
|
+
* Omitted → a full render of everything (initial open, explicit `render()`).
|
|
1827
|
+
*/
|
|
1828
|
+
changedTables?: ReadonlySet<string>;
|
|
1819
1829
|
}
|
|
1820
1830
|
/**
|
|
1821
1831
|
* Coalesces high-frequency `table-progress` events down to ≤ ~5/sec per table,
|
|
@@ -1903,6 +1913,16 @@ declare class Lattice {
|
|
|
1903
1913
|
private _autoRenderPending;
|
|
1904
1914
|
private _autoRenderInFlight;
|
|
1905
1915
|
private _autoRenderDebounceMs;
|
|
1916
|
+
/**
|
|
1917
|
+
* Incremental auto-render scope, accumulated between debounced renders. A write
|
|
1918
|
+
* or a remote (cloud) change records the AFFECTED table here, so the next
|
|
1919
|
+
* auto-render re-renders only that entity (+ its cross-table dependents) instead
|
|
1920
|
+
* of the whole tree. `_pendingRenderAll` forces a full render (the initial
|
|
1921
|
+
* render, or a change with no known table). Captured + reset when a render
|
|
1922
|
+
* starts, so changes during a render re-accumulate and re-trigger.
|
|
1923
|
+
*/
|
|
1924
|
+
private _pendingRenderTables;
|
|
1925
|
+
private _pendingRenderAll;
|
|
1906
1926
|
/** Cache of actual table columns (from PRAGMA), populated after init(). */
|
|
1907
1927
|
private readonly _columnCache;
|
|
1908
1928
|
/** Derived encryption key (from options.encryptionKey via scrypt). */
|
|
@@ -2323,8 +2343,11 @@ declare class Lattice {
|
|
|
2323
2343
|
* tree when a REMOTE change arrives — notably an owner re-sharing or un-sharing
|
|
2324
2344
|
* a row, after which the member's per-viewer projection must be recompiled. A
|
|
2325
2345
|
* no-op when auto-render isn't enabled.
|
|
2346
|
+
*
|
|
2347
|
+
* Pass the CHANGED table so only that entity (+ its cross-table dependents) is
|
|
2348
|
+
* re-rendered instead of the whole tree; omit it to force a full render.
|
|
2326
2349
|
*/
|
|
2327
|
-
requestRender(): void;
|
|
2350
|
+
requestRender(table?: string): void;
|
|
2328
2351
|
/**
|
|
2329
2352
|
* True while a render is actively writing the context tree + manifest (auto-
|
|
2330
2353
|
* render OR a guarded background render). The file-loopback watcher checks this
|
|
@@ -2483,6 +2506,10 @@ declare class Lattice {
|
|
|
2483
2506
|
/** Turn off automatic rendering and cancel any pending render. */
|
|
2484
2507
|
disableAutoRender(): this;
|
|
2485
2508
|
private _scheduleAutoRender;
|
|
2509
|
+
/** Arm the debounce timer if not already armed. Does NOT change the render
|
|
2510
|
+
* scope — used both by `_scheduleAutoRender` and the post-render re-arm so a
|
|
2511
|
+
* re-arm never escalates a pending incremental render to a full one. */
|
|
2512
|
+
private _armAutoRenderTimer;
|
|
2486
2513
|
/**
|
|
2487
2514
|
* Shared single-flight render path used by {@link renderInBackground}.
|
|
2488
2515
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -1816,6 +1816,16 @@ type RenderProgressCallback = (event: RenderProgress) => void;
|
|
|
1816
1816
|
interface RenderOptions {
|
|
1817
1817
|
onProgress?: RenderProgressCallback;
|
|
1818
1818
|
signal?: AbortSignal;
|
|
1819
|
+
/**
|
|
1820
|
+
* Incremental render scope. When set, ONLY the entity-context tables affected
|
|
1821
|
+
* by a change to one of these tables are re-rendered — the changed table itself
|
|
1822
|
+
* plus any entity context that SOURCES from it (cross-table dependents) — and
|
|
1823
|
+
* every other table's manifest entry + rendered files are left untouched. Used
|
|
1824
|
+
* by the auto-render that fires on a single write or a single remote (cloud)
|
|
1825
|
+
* change, so a one-row edit re-renders one entity instead of the whole tree.
|
|
1826
|
+
* Omitted → a full render of everything (initial open, explicit `render()`).
|
|
1827
|
+
*/
|
|
1828
|
+
changedTables?: ReadonlySet<string>;
|
|
1819
1829
|
}
|
|
1820
1830
|
/**
|
|
1821
1831
|
* Coalesces high-frequency `table-progress` events down to ≤ ~5/sec per table,
|
|
@@ -1903,6 +1913,16 @@ declare class Lattice {
|
|
|
1903
1913
|
private _autoRenderPending;
|
|
1904
1914
|
private _autoRenderInFlight;
|
|
1905
1915
|
private _autoRenderDebounceMs;
|
|
1916
|
+
/**
|
|
1917
|
+
* Incremental auto-render scope, accumulated between debounced renders. A write
|
|
1918
|
+
* or a remote (cloud) change records the AFFECTED table here, so the next
|
|
1919
|
+
* auto-render re-renders only that entity (+ its cross-table dependents) instead
|
|
1920
|
+
* of the whole tree. `_pendingRenderAll` forces a full render (the initial
|
|
1921
|
+
* render, or a change with no known table). Captured + reset when a render
|
|
1922
|
+
* starts, so changes during a render re-accumulate and re-trigger.
|
|
1923
|
+
*/
|
|
1924
|
+
private _pendingRenderTables;
|
|
1925
|
+
private _pendingRenderAll;
|
|
1906
1926
|
/** Cache of actual table columns (from PRAGMA), populated after init(). */
|
|
1907
1927
|
private readonly _columnCache;
|
|
1908
1928
|
/** Derived encryption key (from options.encryptionKey via scrypt). */
|
|
@@ -2323,8 +2343,11 @@ declare class Lattice {
|
|
|
2323
2343
|
* tree when a REMOTE change arrives — notably an owner re-sharing or un-sharing
|
|
2324
2344
|
* a row, after which the member's per-viewer projection must be recompiled. A
|
|
2325
2345
|
* no-op when auto-render isn't enabled.
|
|
2346
|
+
*
|
|
2347
|
+
* Pass the CHANGED table so only that entity (+ its cross-table dependents) is
|
|
2348
|
+
* re-rendered instead of the whole tree; omit it to force a full render.
|
|
2326
2349
|
*/
|
|
2327
|
-
requestRender(): void;
|
|
2350
|
+
requestRender(table?: string): void;
|
|
2328
2351
|
/**
|
|
2329
2352
|
* True while a render is actively writing the context tree + manifest (auto-
|
|
2330
2353
|
* render OR a guarded background render). The file-loopback watcher checks this
|
|
@@ -2483,6 +2506,10 @@ declare class Lattice {
|
|
|
2483
2506
|
/** Turn off automatic rendering and cancel any pending render. */
|
|
2484
2507
|
disableAutoRender(): this;
|
|
2485
2508
|
private _scheduleAutoRender;
|
|
2509
|
+
/** Arm the debounce timer if not already armed. Does NOT change the render
|
|
2510
|
+
* scope — used both by `_scheduleAutoRender` and the post-render re-arm so a
|
|
2511
|
+
* re-arm never escalates a pending incremental render to a full one. */
|
|
2512
|
+
private _armAutoRenderTimer;
|
|
2486
2513
|
/**
|
|
2487
2514
|
* Shared single-flight render path used by {@link renderInBackground}.
|
|
2488
2515
|
*
|