@walkeros/web-source-browser 0.3.2 → 0.4.1

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,22 +1,7 @@
1
1
  import * as _walkeros_core from '@walkeros/core';
2
- import { z, Elb, WalkerOS, Collector, Source } from '@walkeros/core';
2
+ import { Elb, WalkerOS, Collector, Source } from '@walkeros/core';
3
3
  import { DestinationWeb, SessionConfig, SessionCallback, Walker } from '@walkeros/web-core';
4
-
5
- /**
6
- * Data attribute prefix
7
- * Used for DOM event tracking
8
- */
9
- declare const DataAttributePrefix: z.ZodString;
10
- /**
11
- * JavaScript variable name
12
- * Used for global function names
13
- */
14
- declare const JavaScriptVarName: z.ZodString;
15
- /**
16
- * DOM scope selector
17
- * Note: Runtime type is Element | Document (non-serializable)
18
- */
19
- declare const ScopeSelector: z.ZodOptional<z.ZodString>;
4
+ import { z } from '@walkeros/core/dev';
20
5
 
21
6
  /**
22
7
  * Browser source settings schema
@@ -30,30 +15,6 @@ declare const SettingsSchema: z.ZodObject<{
30
15
  name: z.ZodOptional<z.ZodString>;
31
16
  elbLayer: z.ZodDefault<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString, z.ZodAny]>>;
32
17
  }, z.core.$strip>;
33
- type Settings$1 = z.infer<typeof SettingsSchema>;
34
-
35
- /**
36
- * Tagger configuration schema
37
- * Used for automatic data attribute generation
38
- */
39
- declare const TaggerSchema: z.ZodObject<{
40
- prefix: z.ZodDefault<z.ZodString>;
41
- }, z.core.$strip>;
42
- type TaggerConfig$1 = z.infer<typeof TaggerSchema>;
43
-
44
- declare const settings: _walkeros_core.JSONSchema;
45
- declare const tagger: _walkeros_core.JSONSchema;
46
-
47
- declare const index$2_DataAttributePrefix: typeof DataAttributePrefix;
48
- declare const index$2_JavaScriptVarName: typeof JavaScriptVarName;
49
- declare const index$2_ScopeSelector: typeof ScopeSelector;
50
- declare const index$2_SettingsSchema: typeof SettingsSchema;
51
- declare const index$2_TaggerSchema: typeof TaggerSchema;
52
- declare const index$2_settings: typeof settings;
53
- declare const index$2_tagger: typeof tagger;
54
- declare namespace index$2 {
55
- export { index$2_DataAttributePrefix as DataAttributePrefix, index$2_JavaScriptVarName as JavaScriptVarName, index$2_ScopeSelector as ScopeSelector, type Settings$1 as Settings, index$2_SettingsSchema as SettingsSchema, type TaggerConfig$1 as TaggerConfig, index$2_TaggerSchema as TaggerSchema, index$2_settings as settings, index$2_tagger as tagger };
56
- }
57
18
 
58
19
  type Scope$1 = Element | Document;
59
20
  type Trigger = string;
@@ -98,7 +59,8 @@ interface Env extends Source.BaseEnv {
98
59
  window?: Window & typeof globalThis;
99
60
  document?: Document;
100
61
  }
