@walkeros/web-destination-plausible 0.3.1 → 0.4.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/dist/index.d.mts CHANGED
@@ -1,5 +1,4 @@
1
- import * as _walkeros_core from '@walkeros/core';
2
- import { WalkerOS, Destination as Destination$1, Mapping as Mapping$2, z } from '@walkeros/core';
1
+ import { WalkerOS, Destination as Destination$1, Mapping as Mapping$1 } from '@walkeros/core';
3
2
  import { DestinationWeb } from '@walkeros/web-core';
4
3
 
5
4
  declare global {
@@ -12,10 +11,10 @@ declare global {
12
11
  type Plausible = (event: string, options?: {
13
12
  props?: WalkerOS.AnyObject;
14
13
  }) => void;
15
- interface Settings$1 {
14
+ interface Settings {
16
15
  domain?: string;
17
16
  }
18
- interface Mapping$1 {
17
+ interface Mapping {
19
18
  }
20
19
  interface Env extends DestinationWeb.Env {
21
20
  window: {
@@ -24,95 +23,29 @@ interface Env extends DestinationWeb.Env {
24
23
  };
25
24
  };
26
25
  }
27
- type Types = Destination$1.Types<Settings$1, Mapping$1, Env>;
26
+ type Types = Destination$1.Types<Settings, Mapping, Env>;
28
27
  type Destination = DestinationWeb.Destination<Types>;
29
28
  type Config = DestinationWeb.Config<Types>;
30
29
  interface PlausibleDestination extends Destination {
31
30
  env?: Env;
32
31
  }
33
- type Rule = Mapping$2.Rule<Mapping$1>;
34
- type Rules = Mapping$2.Rules<Rule>;
35
-
36
- type index$2_Config = Config;
37
- type index$2_Destination = Destination;
38
- type index$2_Env = Env;
39
- type index$2_Plausible = Plausible;
40
- type index$2_PlausibleDestination = PlausibleDestination;
41
- type index$2_Rule = Rule;
42
- type index$2_Rules = Rules;
43
- type index$2_Types = Types;
44
- declare namespace index$2 {
45
- export type { index$2_Config as Config, index$2_Destination as Destination, index$2_Env as Env, Mapping$1 as Mapping, index$2_Plausible as Plausible, index$2_PlausibleDestination as PlausibleDestination, index$2_Rule as Rule, index$2_Rules as Rules, Settings$1 as Settings, index$2_Types as Types };
46
- }
47
-
48
- declare const init: Env | undefined;
49
- declare const push: Env;
50
-
51
- declare const env_init: typeof init;
52
- declare const env_push: typeof push;
53
- declare namespace env {
54
- export { env_init as init, env_push as push };
55
- }
56
-
57
- declare function purchase$1(): unknown[];
58
- declare function customEvent$1(): unknown[];
59
-
60
- declare namespace events {
61
- export { customEvent$1 as customEvent, purchase$1 as purchase };
62
- }
63
-
64
- declare const customEvent: Rule;
65
- declare const purchase: Rule;
66
- declare const config: {
67
- entity: {
68
- action: Rule;
69
- };
70
- order: {
71
- complete: Rule;
72
- };
73
- };
74
-
75
- declare const mapping$1_config: typeof config;
76
- declare const mapping$1_customEvent: typeof customEvent;
77
- declare const mapping$1_purchase: typeof purchase;
78
- declare namespace mapping$1 {
79
- export { mapping$1_config as config, mapping$1_customEvent as customEvent, mapping$1_purchase as purchase };
80
- }
81
-
82
- declare const index$1_env: typeof env;
83
- declare const index$1_events: typeof events;
84
- declare namespace index$1 {
85
- export { index$1_env as env, index$1_events as events, mapping$1 as mapping };
86
- }
87
-
88
- declare const SettingsSchema: z.ZodObject<{
89
- domain: z.ZodOptional<z.ZodString>;
90
- }, z.core.$strip>;
91
- type Settings = z.infer<typeof SettingsSchema>;
92
-
93
- /**
94
- * Plausible Mapping Schema
95
- * Plausible has no event-level mapping configuration
96
- */
97
- declare const MappingSchema: z.ZodObject<{}, z.core.$strip>;
98
- /**
99
- * Type inference from MappingSchema
100
- */
101
- type Mapping = z.infer<typeof MappingSchema>;
102
-
103
- declare const settings: _walkeros_core.JSONSchema;
104
- declare const mapping: _walkeros_core.JSONSchema;
32
+ type Rule = Mapping$1.Rule<Mapping>;
33
+ type Rules = Mapping$1.Rules<Rule>;
105
34
 
35
+ type index_Config = Config;
36
+ type index_Destination = Destination;
37
+ type index_Env = Env;
106
38
  type index_Mapping = Mapping;
107
- declare const index_MappingSchema: typeof MappingSchema;
39
+ type index_Plausible = Plausible;
40
+ type index_PlausibleDestination = PlausibleDestination;
41
+ type index_Rule = Rule;
42
+ type index_Rules = Rules;
108
43
  type index_Settings = Settings;
109
- declare const index_SettingsSchema: typeof SettingsSchema;
110
- declare const index_mapping: typeof mapping;
111
- declare const index_settings: typeof settings;
44
+ type index_Types = Types;
112
45
  declare namespace index {
113
- export { type index_Mapping as Mapping, index_MappingSchema as MappingSchema, type index_Settings as Settings, index_SettingsSchema as SettingsSchema, index_mapping as mapping, index_settings as settings };
46
+ export type { index_Config as Config, index_Destination as Destination, index_Env as Env, index_Mapping as Mapping, index_Plausible as Plausible, index_PlausibleDestination as PlausibleDestination, index_Rule as Rule, index_Rules as Rules, index_Settings as Settings, index_Types as Types };
114
47
  }
115
48
 
116
49
  declare const destinationPlausible: Destination;
117
50
 
118
- export { index$2 as DestinationPlausible, destinationPlausible as default, destinationPlausible, index$1 as examples, index as schemas };
51
+ export { index as DestinationPlausible, destinationPlausible as default, destinationPlausible };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import * as _walkeros_core from '@walkeros/core';
2
- import { WalkerOS, Destination as Destination$1, Mapping as Mapping$2, z } from '@walkeros/core';
1
+ import { WalkerOS, Destination as Destination$1, Mapping as Mapping$1 } from '@walkeros/core';
3
2
  import { DestinationWeb } from '@walkeros/web-core';
4
3
 
5
4
  declare global {
@@ -12,10 +11,10 @@ declare global {
12
11
  type Plausible = (event: string, options?: {
13
12
  props?: WalkerOS.AnyObject;
14
13
  }) => void;
15
- interface Settings$1 {
14
+ interface Settings {
16
15
  domain?: string;
17
16
  }
18
- interface Mapping$1 {
17
+ interface Mapping {
19
18
  }
20
19
  interface Env extends DestinationWeb.Env {
21
20
  window: {
@@ -24,95 +23,29 @@ interface Env extends DestinationWeb.Env {
24
23
  };
25
24
  };
26
25
  }
27
- type Types = Destination$1.Types<Settings$1, Mapping$1, Env>;
26
+ type Types = Destination$1.Types<Settings, Mapping, Env>;
28
27
  type Destination = DestinationWeb.Destination<Types>;
29
28
  type Config = DestinationWeb.Config<Types>;
30
29
  interface PlausibleDestination extends Destination {
31
30
  env?: Env;
32
31
  }
33
- type Rule = Mapping$2.Rule<Mapping$1>;
34
- type Rules = Mapping$2.Rules<Rule>;
35
-
36
- type index$2_Config = Config;
37
- type index$2_Destination = Destination;
38
- type index$2_Env = Env;
39
- type index$2_Plausible = Plausible;
40
- type index$2_PlausibleDestination = PlausibleDestination;
41
- type index$2_Rule = Rule;
42
- type index$2_Rules = Rules;
43
- type index$2_Types = Types;
44
- declare namespace index$2 {
45
- export type { index$2_Config as Config, index$2_Destination as Destination, index$2_Env as Env, Mapping$1 as Mapping, index$2_Plausible as Plausible, index$2_PlausibleDestination as PlausibleDestination, index$2_Rule as Rule, index$2_Rules as Rules, Settings$1 as Settings, index$2_Types as Types };
46
- }
47
-
48
- declare const init: Env | undefined;
49
- declare const push: Env;
50
-
51
- declare const env_init: typeof init;
52
- declare const env_push: typeof push;
53
- declare namespace env {
54
- export { env_init as init, env_push as push };
55
- }
56
-
57
- declare function purchase$1(): unknown[];
58
- declare function customEvent$1(): unknown[];
59
-
60
- declare namespace events {
61
- export { customEvent$1 as customEvent, purchase$1 as purchase };
62
- }
63
-
64
- declare const customEvent: Rule;
65
- declare const purchase: Rule;
66
- declare const config: {
67
- entity: {
68
- action: Rule;
69
- };
70
- order: {
71
- complete: Rule;
72
- };
73
- };
74
-
75
- declare const mapping$1_config: typeof config;
76
- declare const mapping$1_customEvent: typeof customEvent;
77
- declare const mapping$1_purchase: typeof purchase;
78
- declare namespace mapping$1 {
79
- export { mapping$1_config as config, mapping$1_customEvent as customEvent, mapping$1_purchase as purchase };
80
- }
81
-
82
- declare const index$1_env: typeof env;
83
- declare const index$1_events: typeof events;
84
- declare namespace index$1 {
85
- export { index$1_env as env, index$1_events as events, mapping$1 as mapping };
86
- }
87
-
88
- declare const SettingsSchema: z.ZodObject<{
89
- domain: z.ZodOptional<z.ZodString>;
90
- }, z.core.$strip>;
91
- type Settings = z.infer<typeof SettingsSchema>;
92
-
93
- /**
94
- * Plausible Mapping Schema
95
- * Plausible has no event-level mapping configuration
96
- */
97
- declare const MappingSchema: z.ZodObject<{}, z.core.$strip>;
98
- /**
99
- * Type inference from MappingSchema
100
- */
101
- type Mapping = z.infer<typeof MappingSchema>;
102
-
103
- declare const settings: _walkeros_core.JSONSchema;
104
- declare const mapping: _walkeros_core.JSONSchema;
32
+ type Rule = Mapping$1.Rule<Mapping>;
33
+ type Rules = Mapping$1.Rules<Rule>;
105
34
 
35
+ type index_Config = Config;
36
+ type index_Destination = Destination;
37
+ type index_Env = Env;
106
38
  type index_Mapping = Mapping;
107
- declare const index_MappingSchema: typeof MappingSchema;
39
+ type index_Plausible = Plausible;
40
+ type index_PlausibleDestination = PlausibleDestination;
41
+ type index_Rule = Rule;
42
+ type index_Rules = Rules;
108
43
  type index_Settings = Settings;
109
- declare const index_SettingsSchema: typeof SettingsSchema;
110
- declare const index_mapping: typeof mapping;
111
- declare const index_settings: typeof settings;
44
+ type index_Types = Types;
112
45
  declare namespace index {
113
- export { type index_Mapping as Mapping, index_MappingSchema as MappingSchema, type index_Settings as Settings, index_SettingsSchema as SettingsSchema, index_mapping as mapping, index_settings as settings };
46
+ export type { index_Config as Config, index_Destination as Destination, index_Env as Env, index_Mapping as Mapping, index_Plausible as Plausible, index_PlausibleDestination as PlausibleDestination, index_Rule as Rule, index_Rules as Rules, index_Settings as Settings, index_Types as Types };
114
47
  }
115
48
 
116
49
  declare const destinationPlausible: Destination;
117
50
 
118
- export { index$2 as DestinationPlausible, destinationPlausible as default, destinationPlausible, index$1 as examples, index as schemas };
51
+ export { index as DestinationPlausible, destinationPlausible as default, destinationPlausible };