@unyt/datex 0.0.13 → 0.0.15

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.
Files changed (147) hide show
  1. package/esm/datex-web/datex_web.d.ts +93 -2
  2. package/esm/datex-web/datex_web.internal.d.ts +221 -188
  3. package/esm/datex-web/datex_web.internal.d.ts.map +1 -1
  4. package/esm/datex-web/datex_web.internal.js +453 -385
  5. package/esm/datex-web/datex_web.wasm +0 -0
  6. package/esm/datex-web/types/decompiler/options.d.ts +17 -0
  7. package/esm/datex-web/types/decompiler/options.d.ts.map +1 -0
  8. package/esm/datex-web/types/decompiler/options.js +4 -0
  9. package/esm/datex-web/types/disassembler/options.d.ts +6 -0
  10. package/esm/datex-web/types/disassembler/options.d.ts.map +1 -0
  11. package/esm/datex-web/types/disassembler/options.js +4 -0
  12. package/esm/datex-web/types/network/com_hub/managers/socket_manager.d.ts +9 -0
  13. package/esm/datex-web/types/network/com_hub/managers/socket_manager.d.ts.map +1 -0
  14. package/esm/datex-web/types/network/com_hub/managers/socket_manager.js +4 -0
  15. package/esm/datex-web/types/network/com_hub/metadata.d.ts +20 -0
  16. package/esm/datex-web/types/network/com_hub/metadata.d.ts.map +1 -0
  17. package/esm/datex-web/types/network/com_hub/metadata.js +4 -0
  18. package/esm/datex-web/types/network/com_hub/mod.d.ts +6 -0
  19. package/esm/datex-web/types/network/com_hub/mod.d.ts.map +1 -0
  20. package/esm/datex-web/types/network/com_hub/mod.js +4 -0
  21. package/esm/datex-web/types/network/com_hub/network_tracing.d.ts +23 -0
  22. package/esm/datex-web/types/network/com_hub/network_tracing.d.ts.map +1 -0
  23. package/esm/datex-web/types/network/com_hub/network_tracing.js +4 -0
  24. package/esm/datex-web/types/network/com_hub.d.ts +8 -0
  25. package/esm/datex-web/types/network/com_hub.d.ts.map +1 -0
  26. package/esm/datex-web/types/network/com_hub.js +4 -0
  27. package/esm/datex-web/types/network/com_interfaces/com_interface/properties.d.ts +27 -0
  28. package/esm/datex-web/types/network/com_interfaces/com_interface/properties.d.ts.map +1 -0
  29. package/esm/datex-web/types/network/com_interfaces/com_interface/properties.js +4 -0
  30. package/esm/datex-web/types/network/com_interfaces/default_setup_data/http_common.d.ts +10 -0
  31. package/esm/datex-web/types/network/com_interfaces/default_setup_data/http_common.d.ts.map +1 -0
  32. package/esm/datex-web/types/network/com_interfaces/default_setup_data/http_common.js +4 -0
  33. package/esm/datex-web/types/network/com_interfaces/default_setup_data/websocket/websocket_server.d.ts +6 -0
  34. package/esm/datex-web/types/network/com_interfaces/default_setup_data/websocket/websocket_server.d.ts.map +1 -0
  35. package/esm/datex-web/types/network/com_interfaces/default_setup_data/websocket/websocket_server.js +4 -0
  36. package/esm/datex-web/types/runtime/config.d.ts +16 -0
  37. package/esm/datex-web/types/runtime/config.d.ts.map +1 -0
  38. package/esm/datex-web/types/runtime/config.js +4 -0
  39. package/esm/default.d.ts.map +1 -1
  40. package/esm/default.js +2 -0
  41. package/esm/deno.json +73 -17
  42. package/esm/dif/core.d.ts +36 -39
  43. package/esm/dif/core.d.ts.map +1 -1
  44. package/esm/dif/core.js +33 -53
  45. package/esm/dif/dif-handler.d.ts +58 -101
  46. package/esm/dif/dif-handler.d.ts.map +1 -1
  47. package/esm/dif/dif-handler.js +417 -345
  48. package/esm/dif/display.d.ts +14 -5
  49. package/esm/dif/display.d.ts.map +1 -1
  50. package/esm/dif/display.js +89 -39
  51. package/esm/dif/helpers/mod.d.ts +6 -0
  52. package/esm/dif/helpers/mod.d.ts.map +1 -0
  53. package/esm/dif/helpers/mod.js +5 -0
  54. package/esm/dif/helpers/typed-integer.d.ts +14 -0
  55. package/esm/dif/helpers/typed-integer.d.ts.map +1 -0
  56. package/esm/dif/helpers/typed-integer.js +37 -0
  57. package/esm/dif/js-lib.d.ts +14 -1
  58. package/esm/dif/js-lib.d.ts.map +1 -1
  59. package/esm/dif/js-lib.js +19 -1
  60. package/esm/dif/mod.d.ts +2 -2
  61. package/esm/dif/mod.d.ts.map +1 -1
  62. package/esm/dif/mod.js +2 -2
  63. package/esm/dif/type-registry.d.ts +30 -21
  64. package/esm/dif/type-registry.d.ts.map +1 -1
  65. package/esm/dif/type-registry.js +45 -33
  66. package/esm/dif/types/mod.d.ts +9 -0
  67. package/esm/dif/types/mod.d.ts.map +1 -0
  68. package/esm/dif/types/mod.js +8 -0
  69. package/esm/dif/types/type.d.ts +91 -0
  70. package/esm/dif/types/type.d.ts.map +1 -0
  71. package/esm/dif/types/type.js +33 -0
  72. package/esm/dif/types/update.d.ts +63 -0
  73. package/esm/dif/types/update.d.ts.map +1 -0
  74. package/esm/dif/types/update.js +16 -0
  75. package/esm/dif/types/value.d.ts +62 -0
  76. package/esm/dif/types/value.d.ts.map +1 -0
  77. package/esm/dif/types/value.js +1 -0
  78. package/esm/dif/update.d.ts +20 -0
  79. package/esm/dif/update.d.ts.map +1 -0
  80. package/esm/dif/update.js +41 -0
  81. package/esm/dif/utils.d.ts +8 -0
  82. package/esm/dif/utils.d.ts.map +1 -0
  83. package/esm/dif/utils.js +67 -0
  84. package/esm/lib/js-core-types/array.d.ts +3 -0
  85. package/esm/lib/js-core-types/array.d.ts.map +1 -0
  86. package/esm/lib/js-core-types/array.js +175 -0
  87. package/esm/lib/js-core-types/map.d.ts +15 -0
  88. package/esm/lib/js-core-types/map.d.ts.map +1 -0
  89. package/esm/lib/js-core-types/map.js +88 -0
  90. package/esm/lib/js-core-types/mod.d.ts +8 -0
  91. package/esm/lib/js-core-types/mod.d.ts.map +1 -0
  92. package/esm/lib/js-core-types/mod.js +7 -0
  93. package/esm/lib/mod.d.ts +8 -0
  94. package/esm/lib/mod.d.ts.map +1 -0
  95. package/esm/lib/mod.js +7 -0
  96. package/esm/lib/special-core-types/endpoint.d.ts.map +1 -1
  97. package/esm/lib/special-core-types/mod.d.ts +9 -0
  98. package/esm/lib/special-core-types/mod.d.ts.map +1 -0
  99. package/esm/lib/special-core-types/mod.js +8 -0
  100. package/esm/lib/special-core-types/range.d.ts +26 -0
  101. package/esm/lib/special-core-types/range.d.ts.map +1 -0
  102. package/esm/lib/special-core-types/range.js +46 -0
  103. package/esm/lib/special-core-types/tagged.d.ts +17 -0
  104. package/esm/lib/special-core-types/tagged.d.ts.map +1 -0
  105. package/esm/lib/special-core-types/tagged.js +37 -0
  106. package/esm/lib/special-core-types/undefined.d.ts +7 -0
  107. package/esm/lib/special-core-types/undefined.d.ts.map +1 -0
  108. package/esm/lib/special-core-types/undefined.js +28 -0
  109. package/esm/mod.d.ts +3 -1
  110. package/esm/mod.d.ts.map +1 -1
  111. package/esm/mod.js +3 -1
  112. package/esm/network/com-hub.d.ts +28 -1
  113. package/esm/network/com-hub.d.ts.map +1 -1
  114. package/esm/network/com-hub.js +6 -2
  115. package/esm/network/interfaces/websocket-server-base.d.ts +1 -1
  116. package/esm/network/interfaces/websocket-server-base.d.ts.map +1 -1
  117. package/esm/network/interfaces/websocket-server-base.js +8 -7
  118. package/esm/network/interfaces/websocket-server-deno.d.ts +1 -1
  119. package/esm/network/interfaces/websocket-server-deno.d.ts.map +1 -1
  120. package/esm/repl/mod.d.ts +8 -0
  121. package/esm/repl/mod.d.ts.map +1 -0
  122. package/esm/repl/mod.js +31 -0
  123. package/esm/runtime/runtime.d.ts +43 -18
  124. package/esm/runtime/runtime.d.ts.map +1 -1
  125. package/esm/runtime/runtime.js +55 -32
  126. package/esm/{refs/ref.d.ts → shared-container/base-shared-container.d.ts} +13 -5
  127. package/esm/shared-container/base-shared-container.d.ts.map +1 -0
  128. package/esm/shared-container/base-shared-container.js +95 -0
  129. package/esm/shared-container/mod.d.ts +36 -0
  130. package/esm/shared-container/mod.d.ts.map +1 -0
  131. package/esm/shared-container/mod.js +29 -0
  132. package/esm/shared-container/owned.d.ts +33 -0
  133. package/esm/shared-container/owned.d.ts.map +1 -0
  134. package/esm/shared-container/owned.js +60 -0
  135. package/esm/shared-container/reference.d.ts +31 -0
  136. package/esm/shared-container/reference.d.ts.map +1 -0
  137. package/esm/shared-container/reference.js +64 -0
  138. package/esm/utils/devtools-formatter.js +24 -2
  139. package/esm/utils/option.d.ts +17 -0
  140. package/esm/utils/option.d.ts.map +1 -0
  141. package/esm/utils/option.js +54 -0
  142. package/package.json +1 -1
  143. package/esm/dif/definitions.d.ts +0 -134
  144. package/esm/dif/definitions.d.ts.map +0 -1
  145. package/esm/dif/definitions.js +0 -38
  146. package/esm/refs/ref.d.ts.map +0 -1
  147. package/esm/refs/ref.js +0 -60
