@kestra-io/ui-libs 0.0.77 → 0.0.78

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kestra-io/ui-libs",
3
- "version": "0.0.77",
3
+ "version": "0.0.78",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
@@ -21,7 +21,11 @@
21
21
 
22
22
  <script>
23
23
  import {createPopper} from "@popperjs/core";
24
- import {codeToHtml} from "shiki";
24
+ import {createOnigurumaEngine} from "@shikijs/engine-oniguruma";
25
+ import {createHighlighterCore} from "shiki/core";
26
+ import yaml from "shiki/langs/yaml.mjs";
27
+ import python from "shiki/langs/python.mjs";
28
+ import javascript from "shiki/langs/javascript.mjs";
25
29
  import ContentCopy from "vue-material-design-icons/ContentCopy.vue";
26
30
  import Check from "vue-material-design-icons/Check.vue";
27
31
  import {defineComponent, nextTick, shallowRef} from "vue";
@@ -63,7 +67,19 @@
63
67
  },
64
68
  async created() {
65
69
  this.copyIcon = this.icons.ContentCopy;
66
- this.codeData = await codeToHtml(this.code, {
70
+ const highlighter = await createHighlighterCore({
71
+ themes: [
72
+ import("shiki/themes/github-dark.mjs")
73
+ ],
74
+ langs: [
75
+ yaml,
76
+ python,
77
+ javascript
78
+ ],
79
+ // `shiki/wasm` contains the wasm binary inlined as base64 string.
80
+ engine: createOnigurumaEngine(() => import("shiki/wasm"))
81
+ })
82
+ this.codeData = highlighter.codeToHtml(this.code, {
67
83
  lang: this.language,
68
84
  theme: "github-dark",
69
85
  });
@@ -1,6 +1,6 @@
1
1
  import JsYaml from "js-yaml";
2
2
  import yaml, {Document, YAMLMap, isSeq, isMap, Pair, Scalar, YAMLSeq, LineCounter} from "yaml";
3
- import {cloneDeep} from "lodash"
3
+ import cloneDeep from "lodash/cloneDeep"
4
4
  import {SECTIONS} from "./constants.js";
5
5
 
6
6
  const TOSTRING_OPTIONS = {lineWidth: 0};
@@ -1,4 +1,4 @@
1
- import {mapValues} from "lodash";
1
+ import mapValues from "lodash/mapValues";
2
2
  import PauseCircle from "vue-material-design-icons/PauseCircle.vue";
3
3
  import CheckCircle from "vue-material-design-icons/CheckCircle.vue";
4
4
  import PlayCircle from "vue-material-design-icons/PlayCircle.vue";