@hydranium/protocol 1.0.0-next.188 → 1.0.0-next.189

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.
@@ -1 +1 @@
1
- {"version":3,"file":"data-protocol-methods.d.ts","sourceRoot":"","sources":["../../src/data/data-protocol-methods.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAalF,8DAA8D;AAC9D,eAAO,MAAM,gCAAgC,oQAa6C,CAAC;AAE3F,6DAA6D;AAC7D,eAAO,MAAM,+BAA+B,8CAE3C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,uSAG6C,CAAC;AAEvF;;;;;GAKG;AACH,eAAO,MAAM,iCAAiC,0EAI6C,CAAC;AAE5F,mEAAmE;AACnE,eAAO,MAAM,gCAAgC,sHAM6C,CAAC;AAE3F,kEAAkE;AAClE,eAAO,MAAM,+BAA+B,gCAA+F,CAAC;AAE5I;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,2IAG6C,CAAC"}
1
+ {"version":3,"file":"data-protocol-methods.d.ts","sourceRoot":"","sources":["../../src/data/data-protocol-methods.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAalF,8DAA8D;AAC9D,eAAO,MAAM,gCAAgC,oQAa6C,CAAC;AAE3F,6DAA6D;AAC7D,eAAO,MAAM,+BAA+B,8CAE3C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,uSAG6C,CAAC;AAEvF;;;;;GAKG;AACH,eAAO,MAAM,iCAAiC,0EAI4B,CAAC;AAE3E,mEAAmE;AACnE,eAAO,MAAM,gCAAgC,sHAM6C,CAAC;AAE3F,kEAAkE;AAClE,eAAO,MAAM,+BAA+B,gCAA+F,CAAC;AAE5I;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,2IAG6C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"data-protocol-methods.js","sourceRoot":"","sources":["../../src/data/data-protocol-methods.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;AAalF,8DAA8D;AACjD,QAAA,gCAAgC,GAAG;IAC7C,eAAe;IACf,cAAc;IACd,qBAAqB;IACrB,sBAAsB;IACtB,mBAAmB;IACnB,oBAAoB;IACpB,kBAAkB;IAClB,qBAAqB;IACrB,mBAAmB;IACnB,oBAAoB;IACpB,sBAAsB;IACtB,cAAc;CACyE,CAAC;AAE3F,6DAA6D;AAChD,QAAA,+BAA+B,GAAG,CAAC,aAAa,EAAE,kBAAkB,CAEhF,CAAC;AAEF;;;;;GAKG;AACU,QAAA,4BAA4B,GAAG;IACzC,GAAG,QAAA,gCAAgC;IACnC,GAAG,QAAA,+BAA+B;CACiD,CAAC;AAEvF;;;;;GAKG;AACU,QAAA,iCAAiC,GAAG;IAC9C,yBAAyB;IACzB,kBAAkB;IAClB,cAAc;CAC0E,CAAC;AAE5F,mEAAmE;AACtD,QAAA,gCAAgC,GAAG;IAC7C,mBAAmB;IACnB,iBAAiB;IACjB,wBAAwB;IACxB,mBAAmB;IACnB,kBAAkB;CACqE,CAAC;AAE3F,kEAAkE;AACrD,QAAA,+BAA+B,GAAG,CAAC,mBAAmB,CAAwE,CAAC;AAE5I;;;;;;GAMG;AACU,QAAA,4BAA4B,GAAG;IACzC,GAAG,QAAA,gCAAgC;IACnC,GAAG,QAAA,+BAA+B;CACiD,CAAC"}
1
+ {"version":3,"file":"data-protocol-methods.js","sourceRoot":"","sources":["../../src/data/data-protocol-methods.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;AAalF,8DAA8D;AACjD,QAAA,gCAAgC,GAAG;IAC7C,eAAe;IACf,cAAc;IACd,qBAAqB;IACrB,sBAAsB;IACtB,mBAAmB;IACnB,oBAAoB;IACpB,kBAAkB;IAClB,qBAAqB;IACrB,mBAAmB;IACnB,oBAAoB;IACpB,sBAAsB;IACtB,cAAc;CACyE,CAAC;AAE3F,6DAA6D;AAChD,QAAA,+BAA+B,GAAG,CAAC,aAAa,EAAE,kBAAkB,CAEhF,CAAC;AAEF;;;;;GAKG;AACU,QAAA,4BAA4B,GAAG;IACzC,GAAG,QAAA,gCAAgC;IACnC,GAAG,QAAA,+BAA+B;CACiD,CAAC;AAEvF;;;;;GAKG;AACU,QAAA,iCAAiC,GAAG;IAC9C,yBAAyB;IACzB,kBAAkB;IAClB,cAAc;CACyD,CAAC;AAE3E,mEAAmE;AACtD,QAAA,gCAAgC,GAAG;IAC7C,mBAAmB;IACnB,iBAAiB;IACjB,wBAAwB;IACxB,mBAAmB;IACnB,kBAAkB;CACqE,CAAC;AAE3F,kEAAkE;AACrD,QAAA,+BAA+B,GAAG,CAAC,mBAAmB,CAAwE,CAAC;AAE5I;;;;;;GAMG;AACU,QAAA,4BAA4B,GAAG;IACzC,GAAG,QAAA,gCAAgC;IACnC,GAAG,QAAA,+BAA+B;CACiD,CAAC"}
@@ -229,11 +229,11 @@ export type ProjectOf<TServer> = TServer extends ProjectServerProtocol<infer TPr
229
229
  * source/URI (an `ElementSource` with no URI resolves to the sole
230
230
  * registered language; a multi-language workspace overrides).
231
231
  *
232
- * Generic over the transfer root type only — the resolution result
233
- * ({@link ReferenceTarget}) carries the resolved node's encoded subtree;
234
- * candidates and names are diagnostic-free.
232
+ * Not generic over a server's root type: {@link resolveReference} answers with
233
+ * a node a reference names, which is no document root, and candidates and
234
+ * names are diagnostic-free.
235
235
  */
236
- export interface ReferenceServerProtocol<TTransfer extends TransferElement> {
236
+ export interface ReferenceServerProtocol {
237
237
  /**
238
238
  * List the reference candidates reachable for the property named in `ctx`
239
239
  * from its (possibly synthetic) source. Backed by the language's
@@ -245,8 +245,11 @@ export interface ReferenceServerProtocol<TTransfer extends TransferElement> {
245
245
  * target's document URI, display fields, and the resolved node's encoded
246
246
  * transfer subtree. Resolves via the language's reference services;
247
247
  * `undefined` when the reference does not resolve.
248
+ *
249
+ * `TElement` is the caller's claim about the target node's type; nothing
250
+ * checks it, so leave it at the default unless the reference names one type.
248
251
  */
249
- resolveReference(ref: ReferenceRequest): Promise<ReferenceTarget<TTransfer> | undefined>;
252
+ resolveReference<TElement extends TransferElement = TransferElement>(ref: ReferenceRequest): Promise<ReferenceTarget<TElement> | undefined>;
250
253
  /**
251
254
  * Compute the next free name for a new element of `args.type` based on
252
255
  * `args.proposal`, unique within the `args.tier` scope (default
@@ -1 +1 @@
1
- {"version":3,"file":"data-server-protocol.d.ts","sourceRoot":"","sources":["../../src/data/data-server-protocol.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAC3H,OAAO,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAChG,OAAO,KAAK,EACT,oBAAoB,EACpB,4BAA4B,EAC5B,iCAAiC,EACjC,0BAA0B,EAC1B,2BAA2B,EAC3B,4BAA4B,EAC9B,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EACT,gBAAgB,EAChB,uBAAuB,EACvB,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACpB,wBAAwB,EACxB,sBAAsB,EACtB,0BAA0B,EAC1B,2BAA2B,EAC7B,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,sBAAsB,CAAC,SAAS,SAAS,eAAe,EAAE,WAAW,SAAS,kBAAkB,GAAG,kBAAkB;IACnI;;;;;;;;;;;;;;;;OAgBG;IACH,aAAa,CAAC,IAAI,EAAE,iBAAiB,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AAE,WAAW,CAAC,GAAG,IAAI,CAAC;IAErF;;;;;;;;;OASG;IACH,eAAe,CAAC,KAAK,EAAE,0BAA0B,CAAC,SAAS,EAAE,WAAW,CAAC,GAAG,IAAI,CAAC;IAEjF;;;;;;;;OAQG;IACH,sBAAsB,CAAC,KAAK,EAAE,iCAAiC,GAAG,IAAI,CAAC;IAEvE;;;;;;;;;OASG;IACH,iBAAiB,CAAC,KAAK,EAAE,4BAA4B,GAAG,IAAI,CAAC;IAE7D;;;;;;;OAOG;IACH,gBAAgB,CAAC,KAAK,EAAE,2BAA2B,GAAG,IAAI,CAAC;CAC7D;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB,CAAC,QAAQ,SAAS,OAAO,GAAG,OAAO;IACtE;;;;;;;;OAQG;IACH,iBAAiB,CAAC,KAAK,EAAE,oBAAoB,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC;CACjE;AAED;;;;;;GAMG;AACH,MAAM,WAAW,kBAAkB,CAChC,SAAS,SAAS,eAAe,EACjC,WAAW,SAAS,kBAAkB,GAAG,kBAAkB,EAC3D,QAAQ,SAAS,OAAO,GAAG,OAAO,CAElC,SAAQ,sBAAsB,CAAC,SAAS,EAAE,WAAW,CAAC,EAAE,qBAAqB,CAAC,QAAQ,CAAC;CAAG"}
@@ -47,10 +47,12 @@ export interface ReferenceCandidate {
47
47
  * node's subtree, NOT the whole document root — callers that want the full
48
48
  * document fetch it via `getModelDocument(uri)`.
49
49
  *
50
- * Generic over the transfer root type so adopters get their typed overlay.
50
+ * `TElement` is the type of the target node, not of a document root. A server
51
+ * answers with the structural base, since a reference can name any node; a
52
+ * caller that knows what the reference targets may narrow it.
51
53
  */
52
- export interface ReferenceTarget<TTransfer extends TransferElement = TransferElement> extends ReferenceCandidate {
54
+ export interface ReferenceTarget<TElement extends TransferElement = TransferElement> extends ReferenceCandidate {
53
55
  /** The resolved target node, encoded as a transfer subtree. */
54
- element: TTransfer;
56
+ element: TElement;
55
57
  }
56
58
  //# sourceMappingURL=reference-candidate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"reference-candidate.d.ts","sourceRoot":"","sources":["../../src/model-service/reference-candidate.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,kBAAkB;IAChC,4DAA4D;IAC5D,GAAG,EAAE,MAAM,CAAC;IACZ,wEAAwE;IACxE,IAAI,EAAE,MAAM,CAAC;IACb,8DAA8D;IAC9D,KAAK,EAAE,MAAM,CAAC;IACd,sEAAsE;IACtE,KAAK,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,eAAe,CAAC,SAAS,SAAS,eAAe,GAAG,eAAe,CAAE,SAAQ,kBAAkB;IAC7G,+DAA+D;IAC/D,OAAO,EAAE,SAAS,CAAC;CACrB"}
1
+ {"version":3,"file":"reference-candidate.d.ts","sourceRoot":"","sources":["../../src/model-service/reference-candidate.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,kBAAkB;IAChC,4DAA4D;IAC5D,GAAG,EAAE,MAAM,CAAC;IACZ,wEAAwE;IACxE,IAAI,EAAE,MAAM,CAAC;IACb,8DAA8D;IAC9D,KAAK,EAAE,MAAM,CAAC;IACd,sEAAsE;IACtE,KAAK,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,eAAe,CAAC,QAAQ,SAAS,eAAe,GAAG,eAAe,CAAE,SAAQ,kBAAkB;IAC5G,+DAA+D;IAC/D,OAAO,EAAE,QAAQ,CAAC;CACpB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hydranium/protocol",
3
- "version": "1.0.0-next.188",
3
+ "version": "1.0.0-next.189",
4
4
  "description": "Generic, language-agnostic types, constants, and pure utilities for the hydranium framework.",
5
5
  "keywords": [
6
6
  "hydranium",
@@ -60,7 +60,7 @@ export const REFERENCE_SERVER_PROTOCOL_METHODS = [
60
60
  'findReferenceCandidates',
61
61
  'resolveReference',
62
62
  'findNextName'
63
- ] as const satisfies ReadonlyArray<keyof ReferenceServerProtocol<TransferElement> & string>;
63
+ ] as const satisfies ReadonlyArray<keyof ReferenceServerProtocol & string>;
64
64
 
65
65
  /** Notification-method names on {@link DocumentClientProtocol}. */
66
66
  export const DOCUMENT_CLIENT_PROTOCOL_METHODS = [
@@ -270,11 +270,11 @@ export type ProjectOf<TServer> = TServer extends ProjectServerProtocol<infer TPr
270
270
  * source/URI (an `ElementSource` with no URI resolves to the sole
271
271
  * registered language; a multi-language workspace overrides).
272
272
  *
273
- * Generic over the transfer root type only — the resolution result
274
- * ({@link ReferenceTarget}) carries the resolved node's encoded subtree;
275
- * candidates and names are diagnostic-free.
273
+ * Not generic over a server's root type: {@link resolveReference} answers with
274
+ * a node a reference names, which is no document root, and candidates and
275
+ * names are diagnostic-free.
276
276
  */
277
- export interface ReferenceServerProtocol<TTransfer extends TransferElement> {
277
+ export interface ReferenceServerProtocol {
278
278
  /**
279
279
  * List the reference candidates reachable for the property named in `ctx`
280
280
  * from its (possibly synthetic) source. Backed by the language's
@@ -287,8 +287,13 @@ export interface ReferenceServerProtocol<TTransfer extends TransferElement> {
287
287
  * target's document URI, display fields, and the resolved node's encoded
288
288
  * transfer subtree. Resolves via the language's reference services;
289
289
  * `undefined` when the reference does not resolve.
290
+ *
291
+ * `TElement` is the caller's claim about the target node's type; nothing
292
+ * checks it, so leave it at the default unless the reference names one type.
290
293
  */
291
- resolveReference(ref: ReferenceRequest): Promise<ReferenceTarget<TTransfer> | undefined>;
294
+ resolveReference<TElement extends TransferElement = TransferElement>(
295
+ ref: ReferenceRequest
296
+ ): Promise<ReferenceTarget<TElement> | undefined>;
292
297
 
293
298
  /**
294
299
  * Compute the next free name for a new element of `args.type` based on
@@ -50,9 +50,11 @@ export interface ReferenceCandidate {
50
50
  * node's subtree, NOT the whole document root — callers that want the full
51
51
  * document fetch it via `getModelDocument(uri)`.
52
52
  *
53
- * Generic over the transfer root type so adopters get their typed overlay.
53
+ * `TElement` is the type of the target node, not of a document root. A server
54
+ * answers with the structural base, since a reference can name any node; a
55
+ * caller that knows what the reference targets may narrow it.
54
56
  */
55
- export interface ReferenceTarget<TTransfer extends TransferElement = TransferElement> extends ReferenceCandidate {
57
+ export interface ReferenceTarget<TElement extends TransferElement = TransferElement> extends ReferenceCandidate {
56
58
  /** The resolved target node, encoded as a transfer subtree. */
57
- element: TTransfer;
59
+ element: TElement;
58
60
  }