@@ -1,15 +1,30 @@
1
- import type { JSRuntime, RuntimeDIFHandle } from "../datex.js";
2
- import { Ref } from "../refs/ref.js";
3
- import { type DIFPointerAddress, type DIFProperty, DIFSharedValueMutability, type DIFTypeDefinition, type DIFUpdate, type DIFUpdateData, type DIFValue, type DIFValueContainer, type ObserveOptions } from "./definitions.js";
1
+ /**
2
+ * @module DIF Handler
3
+ * Represents the main interface for interacting with the DATEX Core via DIF from JavaScript.
4
+ */
5
+ import type { JSDIFInterface, JSRuntime } from "../datex.js";
6
+ import { type DIFProperty, type DIFTypeDefinition, type DIFUpdate, type DIFUpdateData, type DIFValue, type DIFValueContainer, type ObserveOptions } from "./types/mod.js";
4
7
  import { type TypeBinding, TypeRegistry } from "./type-registry.js";
8
+ import { SharedContainerMutability } from "../shared-container/base-shared-container.js";
9
+ import type { AsSharedMaybeOwned, PointerAddress } from "../shared-container/mod.js";
10
+ import { type AsShared, BaseSharedContainer, type SharedRef } from "../shared-container/mod.js";
11
+ import { DIFSharedContainerOwnership } from "./types/type.js";
12
+ import type { DIFUpdateReturn } from "./types/update.js";
5
13
  export declare const IS_PROXY_ACCESS: unique symbol;
