bkui-vue 0.0.1-beta.31 → 0.0.1-beta.32
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/bkui-vue.cjs.js +7 -3
- package/dist/bkui-vue.esm.js +7 -3
- package/dist/bkui-vue.umd.js +7 -3
- package/dist/style.css +57 -1
- package/lib/code-diff/code-diff.css +72 -1
- package/lib/code-diff/code-diff.d.ts +9 -0
- package/lib/code-diff/code-diff.less +94 -1
- package/lib/code-diff/code-diff.variable.css +72 -1
- package/lib/code-diff/index.d.ts +12 -0
- package/lib/code-diff/index.js +1 -15
- package/lib/table/index.d.ts +1 -1
- package/lib/table/index.js +2 -2
- package/lib/table/render.d.ts +8 -0
- package/lib/table/table.d.ts +1 -1
- package/package.json +1 -1
package/dist/bkui-vue.cjs.js
CHANGED
@@ -12657,7 +12657,8 @@ class TableRender {
|
|
12657
12657
|
};
|
12658
12658
|
return vue.createVNode("tr", {
|
12659
12659
|
"style": rowStyle,
|
12660
|
-
"onClick": (e) => this.handleRowClick(e, row, index, rows)
|
12660
|
+
"onClick": (e) => this.handleRowClick(e, row, index, rows),
|
12661
|
+
"onDblclick": (e) => this.handleRowDblClick(e, row, index, rows)
|
12661
12662
|
}, [this.props.columns.map((column) => vue.createVNode("td", {
|
12662
12663
|
"colspan": 1,
|
12663
12664
|
"rowspan": 1
|
@@ -12667,7 +12668,10 @@ class TableRender {
|
|
12667
12668
|
})]);
|
12668
12669
|
}
|
12669
12670
|
handleRowClick(e, row, index, rows) {
|
12670
|
-
this.context.emit("
|
12671
|
+
this.context.emit("rowClick", e, row, index, rows, this);
|
12672
|
+
}
|
12673
|
+
handleRowDblClick(e, row, index, rows) {
|
12674
|
+
this.context.emit("rowDblClick", e, row, index, rows, this);
|
12671
12675
|
}
|
12672
12676
|
renderCell(row, column, index, rows) {
|
12673
12677
|
const cell = row[resolvePropVal(column, "field", [column, row])];
|
@@ -12697,7 +12701,7 @@ class TableRender {
|
|
12697
12701
|
var Component$4 = vue.defineComponent({
|
12698
12702
|
name: "Table",
|
12699
12703
|
props: tableProps,
|
12700
|
-
emits: ["columnPick", "rowClick", "pageLimitChange", "pageValueChange"],
|
12704
|
+
emits: ["columnPick", "rowClick", "rowDblClick", "pageLimitChange", "pageValueChange"],
|
12701
12705
|
setup(props, ctx) {
|
12702
12706
|
const activeCols = vue.reactive(resolveActiveColumns(props));
|
12703
12707
|
const colgroups = vue.reactive(props.columns.map((col) => __spreadProps(__spreadValues({}, col), {
|
package/dist/bkui-vue.esm.js
CHANGED
@@ -12655,7 +12655,8 @@ class TableRender {
|
|
12655
12655
|
};
|
12656
12656
|
return createVNode("tr", {
|
12657
12657
|
"style": rowStyle,
|
12658
|
-
"onClick": (e) => this.handleRowClick(e, row, index, rows)
|
12658
|
+
"onClick": (e) => this.handleRowClick(e, row, index, rows),
|
12659
|
+
"onDblclick": (e) => this.handleRowDblClick(e, row, index, rows)
|
12659
12660
|
}, [this.props.columns.map((column) => createVNode("td", {
|
12660
12661
|
"colspan": 1,
|
12661
12662
|
"rowspan": 1
|
@@ -12665,7 +12666,10 @@ class TableRender {
|
|
12665
12666
|
})]);
|
12666
12667
|
}
|
12667
12668
|
handleRowClick(e, row, index, rows) {
|
12668
|
-
this.context.emit("
|
12669
|
+
this.context.emit("rowClick", e, row, index, rows, this);
|
12670
|
+
}
|
12671
|
+
handleRowDblClick(e, row, index, rows) {
|
12672
|
+
this.context.emit("rowDblClick", e, row, index, rows, this);
|
12669
12673
|
}
|
12670
12674
|
renderCell(row, column, index, rows) {
|
12671
12675
|
const cell = row[resolvePropVal(column, "field", [column, row])];
|
@@ -12695,7 +12699,7 @@ class TableRender {
|
|
12695
12699
|
var Component$4 = defineComponent({
|
12696
12700
|
name: "Table",
|
12697
12701
|
props: tableProps,
|
12698
|
-
emits: ["columnPick", "rowClick", "pageLimitChange", "pageValueChange"],
|
12702
|
+
emits: ["columnPick", "rowClick", "rowDblClick", "pageLimitChange", "pageValueChange"],
|
12699
12703
|
setup(props, ctx) {
|
12700
12704
|
const activeCols = reactive(resolveActiveColumns(props));
|
12701
12705
|
const colgroups = reactive(props.columns.map((col) => __spreadProps(__spreadValues({}, col), {
|
package/dist/bkui-vue.umd.js
CHANGED
@@ -12658,7 +12658,8 @@ ${$(r2)}`), n2;
|
|
12658
12658
|
};
|
12659
12659
|
return vue.createVNode("tr", {
|
12660
12660
|
"style": rowStyle,
|
12661
|
-
"onClick": (e) => this.handleRowClick(e, row, index, rows)
|
12661
|
+
"onClick": (e) => this.handleRowClick(e, row, index, rows),
|
12662
|
+
"onDblclick": (e) => this.handleRowDblClick(e, row, index, rows)
|
12662
12663
|
}, [this.props.columns.map((column) => vue.createVNode("td", {
|
12663
12664
|
"colspan": 1,
|
12664
12665
|
"rowspan": 1
|
@@ -12668,7 +12669,10 @@ ${$(r2)}`), n2;
|
|
12668
12669
|
})]);
|
12669
12670
|
}
|
12670
12671
|
handleRowClick(e, row, index, rows) {
|
12671
|
-
this.context.emit("
|
12672
|
+
this.context.emit("rowClick", e, row, index, rows, this);
|
12673
|
+
}
|
12674
|
+
handleRowDblClick(e, row, index, rows) {
|
12675
|
+
this.context.emit("rowDblClick", e, row, index, rows, this);
|
12672
12676
|
}
|
12673
12677
|
renderCell(row, column, index, rows) {
|
12674
12678
|
const cell = row[resolvePropVal(column, "field", [column, row])];
|
@@ -12698,7 +12702,7 @@ ${$(r2)}`), n2;
|
|
12698
12702
|
var Component$4 = vue.defineComponent({
|
12699
12703
|
name: "Table",
|
12700
12704
|
props: tableProps,
|
12701
|
-
emits: ["columnPick", "rowClick", "pageLimitChange", "pageValueChange"],
|
12705
|
+
emits: ["columnPick", "rowClick", "rowDblClick", "pageLimitChange", "pageValueChange"],
|
12702
12706
|
setup(props, ctx) {
|
12703
12707
|
const activeCols = vue.reactive(resolveActiveColumns(props));
|
12704
12708
|
const colgroups = vue.reactive(props.columns.map((col) => __spreadProps(__spreadValues({}, col), {
|
package/dist/style.css
CHANGED
@@ -5278,10 +5278,66 @@ span.bk-date-picker-cells-cell-disabled.bk-date-picker-cells-cell-selected em {
|
|
5278
5278
|
text-align: left;
|
5279
5279
|
align-items: center;
|
5280
5280
|
}
|
5281
|
-
|
5281
|
+
.d2h-d-none{display:none}.d2h-wrapper{text-align:left}.d2h-file-header{background-color:#f7f7f7;border-bottom:1px solid #d8d8d8;font-family:Source Sans Pro,Helvetica Neue,Helvetica,Arial,sans-serif;height:35px;padding:5px 10px}.d2h-file-header,.d2h-file-stats{display:-webkit-box;display:-ms-flexbox;display:flex}.d2h-file-stats{font-size:14px;margin-left:auto}.d2h-lines-added{border:1px solid #b4e2b4;border-radius:5px 0 0 5px;color:#399839;padding:2px;text-align:right;vertical-align:middle}.d2h-lines-deleted{border:1px solid #e9aeae;border-radius:0 5px 5px 0;color:#c33;margin-left:1px;padding:2px;text-align:left;vertical-align:middle}.d2h-file-name-wrapper{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;font-size:15px;width:100%}.d2h-file-name{overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap}.d2h-file-wrapper{border:1px solid #ddd;border-radius:3px;margin-bottom:1em}.d2h-file-collapse{-webkit-box-pack:end;-ms-flex-pack:end;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border:1px solid #ddd;border-radius:3px;cursor:pointer;display:none;font-size:12px;justify-content:flex-end;padding:4px 8px}.d2h-file-collapse.d2h-selected{background-color:#c8e1ff}.d2h-file-collapse-input{margin:0 4px 0 0}.d2h-diff-table{border-collapse:collapse;font-family:Menlo,Consolas,monospace;font-size:13px;width:100%}.d2h-files-diff{width:100%}.d2h-file-diff{overflow-y:hidden}.d2h-file-side-diff{display:inline-block;margin-bottom:-8px;margin-right:-4px;overflow-x:scroll;overflow-y:hidden;width:50%}.d2h-code-line{padding:0 8em}.d2h-code-line,.d2h-code-side-line{display:inline-block;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;width:100%}.d2h-code-side-line{padding:0 4.5em}.d2h-code-line-ctn{word-wrap:normal;background:none;display:inline-block;padding:0;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;vertical-align:middle;white-space:pre;width:100%}.d2h-code-line del,.d2h-code-side-line del{background-color:#ffb6ba}.d2h-code-line del,.d2h-code-line ins,.d2h-code-side-line del,.d2h-code-side-line ins{border-radius:.2em;display:inline-block;margin-top:-1px;text-decoration:none;vertical-align:middle}.d2h-code-line ins,.d2h-code-side-line ins{background-color:#97f295;text-align:left}.d2h-code-line-prefix{word-wrap:normal;background:none;display:inline;padding:0;white-space:pre}.line-num1{float:left}.line-num1,.line-num2{-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;padding:0 .5em;text-overflow:ellipsis;width:3.5em}.line-num2{float:right}.d2h-code-linenumber{background-color:#fff;border:solid #eee;border-width:0 1px;-webkit-box-sizing:border-box;box-sizing:border-box;color:rgba(0,0,0,.3);cursor:pointer;display:inline-block;position:absolute;text-align:right;width:7.5em}.d2h-code-linenumber:after{content:"\200b"}.d2h-code-side-linenumber{background-color:#fff;border:solid #eee;border-width:0 1px;-webkit-box-sizing:border-box;box-sizing:border-box;color:rgba(0,0,0,.3);cursor:pointer;display:inline-block;overflow:hidden;padding:0 .5em;position:absolute;text-align:right;text-overflow:ellipsis;width:4em}.d2h-code-side-linenumber:after{content:"\200b"}.d2h-code-side-emptyplaceholder,.d2h-emptyplaceholder{background-color:#f1f1f1;border-color:#e1e1e1}.d2h-code-line-prefix,.d2h-code-linenumber,.d2h-code-side-linenumber,.d2h-emptyplaceholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.d2h-code-linenumber,.d2h-code-side-linenumber{direction:rtl}.d2h-del{background-color:#fee8e9;border-color:#e9aeae}.d2h-ins{background-color:#dfd;border-color:#b4e2b4}.d2h-info{background-color:#f8fafd;border-color:#d5e4f2;color:rgba(0,0,0,.3)}.d2h-file-diff .d2h-del.d2h-change{background-color:#fdf2d0}.d2h-file-diff .d2h-ins.d2h-change{background-color:#ded}.d2h-file-list-wrapper{margin-bottom:10px}.d2h-file-list-wrapper a{color:#3572b0;text-decoration:none}.d2h-file-list-wrapper a:visited{color:#3572b0}.d2h-file-list-header{text-align:left}.d2h-file-list-title{font-weight:700}.d2h-file-list-line{display:-webkit-box;display:-ms-flexbox;display:flex;text-align:left}.d2h-file-list{display:block;list-style:none;margin:0;padding:0}.d2h-file-list>li{border-bottom:1px solid #ddd;margin:0;padding:5px 10px}.d2h-file-list>li:last-child{border-bottom:none}.d2h-file-switch{cursor:pointer;display:none;font-size:10px}.d2h-icon{fill:currentColor;margin-right:10px;vertical-align:middle}.d2h-deleted{color:#c33}.d2h-added{color:#399839}.d2h-changed{color:#d0b44c}.d2h-moved{color:#3572b0}.d2h-tag{background-color:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;font-size:10px;margin-left:5px;padding:0 2px}.d2h-deleted-tag{border:1px solid #c33}.d2h-added-tag{border:1px solid #399839}.d2h-changed-tag{border:1px solid #d0b44c}.d2h-moved-tag{border:1px solid #3572b0}/* stylelint-disable declaration-no-important */.bk-code-diff {
|
5282
5282
|
position: relative;
|
5283
5283
|
}.bk-code-diff .d2h-file-header {
|
5284
5284
|
display: none;
|
5285
|
+
}.bk-code-diff .hljs {
|
5286
|
+
color: #000;
|
5287
|
+
background: #fff;
|
5288
|
+
}.bk-code-diff .hljs-comment,
|
5289
|
+
.bk-code-diff .hljs-quote {
|
5290
|
+
color: #800;
|
5291
|
+
}.bk-code-diff .hljs-keyword,
|
5292
|
+
.bk-code-diff .hljs-name,
|
5293
|
+
.bk-code-diff .hljs-section,
|
5294
|
+
.bk-code-diff .hljs-selector-tag,
|
5295
|
+
.bk-code-diff .hljs-title {
|
5296
|
+
color: #008;
|
5297
|
+
}.bk-code-diff .hljs-template-variable,
|
5298
|
+
.bk-code-diff .hljs-variable {
|
5299
|
+
color: #660;
|
5300
|
+
}.bk-code-diff .hljs-regexp,
|
5301
|
+
.bk-code-diff .hljs-selector-attr,
|
5302
|
+
.bk-code-diff .hljs-selector-pseudo,
|
5303
|
+
.bk-code-diff .hljs-string {
|
5304
|
+
color: #080;
|
5305
|
+
}.bk-code-diff .hljs-bullet,
|
5306
|
+
.bk-code-diff .hljs-link,
|
5307
|
+
.bk-code-diff .hljs-literal,
|
5308
|
+
.bk-code-diff .hljs-meta,
|
5309
|
+
.bk-code-diff .hljs-number,
|
5310
|
+
.bk-code-diff .hljs-symbol {
|
5311
|
+
color: #066;
|
5312
|
+
}.bk-code-diff .hljs-attr,
|
5313
|
+
.bk-code-diff .hljs-built_in,
|
5314
|
+
.bk-code-diff .hljs-doctag,
|
5315
|
+
.bk-code-diff .hljs-params,
|
5316
|
+
.bk-code-diff .hljs-title,
|
5317
|
+
.bk-code-diff .hljs-type {
|
5318
|
+
color: #606;
|
5319
|
+
}.bk-code-diff .hljs-attribute,
|
5320
|
+
.bk-code-diff .hljs-subst {
|
5321
|
+
color: #000;
|
5322
|
+
}.bk-code-diff .hljs-formula {
|
5323
|
+
font-style: italic;
|
5324
|
+
background-color: #eee;
|
5325
|
+
}.bk-code-diff .hljs-selector-class,
|
5326
|
+
.bk-code-diff .hljs-selector-id {
|
5327
|
+
color: #9b703f;
|
5328
|
+
}.bk-code-diff .hljs-addition {
|
5329
|
+
background-color: #baeeba;
|
5330
|
+
}.bk-code-diff .hljs-deletion {
|
5331
|
+
background-color: #ffc8bd;
|
5332
|
+
}.bk-code-diff .hljs-doctag,
|
5333
|
+
.bk-code-diff .hljs-strong {
|
5334
|
+
font-weight: 700;
|
5335
|
+
}.bk-code-diff .hljs-emphasis {
|
5336
|
+
font-style: italic;
|
5337
|
+
}.bk-code-diff .d2h-del .hljs {
|
5338
|
+
background: transparent;
|
5339
|
+
}.bk-code-diff .d2h-ins .hljs {
|
5340
|
+
background: transparent;
|
5285
5341
|
}.bk-code-diff.dark {
|
5286
5342
|
color: #abb2bf !important;
|
5287
5343
|
background: #282c34;
|
@@ -1,4 +1,3 @@
|
|
1
|
-
@import 'highlight.js/styles/googlecode.css';
|
2
1
|
@import 'diff2html/bundles/css/diff2html.min.css';
|
3
2
|
/* stylelint-disable declaration-no-important */
|
4
3
|
.bk-code-diff {
|
@@ -7,6 +6,78 @@
|
|
7
6
|
.bk-code-diff .d2h-file-header {
|
8
7
|
display: none;
|
9
8
|
}
|
9
|
+
.bk-code-diff .hljs {
|
10
|
+
color: #000;
|
11
|
+
background: #fff;
|
12
|
+
}
|
13
|
+
.bk-code-diff .hljs-comment,
|
14
|
+
.bk-code-diff .hljs-quote {
|
15
|
+
color: #800;
|
16
|
+
}
|
17
|
+
.bk-code-diff .hljs-keyword,
|
18
|
+
.bk-code-diff .hljs-name,
|
19
|
+
.bk-code-diff .hljs-section,
|
20
|
+
.bk-code-diff .hljs-selector-tag,
|
21
|
+
.bk-code-diff .hljs-title {
|
22
|
+
color: #008;
|
23
|
+
}
|
24
|
+
.bk-code-diff .hljs-template-variable,
|
25
|
+
.bk-code-diff .hljs-variable {
|
26
|
+
color: #660;
|
27
|
+
}
|
28
|
+
.bk-code-diff .hljs-regexp,
|
29
|
+
.bk-code-diff .hljs-selector-attr,
|
30
|
+
.bk-code-diff .hljs-selector-pseudo,
|
31
|
+
.bk-code-diff .hljs-string {
|
32
|
+
color: #080;
|
33
|
+
}
|
34
|
+
.bk-code-diff .hljs-bullet,
|
35
|
+
.bk-code-diff .hljs-link,
|
36
|
+
.bk-code-diff .hljs-literal,
|
37
|
+
.bk-code-diff .hljs-meta,
|
38
|
+
.bk-code-diff .hljs-number,
|
39
|
+
.bk-code-diff .hljs-symbol {
|
40
|
+
color: #066;
|
41
|
+
}
|
42
|
+
.bk-code-diff .hljs-attr,
|
43
|
+
.bk-code-diff .hljs-built_in,
|
44
|
+
.bk-code-diff .hljs-doctag,
|
45
|
+
.bk-code-diff .hljs-params,
|
46
|
+
.bk-code-diff .hljs-title,
|
47
|
+
.bk-code-diff .hljs-type {
|
48
|
+
color: #606;
|
49
|
+
}
|
50
|
+
.bk-code-diff .hljs-attribute,
|
51
|
+
.bk-code-diff .hljs-subst {
|
52
|
+
color: #000;
|
53
|
+
}
|
54
|
+
.bk-code-diff .hljs-formula {
|
55
|
+
font-style: italic;
|
56
|
+
background-color: #eee;
|
57
|
+
}
|
58
|
+
.bk-code-diff .hljs-selector-class,
|
59
|
+
.bk-code-diff .hljs-selector-id {
|
60
|
+
color: #9b703f;
|
61
|
+
}
|
62
|
+
.bk-code-diff .hljs-addition {
|
63
|
+
background-color: #baeeba;
|
64
|
+
}
|
65
|
+
.bk-code-diff .hljs-deletion {
|
66
|
+
background-color: #ffc8bd;
|
67
|
+
}
|
68
|
+
.bk-code-diff .hljs-doctag,
|
69
|
+
.bk-code-diff .hljs-strong {
|
70
|
+
font-weight: 700;
|
71
|
+
}
|
72
|
+
.bk-code-diff .hljs-emphasis {
|
73
|
+
font-style: italic;
|
74
|
+
}
|
75
|
+
.bk-code-diff .d2h-del .hljs {
|
76
|
+
background: transparent;
|
77
|
+
}
|
78
|
+
.bk-code-diff .d2h-ins .hljs {
|
79
|
+
background: transparent;
|
80
|
+
}
|
10
81
|
.bk-code-diff.dark {
|
11
82
|
color: #abb2bf !important;
|
12
83
|
background: #282c34;
|
@@ -23,6 +23,9 @@ export declare const codeDiffProps: {
|
|
23
23
|
language: import("vue-types").VueTypeValidableDef<"ruby" | "css" | "java" | "javascript" | "json" | "scss" | "less" | "stylus" | "shell" | "bash" | "cpp" | "go" | "xml" | "python" | "typescript" | "sql" | "vim" | "php" | "perl" | "powershell" | "makefile"> & {
|
24
24
|
default: "ruby" | "css" | "java" | "javascript" | "json" | "scss" | "less" | "stylus" | "shell" | "bash" | "cpp" | "go" | "xml" | "python" | "typescript" | "sql" | "vim" | "php" | "perl" | "powershell" | "makefile";
|
25
25
|
};
|
26
|
+
hljs: import("vue-types").VueTypeValidableDef<any> & {
|
27
|
+
required: true;
|
28
|
+
};
|
26
29
|
};
|
27
30
|
export declare type CodeDiffPropsType = ExtractPropTypes<typeof codeDiffProps>;
|
28
31
|
declare const _default: import("vue").DefineComponent<{
|
@@ -42,6 +45,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
42
45
|
language: import("vue-types").VueTypeValidableDef<"ruby" | "css" | "java" | "javascript" | "json" | "scss" | "less" | "stylus" | "shell" | "bash" | "cpp" | "go" | "xml" | "python" | "typescript" | "sql" | "vim" | "php" | "perl" | "powershell" | "makefile"> & {
|
43
46
|
default: "ruby" | "css" | "java" | "javascript" | "json" | "scss" | "less" | "stylus" | "shell" | "bash" | "cpp" | "go" | "xml" | "python" | "typescript" | "sql" | "vim" | "php" | "perl" | "powershell" | "makefile";
|
44
47
|
};
|
48
|
+
hljs: import("vue-types").VueTypeValidableDef<any> & {
|
49
|
+
required: true;
|
50
|
+
};
|
45
51
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any[], any, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
46
52
|
oldContent: import("vue-types").VueTypeValidableDef<string> & {
|
47
53
|
default: string;
|
@@ -59,6 +65,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
59
65
|
language: import("vue-types").VueTypeValidableDef<"ruby" | "css" | "java" | "javascript" | "json" | "scss" | "less" | "stylus" | "shell" | "bash" | "cpp" | "go" | "xml" | "python" | "typescript" | "sql" | "vim" | "php" | "perl" | "powershell" | "makefile"> & {
|
60
66
|
default: "ruby" | "css" | "java" | "javascript" | "json" | "scss" | "less" | "stylus" | "shell" | "bash" | "cpp" | "go" | "xml" | "python" | "typescript" | "sql" | "vim" | "php" | "perl" | "powershell" | "makefile";
|
61
67
|
};
|
68
|
+
hljs: import("vue-types").VueTypeValidableDef<any> & {
|
69
|
+
required: true;
|
70
|
+
};
|
62
71
|
}>> & {
|
63
72
|
[x: string & `on${any}`]: (...args: any[]) => any;
|
64
73
|
}, {
|
@@ -1,7 +1,8 @@
|
|
1
1
|
@import '../styles/themes/themes.less';
|
2
|
-
@import 'highlight.js/styles/googlecode.css';
|
3
2
|
@import 'diff2html/bundles/css/diff2html.min.css';
|
4
3
|
|
4
|
+
// TODO: theme var
|
5
|
+
|
5
6
|
/* stylelint-disable declaration-no-important */
|
6
7
|
.@{bk-prefix}-code-diff {
|
7
8
|
position: relative;
|
@@ -10,6 +11,98 @@
|
|
10
11
|
display: none;
|
11
12
|
}
|
12
13
|
|
14
|
+
.hljs {
|
15
|
+
color: #000;
|
16
|
+
background: #fff;
|
17
|
+
}
|
18
|
+
|
19
|
+
.hljs-comment,
|
20
|
+
.hljs-quote {
|
21
|
+
color: #800;
|
22
|
+
}
|
23
|
+
|
24
|
+
.hljs-keyword,
|
25
|
+
.hljs-name,
|
26
|
+
.hljs-section,
|
27
|
+
.hljs-selector-tag,
|
28
|
+
.hljs-title {
|
29
|
+
color: #008;
|
30
|
+
}
|
31
|
+
|
32
|
+
.hljs-template-variable,
|
33
|
+
.hljs-variable {
|
34
|
+
color: #660;
|
35
|
+
}
|
36
|
+
|
37
|
+
.hljs-regexp,
|
38
|
+
.hljs-selector-attr,
|
39
|
+
.hljs-selector-pseudo,
|
40
|
+
.hljs-string {
|
41
|
+
color: #080;
|
42
|
+
}
|
43
|
+
|
44
|
+
.hljs-bullet,
|
45
|
+
.hljs-link,
|
46
|
+
.hljs-literal,
|
47
|
+
.hljs-meta,
|
48
|
+
.hljs-number,
|
49
|
+
.hljs-symbol {
|
50
|
+
color: #066;
|
51
|
+
}
|
52
|
+
|
53
|
+
.hljs-attr,
|
54
|
+
.hljs-built_in,
|
55
|
+
.hljs-doctag,
|
56
|
+
.hljs-params,
|
57
|
+
.hljs-title,
|
58
|
+
.hljs-type {
|
59
|
+
color: #606;
|
60
|
+
}
|
61
|
+
|
62
|
+
.hljs-attribute,
|
63
|
+
.hljs-subst {
|
64
|
+
color: #000;
|
65
|
+
}
|
66
|
+
|
67
|
+
.hljs-formula {
|
68
|
+
font-style: italic;
|
69
|
+
background-color: #eee;
|
70
|
+
}
|
71
|
+
|
72
|
+
.hljs-selector-class,
|
73
|
+
.hljs-selector-id {
|
74
|
+
color: #9b703f;
|
75
|
+
}
|
76
|
+
|
77
|
+
.hljs-addition {
|
78
|
+
background-color: #baeeba;
|
79
|
+
}
|
80
|
+
|
81
|
+
.hljs-deletion {
|
82
|
+
background-color: #ffc8bd;
|
83
|
+
}
|
84
|
+
|
85
|
+
.hljs-doctag,
|
86
|
+
.hljs-strong {
|
87
|
+
font-weight: 700;
|
88
|
+
}
|
89
|
+
|
90
|
+
.hljs-emphasis {
|
91
|
+
font-style: italic;
|
92
|
+
}
|
93
|
+
|
94
|
+
.d2h-del {
|
95
|
+
.hljs {
|
96
|
+
background: transparent;
|
97
|
+
}
|
98
|
+
}
|
99
|
+
|
100
|
+
.d2h-ins {
|
101
|
+
.hljs {
|
102
|
+
background: transparent;
|
103
|
+
}
|
104
|
+
}
|
105
|
+
|
13
106
|
&.dark {
|
14
107
|
color: #abb2bf !important;
|
15
108
|
background: #282c34;
|
@@ -1,4 +1,3 @@
|
|
1
|
-
@import 'highlight.js/styles/googlecode.css';
|
2
1
|
@import 'diff2html/bundles/css/diff2html.min.css';
|
3
2
|
:root {
|
4
3
|
--bk-prefix: bk;
|
@@ -100,6 +99,78 @@
|
|
100
99
|
.bk-code-diff .d2h-file-header {
|
101
100
|
display: none;
|
102
101
|
}
|
102
|
+
.bk-code-diff .hljs {
|
103
|
+
color: #000;
|
104
|
+
background: #fff;
|
105
|
+
}
|
106
|
+
.bk-code-diff .hljs-comment,
|
107
|
+
.bk-code-diff .hljs-quote {
|
108
|
+
color: #800;
|
109
|
+
}
|
110
|
+
.bk-code-diff .hljs-keyword,
|
111
|
+
.bk-code-diff .hljs-name,
|
112
|
+
.bk-code-diff .hljs-section,
|
113
|
+
.bk-code-diff .hljs-selector-tag,
|
114
|
+
.bk-code-diff .hljs-title {
|
115
|
+
color: #008;
|
116
|
+
}
|
117
|
+
.bk-code-diff .hljs-template-variable,
|
118
|
+
.bk-code-diff .hljs-variable {
|
119
|
+
color: #660;
|
120
|
+
}
|
121
|
+
.bk-code-diff .hljs-regexp,
|
122
|
+
.bk-code-diff .hljs-selector-attr,
|
123
|
+
.bk-code-diff .hljs-selector-pseudo,
|
124
|
+
.bk-code-diff .hljs-string {
|
125
|
+
color: #080;
|
126
|
+
}
|
127
|
+
.bk-code-diff .hljs-bullet,
|
128
|
+
.bk-code-diff .hljs-link,
|
129
|
+
.bk-code-diff .hljs-literal,
|
130
|
+
.bk-code-diff .hljs-meta,
|
131
|
+
.bk-code-diff .hljs-number,
|
132
|
+
.bk-code-diff .hljs-symbol {
|
133
|
+
color: #066;
|
134
|
+
}
|
135
|
+
.bk-code-diff .hljs-attr,
|
136
|
+
.bk-code-diff .hljs-built_in,
|
137
|
+
.bk-code-diff .hljs-doctag,
|
138
|
+
.bk-code-diff .hljs-params,
|
139
|
+
.bk-code-diff .hljs-title,
|
140
|
+
.bk-code-diff .hljs-type {
|
141
|
+
color: #606;
|
142
|
+
}
|
143
|
+
.bk-code-diff .hljs-attribute,
|
144
|
+
.bk-code-diff .hljs-subst {
|
145
|
+
color: #000;
|
146
|
+
}
|
147
|
+
.bk-code-diff .hljs-formula {
|
148
|
+
font-style: italic;
|
149
|
+
background-color: #eee;
|
150
|
+
}
|
151
|
+
.bk-code-diff .hljs-selector-class,
|
152
|
+
.bk-code-diff .hljs-selector-id {
|
153
|
+
color: #9b703f;
|
154
|
+
}
|
155
|
+
.bk-code-diff .hljs-addition {
|
156
|
+
background-color: #baeeba;
|
157
|
+
}
|
158
|
+
.bk-code-diff .hljs-deletion {
|
159
|
+
background-color: #ffc8bd;
|
160
|
+
}
|
161
|
+
.bk-code-diff .hljs-doctag,
|
162
|
+
.bk-code-diff .hljs-strong {
|
163
|
+
font-weight: 700;
|
164
|
+
}
|
165
|
+
.bk-code-diff .hljs-emphasis {
|
166
|
+
font-style: italic;
|
167
|
+
}
|
168
|
+
.bk-code-diff .d2h-del .hljs {
|
169
|
+
background: transparent;
|
170
|
+
}
|
171
|
+
.bk-code-diff .d2h-ins .hljs {
|
172
|
+
background: transparent;
|
173
|
+
}
|
103
174
|
.bk-code-diff.dark {
|
104
175
|
color: #abb2bf !important;
|
105
176
|
background: #282c34;
|
package/lib/code-diff/index.d.ts
CHANGED
@@ -26,6 +26,9 @@ declare const BkCodeDiff: {
|
|
26
26
|
language: import("vue-types").VueTypeValidableDef<"ruby" | "css" | "java" | "javascript" | "json" | "scss" | "less" | "stylus" | "shell" | "bash" | "cpp" | "go" | "xml" | "python" | "typescript" | "sql" | "vim" | "php" | "perl" | "powershell" | "makefile"> & {
|
27
27
|
default: "ruby" | "css" | "java" | "javascript" | "json" | "scss" | "less" | "stylus" | "shell" | "bash" | "cpp" | "go" | "xml" | "python" | "typescript" | "sql" | "vim" | "php" | "perl" | "powershell" | "makefile";
|
28
28
|
};
|
29
|
+
hljs: import("vue-types").VueTypeValidableDef<any> & {
|
30
|
+
required: true;
|
31
|
+
};
|
29
32
|
}>> & {
|
30
33
|
[x: string & `on${any}`]: (...args: any[]) => any;
|
31
34
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "theme" | "oldContent" | "newContent" | "diffFormat" | "language">;
|
@@ -59,6 +62,9 @@ declare const BkCodeDiff: {
|
|
59
62
|
language: import("vue-types").VueTypeValidableDef<"ruby" | "css" | "java" | "javascript" | "json" | "scss" | "less" | "stylus" | "shell" | "bash" | "cpp" | "go" | "xml" | "python" | "typescript" | "sql" | "vim" | "php" | "perl" | "powershell" | "makefile"> & {
|
60
63
|
default: "ruby" | "css" | "java" | "javascript" | "json" | "scss" | "less" | "stylus" | "shell" | "bash" | "cpp" | "go" | "xml" | "python" | "typescript" | "sql" | "vim" | "php" | "perl" | "powershell" | "makefile";
|
61
64
|
};
|
65
|
+
hljs: import("vue-types").VueTypeValidableDef<any> & {
|
66
|
+
required: true;
|
67
|
+
};
|
62
68
|
}>> & {
|
63
69
|
[x: string & `on${any}`]: (...args: any[]) => any;
|
64
70
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any[], string, {
|
@@ -104,6 +110,9 @@ declare const BkCodeDiff: {
|
|
104
110
|
language: import("vue-types").VueTypeValidableDef<"ruby" | "css" | "java" | "javascript" | "json" | "scss" | "less" | "stylus" | "shell" | "bash" | "cpp" | "go" | "xml" | "python" | "typescript" | "sql" | "vim" | "php" | "perl" | "powershell" | "makefile"> & {
|
105
111
|
default: "ruby" | "css" | "java" | "javascript" | "json" | "scss" | "less" | "stylus" | "shell" | "bash" | "cpp" | "go" | "xml" | "python" | "typescript" | "sql" | "vim" | "php" | "perl" | "powershell" | "makefile";
|
106
112
|
};
|
113
|
+
hljs: import("vue-types").VueTypeValidableDef<any> & {
|
114
|
+
required: true;
|
115
|
+
};
|
107
116
|
}>> & {
|
108
117
|
[x: string & `on${any}`]: (...args: any[]) => any;
|
109
118
|
} & import("vue").ShallowUnwrapRef<() => JSX.Element> & {} & {} & import("vue").ComponentCustomProperties;
|
@@ -127,6 +136,9 @@ declare const BkCodeDiff: {
|
|
127
136
|
language: import("vue-types").VueTypeValidableDef<"ruby" | "css" | "java" | "javascript" | "json" | "scss" | "less" | "stylus" | "shell" | "bash" | "cpp" | "go" | "xml" | "python" | "typescript" | "sql" | "vim" | "php" | "perl" | "powershell" | "makefile"> & {
|
128
137
|
default: "ruby" | "css" | "java" | "javascript" | "json" | "scss" | "less" | "stylus" | "shell" | "bash" | "cpp" | "go" | "xml" | "python" | "typescript" | "sql" | "vim" | "php" | "perl" | "powershell" | "makefile";
|
129
138
|
};
|
139
|
+
hljs: import("vue-types").VueTypeValidableDef<any> & {
|
140
|
+
required: true;
|
141
|
+
};
|
130
142
|
}>> & {
|
131
143
|
[x: string & `on${any}`]: (...args: any[]) => any;
|
132
144
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any[], any, {
|