@graphysdk/viz-engine 0.0.1-plugins.6 → 0.0.1-plugins.8
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/index.cjs +15 -15
- package/dist/index.d.ts +50 -0
- package/dist/index.mjs +3856 -3387
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1065,6 +1065,17 @@ export declare interface CommandApplyResult {
|
|
|
1065
1065
|
readonly revert: Command;
|
|
1066
1066
|
}
|
|
1067
1067
|
|
|
1068
|
+
/**
|
|
1069
|
+
* Descriptor that knows how to deserialize a specific command type.
|
|
1070
|
+
* Each concrete command co-locates its descriptor alongside the command class.
|
|
1071
|
+
*
|
|
1072
|
+
* Serialization is handled uniformly by the registry via `Command.params`.
|
|
1073
|
+
*/
|
|
1074
|
+
declare interface CommandDescriptor<TParams extends Record<string, unknown> = Record<string, unknown>> {
|
|
1075
|
+
readonly type: string;
|
|
1076
|
+
deserialize: (params: TParams, metadata: CommandMetadata) => Command;
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1068
1079
|
/**
|
|
1069
1080
|
* Unique identifier for commands.
|
|
1070
1081
|
*/
|
|
@@ -1084,6 +1095,33 @@ export declare interface CommandMetadata {
|
|
|
1084
1095
|
readonly author: string;
|
|
1085
1096
|
}
|
|
1086
1097
|
|
|
1098
|
+
/**
|
|
1099
|
+
* Central registry mapping command types to their serialization descriptors.
|
|
1100
|
+
*/
|
|
1101
|
+
export declare class CommandRegistry {
|
|
1102
|
+
private readonly descriptors;
|
|
1103
|
+
/**
|
|
1104
|
+
* Register a command descriptor. Throws if the type is already registered.
|
|
1105
|
+
*/
|
|
1106
|
+
register<TParams extends Record<string, unknown>>(descriptor: CommandDescriptor<TParams>): void;
|
|
1107
|
+
/**
|
|
1108
|
+
* Serialize a command to its wire format.
|
|
1109
|
+
*/
|
|
1110
|
+
serialize(command: Command): SerializedCommand;
|
|
1111
|
+
/**
|
|
1112
|
+
* Deserialize a command from its wire format.
|
|
1113
|
+
*/
|
|
1114
|
+
deserialize(data: SerializedCommand): Command;
|
|
1115
|
+
/**
|
|
1116
|
+
* Get all registered command type names.
|
|
1117
|
+
*/
|
|
1118
|
+
getRegisteredTypes(): string[];
|
|
1119
|
+
private getDescriptor;
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
/** Default singleton registry instance. */
|
|
1123
|
+
export declare const commandRegistry: CommandRegistry;
|
|
1124
|
+
|
|
1087
1125
|
/**
|
|
1088
1126
|
* Event types emitted by CommandStackManager.
|
|
1089
1127
|
*/
|
|
@@ -2200,6 +2238,18 @@ export declare const createAlphaValueReader: (data: Dataset, mapping: AesMapping
|
|
|
2200
2238
|
|
|
2201
2239
|
export declare const createColorValueReader: (data: Dataset, mapping: AesMapping) => (observation: Observation) => DataValue;
|
|
2202
2240
|
|
|
2241
|
+
/**
|
|
2242
|
+
* Create command metadata with defaults.
|
|
2243
|
+
*/
|
|
2244
|
+
export declare function createCommandMetadata(options: CreateCommandMetadataOptions): CommandMetadata;
|
|
2245
|
+
|
|
2246
|
+
declare interface CreateCommandMetadataOptions {
|
|
2247
|
+
id?: string;
|
|
2248
|
+
timestamp?: number;
|
|
2249
|
+
description: string;
|
|
2250
|
+
author?: string;
|
|
2251
|
+
}
|
|
2252
|
+
|
|
2203
2253
|
/**
|
|
2204
2254
|
* Builds a compiler instance. Pass `geoms` to register custom (or override built-in) geom
|
|
2205
2255
|
* definitions per-instance — there is no global registry to mutate, so injected geoms never bleed
|