@walkeros/explorer 1.0.1 → 2.0.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.
Files changed (154) hide show
  1. package/LICENSE +2 -2
  2. package/dist/{chunk-VWWAIDNX.mjs → chunk-YKT4D7MG.mjs} +201 -53
  3. package/dist/chunk-YKT4D7MG.mjs.map +1 -0
  4. package/dist/components/atoms/alert.d.ts +29 -0
  5. package/dist/components/atoms/alert.d.ts.map +1 -0
  6. package/dist/components/atoms/alert.js +19 -0
  7. package/dist/components/atoms/alert.js.map +1 -0
  8. package/dist/components/atoms/alert.stories.d.ts +7 -0
  9. package/dist/components/atoms/alert.stories.d.ts.map +1 -0
  10. package/dist/components/atoms/alert.stories.js +14 -0
  11. package/dist/components/atoms/alert.stories.js.map +1 -0
  12. package/dist/components/atoms/button.stories.d.ts +14 -0
  13. package/dist/components/atoms/button.stories.d.ts.map +1 -0
  14. package/dist/components/atoms/button.stories.js +25 -0
  15. package/dist/components/atoms/button.stories.js.map +1 -0
  16. package/dist/components/atoms/code.d.ts.map +1 -1
  17. package/dist/components/atoms/code.js +14 -2
  18. package/dist/components/atoms/code.js.map +1 -1
  19. package/dist/components/atoms/footer.stories.d.ts +14 -0
  20. package/dist/components/atoms/footer.stories.d.ts.map +1 -0
  21. package/dist/components/atoms/footer.stories.js +29 -0
  22. package/dist/components/atoms/footer.stories.js.map +1 -0
  23. package/dist/components/atoms/form-field.d.ts +28 -0
  24. package/dist/components/atoms/form-field.d.ts.map +1 -0
  25. package/dist/components/atoms/form-field.js +16 -0
  26. package/dist/components/atoms/form-field.js.map +1 -0
  27. package/dist/components/atoms/form-field.stories.d.ts +7 -0
  28. package/dist/components/atoms/form-field.stories.d.ts.map +1 -0
  29. package/dist/components/atoms/form-field.stories.js +16 -0
  30. package/dist/components/atoms/form-field.stories.js.map +1 -0
  31. package/dist/components/atoms/form-input.d.ts +43 -0
  32. package/dist/components/atoms/form-input.d.ts.map +1 -0
  33. package/dist/components/atoms/form-input.js +26 -0
  34. package/dist/components/atoms/form-input.js.map +1 -0
  35. package/dist/components/atoms/form-input.stories.d.ts +7 -0
  36. package/dist/components/atoms/form-input.stories.d.ts.map +1 -0
  37. package/dist/components/atoms/form-input.stories.js +17 -0
  38. package/dist/components/atoms/form-input.stories.js.map +1 -0
  39. package/dist/components/atoms/form-textarea.d.ts +41 -0
  40. package/dist/components/atoms/form-textarea.d.ts.map +1 -0
  41. package/dist/components/atoms/form-textarea.js +26 -0
  42. package/dist/components/atoms/form-textarea.js.map +1 -0
  43. package/dist/components/atoms/form-textarea.stories.d.ts +7 -0
  44. package/dist/components/atoms/form-textarea.stories.d.ts.map +1 -0
  45. package/dist/components/atoms/form-textarea.stories.js +17 -0
  46. package/dist/components/atoms/form-textarea.stories.js.map +1 -0
  47. package/dist/components/atoms/grid.stories.d.ts +18 -0
  48. package/dist/components/atoms/grid.stories.d.ts.map +1 -0
  49. package/dist/components/atoms/grid.stories.js +60 -0
  50. package/dist/components/atoms/grid.stories.js.map +1 -0
  51. package/dist/components/atoms/header.stories.d.ts +15 -0
  52. package/dist/components/atoms/header.stories.d.ts.map +1 -0
  53. package/dist/components/atoms/header.stories.js +37 -0
  54. package/dist/components/atoms/header.stories.js.map +1 -0
  55. package/dist/components/atoms/icons/icon.stories.d.ts +18 -0
  56. package/dist/components/atoms/icons/icon.stories.d.ts.map +1 -0
  57. package/dist/components/atoms/icons/icon.stories.js +37 -0
  58. package/dist/components/atoms/icons/icon.stories.js.map +1 -0
  59. package/dist/components/atoms/panel-hints.stories.d.ts +14 -0
  60. package/dist/components/atoms/panel-hints.stories.d.ts.map +1 -0
  61. package/dist/components/atoms/panel-hints.stories.js +35 -0
  62. package/dist/components/atoms/panel-hints.stories.js.map +1 -0
  63. package/dist/components/atoms/spinner.d.ts +17 -0
  64. package/dist/components/atoms/spinner.d.ts.map +1 -0
  65. package/dist/components/atoms/spinner.js +14 -0
  66. package/dist/components/atoms/spinner.js.map +1 -0
  67. package/dist/components/atoms/spinner.stories.d.ts +7 -0
  68. package/dist/components/atoms/spinner.stories.d.ts.map +1 -0
  69. package/dist/components/atoms/spinner.stories.js +9 -0
  70. package/dist/components/atoms/spinner.stories.js.map +1 -0
  71. package/dist/components/atoms/submit-button.d.ts +34 -0
  72. package/dist/components/atoms/submit-button.d.ts.map +1 -0
  73. package/dist/components/atoms/submit-button.js +18 -0
  74. package/dist/components/atoms/submit-button.js.map +1 -0
  75. package/dist/components/atoms/submit-button.stories.d.ts +7 -0
  76. package/dist/components/atoms/submit-button.stories.d.ts.map +1 -0
  77. package/dist/components/atoms/submit-button.stories.js +13 -0
  78. package/dist/components/atoms/submit-button.stories.js.map +1 -0
  79. package/dist/components/molecules/architecture-flow/ArchitectureFlow.stories.js +1 -1
  80. package/dist/components/molecules/architecture-flow/ArchitectureFlow.stories.js.map +1 -1
  81. package/dist/components/molecules/code-box.stories.d.ts +8 -0
  82. package/dist/components/molecules/code-box.stories.d.ts.map +1 -1
  83. package/dist/components/molecules/code-box.stories.js +36 -0
  84. package/dist/components/molecules/code-box.stories.js.map +1 -1
  85. package/dist/components/molecules/config-form-card.d.ts +50 -0
  86. package/dist/components/molecules/config-form-card.d.ts.map +1 -0
  87. package/dist/components/molecules/config-form-card.js +30 -0
  88. package/dist/components/molecules/config-form-card.js.map +1 -0
  89. package/dist/components/molecules/config-form-card.stories.d.ts +7 -0
  90. package/dist/components/molecules/config-form-card.stories.d.ts.map +1 -0
  91. package/dist/components/molecules/config-form-card.stories.js +21 -0
  92. package/dist/components/molecules/config-form-card.stories.js.map +1 -0
  93. package/dist/components/molecules/dropdown.d.ts +68 -0
  94. package/dist/components/molecules/dropdown.d.ts.map +1 -0
  95. package/dist/components/molecules/dropdown.js +47 -0
  96. package/dist/components/molecules/dropdown.js.map +1 -0
  97. package/dist/components/molecules/dropdown.stories.d.ts +7 -0
  98. package/dist/components/molecules/dropdown.stories.d.ts.map +1 -0
  99. package/dist/components/molecules/dropdown.stories.js +18 -0
  100. package/dist/components/molecules/dropdown.stories.js.map +1 -0
  101. package/dist/components/molecules/flow-deploy-panel.d.ts +31 -0
  102. package/dist/components/molecules/flow-deploy-panel.d.ts.map +1 -0
  103. package/dist/components/molecules/flow-deploy-panel.js +72 -0
  104. package/dist/components/molecules/flow-deploy-panel.js.map +1 -0
  105. package/dist/components/molecules/flow-deploy-panel.stories.d.ts +40 -0
  106. package/dist/components/molecules/flow-deploy-panel.stories.d.ts.map +1 -0
  107. package/dist/components/molecules/flow-deploy-panel.stories.js +145 -0
  108. package/dist/components/molecules/flow-deploy-panel.stories.js.map +1 -0
  109. package/dist/components/molecules/flow-map/FlowMap.stories.d.ts.map +1 -1
  110. package/dist/components/molecules/flow-map/FlowMap.stories.js +7 -1
  111. package/dist/components/molecules/flow-map/FlowMap.stories.js.map +1 -1
  112. package/dist/components/molecules/flow-selector.d.ts +19 -0
  113. package/dist/components/molecules/flow-selector.d.ts.map +1 -0
  114. package/dist/components/molecules/flow-selector.js +26 -0
  115. package/dist/components/molecules/flow-selector.js.map +1 -0
  116. package/dist/components/molecules/flow-selector.stories.d.ts +28 -0
  117. package/dist/components/molecules/flow-selector.stories.d.ts.map +1 -0
  118. package/dist/components/molecules/flow-selector.stories.js +66 -0
  119. package/dist/components/molecules/flow-selector.stories.js.map +1 -0
  120. package/dist/components/molecules/form-card.d.ts +28 -0
  121. package/dist/components/molecules/form-card.d.ts.map +1 -0
  122. package/dist/components/molecules/form-card.js +16 -0
  123. package/dist/components/molecules/form-card.js.map +1 -0
  124. package/dist/components/molecules/form-card.stories.d.ts +7 -0
  125. package/dist/components/molecules/form-card.stories.d.ts.map +1 -0
  126. package/dist/components/molecules/form-card.stories.js +16 -0
  127. package/dist/components/molecules/form-card.stories.js.map +1 -0
  128. package/dist/components/molecules/preview.d.ts.map +1 -1
  129. package/dist/components/molecules/preview.js +0 -1
  130. package/dist/components/molecules/preview.js.map +1 -1
  131. package/dist/components/molecules/split-button.d.ts +25 -0
  132. package/dist/components/molecules/split-button.d.ts.map +1 -0
  133. package/dist/components/molecules/split-button.js +37 -0
  134. package/dist/components/molecules/split-button.js.map +1 -0
  135. package/dist/components/molecules/split-button.stories.d.ts +32 -0
  136. package/dist/components/molecules/split-button.stories.d.ts.map +1 -0
  137. package/dist/components/molecules/split-button.stories.js +88 -0
  138. package/dist/components/molecules/split-button.stories.js.map +1 -0
  139. package/dist/hooks/useDropdown.d.ts +34 -0
  140. package/dist/hooks/useDropdown.d.ts.map +1 -0
  141. package/dist/hooks/useDropdown.js +66 -0
  142. package/dist/hooks/useDropdown.js.map +1 -0
  143. package/dist/index.d.cts +441 -2
  144. package/dist/index.d.ts +26 -0
  145. package/dist/index.d.ts.map +1 -1
  146. package/dist/index.js +14 -0
  147. package/dist/index.js.map +1 -1
  148. package/dist/index.mjs +663 -28
  149. package/dist/index.mjs.map +1 -1
  150. package/dist/{monaco-types-4FIH5OVX.mjs → monaco-types-OLSF6MIE.mjs} +2 -2
  151. package/dist/styles.css +579 -0
  152. package/package.json +5 -14
  153. package/dist/chunk-VWWAIDNX.mjs.map +0 -1
  154. /package/dist/{monaco-types-4FIH5OVX.mjs.map → monaco-types-OLSF6MIE.mjs.map} +0 -0
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  # walkerOS Explorer License Agreement
2
2
 
