@knime/kds-code-editor 12.0.0 → 13.0.0
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 +9 -0
- package/dist/index.css +39 -22
- package/dist/index.js +12 -4
- package/dist/index.js.map +1 -1
- package/dist/src/CodeEditor/KdsCodeEditor.vue.d.ts.map +1 -1
- package/dist/src/CodeEditor/types.d.ts +3 -4
- package/dist/src/CodeEditor/types.d.ts.map +1 -1
- package/dist/src/_helper/BaseCodeEditor.vue.d.ts.map +1 -1
- package/dist/src/_helper/types.d.ts +4 -4
- package/dist/src/_helper/types.d.ts.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @knime/kds-code-editor
|
|
2
2
|
|
|
3
|
+
## 13.0.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 257418c: - `KdsCodeEditor`: `highlighted` now shows a teal indicator bar on top of the editor instead of the focus outline, so the active editor of a list no longer looks focused. The focus outline only shows while the code area has focus.
|
|
8
|
+
- Updated dependencies [d61ae48]
|
|
9
|
+
- @knime/kds-components@13.0.0
|
|
10
|
+
- @knime/kds-styles@13.0.0
|
|
11
|
+
|
|
3
12
|
## 12.0.0
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/dist/index.css
CHANGED
|
@@ -1,13 +1,31 @@
|
|
|
1
1
|
|
|
2
2
|
.kds-code-editor {
|
|
3
|
-
&[data-v-
|
|
3
|
+
&[data-v-39e24561] {
|
|
4
|
+
position: relative;
|
|
4
5
|
display: flex;
|
|
5
6
|
flex-direction: column;
|
|
7
|
+
isolation: isolate;
|
|
6
8
|
|
|
7
9
|
/* No row bounds set: fill the width and height of the container. */
|
|
8
10
|
}
|
|
11
|
+
&.active[data-v-39e24561]::before {
|
|
12
|
+
position: absolute;
|
|
13
|
+
top: 0;
|
|
14
|
+
right: 0;
|
|
15
|
+
left: 0;
|
|
16
|
+
z-index: 1;
|
|
17
|
+
height: calc(
|
|
18
|
+
var(--kds-border-radius-container-0-50x) +
|
|
19
|
+
var(--kds-dimension-component-height-0-25x)
|
|
20
|
+
);
|
|
21
|
+
content: "";
|
|
22
|
+
border-top: var(--kds-dimension-component-height-0-25x) solid
|
|
23
|
+
var(--kds-color-background-selected-bold-initial);
|
|
24
|
+
border-radius: var(--kds-border-radius-container-0-44x)
|
|
25
|
+
var(--kds-border-radius-container-0-44x) 0 0;
|
|
26
|
+
}
|
|
9
27
|
.editor {
|
|
10
|
-
&[data-v-
|
|
28
|
+
&[data-v-39e24561] {
|
|
11
29
|
display: flex;
|
|
12
30
|
flex-direction: column;
|
|
13
31
|
overflow: hidden;
|
|
@@ -15,19 +33,18 @@
|
|
|
15
33
|
border: var(--kds-border-base-subtle);
|
|
16
34
|
border-radius: var(--kds-border-radius-container-0-50x);
|
|
17
35
|
|
|
18
|
-
/* Outline the whole editor while the code area (Monaco) is focused
|
|
19
|
-
|
|
20
|
-
buttons keep their own focus ring either way. */
|
|
36
|
+
/* Outline the whole editor while the code area (Monaco) is focused —
|
|
37
|
+
header buttons keep their own focus ring. */
|
|
21
38
|
|
|
22
39
|
/* Keeps its natural height — in fill mode only the code area grows /
|
|
23
40
|
shrinks with the container. */
|
|
24
41
|
}
|
|
25
|
-
&.focused[data-v-
|
|
42
|
+
&.focused[data-v-39e24561] {
|
|
26
43
|
outline: var(--kds-border-action-focused);
|
|
27
44
|
outline-offset: var(--kds-spacing-offset-focus);
|
|
28
45
|
}
|
|
29
46
|
.header {
|
|
30
|
-
&[data-v-
|
|
47
|
+
&[data-v-39e24561] {
|
|
31
48
|
display: flex;
|
|
32
49
|
align-items: center;
|
|
33
50
|
justify-content: space-between;
|
|
@@ -37,7 +54,7 @@
|
|
|
37
54
|
|
|
38
55
|
/* Visually hidden, still announced by screen readers. */
|
|
39
56
|
}
|
|
40
|
-
.left-block[data-v-
|
|
57
|
+
.left-block[data-v-39e24561] {
|
|
41
58
|
display: flex;
|
|
42
59
|
flex: 1;
|
|
43
60
|
gap: var(--kds-spacing-container-0-25x);
|
|
@@ -48,13 +65,13 @@
|
|
|
48
65
|
buttons are present (matches the small button height). */
|
|
49
66
|
min-height: var(--kds-dimension-component-height-1-5x);
|
|
50
67
|
}
|
|
51
|
-
.action-buttons[data-v-
|
|
68
|
+
.action-buttons[data-v-39e24561] {
|
|
52
69
|
display: flex;
|
|
53
70
|
flex-shrink: 0;
|
|
54
71
|
gap: var(--kds-spacing-container-0-12x);
|
|
55
72
|
align-items: center;
|
|
56
73
|
}
|
|
57
|
-
.title[data-v-
|
|
74
|
+
.title[data-v-39e24561] {
|
|
58
75
|
overflow: hidden;
|
|
59
76
|
text-overflow: ellipsis;
|
|
60
77
|
font: var(--kds-font-base-interactive-small);
|
|
@@ -62,7 +79,7 @@
|
|
|
62
79
|
white-space: nowrap;
|
|
63
80
|
}
|
|
64
81
|
.change-counts {
|
|
65
|
-
&[data-v-
|
|
82
|
+
&[data-v-39e24561] {
|
|
66
83
|
display: flex;
|
|
67
84
|
flex-shrink: 0;
|
|
68
85
|
gap: var(--kds-spacing-container-0-12x);
|
|
@@ -73,14 +90,14 @@
|
|
|
73
90
|
margin-left: var(--kds-spacing-container-0-25x);
|
|
74
91
|
font: var(--kds-font-base-interactive-small);
|
|
75
92
|
}
|
|
76
|
-
.added-lines[data-v-
|
|
93
|
+
.added-lines[data-v-39e24561] {
|
|
77
94
|
color: var(--kds-color-text-and-icon-success);
|
|
78
95
|
}
|
|
79
|
-
.removed-lines[data-v-
|
|
96
|
+
.removed-lines[data-v-39e24561] {
|
|
80
97
|
color: var(--kds-color-text-and-icon-danger);
|
|
81
98
|
}
|
|
82
99
|
}
|
|
83
|
-
.change-counts-for-screen-readers[data-v-
|
|
100
|
+
.change-counts-for-screen-readers[data-v-39e24561] {
|
|
84
101
|
position: absolute;
|
|
85
102
|
width: 1px;
|
|
86
103
|
height: 1px;
|
|
@@ -92,33 +109,33 @@
|
|
|
92
109
|
clip-path: inset(50%);
|
|
93
110
|
}
|
|
94
111
|
}
|
|
95
|
-
&.error .header[data-v-
|
|
112
|
+
&.error .header[data-v-39e24561] {
|
|
96
113
|
background-color: var(--kds-color-background-static-danger-muted);
|
|
97
114
|
}
|
|
98
|
-
&.warning .header[data-v-
|
|
115
|
+
&.warning .header[data-v-39e24561] {
|
|
99
116
|
background-color: var(--kds-color-background-static-warning-muted);
|
|
100
117
|
}
|
|
101
|
-
.code[data-v-
|
|
118
|
+
.code[data-v-39e24561] {
|
|
102
119
|
width: 100%;
|
|
103
120
|
}
|
|
104
|
-
.footer[data-v-
|
|
121
|
+
.footer[data-v-39e24561] {
|
|
105
122
|
flex-shrink: 0;
|
|
106
123
|
width: 100%;
|
|
107
124
|
}
|
|
108
125
|
}
|
|
109
126
|
&.fill {
|
|
110
|
-
&[data-v-
|
|
127
|
+
&[data-v-39e24561] {
|
|
111
128
|
width: 100%;
|
|
112
129
|
height: 100%;
|
|
113
130
|
|
|
114
131
|
/* A collapsed editor keeps its header height instead of stretching. */
|
|
115
132
|
}
|
|
116
|
-
.editor[data-v-
|
|
117
|
-
.code[data-v-
|
|
133
|
+
.editor[data-v-39e24561],
|
|
134
|
+
.code[data-v-39e24561] {
|
|
118
135
|
flex: 1 1 auto;
|
|
119
136
|
min-height: 0;
|
|
120
137
|
}
|
|
121
|
-
.editor.collapsed[data-v-
|
|
138
|
+
.editor.collapsed[data-v-39e24561] {
|
|
122
139
|
flex: 0 0 auto;
|
|
123
140
|
}
|
|
124
141
|
}
|
package/dist/index.js
CHANGED
|
@@ -70,6 +70,10 @@ var BaseCodeEditor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
70
70
|
type: Boolean,
|
|
71
71
|
default: false
|
|
72
72
|
},
|
|
73
|
+
showActiveIndicator: {
|
|
74
|
+
type: Boolean,
|
|
75
|
+
default: false
|
|
76
|
+
},
|
|
73
77
|
fill: {
|
|
74
78
|
type: Boolean,
|
|
75
79
|
default: false
|
|
@@ -92,7 +96,10 @@ var BaseCodeEditor_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
92
96
|
/** The element Monaco should be mounted into. */
|
|
93
97
|
getCodeContainer: () => codeContainer.value });
|
|
94
98
|
return (_ctx, _cache) => {
|
|
95
|
-
return openBlock(), createElementBlock("div", { class: normalizeClass(["kds-code-editor", {
|
|
99
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass(["kds-code-editor", {
|
|
100
|
+
fill: __props.fill,
|
|
101
|
+
active: __props.showActiveIndicator
|
|
102
|
+
}]) }, [createElementVNode("div", { class: normalizeClass([
|
|
96
103
|
"editor",
|
|
97
104
|
__props.state,
|
|
98
105
|
{
|
|
@@ -176,7 +183,7 @@ var _plugin_vue_export_helper_default = (sfc, props) => {
|
|
|
176
183
|
};
|
|
177
184
|
//#endregion
|
|
178
185
|
//#region src/_helper/BaseCodeEditor.vue
|
|
179
|
-
var BaseCodeEditor_default = /*#__PURE__*/ _plugin_vue_export_helper_default(BaseCodeEditor_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
186
|
+
var BaseCodeEditor_default = /*#__PURE__*/ _plugin_vue_export_helper_default(BaseCodeEditor_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-39e24561"]]);
|
|
180
187
|
//#endregion
|
|
181
188
|
//#region ../styles/dist/tokens/ts/color.js
|
|
182
189
|
/**
|
|
@@ -5945,7 +5952,6 @@ var KdsCodeEditor_default = /* @__PURE__ */ defineComponent({
|
|
|
5945
5952
|
let editorInstance;
|
|
5946
5953
|
let overflowWidgetsDomNode;
|
|
5947
5954
|
const isEditorFocused = ref(false);
|
|
5948
|
-
const showFocusHighlight = computed(() => isEditorFocused.value || __props.highlighted);
|
|
5949
5955
|
const headerLabel = computed(() => __props.languageLabel ?? __props.language.toUpperCase());
|
|
5950
5956
|
const editorAriaLabel = computed(() => `${headerLabel.value} code editor${__props.readOnly ? ", read-only" : ""}. Press Escape followed by Tab to move focus out of the editor.`);
|
|
5951
5957
|
const fillContainer = computed(() => __props.minRows === void 0 && __props.maxRows === void 0);
|
|
@@ -6057,7 +6063,8 @@ getEditor: () => editorInstance });
|
|
|
6057
6063
|
copied: unref(copied),
|
|
6058
6064
|
"copy-button-aria-label": copyButtonAriaLabel.value,
|
|
6059
6065
|
"editor-actions": __props.editorActions,
|
|
6060
|
-
"show-focus-highlight":
|
|
6066
|
+
"show-focus-highlight": isEditorFocused.value,
|
|
6067
|
+
"show-active-indicator": __props.highlighted,
|
|
6061
6068
|
fill: fillContainer.value,
|
|
6062
6069
|
"code-height": editorHeight.value,
|
|
6063
6070
|
onCopy: copyToClipboard
|
|
@@ -6082,6 +6089,7 @@ getEditor: () => editorInstance });
|
|
|
6082
6089
|
"copy-button-aria-label",
|
|
6083
6090
|
"editor-actions",
|
|
6084
6091
|
"show-focus-highlight",
|
|
6092
|
+
"show-active-indicator",
|
|
6085
6093
|
"fill",
|
|
6086
6094
|
"code-height"
|
|
6087
6095
|
]);
|