6
14
  export type CustomReferenceMetadata = Record<string | symbol, unknown> & {
7
15
  [IS_PROXY_ACCESS]?: boolean;
8
16
  };
9
17
  export type ReferenceMetadata<M extends CustomReferenceMetadata> = {
10
- address: string;
18
+ address: PointerAddress;
11
19
  customMetadata: M;
12
20
  };
21
+ export type CachedSharedContainer = SharedRef<object, SharedContainerMutability> | BaseSharedContainer<unknown, SharedContainerMutability>;
22
+ /**
23
+ * A value that can either be a direct JS value, or a shared value container.
24
+ * It appears on the same level, as the Value Container from the Rust POV and can represent a local value (JS) or a shared value.
25
+ * Each ValueContainer from Rust can be represented as Value<T> on the JS side.
26
+ */
27
+ type Value<T> = T | AsShared<T, SharedContainerMutability>;
13
28
  /**
14
29
  * The DIFHandler class provides methods to interact with the DATEX Core DIF runtime,
15
30
  * including executing Datex scripts, creating and managing references, and observing changes.
@@ -24,9 +39,9 @@ export declare class DIFHandler {
24
39
  get _observers(): Map<string, Map<number, (value: DIFUpdateData) => void>>;
25
40
  /**
26
41
  * Internal property
27
- * @returns The RuntimeDIFHandle instance.
42
+ * @returns The {@link JSDIFInterface} instance.
28
43
  */