3
- Copyright (c) 2025 elbwalker GmbH.
3
+ Copyright (c) 2026 elbwalker GmbH.
4
4
  All rights reserved.
5
5
 
6
6
  The walkerOS Explorer software package and associated files (the “Software”) are
@@ -39,4 +39,4 @@ FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT.
39
39
  ## Contact
40
40
 
41
41
  To obtain a commercial license, please contact:
42
- [hello@walkeros.com](mailto:hello@walkeros.com)
42
+ [hello@elbwalker.com](mailto:hello@elbwalker.com)
@@ -440,6 +440,25 @@ interface SessionData extends Properties {
440
440
  count?: number;
441
441
  runs?: number;
442
442
  }
443
+ interface Status {
444
+ startedAt: number;
445
+ in: number;
446
+ out: number;
447
+ failed: number;
448
+ sources: Record<string, SourceStatus>;
449
+ destinations: Record<string, DestinationStatus>;
450
+ }
451
+ interface SourceStatus {
452
+ count: number;
453
+ lastAt?: number;
454
+ duration: number;
455
+ }
456
+ interface DestinationStatus {
457
+ count: number;
458
+ failed: number;
459
+ lastAt?: number;
460
+ duration: number;
461
+ }
443
462
  interface Sources {
444
463
  [id: string]: Instance;
445
464
  }
