@active-reach/web-sdk 1.42.0 → 1.43.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 (183) hide show
  1. package/package.json +1 -1
  2. package/dist/aegis-push.min.js +0 -2
  3. package/dist/aegis-push.min.js.map +0 -1
  4. package/dist/aegis-sw.js +0 -1
  5. package/dist/aegis.min.js +0 -2
  6. package/dist/aegis.min.js.map +0 -1
  7. package/dist/analytics-C-Go3Pm5.mjs +0 -3509
  8. package/dist/analytics-C-Go3Pm5.mjs.map +0 -1
  9. package/dist/cdn.d.ts +0 -26
  10. package/dist/cdn.d.ts.map +0 -1
  11. package/dist/chat/AegisChat.d.ts +0 -169
  12. package/dist/chat/AegisChat.d.ts.map +0 -1
  13. package/dist/chat/index.d.ts +0 -3
  14. package/dist/chat/index.d.ts.map +0 -1
  15. package/dist/core/analytics.d.ts +0 -320
  16. package/dist/core/analytics.d.ts.map +0 -1
  17. package/dist/core/bootstrap.d.ts +0 -96
  18. package/dist/core/bootstrap.d.ts.map +0 -1
  19. package/dist/core/prefetch-bundle-client.d.ts +0 -175
  20. package/dist/core/prefetch-bundle-client.d.ts.map +0 -1
  21. package/dist/core/queue.d.ts +0 -35
  22. package/dist/core/queue.d.ts.map +0 -1
  23. package/dist/core/rate-limiter.d.ts +0 -45
  24. package/dist/core/rate-limiter.d.ts.map +0 -1
  25. package/dist/core/sdk-config-poller.d.ts +0 -59
  26. package/dist/core/sdk-config-poller.d.ts.map +0 -1
  27. package/dist/core/session.d.ts +0 -52
  28. package/dist/core/session.d.ts.map +0 -1
  29. package/dist/core/transport.d.ts +0 -50
  30. package/dist/core/transport.d.ts.map +0 -1
  31. package/dist/core/user-namespace.d.ts +0 -48
  32. package/dist/core/user-namespace.d.ts.map +0 -1
  33. package/dist/ecommerce/index.d.ts +0 -94
  34. package/dist/ecommerce/index.d.ts.map +0 -1
  35. package/dist/ecommerce/types.d.ts +0 -81
  36. package/dist/ecommerce/types.d.ts.map +0 -1
  37. package/dist/governance/bloom-filter.d.ts +0 -47
  38. package/dist/governance/bloom-filter.d.ts.map +0 -1
  39. package/dist/governance/index.d.ts +0 -8
  40. package/dist/governance/index.d.ts.map +0 -1
  41. package/dist/governance/murmur3.d.ts +0 -43
  42. package/dist/governance/murmur3.d.ts.map +0 -1
  43. package/dist/governance/name-governor.d.ts +0 -98
  44. package/dist/governance/name-governor.d.ts.map +0 -1
  45. package/dist/governance/trait-governor.d.ts +0 -63
  46. package/dist/governance/trait-governor.d.ts.map +0 -1
  47. package/dist/inapp/AegisInAppManager.d.ts +0 -888
  48. package/dist/inapp/AegisInAppManager.d.ts.map +0 -1
  49. package/dist/inapp/actions.d.ts +0 -91
  50. package/dist/inapp/actions.d.ts.map +0 -1
  51. package/dist/inapp/devicePairing.d.ts +0 -70
  52. package/dist/inapp/devicePairing.d.ts.map +0 -1
  53. package/dist/inapp/eval-throttle.d.ts +0 -33
  54. package/dist/inapp/eval-throttle.d.ts.map +0 -1
  55. package/dist/inapp/font.d.ts +0 -16
  56. package/dist/inapp/font.d.ts.map +0 -1
  57. package/dist/inapp/index.d.ts +0 -8
  58. package/dist/inapp/index.d.ts.map +0 -1
  59. package/dist/inapp/lucide-svg.d.ts +0 -46
  60. package/dist/inapp/lucide-svg.d.ts.map +0 -1
  61. package/dist/inapp/renderPreview.d.ts +0 -40
  62. package/dist/inapp/renderPreview.d.ts.map +0 -1
  63. package/dist/inapp/renderers/active-web-chat.d.ts +0 -45
  64. package/dist/inapp/renderers/active-web-chat.d.ts.map +0 -1
  65. package/dist/inapp/renderers/card-style.d.ts +0 -31
  66. package/dist/inapp/renderers/card-style.d.ts.map +0 -1
  67. package/dist/inapp/renderers/card-template.d.ts +0 -233
  68. package/dist/inapp/renderers/card-template.d.ts.map +0 -1
  69. package/dist/inapp/renderers/carousel-cards.d.ts +0 -15
  70. package/dist/inapp/renderers/carousel-cards.d.ts.map +0 -1
  71. package/dist/inapp/renderers/coachmark-tour.d.ts +0 -24
  72. package/dist/inapp/renderers/coachmark-tour.d.ts.map +0 -1
  73. package/dist/inapp/renderers/games.d.ts +0 -27
  74. package/dist/inapp/renderers/games.d.ts.map +0 -1
  75. package/dist/inapp/renderers/hero.d.ts +0 -23
  76. package/dist/inapp/renderers/hero.d.ts.map +0 -1
  77. package/dist/inapp/renderers/index.d.ts +0 -22
  78. package/dist/inapp/renderers/index.d.ts.map +0 -1
  79. package/dist/inapp/renderers/interactive-contract.d.ts +0 -48
  80. package/dist/inapp/renderers/interactive-contract.d.ts.map +0 -1
  81. package/dist/inapp/renderers/product-recommendation.d.ts +0 -37
  82. package/dist/inapp/renderers/product-recommendation.d.ts.map +0 -1
  83. package/dist/inapp/renderers/progress-bar.d.ts +0 -38
  84. package/dist/inapp/renderers/progress-bar.d.ts.map +0 -1
  85. package/dist/inapp/renderers/progress-core.d.ts +0 -80
  86. package/dist/inapp/renderers/progress-core.d.ts.map +0 -1
  87. package/dist/inapp/renderers/reviews.d.ts +0 -38
  88. package/dist/inapp/renderers/reviews.d.ts.map +0 -1
  89. package/dist/inapp/renderers/sticky-bar.d.ts +0 -14
  90. package/dist/inapp/renderers/sticky-bar.d.ts.map +0 -1
  91. package/dist/inapp/renderers/stories.d.ts +0 -31
  92. package/dist/inapp/renderers/stories.d.ts.map +0 -1
  93. package/dist/inapp/renderers/types.d.ts +0 -147
  94. package/dist/inapp/renderers/types.d.ts.map +0 -1
  95. package/dist/inapp/renderers/video.d.ts +0 -20
  96. package/dist/inapp/renderers/video.d.ts.map +0 -1
  97. package/dist/inbox/AegisInbox.d.ts +0 -106
  98. package/dist/inbox/AegisInbox.d.ts.map +0 -1
  99. package/dist/inbox/index.d.ts +0 -3
  100. package/dist/inbox/index.d.ts.map +0 -1
  101. package/dist/index.d.ts +0 -40
  102. package/dist/index.d.ts.map +0 -1
  103. package/dist/index.js +0 -15311
  104. package/dist/index.js.map +0 -1
  105. package/dist/integrations/react.d.ts +0 -19
  106. package/dist/integrations/react.d.ts.map +0 -1
  107. package/dist/loyalty/AegisLoyaltyManager.d.ts +0 -120
  108. package/dist/loyalty/AegisLoyaltyManager.d.ts.map +0 -1
  109. package/dist/loyalty/index.d.ts +0 -3
  110. package/dist/loyalty/index.d.ts.map +0 -1
  111. package/dist/plugins/registry.d.ts +0 -13
  112. package/dist/plugins/registry.d.ts.map +0 -1
  113. package/dist/push/AegisWebPush.d.ts +0 -199
  114. package/dist/push/AegisWebPush.d.ts.map +0 -1
  115. package/dist/push/AegisWebPush.js +0 -542
  116. package/dist/push/AegisWebPush.js.map +0 -1
  117. package/dist/push/cdn-push.d.ts +0 -21
  118. package/dist/push/cdn-push.d.ts.map +0 -1
  119. package/dist/react.js +0 -70
  120. package/dist/react.js.map +0 -1
  121. package/dist/runtime/AegisMessageRuntime.d.ts +0 -276
  122. package/dist/runtime/AegisMessageRuntime.d.ts.map +0 -1
  123. package/dist/runtime/index.d.ts +0 -3
  124. package/dist/runtime/index.d.ts.map +0 -1
  125. package/dist/snippet.min.js +0 -1
  126. package/dist/state/intent_ledger.d.ts +0 -136
  127. package/dist/state/intent_ledger.d.ts.map +0 -1
  128. package/dist/triggers/ContactScoresFetcher.d.ts +0 -113
  129. package/dist/triggers/ContactScoresFetcher.d.ts.map +0 -1
  130. package/dist/triggers/IntentRuleEvaluator.d.ts +0 -213
  131. package/dist/triggers/IntentRuleEvaluator.d.ts.map +0 -1
  132. package/dist/triggers/IntentSnapshotCollector.d.ts +0 -83
  133. package/dist/triggers/IntentSnapshotCollector.d.ts.map +0 -1
  134. package/dist/triggers/SelectorBinder.d.ts +0 -118
  135. package/dist/triggers/SelectorBinder.d.ts.map +0 -1
  136. package/dist/triggers/TriggerEngine.d.ts +0 -296
  137. package/dist/triggers/TriggerEngine.d.ts.map +0 -1
  138. package/dist/triggers/behaviouralTriggers.d.ts +0 -44
  139. package/dist/triggers/behaviouralTriggers.d.ts.map +0 -1
  140. package/dist/triggers/index.d.ts +0 -11
  141. package/dist/triggers/index.d.ts.map +0 -1
  142. package/dist/triggers/microIntentTriggers.d.ts +0 -80
  143. package/dist/triggers/microIntentTriggers.d.ts.map +0 -1
  144. package/dist/types/config.d.ts +0 -77
  145. package/dist/types/config.d.ts.map +0 -1
  146. package/dist/types/events.d.ts +0 -147
  147. package/dist/types/events.d.ts.map +0 -1
  148. package/dist/types/index.d.ts +0 -5
  149. package/dist/types/index.d.ts.map +0 -1
  150. package/dist/types/plugin.d.ts +0 -21
  151. package/dist/types/plugin.d.ts.map +0 -1
  152. package/dist/types/type-safe-events.d.ts +0 -14
  153. package/dist/types/type-safe-events.d.ts.map +0 -1
  154. package/dist/utils/canonical-identity.d.ts +0 -29
  155. package/dist/utils/canonical-identity.d.ts.map +0 -1
  156. package/dist/utils/consent.d.ts +0 -40
  157. package/dist/utils/consent.d.ts.map +0 -1
  158. package/dist/utils/debounce.d.ts +0 -3
  159. package/dist/utils/debounce.d.ts.map +0 -1
  160. package/dist/utils/device.d.ts +0 -6
  161. package/dist/utils/device.d.ts.map +0 -1
  162. package/dist/utils/identity.d.ts +0 -27
  163. package/dist/utils/identity.d.ts.map +0 -1
  164. package/dist/utils/index.d.ts +0 -7
  165. package/dist/utils/index.d.ts.map +0 -1
  166. package/dist/utils/logger.d.ts +0 -15
  167. package/dist/utils/logger.d.ts.map +0 -1
  168. package/dist/utils/meta-cookies.d.ts +0 -65
  169. package/dist/utils/meta-cookies.d.ts.map +0 -1
  170. package/dist/utils/redact-url.d.ts +0 -56
  171. package/dist/utils/redact-url.d.ts.map +0 -1
  172. package/dist/utils/storage.d.ts +0 -20
  173. package/dist/utils/storage.d.ts.map +0 -1
  174. package/dist/utils/url-parser.d.ts +0 -61
  175. package/dist/utils/url-parser.d.ts.map +0 -1
  176. package/dist/utils/uuid.d.ts +0 -4
  177. package/dist/utils/uuid.d.ts.map +0 -1
  178. package/dist/utils/visitor.d.ts +0 -43
  179. package/dist/utils/visitor.d.ts.map +0 -1
  180. package/dist/widgets/AegisWidgetManager.d.ts +0 -209
  181. package/dist/widgets/AegisWidgetManager.d.ts.map +0 -1
  182. package/dist/widgets/index.d.ts +0 -3
  183. package/dist/widgets/index.d.ts.map +0 -1
