@openclaw/diffs 2026.7.2-beta.2 → 2026.7.2-beta.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.
Files changed (36) hide show
  1. package/README.md +2 -1
  2. package/dist/assets/viewer-runtime.js +15 -15
  3. package/dist/index.js +248 -211
  4. package/node_modules/@shikijs/core/package.json +3 -3
  5. package/node_modules/@shikijs/engine-javascript/package.json +2 -2
  6. package/node_modules/@shikijs/engine-oniguruma/package.json +2 -2
  7. package/node_modules/@shikijs/langs/package.json +2 -2
  8. package/node_modules/@shikijs/primitive/dist/index.mjs +6 -5
  9. package/node_modules/@shikijs/primitive/package.json +2 -2
  10. package/node_modules/@shikijs/themes/package.json +2 -2
  11. package/node_modules/@shikijs/transformers/package.json +3 -3
  12. package/node_modules/@shikijs/types/dist/index.d.mts +9 -1
  13. package/node_modules/@shikijs/types/package.json +1 -1
  14. package/node_modules/@types/hast/README.md +2 -2
  15. package/node_modules/@types/hast/index.d.ts +642 -0
  16. package/node_modules/@types/hast/package.json +9 -3
  17. package/node_modules/@ungap/structured-clone/cjs/deserialize.js +6 -1
  18. package/node_modules/@ungap/structured-clone/cjs/serialize.js +2 -2
  19. package/node_modules/@ungap/structured-clone/esm/deserialize.js +6 -1
  20. package/node_modules/@ungap/structured-clone/esm/serialize.js +2 -2
  21. package/node_modules/@ungap/structured-clone/package.json +1 -1
  22. package/node_modules/@ungap/structured-clone/structured-json.js +1 -1
  23. package/node_modules/shiki/package.json +7 -7
  24. package/node_modules/typebox/build/compile/validator.d.mts +1 -4
  25. package/node_modules/typebox/build/guard/guard.d.mts +1 -1
  26. package/node_modules/typebox/build/guard/guard.mjs +5 -2
  27. package/node_modules/typebox/build/guard/string.mjs +16 -4
  28. package/node_modules/typebox/build/schema/engine/_functions.mjs +34 -15
  29. package/node_modules/typebox/build/type/action/readonly_object.d.mts +5 -0
  30. package/node_modules/typebox/build/type/action/readonly_object.mjs +8 -0
  31. package/node_modules/typebox/build/typebox.d.mts +1 -1
  32. package/node_modules/typebox/build/typebox.mjs +1 -1
  33. package/node_modules/typebox/package.json +1 -1
  34. package/node_modules/typebox/readme.md +29 -32
  35. package/npm-shrinkwrap.json +55 -55
  36. package/package.json +6 -6
@@ -617,7 +617,7 @@ function tokenizeWithTheme(code, grammar, theme, colorMap, options) {
617
617
  }
