Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.

Commit aba547d

Browse files
chore(release): 1.0.0 [skip ci]
## 1.0.0 (2021-01-15) ### Features * Release ([70680d0](70680d0))
1 parent b9f57c5 commit aba547d

16 files changed

+20265
-2
lines changed

demo/index.98e55e99.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/index.c00cf4ae.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/index.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Vue Diff</title>
7+
<link href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css" rel="stylesheet">
8+
<script type="module" crossorigin src="/vue-diff/demo/index.98e55e99.js"></script>
9+
<link rel="stylesheet" href="/vue-diff/demo/index.c00cf4ae.css">
10+
</head>
11+
<body class="bg-gray-900">
12+
<div class="p-12">
13+
<h1 class="text-3xl font-extrabold text-gray-100">
14+
Vue Diff
15+
<!-- Place this tag where you want the button to render. -->
16+
<span style="display: inline-block; line-height: 0; margin: -4px 0 0 10px; vertical-align: middle; font-size: 0;">
17+
<a class="github-button" href="https://github.com/hoiheart/vue-diff" data-color-scheme="no-preference: dark; light: dark; dark: dark;" data-size="large" data-show-count="true" aria-label="Star hoiheart/vue-diff on GitHub">Star</a>
18+
</span>
19+
</h1>
20+
<div id="app"></div>
21+
</div>
22+
23+
<script async defer src="https://buttons.github.io/buttons.js"></script>
24+
</body>
25+
</html>

dist/Code.vue.d.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
declare const _default: import("vue").DefineComponent<{
2+
language: {
3+
type: StringConstructor;
4+
required: true;
5+
};
6+
code: {
7+
type: StringConstructor;
8+
required: true;
9+
};
10+
}, {
11+
highlightCode: import("vue").Ref<string>;
12+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
13+
language: string;
14+
code: string;
15+
} & {}>, {}>;
16+
export default _default;

dist/Diff.vue.d.ts

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import { PropType } from 'vue';
2+
import type { Mode, Theme } from './utils';
3+
declare const _default: import("vue").DefineComponent<{
4+
mode: {
5+
type: PropType<Mode>;
6+
default: string;
7+
};
8+
theme: {
9+
type: PropType<Theme>;
10+
default: string;
11+
};
12+
language: {
13+
type: StringConstructor;
14+
default: string;
15+
};
16+
prev: {
17+
type: StringConstructor;
18+
default: string;
19+
};
20+
current: {
21+
type: StringConstructor;
22+
default: string;
23+
};
24+
}, {
25+
lines: import("vue").Ref<{
26+
type: "added" | "removed" | "equal" | "disabled";
27+
lineNum?: number | undefined;
28+
value?: string | undefined;
29+
chkWords?: boolean | undefined;
30+
}[][]>;
31+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
32+
mode: Mode;
33+
theme: Theme;
34+
language: string;
35+
prev: string;
36+
current: string;
37+
} & {}>, {
38+
mode: Mode;
39+
theme: Theme;
40+
language: string;
41+
prev: string;
42+
current: string;
43+
}>;
44+
export default _default;

dist/Line.vue.d.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { PropType } from 'vue';
2+
import type { Mode, Lines, Line } from './utils';
3+
declare const _default: import("vue").DefineComponent<{
4+
mode: {
5+
type: PropType<Mode>;
6+
required: true;
7+
};
8+
language: {
9+
type: StringConstructor;
10+
required: true;
11+
};
12+
data: {
13+
type: PropType<Lines>;
14+
required: true;
15+
};
16+
}, {
17+
setCode: (line: Line, data?: Lines | undefined, index?: number | undefined) => string;
18+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
19+
mode: Mode;
20+
language: string;
21+
data: Lines;
22+
} & {}>, {}>;
23+
export default _default;

dist/highlight.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import hljs from 'highlight.js/lib/core';
2+
export default hljs;

