keyframekit 1.0.9 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +129 -129
- package/dist/KeyframeKit.d.ts +138 -138
- package/dist/KeyframeKit.js +293 -293
- package/dist/KeyframeKit.js.map +1 -1
- package/docs/.vitepress/components/Playground/Playground.js +242 -242
- package/docs/.vitepress/components/Playground/Playground.vue +206 -206
- package/docs/.vitepress/components/Playground/defaultExample.js +175 -175
- package/docs/.vitepress/components/Playground/interFont.js +14 -14
- package/docs/.vitepress/components/Playground/themes/githubDark.js +401 -401
- package/docs/.vitepress/components/Playground/themes/githubLight.js +398 -398
- package/docs/.vitepress/components/Playground/themes.js +24 -24
- package/docs/.vitepress/config.ts +84 -84
- package/docs/.vitepress/referenceNavigation.ts +37 -37
- package/docs/.vitepress/theme/base-styles.css +100 -100
- package/docs/.vitepress/theme/env.d.ts +5 -5
- package/docs/.vitepress/theme/index.ts +39 -39
- package/docs/docs/index.md +142 -142
- package/docs/docs/public/playground/KeyframeKit/dist/KeyframeKit.d.ts +138 -138
- package/docs/docs/public/playground/KeyframeKit/dist/KeyframeKit.js +293 -293
- package/docs/docs/public/playground/KeyframeKit/dist/KeyframeKit.js.map +1 -1
- package/docs/docs/reference/_media/LICENSE +21 -21
- package/docs/docs/reference/classes/KeyframeEffectParameters.md +95 -95
- package/docs/docs/reference/classes/ParsedKeyframes.md +49 -49
- package/docs/docs/reference/index.md +20 -20
- package/docs/docs/reference/interfaces/KeyframesFactory.md +151 -151
- package/docs/docs/reference/navigation.json +63 -63
- package/docs/docs/reference/type-aliases/KeyframeArgument.md +9 -9
- package/docs/docs/reference/type-aliases/KeyframesFactorySource.md +9 -9
- package/docs/docs/reference/type-aliases/ParsedKeyframesRules.md +15 -15
- package/docs/docs/reference/variables/default.md +7 -7
- package/docs/package.json +25 -25
- package/docs/typedoc/plugin-param-names.js +51 -51
- package/docs/typedoc.json +62 -62
- package/package.json +37 -37
- package/src/KeyframeKit.ts +508 -508
- package/tsconfig.json +47 -47
- package/vercel.json +12 -12
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
import githubDark from './themes/githubDark.js';
|
|
3
|
-
import githubLight from './themes/githubLight.js';
|
|
4
|
-
|
|
5
|
-
export const themes = {
|
|
6
|
-
dark: {
|
|
7
|
-
...githubDark,
|
|
8
|
-
colors: {
|
|
9
|
-
...githubDark.colors,
|
|
10
|
-
'editor.background': '#161618', //'#24292e',
|
|
11
|
-
'editor.lineHighlightBackground': '#202022', //'#2b3036',
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
|
|
15
|
-
light: {
|
|
16
|
-
...githubLight,
|
|
17
|
-
colors: {
|
|
18
|
-
...githubLight.colors,
|
|
19
|
-
'editor.background': '#f6f6f7', //'#ffffff',
|
|
20
|
-
'editor.lineHighlightBackground': '#efeff1', //'#f6f8fa',
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
}
|
|
1
|
+
|
|
2
|
+
import githubDark from './themes/githubDark.js';
|
|
3
|
+
import githubLight from './themes/githubLight.js';
|
|
4
|
+
|
|
5
|
+
export const themes = {
|
|
6
|
+
dark: {
|
|
7
|
+
...githubDark,
|
|
8
|
+
colors: {
|
|
9
|
+
...githubDark.colors,
|
|
10
|
+
'editor.background': '#161618', //'#24292e',
|
|
11
|
+
'editor.lineHighlightBackground': '#202022', //'#2b3036',
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
light: {
|
|
16
|
+
...githubLight,
|
|
17
|
+
colors: {
|
|
18
|
+
...githubLight.colors,
|
|
19
|
+
'editor.background': '#f6f6f7', //'#ffffff',
|
|
20
|
+
'editor.lineHighlightBackground': '#efeff1', //'#f6f8fa',
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
}
|
|
@@ -1,84 +1,84 @@
|
|
|
1
|
-
import { defineConfig } from 'vitepress'
|
|
2
|
-
//import monacoEditorPlugin from 'vite-plugin-monaco-editor'
|
|
3
|
-
|
|
4
|
-
import referenceNavigationItems from './referenceNavigation.ts';
|
|
5
|
-
|
|
6
|
-
// https://vitepress.dev/reference/site-config
|
|
7
|
-
export default defineConfig({
|
|
8
|
-
srcDir: "docs",
|
|
9
|
-
|
|
10
|
-
rewrites: {
|
|
11
|
-
//'reference/:slug*': ':slug*'
|
|
12
|
-
},
|
|
13
|
-
|
|
14
|
-
head: [
|
|
15
|
-
['link', { rel: 'icon', href: '/icon.png' }],
|
|
16
|
-
['meta', { property: 'og:image', content: '/og-image.png' }],
|
|
17
|
-
['meta', { name: 'keywords', content: 'css,js,javascript,animation,keyframe,stylesheet,framework,tools,performance,typescript' }],
|
|
18
|
-
|
|
19
|
-
[
|
|
20
|
-
'script',
|
|
21
|
-
{ async: '', src: 'https://www.googletagmanager.com/gtag/js?id=G-NY6W3XTT8W' }
|
|
22
|
-
],
|
|
23
|
-
[
|
|
24
|
-
'script',
|
|
25
|
-
{},
|
|
26
|
-
`window.dataLayer = window.dataLayer || [];
|
|
27
|
-
function gtag(){dataLayer.push(arguments);}
|
|
28
|
-
gtag('js', new Date());
|
|
29
|
-
|
|
30
|
-
gtag('config', 'G-NY6W3XTT8W');`
|
|
31
|
-
]
|
|
32
|
-
|
|
33
|
-
],
|
|
34
|
-
|
|
35
|
-
title: "KeyframeKit",
|
|
36
|
-
description: "Intuitive, powerful and lightweight tools for working with CSS animations in JavaScript.",
|
|
37
|
-
|
|
38
|
-
themeConfig: {
|
|
39
|
-
outline: [2, 3],
|
|
40
|
-
|
|
41
|
-
// https://vitepress.dev/reference/default-theme-config
|
|
42
|
-
nav: [
|
|
43
|
-
{ text: 'Home', link: '/' },
|
|
44
|
-
{ text: 'Reference', link: '/reference' }
|
|
45
|
-
],
|
|
46
|
-
|
|
47
|
-
sidebar: {
|
|
48
|
-
'/reference/': [
|
|
49
|
-
{
|
|
50
|
-
text: 'Reference',
|
|
51
|
-
link: '/reference',
|
|
52
|
-
items: referenceNavigationItems
|
|
53
|
-
}
|
|
54
|
-
]
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
search: {
|
|
58
|
-
provider: 'local'
|
|
59
|
-
},
|
|
60
|
-
|
|
61
|
-
socialLinks: [
|
|
62
|
-
{ icon: 'github', link: 'https://github.com/benhatsor/KeyframeKit' }
|
|
63
|
-
],
|
|
64
|
-
|
|
65
|
-
footer: {
|
|
66
|
-
message: 'Created by <a href="https://berryscript.com" target="_blank">Ben Hatsor</a>. MIT License.'
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
|
|
70
|
-
vite: {
|
|
71
|
-
plugins: [
|
|
72
|
-
/*monacoEditorPlugin({
|
|
73
|
-
//publicPath: '/'
|
|
74
|
-
customDistPath: (root, buildOutDir) => `${buildOutDir}/monacoeditorwork`
|
|
75
|
-
})*/
|
|
76
|
-
],
|
|
77
|
-
ssr: {
|
|
78
|
-
//noExternal: ['monaco-editor']
|
|
79
|
-
},
|
|
80
|
-
optimizeDeps: {
|
|
81
|
-
//exclude: ['monaco-editor']
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
})
|
|
1
|
+
import { defineConfig } from 'vitepress'
|
|
2
|
+
//import monacoEditorPlugin from 'vite-plugin-monaco-editor'
|
|
3
|
+
|
|
4
|
+
import referenceNavigationItems from './referenceNavigation.ts';
|
|
5
|
+
|
|
6
|
+
// https://vitepress.dev/reference/site-config
|
|
7
|
+
export default defineConfig({
|
|
8
|
+
srcDir: "docs",
|
|
9
|
+
|
|
10
|
+
rewrites: {
|
|
11
|
+
//'reference/:slug*': ':slug*'
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
head: [
|
|
15
|
+
['link', { rel: 'icon', href: '/icon.png' }],
|
|
16
|
+
['meta', { property: 'og:image', content: '/og-image.png' }],
|
|
17
|
+
['meta', { name: 'keywords', content: 'css,js,javascript,animation,keyframe,stylesheet,framework,tools,performance,typescript' }],
|
|
18
|
+
|
|
19
|
+
[
|
|
20
|
+
'script',
|
|
21
|
+
{ async: '', src: 'https://www.googletagmanager.com/gtag/js?id=G-NY6W3XTT8W' }
|
|
22
|
+
],
|
|
23
|
+
[
|
|
24
|
+
'script',
|
|
25
|
+
{},
|
|
26
|
+
`window.dataLayer = window.dataLayer || [];
|
|
27
|
+
function gtag(){dataLayer.push(arguments);}
|
|
28
|
+
gtag('js', new Date());
|
|
29
|
+
|
|
30
|
+
gtag('config', 'G-NY6W3XTT8W');`
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
],
|
|
34
|
+
|
|
35
|
+
title: "KeyframeKit",
|
|
36
|
+
description: "Intuitive, powerful and lightweight tools for working with CSS animations in JavaScript.",
|
|
37
|
+
|
|
38
|
+
themeConfig: {
|
|
39
|
+
outline: [2, 3],
|
|
40
|
+
|
|
41
|
+
// https://vitepress.dev/reference/default-theme-config
|
|
42
|
+
nav: [
|
|
43
|
+
{ text: 'Home', link: '/' },
|
|
44
|
+
{ text: 'Reference', link: '/reference' }
|
|
45
|
+
],
|
|
46
|
+
|
|
47
|
+
sidebar: {
|
|
48
|
+
'/reference/': [
|
|
49
|
+
{
|
|
50
|
+
text: 'Reference',
|
|
51
|
+
link: '/reference',
|
|
52
|
+
items: referenceNavigationItems
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
search: {
|
|
58
|
+
provider: 'local'
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
socialLinks: [
|
|
62
|
+
{ icon: 'github', link: 'https://github.com/benhatsor/KeyframeKit' }
|
|
63
|
+
],
|
|
64
|
+
|
|
65
|
+
footer: {
|
|
66
|
+
message: 'Created by <a href="https://berryscript.com" target="_blank">Ben Hatsor</a>. MIT License.'
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
vite: {
|
|
71
|
+
plugins: [
|
|
72
|
+
/*monacoEditorPlugin({
|
|
73
|
+
//publicPath: '/'
|
|
74
|
+
customDistPath: (root, buildOutDir) => `${buildOutDir}/monacoeditorwork`
|
|
75
|
+
})*/
|
|
76
|
+
],
|
|
77
|
+
ssr: {
|
|
78
|
+
//noExternal: ['monaco-editor']
|
|
79
|
+
},
|
|
80
|
+
optimizeDeps: {
|
|
81
|
+
//exclude: ['monaco-editor']
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
})
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
import type { DefaultTheme } from 'vitepress';
|
|
3
|
-
|
|
4
|
-
import type {
|
|
5
|
-
NavigationJSON,
|
|
6
|
-
NavigationItem as NavigationJSONItem
|
|
7
|
-
} from 'typedoc-plugin-markdown';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import navigationJSON from '../docs/reference/navigation.json' with { type: 'json' };
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const navigationJSONItems: NavigationJSON = navigationJSON;
|
|
14
|
-
|
|
15
|
-
const sidebarItems = navigationJSONItems.map(convertItem);
|
|
16
|
-
|
|
17
|
-
export default sidebarItems;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
function convertItem(
|
|
21
|
-
inputItem: NavigationJSONItem
|
|
22
|
-
): DefaultTheme.SidebarItem {
|
|
23
|
-
|
|
24
|
-
const link = inputItem.path ?? undefined;
|
|
25
|
-
|
|
26
|
-
const items = inputItem.children?.map(convertItem);
|
|
27
|
-
|
|
28
|
-
let outputItem: DefaultTheme.SidebarItem = {
|
|
29
|
-
text: inputItem.title,
|
|
30
|
-
link: link,
|
|
31
|
-
items: items,
|
|
32
|
-
base: '/reference/'
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
return outputItem;
|
|
36
|
-
|
|
37
|
-
}
|
|
1
|
+
|
|
2
|
+
import type { DefaultTheme } from 'vitepress';
|
|
3
|
+
|
|
4
|
+
import type {
|
|
5
|
+
NavigationJSON,
|
|
6
|
+
NavigationItem as NavigationJSONItem
|
|
7
|
+
} from 'typedoc-plugin-markdown';
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
import navigationJSON from '../docs/reference/navigation.json' with { type: 'json' };
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
const navigationJSONItems: NavigationJSON = navigationJSON;
|
|
14
|
+
|
|
15
|
+
const sidebarItems = navigationJSONItems.map(convertItem);
|
|
16
|
+
|
|
17
|
+
export default sidebarItems;
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
function convertItem(
|
|
21
|
+
inputItem: NavigationJSONItem
|
|
22
|
+
): DefaultTheme.SidebarItem {
|
|
23
|
+
|
|
24
|
+
const link = inputItem.path ?? undefined;
|
|
25
|
+
|
|
26
|
+
const items = inputItem.children?.map(convertItem);
|
|
27
|
+
|
|
28
|
+
let outputItem: DefaultTheme.SidebarItem = {
|
|
29
|
+
text: inputItem.title,
|
|
30
|
+
link: link,
|
|
31
|
+
items: items,
|
|
32
|
+
base: '/reference/'
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
return outputItem;
|
|
36
|
+
|
|
37
|
+
}
|
|
@@ -1,100 +1,100 @@
|
|
|
1
|
-
|
|
2
|
-
.monaco-editor .iPadShowKeyboard {
|
|
3
|
-
display: none;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
/* override vitepress theme style for '.vp-doc a' in monaco editor
|
|
8
|
-
(it messes up the autocomplete styles) */
|
|
9
|
-
.vp-doc .monaco-editor a {
|
|
10
|
-
transition: unset;
|
|
11
|
-
text-decoration: unset;
|
|
12
|
-
text-underline-offset: unset;
|
|
13
|
-
font-weight: unset;
|
|
14
|
-
color: inherit;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.vp-doc .monaco-editor a:hover {
|
|
18
|
-
color: inherit;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.vp-doc .monaco-editor :not(pre, h1, h2, h3, h4, h5, h6) > code {
|
|
22
|
-
font-size: unset;
|
|
23
|
-
color: inherit;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.vp-doc .monaco-editor li+li {
|
|
27
|
-
margin-top: 0;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
.vp-doc h5, .vp-doc h6 {
|
|
32
|
-
margin: 16px 0;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
.VPLocalSearchBox {
|
|
37
|
-
|
|
38
|
-
--vp-local-search-result-selected-border: var(--vp-c-brand-2);
|
|
39
|
-
|
|
40
|
-
.search-bar {
|
|
41
|
-
background: var(--vp-c-divider);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.search-bar:focus-within {
|
|
45
|
-
border-color: var(--vp-c-brand-2) !important;
|
|
46
|
-
box-shadow: 0 0 0 1px var(--vp-c-brand-2);
|
|
47
|
-
/* background: transparent; */
|
|
48
|
-
background: var(--vp-c-bg-alt);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.search-bar .search-input {
|
|
52
|
-
font-family: inherit;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.search-bar .search-actions .clear-button {
|
|
56
|
-
/* order: -1; */
|
|
57
|
-
|
|
58
|
-
&:disabled {
|
|
59
|
-
display: none;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.search-bar:has(+ .results:empty) .search-actions .toggle-layout-button,
|
|
64
|
-
.search-bar .search-actions:has(.clear-button:disabled) .toggle-layout-button {
|
|
65
|
-
display: none;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.results:empty,
|
|
69
|
-
&:has(.search-bar .search-actions .clear-button:disabled) .results {
|
|
70
|
-
display: none;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.search-keyboard-shortcuts {
|
|
74
|
-
display: none !important;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
@media (min-width: 768px) {
|
|
81
|
-
|
|
82
|
-
.VPNavBarSearchButton {
|
|
83
|
-
|
|
84
|
-
height: 38px !important;
|
|
85
|
-
/* width: 127px; */
|
|
86
|
-
width: 140px;
|
|
87
|
-
/* justify-content: center; */
|
|
88
|
-
|
|
89
|
-
.keys {
|
|
90
|
-
display: none;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
:root {
|
|
99
|
-
-webkit-tap-highlight-color: transparent;
|
|
100
|
-
}
|
|
1
|
+
|
|
2
|
+
.monaco-editor .iPadShowKeyboard {
|
|
3
|
+
display: none;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
/* override vitepress theme style for '.vp-doc a' in monaco editor
|
|
8
|
+
(it messes up the autocomplete styles) */
|
|
9
|
+
.vp-doc .monaco-editor a {
|
|
10
|
+
transition: unset;
|
|
11
|
+
text-decoration: unset;
|
|
12
|
+
text-underline-offset: unset;
|
|
13
|
+
font-weight: unset;
|
|
14
|
+
color: inherit;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.vp-doc .monaco-editor a:hover {
|
|
18
|
+
color: inherit;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.vp-doc .monaco-editor :not(pre, h1, h2, h3, h4, h5, h6) > code {
|
|
22
|
+
font-size: unset;
|
|
23
|
+
color: inherit;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.vp-doc .monaco-editor li+li {
|
|
27
|
+
margin-top: 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
.vp-doc h5, .vp-doc h6 {
|
|
32
|
+
margin: 16px 0;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
.VPLocalSearchBox {
|
|
37
|
+
|
|
38
|
+
--vp-local-search-result-selected-border: var(--vp-c-brand-2);
|
|
39
|
+
|
|
40
|
+
.search-bar {
|
|
41
|
+
background: var(--vp-c-divider);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.search-bar:focus-within {
|
|
45
|
+
border-color: var(--vp-c-brand-2) !important;
|
|
46
|
+
box-shadow: 0 0 0 1px var(--vp-c-brand-2);
|
|
47
|
+
/* background: transparent; */
|
|
48
|
+
background: var(--vp-c-bg-alt);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.search-bar .search-input {
|
|
52
|
+
font-family: inherit;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.search-bar .search-actions .clear-button {
|
|
56
|
+
/* order: -1; */
|
|
57
|
+
|
|
58
|
+
&:disabled {
|
|
59
|
+
display: none;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.search-bar:has(+ .results:empty) .search-actions .toggle-layout-button,
|
|
64
|
+
.search-bar .search-actions:has(.clear-button:disabled) .toggle-layout-button {
|
|
65
|
+
display: none;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.results:empty,
|
|
69
|
+
&:has(.search-bar .search-actions .clear-button:disabled) .results {
|
|
70
|
+
display: none;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.search-keyboard-shortcuts {
|
|
74
|
+
display: none !important;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
@media (min-width: 768px) {
|
|
81
|
+
|
|
82
|
+
.VPNavBarSearchButton {
|
|
83
|
+
|
|
84
|
+
height: 38px !important;
|
|
85
|
+
/* width: 127px; */
|
|
86
|
+
width: 140px;
|
|
87
|
+
/* justify-content: center; */
|
|
88
|
+
|
|
89
|
+
.keys {
|
|
90
|
+
display: none;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
:root {
|
|
99
|
+
-webkit-tap-highlight-color: transparent;
|
|
100
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
declare module '*.vue' {
|
|
2
|
-
import type { DefineComponent } from 'vue'
|
|
3
|
-
const component: DefineComponent<{}, {}, any>
|
|
4
|
-
export default component
|
|
5
|
-
}
|
|
1
|
+
declare module '*.vue' {
|
|
2
|
+
import type { DefineComponent } from 'vue'
|
|
3
|
+
const component: DefineComponent<{}, {}, any>
|
|
4
|
+
export default component
|
|
5
|
+
}
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import type { EnhanceAppContext } from 'vitepress'
|
|
2
|
-
|
|
3
|
-
import DefaultTheme from 'vitepress/theme'
|
|
4
|
-
|
|
5
|
-
import Playground from '../components/Playground/Playground.vue'
|
|
6
|
-
|
|
7
|
-
import './base-styles.css'
|
|
8
|
-
|
|
9
|
-
export default {
|
|
10
|
-
extends: DefaultTheme,
|
|
11
|
-
enhanceApp({ app }: EnhanceAppContext) {
|
|
12
|
-
|
|
13
|
-
/* if (typeof window !== 'undefined') {
|
|
14
|
-
window.MonacoEnvironment = {
|
|
15
|
-
getWorkerUrl(_moduleId: string, label: string): string {
|
|
16
|
-
const base = '/monacoeditorwork/'
|
|
17
|
-
|
|
18
|
-
if (label === 'typescript' || label === 'javascript') {
|
|
19
|
-
return `${base}ts.worker.bundle.js`
|
|
20
|
-
}
|
|
21
|
-
if (label === 'json') {
|
|
22
|
-
return `${base}json.worker.bundle.js`
|
|
23
|
-
}
|
|
24
|
-
if (label === 'css' || label === 'scss' || label === 'less') {
|
|
25
|
-
return `${base}css.worker.bundle.js`
|
|
26
|
-
}
|
|
27
|
-
if (label === 'html' || label === 'handlebars' || label === 'razor') {
|
|
28
|
-
return `${base}html.worker.bundle.js`
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
return `${base}editor.worker.bundle.js`
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
} */
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
app.component('Playground', Playground)
|
|
38
|
-
|
|
39
|
-
}
|
|
1
|
+
import type { EnhanceAppContext } from 'vitepress'
|
|
2
|
+
|
|
3
|
+
import DefaultTheme from 'vitepress/theme'
|
|
4
|
+
|
|
5
|
+
import Playground from '../components/Playground/Playground.vue'
|
|
6
|
+
|
|
7
|
+
import './base-styles.css'
|
|
8
|
+
|
|
9
|
+
export default {
|
|
10
|
+
extends: DefaultTheme,
|
|
11
|
+
enhanceApp({ app }: EnhanceAppContext) {
|
|
12
|
+
|
|
13
|
+
/* if (typeof window !== 'undefined') {
|
|
14
|
+
window.MonacoEnvironment = {
|
|
15
|
+
getWorkerUrl(_moduleId: string, label: string): string {
|
|
16
|
+
const base = '/monacoeditorwork/'
|
|
17
|
+
|
|
18
|
+
if (label === 'typescript' || label === 'javascript') {
|
|
19
|
+
return `${base}ts.worker.bundle.js`
|
|
20
|
+
}
|
|
21
|
+
if (label === 'json') {
|
|
22
|
+
return `${base}json.worker.bundle.js`
|
|
23
|
+
}
|
|
24
|
+
if (label === 'css' || label === 'scss' || label === 'less') {
|
|
25
|
+
return `${base}css.worker.bundle.js`
|
|
26
|
+
}
|
|
27
|
+
if (label === 'html' || label === 'handlebars' || label === 'razor') {
|
|
28
|
+
return `${base}html.worker.bundle.js`
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return `${base}editor.worker.bundle.js`
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
} */
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
app.component('Playground', Playground)
|
|
38
|
+
|
|
39
|
+
}
|
|
40
40
|
}
|