@encorekit/web-sdk 2.3.0 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (265) hide show
  1. package/README.md +66 -1
  2. package/dist/cjs/index.cjs +1 -1
  3. package/dist/cjs/index.cjs.map +1 -1
  4. package/dist/cjs/preview.cjs +2 -0
  5. package/dist/cjs/preview.cjs.map +1 -0
  6. package/dist/cjs/react.cjs +1 -1
  7. package/dist/cjs/react.cjs.map +1 -1
  8. package/dist/esm/chunks/ClaimReminder-DFyrm5bJ.js +2 -0
  9. package/dist/esm/chunks/ClaimReminder-DFyrm5bJ.js.map +1 -0
  10. package/dist/esm/chunks/GiftsButton-B0lVB463.js +2 -0
  11. package/dist/esm/chunks/GiftsButton-B0lVB463.js.map +1 -0
  12. package/dist/esm/chunks/TriggerHost-CNTiNrTH.js +2 -0
  13. package/dist/esm/chunks/TriggerHost-CNTiNrTH.js.map +1 -0
  14. package/dist/esm/chunks/autoPops-CngtK_R0.js +2 -0
  15. package/dist/esm/chunks/autoPops-CngtK_R0.js.map +1 -0
  16. package/dist/esm/chunks/customClaim-B4uj-aOc.js +2 -0
  17. package/dist/esm/chunks/customClaim-B4uj-aOc.js.map +1 -0
  18. package/dist/esm/chunks/eligibility-BY7fL8Ve.js +2 -0
  19. package/dist/esm/chunks/eligibility-BY7fL8Ve.js.map +1 -0
  20. package/dist/esm/chunks/index-CaBSqauy.js +2 -0
  21. package/dist/esm/chunks/index-CaBSqauy.js.map +1 -0
  22. package/dist/esm/chunks/lookValues-B9z2VWpH.js +2 -0
  23. package/dist/esm/chunks/lookValues-B9z2VWpH.js.map +1 -0
  24. package/dist/esm/chunks/sduiView-Ds7QtFId.js +2 -0
  25. package/dist/esm/chunks/sduiView-Ds7QtFId.js.map +1 -0
  26. package/dist/esm/chunks/spot-DkKMLpB-.js +2 -0
  27. package/dist/esm/chunks/spot-DkKMLpB-.js.map +1 -0
  28. package/dist/esm/chunks/template-B9p4CbPD.js +2 -0
  29. package/dist/esm/chunks/template-B9p4CbPD.js.map +1 -0
  30. package/dist/esm/chunks/textSlots-BnwxUg9V.js +2 -0
  31. package/dist/esm/chunks/textSlots-BnwxUg9V.js.map +1 -0
  32. package/dist/esm/chunks/timers-Bva4yoGM.js +2 -0
  33. package/dist/esm/chunks/timers-Bva4yoGM.js.map +1 -0
  34. package/dist/esm/index.js +1 -1
  35. package/dist/esm/index.js.map +1 -1
  36. package/dist/esm/preview.js +2 -0
  37. package/dist/esm/preview.js.map +1 -0
  38. package/dist/esm/react.js +1 -1
  39. package/dist/esm/react.js.map +1 -1
  40. package/dist/umd/encore.min.js +1 -1
  41. package/dist/umd/encore.min.js.map +1 -1
  42. package/package.json +9 -1
  43. package/types/analytics/DiagnosticsOutbox.d.ts +1 -0
  44. package/types/analytics/DiagnosticsOutbox.d.ts.map +1 -1
  45. package/types/analytics/events.d.ts +105 -5
  46. package/types/analytics/events.d.ts.map +1 -1
  47. package/types/analytics/models.d.ts +2 -0
  48. package/types/analytics/models.d.ts.map +1 -1
  49. package/types/analytics/transport.d.ts +6 -0
  50. package/types/analytics/transport.d.ts.map +1 -1
  51. package/types/api/APIClient.d.ts +58 -3
  52. package/types/api/APIClient.d.ts.map +1 -1
  53. package/types/api/contract.d.ts +4 -1
  54. package/types/api/contract.d.ts.map +1 -1
  55. package/types/api/generated/types.d.ts +420 -39
  56. package/types/api/generated/types.d.ts.map +1 -1
  57. package/types/api/models.d.ts +18 -2
  58. package/types/api/models.d.ts.map +1 -1
  59. package/types/api/offerBuilder.d.ts +10 -4
  60. package/types/api/offerBuilder.d.ts.map +1 -1
  61. package/types/core/Encore.d.ts +145 -3
  62. package/types/core/Encore.d.ts.map +1 -1
  63. package/types/core/OfferManager.d.ts +25 -3
  64. package/types/core/OfferManager.d.ts.map +1 -1
  65. package/types/core/PlacementBuilder.d.ts +6 -1
  66. package/types/core/PlacementBuilder.d.ts.map +1 -1
  67. package/types/core/SignalManager.d.ts.map +1 -1
  68. package/types/core/StorageManager.d.ts +3 -2
  69. package/types/core/StorageManager.d.ts.map +1 -1
  70. package/types/core/StrictUnlockReconciler.d.ts +1 -1
  71. package/types/core/StrictUnlockReconciler.d.ts.map +1 -1
  72. package/types/core/claimHandle.d.ts +44 -0
  73. package/types/core/claimHandle.d.ts.map +1 -0
  74. package/types/core/claimLog.d.ts +102 -0
  75. package/types/core/claimLog.d.ts.map +1 -0
  76. package/types/core/claimRefusal.d.ts +3 -0
  77. package/types/core/claimRefusal.d.ts.map +1 -0
  78. package/types/core/claimStatusCheck.d.ts +62 -0
  79. package/types/core/claimStatusCheck.d.ts.map +1 -0
  80. package/types/core/giftVariant.d.ts +5 -0
  81. package/types/core/giftVariant.d.ts.map +1 -1
  82. package/types/core/hostDisplay.d.ts +9 -2
  83. package/types/core/hostDisplay.d.ts.map +1 -1
  84. package/types/core/sduiVariables.d.ts +20 -0
  85. package/types/core/sduiVariables.d.ts.map +1 -0
  86. package/types/core/strings.d.ts +114 -0
  87. package/types/core/strings.d.ts.map +1 -0
  88. package/types/core/unlockCode.d.ts +8 -1
  89. package/types/core/unlockCode.d.ts.map +1 -1
  90. package/types/core/userKeys.d.ts +7 -0
  91. package/types/core/userKeys.d.ts.map +1 -0
  92. package/types/core/version.d.ts +1 -1
  93. package/types/experiments/ExposureOutbox.d.ts +1 -0
  94. package/types/experiments/ExposureOutbox.d.ts.map +1 -1
  95. package/types/preview.d.ts +51 -0
  96. package/types/preview.d.ts.map +1 -0
  97. package/types/react.d.ts +53 -1
  98. package/types/react.d.ts.map +1 -1
  99. package/types/sdui/actions.d.ts +93 -0
  100. package/types/sdui/actions.d.ts.map +1 -0
  101. package/types/sdui/bindings.d.ts +63 -0
  102. package/types/sdui/bindings.d.ts.map +1 -0
  103. package/types/sdui/compile.d.ts +88 -0
  104. package/types/sdui/compile.d.ts.map +1 -0
  105. package/types/sdui/conditions.d.ts +22 -0
  106. package/types/sdui/conditions.d.ts.map +1 -0
  107. package/types/sdui/context.d.ts +132 -0
  108. package/types/sdui/context.d.ts.map +1 -0
  109. package/types/sdui/countdown.d.ts +31 -0
  110. package/types/sdui/countdown.d.ts.map +1 -0
  111. package/types/sdui/decode.d.ts +35 -0
  112. package/types/sdui/decode.d.ts.map +1 -0
  113. package/types/sdui/deps.d.ts +43 -0
  114. package/types/sdui/deps.d.ts.map +1 -0
  115. package/types/sdui/dominantColor.d.ts +24 -0
  116. package/types/sdui/dominantColor.d.ts.map +1 -0
  117. package/types/sdui/elements/confetti.d.ts +38 -0
  118. package/types/sdui/elements/confetti.d.ts.map +1 -0
  119. package/types/sdui/elements/content.d.ts +27 -0
  120. package/types/sdui/elements/content.d.ts.map +1 -0
  121. package/types/sdui/elements/interactive.d.ts +48 -0
  122. package/types/sdui/elements/interactive.d.ts.map +1 -0
  123. package/types/sdui/elements/layout.d.ts +41 -0
  124. package/types/sdui/elements/layout.d.ts.map +1 -0
  125. package/types/sdui/elements/marquee.d.ts +17 -0
  126. package/types/sdui/elements/marquee.d.ts.map +1 -0
  127. package/types/sdui/elements/progress.d.ts +10 -0
  128. package/types/sdui/elements/progress.d.ts.map +1 -0
  129. package/types/sdui/elements/shared.d.ts +138 -0
  130. package/types/sdui/elements/shared.d.ts.map +1 -0
  131. package/types/sdui/elements/symbols.d.ts +22 -0
  132. package/types/sdui/elements/symbols.d.ts.map +1 -0
  133. package/types/sdui/elements/triggerText.d.ts +55 -0
  134. package/types/sdui/elements/triggerText.d.ts.map +1 -0
  135. package/types/sdui/host.d.ts +274 -0
  136. package/types/sdui/host.d.ts.map +1 -0
  137. package/types/sdui/inlineMarkup.d.ts +22 -0
  138. package/types/sdui/inlineMarkup.d.ts.map +1 -0
  139. package/types/sdui/lookValues.d.ts +50 -0
  140. package/types/sdui/lookValues.d.ts.map +1 -0
  141. package/types/sdui/model.d.ts +130 -0
  142. package/types/sdui/model.d.ts.map +1 -0
  143. package/types/sdui/motion.d.ts +37 -0
  144. package/types/sdui/motion.d.ts.map +1 -0
  145. package/types/sdui/precheck.d.ts +94 -0
  146. package/types/sdui/precheck.d.ts.map +1 -0
  147. package/types/sdui/scrollMath.d.ts +32 -0
  148. package/types/sdui/scrollMath.d.ts.map +1 -0
  149. package/types/sdui/style.d.ts +99 -0
  150. package/types/sdui/style.d.ts.map +1 -0
  151. package/types/sdui/triggerKit.d.ts +24 -0
  152. package/types/sdui/triggerKit.d.ts.map +1 -0
  153. package/types/sdui/unrunnable.d.ts +11 -0
  154. package/types/sdui/unrunnable.d.ts.map +1 -0
  155. package/types/sdui/vocabulary.d.ts +119 -0
  156. package/types/sdui/vocabulary.d.ts.map +1 -0
  157. package/types/triggers/claimReminder/ClaimReminder.d.ts +65 -0
  158. package/types/triggers/claimReminder/ClaimReminder.d.ts.map +1 -0
  159. package/types/triggers/claimReminder/bindings.d.ts +40 -0
  160. package/types/triggers/claimReminder/bindings.d.ts.map +1 -0
  161. package/types/triggers/claimReminder/config.d.ts +56 -0
  162. package/types/triggers/claimReminder/config.d.ts.map +1 -0
  163. package/types/triggers/claimReminder/eligibility.d.ts +37 -0
  164. package/types/triggers/claimReminder/eligibility.d.ts.map +1 -0
  165. package/types/triggers/claimReminder/servedWindow.d.ts +15 -0
  166. package/types/triggers/claimReminder/servedWindow.d.ts.map +1 -0
  167. package/types/triggers/claimReminder/source.d.ts +29 -0
  168. package/types/triggers/claimReminder/source.d.ts.map +1 -0
  169. package/types/triggers/giftsButton/GiftsButton.d.ts +60 -0
  170. package/types/triggers/giftsButton/GiftsButton.d.ts.map +1 -0
  171. package/types/triggers/giftsButton/config.d.ts +53 -0
  172. package/types/triggers/giftsButton/config.d.ts.map +1 -0
  173. package/types/triggers/giftsButton/spot.d.ts +54 -0
  174. package/types/triggers/giftsButton/spot.d.ts.map +1 -0
  175. package/types/triggers/host/TriggerHost.d.ts +127 -0
  176. package/types/triggers/host/TriggerHost.d.ts.map +1 -0
  177. package/types/triggers/host/autoPops.d.ts +16 -0
  178. package/types/triggers/host/autoPops.d.ts.map +1 -0
  179. package/types/triggers/host/configCache.d.ts +29 -0
  180. package/types/triggers/host/configCache.d.ts.map +1 -0
  181. package/types/triggers/host/customClaim.d.ts +85 -0
  182. package/types/triggers/host/customClaim.d.ts.map +1 -0
  183. package/types/triggers/host/dismissStore.d.ts +37 -0
  184. package/types/triggers/host/dismissStore.d.ts.map +1 -0
  185. package/types/triggers/host/readThrottle.d.ts +15 -0
  186. package/types/triggers/host/readThrottle.d.ts.map +1 -0
  187. package/types/triggers/host/registry.d.ts +17 -0
  188. package/types/triggers/host/registry.d.ts.map +1 -0
  189. package/types/triggers/host/sduiView.d.ts +31 -0
  190. package/types/triggers/host/sduiView.d.ts.map +1 -0
  191. package/types/triggers/host/template.d.ts +28 -0
  192. package/types/triggers/host/template.d.ts.map +1 -0
  193. package/types/triggers/host/textSlots.d.ts +35 -0
  194. package/types/triggers/host/textSlots.d.ts.map +1 -0
  195. package/types/triggers/host/theme.d.ts +87 -0
  196. package/types/triggers/host/theme.d.ts.map +1 -0
  197. package/types/triggers/host/timers.d.ts +11 -0
  198. package/types/triggers/host/timers.d.ts.map +1 -0
  199. package/types/triggers/host/types.d.ts +278 -0
  200. package/types/triggers/host/types.d.ts.map +1 -0
  201. package/types/triggers/host/wire.d.ts +55 -0
  202. package/types/triggers/host/wire.d.ts.map +1 -0
  203. package/types/triggers/preview.d.ts +78 -0
  204. package/types/triggers/preview.d.ts.map +1 -0
  205. package/types/triggers/request.d.ts +53 -0
  206. package/types/triggers/request.d.ts.map +1 -0
  207. package/types/types.d.ts +329 -1
  208. package/types/types.d.ts.map +1 -1
  209. package/types/ui/ClaimScreen.d.ts +1 -1
  210. package/types/ui/ClaimScreen.d.ts.map +1 -1
  211. package/types/ui/CodeUnlock.d.ts +12 -2
  212. package/types/ui/CodeUnlock.d.ts.map +1 -1
  213. package/types/ui/GiftHero.d.ts.map +1 -1
  214. package/types/ui/GiftList.d.ts.map +1 -1
  215. package/types/ui/GiftPicker.d.ts.map +1 -1
  216. package/types/ui/GiftPickerHero.d.ts.map +1 -1
  217. package/types/ui/GiftReveal.d.ts.map +1 -1
  218. package/types/ui/GiftSheet.d.ts +5 -5
  219. package/types/ui/GiftSheet.d.ts.map +1 -1
  220. package/types/ui/GiftUnwrap.d.ts.map +1 -1
  221. package/types/ui/OfferCard.d.ts.map +1 -1
  222. package/types/ui/OfferCarousel.d.ts.map +1 -1
  223. package/types/ui/OfferModal.d.ts +31 -0
  224. package/types/ui/OfferModal.d.ts.map +1 -1
  225. package/types/ui/PrimerScreen.d.ts +2 -0
  226. package/types/ui/PrimerScreen.d.ts.map +1 -1
  227. package/types/ui/RedemptionScreen.d.ts +5 -0
  228. package/types/ui/RedemptionScreen.d.ts.map +1 -1
  229. package/types/ui/RewardActions.d.ts.map +1 -1
  230. package/types/ui/RewardCard.d.ts.map +1 -1
  231. package/types/ui/SduiRewardSurface.d.ts +145 -0
  232. package/types/ui/SduiRewardSurface.d.ts.map +1 -0
  233. package/types/ui/Tooltip.d.ts.map +1 -1
  234. package/types/ui/brandComponents.d.ts.map +1 -1
  235. package/types/ui/brandTint.d.ts.map +1 -1
  236. package/types/ui/colorScheme.d.ts +15 -0
  237. package/types/ui/colorScheme.d.ts.map +1 -0
  238. package/types/ui/covered.d.ts +12 -0
  239. package/types/ui/covered.d.ts.map +1 -0
  240. package/types/ui/giftCategoryGroups.d.ts +13 -0
  241. package/types/ui/giftCategoryGroups.d.ts.map +1 -1
  242. package/types/ui/giftCopy.d.ts +14 -9
  243. package/types/ui/giftCopy.d.ts.map +1 -1
  244. package/types/ui/giftUnwrapCopy.d.ts.map +1 -1
  245. package/types/ui/imageURL.d.ts +44 -0
  246. package/types/ui/imageURL.d.ts.map +1 -0
  247. package/types/ui/impressionGate.d.ts +9 -0
  248. package/types/ui/impressionGate.d.ts.map +1 -1
  249. package/types/ui/offerBadge.d.ts.map +1 -1
  250. package/types/ui/rewardSurface.d.ts +11 -1
  251. package/types/ui/rewardSurface.d.ts.map +1 -1
  252. package/types/ui/sduiTheme.d.ts +48 -0
  253. package/types/ui/sduiTheme.d.ts.map +1 -0
  254. package/types/ui/sheetDetents.d.ts +28 -0
  255. package/types/ui/sheetDetents.d.ts.map +1 -0
  256. package/types/ui/styles.d.ts +11 -8
  257. package/types/ui/styles.d.ts.map +1 -1
  258. package/types/ui/termsLine.d.ts +3 -3
  259. package/types/ui/termsLine.d.ts.map +1 -1
  260. package/types/ui/toast.d.ts +11 -0
  261. package/types/ui/toast.d.ts.map +1 -0
  262. package/types/utils/logger.d.ts +10 -0
  263. package/types/utils/logger.d.ts.map +1 -1
  264. package/types/utils/text.d.ts +17 -0
  265. package/types/utils/text.d.ts.map +1 -1
