@kestra-io/ui-libs 0.0.78 → 0.0.80

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/style.css CHANGED
@@ -1 +1 @@
1
- .tooltip-custom .tooltip-inner{max-width:none}.circle-button[data-v-c86183e9]{border-radius:1rem;width:1rem;height:1rem;display:flex;justify-content:center;align-items:center;pointer-events:auto!important}.button-icon[data-v-c86183e9]{font-size:.75rem}.badge[data-v-c86183e9]{top:-3px;position:relative;left:-3px;display:inline-block;max-width:100%}.text-color[data-v-c86183e9]{color:var(--bs-white);font-size:.5rem;font-weight:700;padding:.25rem .5rem}.top-button-div[data-v-c86183e9]{position:absolute;top:-.5rem;right:-.5rem;justify-content:center;padding-right:3px;display:flex}.custom-handle[data-v-00cf8c59]{visibility:hidden}.dot[data-v-00cf8c59]{display:flex;flex-direction:column;align-items:center;font-size:5px}.add-task-div[data-v-2bdfbc4f]{margin:.2rem;width:25px;height:25px;border:.4px solid var(--bs-border-color);background-color:var(--bs-white)}html.dark .add-task-div[data-v-2bdfbc4f]{background-color:var(--card-bg)}.add-task-div.text-danger[data-v-2bdfbc4f]{border-color:#e36065}.wrapper[data-v-d741b593]{display:inline-block;width:100%;height:100%;position:relative}.wrapper[data-v-d741b593] span{position:absolute;padding:1px;left:0;display:block;width:100%;height:100%}.wrapper[data-v-d741b593] .icon{width:100%;height:100%;display:block;background-size:contain;background-repeat:no-repeat;background-position:center center}.node-wrapper[data-v-aa670693]{background-color:var(--bs-white);width:184px;height:44px;margin:0;padding:8px;display:flex;z-index:150000;align-items:center;box-shadow:0 12px 12px #82679e1a}html.dark .node-wrapper[data-v-aa670693]{background-color:var(--bs-gray-300)}.node-wrapper.execution-no-taskrun[data-v-aa670693],.node-wrapper.disabled[data-v-aa670693]{background-color:var(--bs-gray-200)}html.dark .node-wrapper.execution-no-taskrun[data-v-aa670693],html.dark .node-wrapper.disabled[data-v-aa670693]{background-color:var(--bs-gray-500)}.node-wrapper.disabled .task-title[data-v-aa670693]{color:var(--bs-gray-500);text-decoration:line-through}html.dark .node-wrapper.disabled .task-title[data-v-aa670693]{color:var(--bs-gray-600)}.node-wrapper .icon[data-v-aa670693]{margin:.2rem;width:25px;height:25px;border:.4px solid var(--bs-border-color)}.node-content[data-v-aa670693]{display:flex;flex-direction:column;justify-content:center;margin-left:.7rem}.node-content>.node-title[data-v-aa670693]{width:125px}.description-button[data-v-aa670693]{color:var(--bs-gray-700);cursor:pointer}.material-design-icon.icon-rounded[data-v-aa670693]{border-radius:1rem;padding:1px}.circle-button[data-v-aa670693]{border-radius:1rem;width:1rem;height:1rem;display:flex;justify-content:center;align-items:center;margin-left:.25rem}.button-icon[data-v-aa670693]{font-size:.75rem}.task-title[data-v-aa670693]{font-size:.75rem;font-weight:700;color:var(--bs-black);flex-grow:1}html.dark .task-title[data-v-aa670693]{color:var(--bs-white)}.status-div[data-v-aa670693]{width:8px;height:100%;position:absolute;left:-.04438rem;border-radius:.5rem 0 0 .5rem}.duration-tt{text-align:left;white-space:nowrap;max-width:none}.duration-tt .square{display:inline-block;width:10px;height:10px;margin-right:5px}.content[data-v-9bea95bb]{color:var(--bs-gray-700)}.content-children[data-v-9bea95bb]{font-size:.7rem}.collapsed-cluster-node[data-v-e12d4062]{width:150px;height:44px;padding:8px}.node-text[data-v-e12d4062]{color:#000;font-size:.9rem;display:flex;align-items:center}html.dark .node-text[data-v-e12d4062]{color:#fff}.circle-button[data-v-e12d4062]{border-radius:1rem;width:1rem;height:1rem;display:flex;justify-content:center;align-items:center}.button-icon[data-v-e12d4062]{font-size:.75rem}.dependency-node-wrapper[data-v-cff03edd]{background-color:var(--bs-white);color:var(--bs-black);width:184px;height:44px;margin:0;padding:8px 18px 8px 6px;display:flex;align-items:center;box-shadow:0 12px 12px #82679e1a}html.dark .dependency-node-wrapper[data-v-cff03edd]{background-color:var(--card-bg);color:var(--bs-white)}.wrapper[data-v-cff03edd]{width:26px}.dependency-text[data-v-cff03edd]{margin-left:.5rem}.dependency-flow-text[data-v-cff03edd]{font-size:.85rem;font-weight:700;max-width:121px}.dependency-namespace-text[data-v-cff03edd]{font-size:.625rem;font-weight:400;color:#564a75;max-width:121px}html.dark .dependency-namespace-text[data-v-cff03edd]{color:#e3dbff}svg[data-v-084c51e6]{transform:scale(1.5)}svg[data-v-c77c1469]{transform:scale(1.5)}[data-v-d7b42e22] .unused-path{opacity:.3}.icon[data-v-6e5cce27]{margin-right:.3rem}.code-block[data-v-a201d833]{background-color:#161617;border:1px solid #252526;padding:1.25rem 1.5rem;border-radius:var(--bs-border-radius-lg);color:var(--bs-white);position:relative}.code-block .language[data-v-a201d833]{position:absolute;right:.35rem;top:.25rem;color:var(--bs-gray-600);font-size:.75rem}.code-block[data-v-a201d833] pre{margin-bottom:0}.code-block[data-v-a201d833] .github-dark{background-color:transparent!important}.code-block[data-v-a201d833] .github-dark code{display:flex;flex-direction:column}.code-block .copy[data-v-a201d833]{position:absolute;right:0;bottom:.1rem;color:#7081b9;border:none;background:none}.code-block #copied-tooltip[data-v-a201d833]{border-radius:.25rem;background:#8997bd;padding:4px 8px;font-size:.75rem;margin-right:.2rem!important}.code-block #copied-tooltip #arrow[data-v-a201d833],.code-block #copied-tooltip #arrow[data-v-a201d833]:before{position:absolute;width:8px;height:8px;background:inherit}.code-block #copied-tooltip #arrow[data-v-a201d833]{visibility:hidden;right:-4px}.code-block #copied-tooltip #arrow[data-v-a201d833]:before{visibility:visible;content:"";transform:rotate(45deg)}[data-v-a201d833] pre code .line{display:block;min-height:1rem}.bd-markdown p code[data-v-ea128188]{background:#161617;border:1px solid #252526;border-radius:var(--bs-border-radius);color:#b9b9ba;padding:0 .25rem}
1
+ .tooltip-custom .tooltip-inner{max-width:none}.circle-button[data-v-c86183e9]{border-radius:1rem;width:1rem;height:1rem;display:flex;justify-content:center;align-items:center;pointer-events:auto!important}.button-icon[data-v-c86183e9]{font-size:.75rem}.badge[data-v-c86183e9]{top:-3px;position:relative;left:-3px;display:inline-block;max-width:100%}.text-color[data-v-c86183e9]{color:var(--bs-white);font-size:.5rem;font-weight:700;padding:.25rem .5rem}.top-button-div[data-v-c86183e9]{position:absolute;top:-.5rem;right:-.5rem;justify-content:center;padding-right:3px;display:flex}.custom-handle[data-v-00cf8c59]{visibility:hidden}.dot[data-v-00cf8c59]{display:flex;flex-direction:column;align-items:center;font-size:5px}.add-task-div[data-v-2bdfbc4f]{margin:.2rem;width:25px;height:25px;border:.4px solid var(--bs-border-color);background-color:var(--bs-white)}html.dark .add-task-div[data-v-2bdfbc4f]{background-color:var(--card-bg)}.add-task-div.text-danger[data-v-2bdfbc4f]{border-color:#e36065}.wrapper[data-v-d741b593]{display:inline-block;width:100%;height:100%;position:relative}.wrapper[data-v-d741b593] span{position:absolute;padding:1px;left:0;display:block;width:100%;height:100%}.wrapper[data-v-d741b593] .icon{width:100%;height:100%;display:block;background-size:contain;background-repeat:no-repeat;background-position:center center}.node-wrapper[data-v-aa670693]{background-color:var(--bs-white);width:184px;height:44px;margin:0;padding:8px;display:flex;z-index:150000;align-items:center;box-shadow:0 12px 12px #82679e1a}html.dark .node-wrapper[data-v-aa670693]{background-color:var(--bs-gray-300)}.node-wrapper.execution-no-taskrun[data-v-aa670693],.node-wrapper.disabled[data-v-aa670693]{background-color:var(--bs-gray-200)}html.dark .node-wrapper.execution-no-taskrun[data-v-aa670693],html.dark .node-wrapper.disabled[data-v-aa670693]{background-color:var(--bs-gray-500)}.node-wrapper.disabled .task-title[data-v-aa670693]{color:var(--bs-gray-500);text-decoration:line-through}html.dark .node-wrapper.disabled .task-title[data-v-aa670693]{color:var(--bs-gray-600)}.node-wrapper .icon[data-v-aa670693]{margin:.2rem;width:25px;height:25px;border:.4px solid var(--bs-border-color)}.node-content[data-v-aa670693]{display:flex;flex-direction:column;justify-content:center;margin-left:.7rem}.node-content>.node-title[data-v-aa670693]{width:125px}.description-button[data-v-aa670693]{color:var(--bs-gray-700);cursor:pointer}.material-design-icon.icon-rounded[data-v-aa670693]{border-radius:1rem;padding:1px}.circle-button[data-v-aa670693]{border-radius:1rem;width:1rem;height:1rem;display:flex;justify-content:center;align-items:center;margin-left:.25rem}.button-icon[data-v-aa670693]{font-size:.75rem}.task-title[data-v-aa670693]{font-size:.75rem;font-weight:700;color:var(--bs-black);flex-grow:1}html.dark .task-title[data-v-aa670693]{color:var(--bs-white)}.status-div[data-v-aa670693]{width:8px;height:100%;position:absolute;left:-.04438rem;border-radius:.5rem 0 0 .5rem}.duration-tt{text-align:left;white-space:nowrap;max-width:none}.duration-tt .square{display:inline-block;width:10px;height:10px;margin-right:5px}.content[data-v-9bea95bb]{color:var(--bs-gray-700)}.content-children[data-v-9bea95bb]{font-size:.7rem}.collapsed-cluster-node[data-v-e12d4062]{width:150px;height:44px;padding:8px}.node-text[data-v-e12d4062]{color:#000;font-size:.9rem;display:flex;align-items:center}html.dark .node-text[data-v-e12d4062]{color:#fff}.circle-button[data-v-e12d4062]{border-radius:1rem;width:1rem;height:1rem;display:flex;justify-content:center;align-items:center}.button-icon[data-v-e12d4062]{font-size:.75rem}.dependency-node-wrapper[data-v-cff03edd]{background-color:var(--bs-white);color:var(--bs-black);width:184px;height:44px;margin:0;padding:8px 18px 8px 6px;display:flex;align-items:center;box-shadow:0 12px 12px #82679e1a}html.dark .dependency-node-wrapper[data-v-cff03edd]{background-color:var(--card-bg);color:var(--bs-white)}.wrapper[data-v-cff03edd]{width:26px}.dependency-text[data-v-cff03edd]{margin-left:.5rem}.dependency-flow-text[data-v-cff03edd]{font-size:.85rem;font-weight:700;max-width:121px}.dependency-namespace-text[data-v-cff03edd]{font-size:.625rem;font-weight:400;color:#564a75;max-width:121px}html.dark .dependency-namespace-text[data-v-cff03edd]{color:#e3dbff}svg[data-v-084c51e6]{transform:scale(1.5)}svg[data-v-c77c1469]{transform:scale(1.5)}[data-v-d7b42e22] .unused-path{opacity:.3}.icon[data-v-6e5cce27]{margin-right:.3rem}.code-block[data-v-12f137e4]{background-color:#161617;border:1px solid #252526;padding:1.25rem 1.5rem;border-radius:var(--bs-border-radius-lg);color:var(--bs-white);position:relative}.code-block .language[data-v-12f137e4]{position:absolute;right:.35rem;top:.25rem;color:var(--bs-gray-600);font-size:.75rem}.code-block[data-v-12f137e4] pre{margin-bottom:0}.code-block[data-v-12f137e4] .github-dark{background-color:transparent!important}.code-block[data-v-12f137e4] .github-dark code{display:flex;flex-direction:column}.code-block .copy[data-v-12f137e4]{position:absolute;right:0;bottom:.1rem;color:#7081b9;border:none;background:none}.code-block #copied-tooltip[data-v-12f137e4]{border-radius:.25rem;background:#8997bd;padding:4px 8px;font-size:.75rem;margin-right:.2rem!important}.code-block #copied-tooltip #arrow[data-v-12f137e4],.code-block #copied-tooltip #arrow[data-v-12f137e4]:before{position:absolute;width:8px;height:8px;background:inherit}.code-block #copied-tooltip #arrow[data-v-12f137e4]{visibility:hidden;right:-4px}.code-block #copied-tooltip #arrow[data-v-12f137e4]:before{visibility:visible;content:"";transform:rotate(45deg)}[data-v-12f137e4] pre code .line{display:block;min-height:1rem}.bd-markdown code[data-v-a70b272d]{background:#161617;border:1px solid #252526;border-radius:var(--bs-border-radius);color:#b9b9ba;padding:0 .25rem}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kestra-io/ui-libs",
3
- "version": "0.0.78",
3
+ "version": "0.0.80",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
@@ -21,7 +21,10 @@
21
21
  "production": "./dist/kestra-ui.umd.cjs"
22
22
  }
23
23
  },
