keyframekit 1.0.7 → 1.0.9

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 (36) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +129 -126
  3. package/dist/KeyframeKit.d.ts +138 -138
  4. package/dist/KeyframeKit.js +293 -293
  5. package/docs/.vitepress/components/Playground/Playground.js +242 -242
  6. package/docs/.vitepress/components/Playground/Playground.vue +206 -206
  7. package/docs/.vitepress/components/Playground/defaultExample.js +175 -175
  8. package/docs/.vitepress/components/Playground/interFont.js +14 -14
  9. package/docs/.vitepress/components/Playground/themes/githubDark.js +401 -401
  10. package/docs/.vitepress/components/Playground/themes/githubLight.js +398 -398
  11. package/docs/.vitepress/components/Playground/themes.js +24 -24
  12. package/docs/.vitepress/config.ts +84 -69
  13. package/docs/.vitepress/referenceNavigation.ts +37 -37
  14. package/docs/.vitepress/theme/base-styles.css +100 -91
  15. package/docs/.vitepress/theme/env.d.ts +5 -5
  16. package/docs/.vitepress/theme/index.ts +39 -39
  17. package/docs/docs/index.md +142 -141
  18. package/docs/docs/public/playground/KeyframeKit/dist/KeyframeKit.d.ts +138 -138
  19. package/docs/docs/public/playground/KeyframeKit/dist/KeyframeKit.js +293 -293
  20. package/docs/docs/reference/_media/LICENSE +21 -21
  21. package/docs/docs/reference/classes/KeyframeEffectParameters.md +95 -95
  22. package/docs/docs/reference/classes/ParsedKeyframes.md +49 -49
  23. package/docs/docs/reference/index.md +20 -20
  24. package/docs/docs/reference/interfaces/KeyframesFactory.md +151 -151
  25. package/docs/docs/reference/navigation.json +63 -63
  26. package/docs/docs/reference/type-aliases/KeyframeArgument.md +9 -9
  27. package/docs/docs/reference/type-aliases/KeyframesFactorySource.md +9 -9
  28. package/docs/docs/reference/type-aliases/ParsedKeyframesRules.md +15 -15
  29. package/docs/docs/reference/variables/default.md +7 -7
  30. package/docs/package.json +25 -25
  31. package/docs/typedoc/plugin-param-names.js +51 -51
  32. package/docs/typedoc.json +62 -62
  33. package/package.json +37 -37
  34. package/src/KeyframeKit.ts +508 -508
  35. package/tsconfig.json +47 -47
  36. package/vercel.json +12 -12