@@ -0,0 +1,88 @@
1
+ /**
2
+ * The compile pass: tree in, DOM out, plus a registry of update sites.
3
+ *
4
+ * 🔴 WHY THIS IS NOT AN INTERPRETER. Both natives re-read the tree on every
5
+ * render, because SwiftUI and Compose rebuild declaratively and diff for you.
6
+ * The DOM does not. Replacing a subtree destroys state the BROWSER owns: a
7
+ * focused `textField` loses its caret, a `scrollView` loses its offset (which
8
+ * breaks `scrollTargetLayout` and the page indicator), a video restarts, an
9
+ * in-flight drag is dropped, and a CSS transition cannot run because the node it
10
+ * would animate is gone. Diffing instead would mean a virtual DOM, and this SDK
11
+ * ships zero runtime dependencies.
12
+ *
13
+ * 🔴 A SITE CARRIES ITS SCOPE, AND ITS LIFETIME.
14
+ *
15
+ * Both halves were missing at first and both were wrong in the same way: the
16
+ * site list was flat, so a site registered while compiling a `forEach` row ran
17
+ * later against the TREE context. Every row then resolved `scopedOffer` to
18
+ * `offers[currentIndex]` and rendered the same offer, which is every list and
19
+ * carousel variant silently wrong. A site therefore stores the scope it was
20
+ * compiled under, and `run` applies it.
21
+ *
22
+ * Lifetime is the same bug one step on. Sites for a dropped row or an unmounted
23
+ * branch used to stay in the list for ever, running against detached nodes and
24
+ * holding them alive. Sites now belong to a GROUP that can be deactivated or
25
+ * dropped with the DOM it drives.
26
+ */
27
+ import type { SduiNode, SduiTemplate } from "./model";
28
+ import type { SduiElementName } from "./vocabulary";
29
+ import type { SduiEvaluationContext } from "./context";
30
+ import type { Dependency } from "./deps";
31
+ /** Thrown when the tree names an element no renderer has been registered for. */
32
+ export declare class SduiCompileError extends Error {
33
+ constructor(message: string);
34
+ }
35
+ /** Narrows the tree context to what a site was compiled under. */
36
+ export type Scope = (ctx: SduiEvaluationContext) => SduiEvaluationContext;
37
+ interface Group {
38
+ readonly id: number;
39
+ readonly parent: Group | undefined;
40
+ active: boolean;
41
+ }
42
+ interface SiteEntry {
43
+ readonly deps: readonly Dependency[];
44
+ readonly scope: Scope;
45
+ readonly group: Group;
46
+ run(ctx: SduiEvaluationContext): void;
47
+ }
48
+ /** What a renderer returns. `update` is folded into the registry as a site. */
49
+ export interface Rendered {
50
+ readonly node: Node;
51
+ readonly deps?: readonly Dependency[];
52
+ update?(ctx: SduiEvaluationContext): void;
53
+ }
54
+ /** Services a renderer needs from the compiler, so renderers stay leaf-shaped. */
55
+ export interface CompileServices {
56
+ /** Compile a child node, registering its sites under the current scope. */
57
+ compileChild(node: SduiNode, ctx: SduiEvaluationContext): Rendered;
58
+ /**
59
+ * Register an extra site, for a renderer that needs more than the one its
60
+ * `Rendered` carries. It takes the CURRENT scope and group, like any other.
61
+ */
62
+ addSite(site: {
63
+ deps: readonly Dependency[];
64
+ run(ctx: SduiEvaluationContext): void;
65
+ }): void;
66
+ readonly document: Document;
67
+ }
68
+ export type ElementRenderer = (node: SduiNode, ctx: SduiEvaluationContext, services: CompileServices) => Rendered;
69
+ export declare class ElementRegistry {
70
+ #private;
71
+ register(name: SduiElementName, renderer: ElementRenderer): this;
72
+ get(name: SduiElementName): ElementRenderer | undefined;
73
+ get registered(): readonly SduiElementName[];
74
+ }
75
+ /** A compiled tree. `update` re-runs only live sites whose dependencies moved. */
76
+ export declare class CompiledTree {
77
+ #private;
78
+ readonly root: Node;
79
+ constructor(root: Node, sites: SiteEntry[]);
80
+ /** Live sites. A dropped row's sites are gone, not merely skipped. */
81
+ get siteCount(): number;
82
+ /** Sites that would actually run, i.e. whose group chain is active. */
83
+ get activeSiteCount(): number;
84
+ update(ctx: SduiEvaluationContext, changed?: Iterable<Dependency>): number;
85
+ }
86
+ export declare function compile(template: SduiTemplate, ctx: SduiEvaluationContext, registry: ElementRegistry, doc?: Document): CompiledTree;
87
+ export {};
88
+ //# sourceMappingURL=compile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../src/sdui/compile.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAAiB,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACrE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAE,qBAAqB,EAAuB,MAAM,WAAW,CAAC;AAK5E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEzC,iFAAiF;AACjF,qBAAa,gBAAiB,SAAQ,KAAK;gBAC7B,OAAO,EAAE,MAAM;CAI5B;AAED,kEAAkE;AAClE,MAAM,MAAM,KAAK,GAAG,CAAC,GAAG,EAAE,qBAAqB,KAAK,qBAAqB,CAAC;AAI1E,UAAU,KAAK;IACb,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,MAAM,EAAE,KAAK,GAAG,SAAS,CAAC;IACnC,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,UAAU,SAAS;IACjB,QAAQ,CAAC,IAAI,EAAE,SAAS,UAAU,EAAE,CAAC;IACrC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,GAAG,CAAC,GAAG,EAAE,qBAAqB,GAAG,IAAI,CAAC;CACvC;AAKD,+EAA+E;AAC/E,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;I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AAqB,EAC1B,QAAQ,EAAE,eAAe,EACzB,GAAG,GAAE,QAAmB,GACvB,YAAY,CA+Sd"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Condition evaluation.
3
+ *
4
+ * Pure and total: every branch returns a boolean and nothing throws. Recursion
5
+ * follows the authored JSON, which the backend's variant validation bounds.
6
+ *
7
+ * Three rules carry the weight, and all three are easy to get subtly wrong:
8
+ *
9
+ * 1. `hasValue` tests PRESENCE, not non-emptiness. An empty string counts.
10
+ * 2. `equals` with two UNSET operands is NOT a match. `offerAttribute` made
11
+ * that the common case: most campaigns carry no badge, so comparing a row's
12
+ * badge against an unwritten binding would be true on exactly the rows that
13
+ * have no badge.
14
+ * 3. A value ref that resolves to nothing is `undefined`, never `""`, so an
15
+ * `equals` against an authored empty string is false rather than a match.
16
+ */
17
+ import type { SduiCondition, SduiValueRef } from "./model";
18
+ import type { SduiEvaluationContext } from "./context";
19
+ /** Resolves an operand to a comparable string, or undefined when it holds nothing. */
20
+ export declare function resolveValueRef(ref: SduiValueRef, ctx: SduiEvaluationContext): string | undefined;
21
+ export declare function evaluate(condition: SduiCondition, ctx: SduiEvaluationContext): boolean;
22
+ //# sourceMappingURL=conditions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conditions.d.ts","sourceRoot":"","sources":["../../src/sdui/conditions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAO3D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAGvD,sFAAsF;AACtF,wBAAgB,eAAe,CAC7B,GAAG,EAAE,YAAY,EACjB,GAAG,EAAE,qBAAqB,GACzB,MAAM,GAAG,SAAS,CAiBpB;AAqCD,wBAAgB,QAAQ,CACtB,SAAS,EAAE,aAAa,EACxB,GAAG,EAAE,qBAAqB,GACzB,OAAO,CA+GT"}
@@ -0,0 +1,132 @@
1
+ /**
2
+ * Everything a condition or binding can read, as plain data.
3
+ *
4
+ * Offers are held in DISPLAY order, after `offerDisplayOrder` has been applied,
5
+ * so every position predicate operates in the space the user actually sees.
6
+ * They are whole offers rather than ids, because `offerAttribute` reads a row's
7
+ * own campaign fields: passing positions without the attributes that go with
8
+ * them resolved every attribute to null on Android, with nothing to say so.
9
+ *
10
+ * This is the engine's own shape, not the SDK's offer model. Commit 8 maps one
11
+ * to the other at the host boundary, which is what keeps this file pure.
12
+ */
13
+ /** Applied when `initialState` is absent. */
14
+ export declare const DEFAULT_STATE = "default";
15
+ /** Default key written by `selectOffer` when no `targetKey` is given. */
16
+ export declare const DEFAULT_SELECTION_KEY = "selectedOfferId";
17
+ export interface SduiInstructionStep {
18
+ readonly title?: string;
19
+ readonly subtitle?: string;
20
+ readonly ctaButtonText?: string;
21
+ readonly imageUrl?: string;
22
+ /** 1-based, assigned AFTER the blank steps are dropped so there are no gaps. */
23
+ readonly position?: number;
24
+ }
25
+ export interface SduiOfferBindingData {
26
+ readonly id: string;
27
+ readonly advertiserName?: string;
28
+ /** `primaryCreative.description`, the advertiser copy shown on the card. */
29
+ readonly description?: string;
30
+ readonly perk?: string;
31
+ readonly ctaText?: string;
32
+ readonly newPrice?: string;
33
+ readonly oldPrice?: string;
34
+ readonly primaryImageUrl?: string;
35
+ readonly logoUrl?: string;
36
+ /** The promo badge as it arrives, `free_trial` or `discount`. */
37
+ readonly badgeLabel?: string;
38
+ readonly category?: string;
39
+ readonly heroImageUrl?: string;
40
+ readonly shareUrl?: string;
41
+ readonly termsUrl?: string;
42
+ readonly quickInstructions?: string;
43
+ readonly instructions?: readonly SduiInstructionStep[];
44
+ /** Admin copy by key, read by `propertyKey`. Blank values are already absent. */
45
+ readonly displayProperties?: Readonly<Record<string, string>>;
46
+ }
47
+ /** Copy that is not offer-scoped. Absent entries fall back to the constants in `bindings.ts`. */
48
+ export interface SduiTextDefaults {
49
+ readonly titleText?: string;
50
+ readonly accentTitleText?: string;
51
+ readonly subtitleText?: string;
52
+ /** `offerCtaText` with no offer bound (`card.get`), and for an offer with none (`card.claim`). */
53
+ readonly getText?: string;
54
+ readonly claimText?: string;
55
+ /** Chip labels by category group key, as Swift's `giftCategory` translates them. */
56
+ readonly categoryLabels?: Readonly<Record<string, string>>;
57
+ /** The accessible name of a button that holds only this symbol, by symbol name. */
58
+ readonly symbolLabels?: Readonly<Record<string, string>>;
59
+ }
60
+ export interface SduiEvaluationContext {
61
+ readonly offers: readonly SduiOfferBindingData[];
62
+ /** Index of the centred card, or undefined when nothing is current. */
63
+ readonly currentIndex?: number;
64
+ readonly currentState: string;
65
+ readonly values: Readonly<Record<string, string>>;
66
+ /** The flag the renderer threads down for `isCurrentPageBinding`. */
67
+ readonly isCurrentPage: boolean;
68
+ /** The `forEach` row's offer id; undefined outside a row. */
69
+ readonly rowOfferId?: string;
70
+ /** The `categories` forEach chip's category; undefined outside one. */
71
+ readonly rowCategory?: string;
72
+ /** The `instructions` forEach step; undefined outside one. */
73
+ readonly rowStep?: SduiInstructionStep;
74
+ /**
75
+ * IAP product facts. False whenever no product info was fetched, which matches
76
+ * iOS evaluating against a nil product.
77
+ */
78
+ readonly hasIntroOffer: boolean;
79
+ readonly hasFreeTrial: boolean;
80
+ /** Logo URL to extracted brand colour, filled in as extractions land. */
81
+ readonly dominantColors?: Readonly<Record<string, string>>;
82
+ /** The host app's icon, whose colour is `appDominantColor`. */
83
+ readonly appIconUrl?: string;
84
+ /**
85
+ * Trigger mounts only: the host's named lists (`forEach` `hostList`), each a
86
+ * list of string maps, e.g. `marqueeLogos: [{ logoUrl }]`.
87
+ */
88
+ readonly lists?: Readonly<Record<string, readonly SduiHostListItem[]>>;
89
+ /** The `hostList` row's item; undefined outside one. Read as `${item.<field>}`. */
90
+ readonly rowItem?: SduiHostListItem;
91
+ /** Trigger mounts only: the host's time keys (`start`, `deadline`), ms since the epoch. */
92
+ readonly times?: Readonly<Record<string, number>>;
93
+ /** Trigger mounts only: the host's clock, ms since the epoch, advanced by `setNow`. */
94
+ readonly now?: number;
95
+ /** Trigger mounts only, set by the host: loops and marquees hold still. */
96
+ readonly motionPaused?: boolean;
97
+ /** Trigger mounts only: the platform's reduce-motion setting, read by the host. */
98
+ readonly reduceMotion?: boolean;
99
+ }
100
+ /** One entry of a trigger host's list. */
101
+ export type SduiHostListItem = Readonly<Record<string, string>>;
102
+ /** The `${item.<field>}` keys a `hostList` row exposes, as values. */
103
+ export declare function itemValues(item: SduiHostListItem): Record<string, string>;
104
+ export declare function emptyContext(over?: Partial<SduiEvaluationContext>): SduiEvaluationContext;
105
+ /**
106
+ * The row's offer inside a `forEach`, else the SELECTED one, else the current
107
+ * card.
108
+ *
109
+ * Selection beats index, matching Swift's `currentOffer` (`SDUIContext.swift:227`).
110
+ * Resolving index-first is what left a congratulations screen blank and a claim
111
+ * button inert after a pick made somewhere other than the centred card. Android
112
+ * resolves index-first and documents it as a known gap against iOS; Swift is
113
+ * canonical, so this follows Swift.
114
+ */
115
+ export declare function scopedOfferId(ctx: SduiEvaluationContext): string | undefined;
116
+ /**
117
+ * Index of the scoped offer, or undefined outside a row with no current offer,
118
+ * so position predicates are false there rather than accidentally zero.
119
+ */
120
+ export declare function scopedOfferIndex(ctx: SduiEvaluationContext): number | undefined;
121
+ export declare function scopedOffer(ctx: SduiEvaluationContext): SduiOfferBindingData | undefined;
122
+ /** The row-scoped view used when rendering a `forEach` item. */
123
+ export declare function forRow(ctx: SduiEvaluationContext, offerId: string, isCurrentPage?: boolean): SduiEvaluationContext;
124
+ /**
125
+ * The values a colour resolves against: `values`, plus the two logo colours.
126
+ *
127
+ * Swift's `colorValues`. `offerDominantColor` is the row's offer, else the
128
+ * current one, and `selectedOfferDominantColor` is the selected logo. Each is
129
+ * set only once a real colour exists, so the JSON `fallback` paints until then.
130
+ */
131
+ export declare function colorValues(ctx: SduiEvaluationContext): Readonly<Record<string, string>>;
132
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"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,aAAa,CAAC,GAAG,EAAE,qBAAqB,GAAG,MAAM,GAAG,SAAS,CAO5E;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,qBAAqB,GACzB,MAAM,GAAG,SAAS,CAKpB;AAED,wBAAgB,WAAW,CACzB,GAAG,EAAE,qBAAqB,GACzB,oBAAoB,GAAG,SAAS,CAGlC;AAED,gEAAgE;AAChE,wBAAgB,MAAM,CACpB,GAAG,EAAE,qBAAqB,EAC1B,OAAO,EAAE,MAAM,EACf,aAAa,GAAE,OAA2B,GACzC,qBAAqB,CAEvB;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CACzB,GAAG,EAAE,qBAAqB,GACzB,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAoBlC"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Time arithmetic for a trigger mount's `text.countdown` and `progress` (trigger
3
+ * vocabulary contract v1, §3.1 and §3.2). Pure: the host owns the clock and the
4
+ * time keys, and hands both in.
5
+ */
6
+ /** The host's time keys (`start`, `deadline`), as ms since the epoch. */
7
+ export type SduiTimes = Readonly<Record<string, number>>;
8
+ /**
9
+ * Whole seconds from `now` to `to`, floored and clamped at 0. Non-finite input,
10
+ * or more than ten years left, is 0.
11
+ */
12
+ export declare function remainingSeconds(to: number | undefined, now: number | undefined): number;
13
+ /**
14
+ * The countdown text for `seconds` left. `clock` is `HH:MM:SS` (hours may pass
15
+ * 99); `hoursMinutes` is `HH:MM`, the clock without its seconds (minutes floored); `hours`, `minutes` and `seconds` are that part alone, two digits;
16
+ * `largestUnit` is `"<n> <unit>"` for the largest non-zero part, with the unit
17
+ * text from `units` (already resolved).
18
+ */
19
+ export declare function formatCountdown(format: unknown, seconds: number, units: Readonly<{
20
+ hours?: string;
21
+ minutes?: string;
22
+ seconds?: string;
23
+ }>): string;
24
+ /**
25
+ * A `progress.value`, clamped to 0..1: `{ timeRemaining: { from, to } }` is
26
+ * `(to - now) / (to - from)`, draining to 0; `{ literal: n }` is `n`. Anything
27
+ * the engine cannot read (a missing time key, an empty window, another shape)
28
+ * is 0, so the bar draws empty rather than failing.
29
+ */
30
+ export declare function progressFraction(value: unknown, times: SduiTimes | undefined, now: number | undefined): number;
31
+ //# sourceMappingURL=countdown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"countdown.d.ts","sourceRoot":"","sources":["../../src/sdui/countdown.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,yEAAyE;AACzE,MAAM,MAAM,SAAS,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAEzD;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,EAAE,EAAE,MAAM,GAAG,SAAS,EACtB,GAAG,EAAE,MAAM,GAAG,SAAS,GACtB,MAAM,CAKR;AAID;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,QAAQ,CAAC;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,GACtE,MAAM,CAqBR;AASD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,OAAO,EACd,KAAK,EAAE,SAAS,GAAG,SAAS,EAC5B,GAAG,EAAE,MAAM,GAAG,SAAS,GACtB,MAAM,CAiBR"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Strict decode of a served SDUI template.
3
+ *
4
+ * 🔴 THE ONE RULE, and it is asymmetric on purpose:
5
+ *
6
+ * - An unknown enum VALUE, element name or condition name FAILS the whole
7
+ * config. A variant naming something this build cannot render is a variant
8
+ * this build must not render PARTLY: half a sheet is worse than the
9
+ * hard-coded fallback, and it is invisible in analytics.
10
+ * - An unknown FIELD is IGNORED. That is what lets the backend add a field
11
+ * and roll it out before every client ships, which is the whole point of
12
+ * `min_sdk_versions` gating values rather than fields.
13
+ *
14
+ * Both natives behave this way; web must match or the same variant renders on
15
+ * three clients and fails on one.
16
+ *
17
+ * Failure is a throw, not a null. The caller catches, keeps its hard-coded
18
+ * surface, and reports. A null return would invite a silent `?? fallback` at
19
+ * one call site and an unchecked deref at the next.
20
+ */
21
+ import type { SduiTemplate } from "./model";
22
+ /** Thrown for anything the closed sets reject. `path` locates it in the tree. */
23
+ export declare class SduiDecodeError extends Error {
24
+ readonly path: string;
25
+ constructor(message: string, path: string);
26
+ }
27
+ /**
28
+ * Decode a template served under `ui.template` or `useCases[x].template`.
29
+ *
30
+ * @throws {SduiDecodeError} on any closed-set violation.
31
+ */
32
+ export declare function decodeTemplate(raw: unknown, options?: {
33
+ readonly trigger?: boolean;
34
+ }): SduiTemplate;
35
+ //# sourceMappingURL=decode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decode.d.ts","sourceRoot":"","sources":["../../src/sdui/decode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAiDH,OAAO,KAAK,EAKV,YAAY,EAEb,MAAM,SAAS,CAAC;AAEjB,iFAAiF;AACjF,qBAAa,eAAgB,SAAQ,KAAK;IACxC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;gBACV,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;CAK1C;AAkcD;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,GAAG,EAAE,OAAO,EACZ,OAAO,GAAE;IAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAO,GAC3C,YAAY,CAQd"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * What a binding READS, so an update can touch only what changed.
3
+ *
4
+ * This is the half of "compile once, then bind" that makes the second half
5
+ * cheap. Every update site records its dependencies at compile time, and a
6
+ * state change invalidates only the sites that named the thing that moved.
7
+ * Without this the engine would walk the whole tree per change, which is the
8
+ * interpret model the DOM cannot afford.
9
+ *
10
+ * Dependencies are strings rather than an enum because `value:` is parameterised
11
+ * by key, and a variant may write any key it likes. Over-reporting is safe (a
12
+ * site updates when it need not); under-reporting is a stale screen, so every
13
+ * derivation below errs toward listing more.
14
+ */
15
+ import type { SduiCondition, SduiValueRef } from "./model";
16
+ export type Dependency = string;
17
+ /** The current state name. */
18
+ export declare const DEP_STATE = "state";
19
+ /** The offers list itself: length, order, membership. */
20
+ export declare const DEP_OFFERS = "offers";
21
+ /** Which card is current. */
22
+ export declare const DEP_INDEX = "index";
23
+ /** The row scope a `forEach` item renders under. */
24
+ export declare const DEP_ROW = "row";
25
+ /** IAP product facts. Fetched once, but not always before first paint. */
26
+ export declare const DEP_IAP = "iap";
27
+ /** A trigger host's lists (`hostList`, `listCountAtLeast`). */
28
+ export declare const DEP_LISTS = "lists";
29
+ /** A trigger host's clock and time keys (`countdown`, `progress`). */
30
+ export declare const DEP_TIME = "time";
31
+ /** A trigger host's motion flags (`motionPaused`, `reduceMotion`). */
32
+ export declare const DEP_MOTION = "motion";
33
+ /** One entry of the mutable values dictionary. */
34
+ export declare const depValue: (key: string) => Dependency;
35
+ /**
36
+ * What a colour binding reads. The two logo colours also move with the offer
37
+ * they are scoped to, so they depend on that too.
38
+ */
39
+ export declare function colorKeyDeps(keys: readonly string[]): Dependency[];
40
+ export declare function valueRefDeps(ref: SduiValueRef): Dependency[];
41
+ /** Every dependency a condition tree reads, deduplicated. */
42
+ export declare function conditionDeps(condition: SduiCondition): Dependency[];
43
+ //# sourceMappingURL=deps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deps.d.ts","sourceRoot":"","sources":["../../src/sdui/deps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE3D,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAEhC,8BAA8B;AAC9B,eAAO,MAAM,SAAS,UAAU,CAAC;AACjC,yDAAyD;AACzD,eAAO,MAAM,UAAU,WAAW,CAAC;AACnC,6BAA6B;AAC7B,eAAO,MAAM,SAAS,UAAU,CAAC;AACjC,oDAAoD;AACpD,eAAO,MAAM,OAAO,QAAQ,CAAC;AAC7B,0EAA0E;AAC1E,eAAO,MAAM,OAAO,QAAQ,CAAC;AAC7B,+DAA+D;AAC/D,eAAO,MAAM,SAAS,UAAU,CAAC;AACjC,sEAAsE;AACtE,eAAO,MAAM,QAAQ,SAAS,CAAC;AAC/B,sEAAsE;AACtE,eAAO,MAAM,UAAU,WAAW,CAAC;AACnC,kDAAkD;AAClD,eAAO,MAAM,QAAQ,GAAI,KAAK,MAAM,KAAG,UAA4B,CAAC;AAEpE;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,UAAU,EAAE,CAQlE;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,YAAY,GAAG,UAAU,EAAE,CAe5D;AAED,6DAA6D;AAC7D,wBAAgB,aAAa,CAAC,SAAS,EAAE,aAAa,GAAG,UAAU,EAAE,CAIpE"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Reduce RGBA pixels to `#RRGGBB`, or `null` for a white or transparent logo.
3
+ *
4
+ * The pixels are premultiplied first, because Swift draws into a premultiplied
5
+ * context and a canvas hands back straight alpha.
6
+ */
7
+ export declare function dominantHexFromPixels(data: Uint8ClampedArray): string | null;
8
+ /**
9
+ * Load a logo and reduce it. Resolves `null` on every failure: a host that
10
+ * sends no CORS header, a decode error, a timeout, or no 2D canvas (jsdom).
11
+ */
12
+ export declare function extractDominantHex(url: string, doc?: Document): Promise<string | null>;
13
+ /** The colours already known, so a second presentation paints on frame one. */
14
+ export declare function knownDominantColors(): Record<string, string>;
15
+ /**
16
+ * Extract once per URL, and report each colour that lands.
17
+ *
18
+ * A URL that yields nothing is not cached, which is what Swift does: it tries
19
+ * again on the next presentation.
20
+ */
21
+ export declare function requestDominantColors(urls: readonly string[], extract: (url: string) => Promise<string | null>, onColor: (url: string, hex: string) => void): void;
22
+ /** @internal Tests only. */
23
+ export declare function resetDominantColorsForTests(): void;
24
+ //# sourceMappingURL=dominantColor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dominantColor.d.ts","sourceRoot":"","sources":["../../src/sdui/dominantColor.ts"],"names":[],"mappings":"AAgBA;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI,CAsE5E;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,MAAM,EACX,GAAG,GAAE,QAAmB,GACvB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAuCxB;AAMD,+EAA+E;AAC/E,wBAAgB,mBAAmB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAE5D;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,EAChD,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,GAC1C,IAAI,CAkBN;AAED,4BAA4B;AAC5B,wBAAgB,2BAA2B,IAAI,IAAI,CAGlD"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * The SDUI `confetti` burst, with Swift's `ConfettiEmitterUIView` numbers: it
3
+ * emits `intensity` pieces a second for `duration` seconds, from a line across
4
+ * the top or from a point, and each piece falls for up to 7.5 seconds.
5
+ *
6
+ * The settled `scatter` layer is not drawn. No served variant uses it.
7
+ */
8
+ export interface ConfettiSpec {
9
+ colors: readonly string[];
10
+ intensity: number;
11
+ duration: number;
12
+ originY: number;
13
+ originX: number | undefined;
14
+ }
15
+ interface Piece {
16
+ born: number;
17
+ life: number;
18
+ x: number;
19
+ y: number;
20
+ vx: number;
21
+ vy: number;
22
+ spin: number;
23
+ rotation: number;
24
+ scale: number;
25
+ color: string;
26
+ round: boolean;
27
+ }
28
+ /** Swift's `configure` clamps, applied to the served values. */
29
+ export declare function confettiSpec(props: Readonly<Record<string, unknown>>, color: (hex: string) => string | undefined): ConfettiSpec;
30
+ /** Every piece the burst will emit, with its birth time in seconds. */
31
+ export declare function emitPieces(spec: ConfettiSpec, width: number, height: number): Piece[];
32
+ /**
33
+ * Draw the burst into `host` and remove the canvas when the last piece is gone.
34
+ * Returns a stop function. Does nothing where a canvas cannot run.
35
+ */
36
+ export declare function runConfetti(host: HTMLElement, spec: ConfettiSpec): () => void;
37
+ export {};
38
+ //# sourceMappingURL=confetti.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confetti.d.ts","sourceRoot":"","sources":["../../../src/sdui/elements/confetti.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAgBH,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B;AAED,UAAU,KAAK;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;CAChB;AAKD,gEAAgE;AAChE,wBAAgB,YAAY,CAC1B,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EACxC,KAAK,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,GACzC,YAAY,CAkBd;AAED,uEAAuE;AACvE,wBAAgB,UAAU,CACxB,IAAI,EAAE,YAAY,EAClB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GACb,KAAK,EAAE,CA+BT;AAKD;;;GAGG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,YAAY,GAAG,MAAM,IAAI,CA6D7E"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * The content elements: `text`, `systemImage`, `asyncImage`, `asyncVideo`,
3
+ * `appIcon`, `shape`, `gradient`, `empty`.
4
+ *
5
+ * `text` is the only one with real runtime behaviour, because it is the only
6
+ * one whose content can change without the tree changing. Everything else is
7
+ * static once compiled, which is why most of this file has no update site.
8
+ */
9
+ import type { ElementRegistry } from "../compile";
10
+ import type { SduiTextDefaults } from "../context";
11
+ import type { RenderDeps, TriggerDeps } from "./shared";
12
+ /** Runtime copy the host owns, read fresh on every text update. */
13
+ export interface TextEnvironment {
14
+ readonly values: Readonly<Record<string, string>>;
15
+ readonly textMaps: Readonly<Record<string, Readonly<Record<string, string>>>>;
16
+ readonly variables: Readonly<Record<string, string>>;
17
+ readonly defaults: SduiTextDefaults;
18
+ }
19
+ export interface ContentDeps extends RenderDeps {
20
+ /** Read on every update, so a host may swap copy without recompiling. */
21
+ textEnvironment(): TextEnvironment;
22
+ /** Trigger (inline) mounts only; a sheet has none and draws as before. */
23
+ readonly trigger?: TriggerDeps;
24
+ }
25
+ export declare function templateKeys(text: string | undefined): string[];
26
+ export declare function registerContentElements(registry: ElementRegistry, deps: ContentDeps): ElementRegistry;
27
+ //# sourceMappingURL=content.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../src/sdui/elements/content.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAGlD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AA0BnD,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAMxD,mEAAmE;AACnE,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAClD,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9E,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACrD,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAC;CACrC;AAED,MAAM,WAAW,WAAY,SAAQ,UAAU;IAC7C,yEAAyE;IACzE,eAAe,IAAI,eAAe,CAAC;IACnC,0EAA0E;IAC1E,QAAQ,CAAC,OAAO,CAAC,EAAE,WAAW,CAAC;CAChC;AA2BD,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,EAAE,CAO/D;AA0DD,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,eAAe,EACzB,IAAI,EAAE,WAAW,GAChB,eAAe,CA4gBjB"}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * The interactive elements: `button`, `textField`, `toggle`, `slideButton`,
3
+ * `compactPageIndicator`, `confetti`.
4
+ *
5
+ * These are the elements the compile model exists for. Every one of them holds
6
+ * state the BROWSER owns rather than state the engine holds, so every one of
7
+ * them breaks under a renderer that rebuilds: a focused field loses its caret,
8
+ * a half-completed drag is dropped, a running confetti burst restarts.
9
+ */
10
+ import type { ElementRegistry } from "../compile";
11
+ import type { TextEnvironment } from "./content";
12
+ import type { SduiEvaluationContext } from "../context";
13
+ import type { ActionHost } from "../actions";
14
+ import type { RenderDeps } from "./shared";
15
+ export interface InteractiveDeps extends RenderDeps {
16
+ readonly actionHost: ActionHost;
17
+ /** Latest context, for an event firing long after compile. */
18
+ currentContext(): SduiEvaluationContext;
19
+ /**
20
+ * Report a tap. Swift reports it FIRST in `handleAction`, before the switch
21
+ * (`SDUIElementRenderer.swift:634`), so a tap that changes state carries the
22
+ * state it was made IN, and an action this build does not recognise is still
23
+ * counted rather than vanishing.
24
+ */
25
+ reportTap?(actionType: string, currentState: string): void;
26
+ /** False when the host switched claiming off. */
27
+ readonly claimEnabled?: boolean;
28
+ /** A text field's write: silent, and it clears `<key>Error`. */
29
+ editValue?(key: string, value: string): void;
30
+ /** The accessible name for a button that holds only this symbol. */
31
+ symbolLabel?(name: string): string | undefined;
32
+ /** Copy for a trigger button's `${...}` label and hint. */
33
+ textEnvironment?(): TextEnvironment;
34
+ }
35
+ export declare function registerInteractiveElements(registry: ElementRegistry, deps: InteractiveDeps): ElementRegistry;
36
+ /**
37
+ * The dots Swift's `CompactPageIndicator` draws: at most five, centred on the
38
+ * current page, the active one a capsule, and an edge dot at half size when more
39
+ * pages lie beyond it. Web drew one unsized span per offer, so eighteen offers
40
+ * made eighteen invisible dots.
41
+ */
42
+ export declare function compactWindow(total: number, current: number): {
43
+ index: number;
44
+ active: boolean;
45
+ width: number;
46
+ height: number;
47
+ }[];
48
+ //# sourceMappingURL=interactive.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interactive.d.ts","sourceRoot":"","sources":["../../../src/sdui/elements/interactive.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAY,MAAM,YAAY,CAAC;AAE5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAEjD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAGxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAW7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,MAAM,WAAW,eAAgB,SAAQ,UAAU;IACjD,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC,8DAA8D;IAC9D,cAAc,IAAI,qBAAqB,CAAC;IACxC;;;;;OAKG;IACH,SAAS,CAAC,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3D,iDAAiD;IACjD,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAChC,gEAAgE;IAChE,SAAS,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7C,oEAAoE;IACpE,WAAW,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAC/C,2DAA2D;IAC3D,eAAe,CAAC,IAAI,eAAe,CAAC;CACrC;AAOD,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,eAAe,EACzB,IAAI,EAAE,eAAe,GACpB,eAAe,CAyWjB;AAqJD;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,GACd;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EAAE,CAuBrE"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * The layout elements: `vStack`, `hStack`, `zStack`, `spacer`, `group`,
3
+ * `scrollView`.
4
+ *
5
+ * `forEach` and `conditional` are NOT here. Both change the shape of the DOM
6
+ * rather than the contents of one node, so both live in the compiler.
7
+ *
8
+ * Alignment is the one place SwiftUI and CSS genuinely differ. SwiftUI's
9
+ * `alignment` on a stack sets the CROSS axis, so `leading` on a `vStack` is
10
+ * horizontal and on an `hStack` is vertical. Mapping it to `align-items`
11
+ * without knowing the axis produces a layout that looks plausible and is wrong.
12
+ */
13
+ import type { ElementRegistry } from "../compile";
14
+ import type { RenderDeps } from "./shared";
15
+ /**
16
+ * The mask for a scroller with more content before (`head`) or after (`tail`).
17
+ *
18
+ * Empty when there is nothing more either way, so a list that fits is drawn
19
+ * exactly as authored.
20
+ */
21
+ export declare function edgeFadeMask(horizontal: boolean, head: boolean, tail: boolean): string;
22
+ /**
23
+ * Bind a carousel's position to the focused offer, both ways, as Swift's
24
+ * `SDUICarouselPositionModifier` does with `.scrollPosition(id:)`.
25
+ *
26
+ * Neither direction existed. Tapping a side card selected it but never brought
27
+ * it to the centre, and swiping moved the cards while the page indicator, the
28
+ * CTA and the selection all stayed on the first offer.
29
+ */
30
+ /**
31
+ * The margin that lets the first and last card reach the centre, as Swift's
32
+ * `SDUICenteredScrollMarginsModifier` derives it: `(viewport - card) / 2`.
33
+ *
34
+ * The template's `contentMargins` is only the fallback until both widths are
35
+ * known. It is sized for a phone (76 against 82 on a 375pt screen), so in the
36
+ * 720 desktop square the first card stopped 180px short of the centre, and sat
37
+ * there tilted by its own distance from it.
38
+ */
39
+ export declare function centringMargin(viewport: number, card: number): number | undefined;
40
+ export declare function registerLayoutElements(registry: ElementRegistry, deps: RenderDeps): ElementRegistry;
41
+ //# sourceMappingURL=layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../src/sdui/elements/layout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAalD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAiQ3C;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,UAAU,EAAE,OAAO,EACnB,IAAI,EAAE,OAAO,EACb,IAAI,EAAE,OAAO,GACZ,MAAM,CAOR;AAyND;;;;;;;GAOG;AACH;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,GACX,MAAM,GAAG,SAAS,CAGpB;AA0VD,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,eAAe,EACzB,IAAI,EAAE,UAAU,GACf,eAAe,CAwOjB"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * G4 `marquee` (trigger contract §3.4): content that scrolls on a loop.
3
+ *
4
+ * The items of `content` (a `forEach`) sit in a flex track along `axis` with
5
+ * `spacing`. Animating, the track holds the live content plus aria-hidden
6
+ * copies, enough to fill the viewport plus one cycle, and a generated
7
+ * `@keyframes` moves it one cycle per `duration`. Static (when `animateWhen`
8
+ * is false, reduce motion is on, or the host pauses it before it has moved), it
9
+ * holds the items once, centred on the axis. Paused after it has moved, it holds
10
+ * its place and resumes from there.
11
+ *
12
+ * Only a trigger mount decodes `marquee`, so only it ever reaches this.
13
+ */
14
+ import type { ElementRegistry } from "../compile";
15
+ import type { RenderDeps } from "./shared";
16
+ export declare function registerMarqueeElement(registry: ElementRegistry, deps: RenderDeps): ElementRegistry;
17
+ //# sourceMappingURL=marquee.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"marquee.d.ts","sourceRoot":"","sources":["../../../src/sdui/elements/marquee.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAMlD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAiB3C,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,eAAe,EACzB,IAAI,EAAE,UAAU,GACf,eAAe,CAmKjB"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * The `progress` element (trigger vocabulary contract v1, §3.2): a capsule track
3
+ * with a capsule fill grown from the leading edge to the value's fraction.
4
+ *
5
+ * Registered for inline (trigger) mounts only; a sheet never decodes `progress`.
6
+ */
7
+ import type { ElementRegistry } from "../compile";
8
+ import type { RenderDeps } from "./shared";
9
+ export declare function registerProgressElement(registry: ElementRegistry, deps: RenderDeps): ElementRegistry;
10
+ //# sourceMappingURL=progress.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../../src/sdui/elements/progress.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAKlD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAO3C,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,eAAe,EACzB,IAAI,EAAE,UAAU,GACf,eAAe,CA4CjB"}