@ikonai/sdk-ui 0.0.28 → 0.0.31
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/assets/ui-worker-DDoIUH1E.js +2529 -0
- package/handler-cache.d.ts +54 -0
- package/index.d.ts +1 -0
- package/index.js +2290 -14639
- package/package.json +2 -1
- package/parse-ui-update.d.ts +1 -1
- package/ui-store-ops.d.ts +1 -1
- package/ui-store.d.ts +18 -1
- package/ui-types.d.ts +2 -1
- package/assets/ui-worker-Cpo_HAMl.js +0 -15341
package/package.json
CHANGED
package/parse-ui-update.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UIUpdate } from '../../../shared/
|
|
1
|
+
import { UIUpdate } from '../../../shared/protocol/src/index.ts';
|
|
2
2
|
import { ParsedUiUpdate } from './ui-types';
|
|
3
3
|
export declare class UiUpdateParseError extends Error {
|
|
4
4
|
readonly causeError?: unknown | undefined;
|
package/ui-store-ops.d.ts
CHANGED
package/ui-store.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { ParsedUiUpdate, UiStoreSnapshot } from './ui-types';
|
|
1
|
+
import { ParsedUiUpdate, UiNode, UiStoreSnapshot } from './ui-types';
|
|
2
2
|
import { UiStoreOp, UiStreamSnapshotWire } from './ui-store-ops';
|
|
3
|
+
import { HandlerCache } from './handler-cache';
|
|
3
4
|
type StreamListener = (streamId: string) => void;
|
|
4
5
|
type StoreListener = () => void;
|
|
5
6
|
export interface StreamSnapshot extends UiStoreSnapshot {
|
|
6
7
|
readonly streamId: string;
|
|
7
8
|
readonly category?: string;
|
|
8
9
|
}
|
|
10
|
+
type NodeListener = () => void;
|
|
9
11
|
export declare class UiStreamStore {
|
|
10
12
|
private readonly views;
|
|
11
13
|
private readonly listeners;
|
|
@@ -13,6 +15,17 @@ export declare class UiStreamStore {
|
|
|
13
15
|
private snapshotMode;
|
|
14
16
|
private snapshot;
|
|
15
17
|
private rootViewId?;
|
|
18
|
+
private readonly nodeListeners;
|
|
19
|
+
private readonly changedNodeIds;
|
|
20
|
+
private readonly nodeVersions;
|
|
21
|
+
private structureChanged;
|
|
22
|
+
private viewsDirty;
|
|
23
|
+
private patchesDirty;
|
|
24
|
+
private payloadsDirty;
|
|
25
|
+
readonly handlerCache: HandlerCache;
|
|
26
|
+
private getSortedPatches;
|
|
27
|
+
private buildPatchCacheKey;
|
|
28
|
+
private invalidatePatchCache;
|
|
16
29
|
apply(update: ParsedUiUpdate): boolean;
|
|
17
30
|
replaceFromWire(wire: UiStreamSnapshotWire): boolean;
|
|
18
31
|
patchFromOp(op: Extract<UiStoreOp, {
|
|
@@ -22,6 +35,10 @@ export declare class UiStreamStore {
|
|
|
22
35
|
clear(): void;
|
|
23
36
|
getSnapshot(): UiStoreSnapshot;
|
|
24
37
|
subscribe(listener: StoreListener): () => void;
|
|
38
|
+
subscribeNode(nodeId: string, listener: NodeListener): () => void;
|
|
39
|
+
getNode(nodeId: string): UiNode | undefined;
|
|
40
|
+
getNodeVersion(nodeId: string): number;
|
|
41
|
+
private notifyNodes;
|
|
25
42
|
private commitSnapshot;
|
|
26
43
|
private notify;
|
|
27
44
|
}
|
package/ui-types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UIPayload } from '../../../shared/
|
|
1
|
+
import { UIPayload } from '../../../shared/protocol/src/index.ts';
|
|
2
2
|
export type UiUpdateType = 'full' | 'diff';
|
|
3
3
|
export type UiNodeProps = Record<string, unknown>;
|
|
4
4
|
export interface UiNode {
|
|
@@ -23,6 +23,7 @@ export interface UiNodeDiff {
|
|
|
23
23
|
readonly updated: readonly UiNodeDiff[];
|
|
24
24
|
readonly changedProps: ReadonlyMap<string, unknown>;
|
|
25
25
|
readonly textUpdates: readonly TextDelta[];
|
|
26
|
+
readonly styleIds?: readonly string[];
|
|
26
27
|
}
|
|
27
28
|
export interface UiSnapshotMetadata {
|
|
28
29
|
readonly viewId: string;
|