29
- get _handle(): RuntimeDIFHandle;
44
+ get _handle(): JSDIFInterface;
30
45
  /**
31
46
  * Internal property
32
47
  * @returns The transceiver ID of the DIF client.
@@ -36,7 +51,6 @@ export declare class DIFHandler {
36
51
  /**
37
52
  * Creates a new DIFHandler instance.
38
53
  * @param runtime - The JSRuntime instance for executing Datex scripts.
39
- * @param pointerCache - The PointerCache instance for managing object pointers. If not provided, a new PointerCache will be created.
40
54
  */
41
55
  constructor(runtime: JSRuntime);
42
56
  /**
@@ -46,7 +60,7 @@ export declare class DIFHandler {
46
60
  * @returns A Promise that resolves to the execution result as a DIFContainer.
47
61
  * @throws If an error occurs during execution.
48
62
  */
49
- executeDIF(datexScript: string, values?: unknown[] | null): Promise<DIFValueContainer>;
63
+ executeDIF(datexScript: string, values?: unknown[] | null): Promise<DIFValueContainer | undefined>;
50
64
  /**
51
65
  * Executes a Datex script synchronously and returns the result as a DIFContainer.
52
66
  * @param datexScript - The Datex script source code to execute.
@@ -54,7 +68,7 @@ export declare class DIFHandler {
54
68
  * @returns The execution result as a DIFContainer.
55
69
  * @throws If an error occurs during execution.
56
70
  */
57
- executeSyncDIF(datexScript: string, values?: unknown[] | null): DIFValueContainer;
71
+ executeSyncDIF(datexScript: string, values?: unknown[] | null): DIFValueContainer | undefined;
58
72
  /**
59
73
  * Creates a new shared value for the specified DIF value.
60
74
  * @param difValueContainer - The DIFValueContainer value to create a pointer for.
@@ -62,13 +76,13 @@ export declare class DIFHandler {
62
76
  * @param mutability - The mutability of the pointer.
63
77
  * @returns The created pointer address.
64
78
  */
65
- createSharedValueFromDIFValue(difValueContainer: DIFValueContainer, allowedType: (DIFTypeDefinition | null) | undefined, mutability: DIFSharedValueMutability): string;
79
+ constructSharedValue(difValueContainer: DIFValueContainer, mutability?: SharedContainerMutability, allowedType?: DIFTypeDefinition | null): PointerAddress;
66
80
  /**
67
81
  * Updates the DIF value at the specified address.
68
82
  * @param address - The address of the DIF value to update.
69
- * @param dif - The DIFUpdate object containing the update information.
83
+ * @param update_data - The DIFUpdate object containing the update information.
70
84
  */
71
- updateReference(address: string, dif: DIFUpdateData): void;
85
+ updateSharedValue(address: PointerAddress, update_data: DIFUpdateData): DIFUpdateReturn;
72
86
  /**
73
87
  * Registers an observer callback for changes to the DIF value at the specified address
74
88
  * directly on the DATEX core runtime.
@@ -80,7 +94,7 @@ export declare class DIFHandler {
80
94
  * @returns An observer ID that can be used to unregister the observer.
81
95
  * @throws If the pointer is final.
82
96
  */
83
- observePointerBindDirect(address: string, callback: (value: DIFUpdate) => void, options?: ObserveOptions): number;
97
+ observeSharedValueBindDirect(address: PointerAddress, callback: (value: DIFUpdate) => void, options?: ObserveOptions): number;
84
98
  /**
85
99
  * Updates the observe options for a registered observer.
86
100
  * @param address - The address of the DIF value being observed.
@@ -93,13 +107,13 @@ export declare class DIFHandler {
93
107
  * @param address - The address of the DIF value being observed.
94
108
  * @param observerId - The observer ID returned by the observePointer method.
95
109
  */
