@shikijs/twoslash 1.16.3 → 1.17.4

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/core.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { CodeToHastOptions, ShikiTransformerContext, ShikiTransformerContextCommon, ShikiTransformer } from '@shikijs/core';
1
+ import { CodeToHastOptions, ShikiTransformerContext, ShikiTransformerContextCommon, ShikiTransformer } from '@shikijs/types';
2
2
  import { TwoslashReturn, TwoslashExecuteOptions, TwoslashGenericFunction, TwoslashOptions, NodeError, NodeTag, NodeQuery, NodeCompletion, NodeHover, NodeHighlight } from 'twoslash';
3
3
  import { ElementContent, Element, Text } from 'hast';
4
4
 
@@ -272,6 +272,11 @@ declare function rendererRich(options?: RendererRichOptions): TwoslashRenderer;
272
272
  */
273
273
  declare function defaultHoverInfoProcessor(type: string): string;
274
274
 
275
+ /**
276
+ * This file is the core of the @shikijs/twoslash package,
277
+ * Decoupled from twoslash's implementation and allowing to introduce custom implementation or cache system.
278
+ */
279
+
275
280
  declare function defaultTwoslashOptions(): TwoslashExecuteOptions;
276
281
  declare function createTransformerFactory(defaultTwoslasher: TwoslashShikiFunction | TwoslashGenericFunction, defaultRenderer?: TwoslashRenderer): (options?: TransformerTwoslashOptions) => ShikiTransformer;
277
282
 
package/dist/core.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { CodeToHastOptions, ShikiTransformerContext, ShikiTransformerContextCommon, ShikiTransformer } from '@shikijs/core';
1
+ import { CodeToHastOptions, ShikiTransformerContext, ShikiTransformerContextCommon, ShikiTransformer } from '@shikijs/types';
2
2
  import { TwoslashReturn, TwoslashExecuteOptions, TwoslashGenericFunction, TwoslashOptions, NodeError, NodeTag, NodeQuery, NodeCompletion, NodeHover, NodeHighlight } from 'twoslash';
3
3
  import { ElementContent, Element, Text } from 'hast';
4
4
 
@@ -272,6 +272,11 @@ declare function rendererRich(options?: RendererRichOptions): TwoslashRenderer;
272
272
  */
273
273
  declare function defaultHoverInfoProcessor(type: string): string;
274
274
 
275
+ /**
276
+ * This file is the core of the @shikijs/twoslash package,
277
+ * Decoupled from twoslash's implementation and allowing to introduce custom implementation or cache system.
278
+ */
279
+
275
280
  declare function defaultTwoslashOptions(): TwoslashExecuteOptions;
276
281
  declare function createTransformerFactory(defaultTwoslasher: TwoslashShikiFunction | TwoslashGenericFunction, defaultRenderer?: TwoslashRenderer): (options?: TransformerTwoslashOptions) => ShikiTransformer;
277
282
 
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import * as _shikijs_core from '@shikijs/core';
1
+ import * as _shikijs_types from '@shikijs/types';
2
2
  import { CreateTwoslashOptions } from 'twoslash';
3
3
  import { TransformerTwoslashOptions, RendererRichOptions } from './core.mjs';
4
4
  export { CompletionItem, HastExtension, ShikiTwoslashError, TwoslashRenderer, TwoslashShikiFunction, TwoslashShikiReturn, createTransformerFactory, defaultCompletionIcons, defaultCustomTagIcons, defaultHoverInfoProcessor, defaultTwoslashOptions, rendererClassic, rendererRich } from './core.mjs';
@@ -15,6 +15,6 @@ interface TransformerTwoslashIndexOptions extends TransformerTwoslashOptions, Pi
15
15
  /**
16
16
  * Factory function to create a Shiki transformer for twoslash integrations.
17
17
  */
18
- declare function transformerTwoslash(options?: TransformerTwoslashIndexOptions): _shikijs_core.ShikiTransformer;
18
+ declare function transformerTwoslash(options?: TransformerTwoslashIndexOptions): _shikijs_types.ShikiTransformer;
19
19
 
20
20
  export { RendererRichOptions, type TransformerTwoslashIndexOptions, TransformerTwoslashOptions, transformerTwoslash };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import * as _shikijs_core from '@shikijs/core';
1
+ import * as _shikijs_types from '@shikijs/types';
2
2
  import { CreateTwoslashOptions } from 'twoslash';
3
3
  import { TransformerTwoslashOptions, RendererRichOptions } from './core.js';
4
4
  export { CompletionItem, HastExtension, ShikiTwoslashError, TwoslashRenderer, TwoslashShikiFunction, TwoslashShikiReturn, createTransformerFactory, defaultCompletionIcons, defaultCustomTagIcons, defaultHoverInfoProcessor, defaultTwoslashOptions, rendererClassic, rendererRich } from './core.js';
@@ -15,6 +15,6 @@ interface TransformerTwoslashIndexOptions extends TransformerTwoslashOptions, Pi
15
15
  /**
16
16
  * Factory function to create a Shiki transformer for twoslash integrations.
17
17
  */
18
- declare function transformerTwoslash(options?: TransformerTwoslashIndexOptions): _shikijs_core.ShikiTransformer;
18
+ declare function transformerTwoslash(options?: TransformerTwoslashIndexOptions): _shikijs_types.ShikiTransformer;
19
19
 
20
20
  export { RendererRichOptions, type TransformerTwoslashIndexOptions, TransformerTwoslashOptions, transformerTwoslash };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shikijs/twoslash",
3
3
  "type": "module",
4
- "version": "1.16.3",
4
+ "version": "1.17.4",
5
5
  "description": "Shiki transformer for twoslash",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -50,14 +50,15 @@
50
50
  ],
51
51
  "dependencies": {
52
52
  "twoslash": "^0.2.11",
53
- "@shikijs/core": "1.16.3"
53
+ "@shikijs/core": "1.17.4",
54
+ "@shikijs/types": "1.17.4"
54
55
  },
55
56
  "devDependencies": {
56
57
  "@iconify-json/carbon": "^1.2.1",
57
58
  "@iconify-json/codicon": "^1.2.0",
58
59
  "hast-util-from-html": "^2.0.2",
59
- "typescript": "^5.5.4",
60
- "@shikijs/twoslash": "1.16.3"
60
+ "typescript": "^5.6.2",
61
+ "@shikijs/twoslash": "1.17.4"
61
62
  },
62
63
  "scripts": {
63
64
  "build": "unbuild",