@@ -449,15 +468,6 @@ interface Destinations$1 {
449
468
  interface Transformers$1 {
450
469
  [id: string]: Instance$1;
451
470
  }
452
- /**
453
- * Resolved transformer chains for a flow.
454
- */
455
- interface TransformerChain {
456
- /** Ordered transformer IDs to run before collector (from source.next) */
457
- pre: string[];
458
- /** Per-destination transformer chains (from destination.before) */
459
- post: Record<string, string[]>;
460
- }
461
471
  type CommandType = 'action' | 'config' | 'consent' | 'context' | 'destination' | 'elb' | 'globals' | 'hook' | 'init' | 'link' | 'run' | 'user' | 'walker' | string;
462
472
  /**
463
473
  * Options passed to collector.push() from sources.
@@ -504,7 +514,6 @@ interface Instance$4 {
504
514
  sources: Sources;
505
515
  destinations: Destinations$1;
506
516
  transformers: Transformers$1;
507
- transformerChain: TransformerChain;
508
517
  globals: Properties;
509
518
  group: string;
510
519
  hooks: Functions;
@@ -513,20 +522,27 @@ interface Instance$4 {
513
522
  queue: Events;
514
523
  round: number;
515
524
  session: undefined | SessionData;
525
+ status: Status;
516
526
  timing: number;
517
527
  user: User;
518
528
  version: string;
529
+ pending: {
530
+ sources: InitSources;
531
+ destinations: InitDestinations;
532
+ };
519
533
  }
520
534
 
521
535
  type collector_CommandFn = CommandFn;
522
536
  type collector_CommandType = CommandType;
537
+ type collector_DestinationStatus = DestinationStatus;
523
538
  type collector_InitConfig = InitConfig;
524
539
  type collector_PushOptions = PushOptions;
525
540
  type collector_SessionData = SessionData;
541
+ type collector_SourceStatus = SourceStatus;
526
542
  type collector_Sources = Sources;
527
- type collector_TransformerChain = TransformerChain;
543
+ type collector_Status = Status;
528
544
  declare namespace collector {
529
- export type { collector_CommandFn as CommandFn, collector_CommandType as CommandType, Config$7 as Config, Destinations$1 as Destinations, collector_InitConfig as InitConfig, Instance$4 as Instance, PushFn$1 as PushFn, collector_PushOptions as PushOptions, collector_SessionData as SessionData, collector_Sources as Sources, collector_TransformerChain as TransformerChain, Transformers$1 as Transformers };
545
+ export type { collector_CommandFn as CommandFn, collector_CommandType as CommandType, Config$7 as Config, collector_DestinationStatus as DestinationStatus, Destinations$1 as Destinations, collector_InitConfig as InitConfig, Instance$4 as Instance, PushFn$1 as PushFn, collector_PushOptions as PushOptions, collector_SessionData as SessionData, collector_SourceStatus as SourceStatus, collector_Sources as Sources, collector_Status as Status, Transformers$1 as Transformers };
530
546
  }
531
547
 
532
548
  /**
@@ -643,7 +659,11 @@ type Env$2<T extends TypesGeneric$2 = Types$3> = T['env'];
643
659
  type TypesOf$2<I> = I extends Instance$3<infer T> ? T : never;
644
660
  interface Instance$3<T extends TypesGeneric$2 = Types$3> {
645
661
  config: Config$6<T>;
646
- queue?: Events;
662
+ queuePush?: Events;
663
+ queueOn?: Array<{
664
+ type: Types$2;
665
+ data?: unknown;
666
+ }>;
647
667
  dlq?: DLQ;
648
668
  batches?: BatchRegistry<Mapping$1<T>>;
649
669
  type?: string;
@@ -654,27 +674,43 @@ interface Instance$3<T extends TypesGeneric$2 = Types$3> {
654
674
  on?: OnFn;
655
675
  }
656
676
  interface Config$6<T extends TypesGeneric$2 = Types$3> {
677
+ /** Required consent states to push events; queues events when not granted. */
657
678
  consent?: Consent;
679
+ /** Implementation-specific configuration passed to the init function. */
658
680
  settings?: InitSettings$2<T>;
681
+ /** Global data transformation applied to all events; result passed as context.data to push. */
659
682
  data?: Value | Values;
683
+ /** Runtime dependencies merged from code and config env; extensible per destination. */
660
684
  env?: Env$2<T>;
685
+ /** Destination identifier; auto-generated if not provided. */
661
686
  id?: string;
687
+ /** Whether the destination has been initialized; prevents re-initialization. */
662
688
  init?: boolean;
689
+ /** Whether to load external scripts (e.g., gtag.js); destination-specific behavior. */
663
690
  loadScript?: boolean;
691
+ /** Logger configuration (level, handler) to override the collector's defaults. */
664
692
  logger?: Config$4;
693
+ /** Entity-action rules to filter, rename, transform, and batch events for this destination. */
665
694
  mapping?: Rules<Rule<Mapping$1<T>>>;
695
+ /** Pre-processing rules applied to all events before mapping; modifies events in-place. */
666
696
  policy?: Policy$1;
697
+ /** Whether to queue events when consent is not granted; defaults to true. */
667
698
  queue?: boolean;
699
+ /** Defer destination initialization until these collector events fire (e.g., \`['consent']\`). */
700
+ require?: string[];
701
+ /** Transformer chain to run after collector processing but before this destination. */
702
+ before?: string | string[];
668
703
  }