@@ -1,233 +0,0 @@
1
- import type { AegisAction } from '../actions';
2
- import type { CardLook } from './card-style';
3
- import type { RenderContext } from './types';
4
- export type CardElementType = 'image' | 'badge' | 'price' | 'title' | 'subtitle' | 'rating' | 'category' | 'cta' | 'icon' | 'text' | 'spacer' | 'progress' | 'countdown' | 'rating_input' | 'poll' | 'nps' | 'group' | 'product_rating_list';
5
- export interface CardElement {
6
- type: CardElementType;
7
- /** Per-element telemetry/heatmap key (reserved contract field — Part I.C). */
8
- id?: string;
9
- /** image: aspect ratio of the media box. */
10
- aspect?: '1/1' | '4/3' | '16/9';
11
- /** image/frame: corner radius (px). */
12
- radius?: number;
13
- /** price: 'pill' (filled chip) | 'plain'. cta: 'fill' | 'outline'. */
14
- variant?: string;
15
- /** price pill / badge background colour. text/icon: foreground colour. */
16
- color?: string;
17
- /** title/subtitle/text: max lines before clamp. */
18
- lines?: number;
19
- /** badge / cta: static label. */
20
- text?: string;
21
- /** cta: render overlaid on the image's bottom-right instead of in flow. */
22
- overlay?: boolean;
23
- /** cta: which canonical AegisAction the button fires (CANONICAL_ACTION_MODEL).
24
- * Absent ⇒ the surface default (cart rail → add_to_cart, else navigate). Lets
25
- * every card campaign re-point the CTA instead of hardcoding add-to-cart. */
26
- cta_action?: 'add_to_cart' | 'open_product' | 'open_cart' | 'open_login' | 'navigate' | 'custom';
27
- /** cta (cta_action='navigate'): target URL / deep link. Falls back to card.cta_url. */
28
- cta_url?: string;
29
- /** cta (cta_action='custom'): host-handled action name passed to onAction. */
30
- cta_custom_name?: string;
31
- /** icon: lucide glyph name from the SDK's curated set (lucide-svg.ts). */
32
- icon_name?: string;
33
- /** icon/text: relative scale. */
34
- size?: 'sm' | 'md' | 'lg';
35
- /** icon: render inside a tinted circle. */
36
- bubble?: boolean;
37
- /** text: content, supports fail-soft {token} interpolation. */
38
- content?: string;
39
- /** text: font weight. */
40
- weight?: 'regular' | 'medium' | 'semibold' | 'bold';
41
- /** text: horizontal alignment. */
42
- align?: 'left' | 'center' | 'right';
43
- goal_type?: 'cart_total' | 'items_in_cart' | 'loyalty_points' | 'referrals';
44
- threshold?: number;
45
- threshold_source?: 'fixed' | 'free_delivery_setting';
46
- reward_text?: string;
47
- /** progress: bar fill colour (defaults to accent). */
48
- fill?: string;
49
- show_pct?: boolean;
50
- currency_symbol?: string;
51
- /** progress: fire the shared celebrate reaction (Lottie + confetti) the first
52
- * time the goal is reached. Defaults ON — set false to keep it quiet. */
53
- celebrate_on_complete?: boolean;
54
- /** ISO-8601 target the timer counts down to. Auto-hides if absent/invalid
55
- * (bounded-vocabulary rule — never fabricate a fake countdown). */
56
- countdown_target?: string;
57
- /** Lead-in label before the time (default "Ends in"). */
58
- countdown_label?: string;
59
- /** rating_input: number of stars (2–10, default 5). Records 'star_rating'. */
60
- rating_scale?: number;
61
- /** poll: single-choice options (≥2 to render; records 'quick_poll'). The
62
- * prompt/question reuses `content`. Auto-hides with fewer than 2 options. */
63
- poll_options?: string[];
64
- /** rating_input / poll: confirmation note shown AFTER the customer responds
65
- * (the "thank-you" state). Blank → a sensible default. Operator-controlled
66
- * post-response acknowledgement. */
67
- thanks_text?: string;
68
- /** nps: enable the band-conditional reason-capture step after the score. */
69
- nps_followup_enabled?: boolean;
70
- /** nps: per-band reason prompts (fallbacks applied when blank). */
71
- nps_follow_up_promoter?: string;
72
- nps_follow_up_passive?: string;
73
- nps_follow_up_detractor?: string;
74
- /** nps: quick-pick chips that fill the reason textarea. */
75
- nps_reason_chips?: string[];
76
- /** nps: score at/above which the contact is a promoter (default 9). */
77
- nps_promoter_threshold?: number;
78
- /** nps: promoter-only review/referral CTA shown on the thank-you takeover. */
79
- nps_promoter_url?: string;
80
- nps_promoter_cta?: string;
81
- /** rating_input: enable the low-score reason-capture step. */
82
- rating_followup_enabled?: boolean;
83
- /** rating_input: stars at/below which the low-score follow-up fires (default ceil(80%)). */
84
- rating_followup_threshold?: number;
85
- rating_followup_prompt?: string;
86
- /** rating_input: high-score review/referral CTA. */
87
- rating_high_url?: string;
88
- rating_high_cta?: string;
89
- /**
90
- * rating_input: which lucide glyph the scale draws — 'star' (default) or
91
- * 'heart'. Authored in the dashboard's star-rating editor and persisted by
92
- * BOTH schemas (zod + pydantic), but unread here until 2026-08-13, so every
93
- * widget drew stars whatever the operator picked.
94
- *
95
- * Deliberately NOT an emoji option, despite the editor historically offering
96
- * one: this renderer is lucide-only by design rule, and an emoji glyph here
97
- * would be UI chrome. An 'emoji' value from an older config falls back to
98
- * 'star' rather than rendering nothing.
99
- */
100
- rating_icon?: 'star' | 'heart' | string;
101
- /** Where the item array comes from. 'order' = the slot's data-rateable-items
102
- * (trusted Aegis surfaces) OR token→server-resolve (untrusted origins). The
103
- * ONLY value at launch — convention binding (PRODUCT_RATING_LIST_ELEMENT_PLAN
104
- * §3/§7). Items are NEVER authored on the element. */
105
- rating_source?: 'order';
106
- /** Show a product thumbnail per row (default true). Degrades to a tinted
107
- * monogram when the item has no image_url. */
108
- show_thumbnail?: boolean;
109
- /** Row density: 'card' (thumbnail + name + stars, default) | 'compact'. */
110
- rating_layout?: 'card' | 'compact';
111
- /** G6 — show the "Add a written review" disclosure (a textarea that submits as
112
- * review_text → external_reviews). Off by default (pure numeric capture). */
113
- allow_review_text?: boolean;
114
- /** G6 — show the photo/video picker (uploads to /v1/in-app/review-media →
115
- * media_urls[] → external_reviews.media + the loyalty photo/video bonus).
116
- * Off by default. Requires a host context that exposes apiHost + writeKey. */
117
- allow_review_media?: boolean;
118
- /** G6 — composer earn hint shown under the disclosure toggle (e.g.
119
- * "Earn 100 pts · +50 photo · +75 video"). Authored copy only — never a live
120
- * points calc; blank → no hint. */
121
- review_earn_hint?: string;
122
- /** Headline of the detractor form (default "Sorry we missed the mark."). */
123
- detractor_headline?: string;
124
- /** Prompt under the headline (default "What went wrong?"). */
125
- detractor_prompt?: string;
126
- /** Quick-pick reason chips (default Late / Quality / Wrong item). */
127
- detractor_chips?: string[];
128
- /** Submit button label (default "Send to the team"). */
129
- detractor_send_label?: string;
130
- /** Post-submit confirmation line (default "Thank you — the team will
131
- * personally reach out."). */
132
- detractor_thanks?: string;
133
- height?: number;
134
- /** group: nested layout + children. */
135
- layout?: 'stack' | 'row';
136
- gap?: number;
137
- elements?: CardElement[];
138
- }
139
- export interface CardFrame {
140
- bg?: string;
141
- border?: string;
142
- radius?: number | string;
143
- /** Box-shadow control: 'none' | false → flat (match flat host sections);
144
- * a CSS shadow string → custom; absent → legacy floating default. */
145
- shadow?: string | false;
146
- /** null/absent ⇒ fall back to --aegis-brand-accent (tenant brand). */
147
- accent?: string | null;
148
- /** 'stack' (default, column) | 'row' | 'grid'. */
149
- layout?: 'stack' | 'row' | 'grid';
150
- /** grid: column count. */
151
- columns?: number;
152
- /** flex/grid gap (px). */
153
- gap?: number;
154
- /** explicit width (px or CSS). Default: container-driven (responsive). */
155
- width?: number | string;
156
- min_width?: number;
157
- max_width?: number;
158
- /** explicit height (px). Default: content-driven (fits its elements). */
159
- height?: number;
160
- min_height?: number;
161
- /** Card font family. Absent ⇒ the default Urbanist stack (a free, license-
162
- * clean geometric sans in place of Zepto's commercial "Gilroy"); the SDK
163
- * lazy-loads Urbanist so it renders on ANY host page. The sentinel
164
- * `'inherit'` opts OUT — the card inherits the host page font instead. Any
165
- * other value is a CSS font stack (sanitized before use). */
166
- fontFamily?: string;
167
- /** Fire the shared `playReaction` once when this card mounts (a hero/delight
168
- * moment), instead of only on a `progress` element completing. Mirrors
169
- * CelebrateConfigSchema. */
170
- celebrate_on_show?: boolean;
171
- /** Which shared reaction intent to play. Default 'celebrate'. */
172
- celebrate_reaction?: 'celebrate' | 'affirm' | 'acknowledge';
173
- /** 'card' (default) = anchored to the card; 'viewport' = full-page hero burst
174
- * (use with an `overlay` delivery surface). */
175
- celebrate_scope?: 'card' | 'viewport';
176
- /** Optional Lottie file override for the reaction. */
177
- celebrate_lottie?: string;
178
- }
179
- export interface CardTemplate {
180
- id?: string;
181
- name?: string;
182
- /** (Phase B) library template this spec was cloned from — usage count only. */
183
- source_id?: string;
184
- frame?: CardFrame;
185
- elements?: CardElement[];
186
- }
187
- /** Card payload shape shared by both renderers (super-set). */
188
- export interface TemplateCard {
189
- image_url?: string;
190
- video_url?: string;
191
- title?: string;
192
- body?: string;
193
- cta_text?: string;
194
- cta_url?: string;
195
- metadata?: Record<string, unknown>;
196
- /** Per-card CardLook override (global card_style merged with card_overrides[sku]). */
197
- style?: CardLook;
198
- }
199
- /** The built-in "Clean" layout — the runtime default when a campaign carries no
200
- * `card_template` and no legacy `card_style`. Mirrors the web gallery's Clean. */
201
- export declare const DEFAULT_CARD_TEMPLATE: CardTemplate;
202
- /** Resolve the campaign-global template (template → legacy card_style → default). */
203
- export declare function resolveGlobalTemplate(ic: Record<string, unknown>): CardTemplate;
204
- /** Overlay a per-card CardLook (per-SKU override) onto the global template. */
205
- export declare function applyPerCardOverride(tpl: CardTemplate, look: CardLook): CardTemplate;
206
- /**
207
- * Resolve the canonical `AegisAction` a CTA button fires. The operator picks it
208
- * per-element via `el.cta_action`; when unset it falls back to the SURFACE
209
- * default so existing campaigns keep their behaviour (cart rail → add_to_cart,
210
- * navigate surfaces → navigate). This is the single place "what does this CTA do"
211
- * is decided for every card-based campaign (CANONICAL_ACTION_MODEL).
212
- */
213
- export declare function buildCtaAction(el: CardElement, card: TemplateCard, meta: Record<string, unknown>, inline: boolean, sanitizeUrl: (u: string) => string | null): AegisAction;
214
- /**
215
- * Render one card tile from the resolved template. Shared by every card surface.
216
- *
217
- * `action` sets the SURFACE DEFAULT for the CTA + body-click (decoupled from
218
- * sizing, which follows `layout`). The per-element `cta_action` overrides the
219
- * CTA default; both resolve to a canonical `AegisAction` via `ctx.dispatchAction`
220
- * → the host's `onAction` handler.
221
- * 'cart' → CTA default `add_to_cart`, body click → `open_product`
222
- * (storefront recommendation RAIL).
223
- * 'navigate' → CTA default `navigate` (cta_url), body click → `navigate`
224
- * (overlay sheet + the merchandising carousel).
225
- */
226
- export declare function renderCardFromTemplate(card: TemplateCard, opts: {
227
- template: CardTemplate;
228
- ctx: RenderContext;
229
- action: 'cart' | 'navigate';
230
- layout?: string;
231
- layoutAccent: string;
232
- }): HTMLElement;
233
- //# sourceMappingURL=card-template.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"card-template.d.ts","sourceRoot":"","sources":["../../../src/inapp/renderers/card-template.ts"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAQ7C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,MAAM,MAAM,eAAe,GACvB,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,UAAU,GACV,QAAQ,GACR,UAAU,GACV,KAAK,GAEL,MAAM,GACN,MAAM,GACN,QAAQ,GACR,UAAU,GACV,WAAW,GAEX,cAAc,GACd,MAAM,GACN,KAAK,GACL,OAAO,GACP,qBAAqB,CAAC;AAE1B,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,eAAe,CAAC;IACtB,8EAA8E;IAC9E,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,4CAA4C;IAC5C,MAAM,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;IAChC,uCAAuC;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0EAA0E;IAC1E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mDAAmD;IACnD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iCAAiC;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2EAA2E;IAC3E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;kFAE8E;IAC9E,UAAU,CAAC,E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EAClB,IAAI,EAAE;IACJ,QAAQ,EAAE,YAAY,CAAC;IACvB,GAAG,EAAE,aAAa,CAAC;IACnB,MAAM,EAAE,MAAM,GAAG,UAAU,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;CACtB,GACA,WAAW,CAoUb"}
@@ -1,15 +0,0 @@
1
- /**
2
- * CarouselCards renderer — a swipeable / autoplaying sequence of product
3
- * cards. Used for post-purchase upsells, cross-sell, and "recently viewed"
4
- * surfaces. The entire card list is pre-bundled — no network call on
5
- * trigger; slide advance is pure client state.
6
- *
7
- * Data shape (interactive_config, populated at campaign create time and
8
- * validated server-side):
9
- * cards: Array<{ image_url?, title, body?, cta_text?, cta_url? }>
10
- * autoplay_ms?: number // 0 = manual advance only
11
- * loop?: boolean // wrap to card 0 on last-next
12
- */
13
- import type { RenderContext } from './types';
14
- export declare function renderCarouselCards(ctx: RenderContext): void;
15
- //# sourceMappingURL=carousel-cards.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"carousel-cards.d.ts","sourceRoot":"","sources":["../../../src/inapp/renderers/carousel-cards.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAS7C,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI,CA4O5D"}
@@ -1,24 +0,0 @@
1
- /**
2
- * CoachmarkTour renderer — a guided, multi-step walkthrough anchored to
3
- * DOM elements via CSS selectors. One tooltip appears at a time with
4
- * next/back navigation; completion + skip are persisted per contact via
5
- * localStorage under the `resume_key`, so an abandoned tour resumes on
6
- * the next visit instead of restarting or re-bothering the user.
7
- *
8
- * interactive_config:
9
- * steps: Array<{
10
- * anchor_web?: string, // CSS selector for THIS platform
11
- * anchor_android?: string, // ignored on web
12
- * anchor_ios?: string, // ignored on web
13
- * title: string,
14
- * body: string,
15
- * placement?: 'top' | 'bottom' | 'left' | 'right',
16
- * cta_text?: string,
17
- * }>
18
- * resume_key: string,
19
- * allow_skip?: boolean,
20
- * show_progress_dots?: boolean,
21
- */
22
- import type { RenderContext } from './types';
23
- export declare function renderCoachmarkTour(ctx: RenderContext): void;
24
- //# sourceMappingURL=coachmark-tour.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"coachmark-tour.d.ts","sourceRoot":"","sources":["../../../src/inapp/renderers/coachmark-tour.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AA6C7C,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI,CAyR5D"}
@@ -1,27 +0,0 @@
1
- /**
2
- * Gamification renderers — the 11 locked game mechanics (2026-06-14):
3
- * streak · milestone · challenge · achievements · leaderboard · check_in ·
4
- * stamp_card · mystery_box · tier_ladder · lucky_draw · slot_machine
5
- *
6
- * All are config-authored (operator sets the values / demo state via
7
- * interactive_config; the serve endpoint can later enrich with the customer's
8
- * real streak/stamps/tier). Each reuses campaign.title/body for the heading and
9
- * grants its reward via `ctx.submitResponse` on the key action (claim / play /
10
- * reveal) + the campaign CTA via `ctx.navigate`. Dispatched from
11
- * AegisInAppManager.renderInteractive (these are interactive sub_types).
12
- */
13
- import type { RenderContext } from './types';
14
- export declare function renderStreak(ctx: RenderContext): void;
15
- export declare function renderMilestone(ctx: RenderContext): void;
16
- export declare function renderChallenge(ctx: RenderContext): void;
17
- export declare function renderAchievements(ctx: RenderContext): void;
18
- export declare function renderLeaderboard(ctx: RenderContext): void;
19
- export declare function renderCheckIn(ctx: RenderContext): void;
20
- export declare function renderStampCard(ctx: RenderContext): void;
21
- export declare function renderMysteryBox(ctx: RenderContext): void;
22
- export declare function renderTierLadder(ctx: RenderContext): void;
23
- export declare function renderLuckyDraw(ctx: RenderContext): void;
24
- export declare function renderSlotMachine(ctx: RenderContext): void;
25
- export declare const GAME_SUB_TYPES: string[];
26
- export declare function renderGame(ctx: RenderContext, subType: string): boolean;
27
- //# sourceMappingURL=games.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"games.d.ts","sourceRoot":"","sources":["../../../src/inapp/renderers/games.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAOH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAiJ7C,wBAAgB,YAAY,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI,CAgCrD;AAGD,wBAAgB,eAAe,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI,CAsBxD;AAGD,wBAAgB,eAAe,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI,CAiBxD;AAGD,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI,CAwB3D;AAGD,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI,CAgB1D;AAGD,wBAAgB,aAAa,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI,CAoBtD;AAgCD,wBAAgB,eAAe,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI,CAyJxD;AAGD,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI,CAuDzD;AAGD,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI,CA8BzD;AAGD,wBAAgB,eAAe,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI,CAsBxD;AAoFD,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI,CA2F1D;AAiBD,eAAO,MAAM,cAAc,UAA8B,CAAC;AAE1D,wBAAgB,UAAU,CAAC,GAAG,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAKvE"}
@@ -1,23 +0,0 @@
1
- /**
2
- * Hero / banner renderer — the storefront hero, now a SELF-DESCRIBING in-app
3
- * campaign instead of a per-surface native component. The SDK injects it into a
4
- * plain `[data-aegis-slot="hero"]` so the SAME campaign renders identically on
5
- * ACS, a 3rd-party website, the Bill page, etc. (ACS is the testbed.)
6
- *
7
- * Data shape (`interactive_config`):
8
- * cards: Array<{ media_url|image_url, media_type, headline|title,
9
- * subhead|body, cta_label|cta_text, cta_target|cta_url,
10
- * image_url_mobile? }>
11
- * chrome: { variant, aspect_ratio, radius, overlay, text_position,
12
- * cta_style, autoplay_ms, loop, accent } // how it DRAWS
13
- *
14
- * `chrome` is the portable "look" so the operator authors once and it renders
15
- * surface-framed everywhere. Ported from the cashier-portal <HeroBanner> visual.
16
- */
17
- import type { RenderContext } from './types';
18
- /**
19
- * Render the hero into `target` (the slot element). Returns false (no-op) when
20
- * there are no cards so the caller can keep the slot's SSR default/skeleton.
21
- */
22
- export declare function renderHeroInline(ctx: RenderContext, target: HTMLElement): boolean;
23
- //# sourceMappingURL=hero.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hero.d.ts","sourceRoot":"","sources":["../../../src/inapp/renderers/hero.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AA2D7C;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,aAAa,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CA0JjF"}
@@ -1,22 +0,0 @@
1
- /**
2
- * Barrel for the preload-first renderers. These are pure DOM-mutation
3
- * functions that operate on a shared `RenderContext` — they never do
4
- * network I/O at render time, consistent with the preload-first contract.
5
- */
6
- export type { RenderContext, Renderer, CartState } from './types';
7
- export { renderCarouselCards } from './carousel-cards';
8
- export { renderStickyBar } from './sticky-bar';
9
- export { renderProgressBar, renderProgressBarInline } from './progress-bar';
10
- export { renderCoachmarkTour } from './coachmark-tour';
11
- export { renderProductRecommendation, renderProductRecommendationInline, } from './product-recommendation';
12
- export { type CardLook } from './card-style';
13
- export { renderCardFromTemplate, resolveGlobalTemplate, DEFAULT_CARD_TEMPLATE, type CardTemplate, type CardElement, type CardFrame, type TemplateCard, } from './card-template';
14
- export { renderStories, renderStoriesRings } from './stories';
15
- export { renderGame, GAME_SUB_TYPES } from './games';
16
- export { renderVideo, renderVideoInline } from './video';
17
- export { renderHeroInline } from './hero';
18
- export { renderActiveWebChat, disposeActiveWebChat } from './active-web-chat';
19
- export type { ActiveWebChatCredentials } from './active-web-chat';
20
- export { renderReviewsInline, renderReviewsOverlay } from './reviews';
21
- export type { ReviewsCredentials } from './reviews';
22
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/inapp/renderers/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EACL,2BAA2B,EAC3B,iCAAiC,GAClC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EACL,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,YAAY,GAClB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC9E,YAAY,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACtE,YAAY,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC"}
@@ -1,48 +0,0 @@
1
- /**
2
- * Interactive widget contract — Zod-FREE mirror of the canonical registry in
3
- * `@aegis/shared-types/src/interactive-registry.ts` (Layer 1, SDUI unification).
4
- *
5
- * The web-SDK is a standalone, ZERO-dependency published package: it must NOT
6
- * import `zod`. The SDK only needs the contract TYPES + the response-type / band
7
- * constants to emit conforming payloads (validation runs author-time in the
8
- * editor and ingest-time in the backend, both against the Zod registry).
9
- *
10
- * The region between the sync sentinels below is kept identical to the contract
11
- * tokens of the Zod registry by `scripts/check-interactive-contract-sync.mjs`
12
- * (wired into `npm run lint`). Edit the registry → edit here, or the build fails.
13
- */
14
- export type InteractiveWidgetType = 'progress' | 'rating' | 'poll' | 'nps' | 'countdown';
15
- export type WidgetCapability = 'followup' | 'bands' | 'data_bound' | 'celebrate' | 'thanks';
16
- export type NpsBand = 'detractor' | 'passive' | 'promoter';
17
- export type CelebrateReaction = 'celebrate' | 'affirm' | 'acknowledge';
18
- export type CelebrateScope = 'card' | 'viewport';
19
- export interface CelebrateConfig {
20
- celebrate_on_show?: boolean;
21
- celebrate_reaction?: CelebrateReaction;
22
- celebrate_scope?: CelebrateScope;
23
- celebrate_lottie?: string;
24
- }
25
- export interface RatingPayload {
26
- stars: number;
27
- feedback_text?: string;
28
- properties?: Record<string, string | number | boolean>;
29
- }
30
- export interface PollPayload {
31
- option_index: number;
32
- option_label: string;
33
- properties?: Record<string, string | number | boolean>;
34
- }
35
- export interface NpsPayload {
36
- score: number;
37
- band?: NpsBand;
38
- reason_text?: string;
39
- properties?: Record<string, string | number | boolean>;
40
- }
41
- export declare const RESPONSE_TYPE: {
42
- readonly rating: "rating";
43
- readonly poll: "poll";
44
- readonly nps: "nps";
45
- };
46
- /** Derive the NPS band from a score (mirror of registry npsBandFromScore). */
47
- export declare function npsBandFromScore(score: number): NpsBand;
48
- //# sourceMappingURL=interactive-contract.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"interactive-contract.d.ts","sourceRoot":"","sources":["../../../src/inapp/renderers/interactive-contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,MAAM,MAAM,qBAAqB,GAAG,UAAU,GAAG,QAAQ,GAAG,MAAM,GAAG,KAAK,GAAG,WAAW,CAAC;AACzF,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,OAAO,GAAG,YAAY,GAAG,WAAW,GAAG,QAAQ,CAAC;AAC5F,MAAM,MAAM,OAAO,GAAG,WAAW,GAAG,SAAS,GAAG,UAAU,CAAC;AAK3D,MAAM,MAAM,iBAAiB,GAAG,WAAW,GAAG,QAAQ,GAAG,aAAa,CAAC;AACvE,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,UAAU,CAAC;AACjD,MAAM,WAAW,eAAe;IAC9B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,kBAAkB,CAAC,EAAE,iBAAiB,CAAC;IACvC,eAAe,CAAC,EAAE,cAAc,CAAC;IACjC,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,aAAa;IAAG,KAAK,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAA;CAAE;AAChI,MAAM,WAAW,WAAW;IAAG,YAAY,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAA;CAAE;AACnI,MAAM,WAAW,UAAU;IAAG,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAA;CAAE;AAE3I,eAAO,MAAM,aAAa;;;;CAA0D,CAAC;AAGrF,8EAA8E;AAC9E,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAIvD"}
@@ -1,37 +0,0 @@
1
- /**
2
- * ProductRecommendation renderer — personalized product grid/row rendered
3
- * from `interactive_config.cards[]` that the cell-plane populated at
4
- * bundle-assembly time. The SDK never calls a product-API at render
5
- * time — the preload contract is that the recommended products are
6
- * already in the bundle.
7
- *
8
- * The card TILE itself is painted by the shared card-template interpreter
9
- * (`renderCardFromTemplate`) — the SAME path used by the inline rail and the
10
- * carousel — so the look is authored in compose (`interactive_config.card_template`)
11
- * and the SDK carries no per-surface card layout. This module owns only the
12
- * SHELL: the overlay sheet vs the inline rail, the header, grid/row layout,
13
- * scroll affordance and dismiss.
14
- *
15
- * interactive_config:
16
- * rec_source?: 'similar_items' | 'also_viewed' | 'also_purchased' | 'trending'
17
- * | 'personalized' | 'manual'
18
- * (metadata only — the actual product list is in `cards[]`)
19
- * rec_count?: number (display hint; rendering is driven by cards.length)
20
- * rec_layout?: 'grid' | 'row' default 'grid'
21
- * rec_cta_text?: string default CTA label (also carried per-card on cta_text)
22
- * card_template?: CardTemplate (the declarative card look; legacy card_style adapted)
23
- * cards: Array<{ image_url?, title?, body?, cta_url?, metadata?, style? }>
24
- */
25
- import type { RenderContext } from './types';
26
- export declare function renderProductRecommendation(ctx: RenderContext): void;
27
- /**
28
- * Inline (embedded_card) variant — renders the recommendation rail INTO a
29
- * host `[data-aegis-slot]` element instead of a fixed overlay sheet. This is
30
- * the "You might also like" rail on the PDP / storefront commerce slot.
31
- *
32
- * Returns `true` when a rail was painted, `false` when there are no products
33
- * (so the caller can avoid firing an impression for an empty slot). The slot
34
- * collapses to nothing when empty — no orphaned heading.
35
- */
36
- export declare function renderProductRecommendationInline(ctx: RenderContext, target: HTMLElement): boolean;
37
- //# sourceMappingURL=product-recommendation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"product-recommendation.d.ts","sourceRoot":"","sources":["../../../src/inapp/renderers/product-recommendation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAMH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAW7C,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI,CAuHpE;AAED;;;;;;;;GAQG;AACH,wBAAgB,iCAAiC,CAC/C,GAAG,EAAE,aAAa,EAClB,MAAM,EAAE,WAAW,GAClB,OAAO,CAqGT"}
@@ -1,38 +0,0 @@
1
- /**
2
- * ProgressBar renderer — a persistent bar that shows the user's progress
3
- * toward a reward threshold (free shipping, loyalty tier, referral bonus).
4
- *
5
- * Two sources of the current value:
6
- * 'client' — cheap: read from window.Shopify / WooCommerce / Magento
7
- * cart globals. Untrusted; fine for visual-only hints.
8
- * 'sse' — trusted: cell-plane pushes current_value via SSE to the
9
- * already-shipped realtime server. For cart-gated rewards
10
- * (must agree with server-side checkout guard), prefer SSE.
11
- *
12
- * For Phase 1 we implement CLIENT mode end-to-end. SSE mode reads
13
- * `window.__aegisProgressSSE[campaign.id]` if populated by a parent app
14
- * — higher-level integration (the SSE bridge) can push values there.
15
- *
16
- * interactive_config:
17
- * progress_goal_type: 'cart_total' | 'items_in_cart' | 'loyalty_points' | 'referrals'
18
- * progress_threshold: number
19
- * progress_reward_text?: string
20
- * progress_source?: 'client' | 'sse' default 'client'
21
- */
22
- import type { RenderContext } from './types';
23
- /**
24
- * Overlay progress bar — a fixed bar pinned to the bottom of the viewport.
25
- * Used by third-party storefront embeds (Shopify/Woo/Magento) that have no
26
- * native footer to host the mechanic.
27
- */
28
- export declare function renderProgressBar(ctx: RenderContext): void;
29
- /**
30
- * Inline progress bar — renders the SAME live mechanic into a
31
- * `[data-aegis-slot]` anchor instead of a fixed overlay. This is how a
32
- * first-party storefront's value-bar footer is driven by a campaign: the host
33
- * owns the structural cart-summary card + a slot, and an operator-authored
34
- * `progress_bar` campaign fills the slot (replacing any host-rendered default).
35
- * Returns true when rendered so the slot dispatcher can track the impression.
36
- */
37
- export declare function renderProgressBarInline(ctx: RenderContext, target: HTMLElement): boolean;
38
- //# sourceMappingURL=progress-bar.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"progress-bar.d.ts","sourceRoot":"","sources":["../../../src/inapp/renderers/progress-bar.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAoO7C;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI,CAG1D;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,aAAa,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAKxF"}
@@ -1,80 +0,0 @@
1
- /**
2
- * Progress-bar mechanic — the ONE computation shared by BOTH web-SDK progress
3
- * renderers: the standalone `progress_bar` widget (`progress-bar.ts`) and the
4
- * `progress` card element (`card-template.ts::buildProgressElement`). Before this
5
- * module each renderer re-implemented the pct / completion / remaining /
6
- * milestone math independently (drift waiting to happen).
7
- *
8
- * This is a BYTE-FOR-BYTE MIRROR of `@aegis/shared-types/src/progress.ts` (which
9
- * the dashboard compose preview imports). The SDK is a standalone published
10
- * package and cannot depend on the workspace `@aegis/shared-types` without
11
- * leaking it into the SDK's public `.d.ts`, so the core is duplicated here and
12
- * both copies are pinned to the same golden vectors (`progress-core.test.ts` +
13
- * `shared-types/src/progress.test.ts`). Change one, change both, or a test fails.
14
- *
15
- * Pure — no DOM, no SDK context — so it's trivially testable and identical
16
- * across runtime + preview.
17
- */
18
- export type ProgressGoalType = 'cart_total' | 'items_in_cart' | 'loyalty_points' | 'referrals';
19
- export type ProgressMilestone = 'q25' | 'q50' | 'q75' | 'unlocked';
20
- export interface ProgressComputeInput {
21
- goalType: ProgressGoalType;
22
- threshold: number;
23
- current: number;
24
- }
25
- export interface ProgressState {
26
- pct: number;
27
- complete: boolean;
28
- remaining: number;
29
- milestonesReached: ProgressMilestone[];
30
- }
31
- export declare function computeProgress(input: ProgressComputeInput): ProgressState;
32
- export interface CardProgressLabelInput extends ProgressComputeInput {
33
- rewardText?: string;
34
- currencySymbol?: string;
35
- showPct?: boolean;
36
- }
37
- export declare function cardProgressSubLabel(i: CardProgressLabelInput): {
38
- text: string;
39
- complete: boolean;
40
- };
41
- export declare function readGoalFromCart(goalType: ProgressGoalType, cart: {
42
- total?: number;
43
- itemCount?: number;
44
- } | undefined | null): number | undefined;
45
- export interface CountdownState {
46
- totalMs: number;
47
- expired: boolean;
48
- days: number;
49
- hours: number;
50
- minutes: number;
51
- seconds: number;
52
- display: string;
53
- }
54
- export declare function computeCountdown(targetMs: number, nowMs: number): CountdownState;
55
- export interface FlowStepRecord {
56
- step_id: string;
57
- response_type?: string;
58
- payload?: Record<string, unknown>;
59
- }
60
- export interface FlowAccumulator {
61
- recordStep(r: FlowStepRecord): void;
62
- steps(): FlowStepRecord[];
63
- consolidated(): {
64
- steps: FlowStepRecord[];
65
- step_count: number;
66
- completed: boolean;
67
- };
68
- markCompleted(): void;
69
- }
70
- export declare function createFlowAccumulator(): FlowAccumulator;
71
- export type PlaybackPhase = 'idle' | 'playing' | 'paused' | 'completed';
72
- export interface PlaybackState {
73
- phase: PlaybackPhase;
74
- pct: number;
75
- positionSec: number;
76
- durationSec: number;
77
- reachedComplete: boolean;
78
- }
79
- export declare function computePlaybackState(positionSec: number, durationSec: number, phase: PlaybackPhase): PlaybackState;
80
- //# sourceMappingURL=progress-core.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"progress-core.d.ts","sourceRoot":"","sources":["../../../src/inapp/renderers/progress-core.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,MAAM,gBAAgB,GACxB,YAAY,GACZ,eAAe,GACf,gBAAgB,GAChB,WAAW,CAAC;AAEhB,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,UAAU,CAAC;AAEnE,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,iBAAiB,EAAE,CAAC;CACxC;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,aAAa,CAgB1E;AAED,MAAM,WAAW,sBAAuB,SAAQ,oBAAoB;IAClE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,sBAAsB,GAAG;IAC/D,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;CACnB,CAWA;AAED,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,gBAAgB,EAC1B,IAAI,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,GAAG,IAAI,GAC9D,MAAM,GAAG,SAAS,CAKpB;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,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