@walkeros/explorer 0.0.8 → 0.3.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.
@@ -0,0 +1,1265 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { Destination, WalkerOS, Mapping } from '@walkeros/core';
3
+ import { RJSFSchema, UiSchema, WidgetProps, FieldProps } from '@rjsf/utils';
4
+ import * as monaco_editor from 'monaco-editor';
5
+ import { editor } from 'monaco-editor';
6
+ import React, { FC, PropsWithChildren } from 'react';
7
+ import { ClassValue } from 'clsx';
8
+ import { Monaco } from '@monaco-editor/react';
9
+
10
+ interface MappingDemoProps {
11
+ input?: string;
12
+ config?: string;
13
+ labelInput?: string;
14
+ labelConfig?: string;
15
+ labelOutput?: string;
16
+ fn?: (input: string, config: string) => Promise<string>;
17
+ }
18
+ /**
19
+ * MappingDemo - Interactive dual-editor component with Monaco Editor
20
+ *
21
+ * A generic component with two editable JSON editors and one output display.
22
+ * Requires a transformation function to process input+config into output.
23
+ *
24
+ * Props:
25
+ * - input: Initial JSON string for left editor (default: '{}')
26
+ * - config: Initial JSON string for middle editor (default: '{}')
27
+ * - labelInput: Label for input editor (default: "Input")
28
+ * - labelConfig: Label for config editor (default: "Config")
29
+ * - labelOutput: Label for output editor (default: "Output")
30
+ * - fn: Transformation function (input, config) => Promise<string> (required for output)
31
+ *
32
+ * Example:
33
+ * ```tsx
34
+ * <MappingDemo
35
+ * input='{ "name": "example" }'
36
+ * config='{ "transform": "uppercase" }'
37
+ * labelInput="Data"
38
+ * labelConfig="Rules"
39
+ * labelOutput="Result"
40
+ * fn={async (input, config) => {
41
+ * const data = JSON.parse(input);
42
+ * const rules = JSON.parse(config);
43
+ * // Your transformation logic
44
+ * return JSON.stringify(result, null, 2);
45
+ * }}
46
+ * />
47
+ * ```
48
+ */
49
+ declare function MappingDemo({ input: initialInput, config: initialConfig, labelInput, labelConfig, labelOutput, fn, }?: MappingDemoProps): react_jsx_runtime.JSX.Element;
50
+
51
+ interface MappingCodeProps {
52
+ input: string;
53
+ config?: string;
54
+ labelInput?: string;
55
+ labelOutput?: string;
56
+ }
57
+ /**
58
+ * MappingCode - Specialized component for walkerOS mapping demonstrations
59
+ *
60
+ * Similar to LiveCode but specifically for mapping transformations.
61
+ * Shows input code and output result side-by-side with built-in mapping logic.
62
+ *
63
+ * Props:
64
+ * - input: Code string to execute (can use await getMappingEvent, getMappingValue)
65
+ * - config: Optional mapping configuration JSON
66
+ * - labelInput: Label for input editor (default: "Configuration")
67
+ * - labelOutput: Label for output display (default: "Result")
68
+ *
69
+ * Example:
70
+ * ```tsx
71
+ * <MappingCode
72
+ * input={`await getMappingEvent(
73
+ * { name: 'product view' },
74
+ * {
75
+ * product: {
76
+ * view: { name: 'product_viewed' }
77
+ * }
78
+ * }
79
+ * );`}
80
+ * />
81
+ * ```
82
+ */
83
+ declare function MappingCode({ input: initialInput, config, labelInput, labelOutput, }: MappingCodeProps): react_jsx_runtime.JSX.Element;
84
+
85
+ interface DestinationDemoProps {
86
+ destination: Destination.Instance;
87
+ event: WalkerOS.PartialEvent;
88
+ mapping?: Mapping.Rule | string;
89
+ settings?: unknown;
90
+ generic?: boolean;
91
+ labelEvent?: string;
92
+ labelMapping?: string;
93
+ labelOutput?: string;
94
+ fn?: (event: WalkerOS.Event, context: Destination.PushContext) => Promise<string>;
95
+ }
96
+ /**
97
+ * DestinationDemo - Interactive destination testing component
98
+ *
99
+ * Automatically captures destination.push() calls and displays the output.
100
+ * The component auto-detects the destination's env from destination.examples.env.push.
101
+ *
102
+ * Props:
103
+ * - destination: Destination instance with examples.env.push export
104
+ * - event: walkerOS event to process
105
+ * - mapping: Optional mapping rules
106
+ * - settings: Destination-specific settings
107
+ * - generic: If true, wraps mapping in { '*': { '*': mapping } }
108
+ * - labelEvent: Label for event panel (default: 'Event')
109
+ * - labelMapping: Label for mapping panel (default: 'Mapping')
110
+ * - labelOutput: Label for output panel (default: 'Result')
111
+ *
112
+ * Example:
113
+ * ```tsx
114
+ * import destinationPlausible from '@walkeros/web-destination-plausible';
115
+ * import { examples } from '@walkeros/web-destination-plausible';
116
+ * import { getEvent } from '@walkeros/core';
117
+ *
118
+ * const destination = { ...destinationPlausible, examples };
119
+ *
120
+ * <DestinationDemo
121
+ * destination={destination}
122
+ * event={getEvent('order complete')}
123
+ * mapping={examples.mapping.purchase}
124
+ * settings={{ domain: 'elbwalker.com' }}
125
+ * generic={true}
126
+ * />
127
+ * ```
128
+ */
129
+ declare function createCaptureFn(fnName: string, onCapture: (output: string) => void): (...args: unknown[]) => void;
130
+ declare function DestinationDemo({ destination, event: initialEvent, mapping: initialMapping, settings, generic, labelEvent, labelMapping, labelOutput, fn, }: DestinationDemoProps): react_jsx_runtime.JSX.Element;
131
+
132
+ interface DestinationInitDemoProps {
133
+ destination: Destination.Instance;
134
+ settings?: unknown;
135
+ labelSettings?: string;
136
+ labelOutput?: string;
137
+ }
138
+ /**
139
+ * DestinationInitDemo - Interactive destination initialization testing component
140
+ *
141
+ * Automatically captures destination.init() calls and displays the output.
142
+ * The component auto-detects the destination's env from destination.examples.env.init.
143
+ *
144
+ * Props:
145
+ * - destination: Destination instance with examples.env.init export
146
+ * - settings: Initial destination-specific settings
147
+ * - labelSettings: Label for settings panel (default: 'Settings')
148
+ * - labelOutput: Label for output panel (default: 'Result')
149
+ *
150
+ * Example:
151
+ * ```tsx
152
+ * import destinationGtag from '@walkeros/web-destination-gtag';
153
+ * import { examples } from '@walkeros/web-destination-gtag';
154
+ *
155
+ * const destination = { ...destinationGtag, examples };
156
+ *
157
+ * <DestinationInitDemo
158
+ * destination={destination}
159
+ * settings={{ ga4: { measurementId: 'G-XXXXXXXXXX' } }}
160
+ * />
161
+ * ```
162
+ */
163
+ declare function DestinationInitDemo({ destination, settings: initialSettings, labelSettings, labelOutput, }: DestinationInitDemoProps): react_jsx_runtime.JSX.Element;
164
+
165
+ interface DemoEnv extends Destination.BaseEnv {
166
+ elb: (output: string) => void;
167
+ }
168
+ type DestinationCode = Destination.Instance<Destination.Types<unknown, unknown, DemoEnv>>;
169
+ /**
170
+ * Creates a gtag-style destination for demo purposes.
171
+ * Formats output as: gtag('event', 'event_name', { data })
172
+ */
173
+ declare function createGtagDestination(): DestinationCode;
174
+ /**
175
+ * Creates a Facebook Pixel-style destination for demo purposes.
176
+ * Formats output as: fbq('track', 'EventName', { data })
177
+ */
178
+ declare function createFbqDestination(): DestinationCode;
179
+ /**
180
+ * Creates a Plausible-style destination for demo purposes.
181
+ * Formats output as: plausible('event_name', { props: { data } })
182
+ */
183
+ declare function createPlausibleDestination(): DestinationCode;
184
+
185
+ interface PromotionPlaygroundProps {
186
+ initialHtml?: string;
187
+ initialCss?: string;
188
+ initialJs?: string;
189
+ initialMapping?: string;
190
+ labelCode?: string;
191
+ labelPreview?: string;
192
+ labelEvents?: string;
193
+ labelMapping?: string;
194
+ labelResult?: string;
195
+ destination?: DestinationCode;
196
+ }
197
+ /**
198
+ * PromotionPlayground - Full walkerOS demonstration with live code editing
199
+ *
200
+ * Shows the complete chain:
201
+ * 1. Code Editor - Edit HTML/CSS/JS with walkerOS data attributes
202
+ * 2. Preview - Live rendered output that captures real events
203
+ * 3. Events - Real events captured from preview interactions
204
+ * 4. Mapping - Apply transformations and see destination output
205
+ * 5. Result - Final destination function calls
206
+ */
207
+ declare function PromotionPlayground({ initialHtml, initialCss, initialJs, initialMapping, labelCode, labelPreview, labelEvents, labelMapping, labelResult, destination, }: PromotionPlaygroundProps): react_jsx_runtime.JSX.Element;
208
+
209
+ interface LiveCodeProps {
210
+ input: unknown;
211
+ config?: unknown;
212
+ output?: unknown;
213
+ options?: WalkerOS.AnyObject;
214
+ fn?: (input: unknown, config: unknown, log: (...args: unknown[]) => void, options?: WalkerOS.AnyObject) => Promise<void>;
215
+ fnName?: string;
216
+ labelInput?: string;
217
+ labelConfig?: string;
218
+ labelOutput?: string;
219
+ emptyText?: string;
220
+ disableInput?: boolean;
221
+ disableConfig?: boolean;
222
+ showQuotes?: boolean;
223
+ className?: string;
224
+ }
225
+ declare function LiveCode({ input: initInput, config: initConfig, output: initOutput, options, fn, fnName, labelInput, labelConfig, labelOutput, emptyText, disableInput, disableConfig, showQuotes, className, }: LiveCodeProps): react_jsx_runtime.JSX.Element;
226
+
227
+ interface CollectorBoxProps {
228
+ event: string;
229
+ mapping: string;
230
+ destination: DestinationCode;
231
+ label?: string;
232
+ wordWrap?: boolean;
233
+ }
234
+ /**
235
+ * CollectorBox - Runs a collector with destination to transform events
236
+ *
237
+ * Takes raw event and mapping config, processes through collector pipeline,
238
+ * and displays the formatted destination output.
239
+ *
240
+ * @example
241
+ * <CollectorBox
242
+ * event={JSON.stringify(event)}
243
+ * mapping={mappingConfig}
244
+ * destination={createGtagDestination()}
245
+ * label="Result"
246
+ * />
247
+ */
248
+ declare function CollectorBox({ event, mapping, destination, label, wordWrap, }: CollectorBoxProps): react_jsx_runtime.JSX.Element;
249
+
250
+ interface BrowserBoxProps {
251
+ html?: string;
252
+ css?: string;
253
+ js?: string;
254
+ onHtmlChange?: (value: string) => void;
255
+ onCssChange?: (value: string) => void;
256
+ onJsChange?: (value: string) => void;
257
+ showPreview?: boolean;
258
+ label?: string;
259
+ className?: string;
260
+ initialTab?: 'preview' | 'html' | 'css' | 'js';
261
+ lineNumbers?: boolean;
262
+ wordWrap?: boolean;
263
+ }
264
+ /**
265
+ * BrowserBox - Code editor with HTML/CSS/JS toggle
266
+ *
267
+ * Displays code editor with button group to switch between HTML, CSS, and JavaScript.
268
+ * Only shows tabs for content that is provided.
269
+ *
270
+ * @example
271
+ * <BrowserBox
272
+ * html={htmlCode}
273
+ * css={cssCode}
274
+ * onHtmlChange={setHtml}
275
+ * onCssChange={setCss}
276
+ * label="Code"
277
+ * />
278
+ */
279
+ declare function BrowserBox({ html, css, js, onHtmlChange, onCssChange, onJsChange, showPreview, label, className, initialTab, lineNumbers, wordWrap, }: BrowserBoxProps): react_jsx_runtime.JSX.Element;
280
+
281
+ /**
282
+ * Configuration Structure Definition
283
+ *
284
+ * Describes the SHAPE of a configuration object - what properties it has,
285
+ * how they should be edited, and how to build tree navigation.
286
+ *
287
+ * This is NOT the schema for values (that's JSON Schema).
288
+ * This IS the meta-schema that describes structure.
289
+ *
290
+ * Example:
291
+ * - DESTINATION_CONFIG_STRUCTURE describes Destination.Config shape
292
+ * - MAPPING_RULE_STRUCTURE describes Mapping.Rule shape
293
+ * - VALUE_CONFIG_MAP_STRUCTURE describes ValueConfig.map shape
294
+ */
295
+ interface ConfigStructureDef {
296
+ /** Type of the root config */
297
+ type: 'object' | 'array' | 'primitive';
298
+ /** Human-readable title */
299
+ title?: string;
300
+ /** Description of this config type */
301
+ description?: string;
302
+ /** Default NodeType for overview (when path is empty) */
303
+ rootNodeType?: NodeType;
304
+ /** Property definitions */
305
+ properties?: Record<string, PropertyDef>;
306
+ /** Special structural patterns */
307
+ patterns?: {
308
+ /** Entity → Action hierarchy (e.g., mapping.{entity}.{action}) */
309
+ 'entity-action'?: boolean;
310
+ /** Dynamic keys allowed (e.g., map.{any-key}) */
311
+ 'dynamic-keys'?: boolean;
312
+ };
313
+ }
314
+ /**
315
+ * Property Definition
316
+ *
317
+ * Describes a single property within a config structure.
318
+ */
319
+ interface PropertyDef {
320
+ /** Human-readable title */
321
+ title?: string;
322
+ /** Description of this property */
323
+ description?: string;
324
+ /** Explicit NodeType for editing this property */
325
+ nodeType?: NodeType;
326
+ /** Path to schema in schemas bundle (e.g., 'settings', 'mapping', 'id') */
327
+ schemaPath?: string;
328
+ /** How to build children for this property */
329
+ children?: ChildrenStrategy;
330
+ /** Nested structure definition (for complex properties) */
331
+ structure?: ConfigStructureDef;
332
+ /** Depth of this property in entity-action pattern */
333
+ depth?: number;
334
+ }
335
+ /**
336
+ * Children Building Strategy
337
+ *
338
+ * Determines how to build tree children for a property.
339
+ */
340
+ type ChildrenStrategy = 'entity-action' | 'schema-driven' | 'value-driven' | 'none';
341
+
342
+ /**
343
+ * Node types for different editing contexts
344
+ */
345
+ type NodeType = 'entity' | 'rule' | 'name' | 'batch' | 'policy' | 'consent' | 'settings' | 'options' | 'validationOverview' | 'valueConfig' | 'valueType' | 'primitive' | 'map' | 'loop' | 'set' | 'value' | 'fn' | 'validate' | 'condition' | 'enum' | 'boolean' | 'key';
346
+
347
+ interface NavigationState {
348
+ currentPath: string[];
349
+ nodeType: NodeType;
350
+ expandedPaths: string[][];
351
+ }
352
+
353
+ /**
354
+ * Config Editor Box
355
+ *
356
+ * Wrapper component that provides Code/Visual toggle.
357
+ * Persists navigation state when switching between views.
358
+ *
359
+ * @example
360
+ * <ConfigEditorBox
361
+ * config={destinationConfig}
362
+ * onChange={setConfig}
363
+ * structure={DESTINATION_CONFIG_STRUCTURE}
364
+ * schemas={metaSchemas}
365
+ * label="Meta Pixel Configuration"
366
+ * />
367
+ */
368
+ interface ConfigEditorBoxProps<T extends Record<string, unknown>> {
369
+ config: T;
370
+ onChange?: (config: T) => void;
371
+ structure: ConfigStructureDef;
372
+ schemas?: Record<string, RJSFSchema>;
373
+ sections?: Record<string, boolean>;
374
+ label?: string;
375
+ className?: string;
376
+ initialTab?: 'code' | 'visual';
377
+ resizable?: boolean;
378
+ showTree?: boolean;
379
+ showHeader?: boolean;
380
+ initialNavigationState?: NavigationState;
381
+ onNavigationStateChange?: (state: NavigationState) => void;
382
+ }
383
+
384
+ /**
385
+ * ConfigEditor - Generic Visual Configuration Editor
386
+ *
387
+ * A fully generic configuration editor that works at ANY depth with ANY config type.
388
+ * Uses structure definitions and schemas to provide appropriate editing UI.
389
+ *
390
+ * Key Features:
391
+ * - Works at any depth (full config or nested object)
392
+ * - Structure-driven (no hardcoded assumptions)
393
+ * - Schema-aware (validation, type hints, metadata)
394
+ * - Code/Visual toggle
395
+ * - Tree navigation
396
+ * - Validation with error overview
397
+ * - TypeScript generic for type safety
398
+ *
399
+ * @example
400
+ * // Full DestinationConfig
401
+ * <ConfigEditor
402
+ * config={destinationConfig}
403
+ * onChange={setConfig}
404
+ * structure={DESTINATION_CONFIG_STRUCTURE}
405
+ * schemas={metaSchemas}
406
+ * label="Meta Pixel Configuration"
407
+ * />
408
+ *
409
+ * @example
410
+ * // Single Rule (deep nested)
411
+ * <ConfigEditor
412
+ * config={pageViewRule}
413
+ * onChange={setRule}
414
+ * structure={MAPPING_RULE_STRUCTURE}
415
+ * schemas={{ mapping: mappingSchema }}
416
+ * label="Page View Rule"
417
+ * showTree={false}
418
+ * />
419
+ *
420
+ * @example
421
+ * // Read-only (no onChange)
422
+ * <ConfigEditor
423
+ * config={destinationConfig}
424
+ * structure={DESTINATION_CONFIG_STRUCTURE}
425
+ * initialTab="code"
426
+ * />
427
+ */
428
+ declare function ConfigEditor<T extends Record<string, unknown>>(props: ConfigEditorBoxProps<T>): react_jsx_runtime.JSX.Element;
429
+
430
+ interface CodeProps {
431
+ code: string;
432
+ language?: string;
433
+ onChange?: (code: string) => void;
434
+ disabled?: boolean;
435
+ lineNumbers?: boolean;
436
+ folding?: boolean;
437
+ wordWrap?: boolean;
438
+ className?: string;
439
+ beforeMount?: (monaco: typeof monaco_editor) => void;
440
+ onMount?: (editor: editor.IStandaloneCodeEditor) => void;
441
+ autoHeight?: boolean | {
442
+ min?: number;
443
+ max?: number;
444
+ };
445
+ fontSize?: number;
446
+ packages?: string[];
447
+ }
448
+ /**
449
+ * Code - Pure Monaco editor atom
450
+ *
451
+ * Height Management:
452
+ * Two modes controlled by `autoHeight` prop:
453
+ *
454
+ * 1. Default (autoHeight=false): height="100%" - fills parent container
455
+ * - Uses flex: 1 + min-height: 0 for proper flex overflow containment
456
+ * - Monaco set to height="100%" to fill container
457
+ * - automaticLayout: true + ResizeObserver for reliable resize detection
458
+ * - Use in Grid (equal heights) and Flex contexts (fill parent)
459
+ *
460
+ * 2. Auto-height (autoHeight=true): Dynamically sizes to content
461
+ * - Uses Monaco's getContentHeight() API for accurate content measurement
462
+ * - Respects min/max boundaries (default: 100-600px)
463
+ * - Updates automatically when content changes
464
+ * - Use in standalone contexts (docs) to eliminate blank space
465
+ *
466
+ * @example
467
+ * // Grid context - use default height="100%" for equal row heights
468
+ * <Grid columns={3}>
469
+ * <CodeBox code={event} />
470
+ * <CodeBox code={mapping} />
471
+ * </Grid>
472
+ *
473
+ * @example
474
+ * // Standalone context - use autoHeight to fit content
475
+ * <CodeBox
476
+ * code={shortExample}
477
+ * autoHeight={{ min: 100, max: 600 }}
478
+ * />
479
+ */
480
+ declare function Code({ code, language, onChange, disabled, lineNumbers, folding, wordWrap, className, beforeMount, onMount, autoHeight, fontSize, packages, }: CodeProps): react_jsx_runtime.JSX.Element;
481
+
482
+ interface CodeBoxProps extends CodeProps {
483
+ label?: string;
484
+ showCopy?: boolean;
485
+ showFormat?: boolean;
486
+ showHeader?: boolean;
487
+ height?: string | number;
488
+ }
489
+ /**
490
+ * CodeBox - Monaco editor wrapped in a Box with header and actions
491
+ *
492
+ * Molecule that combines Box + Code atom + toolbar actions.
493
+ * Use this when you need an editor with header, copy, and format buttons.
494
+ * Use Code atom directly when you need an editor without Box wrapper.
495
+ *
496
+ * Height Behavior:
497
+ *
498
+ * Three height modes:
499
+ * 1. Grid context: Equal row heights (250-450px), fills available space
500
+ * 2. Explicit height prop: Fixed height (e.g., height={600} or height="50vh")
501
+ * 3. Auto-height prop: Dynamically sizes to content (min-max boundaries)
502
+ *
503
+ * @example
504
+ * // Grid context - use default (no autoHeight) for equal row heights
505
+ * <Grid columns={3}>
506
+ * <CodeBox code={event} label="Event" showCopy />
507
+ * <CodeBox code={mapping} label="Mapping" showFormat />
508
+ * <CodeBox code={output} label="Output" disabled />
509
+ * </Grid>
510
+ *
511
+ * @example
512
+ * // Standalone with auto-height - fits content, no blank space
513
+ * <CodeBox
514
+ * code={setupCode}
515
+ * label="Setup"
516
+ * autoHeight={{ min: 100, max: 600 }}
517
+ * disabled
518
+ * />
519
+ *
520
+ * @example
521
+ * // Explicit height override
522
+ * <CodeBox
523
+ * code={largeConfig}
524
+ * label="Configuration"
525
+ * height={600}
526
+ * showFormat
527
+ * />
528
+ */
529
+ declare function CodeBox({ code, language, label, onChange, disabled, showCopy, showFormat, showHeader, height, className, autoHeight, ...codeProps }: CodeBoxProps): react_jsx_runtime.JSX.Element;
530
+
531
+ type CodeSnippetProps = Omit<CodeBoxProps, 'label' | 'showHeader'> & {
532
+ format?: boolean;
533
+ };
534
+ /**
535
+ * CodeSnippet - Prominent code display for snippets
536
+ *
537
+ * Wraps CodeBox with larger font size and generous padding.
538
+ * Use this for showcasing code examples, one-liners, or small code blocks
539
+ * where you want the code to be more visually prominent than in a standard editor.
540
+ *
541
+ * Always renders without a header. Use CodeBox if you need a header.
542
+ *
543
+ * Default behavior:
544
+ * - Read-only (disabled=true)
545
+ * - Copy button enabled (showCopy=true)
546
+ * - Auto-height with sensible bounds (min: 20px, max: 600px)
547
+ * - Auto-format on mount (format=true) - formats code once on initial load
548
+ *
549
+ * Auto-Formatting:
550
+ * - Enabled by default (format=true)
551
+ * - Runs once on component mount using Monaco's built-in formatters
552
+ * - Supports: JavaScript, TypeScript, JSON, HTML, CSS
553
+ * - Use format={false} to disable for special cases (pre-formatted code)
554
+ *
555
+ * Reuses all CodeBox functionality:
556
+ * - Monaco Editor with syntax highlighting
557
+ * - Grid height management and auto-height modes
558
+ * - Copy button
559
+ * - Theme integration
560
+ *
561
+ * @example
562
+ * // Minimal usage - code auto-formats on load
563
+ * <CodeSnippet
564
+ * code="import { elb } from '@walkeros/core';"
565
+ * language="javascript"
566
+ * />
567
+ *
568
+ * @example
569
+ * // Disable auto-formatting for pre-formatted code
570
+ * <CodeSnippet
571
+ * code={alreadyFormattedCode}
572
+ * language="javascript"
573
+ * format={false}
574
+ * />
575
+ *
576
+ * @example
577
+ * // Override defaults if needed
578
+ * <CodeSnippet
579
+ * code={editableCode}
580
+ * language="javascript"
581
+ * disabled={false}
582
+ * showCopy={false}
583
+ * autoHeight={{ min: 100, max: 800 }}
584
+ * />
585
+ */
586
+ declare function CodeSnippet(props: CodeSnippetProps): react_jsx_runtime.JSX.Element;
587
+
588
+ interface PropertyTableProps {
589
+ schema: RJSFSchema;
590
+ className?: string;
591
+ }
592
+ declare function PropertyTable({ schema, className }: PropertyTableProps): react_jsx_runtime.JSX.Element;
593
+
594
+ /**
595
+ * Destination schema bundle for runtime provision
596
+ *
597
+ * Maps to Destination.Types<S, M, E> generic structure:
598
+ * - settings: JSON Schema for config-level Settings<T>
599
+ * - mapping: JSON Schema for rule-level Mapping<T> (settings inside rules)
600
+ * - data: JSON Schema for expected event data properties
601
+ *
602
+ * Used by ConfigEditor and related components to provide:
603
+ * - Type detection for editing panes
604
+ * - Validation for user input
605
+ * - Metadata (titles, descriptions, enums)
606
+ */
607
+ interface DestinationSchemas {
608
+ /** Config-level settings schema (for Settings<T>) */
609
+ settings?: RJSFSchema;
610
+ /** Config-level settings UI schema */
611
+ settingsUi?: UiSchema;
612
+ /** Rule-level mapping settings schema (for Mapping<T>) */
613
+ mapping?: RJSFSchema;
614
+ /** Rule-level mapping settings UI schema */
615
+ mappingUi?: UiSchema;
616
+ /** Expected data properties schema for destination events */
617
+ data?: RJSFSchema;
618
+ /** Data properties UI schema */
619
+ dataUi?: UiSchema;
620
+ }
621
+
622
+ /**
623
+ * Structure Definition for Destination.Config
624
+ *
625
+ * Describes the shape of a full destination configuration:
626
+ * - settings: Destination-specific settings
627
+ * - mapping: Event mapping rules (entity → action hierarchy)
628
+ * - data: Global data transformations
629
+ * - policy: Processing policy rules
630
+ * - consent: Consent requirements
631
+ * - id, loadScript, queue, verbose: Config options
632
+ *
633
+ * This structure works with DestinationBox and ConfigEditor.
634
+ */
635
+ declare const DESTINATION_CONFIG_STRUCTURE: ConfigStructureDef;
636
+
637
+ /**
638
+ * Structure Definition for Mapping.Rule
639
+ *
640
+ * Describes the shape of a single mapping rule (e.g., mapping.page.view):
641
+ * - name: Event name override
642
+ * - batch: Batch size
643
+ * - settings: Rule-level settings
644
+ * - data: Data transformations
645
+ * - consent: Consent requirements
646
+ * - condition: Condition function
647
+ * - ignore: Ignore flag
648
+ *
649
+ * This structure enables editing individual rules with ConfigEditor.
650
+ */
651
+ declare const MAPPING_RULE_STRUCTURE: ConfigStructureDef;
652
+
653
+ interface PreviewProps {
654
+ html: string;
655
+ css?: string;
656
+ onEvent?: (event: WalkerOS.Event) => void;
657
+ label?: string;
658
+ }
659
+ /**
660
+ * Preview - HTML preview wrapped in a Box with highlight buttons
661
+ *
662
+ * Renders HTML in an isolated iframe with highlight buttons footer.
663
+ * When onEvent is provided, initializes walkerOS browser source in iframe.
664
+ *
665
+ * @example
666
+ * // Read-only preview
667
+ * <Preview html={html} css={css} label="Preview" />
668
+ *
669
+ * // Interactive preview with event capture
670
+ * <Preview html={html} css={css} onEvent={(event) => console.log(event)} label="Preview" />
671
+ */
672
+ declare function Preview({ html, css, onEvent, label }: PreviewProps): react_jsx_runtime.JSX.Element;
673
+
674
+ interface BoxProps {
675
+ header: string;
676
+ headerActions?: React.ReactNode;
677
+ footer?: React.ReactNode;
678
+ children: React.ReactNode;
679
+ className?: string;
680
+ style?: React.CSSProperties;
681
+ minHeight?: number | string;
682
+ maxHeight?: number | string;
683
+ tiny?: boolean;
684
+ resizable?: boolean;
685
+ showHeader?: boolean;
686
+ }
687
+ /**
688
+ * Box - Container atom component
689
+ *
690
+ * Provides a consistent box container with header and content area.
691
+ * Used across all explorer components for consistent styling.
692
+ *
693
+ * Height behavior:
694
+ * - Default: minHeight 100px, grows as needed
695
+ * - tiny prop: sets minHeight to 100px explicitly
696
+ * - Custom minHeight/maxHeight: override defaults
697
+ * - In Grid: fills row height (equal heights per row)
698
+ *
699
+ * @example
700
+ * <Box header="Preview">
701
+ * <Preview html={html} css={css} />
702
+ * </Box>
703
+ *
704
+ * @example
705
+ * <Box header="Code" minHeight={200} maxHeight={600}>
706
+ * <CodeBox ... />
707
+ * </Box>
708
+ */
709
+ declare function Box({ header, headerActions, footer, children, className, style, minHeight, maxHeight, tiny, resizable, showHeader, }: BoxProps): react_jsx_runtime.JSX.Element;
710
+
711
+ interface GridProps {
712
+ children: React.ReactNode;
713
+ columns?: number;
714
+ minBoxWidth?: number | string;
715
+ gap?: number | string;
716
+ rowHeight?: 'auto' | 'equal' | 'synced' | number;
717
+ maxRowHeight?: number | string | 'none';
718
+ showScrollButtons?: boolean;
719
+ className?: string;
720
+ }
721
+ /**
722
+ * Grid - Horizontal scrolling layout component for arranging boxes
723
+ *
724
+ * Provides consistent grid layout for box components with horizontal
725
+ * scrolling when content exceeds available space. Boxes maintain minimum
726
+ * width and never wrap to new rows.
727
+ *
728
+ * @example
729
+ * // 5 boxes with default 350px minimum width
730
+ * <Grid columns={5}>
731
+ * <CodeBox ... />
732
+ * <CodeBox ... />
733
+ * <CodeBox ... />
734
+ * <CodeBox ... />
735
+ * <CodeBox ... />
736
+ * </Grid>
737
+ *
738
+ * @example
739
+ * // Custom minimum box width
740
+ * <Grid columns={3} minBoxWidth={400}>
741
+ * <BrowserBox ... />
742
+ * <CodeBox ... />
743
+ * <CodeBox ... />
744
+ * </Grid>
745
+ *
746
+ * @example
747
+ * // Custom row height
748
+ * <Grid columns={2} rowHeight={300}>
749
+ * <CodeBox ... />
750
+ * <CodeBox ... />
751
+ * </Grid>
752
+ *
753
+ * @example
754
+ * // Auto row height (no minimum)
755
+ * <Grid columns={3} rowHeight="auto">
756
+ * <CodeBox ... />
757
+ * </Grid>
758
+ *
759
+ * @example
760
+ * // Unlimited row height (no max constraint)
761
+ * <Grid columns={2} maxRowHeight="none">
762
+ * <PropertyTable ... />
763
+ * <CodeBox ... />
764
+ * </Grid>
765
+ *
766
+ * @example
767
+ * // Custom max row height
768
+ * <Grid columns={2} maxRowHeight={800}>
769
+ * <PropertyTable ... />
770
+ * <CodeBox ... />
771
+ * </Grid>
772
+ */
773
+ declare function Grid({ children, columns, minBoxWidth, gap, rowHeight, maxRowHeight, showScrollButtons, className, }: GridProps): react_jsx_runtime.JSX.Element;
774
+
775
+ interface HeaderProps {
776
+ label: string;
777
+ children?: React.ReactNode;
778
+ }
779
+ declare function Header({ label, children }: HeaderProps): react_jsx_runtime.JSX.Element;
780
+
781
+ interface FooterProps {
782
+ children: React.ReactNode;
783
+ className?: string;
784
+ }
785
+ /**
786
+ * Footer - Footer atom component for boxes
787
+ *
788
+ * Provides a fixed-height footer area at the bottom of a box.
789
+ * Pairs with Header component for consistent box structure.
790
+ *
791
+ * @example
792
+ * <Box header="Preview">
793
+ * <Preview ... />
794
+ * <Footer>
795
+ * <ButtonGroup buttons={...} />
796
+ * </Footer>
797
+ * </Box>
798
+ */
799
+ declare function Footer({ children, className }: FooterProps): react_jsx_runtime.JSX.Element;
800
+
801
+ interface ButtonProps {
802
+ active?: boolean;
803
+ onClick?: () => void;
804
+ children: React.ReactNode;
805
+ className?: string;
806
+ }
807
+ /**
808
+ * Button - Button component for headers and controls
809
+ *
810
+ * Used in button groups or standalone in headers.
811
+ * Follows atomic design principles as a base atom.
812
+ */
813
+ declare function Button({ active, onClick, children, className, }: ButtonProps): react_jsx_runtime.JSX.Element;
814
+
815
+ interface ButtonGroupProps {
816
+ buttons: Array<{
817
+ label: string;
818
+ value: string;
819
+ active?: boolean;
820
+ }>;
821
+ onButtonClick: (value: string) => void;
822
+ className?: string;
823
+ }
824
+ /**
825
+ * ButtonGroup - Segmented control for headers
826
+ *
827
+ * Displays multiple buttons in a grouped segmented control style.
828
+ * Commonly used for tab switching (HTML/CSS/JS, etc.)
829
+ */
830
+ declare function ButtonGroup({ buttons, onButtonClick, className, }: ButtonGroupProps): react_jsx_runtime.JSX.Element;
831
+
832
+ /**
833
+ * MappingKeyWidget - RJSF widget for key property
834
+ *
835
+ * Manages the key property of ValueConfig - a string path to extract
836
+ * values from events (e.g., 'data.id', 'user.email', 'globals.currency').
837
+ *
838
+ * Features:
839
+ * - Simple text input for path entry
840
+ * - Helpful examples and common path patterns
841
+ * - Clean, focused interface for single property editing
842
+ *
843
+ * @example
844
+ * // In schema:
845
+ * const schema = {
846
+ * type: 'object',
847
+ * properties: {
848
+ * key: {
849
+ * type: 'string',
850
+ * title: 'Key',
851
+ * description: 'Extract value from event path'
852
+ * }
853
+ * }
854
+ * }
855
+ *
856
+ * @example
857
+ * // In uiSchema:
858
+ * const uiSchema = {
859
+ * key: {
860
+ * 'ui:widget': 'mappingKey'
861
+ * }
862
+ * }
863
+ */
864
+ declare function MappingKeyWidget(props: WidgetProps): react_jsx_runtime.JSX.Element;
865
+
866
+ /**
867
+ * MappingKeyField - RJSF field wrapper for key property
868
+ *
869
+ * Bridges RJSF FieldProps to our custom MappingKeyWidget.
870
+ * Required because RJSF uses fields (not widgets) for custom field rendering.
871
+ *
872
+ * @example
873
+ * // Register in field registry:
874
+ * export const mappingFields: RegistryFieldsType = {
875
+ * mappingKey: MappingKeyField,
876
+ * };
877
+ *
878
+ * @example
879
+ * // Use in uiSchema:
880
+ * const uiSchema = {
881
+ * key: {
882
+ * 'ui:field': 'mappingKey'
883
+ * }
884
+ * };
885
+ */
886
+ declare function MappingKeyField(props: FieldProps): react_jsx_runtime.JSX.Element;
887
+
888
+ /**
889
+ * Hint item definition
890
+ */
891
+ interface HintItem {
892
+ code: string;
893
+ description: string;
894
+ }
895
+ /**
896
+ * PanelHints - Reusable hints component for panel views
897
+ *
898
+ * Displays a clean, modern hints box with code examples and descriptions.
899
+ * Used across all property panel views for consistency.
900
+ *
901
+ * Features:
902
+ * - Minimal design with subtle background
903
+ * - Code-first presentation
904
+ * - Clean typography
905
+ * - Theme-aware styling
906
+ *
907
+ * @example
908
+ * <PanelHints
909
+ * title="Common patterns"
910
+ * hints={[
911
+ * { code: 'data.id', description: 'Product identifier' },
912
+ * { code: 'user.email', description: 'User email address' }
913
+ * ]}
914
+ * />
915
+ */
916
+ interface PanelHintsProps {
917
+ title?: string;
918
+ hints: HintItem[];
919
+ className?: string;
920
+ }
921
+ declare function PanelHints({ title, hints, className, }: PanelHintsProps): react_jsx_runtime.JSX.Element;
922
+
923
+ /**
924
+ * MDXProvider - Makes components available in MDX files without explicit imports
925
+ *
926
+ * This provider wraps MDX content and injects React components for HTML elements.
927
+ * Components are automatically used when rendering markdown/MDX content.
928
+ *
929
+ * Key features:
930
+ * - No imports needed in MDX files
931
+ * - Consistent styling across all documentation
932
+ * - Theme-aware (respects data-theme attribute)
933
+ * - Automatic inline vs block code detection
934
+ *
935
+ * Available components (no import needed):
936
+ * - CodeBox: Monaco editor for code display (also auto-used for ```code blocks)
937
+ * - PropertyTable: Display schema-based property documentation
938
+ * - DestinationInitDemo: Interactive demo for destination initialization
939
+ * - DestinationDemo: Interactive demo for destination event processing
940
+ *
941
+ * @example
942
+ * // Wrap your app
943
+ * <MDXProvider>
944
+ * <App />
945
+ * </MDXProvider>
946
+ *
947
+ * @example
948
+ * // Then in any .mdx file, no imports needed:
949
+ * # Documentation
950
+ *
951
+ * Inline `code` and markdown blocks:
952
+ * ```typescript
953
+ * const example = "Hello";
954
+ * ```
955
+ *
956
+ * Or use components directly:
957
+ * <CodeBox code="const x = 1;" language="javascript" />
958
+ * <PropertyTable schema={mySchema} />
959
+ */
960
+ declare const MDXProvider: FC<PropsWithChildren>;
961
+
962
+ interface MDXCodeProps {
963
+ className?: string;
964
+ }
965
+ /**
966
+ * MDXCode - Code component for MDX files
967
+ *
968
+ * Automatically detects and renders inline vs block code:
969
+ * - Inline code: `example` → <code className="elb-code-inline">
970
+ * - Block code: ```language\ncode\n``` → Uses CodeBox with Monaco editor
971
+ *
972
+ * Language detection:
973
+ * - Extracts language from className (e.g., "language-typescript")
974
+ * - Maps common MDX language names to Monaco language IDs
975
+ *
976
+ * Block code features (via CodeBox):
977
+ * - Full Monaco editor with syntax highlighting
978
+ * - Theme-aware (Palenight dark, VS Light)
979
+ * - Copy to clipboard button
980
+ * - Auto-height to fit content
981
+ * - Read-only mode
982
+ *
983
+ * @example
984
+ * // In MDX files (no import needed with MDXProvider):
985
+ * Inline `code` example
986
+ *
987
+ * ```typescript
988
+ * const block = "code";
989
+ * ```
990
+ */
991
+ declare const MDXCode: FC<PropsWithChildren<MDXCodeProps>>;
992
+
993
+ /**
994
+ * Utility function to merge class names with Tailwind CSS classes
995
+ * Uses clsx for conditional classes and tailwind-merge to handle conflicts
996
+ */
997
+ declare function cn(...inputs: ClassValue[]): string;
998
+
999
+ declare const palenightTheme: editor.IStandaloneThemeData;
1000
+ /**
1001
+ * Register the palenight theme with Monaco Editor
1002
+ * Call this function before creating any editor instances
1003
+ */
1004
+ declare function registerPalenightTheme(monaco: typeof monaco_editor): void;
1005
+
1006
+ declare const lighthouseTheme: editor.IStandaloneThemeData;
1007
+ /**
1008
+ * Register the lighthouse theme with Monaco Editor
1009
+ * Call this function before creating any editor instances
1010
+ */
1011
+ declare function registerLighthouseTheme(monaco: typeof monaco_editor): void;
1012
+
1013
+ /**
1014
+ * TypeScript type definitions for walkerOS Explorer themes
1015
+ *
1016
+ * These types provide type-safe access to theme properties and enable
1017
+ * programmatic theme customization.
1018
+ */
1019
+ interface ExplorerTheme {
1020
+ mode: 'light' | 'dark';
1021
+ colors: {
1022
+ text: string;
1023
+ textLabel: string;
1024
+ textButton: string;
1025
+ textButtonHover: string;
1026
+ textButtonActive: string;
1027
+ textMuted: string;
1028
+ textToggle: string;
1029
+ textInput: string;
1030
+ textPlaceholder: string;
1031
+ bgBox: string;
1032
+ bgHeader: string;
1033
+ bgFooter: string;
1034
+ bgButtonHover: string;
1035
+ bgButtonActive: string;
1036
+ bgButtonGroup: string;
1037
+ bgInput: string;
1038
+ bgInputHover: string;
1039
+ bgCodeInline: string;
1040
+ bgDropdown: string;
1041
+ bgDropdownOptionHover: string;
1042
+ bgDropdownOptionHighlighted: string;
1043
+ borderBox: string;
1044
+ borderHeader: string;
1045
+ borderFooter: string;
1046
+ borderButtonGroup: string;
1047
+ borderInput: string;
1048
+ borderInputFocus: string;
1049
+ buttonPrimary: string;
1050
+ buttonPrimaryHover: string;
1051
+ buttonPrimaryText: string;
1052
+ buttonDanger: string;
1053
+ buttonDangerHover: string;
1054
+ buttonDangerText: string;
1055
+ statusEnabled: string;
1056
+ statusDisabled: string;
1057
+ statusWarning: string;
1058
+ highlightPrimary: string;
1059
+ highlightGlobals: string;
1060
+ highlightContext: string;
1061
+ highlightEntity: string;
1062
+ highlightProperty: string;
1063
+ highlightAction: string;
1064
+ highlightBackground: string;
1065
+ highlightText: string;
1066
+ highlightHover: string;
1067
+ highlightSeparator: string;
1068
+ };
1069
+ typography: {
1070
+ fontFamily: string;
1071
+ fontMono: string;
1072
+ fontSize: {
1073
+ base: string;
1074
+ label: string;
1075
+ toggle: string;
1076
+ highlightButton: string;
1077
+ };
1078
+ fontWeight: {
1079
+ normal: number;
1080
+ semibold: number;
1081
+ };
1082
+ lineHeight: {
1083
+ base: number;
1084
+ };
1085
+ };
1086
+ spacing: {
1087
+ header: string;
1088
+ footer: string;
1089
+ button: string;
1090
+ buttonGroup: string;
1091
+ gridGap: string;
1092
+ };
1093
+ radius: {
1094
+ box: string;
1095
+ button: string;
1096
+ buttonGroup: string;
1097
+ highlightButton: string;
1098
+ };
1099
+ shadows: {
1100
+ buttonActive: string;
1101
+ dropdown: string;
1102
+ };
1103
+ grid: {
1104
+ minBoxWidth: string;
1105
+ rowMinHeight: string;
1106
+ rowMaxHeight: string;
1107
+ boxMaxHeightMobile: string;
1108
+ };
1109
+ monaco: {
1110
+ theme: string;
1111
+ fontSize: string;
1112
+ lineHeight: string;
1113
+ };
1114
+ }
1115
+
1116
+ /**
1117
+ * Register all Monaco themes
1118
+ * Convenience function for registering both themes at once
1119
+ *
1120
+ * @example
1121
+ * ```typescript
1122
+ * import { registerAllThemes } from '@walkeros/explorer';
1123
+ * import * as monaco from 'monaco-editor';
1124
+ *
1125
+ * registerAllThemes(monaco);
1126
+ * ```
1127
+ */
1128
+ declare function registerAllThemes(monaco: typeof monaco_editor): void;
1129
+
1130
+ /**
1131
+ * Monaco Editor TypeScript Type Management
1132
+ *
1133
+ * This utility manages TypeScript type definitions in Monaco Editor for:
1134
+ * 1. Static walkerOS core types (bundled at build time via Vite ?raw import)
1135
+ * 2. Dynamic destination types (loaded on-the-fly when destinations are added)
1136
+ * 3. Context-specific function signatures (condition, fn, validate)
1137
+ *
1138
+ * Architecture:
1139
+ * - Uses monaco.languages.typescript.typescriptDefaults.addExtraLib()
1140
+ * - Each type definition gets a unique file path (e.g., 'file:///destinations/gtag.d.ts')
1141
+ * - Types can be added/removed dynamically without page reload
1142
+ * - Core types are bundled for offline support and predictable versioning
1143
+ */
1144
+
1145
+ /**
1146
+ * Load type definitions from a URL
1147
+ *
1148
+ * @param monaco - Monaco instance
1149
+ * @param url - URL to .d.ts file
1150
+ * @param uri - Optional custom URI (defaults to URL)
1151
+ */
1152
+ declare function loadTypeLibraryFromURL(monaco: Monaco, url: string, uri?: string): Promise<boolean>;
1153
+ /**
1154
+ * Options for loading package types dynamically
1155
+ */
1156
+ interface LoadPackageTypesOptions {
1157
+ /** Package name (e.g., '@walkeros/destination-gtag') */
1158
+ package: string;
1159
+ /** Version to load (e.g., '0.1.0', 'latest') */
1160
+ version?: string;
1161
+ /** CDN to use ('unpkg' or 'jsdelivr') */
1162
+ cdn?: 'unpkg' | 'jsdelivr';
1163
+ /** Path to .d.ts file within package (defaults to '/dist/index.d.ts') */
1164
+ typesPath?: string;
1165
+ }
1166
+ interface LoadPackageTypesOptions {
1167
+ package: string;
1168
+ version?: string;
1169
+ }
1170
+ declare function loadPackageTypes(monaco: Monaco, options: LoadPackageTypesOptions): Promise<boolean>;
1171
+ /**
1172
+ * Simple helper to register only walkerOS core types
1173
+ *
1174
+ * Use this for basic scenarios where you just need @walkeros/core types.
1175
+ * For advanced usage (destinations, function contexts), use initializeMonacoTypes.
1176
+ *
1177
+ * @param monaco - Monaco editor instance
1178
+ *
1179
+ * @example
1180
+ * ```typescript
1181
+ * const handleBeforeMount = (monaco: Monaco) => {
1182
+ * registerWalkerOSTypes(monaco);
1183
+ * };
1184
+ * ```
1185
+ */
1186
+ declare function registerWalkerOSTypes(monaco: Monaco): void;
1187
+ /**
1188
+ * Initialize Monaco with walkerOS types (full setup)
1189
+ *
1190
+ * Call this once in CodeBox's beforeMount handler.
1191
+ * Includes core types, TypeScript config, and default function context.
1192
+ *
1193
+ * @param monaco - Monaco editor instance
1194
+ *
1195
+ * @example
1196
+ * ```typescript
1197
+ * const handleBeforeMount = (monaco: Monaco) => {
1198
+ * initializeMonacoTypes(monaco);
1199
+ * };
1200
+ * ```
1201
+ */
1202
+ declare function initializeMonacoTypes(monaco: Monaco): void;
1203
+
1204
+ /**
1205
+ * Formats captured function calls for display
1206
+ *
1207
+ * @param calls - Array of captured calls with path and args
1208
+ * @param defaultMessage - Message to show when no calls captured
1209
+ * @returns Formatted string of function calls
1210
+ *
1211
+ * @example
1212
+ * formatCapturedCalls([
1213
+ * { path: ['window', 'gtag'], args: ['config', 'G-XXX'] }
1214
+ * ])
1215
+ * // Returns: "gtag('config', 'G-XXX');"
1216
+ */
1217
+ declare function formatCapturedCalls(calls: Array<{
1218
+ path: string[];
1219
+ args: unknown[];
1220
+ }>, defaultMessage?: string): string;
1221
+ /**
1222
+ * Creates a capture function for destination push method
1223
+ * Uses walkerOS core mockEnv to intercept function calls
1224
+ *
1225
+ * @param destination - Destination instance with push method
1226
+ * @param destinationEnv - Destination's exported env (usually examples.env.push)
1227
+ * @returns Async function that executes push and returns formatted output
1228
+ *
1229
+ * @example
1230
+ * import destinationGtag, { examples } from '@walkeros/web-destination-gtag';
1231
+ * import { getEvent } from '@walkeros/core';
1232
+ *
1233
+ * const captureFn = captureDestinationPush(destinationGtag, examples.env.push);
1234
+ *
1235
+ * // Use in DestinationDemo
1236
+ * <DestinationDemo
1237
+ * destination={destinationGtag}
1238
+ * event={getEvent('order complete')}
1239
+ * mapping={examples.mapping.purchase}
1240
+ * fn={captureFn}
1241
+ * />
1242
+ */
1243
+ declare function captureDestinationPush(destination: Destination.Instance, destinationEnv: unknown): (event: WalkerOS.Event, context: Destination.PushContext) => Promise<string>;
1244
+ /**
1245
+ * Advanced: Creates a raw capture function that returns call data
1246
+ * Use this when you need custom formatting or processing of calls
1247
+ *
1248
+ * @param destinationEnv - Destination's exported env
1249
+ * @returns Function that returns both env and getCalls function
1250
+ *
1251
+ * @example
1252
+ * const { env, getCalls } = createRawCapture(examples.env.push);
1253
+ * await destination.init({ ...context, env });
1254
+ * const calls = getCalls();
1255
+ * // Process calls as needed
1256
+ */
1257
+ declare function createRawCapture(destinationEnv: unknown): {
1258
+ env: Record<string, unknown>;
1259
+ getCalls: () => {
1260
+ path: string[];
1261
+ args: unknown[];
1262
+ }[];
1263
+ };
1264
+
1265
+ export { Box, type BoxProps, BrowserBox, type BrowserBoxProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, Code, CodeBox, type CodeBoxProps, type CodeProps, CodeSnippet, type CodeSnippetProps, CollectorBox, type CollectorBoxProps, ConfigEditor, type ConfigEditorBoxProps, DESTINATION_CONFIG_STRUCTURE, DestinationDemo, type DestinationDemoProps, DestinationInitDemo as DestinationInit, DestinationInitDemo, type DestinationInitDemoProps, DestinationDemo as DestinationPush, type DestinationSchemas, type ExplorerTheme, Footer, type FooterProps, Grid, type GridProps, Header, type HeaderProps, type HintItem, LiveCode, type LiveCodeProps, type LoadPackageTypesOptions, MAPPING_RULE_STRUCTURE, MDXCode, MDXProvider, MappingCode, type MappingCodeProps, MappingDemo, type MappingDemoProps, MappingKeyField, MappingKeyWidget, PanelHints, type PanelHintsProps, Preview, type PreviewProps, PromotionPlayground, type PromotionPlaygroundProps, PropertyTable, type PropertyTableProps, captureDestinationPush, cn, createCaptureFn, createFbqDestination, createGtagDestination, createPlausibleDestination, createRawCapture, formatCapturedCalls, initializeMonacoTypes, lighthouseTheme, loadPackageTypes, loadTypeLibraryFromURL, palenightTheme, registerAllThemes, registerLighthouseTheme, registerPalenightTheme, registerWalkerOSTypes };