keyframekit 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +122 -0
  3. package/dist/KeyframeKit.d.ts +139 -0
  4. package/dist/KeyframeKit.d.ts.map +1 -0
  5. package/dist/KeyframeKit.js +294 -0
  6. package/dist/KeyframeKit.js.map +1 -0
  7. package/docs/.vitepress/components/Playground/Playground.js +243 -0
  8. package/docs/.vitepress/components/Playground/Playground.vue +206 -0
  9. package/docs/.vitepress/components/Playground/defaultExample.js +175 -0
  10. package/docs/.vitepress/components/Playground/interFont.js +14 -0
  11. package/docs/.vitepress/components/Playground/themes/githubDark.js +402 -0
  12. package/docs/.vitepress/components/Playground/themes/githubLight.js +399 -0
  13. package/docs/.vitepress/components/Playground/themes.js +24 -0
  14. package/docs/.vitepress/config.ts +64 -0
  15. package/docs/.vitepress/referenceNavigation.ts +37 -0
  16. package/docs/.vitepress/theme/base-styles.css +91 -0
  17. package/docs/.vitepress/theme/env.d.ts +5 -0
  18. package/docs/.vitepress/theme/index.ts +40 -0
  19. package/docs/docs/index.md +136 -0
  20. package/docs/docs/public/icon.png +0 -0
  21. package/docs/docs/public/playground/KeyframeKit/dist/KeyframeKit.d.ts +139 -0
  22. package/docs/docs/public/playground/KeyframeKit/dist/KeyframeKit.d.ts.map +1 -0
  23. package/docs/docs/public/playground/KeyframeKit/dist/KeyframeKit.js +294 -0
  24. package/docs/docs/public/playground/KeyframeKit/dist/KeyframeKit.js.map +1 -0
  25. package/docs/docs/reference/_media/LICENSE +21 -0
  26. package/docs/docs/reference/classes/KeyframeEffectParameters.md +95 -0
  27. package/docs/docs/reference/classes/ParsedKeyframes.md +49 -0
  28. package/docs/docs/reference/index.md +20 -0
  29. package/docs/docs/reference/interfaces/KeyframesFactory.md +151 -0
  30. package/docs/docs/reference/navigation.json +64 -0
  31. package/docs/docs/reference/type-aliases/KeyframeArgument.md +9 -0
  32. package/docs/docs/reference/type-aliases/KeyframesFactorySource.md +9 -0
  33. package/docs/docs/reference/type-aliases/ParsedKeyframesRules.md +15 -0
  34. package/docs/docs/reference/variables/default.md +7 -0
  35. package/docs/package.json +25 -0
  36. package/docs/typedoc/plugin-param-names.js +52 -0
  37. package/docs/typedoc.json +63 -0
  38. package/package.json +37 -0
  39. package/src/KeyframeKit.ts +508 -0
  40. package/tsconfig.json +47 -0
  41. package/vercel.json +13 -0