96
- enableOwnUpdatesPropagation(address: string, observerId: number): void;
110
+ enableOwnUpdatesPropagation(address: PointerAddress, observerId: number): void;
97
111
  /**
98
112
  * Disables propagation of own updates for a registered observer.
99
113
  * @param address - The address of the DIF value being observed.
100
114
  * @param observerId - The observer ID returned by the observePointer method.
101
115
  */
102
- disableOwnUpdatesPropagation(address: string, observerId: number): void;
116
+ disableOwnUpdatesPropagation(address: PointerAddress, observerId: number): void;
103
117
  /**
104
118
  * Unregisters an observer that was registered directly on the DATEX core runtime
105
119
  * with the observePointerBindDirect method.
@@ -107,7 +121,7 @@ export declare class DIFHandler {
107
121
  * @param address - The address of the DIF value being observed.
108
122
  * @param observerId - The observer ID returned by the observePointer method.
109
123
  */
110
- unobserveReferenceBindDirect(address: string, observerId: number): void;
124
+ unobserveSharedValueBindDirect(address: PointerAddress, observerId: number): void;
111
125
  /**
112
126
  * Registers a local observer callback for changes to the DIF value at the specified address.
113
127
  * The callback will be invoked whenever the value at the address is updated.
@@ -119,41 +133,21 @@ export declare class DIFHandler {
119
133
  * @returns An observer ID that can be used to unregister the observer.
120
134
  * @throws If the pointer is final.
121
135
  */
122
- observePointer(address: string, callback: (value: DIFUpdateData) => void): number;
136
+ observePointer(address: PointerAddress, callback: (value: DIFUpdateData) => void): number;
123
137
  /**
124
138
  * Unregisters an observer that was registered with the observePointer method.
125
139
  * @param address - The address of the DIF value being observed.
126
140
  * @param observerId - The observer ID returned by the observePointer method.
127
141
  * @returns True if the observer was successfully unregistered, false otherwise.
128
142
  */
129
- unobservePointer(address: string, observerId: number): boolean;
143
+ unobservePointer(address: PointerAddress, observerId: number): boolean;
130
144
  /**
131
145
  * Resolves a DIFValue to its corresponding JS value.
132
146
  * This function handles core types and custom types (not yet implemented).
133
147
  * It returns the resolved value as the specified type T.
134
148
  * @param value
135
149
  */
136
- resolveDIFValue<T extends unknown>(value: DIFValue): T | Promise<T>;
137
- /**
138
- * Converts an array of Promises or resolved values to either a Promise of an array of resolved values,
139
- * or an array of resolved values if all values are already resolved.
140
- */
141
- promiseAllOrSync<T>(values: (T | Promise<T>)[]): Promise<T[]> | T[];
142
- /**
143
- * Converts an object with values that may be Promises to either a Promise of an object with resolved values,
144
- * or an object with resolved values if all values are already resolved.
145
- */
146
- promiseFromObjectOrSync<T>(values: {
147
- [key: string]: T | Promise<T>;
148
- }): Promise<{
149
- [key: string]: T;
150
- }> | {
151
- [key: string]: T;
152
- };
153
- /**
154
- * Maps a value or Promise of a value to another value or Promise of a value using the provided onfulfilled function.
155
- */
156
- mapPromise<T, N>(value: T | Promise<T>, onfulfilled: (value: T) => N): N | Promise<N>;
150
+ resolveDIFValue<T extends unknown>(value: DIFValue): T;
157
151
  /**
158
152
  * Resolves a DIFValueContainer (either a DIFValue or a pointer address) to its corresponding JS value.
159
153
  * If the container contains pointers that are not yet loaded in memory, it returns a Promise that resolves to the value.
@@ -161,20 +155,11 @@ export declare class DIFHandler {
161
155
  * @param value - The DIFValueContainer to resolve.
162
156
  * @returns The resolved value as type T, or a Promise that resolves to type T.
163
157
  */
164
- resolveDIFValueContainer<T extends unknown>(value: DIFValueContainer): T | Promise<T>;
165
- /**
166
- * Synchronous version of resolveDIFValueContainer.
167
- * This method can only be used if the value only contains pointer addresses that are already loaded in memory -
168
- * otherwise, use the asynchronous `resolveDIFValueContainer` method instead.
169
- * @param value - The DIFValueContainer to resolve.
170
- * @returns The resolved value as type T.
171
- * @throws If the resolution would require asynchronous operations.
172
- */
173
- resolveDIFValueContainerSync<T extends unknown>(value: DIFValueContainer): T;
158
+ resolveDIFValueContainer<T>(value: DIFValueContainer): T;
174
159
  /**
175
160
  * Resolves a DIFProperty to its corresponding JS value.
176
161
  */