dist/index.css

Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
.vue-diff-wrapper {
2+
overflow: hidden;
3+
width: 100%;
4+
border-radius: 0.3em; }
5+
6+
.vue-diff-theme-dark {
7+
/*
8+
Monokai style - ported by Luigi Maselli - http://grigio.org
9+
*/
10+
background-color: #272822; }
11+
.vue-diff-theme-dark .hljs {
12+
display: block;
13+
overflow-x: auto;
14+
padding: 0.5em;
15+
background: #272822;
16+
color: #ddd; }
17+
.vue-diff-theme-dark .hljs-tag,
18+
.vue-diff-theme-dark .hljs-keyword,
19+
.vue-diff-theme-dark .hljs-selector-tag,
20+
.vue-diff-theme-dark .hljs-literal,
21+
.vue-diff-theme-dark .hljs-strong,
22+
.vue-diff-theme-dark .hljs-name {
23+
color: #f92672; }
24+
.vue-diff-theme-dark .hljs-code {
25+
color: #66d9ef; }
26+
.vue-diff-theme-dark .hljs-class .hljs-title {
27+
color: white; }
28+
.vue-diff-theme-dark .hljs-attribute,
29+
.vue-diff-theme-dark .hljs-symbol,
30+
.vue-diff-theme-dark .hljs-regexp,
31+
.vue-diff-theme-dark .hljs-link {
32+
color: #bf79db; }
33+
.vue-diff-theme-dark .hljs-string,
34+
.vue-diff-theme-dark .hljs-bullet,
35+
.vue-diff-theme-dark .hljs-subst,
36+
.vue-diff-theme-dark .hljs-title,
37+
.vue-diff-theme-dark .hljs-section,
38+
.vue-diff-theme-dark .hljs-emphasis,
39+
.vue-diff-theme-dark .hljs-type,
40+
.vue-diff-theme-dark .hljs-built_in,
41+
.vue-diff-theme-dark .hljs-builtin-name,
42+
.vue-diff-theme-dark .hljs-selector-attr,
43+
.vue-diff-theme-dark .hljs-selector-pseudo,
44+
.vue-diff-theme-dark .hljs-addition,
45+
.vue-diff-theme-dark .hljs-variable,
46+
.vue-diff-theme-dark .hljs-template-tag,
47+
.vue-diff-theme-dark .hljs-template-variable {
48+
color: #a6e22e; }
49+
.vue-diff-theme-dark .hljs-comment,
50+
.vue-diff-theme-dark .hljs-quote,
51+
.vue-diff-theme-dark .hljs-deletion,
52+
.vue-diff-theme-dark .hljs-meta {
53+
color: #75715e; }
54+
.vue-diff-theme-dark .hljs-keyword,
55+
.vue-diff-theme-dark .hljs-selector-tag,
56+
.vue-diff-theme-dark .hljs-literal,
57+
.vue-diff-theme-dark .hljs-doctag,
58+
.vue-diff-theme-dark .hljs-title,
59+
.vue-diff-theme-dark .hljs-section,
60+
.vue-diff-theme-dark .hljs-type,
61+
.vue-diff-theme-dark .hljs-selector-id {
62+
font-weight: bold; }
63+
64+
.vue-diff-theme-light {
65+
/*
66+
67+
Visual Studio-like style based on original C# coloring by Jason Diamond <jason@diamond.name>
68+
69+
*/
70+
background-color: #fff; }
71+
.vue-diff-theme-light .hljs {
72+
display: block;
73+
overflow-x: auto;
74+
padding: 0.5em;
75+
background: white;
76+
color: black; }
77+
.vue-diff-theme-light .hljs-comment,
78+
.vue-diff-theme-light .hljs-quote,
79+
.vue-diff-theme-light .hljs-variable {
80+
color: #008000; }
81+
.vue-diff-theme-light .hljs-keyword,
82+
.vue-diff-theme-light .hljs-selector-tag,
83+
.vue-diff-theme-light .hljs-built_in,
84+
.vue-diff-theme-light .hljs-name,
85+
.vue-diff-theme-light .hljs-tag {
86+
color: #00f; }
87+
.vue-diff-theme-light .hljs-string,
88+
.vue-diff-theme-light .hljs-title,
89+
.vue-diff-theme-light .hljs-section,
90+
.vue-diff-theme-light .hljs-attribute,
91+
.vue-diff-theme-light .hljs-literal,
92+
.vue-diff-theme-light .hljs-template-tag,
93+
.vue-diff-theme-light .hljs-template-variable,
94+
.vue-diff-theme-light .hljs-type,
95+
.vue-diff-theme-light .hljs-addition {
96+
color: #a31515; }
97+
.vue-diff-theme-light .hljs-deletion,
98+
.vue-diff-theme-light .hljs-selector-attr,
99+
.vue-diff-theme-light .hljs-selector-pseudo,
100+
.vue-diff-theme-light .hljs-meta {
101+
color: #2b91af; }
102+
.vue-diff-theme-light .hljs-doctag {
103+
color: #808080; }
104+
.vue-diff-theme-light .hljs-attr {
105+
color: #f00; }
106+
.vue-diff-theme-light .hljs-symbol,
107+
.vue-diff-theme-light .hljs-bullet,
108+
.vue-diff-theme-light .hljs-link {
109+
color: #00b0e8; }
110+
.vue-diff-theme-light .hljs-emphasis {
111+
font-style: italic; }
112+
.vue-diff-theme-light .hljs-strong {
113+
font-weight: bold; }
114+
115+
.vue-diff-viewer {
116+
overflow: hidden;
117+
width: 100%;
118+
padding: 1em 0; }
119+
.vue-diff-viewer > table {
120+
width: 100%;
121+
table-layout: fixed;
122+
border-collapse: collapse; }
123+
.vue-diff-viewer > table td {
124+
padding: 0 0.5em;
125+
vertical-align: top; }
126+
.vue-diff-viewer > table td.lineNum {
127+
width: 3.5em;
128+
padding-top: .05em;
129+
text-align: right;
130+
color: #999;
131+
font-size: 0.9em; }
132+
.vue-diff-viewer > table td pre {
133+
display: block;
134+
position: relative;
135+
max-width: 100%;
136+
margin: 0;
137+
padding: 0;
138+
padding-left: 1.5em;
139+
overflow: visible;
140+
background: none;
141+
border-radius: 0; }
142+
.vue-diff-viewer > table td .hljs {
143+
overflow: visible;
144+
padding: 0;
145+
background: transparent;
146+
word-wrap: break-all;
147+
word-break: break-all;
148+
white-space: pre-wrap; }
149+
.vue-diff-viewer > table td code::before {
150+
display: inline-block;
151+
position: absolute;
152+
left: 0;
153+
top: 0;
154+
opacity: 0.8; }
155+
.vue-diff-viewer > table td.vue-diff-cell-removed {
156+
background-color: rgba(255, 0, 0, 0.1); }
157+
.vue-diff-viewer > table td.vue-diff-cell-removed span.modified {
158+
background-color: rgba(255, 0, 0, 0.2); }
159+
.vue-diff-viewer > table td.vue-diff-cell-removed code::before {
160+
content: "-"; }
161+
.vue-diff-viewer > table td.vue-diff-cell-added {
162+
background-color: rgba(0, 255, 128, 0.1); }
163+
.vue-diff-viewer > table td.vue-diff-cell-added span.modified {
164+
background-color: rgba(0, 255, 128, 0.2); }
165+
.vue-diff-viewer > table td.vue-diff-cell-added code:before {
166+
content: "+"; }
167+
.vue-diff-viewer > table td.vue-diff-cell-disabled {
168+
background-color: rgba(128, 128, 128, 0.1); }

dist/index.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import './style.scss';
2+
import type { App } from 'vue';
3+
declare const _default: {
4+
install: (app: App, options?: {}) => void;
5+
hljs: any;
6+
};
7+
export default _default;

0 commit comments

Comments
 (0)