101
- type Types = Source.Types<Settings, Mapping, Push, Env>;
62
+ type Types = Source.Types<Settings, Mapping, Push, Env, InitSettings>;
63
+ type Config = Source.Config<Types>;
102
64
  interface Context {
103
65
  elb: Elb.Fn;
104
66
  settings: Settings;
@@ -119,6 +81,7 @@ type index$1_BrowserPushOptions = BrowserPushOptions;
119
81
  type index$1_CommandDestination<R = Promise<Elb.PushResult>> = CommandDestination<R>;
120
82
  type index$1_CommandInit<R = Promise<Elb.PushResult>> = CommandInit<R>;
121
83
  type index$1_CommandRun<R = Promise<Elb.PushResult>> = CommandRun<R>;
84
+ type index$1_Config = Config;
122
85
  type index$1_Context = Context;
123
86
  type index$1_ELBLayer = ELBLayer;
124
87
  type index$1_ELBLayerConfig = ELBLayerConfig;
@@ -135,7 +98,7 @@ type index$1_Settings = Settings;
135
98
  type index$1_Trigger = Trigger;
136
99
  type index$1_Types = Types;
137
100
  declare namespace index$1 {
138
- export { type index$1_BrowserArguments as BrowserArguments, type index$1_BrowserCommands as BrowserCommands, type index$1_BrowserPush as BrowserPush, type index$1_BrowserPushContext as BrowserPushContext, type index$1_BrowserPushData as BrowserPushData, type index$1_BrowserPushOptions as BrowserPushOptions, type index$1_CommandDestination as CommandDestination, type index$1_CommandInit as CommandInit, type index$1_CommandRun as CommandRun, type index$1_Context as Context, type index$1_ELBLayer as ELBLayer, type index$1_ELBLayerConfig as ELBLayerConfig, type index$1_Env as Env, type index$1_InitSettings as InitSettings, type index$1_Layer as Layer, type index$1_Mapping as Mapping, type index$1_Push as Push, type index$1_PushResult as PushResult, type index$1_Scope as Scope, index$1_SessionCallback as SessionCallback, index$1_SessionConfig as SessionConfig, type index$1_Settings as Settings, type index$1_Trigger as Trigger, type index$1_Types as Types };
101
+ export { type index$1_BrowserArguments as BrowserArguments, type index$1_BrowserCommands as BrowserCommands, type index$1_BrowserPush as BrowserPush, type index$1_BrowserPushContext as BrowserPushContext, type index$1_BrowserPushData as BrowserPushData, type index$1_BrowserPushOptions as BrowserPushOptions, type index$1_CommandDestination as CommandDestination, type index$1_CommandInit as CommandInit, type index$1_CommandRun as CommandRun, type index$1_Config as Config, type index$1_Context as Context, type index$1_ELBLayer as ELBLayer, type index$1_ELBLayerConfig as ELBLayerConfig, type index$1_Env as Env, type index$1_InitSettings as InitSettings, type index$1_Layer as Layer, type index$1_Mapping as Mapping, type index$1_Push as Push, type index$1_PushResult as PushResult, type index$1_Scope as Scope, index$1_SessionCallback as SessionCallback, index$1_SessionConfig as SessionConfig, type index$1_Settings as Settings, type index$1_Trigger as Trigger, type index$1_Types as Types };
139
102
  }
140
103
 
141
104
  /**
@@ -191,4 +154,4 @@ declare function createTagger(config?: TaggerConfig): (entity?: string) => Tagge
191
154
  */
192
155
  declare const sourceBrowser: Source.Init<Types>;
193
156
 
194
- export { index$1 as SourceBrowser, type TaggerConfig, type TaggerInstance, createTagger, sourceBrowser as default, index as examples, getAllEvents, getElbAttributeName, getElbValues, getEvents, getGlobals, index$2 as schemas, sourceBrowser };
157
+ export { index$1 as SourceBrowser, type TaggerConfig, type TaggerInstance, createTagger, sourceBrowser as default, index as examples, getAllEvents, getElbAttributeName, getElbValues, getEvents, getGlobals, sourceBrowser };
package/dist/index.d.ts CHANGED
@@ -1,22 +1,7 @@
1
1
  import * as _walkeros_core from '@walkeros/core';
2
- import { z, Elb, WalkerOS, Collector, Source } from '@walkeros/core';
2
+ import { Elb, WalkerOS, Collector, Source } from '@walkeros/core';
3
3
  import { DestinationWeb, SessionConfig, SessionCallback, Walker } from '@walkeros/web-core';
4
-
5
- /**
6
- * Data attribute prefix
7
- * Used for DOM event tracking
8
- */
9
- declare const DataAttributePrefix: z.ZodString;
10
- /**
11
- * JavaScript variable name
12
- * Used for global function names
13
- */
14
- declare const JavaScriptVarName: z.ZodString;
15
- /**
16
- * DOM scope selector
17
- * Note: Runtime type is Element | Document (non-serializable)
18
- */
19
- declare const ScopeSelector: z.ZodOptional<z.ZodString>;
4
+ import { z } from '@walkeros/core/dev';
20
5
 
21
6
  /**
22
7
  * Browser source settings schema
@@ -30,30 +15,6 @@ declare const SettingsSchema: z.ZodObject<{
30
15
  name: z.ZodOptional<z.ZodString>;
31
16
  elbLayer: z.ZodDefault<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString, z.ZodAny]>>;
32
17
  }, z.core.$strip>;
33
- type Settings$1 = z.infer<typeof SettingsSchema>;
34
-
35
- /**
36
- * Tagger configuration schema
37
- * Used for automatic data attribute generation
38
- */
39
- declare const TaggerSchema: z.ZodObject<{
40
- prefix: z.ZodDefault<z.ZodString>;
41
- }, z.core.$strip>;
42
- type TaggerConfig$1 = z.infer<typeof TaggerSchema>;
43
-
44
- declare const settings: _walkeros_core.JSONSchema;
45
- declare const tagger: _walkeros_core.JSONSchema;
46
-
47
- declare const index$2_DataAttributePrefix: typeof DataAttributePrefix;
48
- declare const index$2_JavaScriptVarName: typeof JavaScriptVarName;
49
- declare const index$2_ScopeSelector: typeof ScopeSelector;
50
- declare const index$2_SettingsSchema: typeof SettingsSchema;
51
- declare const index$2_TaggerSchema: typeof TaggerSchema;
52
- declare const index$2_settings: typeof settings;
53
- declare const index$2_tagger: typeof tagger;
54
- declare namespace index$2 {
55
- export { index$2_DataAttributePrefix as DataAttributePrefix, index$2_JavaScriptVarName as JavaScriptVarName, index$2_ScopeSelector as ScopeSelector, type Settings$1 as Settings, index$2_SettingsSchema as SettingsSchema, type TaggerConfig$1 as TaggerConfig, index$2_TaggerSchema as TaggerSchema, index$2_settings as settings, index$2_tagger as tagger };
56
- }
57
18
 
58
19
  type Scope$1 = Element | Document;
59
20
  type Trigger = string;
@@ -98,7 +59,8 @@ interface Env extends Source.BaseEnv {
98
59
  window?: Window & typeof globalThis;
99
60
  document?: Document;
100
61
  }
101
- type Types = Source.Types<Settings, Mapping, Push, Env>;
62
+ type Types = Source.Types<Settings, Mapping, Push, Env, InitSettings>;
63
+ type Config = Source.Config<Types>;
102
64
  interface Context {
103
65
  elb: Elb.Fn;
104
66
  settings: Settings;
@@ -119,6 +81,7 @@ type index$1_BrowserPushOptions = BrowserPushOptions;
119
81
  type index$1_CommandDestination<R = Promise<Elb.PushResult>> = CommandDestination<R>;
120
82
  type index$1_CommandInit<R = Promise<Elb.PushResult>> = CommandInit<R>;
121
83
  type index$1_CommandRun<R = Promise<Elb.PushResult>> = CommandRun<R>;
84
+ type index$1_Config = Config;
122
85
  type index$1_Context = Context;
123
86
  type index$1_ELBLayer = ELBLayer;
124
87
  type index$1_ELBLayerConfig = ELBLayerConfig;
@@ -135,7 +98,7 @@ type index$1_Settings = Settings;
135
98
  type index$1_Trigger = Trigger;
136
99
  type index$1_Types = Types;
137
100
  declare namespace index$1 {
138
- export { type index$1_BrowserArguments as BrowserArguments, type index$1_BrowserCommands as BrowserCommands, type index$1_BrowserPush as BrowserPush, type index$1_BrowserPushContext as BrowserPushContext, type index$1_BrowserPushData as BrowserPushData, type index$1_BrowserPushOptions as BrowserPushOptions, type index$1_CommandDestination as CommandDestination, type index$1_CommandInit as CommandInit, type index$1_CommandRun as CommandRun, type index$1_Context as Context, type index$1_ELBLayer as ELBLayer, type index$1_ELBLayerConfig as ELBLayerConfig, type index$1_Env as Env, type index$1_InitSettings as InitSettings, type index$1_Layer as Layer, type index$1_Mapping as Mapping, type index$1_Push as Push, type index$1_PushResult as PushResult, type index$1_Scope as Scope, index$1_SessionCallback as SessionCallback, index$1_SessionConfig as SessionConfig, type index$1_Settings as Settings, type index$1_Trigger as Trigger, type index$1_Types as Types };
101
+ export { type index$1_BrowserArguments as BrowserArguments, type index$1_BrowserCommands as BrowserCommands, type index$1_BrowserPush as BrowserPush, type index$1_BrowserPushContext as BrowserPushContext, type index$1_BrowserPushData as BrowserPushData, type index$1_BrowserPushOptions as BrowserPushOptions, type index$1_CommandDestination as CommandDestination, type index$1_CommandInit as CommandInit, type index$1_CommandRun as CommandRun, type index$1_Config as Config, type index$1_Context as Context, type index$1_ELBLayer as ELBLayer, type index$1_ELBLayerConfig as ELBLayerConfig, type index$1_Env as Env, type index$1_InitSettings as InitSettings, type index$1_Layer as Layer, type index$1_Mapping as Mapping, type index$1_Push as Push, type index$1_PushResult as PushResult, type index$1_Scope as Scope, index$1_SessionCallback as SessionCallback, index$1_SessionConfig as SessionConfig, type index$1_Settings as Settings, type index$1_Trigger as Trigger, type index$1_Types as Types };
139
102
  }
140
103
 
141
104
  /**
@@ -191,4 +154,4 @@ declare function createTagger(config?: TaggerConfig): (entity?: string) => Tagge
191
154
  */
192
155
  declare const sourceBrowser: Source.Init<Types>;
193
156
 
194
- export { index$1 as SourceBrowser, type TaggerConfig, type TaggerInstance, createTagger, sourceBrowser as default, index as examples, getAllEvents, getElbAttributeName, getElbValues, getEvents, getGlobals, index$2 as schemas, sourceBrowser };
157
+ export { index$1 as SourceBrowser, type TaggerConfig, type TaggerInstance, createTagger, sourceBrowser as default, index as examples, getAllEvents, getElbAttributeName, getElbValues, getEvents, getGlobals, sourceBrowser };