177
- resolveDIFPropertySync<T extends unknown>(property: DIFProperty): T;
162
+ resolveDIFProperty<T extends unknown>(property: DIFProperty): Value<T>;
178
163
  /**
179
164
  * Resolves a pointer address to its corresponding JS value.
180
165
  * If the pointer address is not yet loaded in memory, it returns a Promise that resolves to the value.
@@ -182,22 +167,13 @@ export declare class DIFHandler {
182
167
  * @param address - The pointer address to resolve.
183
168
  * @returns The resolved value as type T, or a Promise that resolves to type T.
184
169
  */
185
- resolvePointerAddress<T extends unknown>(address: string): Promise<T> | T;
186
- /**
187
- * Resolves a pointer address to its corresponding JS value synchronously.
188
- * If the pointer address is not yet loaded in memory, it returns a Promise that resolves to the value.
189
- * Otherwise, it returns the resolved value directly.
190
- * @param address - The pointer address to resolve.
191
- * @returns The resolved value as type T, or a Promise that resolves to type T.
192
- * @throws If the resolution would require asynchronous operations.
193
- */
194
- resolvePointerAddressSync<T extends unknown>(address: string): T;
170
+ resolvePointerAddress<T extends unknown>(ownership: DIFSharedContainerOwnership, address: PointerAddress): AsShared<T, SharedContainerMutability>;
195
171
  /**
196
172
  * Retrieves the original value from a proxy value if available
197
173
  * @param proxy
198
174
  * @returns
199
175
  */
200
- getOriginalValueFromProxy<T extends WeakKey>(proxy: T): T | null;
176
+ getOriginalValueFromProxy<T extends WeakKey>(proxy: CachedSharedContainer & T): T | null;
201
177
  /**
202
178
  * Retrieves the proxy value for a given original value if available
203
179
  * @param original
@@ -210,15 +186,11 @@ export declare class DIFHandler {
210
186
  * @param values
211
187
  */
212
188
  convertToDIFValues<T extends unknown[]>(values: T | null): DIFValueContainer[] | null;
213
- /**
214
- * Returns true if the given address is within the specified address range.
215
- */
216
- protected isPointerAddressInAdresses(address: DIFPointerAddress, range: Set<string>): boolean;
217
189
  /**
218
190
  * Initializes a reference with the given value and mutability, by
219
191
  * adding a proxy wrapper if necessary, and setting up observation and caching on the JS side.
220
192
  */
221
- protected initReference<T>(pointerAddress: string, value: T, mutability: DIFSharedValueMutability, allowedType?: DIFTypeDefinition | null): T | Ref<T>;
193
+ protected initSharedValue<T, Mutability extends SharedContainerMutability>(pointerAddress: PointerAddress, value: Value<T>, mutability: Mutability, ownership: DIFSharedContainerOwnership, allowedType?: DIFTypeDefinition): AsShared<T, Mutability>;
222
194
  /**
223
195
  * Handles a pointer update received from the DATEX core runtime.
224
196
  * for non-primitive values.
@@ -227,7 +199,7 @@ export declare class DIFHandler {
227
199
  * @param update - The DIFUpdateData containing the update information.
228
200
  * @returns True if the pointer was found and updated, false otherwise.
229
201
  */
230
- protected handlePointerUpdate<T extends WeakKey>(pointerAddress: string, value: T, update: DIFUpdateData, typeBinding: TypeBinding<T> | null): boolean;
202
+ protected handlePointerUpdate<T extends object>(pointerAddress: string, value: T, update: DIFUpdateData, typeBinding: TypeBinding<T> | null): boolean;
231
203
  /**
232
204
  * Handles a pointer update received from the DATEX core runtime.
233
205
  * for primitive values (typeBinding not supported).
@@ -236,99 +208,84 @@ export declare class DIFHandler {
236
208
  * @param update - The DIFUpdateData containing the update information.
237
209
  * @returns True if the pointer was found and updated, false otherwise.
238
210
  */
239
- protected handlePointerUpdate<T>(pointerAddress: string, value: T, update: DIFUpdateData, typeBinding: null): boolean;
211
+ protected handlePointerUpdate<T>(pointerAddress: PointerAddress, value: T, update: DIFUpdateData, typeBinding: null): boolean;
240
212
  /**
241
213
  * Caches the given reference value with the given address in the JS side cache.
242
214
  * The reference must already be wrapped if necessary.
243
215
  */