@@ -1,206 +1,206 @@
1
- <template>
2
- <div class="playground" :class="{ loaded: isLoaded === true }">
3
- <div class="editor-pane">
4
- <div class="tabs">
5
- <button
6
- v-for="tab in tabs"
7
- :key="tab"
8
- class="tab"
9
- :class="{ active: activeTab === tab }"
10
- @click="activeTab = tab"
11
- >
12
- {{ tab }}
13
- </button>
14
- </div>
15
- <div class="editor-container">
16
-
17
- <div
18
- v-for="tab in tabs"
19
- :key="tab"
20
- :ref="el => setEditorRef(tab, el)"
21
- class="editor-mount"
22
- :style="{ visibility: activeTab === tab ? 'visible' : 'hidden' }"
23
- />
24
-
25
- <svg class="loader" width="18" height="18" viewBox="0 0 100 100"><rect fill="#555555" height="10" opacity="0" rx="5" ry="5" transform="rotate(-90 50 50)" width="28" x="67" y="45"></rect><rect fill="#555555" height="10" opacity="0.125" rx="5" ry="5" transform="rotate(-45 50 50)" width="28" x="67" y="45"></rect><rect fill="#555555" height="10" opacity="0.25" rx="5" ry="5" transform="rotate(0 50 50)" width="28" x="67" y="45"></rect><rect fill="#555555" height="10" opacity="0.375" rx="5" ry="5" transform="rotate(45 50 50)" width="28" x="67" y="45"></rect><rect fill="#555555" height="10" opacity="0.5" rx="5" ry="5" transform="rotate(90 50 50)" width="28" x="67" y="45"></rect><rect fill="#555555" height="10" opacity="0.625" rx="5" ry="5" transform="rotate(135 50 50)" width="28" x="67" y="45"></rect><rect fill="#555555" height="10" opacity="0.75" rx="5" ry="5" transform="rotate(180 50 50)" width="28" x="67" y="45"></rect><rect fill="#555555" height="10" opacity="0.875" rx="5" ry="5" transform="rotate(225 50 50)" width="28" x="67" y="45"></rect></svg>
26
-
27
- </div>
28
- </div>
29
-
30
- <div class="preview-pane">
31
- <iframe ref="previewFrame" class="preview-frame" sandbox="allow-scripts" />
32
- </div>
33
- </div>
34
- </template>
35
-
36
- <script setup>
37
- import { ref } from 'vue'
38
- import { playground } from './Playground.js'
39
-
40
- import { getDefaultExample } from './defaultExample.js';
41
- //import * as libCode from './libCode.js';
42
-
43
- import { interFontDec } from './interFont.js';
44
-
45
- const props = defineProps({
46
- //initialHtml: { type: String, default: defaultExample.html },
47
- //initialCss: { type: String, default: defaultExample.css },
48
- //initialJs: { type: String, default: defaultExample.js },
49
-
50
- //decLibSrc: { type: String, default: libCode.decLibSrc },
51
- //libImportMap: { type: String, default: libCode.libImportMap }
52
- })
53
-
54
- const previewFrame = ref(null)
55
- const { tabs, activeTab, isLoaded, setEditorRef } = playground(props, previewFrame, getDefaultExample, interFontDec)
56
- </script>
57
-
58
- <style scoped>
59
- .playground {
60
- display: flex;
61
- height: 500px;
62
- --border-radius: 8px;
63
- border-radius: var(--border-radius);
64
- overflow: hidden;
65
- margin-bottom: 48px;
66
- }
67
-
68
- @media (max-width: 1000px) {
69
- .playground {
70
- flex-flow: column-reverse;
71
- }
72
- .playground .preview-pane {
73
- border-bottom-width: 0;
74
- border-left-width: 1px;
75
- border-radius: var(--border-radius) var(--border-radius) 0 0;
76
- }
77
- }
78
-
79
- @media (max-width: 640px) {
80
- .playground {
81
- margin-left: -24px;
82
- margin-right: -24px;
83
- --border-radius: 0;
84
- }
85
- .playground .preview-pane {
86
- border-right-width: 0;
87
- border-left-width: 0;
88
- }
89
- }
90
-
91
- @media (min-width: 640px) {
92
- .playground {
93
- margin-bottom: 64px;
94
- }
95
- }
96
-
97
- .editor-pane {
98
- display: flex;
99
- flex-direction: column;
100
- background: var(--vp-code-block-bg);
101
- flex: 1;
102
- }
103
-
104
- .tabs {
105
- display: flex;
106
- flex-shrink: 0;
107
- padding: 0 12px;
108
- background-color: var(--vp-code-tab-bg);
109
- box-shadow: inset 0 -1px var(--vp-code-tab-divider);
110
- }
111
-
112
- .tab {
113
- position: relative;
114
- display: inline-block;
115
- border-bottom: 1px solid transparent;
116
- padding: 0 12px;
117
- line-height: 48px;
118
- font-size: 14px;
119
- font-weight: 500;
120
- color: var(--vp-code-tab-text-color);
121
- white-space: nowrap;
122
- cursor: pointer;
123
- transition: color 0.25s;
124
- }
125
- .tab:hover {
126
- color: var(--vp-code-tab-hover-text-color);
127
- }
128
- .tab.active {
129
- color: var(--vp-code-tab-active-text-color);
130
- }
131
-
132
- .tab::after {
133
- position: absolute;
134
- right: 8px;
135
- bottom: -1px;
136
- left: 8px;
137
- z-index: 1;
138
- height: 2px;
139
- border-radius: 2px;
140
- content: '';
141
- background-color: transparent;
142
- /* transition: background-color 0.25s; */
143
- }
144
- .tab.active::after {
145
- background-color: var(--vp-code-tab-active-bar-color);
146
- }
147
-
148
- .editor-container {
149
- flex: 1;
150
- /* overflow: hidden; */
151
- position: relative;
152
- }
153
- .editor-mount {
154
- width: 100%;
155
- height: 100%;
156
- position: absolute;
157
- }
158
-
159
- .editor-container .loader {
160
- translate: -50% -50%;
161
- left: 50%;
162
- top: 50%;
163
- position: relative;
164
- color: var(--vp-c-text-2);
165
- pointer-events: none;
166
- animation: spin8 0.8s steps(8) infinite;
167
- transition: .18s ease-in-out .18s opacity;
168
-
169
- @starting-style {
170
- opacity: 0;
171
- }
172
- }
173
-
174
- .editor-container .loader rect {
175
- fill: currentColor;
176
- }
177
-
178
- .playground.loaded .loader {
179
- display: none;
180
- }
181
-
182
- @keyframes spin8 {
183
- from {
184
- transform: rotate(180deg);
185
- }
186
- to {
187
- transform: rotate(540deg);
188
- }
189
- }
190
-
191
- .preview-pane {
192
- border: 1px solid var(--vp-code-block-bg);
193
- border-left-width: 0;
194
- flex: 1;
195
- display: flex;
196
- border-radius: 0 var(--border-radius) var(--border-radius) 0;
197
- overflow: hidden;
198
- background: #f0f7ff;
199
- }
200
-
201
- .preview-frame {
202
- flex: 1;
203
- width: 100%;
204
- border: none;
205
- }
206
- </style>
1
+ <template>
2
+ <div class="playground" :class="{ loaded: isLoaded === true }">
3
+ <div class="editor-pane">
4
+ <div class="tabs">
5
+ <button
6
+ v-for="tab in tabs"
7
+ :key="tab"
8
+ class="tab"
9
+ :class="{ active: activeTab === tab }"
10
+ @click="activeTab = tab"
11
+ >
12
+ {{ tab }}
13
+ </button>
14
+ </div>
15
+ <div class="editor-container">
16
+
17
+ <div
18
+ v-for="tab in tabs"
19
+ :key="tab"
20
+ :ref="el => setEditorRef(tab, el)"
21
+ class="editor-mount"
22
+ :style="{ visibility: activeTab === tab ? 'visible' : 'hidden' }"
23
+ />
24
+
25
+ <svg class="loader" width="18" height="18" viewBox="0 0 100 100"><rect fill="#555555" height="10" opacity="0" rx="5" ry="5" transform="rotate(-90 50 50)" width="28" x="67" y="45"></rect><rect fill="#555555" height="10" opacity="0.125" rx="5" ry="5" transform="rotate(-45 50 50)" width="28" x="67" y="45"></rect><rect fill="#555555" height="10" opacity="0.25" rx="5" ry="5" transform="rotate(0 50 50)" width="28" x="67" y="45"></rect><rect fill="#555555" height="10" opacity="0.375" rx="5" ry="5" transform="rotate(45 50 50)" width="28" x="67" y="45"></rect><rect fill="#555555" height="10" opacity="0.5" rx="5" ry="5" transform="rotate(90 50 50)" width="28" x="67" y="45"></rect><rect fill="#555555" height="10" opacity="0.625" rx="5" ry="5" transform="rotate(135 50 50)" width="28" x="67" y="45"></rect><rect fill="#555555" height="10" opacity="0.75" rx="5" ry="5" transform="rotate(180 50 50)" width="28" x="67" y="45"></rect><rect fill="#555555" height="10" opacity="0.875" rx="5" ry="5" transform="rotate(225 50 50)" width="28" x="67" y="45"></rect></svg>
26
+
27
+ </div>
28
+ </div>
29
+
30
+ <div class="preview-pane">
31
+ <iframe ref="previewFrame" class="preview-frame" sandbox="allow-scripts" />
32
+ </div>
33
+ </div>
34
+ </template>
35
+
36
+ <script setup>
37
+ import { ref } from 'vue'
38
+ import { playground } from './Playground.js'
39
+
40
+ import { getDefaultExample } from './defaultExample.js';
41
+ //import * as libCode from './libCode.js';
42
+
43
+ import { interFontDec } from './interFont.js';
44
+
45
+ const props = defineProps({
46
+ //initialHtml: { type: String, default: defaultExample.html },
47
+ //initialCss: { type: String, default: defaultExample.css },
48
+ //initialJs: { type: String, default: defaultExample.js },
49
+
50
+ //decLibSrc: { type: String, default: libCode.decLibSrc },
51
+ //libImportMap: { type: String, default: libCode.libImportMap }
52
+ })
53
+
54
+ const previewFrame = ref(null)
55
+ const { tabs, activeTab, isLoaded, setEditorRef } = playground(props, previewFrame, getDefaultExample, interFontDec)
56
+ </script>
57
+
58
+ <style scoped>
59
+ .playground {
60
+ display: flex;
61
+ height: 500px;
62
+ --border-radius: 8px;
63
+ border-radius: var(--border-radius);
64
+ overflow: hidden;
65
+ margin-bottom: 48px;
66
+ }
67
+
68
+ @media (max-width: 1000px) {
69
+ .playground {
70
+ flex-flow: column-reverse;
71
+ }
72
+ .playground .preview-pane {
73
+ border-bottom-width: 0;
74
+ border-left-width: 1px;
75
+ border-radius: var(--border-radius) var(--border-radius) 0 0;
76
+ }
77
+ }
78
+
79
+ @media (max-width: 640px) {
80
+ .playground {
81
+ margin-left: -24px;
82
+ margin-right: -24px;
83
+ --border-radius: 0;
84
+ }
85
+ .playground .preview-pane {
86
+ border-right-width: 0;
87
+ border-left-width: 0;
88
+ }
89
+ }
90
+
91
+ @media (min-width: 640px) {
92
+ .playground {
93
+ margin-bottom: 64px;
94
+ }
95
+ }
96
+
97
+ .editor-pane {
98
+ display: flex;
99
+ flex-direction: column;
100
+ background: var(--vp-code-block-bg);
101
+ flex: 1;
102
+ }
103
+
104
+ .tabs {
105
+ display: flex;
106
+ flex-shrink: 0;
107
+ padding: 0 12px;
108
+ background-color: var(--vp-code-tab-bg);
109
+ box-shadow: inset 0 -1px var(--vp-code-tab-divider);
110
+ }
111
+
112
+ .tab {
113
+ position: relative;
114
+ display: inline-block;
115
+ border-bottom: 1px solid transparent;
116
+ padding: 0 12px;
117
+ line-height: 48px;
118
+ font-size: 14px;
119
+ font-weight: 500;
120
+ color: var(--vp-code-tab-text-color);
121
+ white-space: nowrap;
122
+ cursor: pointer;
123
+ transition: color 0.25s;
124
+ }
125
+ .tab:hover {
126
+ color: var(--vp-code-tab-hover-text-color);
127
+ }
128
+ .tab.active {
129
+ color: var(--vp-code-tab-active-text-color);
130
+ }
131
+
132
+ .tab::after {
133
+ position: absolute;
134
+ right: 8px;
135
+ bottom: -1px;
136
+ left: 8px;
137
+ z-index: 1;
138
+ height: 2px;
139
+ border-radius: 2px;
140
+ content: '';
141
+ background-color: transparent;
142
+ /* transition: background-color 0.25s; */
143
+ }
144
+ .tab.active::after {
145
+ background-color: var(--vp-code-tab-active-bar-color);
146
+ }
147
+
148
+ .editor-container {
149
+ flex: 1;
150
+ /* overflow: hidden; */
151
+ position: relative;
152
+ }
153
+ .editor-mount {
154
+ width: 100%;
155
+ height: 100%;
156
+ position: absolute;
157
+ }
158
+
159
+ .editor-container .loader {
160
+ translate: -50% -50%;
161
+ left: 50%;
162
+ top: 50%;
163
+ position: relative;
164
+ color: var(--vp-c-text-2);
165
+ pointer-events: none;
166
+ animation: spin8 0.8s steps(8) infinite;
167
+ transition: .18s ease-in-out .18s opacity;
168
+
169
+ @starting-style {
170
+ opacity: 0;
171
+ }
172
+ }
173
+
174
+ .editor-container .loader rect {
175
+ fill: currentColor;
176
+ }
177
+
178
+ .playground.loaded .loader {
179
+ display: none;
180
+ }
181
+
182
+ @keyframes spin8 {
183
+ from {
184
+ transform: rotate(180deg);
185
+ }
186
+ to {
187
+ transform: rotate(540deg);
188
+ }
189
+ }
190
+
191
+ .preview-pane {
192
+ border: 1px solid var(--vp-code-block-bg);
193
+ border-left-width: 0;
194
+ flex: 1;
195
+ display: flex;
196
+ border-radius: 0 var(--border-radius) var(--border-radius) 0;
197
+ overflow: hidden;
198
+ background: #f0f7ff;
199
+ }
200
+
201
+ .preview-frame {
202
+ flex: 1;
203
+ width: 100%;
204
+ border: none;
205
+ }
206
+ </style>