@rohal12/spindle 0.62.2 → 0.62.3

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.
@@ -1241,3 +1241,20 @@ export declare function macroArgumentSpans(
1241
1241
  rawArgs: string,
1242
1242
  parameters: readonly ParameterDef[],
1243
1243
  ): MacroArgumentSpan[];
1244
+
1245
+ /** Executable code at a cursor, or prose/literal text that suppresses completion. */
1246
+ export type CompletionContext =
1247
+ | { kind: 'literal' }
1248
+ | (PieceBase & { kind: 'code'; code: string; goal: JsGoal; cursor: number });
1249
+
1250
+ /** Inspect only the prefix before cursor (UTF-16), accepting unfinished markup.
1251
+ * Strings, comments, regexes and template text are literal; template
1252
+ * interpolations are code. Code offsets map to source with pieceOffset.
1253
+ * Uses macro parameter metadata for nested labels, attributes and held code.
1254
+ * Throws RangeError for an invalid cursor; never executes story code.
1255
+ */
1256
+ export declare function completionContext(
1257
+ source: string,
1258
+ cursor: number,
1259
+ macros?: Iterable<ToolingMacro>,
1260
+ ): CompletionContext;