244
- protected cacheWrappedReferenceValue(address: string, originalValue: unknown, proxiedValue: WeakKey, observerId: number | null, metadata?: CustomReferenceMetadata): void;
245
- protected getCachedReference(address: string): WeakKey | undefined;
216
+ protected cacheWrappedReferenceValue(address: PointerAddress, ownership: DIFSharedContainerOwnership, originalValue: unknown, proxiedValue: CachedSharedContainer, observerId: number | null, metadata?: CustomReferenceMetadata): void;
217
+ protected getCachedStateForSharedContainer<T>(address: PointerAddress, ownership: DIFSharedContainerOwnership): AsShared<T, SharedContainerMutability> | "not_cached" | "insufficient_ownership";
246
218
  /**
247
219
  * Creates a new reference containg the given JS value.
248
220
  * The returned value is a proxy object that behaves like the original object,
249
221
  * but also propagates changes between JS and the DATEX runtime.
250
222
  * If a reference for the given value already exists, an error is thrown.
251
223
  */
252
- createTransparentReference<V, M extends DIFSharedValueMutability = typeof DIFSharedValueMutability.Mutable>(value: V, allowedType?: DIFTypeDefinition | null, mutability?: M): PointerOut<V, M>;
224
+ createSharedValueFromJSValue<V, M extends SharedContainerMutability>(value: V, allowedType?: DIFTypeDefinition | null, mutability?: M): AsSharedMaybeOwned<V, M>;
253
225
  protected isPrimitiveValue(value: unknown): value is null | undefined | boolean | number | bigint | string | symbol;
254
- protected isWeakKey(value: unknown): value is WeakKey;
226
+ protected isWeakKey(value: unknown): value is CachedSharedContainer;
255
227
  /**
256
228
  * Wraps a given JS value in a Ref proxy if necessary.
257
229
  */
258
- protected wrapJSValue<T>(value: T, pointerAddress: string, _type?: DIFTypeDefinition | null): (T | Ref<unknown>) & WeakKey;
259
- private isRef;
230
+ protected wrapJSValue<T>(value: T, pointerAddress: PointerAddress, mutability: SharedContainerMutability, _type?: DIFTypeDefinition | null): CachedSharedContainer;
231
+ private isBaseSharedContainer;
260
232
  private wrapJSObjectInProxy;
261
233
  /**
262
234
  * Returns the pointer address for the given value if it is already cached, or null otherwise.
263
235
  */
264
- getPointerAddressForValue<T extends WeakKey>(value: T): string | null;
236
+ getPointerAddressForValue(value: CachedSharedContainer): PointerAddress | null;
265
237
  /**
266
238
  * Returns the reference metadata for the given value if it is registered.
267
239
  * The caller must ensure that the correct type M is used and the reference is already registered.
268
240
  * If the reference is not found, an error is thrown.
269
241
  */
270
- getReferenceMetadataUnsafe<M extends CustomReferenceMetadata, T extends WeakKey>(value: T): ReferenceMetadata<M>;
242
+ getReferenceMetadataUnsafe<M extends CustomReferenceMetadata>(value: CachedSharedContainer): ReferenceMetadata<M>;
271
243
  /**
272
244
  * Returns the reference metadata for the given value if it is registered, or null otherwise.
273
245
  */
274
- tryGetReferenceMetadata<M extends CustomReferenceMetadata, T extends WeakKey>(value: T): ReferenceMetadata<M> | null;
275
- isReference(value: WeakKey): boolean;
276
- getReferenceProxy<T extends WeakKey>(value: T): T | null;
246
+ tryGetReferenceMetadata<M extends CustomReferenceMetadata>(value: CachedSharedContainer): ReferenceMetadata<M> | null;
277
247
  /**
278
248
  * Converts a given JS value to its DIFValueContainer representation.
279
249
  * This method can be called statically or with an instance to use the instance's DIFHandler context.
280
250
  * NOTE: When called statically, there is no cache for already registered references, meaning that new references will be created
281
251
  * for the same object each time this method is called.
282
252
  */