669
704
  type PartialConfig$1<T extends TypesGeneric$2 = Types$3> = Config$6<Types$3<Partial<Settings$2<T>> | Settings$2<T>, Partial<Mapping$1<T>> | Mapping$1<T>, Env$2<T>>>;
670
705
  interface Policy$1 {
671
706
  [key: string]: Value;
672
707
  }
673
- type Code<T extends TypesGeneric$2 = Types$3> = Instance$3<T> | true;
708
+ type Code<T extends TypesGeneric$2 = Types$3> = Instance$3<T>;
674
709
  type Init$2<T extends TypesGeneric$2 = Types$3> = {
675
710
  code: Code<T>;
676
711
  config?: Partial<Config$6<T>>;
677
712
  env?: Partial<Env$2<T>>;
713
+ before?: string | string[];
678
714
  };
679
715
  interface InitDestinations {
680
716
  [key: string]: Init$2<any>;
@@ -725,7 +761,7 @@ interface Ref {
725
761
  error?: unknown;
726
762
  }
727
763
  type Push$1 = {
728
- queue?: Events;
764
+ queuePush?: Events;
729
765
  error?: unknown;
730
766
  };
731
767
  type DLQ = Array<[Event, unknown]>;
@@ -816,6 +852,15 @@ type Variables = Record<string, Primitive>;
816
852
  * Used at Setup, Config, Source, and Destination levels.
817
853
  */
818
854
  type Definitions = Record<string, unknown>;
855
+ /**
856
+ * Inline code definition for sources/destinations/transformers.
857
+ * Used instead of package when defining inline functions.
858
+ */
859
+ interface InlineCode {
860
+ push: string;
861
+ type?: string;
862
+ init?: string;
863
+ }
819
864
  /**
820
865
  * Packages configuration for build.
821
866
  */
@@ -903,13 +948,13 @@ interface Setup {
903
948
  include?: string[];
904
949
  /**
905
950
  * Shared variables for interpolation.
906
- * Resolution: process.env > Config.variables > Setup.variables > inline default
907
- * Syntax: \${VAR_NAME} or \${VAR_NAME:default}
951
+ * Resolution: destination/source > Config > Setup level
952
+ * Syntax: $var.name
908
953
  */
909
954
  variables?: Variables;
910
955
  /**
911
956
  * Reusable configuration definitions.
912
- * Referenced via JSON Schema $ref syntax: { "$ref": "#/definitions/name" }
957
+ * Syntax: $def.name
913
958
  */
914
959
  definitions?: Definitions;
915
960
  /**
@@ -1083,6 +1128,7 @@ interface Config$5 {
1083
1128
  * @remarks
1084
1129
  * References a source package and provides configuration.
1085
1130
  * The package is automatically downloaded and imported during build.
1131
+ * Alternatively, use \`code: true\` for inline code execution.
1086
1132
  */
1087
1133
  interface SourceReference {
1088
1134
  /**
@@ -1100,18 +1146,30 @@ interface SourceReference {
1100
1146
  * 3. Auto-detect default or named export
1101
1147
  * 4. Generate import statement
1102
1148
  *
1149
+ * Optional when \`code: true\` is used for inline code execution.
1150
+ *
1103
1151
  * @example
1104
1152
  * "package": "@walkeros/web-source-browser@latest"
1105
1153
  */
1106
- package: string;
1154
+ package?: string;
1107
1155
  /**
1108
- * Resolved import variable name.
1156
+ * Resolved import variable name or built-in code source.
1109
1157
  *
1110
1158
  * @remarks
1111
- * Auto-resolved from packages[package].imports[0] during getFlowConfig().
1112
- * Can also be provided explicitly for advanced use cases.
1159
+ * - String: Auto-resolved from packages[package].imports[0] during getFlowConfig(),
1160
+ * or provided explicitly for advanced use cases.
1161
+ * - InlineCode: Object with type, push, and optional init for inline code definition.
1162
+ *
1163
+ * @example
1164
+ * // Using inline code object
1165
+ * {
1166
+ * "code": {
1167
+ * "type": "logger",
1168
+ * "push": "$code:(event) => console.log(event)"
1169
+ * }
1170
+ * }
1113
1171
  */
1114
- code?: string;
1172
+ code?: string | InlineCode;
1115
1173
  /**
1116
1174
  * Source-specific configuration.
1117
1175
  *
@@ -1168,8 +1226,9 @@ interface SourceReference {
1168
1226
  * @remarks
1169
1227
  * Name of the transformer to execute after this source captures an event.
1170
1228
  * If omitted, events route directly to the collector.
1229
+ * Can be an array for explicit chain control (bypasses transformer.next resolution).
1171
1230
  */
1172
- next?: string;
1231
+ next?: string | string[];
1173
1232
  }
1174
1233
  /**
1175
1234
  * Transformer reference with inline package syntax.
@@ -1177,6 +1236,7 @@ interface SourceReference {
1177
1236
  * @remarks
1178
1237
  * References a transformer package and provides configuration.
1179
1238
  * Transformers transform events in the pipeline between sources and destinations.
1239
+ * Alternatively, use \`code: true\` for inline code execution.
1180
1240
  */
1181
1241
  interface TransformerReference {
1182
1242
  /**
@@ -1184,19 +1244,30 @@ interface TransformerReference {
1184
1244
  *
1185
1245
  * @remarks
1186
1246
  * Same format as SourceReference.package
1247
+ * Optional when \`code: true\` is used for inline code execution.
1187
1248
  *
1188
1249
  * @example
1189
1250
  * "package": "@walkeros/transformer-enricher@1.0.0"
1190
1251
  */
1191
- package: string;
1252
+ package?: string;
1192
1253
  /**
1193
- * Resolved import variable name.
1254
+ * Resolved import variable name or built-in code transformer.
1194
1255
  *
1195
1256
  * @remarks
1196
- * Auto-resolved from packages[package].imports[0] during getFlowConfig().
1197
- * Can also be provided explicitly for advanced use cases.
1257
+ * - String: Auto-resolved from packages[package].imports[0] during getFlowConfig(),
1258
+ * or provided explicitly for advanced use cases.
1259
+ * - InlineCode: Object with type, push, and optional init for inline code definition.
1260
+ *
1261
+ * @example
1262
+ * // Using inline code object
1263
+ * {
1264
+ * "code": {
1265
+ * "type": "enricher",
1266
+ * "push": "$code:(event) => ({ ...event, data: { enriched: true } })"
1267
+ * }
1268
+ * }
1198
1269
  */
1199
- code?: string;
1270
+ code?: string | InlineCode;
1200
1271
  /**
1201
1272
  * Transformer-specific configuration.
1202
1273
  *
@@ -1221,8 +1292,9 @@ interface TransformerReference {
1221
1292
  * If omitted:
1222
1293
  * - Pre-collector: routes to collector
1223
1294
  * - Post-collector: routes to destination
1295
+ * Can be an array for explicit chain control (terminates chain walking).
1224
1296
  */
1225
- next?: string;
1297
+ next?: string | string[];
1226
1298
  /**
1227
1299
  * Transformer-level variables (highest priority in cascade).
1228
1300
  * Overrides flow and setup variables.
@@ -1247,19 +1319,30 @@ interface DestinationReference {
1247
1319
  *
1248
1320
  * @remarks
1249
1321
  * Same format as SourceReference.package
1322
+ * Optional when \`code: true\` is used for inline code execution.
1250
1323
  *
1251
1324
  * @example
1252
1325
  * "package": "@walkeros/web-destination-gtag@2.0.0"
1253
1326
  */
1254
- package: string;
1327
+ package?: string;
1255
1328
  /**
1256
- * Resolved import variable name.
1329
+ * Resolved import variable name or built-in code destination.
1257
1330
  *
1258
1331
  * @remarks
1259
- * Auto-resolved from packages[package].imports[0] during getFlowConfig().
1260
- * Can also be provided explicitly for advanced use cases.
1332
+ * - String: Auto-resolved from packages[package].imports[0] during getFlowConfig(),
1333
+ * or provided explicitly for advanced use cases.
1334
+ * - InlineCode: Object with type, push, and optional init for inline code definition.
1335
+ *
1336
+ * @example
1337
+ * // Using inline code object
1338
+ * {
1339
+ * "code": {
1340
+ * "type": "logger",
1341
+ * "push": "$code:(event) => console.log('Event:', event.name)"
1342
+ * }
1343
+ * }
1261
1344
  */
1262
- code?: string;
1345
+ code?: string | InlineCode;
1263
1346
  /**
1264
1347
  * Destination-specific configuration.
1265
1348
  *
@@ -1317,12 +1400,14 @@ interface DestinationReference {
1317
1400
  * @remarks
1318
1401
  * Name of the transformer to execute before sending events to this destination.
1319
1402
  * If omitted, events are sent directly from the collector.
1403
+ * Can be an array for explicit chain control (bypasses transformer.next resolution).
1320
1404
  */
1321
- before?: string;
1405
+ before?: string | string[];
1322
1406
  }
1323
1407
 
1324
1408
  type flow_Definitions = Definitions;
1325
1409
  type flow_DestinationReference = DestinationReference;
1410
+ type flow_InlineCode = InlineCode;
1326
1411
  type flow_Packages = Packages;
1327
1412
  type flow_Primitive = Primitive;
1328
1413
  type flow_Server = Server;
@@ -1332,7 +1417,7 @@ type flow_TransformerReference = TransformerReference;
1332
1417
  type flow_Variables = Variables;
1333
1418
  type flow_Web = Web;
1334
1419
  declare namespace flow {
1335
- export type { Config$5 as Config, flow_Definitions as Definitions, flow_DestinationReference as DestinationReference, flow_Packages as Packages, flow_Primitive as Primitive, flow_Server as Server, flow_Setup as Setup, flow_SourceReference as SourceReference, flow_TransformerReference as TransformerReference, flow_Variables as Variables, flow_Web as Web };
1420
+ export type { Config$5 as Config, flow_Definitions as Definitions, flow_DestinationReference as DestinationReference, flow_InlineCode as InlineCode, flow_Packages as Packages, flow_Primitive as Primitive, flow_Server as Server, flow_Setup as Setup, flow_SourceReference as SourceReference, flow_TransformerReference as TransformerReference, flow_Variables as Variables, flow_Web as Web };
1336
1421
  }
1337
1422
 
1338
1423
  type AnyFunction$1<P extends unknown[] = never[], R = unknown> = (...args: P) => R;
@@ -1544,41 +1629,57 @@ declare namespace mapping {
1544
1629
  }
1545
1630
 
1546
1631
  type Config$2 = {
1632
+ config?: Array<GenericConfig>;
1547
1633
  consent?: Array<ConsentConfig>;
1634
+ custom?: Array<GenericConfig>;
1635
+ globals?: Array<GenericConfig>;
1548
1636
  ready?: Array<ReadyConfig>;
1549
1637
  run?: Array<RunConfig>;
1550
1638
  session?: Array<SessionConfig>;
1639
+ user?: Array<UserConfig>;
1551
1640
  };
1552
- type Types$2 = keyof Config$2;
1641
+ type Types$2 = keyof Config$2 | (string & {});
1553
1642
  interface EventContextMap {
1643
+ config: Partial<Config$7>;
1554
1644
  consent: Consent;
1555
- session: SessionData;
1645
+ custom: Properties;
1646
+ globals: Properties;
1556
1647
  ready: undefined;
1557
1648
  run: undefined;
1649
+ session: SessionData;
1650
+ user: User;
1558
1651
  }
1559
- type EventContext<T extends Types$2> = EventContextMap[T];
1652
+ type EventContext<T extends keyof EventContextMap> = EventContextMap[T];
1560
1653
  type AnyEventContext = EventContextMap[keyof EventContextMap];
1561
1654
  interface Context$3 {
1562
1655
  consent?: Consent;
1563
1656
  session?: unknown;
1564
1657
  }
1565
- type Options = ConsentConfig | ReadyConfig | RunConfig | SessionConfig;
1658
+ type Options = ConsentConfig | GenericConfig | ReadyConfig | RunConfig | SessionConfig | UserConfig;
1566
1659
  interface ConsentConfig {
1567
1660
  [key: string]: ConsentFn;
1568
1661
  }
1569
1662
  type ConsentFn = (collector: Instance$4, consent: Consent) => void;
1663
+ type GenericConfig = GenericFn;
1664
+ type GenericFn = (collector: Instance$4, data: unknown) => void;
1570
1665
  type ReadyConfig = ReadyFn;
1571
1666
  type ReadyFn = (collector: Instance$4) => void;
1572
1667
  type RunConfig = RunFn;
1573
1668
  type RunFn = (collector: Instance$4) => void;
1574
1669
  type SessionConfig = SessionFn;
1575
1670
  type SessionFn = (collector: Instance$4, session?: unknown) => void;
1671
+ type UserConfig = UserFn;
1672
+ type UserFn = (collector: Instance$4, user: User) => void;
1576
1673
  interface OnConfig {
1674
+ config?: GenericConfig[];
1577
1675
  consent?: ConsentConfig[];
1676
+ custom?: GenericConfig[];
1677
+ globals?: GenericConfig[];
1578
1678
  ready?: ReadyConfig[];
1579
1679
  run?: RunConfig[];
1580
1680
  session?: SessionConfig[];
1581
- [key: string]: ConsentConfig[] | ReadyConfig[] | RunConfig[] | SessionConfig[] | undefined;
1681
+ user?: UserConfig[];
1682
+ [key: string]: ConsentConfig[] | GenericConfig[] | ReadyConfig[] | RunConfig[] | SessionConfig[] | UserConfig[] | undefined;
1582
1683
  }
1583
1684
  type OnFn<T extends TypesGeneric$2 = Types$3> = (type: Types$2, context: Context$4<T>) => PromiseOrValue<void>;
1584
1685
  type OnFnRuntime = (type: Types$2, context: Context$4) => PromiseOrValue<void>;
@@ -1586,8 +1687,10 @@ type OnFnRuntime = (type: Types$2, context: Context$4) => PromiseOrValue<void>;
1586
1687
  type on_AnyEventContext = AnyEventContext;
1587
1688
  type on_ConsentConfig = ConsentConfig;
1588
1689
  type on_ConsentFn = ConsentFn;
1589
- type on_EventContext<T extends Types$2> = EventContext<T>;
1690
+ type on_EventContext<T extends keyof EventContextMap> = EventContext<T>;
1590
1691
  type on_EventContextMap = EventContextMap;
1692
+ type on_GenericConfig = GenericConfig;
1693
+ type on_GenericFn = GenericFn;
1591
1694
  type on_OnConfig = OnConfig;
1592
1695
  type on_OnFn<T extends TypesGeneric$2 = Types$3> = OnFn<T>;
1593
1696
  type on_OnFnRuntime = OnFnRuntime;
@@ -1598,10 +1701,13 @@ type on_RunConfig = RunConfig;
1598
1701
  type on_RunFn = RunFn;
1599
1702
  type on_SessionConfig = SessionConfig;
1600
1703
  type on_SessionFn = SessionFn;
1704
+ type on_UserConfig = UserConfig;
1705
+ type on_UserFn = UserFn;
1601
1706
  declare namespace on {
1602
- export type { on_AnyEventContext as AnyEventContext, Config$2 as Config, on_ConsentConfig as ConsentConfig, on_ConsentFn as ConsentFn, Context$3 as Context, on_EventContext as EventContext, on_EventContextMap as EventContextMap, on_OnConfig as OnConfig, on_OnFn as OnFn, on_OnFnRuntime as OnFnRuntime, on_Options as Options, on_ReadyConfig as ReadyConfig, on_ReadyFn as ReadyFn, on_RunConfig as RunConfig, on_RunFn as RunFn, on_SessionConfig as SessionConfig, on_SessionFn as SessionFn, Types$2 as Types };
1707
+ export type { on_AnyEventContext as AnyEventContext, Config$2 as Config, on_ConsentConfig as ConsentConfig, on_ConsentFn as ConsentFn, Context$3 as Context, on_EventContext as EventContext, on_EventContextMap as EventContextMap, on_GenericConfig as GenericConfig, on_GenericFn as GenericFn, on_OnConfig as OnConfig, on_OnFn as OnFn, on_OnFnRuntime as OnFnRuntime, on_Options as Options, on_ReadyConfig as ReadyConfig, on_ReadyFn as ReadyFn, on_RunConfig as RunConfig, on_RunFn as RunFn, on_SessionConfig as SessionConfig, on_SessionFn as SessionFn, Types$2 as Types, on_UserConfig as UserConfig, on_UserFn as UserFn };
1603
1708
  }
1604
1709
 
1710
+ type Next = string | string[];
1605
1711
  /**
1606
1712
  * Base environment interface for walkerOS transformers.
1607
1713
  *
@@ -1651,7 +1757,7 @@ interface Config$1<T extends TypesGeneric$1 = Types$1> {
1651
1757
  env?: Env$1<T>;
1652
1758
  id?: string;
1653
1759
  logger?: Config$4;
1654
- next?: string;
1760
+ next?: Next;
1655
1761
  init?: boolean;
1656
1762
  }
1657
1763
  /**
@@ -1662,6 +1768,20 @@ interface Context$2<T extends TypesGeneric$1 = Types$1> extends Base<Config$1<T>
1662
1768
  id: string;
1663
1769
  ingest?: unknown;
1664
1770
  }
1771
+ /**
1772
+ * Branch result for dynamic chain routing.
1773
+ * Returned by transformers (e.g., router) to redirect the chain.
1774
+ * The chain runner resolves \`next\` via walkChain() \u2014 same semantics
1775
+ * as source.next or transformer.config.next.
1776
+ *
1777
+ * IMPORTANT: Always use the \`branch()\` factory function to create BranchResult.
1778
+ * The \`__branch\` discriminant is required for reliable type detection.
1779
+ */
1780
+ interface BranchResult {
1781
+ readonly __branch: true;
1782
+ event: DeepPartialEvent;
1783
+ next: Next;
1784
+ }
1665
1785
  /**
1666
1786
  * The main transformer function.
1667
1787
  * Uses DeepPartialEvent for consistency across pre/post collector.
@@ -1672,7 +1792,7 @@ interface Context$2<T extends TypesGeneric$1 = Types$1> extends Base<Config$1<T>
1672
1792
  * @returns void - continue with current event unchanged (passthrough)
1673
1793
  * @returns false - stop chain, cancel further processing
1674
1794
  */
1675
- type Fn<T extends TypesGeneric$1 = Types$1> = (event: DeepPartialEvent, context: Context$2<T>) => PromiseOrValue<DeepPartialEvent | false | void>;
1795
+ type Fn<T extends TypesGeneric$1 = Types$1> = (event: DeepPartialEvent, context: Context$2<T>) => PromiseOrValue<DeepPartialEvent | false | void | BranchResult>;
1676
1796
  /**
1677
1797
  * Optional initialization function.
1678
1798
  * Called once before first push.
@@ -1706,6 +1826,7 @@ type InitTransformer<T extends TypesGeneric$1 = Types$1> = {
1706
1826
  code: Init$1<T>;
1707
1827
  config?: Partial<Config$1<T>>;
1708
1828
  env?: Partial<Env$1<T>>;
1829
+ next?: Next;
1709
1830
  };
1710
1831
  /**
1711
1832
  * Transformers configuration for collector.
@@ -1721,13 +1842,15 @@ interface Transformers {
1721
1842
  [transformerId: string]: Instance$1;
1722
1843
  }
1723
1844
 
1845
+ type transformer_BranchResult = BranchResult;
1724
1846
  type transformer_Fn<T extends TypesGeneric$1 = Types$1> = Fn<T>;
1725
1847
  type transformer_InitFn<T extends TypesGeneric$1 = Types$1> = InitFn<T>;
1726
1848
  type transformer_InitTransformer<T extends TypesGeneric$1 = Types$1> = InitTransformer<T>;
1727
1849
  type transformer_InitTransformers = InitTransformers;
1850
+ type transformer_Next = Next;
1728
1851
  type transformer_Transformers = Transformers;
1729
1852
  declare namespace transformer {
1730
- export type { BaseEnv$1 as BaseEnv, Config$1 as Config, Context$2 as Context, Env$1 as Env, transformer_Fn as Fn, Init$1 as Init, transformer_InitFn as InitFn, InitSettings$1 as InitSettings, transformer_InitTransformer as InitTransformer, transformer_InitTransformers as InitTransformers, Instance$1 as Instance, Settings$1 as Settings, transformer_Transformers as Transformers, Types$1 as Types, TypesGeneric$1 as TypesGeneric, TypesOf$1 as TypesOf };
1853
+ export type { BaseEnv$1 as BaseEnv, transformer_BranchResult as BranchResult, Config$1 as Config, Context$2 as Context, Env$1 as Env, transformer_Fn as Fn, Init$1 as Init, transformer_InitFn as InitFn, InitSettings$1 as InitSettings, transformer_InitTransformer as InitTransformer, transformer_InitTransformers as InitTransformers, Instance$1 as Instance, transformer_Next as Next, Settings$1 as Settings, transformer_Transformers as Transformers, Types$1 as Types, TypesGeneric$1 as TypesGeneric, TypesOf$1 as TypesOf };
1731
1854
  }
1732
1855
 
1733
1856
  interface Context$1 {
@@ -1829,12 +1952,18 @@ type Env<T extends TypesGeneric = Types> = T['env'];
1829
1952
  */
1830
1953
  type TypesOf<I> = I extends Instance<infer T> ? T : never;
1831
1954
  interface Config<T extends TypesGeneric = Types> extends Config$3<Mapping<T>> {
1955
+ /** Implementation-specific configuration passed to the init function. */
1832
1956
  settings?: InitSettings<T>;
1957
+ /** Runtime dependencies injected by the collector (push, command, logger, etc.). */
1833
1958
  env?: Env<T>;
1959
+ /** Source identifier; defaults to the InitSources object key. */
1834
1960
  id?: string;
1961
+ /** Logger configuration (level, handler) to override the collector's defaults. */
1835
1962
  logger?: Config$4;
1836
- disabled?: boolean;
1963
+ /** Mark as primary source; its push function becomes the exported \`elb\` from startFlow. */
1837
1964
  primary?: boolean;
1965
+ /** Defer source initialization until these collector events fire (e.g., \`['consent']\`). */
1966
+ require?: string[];
1838
1967
  /**
1839
1968
  * Ingest metadata extraction mapping.
1840
1969
  * Extracts values from raw request objects (Express req, Lambda event, etc.)
@@ -1855,7 +1984,7 @@ interface Instance<T extends TypesGeneric = Types> {
1855
1984
  config: Config<T>;
1856
1985
  push: Push<T>;
1857
1986
  destroy?(): void | Promise<void>;
1858
- on?(event: Types$2, context?: unknown): void | Promise<void>;
1987
+ on?(event: Types$2, context?: unknown): void | boolean | Promise<void | boolean>;
1859
1988
  }
1860
1989
  /**
1861
1990
  * Context provided to source init function.
@@ -1878,7 +2007,7 @@ type InitSource<T extends TypesGeneric = Types> = {
1878
2007
  config?: Partial<Config<T>>;
1879
2008
  env?: Partial<Env<T>>;
1880
2009
  primary?: boolean;
1881
- next?: string;
2010
+ next?: Next;
1882
2011
  };
1883
2012
  /**
1884
2013
  * Sources configuration for collector.
@@ -2044,6 +2173,12 @@ interface SendResponse {
2044
2173
  error?: string;
2045
2174
  }
2046
2175
 
2176
+ /**
2177
+ * Creates a BranchResult for dynamic chain routing.
2178
+ * Use this in transformer push functions to redirect the chain.
2179
+ */
2180
+ declare function branch(event: DeepPartialEvent, next: Next): BranchResult;
2181
+
2047
2182
  /**
2048
2183
  * Anonymizes an IPv4 address by setting the last octet to 0.
2049
2184
  *
@@ -2073,7 +2208,7 @@ declare function packageNameToVariable(packageName: string): string;
2073
2208
  *
2074
2209
  * @param setup - The complete setup configuration
2075
2210
  * @param flowName - Flow name (auto-selected if only one exists)
2076
- * @returns Resolved Config with variables/definitions interpolated and $refs resolved
2211
+ * @returns Resolved Config with $var, $env, and $def patterns resolved
2077
2212
  * @throws Error if flow selection is required but not specified, or flow not found
2078
2213
  *
2079
2214
  * @example
@@ -2759,7 +2894,20 @@ declare function wrapFn(code: string): Fn$1;
2759
2894
  */
2760
2895
  declare function wrapValidate(code: string): Validate;
2761
2896
 
2762
- export { collector as Collector, Const, context as Context, data as Data, destination as Destination, elb as Elb, flow as Flow, hooks as Hooks, Level, logger as Logger, mapping as Mapping, type MarketingParameters, type MockLogger, on as On, request as Request, schema as Schema, type SendDataValue, type SendHeaders, type SendResponse, source as Source, type StorageType, transformer as Transformer, walkeros as WalkerOS, anonymizeIP, assign, castToProperty, castValue, clone, createDestination, createEvent, createLogger, createMockLogger, debounce, filterValues, getBrowser, getBrowserVersion, getByPath, getDeviceType, getEvent, getFlowConfig, getGrantedConsent, getHeaders, getId, getMappingEvent, getMappingValue, getMarketingParameters, getOS, getOSVersion, getPlatform, isArguments, isArray, isBoolean, isCommand, isDefined, isElementOrDocument, isFunction, isNumber, isObject, isPropertyType, isSameType, isString, mockEnv, packageNameToVariable, parseUserAgent, processEventMapping, requestToData, requestToParameter, setByPath, throttle, throwError, transformData, traverseEnv, trim, tryCatch, tryCatchAsync, useHooks, validateEvent, validateProperty, wrapCondition, wrapFn, wrapValidate };
2897
+ interface WalkerOSPackageInfo {
2898
+ packageName: string;
2899
+ version: string;
2900
+ type?: string;
2901
+ platform?: string;
2902
+ schemas: Record<string, unknown>;
2903
+ examples: Record<string, unknown>;
2904
+ }
2905
+ declare function fetchPackageSchema(packageName: string, options?: {
2906
+ version?: string;
2907
+ timeout?: number;
2908
+ }): Promise<WalkerOSPackageInfo>;
2909
+
2910
+ export { collector as Collector, Const, context as Context, data as Data, destination as Destination, elb as Elb, flow as Flow, hooks as Hooks, Level, logger as Logger, mapping as Mapping, type MarketingParameters, type MockLogger, on as On, request as Request, schema as Schema, type SendDataValue, type SendHeaders, type SendResponse, source as Source, type StorageType, transformer as Transformer, walkeros as WalkerOS, type WalkerOSPackageInfo, anonymizeIP, assign, branch, castToProperty, castValue, clone, createDestination, createEvent, createLogger, createMockLogger, debounce, fetchPackageSchema, filterValues, getBrowser, getBrowserVersion, getByPath, getDeviceType, getEvent, getFlowConfig, getGrantedConsent, getHeaders, getId, getMappingEvent, getMappingValue, getMarketingParameters, getOS, getOSVersion, getPlatform, isArguments, isArray, isBoolean, isCommand, isDefined, isElementOrDocument, isFunction, isNumber, isObject, isPropertyType, isSameType, isString, mockEnv, packageNameToVariable, parseUserAgent, processEventMapping, requestToData, requestToParameter, setByPath, throttle, throwError, transformData, traverseEnv, trim, tryCatch, tryCatchAsync, useHooks, validateEvent, validateProperty, wrapCondition, wrapFn, wrapValidate };
2763
2911
  `;
2764
2912
 
2765
2913
  // src/utils/monaco-types.ts
@@ -2936,4 +3084,4 @@ export {
2936
3084
  getLoadedTypeLibraries,
2937
3085
  clearAllTypeLibraries
2938
3086
  };
2939
- //# sourceMappingURL=chunk-VWWAIDNX.mjs.map
3087
+ //# sourceMappingURL=chunk-YKT4D7MG.mjs.map