bkui-vue 0.0.3-beta.6 → 1.0.1
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/README.md +1 -0
- package/dist/index.cjs.js +47 -47
- package/dist/index.esm.js +10444 -10431
- package/dist/index.umd.js +47 -47
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/affix/index.d.ts +57 -111
- package/lib/affix/index.js +35 -34
- package/lib/alert/alert.d.ts +1 -1
- package/lib/alert/index.d.ts +82 -132
- package/lib/alert/index.js +43 -42
- package/lib/animate-number/index.d.ts +33 -96
- package/lib/animate-number/index.js +7 -7
- package/lib/backtop/index.d.ts +69 -117
- package/lib/backtop/index.js +23 -22
- package/lib/badge/badge.d.ts +1 -1
- package/lib/badge/index.d.ts +120 -153
- package/lib/badge/index.js +40 -39
- package/lib/breadcrumb/index.d.ts +67 -119
- package/lib/breadcrumb/index.js +48 -47
- package/lib/button/button.d.ts +2 -2
- package/lib/button/index.d.ts +119 -155
- package/lib/button/index.js +60 -53
- package/lib/card/card.d.ts +1 -1
- package/lib/card/index.d.ts +129 -158
- package/lib/card/index.js +62 -57
- package/lib/cascader/cascader.d.ts +3 -3
- package/lib/cascader/index.d.ts +393 -354
- package/lib/cascader/index.js +338 -320
- package/lib/checkbox/checkbox.d.ts +1 -1
- package/lib/checkbox/index.d.ts +119 -161
- package/lib/checkbox/index.js +77 -78
- package/lib/code-diff/code-diff.css +0 -1
- package/lib/code-diff/code-diff.d.ts +1 -0
- package/lib/code-diff/code-diff.less +1 -1
- package/lib/code-diff/code-diff.variable.css +0 -1
- package/lib/code-diff/index.d.ts +65 -82
- package/lib/code-diff/index.js +532 -452
- package/lib/collapse/index.d.ts +144 -168
- package/lib/collapse/index.js +67 -66
- package/lib/collapse-transition/index.d.ts +19 -94
- package/lib/collapse-transition/index.js +10 -10
- package/lib/color-picker/color-picker.d.ts +1 -1
- package/lib/color-picker/index.d.ts +128 -154
- package/lib/color-picker/index.js +74 -76
- package/lib/components.js +63 -504
- package/lib/config-provider/index.d.ts +159 -226
- package/lib/config-provider/index.js +49 -45
- package/lib/config-provider/use-global-config.d.ts +2 -2
- package/lib/container/container.d.ts +1 -1
- package/lib/container/index.d.ts +74 -85
- package/lib/container/index.js +47 -46
- package/lib/date-picker/base/picker-dropdown.d.ts +1 -1
- package/lib/date-picker/base/time-spinner.d.ts +3 -3
- package/lib/date-picker/date-picker.d.ts +3 -3
- package/lib/date-picker/index.d.ts +384 -351
- package/lib/date-picker/index.js +164 -170
- package/lib/date-picker/panel/date-range.d.ts +1 -1
- package/lib/date-picker/panel/date.d.ts +1 -1
- package/lib/date-picker/panel/time-range.d.ts +2 -2
- package/lib/date-picker/panel/time.d.ts +1 -1
- package/lib/date-picker/time-picker.d.ts +3 -3
- package/lib/dialog/index.d.ts +355 -309
- package/lib/dialog/index.js +291 -279
- package/lib/directives/index.js +51 -51
- package/lib/dist.index.js +5 -61
- package/lib/divider/index.d.ts +57 -111
- package/lib/divider/index.js +16 -15
- package/lib/dropdown/dropdown.d.ts +1 -1
- package/lib/dropdown/index.d.ts +94 -136
- package/lib/dropdown/index.js +56 -49
- package/lib/exception/index.d.ts +41 -102
- package/lib/exception/index.js +37 -37
- package/lib/fixed-navbar/index.d.ts +59 -113
- package/lib/fixed-navbar/index.js +16 -15
- package/lib/form/form.d.ts +1 -1
- package/lib/form/index.d.ts +80 -132
- package/lib/form/index.js +83 -83
- package/lib/hooks.js +8 -48
- package/lib/icon/angle-double-down-line.js +23 -23
- package/lib/icon/angle-double-left-line.js +23 -23
- package/lib/icon/angle-double-left.js +23 -23
- package/lib/icon/angle-double-right-line.js +23 -23
- package/lib/icon/angle-double-right.js +23 -23
- package/lib/icon/angle-double-up-line.js +23 -23
- package/lib/icon/angle-down-fill.js +23 -23
- package/lib/icon/angle-down-line.js +23 -23
- package/lib/icon/angle-down.js +23 -23
- package/lib/icon/angle-left.js +23 -23
- package/lib/icon/angle-right.js +23 -23
- package/lib/icon/angle-up-fill.js +23 -23
- package/lib/icon/angle-up.js +23 -23
- package/lib/icon/archive-fill.js +23 -23
- package/lib/icon/arrows-left.js +23 -23
- package/lib/icon/arrows-right.js +23 -23
- package/lib/icon/assistant.js +23 -23
- package/lib/icon/audio-fill.js +23 -23
- package/lib/icon/bk.js +23 -23
- package/lib/icon/circle.js +23 -23
- package/lib/icon/close-line.js +23 -23
- package/lib/icon/close.js +23 -23
- package/lib/icon/code.js +23 -23
- package/lib/icon/cog-shape.js +23 -23
- package/lib/icon/collapse-left.js +23 -23
- package/lib/icon/copy-shape.js +23 -23
- package/lib/icon/copy.js +23 -23
- package/lib/icon/data-shape.js +23 -23
- package/lib/icon/del.js +23 -23
- package/lib/icon/doc-fill.js +23 -23
- package/lib/icon/done.js +23 -23
- package/lib/icon/down-shape.js +23 -23
- package/lib/icon/down-small.js +23 -23
- package/lib/icon/edit-line.js +23 -23
- package/lib/icon/ellipsis.js +23 -23
- package/lib/icon/enlarge-line.js +23 -23
- package/lib/icon/error.js +23 -23
- package/lib/icon/excel-fill.js +23 -23
- package/lib/icon/exclamation-circle-shape.js +23 -23
- package/lib/icon/eye.js +23 -23
- package/lib/icon/filliscreen-line.js +23 -23
- package/lib/icon/fix-line.js +23 -23
- package/lib/icon/fix-shape.js +23 -23
- package/lib/icon/folder-open.js +23 -23
- package/lib/icon/folder-shape-open.js +23 -23
- package/lib/icon/folder-shape.js +23 -23
- package/lib/icon/folder.js +23 -23
- package/lib/icon/funnel.js +23 -23
- package/lib/icon/grag-fill.js +23 -23
- package/lib/icon/help-document-fill.js +23 -23
- package/lib/icon/help-fill.js +23 -23
- package/lib/icon/help.js +23 -23
- package/lib/icon/image-fill.js +29 -29
- package/lib/icon/img-error.js +29 -29
- package/lib/icon/img-placehoulder.js +29 -29
- package/lib/icon/index.js +485 -485
- package/lib/icon/info-line.js +29 -29
- package/lib/icon/info.js +29 -29
- package/lib/icon/left-shape.js +29 -29
- package/lib/icon/left-turn-line.js +29 -29
- package/lib/icon/loading.js +29 -29
- package/lib/icon/narrow-line.js +29 -29
- package/lib/icon/original.js +29 -29
- package/lib/icon/pdf-fill.js +29 -29
- package/lib/icon/play-shape.js +29 -29
- package/lib/icon/plus.js +29 -29
- package/lib/icon/ppt-fill.js +29 -29
- package/lib/icon/qq.js +29 -29
- package/lib/icon/right-shape.js +29 -29
- package/lib/icon/right-turn-line.js +29 -29
- package/lib/icon/search.js +29 -29
- package/lib/icon/share.js +29 -29
- package/lib/icon/spinner.js +29 -29
- package/lib/icon/success.js +29 -29
- package/lib/icon/switcher-loading.js +29 -29
- package/lib/icon/text-file.js +29 -29
- package/lib/icon/text-fill.js +29 -29
- package/lib/icon/transfer.js +29 -29
- package/lib/icon/tree-application-shape.js +29 -29
- package/lib/icon/unfull-screen.js +29 -29
- package/lib/icon/unvisible.js +29 -29
- package/lib/icon/up-shape.js +29 -29
- package/lib/icon/upload.js +29 -29
- package/lib/icon/video-fill.js +29 -29
- package/lib/icon/warn.js +29 -29
- package/lib/icon/weixin-pro.js +29 -29
- package/lib/icon/weixin.js +29 -29
- package/lib/image/index.d.ts +113 -149
- package/lib/image/index.js +62 -62
- package/lib/index.js +8 -72
- package/lib/info-box/index.js +296 -284
- package/lib/input/index.d.ts +326 -293
- package/lib/input/index.js +316 -317
- package/lib/link/index.d.ts +73 -122
- package/lib/link/index.js +16 -15
- package/lib/loading/index.d.ts +130 -156
- package/lib/loading/index.js +49 -50
- package/lib/loading/loading.d.ts +1 -1
- package/lib/locale/index.js +2 -4
- package/lib/menu/index.d.ts +51 -112
- package/lib/menu/index.js +49 -48
- package/lib/message/index.js +69 -70
- package/lib/message/messageConstructor.d.ts +5 -5
- package/lib/modal/index.d.ts +261 -249
- package/lib/modal/index.js +535 -75
- package/lib/navigation/index.d.ts +152 -188
- package/lib/navigation/index.js +17 -16
- package/lib/notify/index.js +56 -57
- package/lib/notify/notifyConstructor.d.ts +1 -1
- package/lib/overflow-title/index.d.ts +314 -242
- package/lib/overflow-title/index.js +32 -25
- package/lib/pagination/index.d.ts +194 -205
- package/lib/pagination/index.js +116 -109
- package/lib/plugin-popover/index.js +247 -153
- package/lib/plugins/index.js +2 -2
- package/lib/pop-confirm/index.d.ts +126 -159
- package/lib/pop-confirm/index.js +43 -31
- package/lib/pop-confirm/pop-confirm.d.ts +1 -1
- package/lib/popover/content.d.ts +1 -1
- package/lib/popover/index.d.ts +374 -330
- package/lib/popover/index.js +251 -156
- package/lib/popover2/index.d.ts +8 -83
- package/lib/popover2/index.js +5 -5
- package/lib/preset.d.ts +2 -287
- package/lib/preset.js +16 -58
- package/lib/process/index.d.ts +93 -137
- package/lib/process/index.js +253 -254
- package/lib/progress/index.d.ts +178 -187
- package/lib/progress/index.js +48 -47
- package/lib/progress/progress.d.ts +2 -2
- package/lib/radio/index.d.ts +83 -135
- package/lib/radio/index.js +80 -81
- package/lib/rate/index.d.ts +55 -112
- package/lib/rate/index.js +43 -43
- package/lib/resize-layout/index.d.ts +156 -185
- package/lib/resize-layout/index.js +48 -48
- package/lib/resize-layout/resize-layout.d.ts +2 -2
- package/lib/search-select/index.d.ts +292 -327
- package/lib/search-select/index.js +310 -293
- package/lib/search-select/input.d.ts +2 -2
- package/lib/search-select/search-select.d.ts +3 -3
- package/lib/search-select/selected.d.ts +2 -2
- package/lib/select/index.d.ts +1234 -1135
- package/lib/select/index.js +427 -392
- package/lib/select/select.d.ts +121 -161
- package/lib/select/selectTagInput.d.ts +2 -2
- package/lib/shared/helper.d.ts +4 -0
- package/lib/shared/index.js +235 -217
- package/lib/sideslider/index.d.ts +247 -233
- package/lib/sideslider/index.js +264 -263
- package/lib/slider/index.d.ts +204 -204
- package/lib/slider/index.js +245 -233
- package/lib/steps/index.d.ts +114 -150
- package/lib/steps/index.js +257 -257
- package/lib/styles/index.d.ts +0 -1
- package/lib/swiper/index.d.ts +81 -127
- package/lib/swiper/index.js +35 -34
- package/lib/switcher/index.d.ts +152 -174
- package/lib/switcher/index.js +52 -53
- package/lib/tab/index.d.ts +199 -211
- package/lib/tab/index.js +78 -79
- package/lib/table/components/table-column.d.ts +2 -2
- package/lib/table/index.d.ts +605 -593
- package/lib/table/index.js +275 -237
- package/lib/table/plugins/use-pagination.d.ts +1 -1
- package/lib/table/table.d.ts +1 -1
- package/lib/table/use-common.d.ts +67 -34
- package/lib/table-column/index.d.ts +207 -243
- package/lib/table-column/index.js +61 -62
- package/lib/tag/index.d.ts +95 -142
- package/lib/tag/index.js +41 -40
- package/lib/tag-input/index.d.ts +690 -498
- package/lib/tag-input/index.js +135 -129
- package/lib/tag-input/tag-input.d.ts +5 -5
- package/lib/time-picker/index.d.ts +442 -385
- package/lib/time-picker/index.js +10 -9
- package/lib/timeline/index.d.ts +50 -109
- package/lib/timeline/index.js +20 -20
- package/lib/transfer/index.d.ts +191 -206
- package/lib/transfer/index.js +52 -38
- package/lib/tree/index.d.ts +322 -288
- package/lib/tree/index.js +129 -113
- package/lib/tree/tree.d.ts +1 -1
- package/lib/tree/use-tree-init.d.ts +1 -1
- package/lib/upload/index.d.ts +281 -254
- package/lib/upload/index.js +313 -302
- package/lib/upload/upload.d.ts +2 -2
- package/lib/virtual-render/index.d.ts +337 -242
- package/lib/virtual-render/index.js +66 -65
- package/lib/virtual-render/virtual-render.d.ts +1 -1
- package/package.json +10 -14
- package/lib/version-log/index.d.ts +0 -298
- package/lib/version-log/index.js +0 -9045
- package/lib/version-log/version-log.css +0 -224
- package/lib/version-log/version-log.d.ts +0 -203
- package/lib/version-log/version-log.less +0 -239
- package/lib/version-log/version-log.variable.css +0 -350
package/lib/code-diff/index.js
CHANGED
@@ -1,9 +1,131 @@
|
|
1
|
-
import
|
1
|
+
import "./code-diff.less";
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__ from "../shared";
|
2
3
|
import * as __WEBPACK_EXTERNAL_MODULE_vue__ from "vue";
|
3
4
|
import * as __WEBPACK_EXTERNAL_MODULE_vue_types_22de060a__ from "vue-types";
|
4
|
-
import * as
|
5
|
+
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__ from "../config-provider";
|
5
6
|
/******/ var __webpack_modules__ = ({
|
6
7
|
|
8
|
+
/***/ 9003:
|
9
|
+
/***/ ((module, __unused_webpack___webpack_exports__, __webpack_require__) => {
|
10
|
+
|
11
|
+
/* harmony import */ var _css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9601);
|
12
|
+
/* harmony import */ var _css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
|
13
|
+
/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2609);
|
14
|
+
/* harmony import */ var _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
|
15
|
+
// Imports
|
16
|
+
|
17
|
+
|
18
|
+
var ___CSS_LOADER_EXPORT___ = _css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
|
19
|
+
// Module
|
20
|
+
___CSS_LOADER_EXPORT___.push([module.id, `:host,:root{--d2h-bg-color:#fff;--d2h-border-color:#ddd;--d2h-dim-color:rgba(0,0,0,.3);--d2h-line-border-color:#eee;--d2h-file-header-bg-color:#f7f7f7;--d2h-file-header-border-color:#d8d8d8;--d2h-empty-placeholder-bg-color:#f1f1f1;--d2h-empty-placeholder-border-color:#e1e1e1;--d2h-selected-color:#c8e1ff;--d2h-ins-bg-color:#dfd;--d2h-ins-border-color:#b4e2b4;--d2h-ins-highlight-bg-color:#97f295;--d2h-ins-label-color:#399839;--d2h-del-bg-color:#fee8e9;--d2h-del-border-color:#e9aeae;--d2h-del-highlight-bg-color:#ffb6ba;--d2h-del-label-color:#c33;--d2h-change-del-color:#fdf2d0;--d2h-change-ins-color:#ded;--d2h-info-bg-color:#f8fafd;--d2h-info-border-color:#d5e4f2;--d2h-change-label-color:#d0b44c;--d2h-moved-label-color:#3572b0;--d2h-dark-color:#e6edf3;--d2h-dark-bg-color:#0d1117;--d2h-dark-border-color:#30363d;--d2h-dark-dim-color:#6e7681;--d2h-dark-line-border-color:#21262d;--d2h-dark-file-header-bg-color:#161b22;--d2h-dark-file-header-border-color:#30363d;--d2h-dark-empty-placeholder-bg-color:hsla(215,8%,47%,.1);--d2h-dark-empty-placeholder-border-color:#30363d;--d2h-dark-selected-color:rgba(56,139,253,.1);--d2h-dark-ins-bg-color:rgba(46,160,67,.15);--d2h-dark-ins-border-color:rgba(46,160,67,.4);--d2h-dark-ins-highlight-bg-color:rgba(46,160,67,.4);--d2h-dark-ins-label-color:#3fb950;--d2h-dark-del-bg-color:rgba(248,81,73,.1);--d2h-dark-del-border-color:rgba(248,81,73,.4);--d2h-dark-del-highlight-bg-color:rgba(248,81,73,.4);--d2h-dark-del-label-color:#f85149;--d2h-dark-change-del-color:rgba(210,153,34,.2);--d2h-dark-change-ins-color:rgba(46,160,67,.25);--d2h-dark-info-bg-color:rgba(56,139,253,.1);--d2h-dark-info-border-color:rgba(56,139,253,.4);--d2h-dark-change-label-color:#d29922;--d2h-dark-moved-label-color:#3572b0}.d2h-wrapper{text-align:left}.d2h-file-header{background-color:#f7f7f7;background-color:var(--d2h-file-header-bg-color);border-bottom:1px solid #d8d8d8;border-bottom:1px solid var(--d2h-file-header-border-color);display:-webkit-box;display:-ms-flexbox;display:flex;font-family:Source Sans Pro,Helvetica Neue,Helvetica,Arial,sans-serif;height:35px;padding:5px 10px}.d2h-file-header.d2h-sticky-header{position:sticky;top:0;z-index:1}.d2h-file-stats{display:-webkit-box;display:-ms-flexbox;display:flex;font-size:14px;margin-left:auto}.d2h-lines-added{border:1px solid #b4e2b4;border:1px solid var(--d2h-ins-border-color);border-radius:5px 0 0 5px;color:#399839;color:var(--d2h-ins-label-color);padding:2px;text-align:right;vertical-align:middle}.d2h-lines-deleted{border:1px solid #e9aeae;border:1px solid var(--d2h-del-border-color);border-radius:0 5px 5px 0;color:#c33;color:var(--d2h-del-label-color);margin-left:1px;padding:2px;text-align:left;vertical-align:middle}.d2h-file-name-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;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:1px solid var(--d2h-border-color);border-radius:3px;margin-bottom:1em}.d2h-file-collapse{-webkit-box-pack:end;-ms-flex-pack:end;cursor:pointer;display:none;font-size:12px;justify-content:flex-end;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border:1px solid #ddd;border:1px solid var(--d2h-border-color);border-radius:3px;padding:4px 8px}.d2h-file-collapse.d2h-selected{background-color:#c8e1ff;background-color:var(--d2h-selected-color)}.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{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}.d2h-file-diff{overflow-y:hidden}.d2h-file-diff.d2h-d-none,.d2h-files-diff.d2h-d-none{display:none}.d2h-file-side-diff{display:inline-block;overflow-x:scroll;overflow-y:hidden;width:50%}.d2h-code-line{padding:0 8em;width:calc(100% - 16em)}.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}.d2h-code-side-line{padding:0 4.5em;width:calc(100% - 9em)}.d2h-code-line-ctn{background:none;display:inline-block;padding:0;word-wrap:normal;-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;background-color:var(--d2h-del-highlight-bg-color)}.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;-webkit-text-decoration:none;text-decoration:none}.d2h-code-line ins,.d2h-code-side-line ins{background-color:#97f295;background-color:var(--d2h-ins-highlight-bg-color);text-align:left}.d2h-code-line-prefix{background:none;display:inline;padding:0;word-wrap:normal;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;background-color:var(--d2h-bg-color);border:solid #eee;border:solid var(--d2h-line-border-color);border-width:0 1px;-webkit-box-sizing:border-box;box-sizing:border-box;color:rgba(0,0,0,.3);color:var(--d2h-dim-color);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;background-color:var(--d2h-bg-color);border:solid #eee;border:solid var(--d2h-line-border-color);border-width:0 1px;-webkit-box-sizing:border-box;box-sizing:border-box;color:rgba(0,0,0,.3);color:var(--d2h-dim-color);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;background-color:var(--d2h-empty-placeholder-bg-color);border-color:#e1e1e1;border-color:var(--d2h-empty-placeholder-border-color)}.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;background-color:var(--d2h-del-bg-color);border-color:#e9aeae;border-color:var(--d2h-del-border-color)}.d2h-ins{background-color:#dfd;background-color:var(--d2h-ins-bg-color);border-color:#b4e2b4;border-color:var(--d2h-ins-border-color)}.d2h-info{background-color:#f8fafd;background-color:var(--d2h-info-bg-color);border-color:#d5e4f2;border-color:var(--d2h-info-border-color);color:rgba(0,0,0,.3);color:var(--d2h-dim-color)}.d2h-file-diff .d2h-del.d2h-change{background-color:#fdf2d0;background-color:var(--d2h-change-del-color)}.d2h-file-diff .d2h-ins.d2h-change{background-color:#ded;background-color:var(--d2h-change-ins-color)}.d2h-file-list-wrapper{margin-bottom:10px}.d2h-file-list-wrapper a{-webkit-text-decoration:none;text-decoration:none}.d2h-file-list-wrapper a,.d2h-file-list-wrapper a:visited{color:#3572b0;color:var(--d2h-moved-label-color)}.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;border-bottom:1px solid var(--d2h-border-color);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{margin-right:10px;vertical-align:middle;fill:currentColor}.d2h-deleted{color:#c33;color:var(--d2h-del-label-color)}.d2h-added{color:#399839;color:var(--d2h-ins-label-color)}.d2h-changed{color:#d0b44c;color:var(--d2h-change-label-color)}.d2h-moved{color:#3572b0;color:var(--d2h-moved-label-color)}.d2h-tag{background-color:#fff;background-color:var(--d2h-bg-color);display:-webkit-box;display:-ms-flexbox;display:flex;font-size:10px;margin-left:5px;padding:0 2px}.d2h-deleted-tag{border:1px solid #c33;border:1px solid var(--d2h-del-label-color)}.d2h-added-tag{border:1px solid #399839;border:1px solid var(--d2h-ins-label-color)}.d2h-changed-tag{border:1px solid #d0b44c;border:1px solid var(--d2h-change-label-color)}.d2h-moved-tag{border:1px solid #3572b0;border:1px solid var(--d2h-moved-label-color)}.d2h-dark-color-scheme{background-color:#0d1117;background-color:var(--d2h-dark-bg-color);color:#e6edf3;color:var(--d2h-dark-color)}.d2h-dark-color-scheme .d2h-file-header{background-color:#161b22;background-color:var(--d2h-dark-file-header-bg-color);border-bottom:#30363d;border-bottom:var(--d2h-dark-file-header-border-color)}.d2h-dark-color-scheme .d2h-lines-added{border:1px solid rgba(46,160,67,.4);border:1px solid var(--d2h-dark-ins-border-color);color:#3fb950;color:var(--d2h-dark-ins-label-color)}.d2h-dark-color-scheme .d2h-lines-deleted{border:1px solid rgba(248,81,73,.4);border:1px solid var(--d2h-dark-del-border-color);color:#f85149;color:var(--d2h-dark-del-label-color)}.d2h-dark-color-scheme .d2h-code-line del,.d2h-dark-color-scheme .d2h-code-side-line del{background-color:rgba(248,81,73,.4);background-color:var(--d2h-dark-del-highlight-bg-color)}.d2h-dark-color-scheme .d2h-code-line ins,.d2h-dark-color-scheme .d2h-code-side-line ins{background-color:rgba(46,160,67,.4);background-color:var(--d2h-dark-ins-highlight-bg-color)}.d2h-dark-color-scheme .d2h-diff-tbody{border-color:#30363d;border-color:var(--d2h-dark-border-color)}.d2h-dark-color-scheme .d2h-code-side-linenumber{background-color:#0d1117;background-color:var(--d2h-dark-bg-color);border-color:#21262d;border-color:var(--d2h-dark-line-border-color);color:#6e7681;color:var(--d2h-dark-dim-color)}.d2h-dark-color-scheme .d2h-files-diff .d2h-code-side-emptyplaceholder,.d2h-dark-color-scheme .d2h-files-diff .d2h-emptyplaceholder{background-color:hsla(215,8%,47%,.1);background-color:var(--d2h-dark-empty-placeholder-bg-color);border-color:#30363d;border-color:var(--d2h-dark-empty-placeholder-border-color)}.d2h-dark-color-scheme .d2h-code-linenumber{background-color:#0d1117;background-color:var(--d2h-dark-bg-color);border-color:#21262d;border-color:var(--d2h-dark-line-border-color);color:#6e7681;color:var(--d2h-dark-dim-color)}.d2h-dark-color-scheme .d2h-del{background-color:rgba(248,81,73,.1);background-color:var(--d2h-dark-del-bg-color);border-color:rgba(248,81,73,.4);border-color:var(--d2h-dark-del-border-color)}.d2h-dark-color-scheme .d2h-ins{background-color:rgba(46,160,67,.15);background-color:var(--d2h-dark-ins-bg-color);border-color:rgba(46,160,67,.4);border-color:var(--d2h-dark-ins-border-color)}.d2h-dark-color-scheme .d2h-info{background-color:rgba(56,139,253,.1);background-color:var(--d2h-dark-info-bg-color);border-color:rgba(56,139,253,.4);border-color:var(--d2h-dark-info-border-color);color:#6e7681;color:var(--d2h-dark-dim-color)}.d2h-dark-color-scheme .d2h-file-diff .d2h-del.d2h-change{background-color:rgba(210,153,34,.2);background-color:var(--d2h-dark-change-del-color)}.d2h-dark-color-scheme .d2h-file-diff .d2h-ins.d2h-change{background-color:rgba(46,160,67,.25);background-color:var(--d2h-dark-change-ins-color)}.d2h-dark-color-scheme .d2h-file-wrapper{border:1px solid #30363d;border:1px solid var(--d2h-dark-border-color)}.d2h-dark-color-scheme .d2h-file-collapse{border:1px solid #0d1117;border:1px solid var(--d2h-dark-bg-color)}.d2h-dark-color-scheme .d2h-file-collapse.d2h-selected{background-color:rgba(56,139,253,.1);background-color:var(--d2h-dark-selected-color)}.d2h-dark-color-scheme .d2h-file-list-wrapper a,.d2h-dark-color-scheme .d2h-file-list-wrapper a:visited{color:#3572b0;color:var(--d2h-dark-moved-label-color)}.d2h-dark-color-scheme .d2h-file-list>li{border-bottom:1px solid #0d1117;border-bottom:1px solid var(--d2h-dark-bg-color)}.d2h-dark-color-scheme .d2h-deleted{color:#f85149;color:var(--d2h-dark-del-label-color)}.d2h-dark-color-scheme .d2h-added{color:#3fb950;color:var(--d2h-dark-ins-label-color)}.d2h-dark-color-scheme .d2h-changed{color:#d29922;color:var(--d2h-dark-change-label-color)}.d2h-dark-color-scheme .d2h-moved{color:#3572b0;color:var(--d2h-dark-moved-label-color)}.d2h-dark-color-scheme .d2h-tag{background-color:#0d1117;background-color:var(--d2h-dark-bg-color)}.d2h-dark-color-scheme .d2h-deleted-tag{border:1px solid #f85149;border:1px solid var(--d2h-dark-del-label-color)}.d2h-dark-color-scheme .d2h-added-tag{border:1px solid #3fb950;border:1px solid var(--d2h-dark-ins-label-color)}.d2h-dark-color-scheme .d2h-changed-tag{border:1px solid #d29922;border:1px solid var(--d2h-dark-change-label-color)}.d2h-dark-color-scheme .d2h-moved-tag{border:1px solid #3572b0;border:1px solid var(--d2h-dark-moved-label-color)}@media (prefers-color-scheme:dark){.d2h-auto-color-scheme{background-color:#0d1117;background-color:var(--d2h-dark-bg-color);color:#e6edf3;color:var(--d2h-dark-color)}.d2h-auto-color-scheme .d2h-file-header{background-color:#161b22;background-color:var(--d2h-dark-file-header-bg-color);border-bottom:#30363d;border-bottom:var(--d2h-dark-file-header-border-color)}.d2h-auto-color-scheme .d2h-lines-added{border:1px solid rgba(46,160,67,.4);border:1px solid var(--d2h-dark-ins-border-color);color:#3fb950;color:var(--d2h-dark-ins-label-color)}.d2h-auto-color-scheme .d2h-lines-deleted{border:1px solid rgba(248,81,73,.4);border:1px solid var(--d2h-dark-del-border-color);color:#f85149;color:var(--d2h-dark-del-label-color)}.d2h-auto-color-scheme .d2h-code-line del,.d2h-auto-color-scheme .d2h-code-side-line del{background-color:rgba(248,81,73,.4);background-color:var(--d2h-dark-del-highlight-bg-color)}.d2h-auto-color-scheme .d2h-code-line ins,.d2h-auto-color-scheme .d2h-code-side-line ins{background-color:rgba(46,160,67,.4);background-color:var(--d2h-dark-ins-highlight-bg-color)}.d2h-auto-color-scheme .d2h-diff-tbody{border-color:#30363d;border-color:var(--d2h-dark-border-color)}.d2h-auto-color-scheme .d2h-code-side-linenumber{background-color:#0d1117;background-color:var(--d2h-dark-bg-color);border-color:#21262d;border-color:var(--d2h-dark-line-border-color);color:#6e7681;color:var(--d2h-dark-dim-color)}.d2h-auto-color-scheme .d2h-files-diff .d2h-code-side-emptyplaceholder,.d2h-auto-color-scheme .d2h-files-diff .d2h-emptyplaceholder{background-color:hsla(215,8%,47%,.1);background-color:var(--d2h-dark-empty-placeholder-bg-color);border-color:#30363d;border-color:var(--d2h-dark-empty-placeholder-border-color)}.d2h-auto-color-scheme .d2h-code-linenumber{background-color:#0d1117;background-color:var(--d2h-dark-bg-color);border-color:#21262d;border-color:var(--d2h-dark-line-border-color);color:#6e7681;color:var(--d2h-dark-dim-color)}.d2h-auto-color-scheme .d2h-del{background-color:rgba(248,81,73,.1);background-color:var(--d2h-dark-del-bg-color);border-color:rgba(248,81,73,.4);border-color:var(--d2h-dark-del-border-color)}.d2h-auto-color-scheme .d2h-ins{background-color:rgba(46,160,67,.15);background-color:var(--d2h-dark-ins-bg-color);border-color:rgba(46,160,67,.4);border-color:var(--d2h-dark-ins-border-color)}.d2h-auto-color-scheme .d2h-info{background-color:rgba(56,139,253,.1);background-color:var(--d2h-dark-info-bg-color);border-color:rgba(56,139,253,.4);border-color:var(--d2h-dark-info-border-color);color:#6e7681;color:var(--d2h-dark-dim-color)}.d2h-auto-color-scheme .d2h-file-diff .d2h-del.d2h-change{background-color:rgba(210,153,34,.2);background-color:var(--d2h-dark-change-del-color)}.d2h-auto-color-scheme .d2h-file-diff .d2h-ins.d2h-change{background-color:rgba(46,160,67,.25);background-color:var(--d2h-dark-change-ins-color)}.d2h-auto-color-scheme .d2h-file-wrapper{border:1px solid #30363d;border:1px solid var(--d2h-dark-border-color)}.d2h-auto-color-scheme .d2h-file-collapse{border:1px solid #0d1117;border:1px solid var(--d2h-dark-bg-color)}.d2h-auto-color-scheme .d2h-file-collapse.d2h-selected{background-color:rgba(56,139,253,.1);background-color:var(--d2h-dark-selected-color)}.d2h-auto-color-scheme .d2h-file-list-wrapper a,.d2h-auto-color-scheme .d2h-file-list-wrapper a:visited{color:#3572b0;color:var(--d2h-dark-moved-label-color)}.d2h-auto-color-scheme .d2h-file-list>li{border-bottom:1px solid #0d1117;border-bottom:1px solid var(--d2h-dark-bg-color)}.d2h-dark-color-scheme .d2h-deleted{color:#f85149;color:var(--d2h-dark-del-label-color)}.d2h-auto-color-scheme .d2h-added{color:#3fb950;color:var(--d2h-dark-ins-label-color)}.d2h-auto-color-scheme .d2h-changed{color:#d29922;color:var(--d2h-dark-change-label-color)}.d2h-auto-color-scheme .d2h-moved{color:#3572b0;color:var(--d2h-dark-moved-label-color)}.d2h-auto-color-scheme .d2h-tag{background-color:#0d1117;background-color:var(--d2h-dark-bg-color)}.d2h-auto-color-scheme .d2h-deleted-tag{border:1px solid #f85149;border:1px solid var(--d2h-dark-del-label-color)}.d2h-auto-color-scheme .d2h-added-tag{border:1px solid #3fb950;border:1px solid var(--d2h-dark-ins-label-color)}.d2h-auto-color-scheme .d2h-changed-tag{border:1px solid #d29922;border:1px solid var(--d2h-dark-change-label-color)}.d2h-auto-color-scheme .d2h-moved-tag{border:1px solid #3572b0;border:1px solid var(--d2h-dark-moved-label-color)}}`, ""]);
|
21
|
+
// Exports
|
22
|
+
/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = ((/* unused pure expression or super */ null && (___CSS_LOADER_EXPORT___)));
|
23
|
+
|
24
|
+
|
25
|
+
/***/ }),
|
26
|
+
|
27
|
+
/***/ 2609:
|
28
|
+
/***/ ((module) => {
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
/*
|
33
|
+
MIT License http://www.opensource.org/licenses/mit-license.php
|
34
|
+
Author Tobias Koppers @sokra
|
35
|
+
*/
|
36
|
+
module.exports = function (cssWithMappingToString) {
|
37
|
+
var list = [];
|
38
|
+
|
39
|
+
// return the list of modules as css string
|
40
|
+
list.toString = function toString() {
|
41
|
+
return this.map(function (item) {
|
42
|
+
var content = "";
|
43
|
+
var needLayer = typeof item[5] !== "undefined";
|
44
|
+
if (item[4]) {
|
45
|
+
content += "@supports (".concat(item[4], ") {");
|
46
|
+
}
|
47
|
+
if (item[2]) {
|
48
|
+
content += "@media ".concat(item[2], " {");
|
49
|
+
}
|
50
|
+
if (needLayer) {
|
51
|
+
content += "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {");
|
52
|
+
}
|
53
|
+
content += cssWithMappingToString(item);
|
54
|
+
if (needLayer) {
|
55
|
+
content += "}";
|
56
|
+
}
|
57
|
+
if (item[2]) {
|
58
|
+
content += "}";
|
59
|
+
}
|
60
|
+
if (item[4]) {
|
61
|
+
content += "}";
|
62
|
+
}
|
63
|
+
return content;
|
64
|
+
}).join("");
|
65
|
+
};
|
66
|
+
|
67
|
+
// import a list of modules into the list
|
68
|
+
list.i = function i(modules, media, dedupe, supports, layer) {
|
69
|
+
if (typeof modules === "string") {
|
70
|
+
modules = [[null, modules, undefined]];
|
71
|
+
}
|
72
|
+
var alreadyImportedModules = {};
|
73
|
+
if (dedupe) {
|
74
|
+
for (var k = 0; k < this.length; k++) {
|
75
|
+
var id = this[k][0];
|
76
|
+
if (id != null) {
|
77
|
+
alreadyImportedModules[id] = true;
|
78
|
+
}
|
79
|
+
}
|
80
|
+
}
|
81
|
+
for (var _k = 0; _k < modules.length; _k++) {
|
82
|
+
var item = [].concat(modules[_k]);
|
83
|
+
if (dedupe && alreadyImportedModules[item[0]]) {
|
84
|
+
continue;
|
85
|
+
}
|
86
|
+
if (typeof layer !== "undefined") {
|
87
|
+
if (typeof item[5] === "undefined") {
|
88
|
+
item[5] = layer;
|
89
|
+
} else {
|
90
|
+
item[1] = "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {").concat(item[1], "}");
|
91
|
+
item[5] = layer;
|
92
|
+
}
|
93
|
+
}
|
94
|
+
if (media) {
|
95
|
+
if (!item[2]) {
|
96
|
+
item[2] = media;
|
97
|
+
} else {
|
98
|
+
item[1] = "@media ".concat(item[2], " {").concat(item[1], "}");
|
99
|
+
item[2] = media;
|
100
|
+
}
|
101
|
+
}
|
102
|
+
if (supports) {
|
103
|
+
if (!item[4]) {
|
104
|
+
item[4] = "".concat(supports);
|
105
|
+
} else {
|
106
|
+
item[1] = "@supports (".concat(item[4], ") {").concat(item[1], "}");
|
107
|
+
item[4] = supports;
|
108
|
+
}
|
109
|
+
}
|
110
|
+
list.push(item);
|
111
|
+
}
|
112
|
+
};
|
113
|
+
return list;
|
114
|
+
};
|
115
|
+
|
116
|
+
/***/ }),
|
117
|
+
|
118
|
+
/***/ 9601:
|
119
|
+
/***/ ((module) => {
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
module.exports = function (i) {
|
124
|
+
return i[1];
|
125
|
+
};
|
126
|
+
|
127
|
+
/***/ }),
|
128
|
+
|
7
129
|
/***/ 2148:
|
8
130
|
/***/ ((__unused_webpack_module, exports) => {
|
9
131
|
|
@@ -824,7 +946,7 @@ var Hogan = {};
|
|
824
946
|
/******/ }
|
825
947
|
/******/ // Create a new module (and put it into the cache)
|
826
948
|
/******/ var module = __webpack_module_cache__[moduleId] = {
|
827
|
-
/******/
|
949
|
+
/******/ id: moduleId,
|
828
950
|
/******/ // no module.loaded needed
|
829
951
|
/******/ exports: {}
|
830
952
|
/******/ };
|
@@ -837,6 +959,18 @@ var Hogan = {};
|
|
837
959
|
/******/ }
|
838
960
|
/******/
|
839
961
|
/************************************************************************/
|
962
|
+
/******/ /* webpack/runtime/compat get default export */
|
963
|
+
/******/ (() => {
|
964
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
965
|
+
/******/ __webpack_require__.n = (module) => {
|
966
|
+
/******/ var getter = module && module.__esModule ?
|
967
|
+
/******/ () => (module['default']) :
|
968
|
+
/******/ () => (module);
|
969
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
970
|
+
/******/ return getter;
|
971
|
+
/******/ };
|
972
|
+
/******/ })();
|
973
|
+
/******/
|
840
974
|
/******/ /* webpack/runtime/define property getters */
|
841
975
|
/******/ (() => {
|
842
976
|
/******/ // define getter functions for harmony exports
|
@@ -861,43 +995,43 @@ var __webpack_exports__ = {};
|
|
861
995
|
|
862
996
|
// EXPORTS
|
863
997
|
__webpack_require__.d(__webpack_exports__, {
|
864
|
-
|
998
|
+
"default": () => (/* binding */ src)
|
865
999
|
});
|
866
1000
|
|
867
1001
|
;// CONCATENATED MODULE: external "../shared"
|
868
1002
|
var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
869
1003
|
var y = x => () => x
|
870
|
-
const
|
1004
|
+
const shared_namespaceObject = x({ ["PropTypes"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.PropTypes, ["classes"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.classes, ["stringEnum"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.stringEnum, ["withInstall"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.withInstall });
|
871
1005
|
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
|
872
1006
|
function _arrayWithHoles(arr) {
|
873
1007
|
if (Array.isArray(arr)) return arr;
|
874
1008
|
}
|
875
1009
|
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
|
876
|
-
function _iterableToArrayLimit(
|
877
|
-
var
|
878
|
-
if (null !=
|
879
|
-
var
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
|
884
|
-
|
885
|
-
|
1010
|
+
function _iterableToArrayLimit(r, l) {
|
1011
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
1012
|
+
if (null != t) {
|
1013
|
+
var e,
|
1014
|
+
n,
|
1015
|
+
i,
|
1016
|
+
u,
|
1017
|
+
a = [],
|
1018
|
+
f = !0,
|
1019
|
+
o = !1;
|
886
1020
|
try {
|
887
|
-
if (
|
888
|
-
if (Object(
|
889
|
-
|
890
|
-
} else for (; !(
|
891
|
-
} catch (
|
892
|
-
|
1021
|
+
if (i = (t = t.call(r)).next, 0 === l) {
|
1022
|
+
if (Object(t) !== t) return;
|
1023
|
+
f = !1;
|
1024
|
+
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
1025
|
+
} catch (r) {
|
1026
|
+
o = !0, n = r;
|
893
1027
|
} finally {
|
894
1028
|
try {
|
895
|
-
if (!
|
1029
|
+
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
896
1030
|
} finally {
|
897
|
-
if (
|
1031
|
+
if (o) throw n;
|
898
1032
|
}
|
899
1033
|
}
|
900
|
-
return
|
1034
|
+
return a;
|
901
1035
|
}
|
902
1036
|
}
|
903
1037
|
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
|
@@ -2494,22 +2628,28 @@ var LineType;
|
|
2494
2628
|
LineType["DELETE"] = "delete";
|
2495
2629
|
LineType["CONTEXT"] = "context";
|
2496
2630
|
})(LineType || (LineType = {}));
|
2497
|
-
|
2631
|
+
const OutputFormatType = {
|
2498
2632
|
LINE_BY_LINE: 'line-by-line',
|
2499
2633
|
SIDE_BY_SIDE: 'side-by-side',
|
2500
2634
|
};
|
2501
|
-
|
2635
|
+
const LineMatchingType = {
|
2502
2636
|
LINES: 'lines',
|
2503
2637
|
WORDS: 'words',
|
2504
2638
|
NONE: 'none',
|
2505
2639
|
};
|
2506
|
-
|
2640
|
+
const DiffStyleType = {
|
2507
2641
|
WORD: 'word',
|
2508
2642
|
CHAR: 'char',
|
2509
2643
|
};
|
2644
|
+
var ColorSchemeType;
|
2645
|
+
(function (ColorSchemeType) {
|
2646
|
+
ColorSchemeType["AUTO"] = "auto";
|
2647
|
+
ColorSchemeType["DARK"] = "dark";
|
2648
|
+
ColorSchemeType["LIGHT"] = "light";
|
2649
|
+
})(ColorSchemeType || (ColorSchemeType = {}));
|
2510
2650
|
//# sourceMappingURL=types.js.map
|
2511
2651
|
;// CONCATENATED MODULE: ../../node_modules/diff2html/lib-esm/utils.js
|
2512
|
-
|
2652
|
+
const specials = [
|
2513
2653
|
'-',
|
2514
2654
|
'[',
|
2515
2655
|
']',
|
@@ -2527,7 +2667,7 @@ var specials = [
|
|
2527
2667
|
'$',
|
2528
2668
|
'|',
|
2529
2669
|
];
|
2530
|
-
|
2670
|
+
const regex = RegExp('[' + specials.join('\\') + ']', 'g');
|
2531
2671
|
function escapeForRegExp(str) {
|
2532
2672
|
return str.replace(regex, '\\$&');
|
2533
2673
|
}
|
@@ -2535,8 +2675,8 @@ function unifyPath(path) {
|
|
2535
2675
|
return path ? path.replace(/\\/g, '/') : path;
|
2536
2676
|
}
|
2537
2677
|
function hashCode(text) {
|
2538
|
-
|
2539
|
-
|
2678
|
+
let i, chr, len;
|
2679
|
+
let hash = 0;
|
2540
2680
|
for (i = 0, len = text.length; i < len; i++) {
|
2541
2681
|
chr = text.charCodeAt(i);
|
2542
2682
|
hash = (hash << 5) - hash + chr;
|
@@ -2546,33 +2686,24 @@ function hashCode(text) {
|
|
2546
2686
|
}
|
2547
2687
|
//# sourceMappingURL=utils.js.map
|
2548
2688
|
;// CONCATENATED MODULE: ../../node_modules/diff2html/lib-esm/diff-parser.js
|
2549
|
-
var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) {
|
2550
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
2551
|
-
if (ar || !(i in from)) {
|
2552
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
2553
|
-
ar[i] = from[i];
|
2554
|
-
}
|
2555
|
-
}
|
2556
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
2557
|
-
};
|
2558
2689
|
|
2559
2690
|
|
2560
2691
|
function getExtension(filename, language) {
|
2561
|
-
|
2692
|
+
const filenameParts = filename.split('.');
|
2562
2693
|
return filenameParts.length > 1 ? filenameParts[filenameParts.length - 1] : language;
|
2563
2694
|
}
|
2564
2695
|
function startsWithAny(str, prefixes) {
|
2565
|
-
return prefixes.reduce(
|
2696
|
+
return prefixes.reduce((startsWith, prefix) => startsWith || str.startsWith(prefix), false);
|
2566
2697
|
}
|
2567
|
-
|
2698
|
+
const baseDiffFilenamePrefixes = ['a/', 'b/', 'i/', 'w/', 'c/', 'o/'];
|
2568
2699
|
function getFilename(line, linePrefix, extraPrefix) {
|
2569
|
-
|
2570
|
-
|
2571
|
-
? new RegExp(
|
2700
|
+
const prefixes = extraPrefix !== undefined ? [...baseDiffFilenamePrefixes, extraPrefix] : baseDiffFilenamePrefixes;
|
2701
|
+
const FilenameRegExp = linePrefix
|
2702
|
+
? new RegExp(`^${escapeForRegExp(linePrefix)} "?(.+?)"?$`)
|
2572
2703
|
: new RegExp('^"?(.+?)"?$');
|
2573
|
-
|
2574
|
-
|
2575
|
-
|
2704
|
+
const [, filename = ''] = FilenameRegExp.exec(line) || [];
|
2705
|
+
const matchingPrefix = prefixes.find(p => filename.indexOf(p) === 0);
|
2706
|
+
const fnameWithoutPrefix = matchingPrefix ? filename.slice(matchingPrefix.length) : filename;
|
2576
2707
|
return fnameWithoutPrefix.replace(/\s+\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(?:\.\d+)? [+-]\d{4}.*$/, '');
|
2577
2708
|
}
|
2578
2709
|
function getSrcFilename(line, srcPrefix) {
|
@@ -2581,37 +2712,36 @@ function getSrcFilename(line, srcPrefix) {
|
|
2581
2712
|
function getDstFilename(line, dstPrefix) {
|
2582
2713
|
return getFilename(line, '+++', dstPrefix);
|
2583
2714
|
}
|
2584
|
-
function parse(diffInput, config) {
|
2585
|
-
|
2586
|
-
|
2587
|
-
|
2588
|
-
|
2589
|
-
|
2590
|
-
|
2591
|
-
|
2592
|
-
|
2593
|
-
|
2594
|
-
|
2595
|
-
|
2596
|
-
|
2597
|
-
|
2598
|
-
|
2599
|
-
|
2600
|
-
|
2601
|
-
|
2602
|
-
|
2603
|
-
|
2604
|
-
|
2605
|
-
|
2606
|
-
|
2607
|
-
|
2608
|
-
|
2609
|
-
|
2610
|
-
|
2611
|
-
|
2612
|
-
|
2613
|
-
|
2614
|
-
var diffLines = diffInput
|
2715
|
+
function parse(diffInput, config = {}) {
|
2716
|
+
const files = [];
|
2717
|
+
let currentFile = null;
|
2718
|
+
let currentBlock = null;
|
2719
|
+
let oldLine = null;
|
2720
|
+
let oldLine2 = null;
|
2721
|
+
let newLine = null;
|
2722
|
+
let possibleOldName = null;
|
2723
|
+
let possibleNewName = null;
|
2724
|
+
const oldFileNameHeader = '--- ';
|
2725
|
+
const newFileNameHeader = '+++ ';
|
2726
|
+
const hunkHeaderPrefix = '@@';
|
2727
|
+
const oldMode = /^old mode (\d{6})/;
|
2728
|
+
const newMode = /^new mode (\d{6})/;
|
2729
|
+
const deletedFileMode = /^deleted file mode (\d{6})/;
|
2730
|
+
const newFileMode = /^new file mode (\d{6})/;
|
2731
|
+
const copyFrom = /^copy from "?(.+)"?/;
|
2732
|
+
const copyTo = /^copy to "?(.+)"?/;
|
2733
|
+
const renameFrom = /^rename from "?(.+)"?/;
|
2734
|
+
const renameTo = /^rename to "?(.+)"?/;
|
2735
|
+
const similarityIndex = /^similarity index (\d+)%/;
|
2736
|
+
const dissimilarityIndex = /^dissimilarity index (\d+)%/;
|
2737
|
+
const index = /^index ([\da-z]+)\.\.([\da-z]+)\s*(\d{6})?/;
|
2738
|
+
const binaryFiles = /^Binary files (.*) and (.*) differ/;
|
2739
|
+
const binaryDiff = /^GIT binary patch/;
|
2740
|
+
const combinedIndex = /^index ([\da-z]+),([\da-z]+)\.\.([\da-z]+)/;
|
2741
|
+
const combinedMode = /^mode (\d{6}),(\d{6})\.\.(\d{6})/;
|
2742
|
+
const combinedNewFile = /^new file mode (\d{6})/;
|
2743
|
+
const combinedDeletedFile = /^deleted file mode (\d{6}),(\d{6})/;
|
2744
|
+
const diffLines = diffInput
|
2615
2745
|
.replace(/\/g, '')
|
2616
2746
|
.replace(/\r\n?/g, '\n')
|
2617
2747
|
.split('\n');
|
@@ -2648,7 +2778,7 @@ function parse(diffInput, config) {
|
|
2648
2778
|
}
|
2649
2779
|
function startBlock(line) {
|
2650
2780
|
saveBlock();
|
2651
|
-
|
2781
|
+
let values;
|
2652
2782
|
if (currentFile !== null) {
|
2653
2783
|
if ((values = /^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@.*/.exec(line))) {
|
2654
2784
|
currentFile.isCombined = false;
|
@@ -2681,11 +2811,11 @@ function parse(diffInput, config) {
|
|
2681
2811
|
function createLine(line) {
|
2682
2812
|
if (currentFile === null || currentBlock === null || oldLine === null || newLine === null)
|
2683
2813
|
return;
|
2684
|
-
|
2814
|
+
const currentLine = {
|
2685
2815
|
content: line,
|
2686
2816
|
};
|
2687
|
-
|
2688
|
-
|
2817
|
+
const addedPrefixes = currentFile.isCombined ? ['+ ', ' +', '++'] : ['+'];
|
2818
|
+
const deletedPrefixes = currentFile.isCombined ? ['- ', ' -', '--'] : ['-'];
|
2689
2819
|
if (startsWithAny(line, addedPrefixes)) {
|
2690
2820
|
currentFile.addedLines++;
|
2691
2821
|
currentLine.type = LineType.INSERT;
|
@@ -2706,7 +2836,7 @@ function parse(diffInput, config) {
|
|
2706
2836
|
currentBlock.lines.push(currentLine);
|
2707
2837
|
}
|
2708
2838
|
function existHunkHeader(line, lineIdx) {
|
2709
|
-
|
2839
|
+
let idx = lineIdx;
|
2710
2840
|
while (idx < diffLines.length - 3) {
|
2711
2841
|
if (line.startsWith('diff')) {
|
2712
2842
|
return false;
|
@@ -2720,17 +2850,17 @@ function parse(diffInput, config) {
|
|
2720
2850
|
}
|
2721
2851
|
return false;
|
2722
2852
|
}
|
2723
|
-
diffLines.forEach(
|
2853
|
+
diffLines.forEach((line, lineIndex) => {
|
2724
2854
|
if (!line || line.startsWith('*')) {
|
2725
2855
|
return;
|
2726
2856
|
}
|
2727
|
-
|
2728
|
-
|
2729
|
-
|
2730
|
-
|
2857
|
+
let values;
|
2858
|
+
const prevLine = diffLines[lineIndex - 1];
|
2859
|
+
const nxtLine = diffLines[lineIndex + 1];
|
2860
|
+
const afterNxtLine = diffLines[lineIndex + 2];
|
2731
2861
|
if (line.startsWith('diff --git') || line.startsWith('diff --combined')) {
|
2732
2862
|
startFile();
|
2733
|
-
|
2863
|
+
const gitDiffStart = /^diff --git "?([a-ciow]\/.+)"? "?([a-ciow]\/.+)"?/;
|
2734
2864
|
if ((values = gitDiffStart.exec(line))) {
|
2735
2865
|
possibleOldName = getFilename(values[1], undefined, config.dstPrefix);
|
2736
2866
|
possibleNewName = getFilename(values[2], undefined, config.srcPrefix);
|
@@ -2743,7 +2873,7 @@ function parse(diffInput, config) {
|
|
2743
2873
|
}
|
2744
2874
|
if (line.startsWith('Binary files') && !(currentFile === null || currentFile === void 0 ? void 0 : currentFile.isGitDiff)) {
|
2745
2875
|
startFile();
|
2746
|
-
|
2876
|
+
const unixDiffBinaryStart = /^Binary files "?([a-ciow]\/.+)"? and "?([a-ciow]\/.+)"? differ/;
|
2747
2877
|
if ((values = unixDiffBinaryStart.exec(line))) {
|
2748
2878
|
possibleOldName = getFilename(values[1], undefined, config.dstPrefix);
|
2749
2879
|
possibleNewName = getFilename(values[2], undefined, config.srcPrefix);
|
@@ -2774,7 +2904,7 @@ function parse(diffInput, config) {
|
|
2774
2904
|
currentFile.deletedLines = 0;
|
2775
2905
|
currentFile.blocks = [];
|
2776
2906
|
currentBlock = null;
|
2777
|
-
|
2907
|
+
const message = typeof config.diffTooBigMessage === 'function'
|
2778
2908
|
? config.diffTooBigMessage(files.length)
|
2779
2909
|
: 'Diff too big to be displayed';
|
2780
2910
|
startBlock(message);
|
@@ -2809,7 +2939,7 @@ function parse(diffInput, config) {
|
|
2809
2939
|
createLine(line);
|
2810
2940
|
return;
|
2811
2941
|
}
|
2812
|
-
|
2942
|
+
const doesNotExistHunkHeader = !existHunkHeader(line, lineIndex);
|
2813
2943
|
if (currentFile === null) {
|
2814
2944
|
throw new Error('Where is my file !!!');
|
2815
2945
|
}
|
@@ -4465,12 +4595,12 @@ function levenshtein(a, b) {
|
|
4465
4595
|
if (b.length === 0) {
|
4466
4596
|
return a.length;
|
4467
4597
|
}
|
4468
|
-
|
4469
|
-
|
4598
|
+
const matrix = [];
|
4599
|
+
let i;
|
4470
4600
|
for (i = 0; i <= b.length; i++) {
|
4471
4601
|
matrix[i] = [i];
|
4472
4602
|
}
|
4473
|
-
|
4603
|
+
let j;
|
4474
4604
|
for (j = 0; j <= a.length; j++) {
|
4475
4605
|
matrix[0][j] = j;
|
4476
4606
|
}
|
@@ -4487,22 +4617,21 @@ function levenshtein(a, b) {
|
|
4487
4617
|
return matrix[b.length][a.length];
|
4488
4618
|
}
|
4489
4619
|
function newDistanceFn(str) {
|
4490
|
-
return
|
4491
|
-
|
4492
|
-
|
4493
|
-
|
4620
|
+
return (x, y) => {
|
4621
|
+
const xValue = str(x).trim();
|
4622
|
+
const yValue = str(y).trim();
|
4623
|
+
const lev = levenshtein(xValue, yValue);
|
4494
4624
|
return lev / (xValue.length + yValue.length);
|
4495
4625
|
};
|
4496
4626
|
}
|
4497
4627
|
function newMatcherFn(distance) {
|
4498
|
-
function findBestMatch(a, b, cache) {
|
4499
|
-
|
4500
|
-
|
4501
|
-
|
4502
|
-
|
4503
|
-
|
4504
|
-
|
4505
|
-
var md = void 0;
|
4628
|
+
function findBestMatch(a, b, cache = new Map()) {
|
4629
|
+
let bestMatchDist = Infinity;
|
4630
|
+
let bestMatch;
|
4631
|
+
for (let i = 0; i < a.length; ++i) {
|
4632
|
+
for (let j = 0; j < b.length; ++j) {
|
4633
|
+
const cacheKey = JSON.stringify([a[i], b[j]]);
|
4634
|
+
let md;
|
4506
4635
|
if (!(cache.has(cacheKey) && (md = cache.get(cacheKey)))) {
|
4507
4636
|
md = distance(a[i], b[j]);
|
4508
4637
|
cache.set(cacheKey, md);
|
@@ -4515,25 +4644,23 @@ function newMatcherFn(distance) {
|
|
4515
4644
|
}
|
4516
4645
|
return bestMatch;
|
4517
4646
|
}
|
4518
|
-
function group(a, b, level, cache) {
|
4519
|
-
|
4520
|
-
if (cache === void 0) { cache = new Map(); }
|
4521
|
-
var bm = findBestMatch(a, b, cache);
|
4647
|
+
function group(a, b, level = 0, cache = new Map()) {
|
4648
|
+
const bm = findBestMatch(a, b, cache);
|
4522
4649
|
if (!bm || a.length + b.length < 3) {
|
4523
4650
|
return [[a, b]];
|
4524
4651
|
}
|
4525
|
-
|
4526
|
-
|
4527
|
-
|
4528
|
-
|
4529
|
-
|
4530
|
-
|
4531
|
-
|
4532
|
-
|
4533
|
-
|
4534
|
-
|
4535
|
-
|
4536
|
-
|
4652
|
+
const a1 = a.slice(0, bm.indexA);
|
4653
|
+
const b1 = b.slice(0, bm.indexB);
|
4654
|
+
const aMatch = [a[bm.indexA]];
|
4655
|
+
const bMatch = [b[bm.indexB]];
|
4656
|
+
const tailA = bm.indexA + 1;
|
4657
|
+
const tailB = bm.indexB + 1;
|
4658
|
+
const a2 = a.slice(tailA);
|
4659
|
+
const b2 = b.slice(tailB);
|
4660
|
+
const group1 = group(a1, b1, level + 1, cache);
|
4661
|
+
const groupMatch = group(aMatch, bMatch, level + 1, cache);
|
4662
|
+
const group2 = group(a2, b2, level + 1, cache);
|
4663
|
+
let result = groupMatch;
|
4537
4664
|
if (bm.indexA > 0 || bm.indexB > 0) {
|
4538
4665
|
result = group1.concat(result);
|
4539
4666
|
}
|
@@ -4546,22 +4673,11 @@ function newMatcherFn(distance) {
|
|
4546
4673
|
}
|
4547
4674
|
//# sourceMappingURL=rematch.js.map
|
4548
4675
|
;// CONCATENATED MODULE: ../../node_modules/diff2html/lib-esm/render-utils.js
|
4549
|
-
var __assign = (undefined && undefined.__assign) || function () {
|
4550
|
-
__assign = Object.assign || function(t) {
|
4551
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
4552
|
-
s = arguments[i];
|
4553
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
4554
|
-
t[p] = s[p];
|
4555
|
-
}
|
4556
|
-
return t;
|
4557
|
-
};
|
4558
|
-
return __assign.apply(this, arguments);
|
4559
|
-
};
|
4560
4676
|
|
4561
4677
|
|
4562
4678
|
|
4563
4679
|
|
4564
|
-
|
4680
|
+
const CSSLineClass = {
|
4565
4681
|
INSERTS: 'd2h-ins',
|
4566
4682
|
DELETES: 'd2h-del',
|
4567
4683
|
CONTEXT: 'd2h-cntx',
|
@@ -4569,15 +4685,16 @@ var CSSLineClass = {
|
|
4569
4685
|
INSERT_CHANGES: 'd2h-ins d2h-change',
|
4570
4686
|
DELETE_CHANGES: 'd2h-del d2h-change',
|
4571
4687
|
};
|
4572
|
-
|
4688
|
+
const defaultRenderConfig = {
|
4573
4689
|
matching: LineMatchingType.NONE,
|
4574
4690
|
matchWordsThreshold: 0.25,
|
4575
4691
|
maxLineLengthHighlight: 10000,
|
4576
4692
|
diffStyle: DiffStyleType.WORD,
|
4693
|
+
colorScheme: ColorSchemeType.LIGHT,
|
4577
4694
|
};
|
4578
|
-
|
4579
|
-
|
4580
|
-
|
4695
|
+
const separator = '/';
|
4696
|
+
const distance = newDistanceFn((change) => change.value);
|
4697
|
+
const matcher = newMatcherFn(distance);
|
4581
4698
|
function isDevNullName(name) {
|
4582
4699
|
return name.indexOf('dev/null') !== -1;
|
4583
4700
|
}
|
@@ -4597,6 +4714,17 @@ function toCSSClass(lineType) {
|
|
4597
4714
|
return CSSLineClass.DELETES;
|
4598
4715
|
}
|
4599
4716
|
}
|
4717
|
+
function colorSchemeToCss(colorScheme) {
|
4718
|
+
switch (colorScheme) {
|
4719
|
+
case ColorSchemeType.DARK:
|
4720
|
+
return 'd2h-dark-color-scheme';
|
4721
|
+
case ColorSchemeType.AUTO:
|
4722
|
+
return 'd2h-auto-color-scheme';
|
4723
|
+
case ColorSchemeType.LIGHT:
|
4724
|
+
default:
|
4725
|
+
return 'd2h-light-color-scheme';
|
4726
|
+
}
|
4727
|
+
}
|
4600
4728
|
function prefixLength(isCombined) {
|
4601
4729
|
return isCombined ? 2 : 1;
|
4602
4730
|
}
|
@@ -4610,27 +4738,26 @@ function escapeForHtml(str) {
|
|
4610
4738
|
.replace(/'/g, ''')
|
4611
4739
|
.replace(/\//g, '/');
|
4612
4740
|
}
|
4613
|
-
function deconstructLine(line, isCombined, escape) {
|
4614
|
-
|
4615
|
-
var indexToSplit = prefixLength(isCombined);
|
4741
|
+
function deconstructLine(line, isCombined, escape = true) {
|
4742
|
+
const indexToSplit = prefixLength(isCombined);
|
4616
4743
|
return {
|
4617
4744
|
prefix: line.substring(0, indexToSplit),
|
4618
4745
|
content: escape ? escapeForHtml(line.substring(indexToSplit)) : line.substring(indexToSplit),
|
4619
4746
|
};
|
4620
4747
|
}
|
4621
4748
|
function filenameDiff(file) {
|
4622
|
-
|
4623
|
-
|
4749
|
+
const oldFilename = unifyPath(file.oldName);
|
4750
|
+
const newFilename = unifyPath(file.newName);
|
4624
4751
|
if (oldFilename !== newFilename && !isDevNullName(oldFilename) && !isDevNullName(newFilename)) {
|
4625
|
-
|
4626
|
-
|
4627
|
-
|
4628
|
-
|
4629
|
-
|
4630
|
-
|
4631
|
-
|
4632
|
-
|
4633
|
-
|
4752
|
+
const prefixPaths = [];
|
4753
|
+
const suffixPaths = [];
|
4754
|
+
const oldFilenameParts = oldFilename.split(separator);
|
4755
|
+
const newFilenameParts = newFilename.split(separator);
|
4756
|
+
const oldFilenamePartsSize = oldFilenameParts.length;
|
4757
|
+
const newFilenamePartsSize = newFilenameParts.length;
|
4758
|
+
let i = 0;
|
4759
|
+
let j = oldFilenamePartsSize - 1;
|
4760
|
+
let k = newFilenamePartsSize - 1;
|
4634
4761
|
while (i < j && i < k) {
|
4635
4762
|
if (oldFilenameParts[i] === newFilenameParts[i]) {
|
4636
4763
|
prefixPaths.push(newFilenameParts[i]);
|
@@ -4650,10 +4777,10 @@ function filenameDiff(file) {
|
|
4650
4777
|
break;
|
4651
4778
|
}
|
4652
4779
|
}
|
4653
|
-
|
4654
|
-
|
4655
|
-
|
4656
|
-
|
4780
|
+
const finalPrefix = prefixPaths.join(separator);
|
4781
|
+
const finalSuffix = suffixPaths.join(separator);
|
4782
|
+
const oldRemainingPath = oldFilenameParts.slice(i, j + 1).join(separator);
|
4783
|
+
const newRemainingPath = newFilenameParts.slice(i, k + 1).join(separator);
|
4657
4784
|
if (finalPrefix.length && finalSuffix.length) {
|
4658
4785
|
return (finalPrefix + separator + '{' + oldRemainingPath + ' → ' + newRemainingPath + '}' + separator + finalSuffix);
|
4659
4786
|
}
|
@@ -4673,10 +4800,10 @@ function filenameDiff(file) {
|
|
4673
4800
|
}
|
4674
4801
|
}
|
4675
4802
|
function getHtmlId(file) {
|
4676
|
-
return
|
4803
|
+
return `d2h-${hashCode(filenameDiff(file)).toString().slice(-6)}`;
|
4677
4804
|
}
|
4678
4805
|
function getFileIcon(file) {
|
4679
|
-
|
4806
|
+
let templateName = 'file-changed';
|
4680
4807
|
if (file.isRename) {
|
4681
4808
|
templateName = 'file-renamed';
|
4682
4809
|
}
|
@@ -4694,11 +4821,10 @@ function getFileIcon(file) {
|
|
4694
4821
|
}
|
4695
4822
|
return templateName;
|
4696
4823
|
}
|
4697
|
-
function diffHighlight(diffLine1, diffLine2, isCombined, config) {
|
4698
|
-
|
4699
|
-
|
4700
|
-
|
4701
|
-
var line2 = deconstructLine(diffLine2, isCombined, false);
|
4824
|
+
function diffHighlight(diffLine1, diffLine2, isCombined, config = {}) {
|
4825
|
+
const { matching, maxLineLengthHighlight, matchWordsThreshold, diffStyle } = Object.assign(Object.assign({}, defaultRenderConfig), config);
|
4826
|
+
const line1 = deconstructLine(diffLine1, isCombined, false);
|
4827
|
+
const line2 = deconstructLine(diffLine2, isCombined, false);
|
4702
4828
|
if (line1.content.length > maxLineLengthHighlight || line2.content.length > maxLineLengthHighlight) {
|
4703
4829
|
return {
|
4704
4830
|
oldLine: {
|
@@ -4711,17 +4837,17 @@ function diffHighlight(diffLine1, diffLine2, isCombined, config) {
|
|
4711
4837
|
},
|
4712
4838
|
};
|
4713
4839
|
}
|
4714
|
-
|
4840
|
+
const diff = diffStyle === 'char'
|
4715
4841
|
? lib_diffChars(line1.content, line2.content)
|
4716
4842
|
: lib_diffWordsWithSpace(line1.content, line2.content);
|
4717
|
-
|
4843
|
+
const changedWords = [];
|
4718
4844
|
if (diffStyle === 'word' && matching === 'words') {
|
4719
|
-
|
4720
|
-
|
4721
|
-
|
4722
|
-
chunks.forEach(
|
4845
|
+
const removed = diff.filter(element => element.removed);
|
4846
|
+
const added = diff.filter(element => element.added);
|
4847
|
+
const chunks = matcher(added, removed);
|
4848
|
+
chunks.forEach(chunk => {
|
4723
4849
|
if (chunk[0].length === 1 && chunk[1].length === 1) {
|
4724
|
-
|
4850
|
+
const dist = distance(chunk[0][0], chunk[1][0]);
|
4725
4851
|
if (dist < matchWordsThreshold) {
|
4726
4852
|
changedWords.push(chunk[0][0]);
|
4727
4853
|
changedWords.push(chunk[1][0]);
|
@@ -4729,13 +4855,13 @@ function diffHighlight(diffLine1, diffLine2, isCombined, config) {
|
|
4729
4855
|
}
|
4730
4856
|
});
|
4731
4857
|
}
|
4732
|
-
|
4733
|
-
|
4734
|
-
|
4735
|
-
|
4858
|
+
const highlightedLine = diff.reduce((highlightedLine, part) => {
|
4859
|
+
const elemType = part.added ? 'ins' : part.removed ? 'del' : null;
|
4860
|
+
const addClass = changedWords.indexOf(part) > -1 ? ' class="d2h-change"' : '';
|
4861
|
+
const escapedValue = escapeForHtml(part.value);
|
4736
4862
|
return elemType !== null
|
4737
|
-
?
|
4738
|
-
:
|
4863
|
+
? `${highlightedLine}<${elemType}${addClass}>${escapedValue}</${elemType}>`
|
4864
|
+
: `${highlightedLine}${escapedValue}`;
|
4739
4865
|
}, '');
|
4740
4866
|
return {
|
4741
4867
|
oldLine: {
|
@@ -4751,12 +4877,19 @@ function diffHighlight(diffLine1, diffLine2, isCombined, config) {
|
|
4751
4877
|
//# sourceMappingURL=render-utils.js.map
|
4752
4878
|
;// CONCATENATED MODULE: ../../node_modules/diff2html/lib-esm/file-list-renderer.js
|
4753
4879
|
|
4754
|
-
|
4755
|
-
|
4756
|
-
|
4757
|
-
|
4758
|
-
|
4759
|
-
|
4880
|
+
const baseTemplatesPath = 'file-summary';
|
4881
|
+
const iconsBaseTemplatesPath = 'icon';
|
4882
|
+
const defaultFileListRendererConfig = {
|
4883
|
+
colorScheme: defaultRenderConfig.colorScheme,
|
4884
|
+
};
|
4885
|
+
class FileListRenderer {
|
4886
|
+
constructor(hoganUtils, config = {}) {
|
4887
|
+
this.hoganUtils = hoganUtils;
|
4888
|
+
this.config = Object.assign(Object.assign({}, defaultFileListRendererConfig), config);
|
4889
|
+
}
|
4890
|
+
render(diffFiles) {
|
4891
|
+
const files = diffFiles
|
4892
|
+
.map(file => this.hoganUtils.render(baseTemplatesPath, 'line', {
|
4760
4893
|
fileHtmlId: getHtmlId(file),
|
4761
4894
|
oldName: file.oldName,
|
4762
4895
|
newName: file.newName,
|
@@ -4764,65 +4897,56 @@ function render(diffFiles, hoganUtils) {
|
|
4764
4897
|
deletedLines: '-' + file.deletedLines,
|
4765
4898
|
addedLines: '+' + file.addedLines,
|
4766
4899
|
}, {
|
4767
|
-
fileIcon: hoganUtils.template(iconsBaseTemplatesPath, getFileIcon(file)),
|
4900
|
+
fileIcon: this.hoganUtils.template(iconsBaseTemplatesPath, getFileIcon(file)),
|
4901
|
+
}))
|
4902
|
+
.join('\n');
|
4903
|
+
return this.hoganUtils.render(baseTemplatesPath, 'wrapper', {
|
4904
|
+
colorScheme: colorSchemeToCss(this.config.colorScheme),
|
4905
|
+
filesNumber: diffFiles.length,
|
4906
|
+
files: files,
|
4768
4907
|
});
|
4769
|
-
}
|
4770
|
-
.join('\n');
|
4771
|
-
return hoganUtils.render(baseTemplatesPath, 'wrapper', {
|
4772
|
-
filesNumber: diffFiles.length,
|
4773
|
-
files: files,
|
4774
|
-
});
|
4908
|
+
}
|
4775
4909
|
}
|
4776
4910
|
//# sourceMappingURL=file-list-renderer.js.map
|
4777
4911
|
;// CONCATENATED MODULE: ../../node_modules/diff2html/lib-esm/line-by-line-renderer.js
|
4778
|
-
var line_by_line_renderer_assign = (undefined && undefined.__assign) || function () {
|
4779
|
-
line_by_line_renderer_assign = Object.assign || function(t) {
|
4780
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
4781
|
-
s = arguments[i];
|
4782
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
4783
|
-
t[p] = s[p];
|
4784
|
-
}
|
4785
|
-
return t;
|
4786
|
-
};
|
4787
|
-
return line_by_line_renderer_assign.apply(this, arguments);
|
4788
|
-
};
|
4789
4912
|
|
4790
4913
|
|
4791
4914
|
|
4792
|
-
|
4793
|
-
|
4794
|
-
|
4795
|
-
|
4796
|
-
|
4797
|
-
|
4798
|
-
|
4799
|
-
if (config === void 0) { config = {}; }
|
4915
|
+
const defaultLineByLineRendererConfig = Object.assign(Object.assign({}, defaultRenderConfig), { renderNothingWhenEmpty: false, matchingMaxComparisons: 2500, maxLineSizeInBlockForComparison: 200 });
|
4916
|
+
const genericTemplatesPath = 'generic';
|
4917
|
+
const line_by_line_renderer_baseTemplatesPath = 'line-by-line';
|
4918
|
+
const line_by_line_renderer_iconsBaseTemplatesPath = 'icon';
|
4919
|
+
const tagsBaseTemplatesPath = 'tag';
|
4920
|
+
class LineByLineRenderer {
|
4921
|
+
constructor(hoganUtils, config = {}) {
|
4800
4922
|
this.hoganUtils = hoganUtils;
|
4801
|
-
this.config =
|
4923
|
+
this.config = Object.assign(Object.assign({}, defaultLineByLineRendererConfig), config);
|
4802
4924
|
}
|
4803
|
-
|
4804
|
-
|
4805
|
-
|
4806
|
-
|
4807
|
-
var diffs;
|
4925
|
+
render(diffFiles) {
|
4926
|
+
const diffsHtml = diffFiles
|
4927
|
+
.map(file => {
|
4928
|
+
let diffs;
|
4808
4929
|
if (file.blocks.length) {
|
4809
|
-
diffs =
|
4930
|
+
diffs = this.generateFileHtml(file);
|
4810
4931
|
}
|
4811
4932
|
else {
|
4812
|
-
diffs =
|
4933
|
+
diffs = this.generateEmptyDiff();
|
4813
4934
|
}
|
4814
|
-
return
|
4935
|
+
return this.makeFileDiffHtml(file, diffs);
|
4815
4936
|
})
|
4816
4937
|
.join('\n');
|
4817
|
-
return this.hoganUtils.render(genericTemplatesPath, 'wrapper', {
|
4818
|
-
|
4819
|
-
|
4938
|
+
return this.hoganUtils.render(genericTemplatesPath, 'wrapper', {
|
4939
|
+
colorScheme: colorSchemeToCss(this.config.colorScheme),
|
4940
|
+
content: diffsHtml,
|
4941
|
+
});
|
4942
|
+
}
|
4943
|
+
makeFileDiffHtml(file, diffs) {
|
4820
4944
|
if (this.config.renderNothingWhenEmpty && Array.isArray(file.blocks) && file.blocks.length === 0)
|
4821
4945
|
return '';
|
4822
|
-
|
4823
|
-
|
4824
|
-
|
4825
|
-
|
4946
|
+
const fileDiffTemplate = this.hoganUtils.template(line_by_line_renderer_baseTemplatesPath, 'file-diff');
|
4947
|
+
const filePathTemplate = this.hoganUtils.template(genericTemplatesPath, 'file-path');
|
4948
|
+
const fileIconTemplate = this.hoganUtils.template(line_by_line_renderer_iconsBaseTemplatesPath, 'file');
|
4949
|
+
const fileTagTemplate = this.hoganUtils.template(tagsBaseTemplatesPath, getFileIcon(file));
|
4826
4950
|
return fileDiffTemplate.render({
|
4827
4951
|
file: file,
|
4828
4952
|
fileHtmlId: getHtmlId(file),
|
@@ -4834,38 +4958,35 @@ var LineByLineRenderer = (function () {
|
|
4834
4958
|
fileTag: fileTagTemplate,
|
4835
4959
|
}),
|
4836
4960
|
});
|
4837
|
-
}
|
4838
|
-
|
4961
|
+
}
|
4962
|
+
generateEmptyDiff() {
|
4839
4963
|
return this.hoganUtils.render(genericTemplatesPath, 'empty-diff', {
|
4840
4964
|
contentClass: 'd2h-code-line',
|
4841
4965
|
CSSLineClass: CSSLineClass,
|
4842
4966
|
});
|
4843
|
-
}
|
4844
|
-
|
4845
|
-
|
4846
|
-
var matcher = newMatcherFn(newDistanceFn(function (e) { return deconstructLine(e.content, file.isCombined).content; }));
|
4967
|
+
}
|
4968
|
+
generateFileHtml(file) {
|
4969
|
+
const matcher = newMatcherFn(newDistanceFn((e) => deconstructLine(e.content, file.isCombined).content));
|
4847
4970
|
return file.blocks
|
4848
|
-
.map(
|
4849
|
-
|
4971
|
+
.map(block => {
|
4972
|
+
let lines = this.hoganUtils.render(genericTemplatesPath, 'block-header', {
|
4850
4973
|
CSSLineClass: CSSLineClass,
|
4851
4974
|
blockHeader: file.isTooBig ? block.header : escapeForHtml(block.header),
|
4852
4975
|
lineClass: 'd2h-code-linenumber',
|
4853
4976
|
contentClass: 'd2h-code-line',
|
4854
4977
|
});
|
4855
|
-
|
4856
|
-
var contextLines = _a[0], oldLines = _a[1], newLines = _a[2];
|
4978
|
+
this.applyLineGroupping(block).forEach(([contextLines, oldLines, newLines]) => {
|
4857
4979
|
if (oldLines.length && newLines.length && !contextLines.length) {
|
4858
|
-
|
4859
|
-
|
4860
|
-
var _b = _this.processChangedLines(file, file.isCombined, oldLines, newLines), left = _b.left, right = _b.right;
|
4980
|
+
this.applyRematchMatching(oldLines, newLines, matcher).map(([oldLines, newLines]) => {
|
4981
|
+
const { left, right } = this.processChangedLines(file, file.isCombined, oldLines, newLines);
|
4861
4982
|
lines += left;
|
4862
4983
|
lines += right;
|
4863
4984
|
});
|
4864
4985
|
}
|
4865
4986
|
else if (contextLines.length) {
|
4866
|
-
contextLines.forEach(
|
4867
|
-
|
4868
|
-
lines +=
|
4987
|
+
contextLines.forEach(line => {
|
4988
|
+
const { prefix, content } = deconstructLine(line.content, file.isCombined);
|
4989
|
+
lines += this.generateSingleLineHtml(file, {
|
4869
4990
|
type: CSSLineClass.CONTEXT,
|
4870
4991
|
prefix: prefix,
|
4871
4992
|
content: content,
|
@@ -4875,7 +4996,7 @@ var LineByLineRenderer = (function () {
|
|
4875
4996
|
});
|
4876
4997
|
}
|
4877
4998
|
else if (oldLines.length || newLines.length) {
|
4878
|
-
|
4999
|
+
const { left, right } = this.processChangedLines(file, file.isCombined, oldLines, newLines);
|
4879
5000
|
lines += left;
|
4880
5001
|
lines += right;
|
4881
5002
|
}
|
@@ -4886,13 +5007,13 @@ var LineByLineRenderer = (function () {
|
|
4886
5007
|
return lines;
|
4887
5008
|
})
|
4888
5009
|
.join('\n');
|
4889
|
-
}
|
4890
|
-
|
4891
|
-
|
4892
|
-
|
4893
|
-
|
4894
|
-
for (
|
4895
|
-
|
5010
|
+
}
|
5011
|
+
applyLineGroupping(block) {
|
5012
|
+
const blockLinesGroups = [];
|
5013
|
+
let oldLines = [];
|
5014
|
+
let newLines = [];
|
5015
|
+
for (let i = 0; i < block.lines.length; i++) {
|
5016
|
+
const diffLine = block.lines[i];
|
4896
5017
|
if ((diffLine.type !== LineType.INSERT && newLines.length) ||
|
4897
5018
|
(diffLine.type === LineType.CONTEXT && oldLines.length > 0)) {
|
4898
5019
|
blockLinesGroups.push([[], oldLines, newLines]);
|
@@ -4918,59 +5039,59 @@ var LineByLineRenderer = (function () {
|
|
4918
5039
|
newLines = [];
|
4919
5040
|
}
|
4920
5041
|
return blockLinesGroups;
|
4921
|
-
}
|
4922
|
-
|
4923
|
-
|
4924
|
-
|
4925
|
-
|
5042
|
+
}
|
5043
|
+
applyRematchMatching(oldLines, newLines, matcher) {
|
5044
|
+
const comparisons = oldLines.length * newLines.length;
|
5045
|
+
const maxLineSizeInBlock = Math.max.apply(null, [0].concat(oldLines.concat(newLines).map(elem => elem.content.length)));
|
5046
|
+
const doMatching = comparisons < this.config.matchingMaxComparisons &&
|
4926
5047
|
maxLineSizeInBlock < this.config.maxLineSizeInBlockForComparison &&
|
4927
5048
|
(this.config.matching === 'lines' || this.config.matching === 'words');
|
4928
5049
|
return doMatching ? matcher(oldLines, newLines) : [[oldLines, newLines]];
|
4929
|
-
}
|
4930
|
-
|
4931
|
-
|
5050
|
+
}
|
5051
|
+
processChangedLines(file, isCombined, oldLines, newLines) {
|
5052
|
+
const fileHtml = {
|
4932
5053
|
right: '',
|
4933
5054
|
left: '',
|
4934
5055
|
};
|
4935
|
-
|
4936
|
-
for (
|
4937
|
-
|
4938
|
-
|
4939
|
-
|
5056
|
+
const maxLinesNumber = Math.max(oldLines.length, newLines.length);
|
5057
|
+
for (let i = 0; i < maxLinesNumber; i++) {
|
5058
|
+
const oldLine = oldLines[i];
|
5059
|
+
const newLine = newLines[i];
|
5060
|
+
const diff = oldLine !== undefined && newLine !== undefined
|
4940
5061
|
? diffHighlight(oldLine.content, newLine.content, isCombined, this.config)
|
4941
5062
|
: undefined;
|
4942
|
-
|
4943
|
-
?
|
5063
|
+
const preparedOldLine = oldLine !== undefined && oldLine.oldNumber !== undefined
|
5064
|
+
? Object.assign(Object.assign({}, (diff !== undefined
|
4944
5065
|
? {
|
4945
5066
|
prefix: diff.oldLine.prefix,
|
4946
5067
|
content: diff.oldLine.content,
|
4947
5068
|
type: CSSLineClass.DELETE_CHANGES,
|
4948
5069
|
}
|
4949
|
-
:
|
4950
|
-
|
4951
|
-
?
|
5070
|
+
: Object.assign(Object.assign({}, deconstructLine(oldLine.content, isCombined)), { type: toCSSClass(oldLine.type) }))), { oldNumber: oldLine.oldNumber, newNumber: oldLine.newNumber }) : undefined;
|
5071
|
+
const preparedNewLine = newLine !== undefined && newLine.newNumber !== undefined
|
5072
|
+
? Object.assign(Object.assign({}, (diff !== undefined
|
4952
5073
|
? {
|
4953
5074
|
prefix: diff.newLine.prefix,
|
4954
5075
|
content: diff.newLine.content,
|
4955
5076
|
type: CSSLineClass.INSERT_CHANGES,
|
4956
5077
|
}
|
4957
|
-
:
|
4958
|
-
|
5078
|
+
: Object.assign(Object.assign({}, deconstructLine(newLine.content, isCombined)), { type: toCSSClass(newLine.type) }))), { oldNumber: newLine.oldNumber, newNumber: newLine.newNumber }) : undefined;
|
5079
|
+
const { left, right } = this.generateLineHtml(file, preparedOldLine, preparedNewLine);
|
4959
5080
|
fileHtml.left += left;
|
4960
5081
|
fileHtml.right += right;
|
4961
5082
|
}
|
4962
5083
|
return fileHtml;
|
4963
|
-
}
|
4964
|
-
|
5084
|
+
}
|
5085
|
+
generateLineHtml(file, oldLine, newLine) {
|
4965
5086
|
return {
|
4966
5087
|
left: this.generateSingleLineHtml(file, oldLine),
|
4967
5088
|
right: this.generateSingleLineHtml(file, newLine),
|
4968
5089
|
};
|
4969
|
-
}
|
4970
|
-
|
5090
|
+
}
|
5091
|
+
generateSingleLineHtml(file, line) {
|
4971
5092
|
if (line === undefined)
|
4972
5093
|
return '';
|
4973
|
-
|
5094
|
+
const lineNumberHtml = this.hoganUtils.render(line_by_line_renderer_baseTemplatesPath, 'numbers', {
|
4974
5095
|
oldNumber: line.oldNumber || '',
|
4975
5096
|
newNumber: line.newNumber || '',
|
4976
5097
|
});
|
@@ -4981,63 +5102,51 @@ var LineByLineRenderer = (function () {
|
|
4981
5102
|
prefix: line.prefix === ' ' ? ' ' : line.prefix,
|
4982
5103
|
content: line.content,
|
4983
5104
|
lineNumber: lineNumberHtml,
|
4984
|
-
line
|
4985
|
-
file
|
5105
|
+
line,
|
5106
|
+
file,
|
4986
5107
|
});
|
4987
|
-
}
|
4988
|
-
|
4989
|
-
}());
|
4990
|
-
/* harmony default export */ const line_by_line_renderer = (LineByLineRenderer);
|
5108
|
+
}
|
5109
|
+
}
|
4991
5110
|
//# sourceMappingURL=line-by-line-renderer.js.map
|
4992
5111
|
;// CONCATENATED MODULE: ../../node_modules/diff2html/lib-esm/side-by-side-renderer.js
|
4993
|
-
var side_by_side_renderer_assign = (undefined && undefined.__assign) || function () {
|
4994
|
-
side_by_side_renderer_assign = Object.assign || function(t) {
|
4995
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
4996
|
-
s = arguments[i];
|
4997
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
4998
|
-
t[p] = s[p];
|
4999
|
-
}
|
5000
|
-
return t;
|
5001
|
-
};
|
5002
|
-
return side_by_side_renderer_assign.apply(this, arguments);
|
5003
|
-
};
|
5004
5112
|
|
5005
5113
|
|
5006
5114
|
|
5007
|
-
|
5008
|
-
|
5009
|
-
|
5010
|
-
|
5011
|
-
|
5012
|
-
|
5013
|
-
|
5014
|
-
if (config === void 0) { config = {}; }
|
5115
|
+
const defaultSideBySideRendererConfig = Object.assign(Object.assign({}, defaultRenderConfig), { renderNothingWhenEmpty: false, matchingMaxComparisons: 2500, maxLineSizeInBlockForComparison: 200 });
|
5116
|
+
const side_by_side_renderer_genericTemplatesPath = 'generic';
|
5117
|
+
const side_by_side_renderer_baseTemplatesPath = 'side-by-side';
|
5118
|
+
const side_by_side_renderer_iconsBaseTemplatesPath = 'icon';
|
5119
|
+
const side_by_side_renderer_tagsBaseTemplatesPath = 'tag';
|
5120
|
+
class SideBySideRenderer {
|
5121
|
+
constructor(hoganUtils, config = {}) {
|
5015
5122
|
this.hoganUtils = hoganUtils;
|
5016
|
-
this.config =
|
5123
|
+
this.config = Object.assign(Object.assign({}, defaultSideBySideRendererConfig), config);
|
5017
5124
|
}
|
5018
|
-
|
5019
|
-
|
5020
|
-
|
5021
|
-
|
5022
|
-
var diffs;
|
5125
|
+
render(diffFiles) {
|
5126
|
+
const diffsHtml = diffFiles
|
5127
|
+
.map(file => {
|
5128
|
+
let diffs;
|
5023
5129
|
if (file.blocks.length) {
|
5024
|
-
diffs =
|
5130
|
+
diffs = this.generateFileHtml(file);
|
5025
5131
|
}
|
5026
5132
|
else {
|
5027
|
-
diffs =
|
5133
|
+
diffs = this.generateEmptyDiff();
|
5028
5134
|
}
|
5029
|
-
return
|
5135
|
+
return this.makeFileDiffHtml(file, diffs);
|
5030
5136
|
})
|
5031
5137
|
.join('\n');
|
5032
|
-
return this.hoganUtils.render(side_by_side_renderer_genericTemplatesPath, 'wrapper', {
|
5033
|
-
|
5034
|
-
|
5138
|
+
return this.hoganUtils.render(side_by_side_renderer_genericTemplatesPath, 'wrapper', {
|
5139
|
+
colorScheme: colorSchemeToCss(this.config.colorScheme),
|
5140
|
+
content: diffsHtml,
|
5141
|
+
});
|
5142
|
+
}
|
5143
|
+
makeFileDiffHtml(file, diffs) {
|
5035
5144
|
if (this.config.renderNothingWhenEmpty && Array.isArray(file.blocks) && file.blocks.length === 0)
|
5036
5145
|
return '';
|
5037
|
-
|
5038
|
-
|
5039
|
-
|
5040
|
-
|
5146
|
+
const fileDiffTemplate = this.hoganUtils.template(side_by_side_renderer_baseTemplatesPath, 'file-diff');
|
5147
|
+
const filePathTemplate = this.hoganUtils.template(side_by_side_renderer_genericTemplatesPath, 'file-path');
|
5148
|
+
const fileIconTemplate = this.hoganUtils.template(side_by_side_renderer_iconsBaseTemplatesPath, 'file');
|
5149
|
+
const fileTagTemplate = this.hoganUtils.template(side_by_side_renderer_tagsBaseTemplatesPath, getFileIcon(file));
|
5041
5150
|
return fileDiffTemplate.render({
|
5042
5151
|
file: file,
|
5043
5152
|
fileHtmlId: getHtmlId(file),
|
@@ -5049,8 +5158,8 @@ var SideBySideRenderer = (function () {
|
|
5049
5158
|
fileTag: fileTagTemplate,
|
5050
5159
|
}),
|
5051
5160
|
});
|
5052
|
-
}
|
5053
|
-
|
5161
|
+
}
|
5162
|
+
generateEmptyDiff() {
|
5054
5163
|
return {
|
5055
5164
|
right: '',
|
5056
5165
|
left: this.hoganUtils.render(side_by_side_renderer_genericTemplatesPath, 'empty-diff', {
|
@@ -5058,30 +5167,27 @@ var SideBySideRenderer = (function () {
|
|
5058
5167
|
CSSLineClass: CSSLineClass,
|
5059
5168
|
}),
|
5060
5169
|
};
|
5061
|
-
}
|
5062
|
-
|
5063
|
-
|
5064
|
-
var matcher = newMatcherFn(newDistanceFn(function (e) { return deconstructLine(e.content, file.isCombined).content; }));
|
5170
|
+
}
|
5171
|
+
generateFileHtml(file) {
|
5172
|
+
const matcher = newMatcherFn(newDistanceFn((e) => deconstructLine(e.content, file.isCombined).content));
|
5065
5173
|
return file.blocks
|
5066
|
-
.map(
|
5067
|
-
|
5068
|
-
left:
|
5069
|
-
right:
|
5174
|
+
.map(block => {
|
5175
|
+
const fileHtml = {
|
5176
|
+
left: this.makeHeaderHtml(block.header, file),
|
5177
|
+
right: this.makeHeaderHtml(''),
|
5070
5178
|
};
|
5071
|
-
|
5072
|
-
var contextLines = _a[0], oldLines = _a[1], newLines = _a[2];
|
5179
|
+
this.applyLineGroupping(block).forEach(([contextLines, oldLines, newLines]) => {
|
5073
5180
|
if (oldLines.length && newLines.length && !contextLines.length) {
|
5074
|
-
|
5075
|
-
|
5076
|
-
var _b = _this.processChangedLines(file.isCombined, oldLines, newLines), left = _b.left, right = _b.right;
|
5181
|
+
this.applyRematchMatching(oldLines, newLines, matcher).map(([oldLines, newLines]) => {
|
5182
|
+
const { left, right } = this.processChangedLines(file.isCombined, oldLines, newLines);
|
5077
5183
|
fileHtml.left += left;
|
5078
5184
|
fileHtml.right += right;
|
5079
5185
|
});
|
5080
5186
|
}
|
5081
5187
|
else if (contextLines.length) {
|
5082
|
-
contextLines.forEach(
|
5083
|
-
|
5084
|
-
|
5188
|
+
contextLines.forEach(line => {
|
5189
|
+
const { prefix, content } = deconstructLine(line.content, file.isCombined);
|
5190
|
+
const { left, right } = this.generateLineHtml({
|
5085
5191
|
type: CSSLineClass.CONTEXT,
|
5086
5192
|
prefix: prefix,
|
5087
5193
|
content: content,
|
@@ -5091,13 +5197,13 @@ var SideBySideRenderer = (function () {
|
|
5091
5197
|
prefix: prefix,
|
5092
5198
|
content: content,
|
5093
5199
|
number: line.newNumber,
|
5094
|
-
})
|
5200
|
+
});
|
5095
5201
|
fileHtml.left += left;
|
5096
5202
|
fileHtml.right += right;
|
5097
5203
|
});
|
5098
5204
|
}
|
5099
5205
|
else if (oldLines.length || newLines.length) {
|
5100
|
-
|
5206
|
+
const { left, right } = this.processChangedLines(file.isCombined, oldLines, newLines);
|
5101
5207
|
fileHtml.left += left;
|
5102
5208
|
fileHtml.right += right;
|
5103
5209
|
}
|
@@ -5107,16 +5213,16 @@ var SideBySideRenderer = (function () {
|
|
5107
5213
|
});
|
5108
5214
|
return fileHtml;
|
5109
5215
|
})
|
5110
|
-
.reduce(
|
5216
|
+
.reduce((accomulated, html) => {
|
5111
5217
|
return { left: accomulated.left + html.left, right: accomulated.right + html.right };
|
5112
5218
|
}, { left: '', right: '' });
|
5113
|
-
}
|
5114
|
-
|
5115
|
-
|
5116
|
-
|
5117
|
-
|
5118
|
-
for (
|
5119
|
-
|
5219
|
+
}
|
5220
|
+
applyLineGroupping(block) {
|
5221
|
+
const blockLinesGroups = [];
|
5222
|
+
let oldLines = [];
|
5223
|
+
let newLines = [];
|
5224
|
+
for (let i = 0; i < block.lines.length; i++) {
|
5225
|
+
const diffLine = block.lines[i];
|
5120
5226
|
if ((diffLine.type !== LineType.INSERT && newLines.length) ||
|
5121
5227
|
(diffLine.type === LineType.CONTEXT && oldLines.length > 0)) {
|
5122
5228
|
blockLinesGroups.push([[], oldLines, newLines]);
|
@@ -5142,86 +5248,84 @@ var SideBySideRenderer = (function () {
|
|
5142
5248
|
newLines = [];
|
5143
5249
|
}
|
5144
5250
|
return blockLinesGroups;
|
5145
|
-
}
|
5146
|
-
|
5147
|
-
|
5148
|
-
|
5149
|
-
|
5251
|
+
}
|
5252
|
+
applyRematchMatching(oldLines, newLines, matcher) {
|
5253
|
+
const comparisons = oldLines.length * newLines.length;
|
5254
|
+
const maxLineSizeInBlock = Math.max.apply(null, [0].concat(oldLines.concat(newLines).map(elem => elem.content.length)));
|
5255
|
+
const doMatching = comparisons < this.config.matchingMaxComparisons &&
|
5150
5256
|
maxLineSizeInBlock < this.config.maxLineSizeInBlockForComparison &&
|
5151
5257
|
(this.config.matching === 'lines' || this.config.matching === 'words');
|
5152
5258
|
return doMatching ? matcher(oldLines, newLines) : [[oldLines, newLines]];
|
5153
|
-
}
|
5154
|
-
|
5259
|
+
}
|
5260
|
+
makeHeaderHtml(blockHeader, file) {
|
5155
5261
|
return this.hoganUtils.render(side_by_side_renderer_genericTemplatesPath, 'block-header', {
|
5156
5262
|
CSSLineClass: CSSLineClass,
|
5157
5263
|
blockHeader: (file === null || file === void 0 ? void 0 : file.isTooBig) ? blockHeader : escapeForHtml(blockHeader),
|
5158
5264
|
lineClass: 'd2h-code-side-linenumber',
|
5159
5265
|
contentClass: 'd2h-code-side-line',
|
5160
5266
|
});
|
5161
|
-
}
|
5162
|
-
|
5163
|
-
|
5267
|
+
}
|
5268
|
+
processChangedLines(isCombined, oldLines, newLines) {
|
5269
|
+
const fileHtml = {
|
5164
5270
|
right: '',
|
5165
5271
|
left: '',
|
5166
5272
|
};
|
5167
|
-
|
5168
|
-
for (
|
5169
|
-
|
5170
|
-
|
5171
|
-
|
5273
|
+
const maxLinesNumber = Math.max(oldLines.length, newLines.length);
|
5274
|
+
for (let i = 0; i < maxLinesNumber; i++) {
|
5275
|
+
const oldLine = oldLines[i];
|
5276
|
+
const newLine = newLines[i];
|
5277
|
+
const diff = oldLine !== undefined && newLine !== undefined
|
5172
5278
|
? diffHighlight(oldLine.content, newLine.content, isCombined, this.config)
|
5173
5279
|
: undefined;
|
5174
|
-
|
5175
|
-
?
|
5280
|
+
const preparedOldLine = oldLine !== undefined && oldLine.oldNumber !== undefined
|
5281
|
+
? Object.assign(Object.assign({}, (diff !== undefined
|
5176
5282
|
? {
|
5177
5283
|
prefix: diff.oldLine.prefix,
|
5178
5284
|
content: diff.oldLine.content,
|
5179
5285
|
type: CSSLineClass.DELETE_CHANGES,
|
5180
5286
|
}
|
5181
|
-
:
|
5182
|
-
|
5183
|
-
?
|
5287
|
+
: Object.assign(Object.assign({}, deconstructLine(oldLine.content, isCombined)), { type: toCSSClass(oldLine.type) }))), { number: oldLine.oldNumber }) : undefined;
|
5288
|
+
const preparedNewLine = newLine !== undefined && newLine.newNumber !== undefined
|
5289
|
+
? Object.assign(Object.assign({}, (diff !== undefined
|
5184
5290
|
? {
|
5185
5291
|
prefix: diff.newLine.prefix,
|
5186
5292
|
content: diff.newLine.content,
|
5187
5293
|
type: CSSLineClass.INSERT_CHANGES,
|
5188
5294
|
}
|
5189
|
-
:
|
5190
|
-
|
5295
|
+
: Object.assign(Object.assign({}, deconstructLine(newLine.content, isCombined)), { type: toCSSClass(newLine.type) }))), { number: newLine.newNumber }) : undefined;
|
5296
|
+
const { left, right } = this.generateLineHtml(preparedOldLine, preparedNewLine);
|
5191
5297
|
fileHtml.left += left;
|
5192
5298
|
fileHtml.right += right;
|
5193
5299
|
}
|
5194
5300
|
return fileHtml;
|
5195
|
-
}
|
5196
|
-
|
5301
|
+
}
|
5302
|
+
generateLineHtml(oldLine, newLine) {
|
5197
5303
|
return {
|
5198
5304
|
left: this.generateSingleHtml(oldLine),
|
5199
5305
|
right: this.generateSingleHtml(newLine),
|
5200
5306
|
};
|
5201
|
-
}
|
5202
|
-
|
5203
|
-
|
5204
|
-
|
5307
|
+
}
|
5308
|
+
generateSingleHtml(line) {
|
5309
|
+
const lineClass = 'd2h-code-side-linenumber';
|
5310
|
+
const contentClass = 'd2h-code-side-line';
|
5205
5311
|
return this.hoganUtils.render(side_by_side_renderer_genericTemplatesPath, 'line', {
|
5206
|
-
type: (line === null || line === void 0 ? void 0 : line.type) ||
|
5207
|
-
lineClass: line !== undefined ? lineClass :
|
5208
|
-
contentClass: line !== undefined ? contentClass :
|
5312
|
+
type: (line === null || line === void 0 ? void 0 : line.type) || `${CSSLineClass.CONTEXT} d2h-emptyplaceholder`,
|
5313
|
+
lineClass: line !== undefined ? lineClass : `${lineClass} d2h-code-side-emptyplaceholder`,
|
5314
|
+
contentClass: line !== undefined ? contentClass : `${contentClass} d2h-code-side-emptyplaceholder`,
|
5209
5315
|
prefix: (line === null || line === void 0 ? void 0 : line.prefix) === ' ' ? ' ' : line === null || line === void 0 ? void 0 : line.prefix,
|
5210
5316
|
content: line === null || line === void 0 ? void 0 : line.content,
|
5211
5317
|
lineNumber: line === null || line === void 0 ? void 0 : line.number,
|
5212
5318
|
});
|
5213
|
-
}
|
5214
|
-
|
5215
|
-
}());
|
5216
|
-
/* harmony default export */ const side_by_side_renderer = (SideBySideRenderer);
|
5319
|
+
}
|
5320
|
+
}
|
5217
5321
|
//# sourceMappingURL=side-by-side-renderer.js.map
|
5218
5322
|
// EXTERNAL MODULE: ../../node_modules/hogan.js/lib/hogan.js
|
5219
5323
|
var hogan = __webpack_require__(112);
|
5220
5324
|
;// CONCATENATED MODULE: ../../node_modules/diff2html/lib-esm/diff2html-templates.js
|
5221
5325
|
|
5222
|
-
|
5326
|
+
const defaultTemplates = {};
|
5223
5327
|
defaultTemplates["file-summary-line"] = new hogan.Template({ code: function (c, p, i) { var t = this; t.b(i = i || ""); t.b("<li class=\"d2h-file-list-line\">"); t.b("\n" + i); t.b(" <span class=\"d2h-file-name-wrapper\">"); t.b("\n" + i); t.b(t.rp("<fileIcon0", c, p, " ")); t.b(" <a href=\"#"); t.b(t.v(t.f("fileHtmlId", c, p, 0))); t.b("\" class=\"d2h-file-name\">"); t.b(t.v(t.f("fileName", c, p, 0))); t.b("</a>"); t.b("\n" + i); t.b(" <span class=\"d2h-file-stats\">"); t.b("\n" + i); t.b(" <span class=\"d2h-lines-added\">"); t.b(t.v(t.f("addedLines", c, p, 0))); t.b("</span>"); t.b("\n" + i); t.b(" <span class=\"d2h-lines-deleted\">"); t.b(t.v(t.f("deletedLines", c, p, 0))); t.b("</span>"); t.b("\n" + i); t.b(" </span>"); t.b("\n" + i); t.b(" </span>"); t.b("\n" + i); t.b("</li>"); return t.fl(); }, partials: { "<fileIcon0": { name: "fileIcon", partials: {}, subs: {} } }, subs: {} });
|
5224
|
-
defaultTemplates["file-summary-wrapper"] = new hogan.Template({ code: function (c, p, i) { var t = this; t.b(i = i || ""); t.b("<div class=\"d2h-file-list-wrapper\">"); t.b("\n" + i); t.b(" <div class=\"d2h-file-list-header\">"); t.b("\n" + i); t.b(" <span class=\"d2h-file-list-title\">Files changed ("); t.b(t.v(t.f("filesNumber", c, p, 0))); t.b(")</span>"); t.b("\n" + i); t.b(" <a class=\"d2h-file-switch d2h-hide\">hide</a>"); t.b("\n" + i); t.b(" <a class=\"d2h-file-switch d2h-show\">show</a>"); t.b("\n" + i); t.b(" </div>"); t.b("\n" + i); t.b(" <ol class=\"d2h-file-list\">"); t.b("\n" + i); t.b(" "); t.b(t.t(t.f("files", c, p, 0))); t.b("\n" + i); t.b(" </ol>"); t.b("\n" + i); t.b("</div>"); return t.fl(); }, partials: {}, subs: {} });
|
5328
|
+
defaultTemplates["file-summary-wrapper"] = new hogan.Template({ code: function (c, p, i) { var t = this; t.b(i = i || ""); t.b("<div class=\"d2h-file-list-wrapper "); t.b(t.v(t.f("colorScheme", c, p, 0))); t.b("\">"); t.b("\n" + i); t.b(" <div class=\"d2h-file-list-header\">"); t.b("\n" + i); t.b(" <span class=\"d2h-file-list-title\">Files changed ("); t.b(t.v(t.f("filesNumber", c, p, 0))); t.b(")</span>"); t.b("\n" + i); t.b(" <a class=\"d2h-file-switch d2h-hide\">hide</a>"); t.b("\n" + i); t.b(" <a class=\"d2h-file-switch d2h-show\">show</a>"); t.b("\n" + i); t.b(" </div>"); t.b("\n" + i); t.b(" <ol class=\"d2h-file-list\">"); t.b("\n" + i); t.b(" "); t.b(t.t(t.f("files", c, p, 0))); t.b("\n" + i); t.b(" </ol>"); t.b("\n" + i); t.b("</div>"); return t.fl(); }, partials: {}, subs: {} });
|
5225
5329
|
defaultTemplates["generic-block-header"] = new hogan.Template({ code: function (c, p, i) { var t = this; t.b(i = i || ""); t.b("<tr>"); t.b("\n" + i); t.b(" <td class=\""); t.b(t.v(t.f("lineClass", c, p, 0))); t.b(" "); t.b(t.v(t.d("CSSLineClass.INFO", c, p, 0))); t.b("\"></td>"); t.b("\n" + i); t.b(" <td class=\""); t.b(t.v(t.d("CSSLineClass.INFO", c, p, 0))); t.b("\">"); t.b("\n" + i); t.b(" <div class=\""); t.b(t.v(t.f("contentClass", c, p, 0))); t.b("\">"); if (t.s(t.f("blockHeader", c, p, 1), c, p, 0, 156, 173, "{{ }}")) {
|
5226
5330
|
t.rs(c, p, function (c, p, t) { t.b(t.t(t.f("blockHeader", c, p, 0))); });
|
5227
5331
|
c.pop();
|
@@ -5243,7 +5347,7 @@ defaultTemplates["generic-line"] = new hogan.Template({ code: function (c, p, i)
|
|
5243
5347
|
t.b(" <span class=\"d2h-code-line-ctn\"><br></span>");
|
5244
5348
|
t.b("\n" + i);
|
5245
5349
|
} ; t.b(" </div>"); t.b("\n" + i); t.b(" </td>"); t.b("\n" + i); t.b("</tr>"); return t.fl(); }, partials: {}, subs: {} });
|
5246
|
-
defaultTemplates["generic-wrapper"] = new hogan.Template({ code: function (c, p, i) { var t = this; t.b(i = i || ""); t.b("<div class=\"d2h-wrapper\">"); t.b("\n" + i); t.b(" "); t.b(t.t(t.f("content", c, p, 0))); t.b("\n" + i); t.b("</div>"); return t.fl(); }, partials: {}, subs: {} });
|
5350
|
+
defaultTemplates["generic-wrapper"] = new hogan.Template({ code: function (c, p, i) { var t = this; t.b(i = i || ""); t.b("<div class=\"d2h-wrapper "); t.b(t.v(t.f("colorScheme", c, p, 0))); t.b("\">"); t.b("\n" + i); t.b(" "); t.b(t.t(t.f("content", c, p, 0))); t.b("\n" + i); t.b("</div>"); return t.fl(); }, partials: {}, subs: {} });
|
5247
5351
|
defaultTemplates["icon-file-added"] = new hogan.Template({ code: function (c, p, i) { var t = this; t.b(i = i || ""); t.b("<svg aria-hidden=\"true\" class=\"d2h-icon d2h-added\" height=\"16\" title=\"added\" version=\"1.1\" viewBox=\"0 0 14 16\""); t.b("\n" + i); t.b(" width=\"14\">"); t.b("\n" + i); t.b(" <path d=\"M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM6 9H3V7h3V4h2v3h3v2H8v3H6V9z\"></path>"); t.b("\n" + i); t.b("</svg>"); return t.fl(); }, partials: {}, subs: {} });
|
5248
5352
|
defaultTemplates["icon-file-changed"] = new hogan.Template({ code: function (c, p, i) { var t = this; t.b(i = i || ""); t.b("<svg aria-hidden=\"true\" class=\"d2h-icon d2h-changed\" height=\"16\" title=\"modified\" version=\"1.1\""); t.b("\n" + i); t.b(" viewBox=\"0 0 14 16\" width=\"14\">"); t.b("\n" + i); t.b(" <path d=\"M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z\"></path>"); t.b("\n" + i); t.b("</svg>"); return t.fl(); }, partials: {}, subs: {} });
|
5249
5353
|
defaultTemplates["icon-file-deleted"] = new hogan.Template({ code: function (c, p, i) { var t = this; t.b(i = i || ""); t.b("<svg aria-hidden=\"true\" class=\"d2h-icon d2h-deleted\" height=\"16\" title=\"removed\" version=\"1.1\""); t.b("\n" + i); t.b(" viewBox=\"0 0 14 16\" width=\"14\">"); t.b("\n" + i); t.b(" <path d=\"M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM11 9H3V7h8v2z\"></path>"); t.b("\n" + i); t.b("</svg>"); return t.fl(); }, partials: {}, subs: {} });
|
@@ -5258,85 +5362,58 @@ defaultTemplates["tag-file-deleted"] = new hogan.Template({ code: function (c, p
|
|
5258
5362
|
defaultTemplates["tag-file-renamed"] = new hogan.Template({ code: function (c, p, i) { var t = this; t.b(i = i || ""); t.b("<span class=\"d2h-tag d2h-moved d2h-moved-tag\">RENAMED</span>"); return t.fl(); }, partials: {}, subs: {} });
|
5259
5363
|
//# sourceMappingURL=diff2html-templates.js.map
|
5260
5364
|
;// CONCATENATED MODULE: ../../node_modules/diff2html/lib-esm/hoganjs-utils.js
|
5261
|
-
var hoganjs_utils_assign = (undefined && undefined.__assign) || function () {
|
5262
|
-
hoganjs_utils_assign = Object.assign || function(t) {
|
5263
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
5264
|
-
s = arguments[i];
|
5265
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
5266
|
-
t[p] = s[p];
|
5267
|
-
}
|
5268
|
-
return t;
|
5269
|
-
};
|
5270
|
-
return hoganjs_utils_assign.apply(this, arguments);
|
5271
|
-
};
|
5272
5365
|
|
5273
5366
|
|
5274
|
-
|
5275
|
-
|
5276
|
-
|
5277
|
-
|
5278
|
-
|
5279
|
-
var name = _a[0], templateString = _a[1];
|
5280
|
-
var compiledTemplate = hogan.compile(templateString, { asString: false });
|
5281
|
-
return hoganjs_utils_assign(hoganjs_utils_assign({}, previousTemplates), (_b = {}, _b[name] = compiledTemplate, _b));
|
5367
|
+
class HoganJsUtils {
|
5368
|
+
constructor({ compiledTemplates = {}, rawTemplates = {} }) {
|
5369
|
+
const compiledRawTemplates = Object.entries(rawTemplates).reduce((previousTemplates, [name, templateString]) => {
|
5370
|
+
const compiledTemplate = hogan.compile(templateString, { asString: false });
|
5371
|
+
return Object.assign(Object.assign({}, previousTemplates), { [name]: compiledTemplate });
|
5282
5372
|
}, {});
|
5283
|
-
this.preCompiledTemplates =
|
5373
|
+
this.preCompiledTemplates = Object.assign(Object.assign(Object.assign({}, defaultTemplates), compiledTemplates), compiledRawTemplates);
|
5284
5374
|
}
|
5285
|
-
|
5375
|
+
static compile(templateString) {
|
5286
5376
|
return hogan.compile(templateString, { asString: false });
|
5287
|
-
}
|
5288
|
-
|
5289
|
-
|
5377
|
+
}
|
5378
|
+
render(namespace, view, params, partials, indent) {
|
5379
|
+
const templateKey = this.templateKey(namespace, view);
|
5290
5380
|
try {
|
5291
|
-
|
5381
|
+
const template = this.preCompiledTemplates[templateKey];
|
5292
5382
|
return template.render(params, partials, indent);
|
5293
5383
|
}
|
5294
5384
|
catch (e) {
|
5295
|
-
throw new Error(
|
5385
|
+
throw new Error(`Could not find template to render '${templateKey}'`);
|
5296
5386
|
}
|
5297
|
-
}
|
5298
|
-
|
5387
|
+
}
|
5388
|
+
template(namespace, view) {
|
5299
5389
|
return this.preCompiledTemplates[this.templateKey(namespace, view)];
|
5300
|
-
}
|
5301
|
-
|
5302
|
-
return
|
5303
|
-
}
|
5304
|
-
|
5305
|
-
}());
|
5306
|
-
/* harmony default export */ const hoganjs_utils = (HoganJsUtils);
|
5390
|
+
}
|
5391
|
+
templateKey(namespace, view) {
|
5392
|
+
return `${namespace}-${view}`;
|
5393
|
+
}
|
5394
|
+
}
|
5307
5395
|
//# sourceMappingURL=hoganjs-utils.js.map
|
5308
5396
|
;// CONCATENATED MODULE: ../../node_modules/diff2html/lib-esm/diff2html.js
|
5309
|
-
var diff2html_assign = (undefined && undefined.__assign) || function () {
|
5310
|
-
diff2html_assign = Object.assign || function(t) {
|
5311
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
5312
|
-
s = arguments[i];
|
5313
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
5314
|
-
t[p] = s[p];
|
5315
|
-
}
|
5316
|
-
return t;
|
5317
|
-
};
|
5318
|
-
return diff2html_assign.apply(this, arguments);
|
5319
|
-
};
|
5320
5397
|
|
5321
5398
|
|
5322
5399
|
|
5323
5400
|
|
5324
5401
|
|
5325
5402
|
|
5326
|
-
|
5327
|
-
function diff2html_parse(diffInput, configuration) {
|
5328
|
-
|
5329
|
-
return DiffParser.parse(diffInput, diff2html_assign(diff2html_assign({}, defaultDiff2HtmlConfig), configuration));
|
5403
|
+
const defaultDiff2HtmlConfig = Object.assign(Object.assign(Object.assign({}, defaultLineByLineRendererConfig), defaultSideBySideRendererConfig), { outputFormat: OutputFormatType.LINE_BY_LINE, drawFileList: true });
|
5404
|
+
function diff2html_parse(diffInput, configuration = {}) {
|
5405
|
+
return DiffParser.parse(diffInput, Object.assign(Object.assign({}, defaultDiff2HtmlConfig), configuration));
|
5330
5406
|
}
|
5331
|
-
function html(diffInput, configuration) {
|
5332
|
-
|
5333
|
-
|
5334
|
-
|
5335
|
-
|
5336
|
-
|
5337
|
-
|
5338
|
-
|
5339
|
-
|
5407
|
+
function html(diffInput, configuration = {}) {
|
5408
|
+
const config = Object.assign(Object.assign({}, defaultDiff2HtmlConfig), configuration);
|
5409
|
+
const diffJson = typeof diffInput === 'string' ? parse(diffInput, config) : diffInput;
|
5410
|
+
const hoganUtils = new HoganJsUtils(config);
|
5411
|
+
const { colorScheme } = config;
|
5412
|
+
const fileListRendererConfig = { colorScheme };
|
5413
|
+
const fileList = config.drawFileList ? new FileListRenderer(hoganUtils, fileListRendererConfig).render(diffJson) : '';
|
5414
|
+
const diffOutput = config.outputFormat === 'side-by-side'
|
5415
|
+
? new SideBySideRenderer(hoganUtils, config).render(diffJson)
|
5416
|
+
: new LineByLineRenderer(hoganUtils, config).render(diffJson);
|
5340
5417
|
return fileList + diffOutput;
|
5341
5418
|
}
|
5342
5419
|
//# sourceMappingURL=diff2html.js.map
|
@@ -5345,9 +5422,11 @@ var external_vue_types_x = y => { var x = {}; __webpack_require__.d(x, y); retur
|
|
5345
5422
|
var external_vue_types_y = x => () => x
|
5346
5423
|
const external_vue_types_namespaceObject = external_vue_types_x({ ["number"]: () => __WEBPACK_EXTERNAL_MODULE_vue_types_22de060a__.number, ["string"]: () => __WEBPACK_EXTERNAL_MODULE_vue_types_22de060a__.string });
|
5347
5424
|
;// CONCATENATED MODULE: external "../config-provider"
|
5348
|
-
var
|
5349
|
-
var
|
5350
|
-
const
|
5425
|
+
var config_provider_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
5426
|
+
var config_provider_y = x => () => x
|
5427
|
+
const config_provider_namespaceObject = config_provider_x({ ["usePrefix"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__.usePrefix });
|
5428
|
+
// EXTERNAL MODULE: ../../node_modules/diff2html/bundles/css/diff2html.min.css
|
5429
|
+
var diff2html_min = __webpack_require__(9003);
|
5351
5430
|
;// CONCATENATED MODULE: ../../packages/code-diff/src/code-diff.tsx
|
5352
5431
|
|
5353
5432
|
|
@@ -5382,11 +5461,12 @@ const external_config_provider_namespaceObject = external_config_provider_x({ ["
|
|
5382
5461
|
|
5383
5462
|
|
5384
5463
|
|
5464
|
+
|
5385
5465
|
var diffFormats = ['side-by-side', 'line-by-line'];
|
5386
|
-
var CodeDiffFormat = (0,
|
5466
|
+
var CodeDiffFormat = (0,shared_namespaceObject.stringEnum)([].concat(diffFormats));
|
5387
5467
|
var LANGUAGES = (/* unused pure expression or super */ null && (['css', 'java', 'javascript', 'json', 'scss', 'less', 'stylus', 'shell', 'bash', 'cpp', 'go', 'xml', 'python', 'typescript', 'sql', 'ruby', 'vim', 'php', 'perl', 'powershell', 'makefile']));
|
5388
5468
|
var themes = ['dark', 'light'];
|
5389
|
-
var themesEnum = (0,
|
5469
|
+
var themesEnum = (0,shared_namespaceObject.stringEnum)([].concat(themes));
|
5390
5470
|
var codeDiffProps = {
|
5391
5471
|
oldContent: (0,external_vue_types_namespaceObject.string)().def(''),
|
5392
5472
|
newContent: (0,external_vue_types_namespaceObject.string)().def(''),
|
@@ -5395,7 +5475,7 @@ var codeDiffProps = {
|
|
5395
5475
|
// conf: Object as PropType<Diff2Html.Diff2HtmlUIConfig>,
|
5396
5476
|
theme: (0,external_vue_types_namespaceObject.string)().def('light'),
|
5397
5477
|
language: (0,external_vue_types_namespaceObject.string)().def('javascript'),
|
5398
|
-
hljs:
|
5478
|
+
hljs: shared_namespaceObject.PropTypes.any.isRequired
|
5399
5479
|
};
|
5400
5480
|
// TODO: 感觉像是highlight.js的问题, 一些关键字无法显示高亮
|
5401
5481
|
function changeCodeCls(htmlStr, lang) {
|
@@ -5408,12 +5488,12 @@ function changeCodeCls(htmlStr, lang) {
|
|
5408
5488
|
props: codeDiffProps,
|
5409
5489
|
emits: [],
|
5410
5490
|
setup: function setup(props) {
|
5411
|
-
var _usePrefix = (0,
|
5491
|
+
var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
|
5412
5492
|
resolveClassName = _usePrefix.resolveClassName;
|
5413
5493
|
var diffBox = (0,external_vue_namespaceObject.ref)(null);
|
5414
5494
|
var diffHtml = (0,external_vue_namespaceObject.ref)('');
|
5415
5495
|
var diffBoxCls = (0,external_vue_namespaceObject.computed)(function () {
|
5416
|
-
return (0,
|
5496
|
+
return (0,shared_namespaceObject.classes)({
|
5417
5497
|
dark: props.theme === themesEnum.dark
|
5418
5498
|
}, "hljs ".concat(resolveClassName('code-diff')));
|
5419
5499
|
});
|
@@ -5493,9 +5573,9 @@ function changeCodeCls(htmlStr, lang) {
|
|
5493
5573
|
*/
|
5494
5574
|
|
5495
5575
|
|
5496
|
-
var BkCodeDiff = (0,
|
5576
|
+
var BkCodeDiff = (0,shared_namespaceObject.withInstall)(code_diff);
|
5497
5577
|
/* harmony default export */ const src = (BkCodeDiff);
|
5498
5578
|
})();
|
5499
5579
|
|
5500
|
-
var __webpack_exports__default = __webpack_exports__
|
5580
|
+
var __webpack_exports__default = __webpack_exports__["default"];
|
5501
5581
|
export { __webpack_exports__default as default };
|