618
618
  function _tokenizeWithTheme(code, grammar, theme, colorMap, options) {
619
619
  const colorReplacements = resolveColorReplacements(theme, options);
620
- const { tokenizeMaxLineLength = 0, tokenizeTimeLimit = 500 } = options;
620
+ const { tokenizeMaxLineLength = 0, tokenizeTimeLimit = 500, includeExplanation = false } = options;
621
621
  const lines = splitLines(code);
622
622
  let stateStack = options.grammarState ? getGrammarStack(options.grammarState, theme.name) ?? INITIAL : options.grammarContextCode != null ? _tokenizeWithTheme(options.grammarContextCode, grammar, theme, colorMap, {
623
623
  ...options,
@@ -646,7 +646,7 @@ function _tokenizeWithTheme(code, grammar, theme, colorMap, options) {
646
646
  let resultWithScopes;
647
647
  let tokensWithScopes;
648
648
  let tokensWithScopesIndex;
649
- if (options.includeExplanation) {
649
+ if (includeExplanation && includeExplanation !== "tokenType") {
650
650
  resultWithScopes = grammar.tokenizeLine(line, stateStack, tokenizeTimeLimit);
651
651
  tokensWithScopes = resultWithScopes.tokens;
652
652
  tokensWithScopesIndex = 0;
@@ -666,9 +666,10 @@ function _tokenizeWithTheme(code, grammar, theme, colorMap, options) {
666
666
  color,
667
667
  fontStyle
668
668
  };
669
- if (options.includeExplanation) {
669
+ if (includeExplanation === "tokenType") token.type = EncodedTokenMetadata.getTokenType(metadata);
670
+ else if (includeExplanation) {
670
671
  const themeSettingsSelectors = [];
671
- if (options.includeExplanation !== "scopeName") for (const setting of theme.settings) {
672
+ if (includeExplanation !== "scopeName") for (const setting of theme.settings) {
672
673
  let selectors;
673
674
  switch (typeof setting.scope) {
674
675
  case "string":
@@ -692,7 +693,7 @@ function _tokenizeWithTheme(code, grammar, theme, colorMap, options) {
692
693
  offset += tokenWithScopesText.length;
693
694
  token.explanation.push({
694
695
  content: tokenWithScopesText,
695
- scopes: options.includeExplanation === "scopeName" ? explainThemeScopesNameOnly(tokenWithScopes.scopes) : explainThemeScopesFull(themeSettingsSelectors, tokenWithScopes.scopes)
696
+ scopes: includeExplanation === "scopeName" ? explainThemeScopesNameOnly(tokenWithScopes.scopes) : explainThemeScopesFull(themeSettingsSelectors, tokenWithScopes.scopes)
696
697
  });
697
698
  tokensWithScopesIndex += 1;
698
699
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shikijs/primitive",
3
3
  "type": "module",
4
- "version": "4.3.0",
4
+ "version": "4.3.1",
5
5
  "description": "Tokenizer primitives of Shiki",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -46,7 +46,7 @@
46
46
  "dependencies": {
47
47
  "@shikijs/vscode-textmate": "^10.0.2",
48
48
  "@types/hast": "^3.0.4",
49
- "@shikijs/types": "4.3.0"
49
+ "@shikijs/types": "4.3.1"
50
50
  },
51
51
  "scripts": {
52
52
  "build": "tsdown",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shikijs/themes",
3
3
  "type": "module",
4
- "version": "4.3.0",
4
+ "version": "4.3.1",
5
5
  "description": "TextMate themes for Shiki in ESM",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -95,7 +95,7 @@
95
95
  "node": ">=20"
96
96
  },
97
97
  "dependencies": {
98
- "@shikijs/types": "4.3.0"
98
+ "@shikijs/types": "4.3.1"
99
99
  },
100
100
  "devDependencies": {
101
101
  "tm-themes": "^1.12.2"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shikijs/transformers",
3
3
  "type": "module",
4
- "version": "4.3.0",
4
+ "version": "4.3.1",
5
5
  "description": "Collective of common transformers transformers for Shiki",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -30,8 +30,8 @@
30
30
  "node": ">=20"
31
31
  },
32
32
  "dependencies": {
33
- "@shikijs/core": "4.3.0",
34
- "@shikijs/types": "4.3.0"
33
+ "@shikijs/core": "4.3.1",
34
+ "@shikijs/types": "4.3.1"
35
35
  },
36
36
  "scripts": {
37
37
  "build": "tsdown",
@@ -342,6 +342,14 @@ interface TokenBase {
342
342
  * The start offset of the token, relative to the input code. 0-indexed.
343
343
  */
344
344
  offset: number;
345
+ /**
346
+ * The type of the token
347
+ * 0 - other
348
+ * 1 - comment
349
+ * 2 - string
350
+ * 3 - regex
351
+ */
352
+ type?: number;
345
353
  /**
346
354
  * Explanation of
347
355
  *
@@ -389,7 +397,7 @@ interface TokenizeWithThemeOptions {
389
397
  *
390
398
  * @default false
391
399
  */
392
- includeExplanation?: boolean | 'scopeName';
400
+ includeExplanation?: boolean | 'scopeName' | 'tokenType';
393
401
  /**
394
402
  * A map of color names to new color values.
395
403
  *
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shikijs/types",
3
3
  "type": "module",
4
- "version": "4.3.0",
4
+ "version": "4.3.1",
5
5
  "description": "Type definitions for Shiki",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -8,8 +8,8 @@ This package contains type definitions for hast (https://github.com/syntax-tree/
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/hast.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Tue, 30 Jan 2024 21:35:45 GMT
11
+ * Last updated: Thu, 09 Jul 2026 11:00:13 GMT
12
12
  * Dependencies: [@types/unist](https://npmjs.com/package/@types/unist)
13
13
 
14
14
  # Credits
15
- These definitions were written by [lukeggchapman](https://github.com/lukeggchapman), [Junyoung Choi](https://github.com/rokt33r), [Christian Murphy](https://github.com/ChristianMurphy), and [Remco Haszing](https://github.com/remcohaszing).
15
+ These definitions were written by [lukeggchapman](https://github.com/lukeggchapman), [Junyoung Choi](https://github.com/rokt33r), [Christian Murphy](https://github.com/ChristianMurphy), [Remco Haszing](https://github.com/remcohaszing), and [Titus Wormer](https://github.com/wooorm).