@@ -0,0 +1,399 @@
1
+ export default {
2
+ base: 'vs',
3
+ inherit: true,
4
+ rules: [
5
+ // Comments
6
+ { token: 'comment', foreground: '6a737d' },
7
+ { token: 'comment.line', foreground: '6a737d' },
8
+ { token: 'comment.block', foreground: '6a737d' },
9
+ { token: 'comment.doc', foreground: '6a737d' },
10
+
11
+ // Keywords & Storage (red)
12
+ { token: 'keyword', foreground: 'd73a49' },
13
+ { token: 'keyword.control', foreground: 'd73a49' },
14
+ { token: 'keyword.operator', foreground: 'd73a49' },
15
+ { token: 'keyword.other', foreground: 'd73a49' },
16
+ { token: 'storage', foreground: 'd73a49' },
17
+ { token: 'storage.type', foreground: 'd73a49' },
18
+ { token: 'storage.modifier', foreground: 'd73a49' },
19
+
20
+ // Types / Classes / Entities (purple)
21
+ { token: 'entity.name', foreground: '6f42c1' },
22
+ { token: 'entity.name.type', foreground: '6f42c1' },
23
+ { token: 'entity.name.class', foreground: '6f42c1' },
24
+ { token: 'entity.name.function', foreground: '6f42c1' },
25
+ { token: 'entity.name.namespace', foreground: '6f42c1' },
26
+ { token: 'entity.name.enum', foreground: '6f42c1' },
27
+ { token: 'entity.name.module', foreground: '6f42c1' },
28
+ { token: 'entity.other.inherited-class', foreground: '6f42c1' },
29
+ { token: 'type', foreground: '6f42c1' },
30
+ { token: 'type.identifier', foreground: '6f42c1' },
31
+
32
+ // HTML/XML tags (green)
33
+ { token: 'tag', foreground: '22863a' },
34
+ { token: 'tag.html', foreground: '22863a' },
35
+ { token: 'metatag', foreground: '22863a' },
36
+ { token: 'metatag.html', foreground: '22863a' },
37
+
38
+ // Tag attributes
39
+ { token: 'attribute.name', foreground: '6f42c1' },
40
+ { token: 'attribute.value', foreground: '032f62' },
41
+
42
+ // Constants & Numbers (dark blue)
43
+ { token: 'constant', foreground: '005cc5' },
44
+ { token: 'constant.language', foreground: '005cc5' },
45
+ { token: 'constant.numeric', foreground: '005cc5' },
46
+ { token: 'constant.character', foreground: '005cc5' },
47
+ { token: 'constant.other', foreground: '005cc5' },
48
+ { token: 'number', foreground: '005cc5' },
49
+ { token: 'number.float', foreground: '005cc5' },
50
+ { token: 'number.hex', foreground: '005cc5' },
51
+ { token: 'number.octal', foreground: '005cc5' },
52
+ { token: 'number.binary', foreground: '005cc5' },
53
+ { token: 'variable.language', foreground: '005cc5' },
54
+
55
+ // Strings (dark navy)
56
+ { token: 'string', foreground: '032f62' },
57
+ { token: 'string.quoted', foreground: '032f62' },
58
+ { token: 'string.template', foreground: '032f62' },
59
+ { token: 'string.interpolated', foreground: '032f62' },
60
+
61
+ // String escape sequences (green bold)
62
+ { token: 'string.escape', foreground: '22863a', fontStyle: 'bold' },
63
+ { token: 'constant.character.escape', foreground: '22863a', fontStyle: 'bold' },
64
+
65
+ // Regex
66
+ { token: 'regexp', foreground: '032f62' },
67
+ { token: 'regexp.escape', foreground: '22863a', fontStyle: 'bold' },
68
+
69
+ // Variables (orange)
70
+ { token: 'variable', foreground: 'e36209' },
71
+ { token: 'variable.name', foreground: 'e36209' },
72
+ { token: 'variable.parameter', foreground: '24292e' },
73
+ { token: 'variable.other', foreground: '24292e' },
74
+ { token: 'identifier', foreground: '24292e' },
75
+ { token: 'parameter', foreground: '24292e' },
76
+
77
+ // Support / Built-ins (dark blue)
78
+ { token: 'support', foreground: '005cc5' },
79
+ { token: 'support.function', foreground: '005cc5' },
80
+ { token: 'support.class', foreground: '005cc5' },
81
+ { token: 'support.type', foreground: '005cc5' },
82
+ { token: 'support.constant', foreground: '005cc5' },
83
+ { token: 'support.variable', foreground: '005cc5' },
84
+
85
+ // Decorators / Annotations
86
+ { token: 'annotation', foreground: '6f42c1' },
87
+ { token: 'decorator', foreground: '6f42c1' },
88
+
89
+ // Operators & Punctuation
90
+ { token: 'operator', foreground: 'd73a49' },
91
+ { token: 'delimiter', foreground: '24292e' },
92
+ { token: 'delimiter.bracket', foreground: '24292e' },
93
+ { token: 'delimiter.parenthesis', foreground: '24292e' },
94
+ { token: 'delimiter.square', foreground: '24292e' },
95
+ { token: 'delimiter.curly', foreground: '24292e' },
96
+
97
+ // CSS-specific
98
+ { token: 'attribute.value.css', foreground: '032f62' },
99
+ { token: 'attribute.value.number.css', foreground: '005cc5' },
100
+ { token: 'attribute.value.unit.css', foreground: '005cc5' },
101
+ { token: 'attribute.value.hex.css', foreground: '005cc5' },
102
+ { token: 'selector', foreground: '6f42c1' },
103
+ { token: 'selector.tag', foreground: '22863a' },
104
+ { token: 'selector.class', foreground: '6f42c1' },
105
+ { token: 'selector.id', foreground: '6f42c1' },
106
+ { token: 'property', foreground: '005cc5' },
107
+ { token: 'value', foreground: 'e36209' },
108
+ { token: 'unit', foreground: '005cc5' },
109
+
110
+ // Markdown
111
+ { token: 'markup.heading', foreground: '005cc5', fontStyle: 'bold' },
112
+ { token: 'markup.bold', foreground: '24292e', fontStyle: 'bold' },
113
+ { token: 'markup.italic', foreground: '24292e', fontStyle: 'italic' },
114
+ { token: 'markup.underline', fontStyle: 'underline' },
115
+ { token: 'markup.strikethrough', fontStyle: 'strikethrough' },
116
+ { token: 'markup.inline.raw', foreground: '005cc5' },
117
+ { token: 'markup.quote', foreground: '22863a' },
118
+ { token: 'markup.list', foreground: 'e36209' },
119
+ { token: 'markup.link', foreground: '032f62', fontStyle: 'underline' },
120
+
121
+ // Diff
122
+ { token: 'markup.inserted', foreground: '22863a' },
123
+ { token: 'markup.deleted', foreground: 'b31d28' },
124
+ { token: 'markup.changed', foreground: 'e36209' },
125
+
126
+ // JSON
127
+ { token: 'key', foreground: '005cc5' },
128
+
129
+ // Invalid
130
+ { token: 'invalid', foreground: 'b31d28', fontStyle: 'italic' },
131
+ { token: 'invalid.deprecated', foreground: 'b31d28', fontStyle: 'italic' },
132
+
133
+ // Default / Plain text
134
+ { token: '', foreground: '24292e' },
135
+ ],
136
+ colors: {
137
+ // Editor core
138
+ 'editor.foreground': '#24292e',
139
+ 'editor.background': '#ffffff',
140
+ 'editor.lineHighlightBackground': '#f6f8fa',
141
+ 'editor.selectionBackground': '#0366d625',
142
+ 'editor.inactiveSelectionBackground': '#0366d611',
143
+ 'editor.selectionHighlightBackground': '#34d05840',
144
+ 'editor.selectionHighlightBorder': '#34d05800',
145
+ 'editor.findMatchBackground': '#ffdf5d',
146
+ 'editor.findMatchHighlightBackground': '#ffdf5d66',
147
+ 'editor.wordHighlightBackground': '#34d05800',
148
+ 'editor.wordHighlightStrongBackground': '#34d05800',
149
+ 'editor.wordHighlightBorder': '#24943e99',
150
+ 'editor.wordHighlightStrongBorder': '#24943e50',
151
+ 'editor.linkedEditingBackground': '#0366d611',
152
+
153
+ // Cursor & whitespace
154
+ 'editorCursor.foreground': '#044289',
155
+ 'editorWhitespace.foreground': '#d1d5da',
156
+ 'editorIndentGuide.background': '#eff2f6',
157
+ 'editorIndentGuide.activeBackground': '#d7dbe0',
158
+
159
+ // Line numbers
160
+ 'editorLineNumber.foreground': '#1b1f234d',
161
+ 'editorLineNumber.activeForeground': '#24292e',
162
+
163
+ // Bracket matching
164
+ 'editorBracketMatch.background': '#34d05840',
165
+ 'editorBracketMatch.border': '#34d05800',
166
+
167
+ // Bracket pair colorization
168
+ 'editorBracketHighlight.foreground1': '#005cc5',
169
+ 'editorBracketHighlight.foreground2': '#e36209',
170
+ 'editorBracketHighlight.foreground3': '#5a32a3',
171
+ 'editorBracketHighlight.foreground4': '#005cc5',
172
+ 'editorBracketHighlight.foreground5': '#e36209',
173
+ 'editorBracketHighlight.foreground6': '#5a32a3',
174
+
175
+ // Errors & warnings
176
+ 'editorError.foreground': '#cb2431',
177
+ 'editorWarning.foreground': '#f9c513',
178
+
179
+ // Overview ruler
180
+ 'editorOverviewRuler.border': '#ffffff',
181
+
182
+ // Gutter
183
+ 'editorGutter.modifiedBackground': '#2188ff',
184
+ 'editorGutter.addedBackground': '#28a745',
185
+ 'editorGutter.deletedBackground': '#d73a49',
186
+
187
+ // Diff editor
188
+ 'diffEditor.insertedTextBackground': '#34d05822',
189
+ 'diffEditor.removedTextBackground': '#d73a4922',
190
+
191
+ // Widgets
192
+ /*
193
+ 'editorWidget.background': '#f6f8fa',
194
+ 'editorSuggestWidget.background': '#f6f8fa',
195
+ 'editorSuggestWidget.border': '#e1e4e8',
196
+ 'editorSuggestWidget.foreground': '#24292e',
197
+ 'editorSuggestWidget.selectedBackground': '#cce5ff',
198
+ 'editorSuggestWidget.highlightForeground': '#005cc5',
199
+ 'editorHoverWidget.background': '#f6f8fa',
200
+ 'editorHoverWidget.border': '#e1e4e8',*/
201
+
202
+ // Peek view
203
+ 'peekViewEditor.matchHighlightBackground': '#ffd33d33',
204
+ 'peekViewResult.matchHighlightBackground': '#ffd33d33',
205
+
206
+ // Scrollbar
207
+ 'scrollbar.shadow': '#6a737d33',
208
+ 'scrollbarSlider.background': '#959da533',
209
+ 'scrollbarSlider.hoverBackground': '#959da544',
210
+ 'scrollbarSlider.activeBackground': '#959da588',
211
+
212
+ // Focus border
213
+ 'focusBorder': '#2188ff',
214
+ 'foreground': '#444d56',
215
+
216
+ // Title bar
217
+ 'titleBar.activeBackground': '#ffffff',
218
+ 'titleBar.activeForeground': '#2f363d',
219
+ 'titleBar.inactiveBackground': '#f6f8fa',
220
+ 'titleBar.inactiveForeground': '#6a737d',
221
+ 'titleBar.border': '#e1e4e8',
222
+
223
+ // Activity bar
224
+ 'activityBar.background': '#ffffff',
225
+ 'activityBar.foreground': '#2f363d',
226
+ 'activityBar.inactiveForeground': '#959da5',
227
+ 'activityBar.border': '#e1e4e8',
228
+ 'activityBar.activeBorder': '#f9826c',
229
+ 'activityBarBadge.background': '#2188ff',
230
+ 'activityBarBadge.foreground': '#fff',
231
+
232
+ // Side bar
233
+ 'sideBar.background': '#f6f8fa',
234
+ 'sideBar.foreground': '#586069',
235
+ 'sideBar.border': '#e1e4e8',
236
+ 'sideBarTitle.foreground': '#2f363d',
237
+ 'sideBarSectionHeader.background': '#f6f8fa',
238
+ 'sideBarSectionHeader.foreground': '#2f363d',
239
+ 'sideBarSectionHeader.border': '#e1e4e8',
240
+
241
+ // Lists
242
+ 'list.hoverBackground': '#ebf0f4',
243
+ 'list.hoverForeground': '#2f363d',
244
+ 'list.activeSelectionBackground': '#e2e5e9',
245
+ 'list.activeSelectionForeground': '#2f363d',
246
+ 'list.inactiveSelectionBackground': '#e8eaed',
247
+ 'list.inactiveSelectionForeground': '#2f363d',
248
+ 'list.focusBackground': '#cce5ff',
249
+ 'list.inactiveFocusBackground': '#dbedff',
250
+
251
+ // Tabs
252
+ 'editorGroupHeader.tabsBackground': '#f6f8fa',
253
+ 'editorGroupHeader.tabsBorder': '#e1e4e8',
254
+ 'editorGroup.border': '#e1e4e8',
255
+ 'tab.activeBackground': '#ffffff',
256
+ 'tab.activeForeground': '#2f363d',
257
+ 'tab.activeBorder': '#ffffff',
258
+ 'tab.activeBorderTop': '#f9826c',
259
+ 'tab.inactiveBackground': '#f6f8fa',
260
+ 'tab.inactiveForeground': '#6a737d',
261
+ 'tab.border': '#e1e4e8',
262
+ 'tab.hoverBackground': '#ffffff',
263
+ 'tab.unfocusedActiveBorder': '#ffffff',
264
+ 'tab.unfocusedActiveBorderTop': '#e1e4e8',
265
+ 'tab.unfocusedHoverBackground': '#ffffff',
266
+
267
+ // Breadcrumb
268
+ 'breadcrumb.foreground': '#6a737d',
269
+ 'breadcrumb.focusForeground': '#2f363d',
270
+ 'breadcrumb.activeSelectionForeground': '#586069',
271
+ 'breadcrumbPicker.background': '#fafbfc',
272
+
273
+ // Status bar
274
+ 'statusBar.background': '#ffffff',
275
+ 'statusBar.foreground': '#586069',
276
+ 'statusBar.border': '#e1e4e8',
277
+ 'statusBar.noFolderBackground': '#ffffff',
278
+ 'statusBar.debuggingBackground': '#f9826c',
279
+ 'statusBar.debuggingForeground': '#fff',
280
+ 'statusBarItem.prominentBackground': '#e8eaed',
281
+ 'statusBarItem.remoteForeground': '#586069',
282
+ 'statusBarItem.remoteBackground': '#ffffff',
283
+
284
+ // Panel (terminal etc)
285
+ 'panel.background': '#f6f8fa',
286
+ 'panel.border': '#e1e4e8',
287
+ 'panelTitle.activeBorder': '#f9826c',
288
+ 'panelTitle.activeForeground': '#2f363d',
289
+ 'panelTitle.inactiveForeground': '#6a737d',
290
+ 'panelInput.border': '#e1e4e8',
291
+
292
+ // Terminal
293
+ 'terminal.foreground': '#586069',
294
+ 'terminal.tab.activeBorder': '#f9826c',
295
+ 'terminalCursor.background': '#d1d5da',
296
+ 'terminalCursor.foreground': '#005cc5',
297
+ 'terminal.ansiBlack': '#24292e',
298
+ 'terminal.ansiRed': '#d73a49',
299
+ 'terminal.ansiGreen': '#28a745',
300
+ 'terminal.ansiYellow': '#dbab09',
301
+ 'terminal.ansiBlue': '#0366d6',
302
+ 'terminal.ansiMagenta': '#5a32a3',
303
+ 'terminal.ansiCyan': '#1b7c83',
304
+ 'terminal.ansiWhite': '#6a737d',
305
+ 'terminal.ansiBrightBlack': '#959da5',
306
+ 'terminal.ansiBrightRed': '#cb2431',
307
+ 'terminal.ansiBrightGreen': '#22863a',
308
+ 'terminal.ansiBrightYellow': '#b08800',
309
+ 'terminal.ansiBrightBlue': '#005cc5',
310
+ 'terminal.ansiBrightMagenta': '#5a32a3',
311
+ 'terminal.ansiBrightCyan': '#3192aa',
312
+ 'terminal.ansiBrightWhite': '#d1d5da',
313
+
314
+ // Input
315
+ 'input.background': '#fafbfc',
316
+ 'input.border': '#e1e4e8',
317
+ 'input.foreground': '#2f363d',
318
+ 'input.placeholderForeground': '#959da5',
319
+
320
+ // Dropdown
321
+ 'dropdown.background': '#fafbfc',
322
+ 'dropdown.border': '#e1e4e8',
323
+ 'dropdown.foreground': '#2f363d',
324
+ 'dropdown.listBackground': '#ffffff',
325
+
326
+ // Button
327
+ 'button.background': '#159739',
328
+ 'button.foreground': '#ffffff',
329
+ 'button.hoverBackground': '#138934',
330
+ 'button.secondaryBackground': '#e1e4e8',
331
+ 'button.secondaryForeground': '#1b1f23',
332
+ 'button.secondaryHoverBackground': '#d1d5da',
333
+
334
+ // Badge
335
+ 'badge.background': '#dbedff',
336
+ 'badge.foreground': '#005cc5',
337
+
338
+ // Checkbox
339
+ 'checkbox.background': '#fafbfc',
340
+ 'checkbox.border': '#d1d5da',
341
+
342
+ // Progress bar
343
+ 'progressBar.background': '#2188ff',
344
+
345
+ // Notifications
346
+ 'notificationCenterHeader.background': '#e1e4e8',
347
+ 'notificationCenterHeader.foreground': '#6a737d',
348
+ 'notifications.background': '#fafbfc',
349
+ 'notifications.foreground': '#2f363d',
350
+ 'notifications.border': '#e1e4e8',
351
+ 'notificationsErrorIcon.foreground': '#d73a49',
352
+ 'notificationsWarningIcon.foreground': '#e36209',
353
+ 'notificationsInfoIcon.foreground': '#005cc5',
354
+
355
+ // Quick input
356
+ 'quickInput.background': '#fafbfc',
357
+ 'quickInput.foreground': '#2f363d',
358
+
359
+ // Picker
360
+ 'pickerGroup.border': '#e1e4e8',
361
+ 'pickerGroup.foreground': '#2f363d',
362
+
363
+ // Git decorations
364
+ 'gitDecoration.addedResourceForeground': '#28a745',
365
+ 'gitDecoration.modifiedResourceForeground': '#005cc5',
366
+ 'gitDecoration.deletedResourceForeground': '#d73a49',
367
+ 'gitDecoration.untrackedResourceForeground': '#28a745',
368
+ 'gitDecoration.ignoredResourceForeground': '#959da5',
369
+ 'gitDecoration.conflictingResourceForeground': '#e36209',
370
+ 'gitDecoration.submoduleResourceForeground': '#959da5',
371
+
372
+ // Debug
373
+ 'debugToolBar.background': '#ffffff',
374
+ 'editor.stackFrameHighlightBackground': '#ffd33d33',
375
+ 'editor.focusedStackFrameHighlightBackground': '#28a74525',
376
+
377
+ // Settings
378
+ 'settings.headerForeground': '#2f363d',
379
+ 'settings.modifiedItemIndicator': '#2188ff',
380
+
381
+ // Welcome
382
+ 'welcomePage.buttonBackground': '#f6f8fa',
383
+ 'welcomePage.buttonHoverBackground': '#e1e4e8',
384
+
385
+ // Text
386
+ //'textLink.foreground': '#0366d6',
387
+ //'textLink.activeForeground': '#005cc5',
388
+ 'textBlockQuote.background': '#fafbfc',
389
+ 'textBlockQuote.border': '#e1e4e8',
390
+ 'textCodeBlock.background': '#f6f8fa',
391
+ 'textPreformat.foreground': '#586069',
392
+ 'textSeparator.foreground': '#d1d5da',
393
+ 'descriptionForeground': '#6a737d',
394
+ 'errorForeground': '#cb2431',
395
+
396
+ // Tree
397
+ 'tree.indentGuidesStroke': '#e1e4e8',
398
+ }
399
+ };
@@ -0,0 +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
+ }
@@ -0,0 +1,64 @@
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: [['link', { rel: 'icon', href: '/icon.png' }]],
15
+
16
+ title: "KeyframeKit",
17
+ description: "Test",
18
+ themeConfig: {
19
+ outline: [2, 3],
20
+
21
+ // https://vitepress.dev/reference/default-theme-config
22
+ nav: [
23
+ { text: 'Home', link: '/' },
24
+ { text: 'Reference', link: '/reference' }
25
+ ],
26
+
27
+ sidebar: {
28
+ '/reference/': [
29
+ {
30
+ text: 'Reference',
31
+ link: '/reference',
32
+ items: referenceNavigationItems
33
+ }
34
+ ]
35
+ },
36
+
37
+ search: {
38
+ provider: 'local'
39
+ },
40
+
41
+ socialLinks: [
42
+ { icon: 'github', link: 'https://github.com/benhatsor/KeyframeKit' }
43
+ ],
44
+
45
+ footer: {
46
+ message: 'Created by <a href="https://berryscript.com" target="_blank">Ben Hatsor</a>. MIT License.'
47
+ }
48
+ },
49
+
50
+ vite: {
51
+ plugins: [
52
+ /*monacoEditorPlugin({
53
+ //publicPath: '/'
54
+ customDistPath: (root, buildOutDir) => `${buildOutDir}/monacoeditorwork`
55
+ })*/
56
+ ],
57
+ ssr: {
58
+ //noExternal: ['monaco-editor']
59
+ },
60
+ optimizeDeps: {
61
+ //exclude: ['monaco-editor']
62
+ }
63
+ }
64
+ })
@@ -0,0 +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
+ }
@@ -0,0 +1,91 @@
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
+ }
15
+
16
+ .vp-doc .monaco-editor :not(pre, h1, h2, h3, h4, h5, h6) > code {
17
+ font-size: unset;
18
+ color: inherit;
19
+ }
20
+
21
+
22
+ .vp-doc h5, .vp-doc h6 {
23
+ margin: 16px 0;
24
+ }
25
+
26
+
27
+ .VPLocalSearchBox {
28
+
29
+ --vp-local-search-result-selected-border: var(--vp-c-brand-2);
30
+
31
+ .search-bar {
32
+ background: var(--vp-c-divider);
33
+ }
34
+
35
+ .search-bar:focus-within {
36
+ border-color: var(--vp-c-brand-2) !important;
37
+ box-shadow: 0 0 0 1px var(--vp-c-brand-2);
38
+ /* background: transparent; */
39
+ background: var(--vp-c-bg-alt);
40
+ }
41
+
42
+ .search-bar .search-input {
43
+ font-family: inherit;
44
+ }
45
+
46
+ .search-bar .search-actions .clear-button {
47
+ /* order: -1; */
48
+
49
+ &:disabled {
50
+ display: none;
51
+ }
52
+ }
53
+
54
+ .search-bar:has(+ .results:empty) .search-actions .toggle-layout-button,
55
+ .search-bar .search-actions:has(.clear-button:disabled) .toggle-layout-button {
56
+ display: none;
57
+ }
58
+
59
+ .results:empty,
60
+ &:has(.search-bar .search-actions .clear-button:disabled) .results {
61
+ display: none;
62
+ }
63
+
64
+ .search-keyboard-shortcuts {
65
+ display: none !important;
66
+ }
67
+
68
+ }
69
+
70
+
71
+ @media (min-width: 768px) {
72
+
73
+ .VPNavBarSearchButton {
74
+
75
+ height: 38px !important;
76
+ /* width: 127px; */
77
+ width: 140px;
78
+ /* justify-content: center; */
79
+
80
+ .keys {
81
+ display: none;
82
+ }
83
+
84
+ }
85
+
86
+ }
87
+
88
+
89
+ :root {
90
+ -webkit-tap-highlight-color: transparent;
91
+ }
@@ -0,0 +1,5 @@
1
+ declare module '*.vue' {
2
+ import type { DefineComponent } from 'vue'
3
+ const component: DefineComponent<{}, {}, any>
4
+ export default component
5
+ }
@@ -0,0 +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
+ }
40
+ }