24
- "./style.css": "./dist/style.css",
24
+ "./style.css": {
25
+ "development": "./src/placeholder.css",
26
+ "production": "./dist/style.css"
27
+ },
25
28
  "./src/*": "./src/*"
26
29
  },
27
30
  "scripts": {
@@ -60,6 +63,6 @@
60
63
  "@nuxtjs/mdc": "^0.9.0",
61
64
  "@popperjs/core": "^2.11.8",
62
65
  "mermaid": "^11.2.1",
63
- "shiki": "^1.22.0"
66
+ "shiki": "^1.24.4"
64
67
  }
65
68
  }
@@ -12,7 +12,7 @@
12
12
  // conditional import is required for website not to crash due to
13
13
  // bootstrap launching some init upon import that is incompatible with SSR
14
14
  let bootstrap;
15
- if (document) {
15
+ if (typeof document !== "undefined") {
16
16
  bootstrap = import("bootstrap");
17
17
  }
18
18
 
@@ -33,7 +33,7 @@
33
33
  }
34
34
  },
35
35
  async mounted() {
36
- if (document) {
36
+ if (typeof document !== "undefined") {
37
37
  this.tooltip = new (await bootstrap).Tooltip(this.$refs.tooltip, {
38
38
  trigger: "hover",
39
39
  html: true,
@@ -0,0 +1,130 @@
1
+ <template>
2
+ <PropertyType :property="property" />
3
+
4
+ <li v-if="showDynamic">
5
+ <strong>Dynamic: </strong> {{ dynamicText(property) }}
6
+ </li>
7
+
8
+ <li>
9
+ <strong>Required: </strong> {{ requiredText(property) }}
10
+ </li>
11
+
12
+ <li v-if="property.default !== undefined">
13
+ <strong>Default: </strong>
14
+ <code>{{ property.default }}</code>
15
+ </li>
16
+
17
+ <li v-if="property.pattern !== undefined">
18
+ <strong>Validation RegExp: </strong>
19
+ <code> {{ property.pattern }} </code>
20
+ </li>
21
+
22
+ <li v-if="property.minLength !== undefined">
23
+ <strong>Min length: </strong>
24
+ <code>{{ property.minLength }}</code>
25
+ </li>
26
+
27
+ <li v-if="property.maxLength !== undefined">
28
+ <strong>Max length: </strong>
29
+ <code>{{ property.maxLength }}</code>
30
+ </li>
31
+
32
+ <li v-if="property.minItems !== undefined">
33
+ <strong>Min items: </strong>
34
+ <code> {{ property.minItems }} </code>
35
+ </li>
36
+
37
+ <li v-if="property.maxItems !== undefined">
38
+ <strong>Max items: </strong>
39
+ <code> {{ property.maxItems }} </code>
40
+ </li>
41
+
42
+ <li v-if="property.minimum !== undefined">
43
+ <strong>Minimum: </strong>
44
+ <code>&rsaquo;= {{ property.minimum }} </code>
45
+ </li>
46
+
47
+ <li v-if="property.exclusiveMinimum !== undefined">
48
+ <strong>Minimum: </strong>
49
+ <code>&rsaquo; {{ property.minimum }} </code>
50
+ </li>
51
+
52
+ <li v-if="property.maximum !== undefined">
53
+ <strong>Maximum: </strong>
54
+ <code>&lsaquo;= {{ property.maximum }} </code>
55
+ </li>
56
+
57
+ <li v-if="property.exclusiveMaximum !== undefined">
58
+ <strong>Maximum: </strong>
59
+ <code>&lsaquo; {{ property.maximum }} </code>
60
+ </li>
61
+
62
+ <li v-if="property.format !== undefined">
63
+ <strong>Format: </strong>
64
+ <code> {{ property.format }} </code>
65
+ </li>
66
+
67
+ <li v-if="property.enum !== undefined">
68
+ <strong>Possible Values:</strong>
69
+ <ul>
70
+ <li v-for="(possibleValue, index) in property.enum" :key="index">
71
+ <code>{{ possibleValue }}</code>
72
+ </li>
73
+ </ul>
74
+ </li>
75
+
76
+ <div class="mt-3" v-if="property.title !== undefined || property.description !== undefined">
77
+ <div class="nested-fw-bold" v-if="property.title !== undefined">
78
+ <slot :content="textSanitizer(property.title)" name="markdown" />
79
+ </div>
80
+
81
+ <blockquote v-if="property.description !== undefined" class="blockquote">
82
+ <slot :content="textSanitizer(property.description)" name="markdown" />
83
+ </blockquote>
84
+ </div>
85
+ </template>
86
+
87
+ <script setup>
88
+ import PropertyType from "./PropertyType.vue";
89
+
90
+ defineProps({
91
+ property: {
92
+ type: Object,
93
+ required: true,
94
+ },
95
+ textSanitizer: {
96
+ type: Function,
97
+ required: false,
98
+ default: (text) => text
99
+ },
100
+ showDynamic: {
101
+ type: Boolean,
102
+ required: false,
103
+ default: true
104
+ }
105
+ });
106
+
107
+ function dynamicText(property) {
108
+ if (property["$dynamic"] === true) {
109
+ return "✔️";
110
+ }
111
+
112
+ if (property["$dynamic"] === true) {
113
+ return "❌";
114
+ }
115
+
116
+ if (property.oneOf?.some(prop => prop["$dynamic"] === true)) {
117
+ return "✔️";
118
+ }
119
+
120
+ return "❌";
121
+ }
122
+
123
+ function requiredText(property) {
124
+ if (property["$required"] === true) {
125
+ return "✔️";
126
+ }
127
+
128
+ return property["$required"] === false ? "❌" : "❓";
129
+ }
130
+ </script>
@@ -0,0 +1,70 @@
1
+ <template>
2
+ <li>
3
+ <strong>Type: </strong>
4
+ <mark v-if="property.type" class="type-mark type-mark-default">
5
+ {{ property.type }}
6
+ </mark>
7
+ <a
8
+ aria-current="page"
9
+ v-else-if="property['$ref']"
10
+ :href="generateTaskHref(property['$ref'])"
11
+ class="router-link-active router-link-exact-active"
12
+ >
13
+ <mark class="type-mark type-mark-default">
14
+ {{ property['$ref']?.split('.').reverse()[0] }}
15
+ </mark>
16
+ </a>
17
+ <ul v-else-if="property.oneOf">
18
+ <li v-for="(oneOf, index) in property.oneOf" :key="index">
19
+ <mark class="type-mark type-mark-default">{{ oneOf.type }}</mark>
20
+ </li>
21
+ </ul>
22
+ <mark v-else class="type-mark type-mark-default">object</mark>
23
+ </li>
24
+
25
+ <li v-if="property.items ?? property.additionalProperties">
26
+ <strong>SubType: </strong>
27
+ <template v-if="property.items">
28
+ <a
29
+ aria-current="page"
30
+ v-if="property.items['$ref']"
31
+ :href="generateTaskHref(property.items['$ref'])"
32
+ class="router-link-active router-link-exact-active"
33
+ >
34
+ <mark class="type-mark type-mark-default">
35
+ {{ property.items['$ref'].split('.').reverse()[0] }}
36
+ </mark>
37
+ </a>
38
+ <mark v-else class="type-mark type-mark-default">{{ property.items.type }}</mark>
39
+ </template>
40
+ <template v-else-if="property.additionalProperties">
41
+ <a
42
+ aria-current="page"
43
+ v-if="property.additionalProperties['$ref']"
44
+ :href="generateTaskHref(property.additionalProperties['$ref'])"
45
+ class="router-link-active router-link-exact-active"
46
+ >
47
+ <mark class="type-mark type-mark-default">
48
+ {{ property.additionalProperties['$ref'].split('.').reverse()[0] }}
49
+ </mark>
50
+ </a>
51
+ <mark v-else class="type-mark type-mark-default">{{ property.additionalProperties.type }}</mark>
52
+ </template>
53
+ </li>
54
+ </template>
55
+
56
+ <script setup>
57
+ defineProps({
58
+ property: {
59
+ type: Object,
60
+ required: true,
61
+ }
62
+ });
63
+
64
+ const generateTaskHref = (href) => {
65
+ if (href) {
66
+ const taskHref = href?.split("/");
67
+ return `#${taskHref[taskHref?.length - 1]}`;
68
+ }
69
+ };
70
+ </script>
@@ -21,17 +21,16 @@
21
21
 
22
22
  <script>
23
23
  import {createPopper} from "@popperjs/core";
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";
29
24
  import ContentCopy from "vue-material-design-icons/ContentCopy.vue";
30
25
  import Check from "vue-material-design-icons/Check.vue";
31
26
  import {defineComponent, nextTick, shallowRef} from "vue";
32
27
 
33
28
  export default defineComponent({
34
29
  props: {
30
+ highlighter: {
31
+ type: Object,
32
+ required: true
33
+ },
35
34
  code: {
36
35
  type: String,
37
36
  default: ""
@@ -67,19 +66,8 @@
67
66
  },
68
67
  async created() {
69
68
  this.copyIcon = this.icons.ContentCopy;
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, {
69
+
70
+ this.codeData = this.highlighter.codeToHtml(this.code, {
83
71
  lang: this.language,
84
72
  theme: "github-dark",
85
73
  });