@wishbone-media/spark 0.16.1 → 0.18.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/formkit.config.js CHANGED
@@ -15,18 +15,6 @@ import {
15
15
  } from '@formkit/pro';
16
16
  import { rootClasses } from '@wishbone-media/spark/formkit.theme.mjs';
17
17
 
18
- const proPlugin = createProPlugin('fk-8c746502a21', {
19
- autocomplete,
20
- colorpicker,
21
- datepicker,
22
- dropdown,
23
- rating,
24
- repeater,
25
- slider,
26
- taglist,
27
- toggle
28
- });
29
-
30
18
  const autoAnimatePlugin = createAutoAnimatePlugin(
31
19
  {
32
20
  /* optional AutoAnimate config */
@@ -44,12 +32,30 @@ const autoAnimatePlugin = createAutoAnimatePlugin(
44
32
  }
45
33
  );
46
34
 
47
- export default defaultConfig({
48
- config: {
49
- rootClasses
50
- },
51
- icons: {
52
- ...genesisIcons
53
- },
54
- plugins: [proPlugin, autoAnimatePlugin]
55
- });
35
+ export default function createFormKitConfig(formKitProKey) {
36
+ if (!formKitProKey) {
37
+ throw new Error('FormKit Pro key is required. Please provide VITE_FORMKIT_PRO_KEY in your environment variables.');
38
+ }
39
+
40
+ const proPlugin = createProPlugin(formKitProKey, {
41
+ autocomplete,
42
+ colorpicker,
43
+ datepicker,
44
+ dropdown,
45
+ rating,
46
+ repeater,
47
+ slider,
48
+ taglist,
49
+ toggle
50
+ });
51
+
52
+ return defaultConfig({
53
+ config: {
54
+ rootClasses
55
+ },
56
+ icons: {
57
+ ...genesisIcons
58
+ },
59
+ plugins: [proPlugin, autoAnimatePlugin]
60
+ });
61
+ }