283
- static convertJSValueToDIFValueContainer<T extends unknown>(value: T, difHandlerInstance?: DIFHandler): DIFValueContainer;
253
+ static convertJSValueToDIFValueContainer<T extends unknown>(value: T, difHandlerInstance?: DIFHandler, forceExplicitFormat?: boolean): DIFValueContainer<T>;
284
254
  /**
285
255
  * Instance method wrapper for static convertJSValueToDIFValueContainer
286
256
  * Converts a given JS value to its DIFValueContainer representation.
287
257
  * @param value
288
258
  */
289
- convertJSValueToDIFValueContainer<T extends unknown>(value: T): DIFValueContainer;
259
+ convertJSValueToDIFValueContainer<T extends unknown>(value: T): DIFValueContainer<T>;
290
260
  /** DIF update handler utilities */
291
261
  /**
292
262
  * Triggers a 'set' update for the given pointer address, key and value.
293
263
  */
294
- triggerSet<K, V>(pointerAddress: string, key: K, value: V): void;
264
+ triggerSet<K, V>(pointerAddress: PointerAddress, key: K, value: V): void;
295
265
  /**
296
266
  * Triggers a 'set' update for the given pointer address, index and value.
297
267
  */
298
- triggerIndexSet<V>(pointerAddress: string, index: number | bigint, value: V): void;
268
+ triggerIndexSet<V>(pointerAddress: PointerAddress, index: number | bigint, value: V): void;
299
269
  /**
300
270
  * Triggers an 'append' update for the given pointer address and value.
301
271
  */
302
- triggerAppend<V>(pointerAddress: string, value: V): void;
272
+ triggerAppend<V>(pointerAddress: PointerAddress, value: V): void;
303
273
  /**
304
274
  * Triggers a 'replace' update for the given pointer address and key.
305
275
  */
306
- triggerReplace<V>(pointerAddress: string, value: V): void;
276
+ triggerReplace<V>(pointerAddress: PointerAddress, value: V): void;
307
277
  /**
308
278
  * Triggers a 'delete' update for the given pointer address and key.
309
279
  */
310
- triggerDelete<K>(pointerAddress: string, key: K): void;
280
+ triggerDelete<K>(pointerAddress: PointerAddress, key: K): void;
311
281
  /**
312
282
  * Triggers a 'clear' update for the given pointer address.
313
283
  */
314
- triggerClear(pointerAddress: string): void;
284
+ triggerClear(pointerAddress: PointerAddress): void;
315
285
  /**
316
286
  * Triggers a 'list splice' update for the given pointer address.
317
287
  */
318
- triggerListSplice<V>(pointerAddress: string, start: number, deleteCount: number, items: V[]): void;
288
+ triggerListSplice<V>(pointerAddress: PointerAddress, start: number, deleteCount: number, items: V[]): void;
319
289
  }
320
- type PrimitiveValue = string | number | boolean | bigint | symbol;
321
- type WidenLiteral<T> = T extends string ? string : T extends number ? number : T extends boolean ? boolean : T extends bigint ? bigint : T extends symbol ? symbol : T;
322
- /** A type representing an assignable reference or a plain value **/
323
- export type AssignableRef<T> = Ref<T> | T & {
324
- value?: T;
325
- };
326
- type Builtins = ((...args: unknown[]) => unknown) | Date | RegExp | Map<unknown, unknown> | Set<unknown> | WeakMap<WeakKey, unknown> | WeakSet<WeakKey> | Array<unknown>;
327
- type IsPlainObject<T> = T extends Builtins ? false : T extends object ? true : false;
328
- export type PointerOut<V, M extends DIFSharedValueMutability> = V extends Ref<infer U> ? M extends typeof DIFSharedValueMutability.Immutable ? Ref<U> : AssignableRef<U> : IsPlainObject<V> extends true ? (M extends typeof DIFSharedValueMutability.Immutable ? {
329
- readonly [K in keyof V]: V[K];
330
- } : {
331
- [K in keyof V]: V[K];
332
- }) : V extends PrimitiveValue ? Ref<M extends typeof DIFSharedValueMutability["Immutable"] ? V : WidenLiteral<V>> : V;
333
290
  export {};
334
291
  //# sourceMappingURL=dif-handler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dif-handler.d.ts","sourceRoot":"","sources":["../../src/dif/dif-handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAErC,OAAO,EAIH,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAEhB,wBAAwB,EACxB,KAAK,iBAAiB,EAEtB,KAAK,SAAS,EACd,KAAK,aAAa,EAElB,KAAK,QAAQ,EACb,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACtB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,KAAK,WAAW,EAAE,YAAY,EAAE,MAAM,oBAAoB,CA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