@scalar/code-highlight 0.0.14 → 0.0.16

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @scalar/code-highlight
2
2
 
3
+ ## 0.0.16
4
+
5
+ ### Patch Changes
6
+
7
+ - 1b06f64: fix(api-reference): conflicting styles with bulma, galaxy bug on docs
8
+
9
+ ## 0.0.15
10
+
11
+ ### Patch Changes
12
+
13
+ - a40999d: chore: added type safety rule noUncheckedIndexedAccess
14
+
3
15
  ## 0.0.14
4
16
 
5
17
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"line-numbers.d.ts","sourceRoot":"","sources":["../../src/code/line-numbers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAM/D,wBAAgB,MAAM,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,IAAI,IAAI,CAEhE;AAED,wBAAgB,SAAS,CAAC,IAAI,CAAC,EAAE,cAAc,GAAG,IAAI,IAAI,OAAO,CAEhE;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAE/C;AAED,wBAAgB,SAAS,IAAI,IAAI,CAEhC;AAED;;GAEG;AACH,wBAAgB,oBAAoB,WACpB,IAAI,UA0CnB"}
1
+ {"version":3,"file":"line-numbers.d.ts","sourceRoot":"","sources":["../../src/code/line-numbers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAM/D,wBAAgB,MAAM,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,IAAI,IAAI,CAEhE;AAED,wBAAgB,SAAS,CAAC,IAAI,CAAC,EAAE,cAAc,GAAG,IAAI,IAAI,OAAO,CAEhE;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAE/C;AAED,wBAAgB,SAAS,IAAI,IAAI,CAEhC;AAED;;GAEG;AACH,wBAAgB,oBAAoB,WACpB,IAAI,UA2CnB"}
@@ -30,8 +30,9 @@ function codeBlockLinesPlugin() {
30
30
  node.children.forEach((child) => {
31
31
  if (child.type === 'element' && child.tagName === 'span') {
32
32
  const lastChild = child.children[child.children.length - 1];
33
- if (!isText(lastChild) ||
34
- (isText(lastChild) && !hasLineBreak(lastChild))) {
33
+ if (lastChild &&
34
+ (!isText(lastChild) ||
35
+ (isText(lastChild) && !hasLineBreak(lastChild)))) {
35
36
  child.children.push(lineBreak());
36
37
  numLines++;
37
38
  }
package/dist/css/code.css CHANGED
@@ -11,7 +11,9 @@
11
11
  tab-size: 4;
12
12
  }
13
13
  code.hljs {
14
+ all: unset;
14
15
  font-size: var(--scalar-small);
16
+ color: var(--scalar-color-2);
15
17
  font-family: var(--scalar-font-code);
16
18
  display: inline-block;
17
19
  counter-reset: linenumber;
package/package.json CHANGED
@@ -16,7 +16,7 @@
16
16
  "lowlight",
17
17
  "highlightjs"
18
18
  ],
19
- "version": "0.0.14",
19
+ "version": "0.0.16",
20
20
  "engines": {
21
21
  "node": ">=18"
22
22
  },
@@ -89,12 +89,11 @@
89
89
  "@types/hast": "^3.0.4",
90
90
  "@types/mdast": "^4.0.4",
91
91
  "@types/unist": "^3.0.2",
92
- "rollup": "^4.16.4",
93
92
  "vfile": "^6.0.1",
94
- "vite": "^5.2.10",
93
+ "vite": "^5.4.10",
95
94
  "vue": "^3.5.12",
96
- "@scalar/build-tooling": "0.1.11",
97
- "@scalar/themes": "0.9.41"
95
+ "@scalar/build-tooling": "0.1.12",
96
+ "@scalar/themes": "0.9.50"
98
97
  },
99
98
  "scripts": {
100
99
  "build": "scalar-build-rollup",