@temple-wallet/extension-ads 6.3.1 → 7.0.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 (102) hide show
  1. package/dist/index.d.ts +29 -30
  2. package/dist/index.js +11 -10
  3. package/package.json +3 -1
  4. package/src/ads-actions/helpers.ts +18 -5
  5. package/src/ads-actions/index.ts +33 -11
  6. package/src/ads-actions/process-permanent-rule.ts +35 -15
  7. package/src/ads-actions/process-providers-ads.ts +21 -7
  8. package/src/ads-actions/process-rule.ts +6 -1
  9. package/src/ads-configuration.ts +15 -24
  10. package/src/constants.ts +1 -1
  11. package/src/execute-ads-actions/ads-views/make-hypelab-ad.ts +16 -41
  12. package/src/execute-ads-actions/ads-views/make-persona-ad.ts +3 -3
  13. package/src/execute-ads-actions/index.ts +1 -1
  14. package/src/execute-ads-actions/process-insert-ad-action.ts +6 -12
  15. package/src/index.ts +0 -2
  16. package/src/render-ads-stack.ts +13 -10
  17. package/src/temple-wallet-api.ts +15 -3
  18. package/src/transform-raw-rules.ts +28 -13
  19. package/src/types/ads-actions.ts +1 -1
  20. package/src/types/ads-meta.ts +8 -24
  21. package/src/types/ads-rules.ts +3 -1
  22. package/src/types/temple-wallet-api.ts +5 -0
  23. package/dist/ads-actions/helpers.d.ts +0 -13
  24. package/dist/ads-actions/helpers.js +0 -83
  25. package/dist/ads-actions/helpers.js.map +0 -1
  26. package/dist/ads-actions/index.d.ts +0 -3
  27. package/dist/ads-actions/index.js +0 -45
  28. package/dist/ads-actions/index.js.map +0 -1
  29. package/dist/ads-actions/process-permanent-rule.d.ts +0 -3
  30. package/dist/ads-actions/process-permanent-rule.js +0 -132
  31. package/dist/ads-actions/process-permanent-rule.js.map +0 -1
  32. package/dist/ads-actions/process-providers-ads.d.ts +0 -3
  33. package/dist/ads-actions/process-providers-ads.js +0 -113
  34. package/dist/ads-actions/process-providers-ads.js.map +0 -1
  35. package/dist/ads-actions/process-rule.d.ts +0 -3
  36. package/dist/ads-actions/process-rule.js +0 -97
  37. package/dist/ads-actions/process-rule.js.map +0 -1
  38. package/dist/ads-configuration.d.ts +0 -33
  39. package/dist/ads-configuration.js +0 -29
  40. package/dist/ads-configuration.js.map +0 -1
  41. package/dist/ads-meta.d.ts +0 -17
  42. package/dist/ads-meta.js +0 -135
  43. package/dist/ads-meta.js.map +0 -1
  44. package/dist/constants.d.ts +0 -8
  45. package/dist/constants.js +0 -9
  46. package/dist/constants.js.map +0 -1
  47. package/dist/execute-ads-actions/ads-views/index.d.ts +0 -3
  48. package/dist/execute-ads-actions/ads-views/index.js +0 -4
  49. package/dist/execute-ads-actions/ads-views/index.js.map +0 -1
  50. package/dist/execute-ads-actions/ads-views/make-hypelab-ad.d.ts +0 -3
  51. package/dist/execute-ads-actions/ads-views/make-hypelab-ad.js +0 -60
  52. package/dist/execute-ads-actions/ads-views/make-hypelab-ad.js.map +0 -1
  53. package/dist/execute-ads-actions/ads-views/make-persona-ad.d.ts +0 -3
  54. package/dist/execute-ads-actions/ads-views/make-persona-ad.js +0 -11
  55. package/dist/execute-ads-actions/ads-views/make-persona-ad.js.map +0 -1
  56. package/dist/execute-ads-actions/ads-views/make-tkey-ad.d.ts +0 -2
  57. package/dist/execute-ads-actions/ads-views/make-tkey-ad.js +0 -24
  58. package/dist/execute-ads-actions/ads-views/make-tkey-ad.js.map +0 -1
  59. package/dist/execute-ads-actions/index.d.ts +0 -2
  60. package/dist/execute-ads-actions/index.js +0 -23
  61. package/dist/execute-ads-actions/index.js.map +0 -1
  62. package/dist/execute-ads-actions/observing.d.ts +0 -1
  63. package/dist/execute-ads-actions/observing.js +0 -123
  64. package/dist/execute-ads-actions/observing.js.map +0 -1
  65. package/dist/execute-ads-actions/override-element-styles.d.ts +0 -2
  66. package/dist/execute-ads-actions/override-element-styles.js +0 -6
  67. package/dist/execute-ads-actions/override-element-styles.js.map +0 -1
  68. package/dist/execute-ads-actions/process-insert-ad-action.d.ts +0 -2
  69. package/dist/execute-ads-actions/process-insert-ad-action.js +0 -120
  70. package/dist/execute-ads-actions/process-insert-ad-action.js.map +0 -1
  71. package/dist/index.js.map +0 -1
  72. package/dist/render-ads-stack.d.ts +0 -7
  73. package/dist/render-ads-stack.js +0 -101
  74. package/dist/render-ads-stack.js.map +0 -1
  75. package/dist/temple-wallet-api.d.ts +0 -17
  76. package/dist/temple-wallet-api.js +0 -56
  77. package/dist/temple-wallet-api.js.map +0 -1
  78. package/dist/transform-raw-rules.d.ts +0 -3
  79. package/dist/transform-raw-rules.js +0 -117
  80. package/dist/transform-raw-rules.js.map +0 -1
  81. package/dist/types/ad-view.d.ts +0 -3
  82. package/dist/types/ad-view.js +0 -2
  83. package/dist/types/ad-view.js.map +0 -1
  84. package/dist/types/ads-actions.d.ts +0 -54
  85. package/dist/types/ads-actions.js +0 -15
  86. package/dist/types/ads-actions.js.map +0 -1
  87. package/dist/types/ads-meta.d.ts +0 -46
  88. package/dist/types/ads-meta.js +0 -2
  89. package/dist/types/ads-meta.js.map +0 -1
  90. package/dist/types/ads-provider.d.ts +0 -7
  91. package/dist/types/ads-provider.js +0 -8
  92. package/dist/types/ads-provider.js.map +0 -1
  93. package/dist/types/ads-rules.d.ts +0 -17
  94. package/dist/types/ads-rules.js +0 -2
  95. package/dist/types/ads-rules.js.map +0 -1
  96. package/dist/types/temple-wallet-api.d.ts +0 -61
  97. package/dist/types/temple-wallet-api.js +0 -2
  98. package/dist/types/temple-wallet-api.js.map +0 -1
  99. package/dist/utils.d.ts +0 -6
  100. package/dist/utils.js +0 -4
  101. package/dist/utils.js.map +0 -1
  102. package/src/ads-meta.ts +0 -137
package/src/ads-meta.ts DELETED
@@ -1,137 +0,0 @@
1
- import { AdsConfiguration } from 'src/ads-configuration';
2
- import { AdMetadata } from 'src/types/ads-meta';
3
-
4
- export const BANNER_ADS_META: AdMetadata[] = [
5
- {
6
- source: {
7
- providerName: 'HypeLab',
8
- native: false,
9
- size: 'wide'
10
- },
11
- dimensions: {
12
- width: 728,
13
- height: 90,
14
- minContainerWidth: 701,
15
- minContainerHeight: 60,
16
- maxContainerWidth: Infinity,
17
- maxContainerHeight: 300
18
- }
19
- },
20
- // {
21
- // source: {
22
- // providerName: 'Persona',
23
- // shape: 'wide'
24
- // },
25
- // dimensions: {
26
- // width: 970,
27
- // height: 90,
28
- // minContainerWidth: 900,
29
- // minContainerHeight: 60,
30
- // maxContainerWidth: Infinity,
31
- // maxContainerHeight: 300
32
- // }
33
- // },
34
- {
35
- source: {
36
- providerName: 'Temple'
37
- },
38
- dimensions: {
39
- width: 728,
40
- height: 90,
41
- minContainerWidth: 701,
42
- minContainerHeight: 60,
43
- maxContainerWidth: Infinity,
44
- maxContainerHeight: 300
45
- }
46
- },
47
- {
48
- source: {
49
- providerName: 'Persona',
50
- shape: 'medium'
51
- },
52
- dimensions: {
53
- width: 600,
54
- height: 160,
55
- minContainerWidth: 600,
56
- minContainerHeight: 80,
57
- maxContainerWidth: 800,
58
- maxContainerHeight: 300
59
- }
60
- },
61
- {
62
- source: {
63
- providerName: 'HypeLab',
64
- native: false,
65
- size: 'high'
66
- },
67
- dimensions: {
68
- width: 300,
69
- height: 250,
70
- minContainerWidth: 300,
71
- minContainerHeight: 170,
72
- maxContainerWidth: 700,
73
- maxContainerHeight: Infinity
74
- }
75
- },
76
- {
77
- source: {
78
- providerName: 'Persona',
79
- shape: 'squarish'
80
- },
81
- dimensions: {
82
- width: 300,
83
- height: 250,
84
- minContainerWidth: 300,
85
- minContainerHeight: 170,
86
- maxContainerWidth: 700,
87
- maxContainerHeight: Infinity
88
- }
89
- },
90
- {
91
- source: {
92
- providerName: 'HypeLab',
93
- native: false,
94
- size: 'small',
95
- shouldNotUseStrictContainerLimits: true
96
- },
97
- dimensions: {
98
- width: 320,
99
- height: 50,
100
- minContainerWidth: 230,
101
- minContainerHeight: 32,
102
- maxContainerWidth: 420,
103
- maxContainerHeight: 130
104
- }
105
- },
106
- {
107
- source: {
108
- providerName: 'Persona',
109
- shape: 'regular',
110
- shouldNotUseStrictContainerLimits: true
111
- },
112
- dimensions: {
113
- width: 321,
114
- height: 101,
115
- minContainerWidth: 230,
116
- minContainerHeight: 32,
117
- maxContainerWidth: 420,
118
- maxContainerHeight: 130
119
- }
120
- }
121
- ];
122
-
123
- export const buildHypeLabNativeMeta = (containerWidth: number, containerHeight: number) => ({
124
- source: {
125
- providerName: 'HypeLab' as const,
126
- native: true as const,
127
- slug: AdsConfiguration.HYPELAB_NATIVE_PLACEMENT_SLUG
128
- },
129
- dimensions: {
130
- width: Math.max(160, containerWidth),
131
- height: Math.max(16, containerHeight),
132
- minContainerWidth: 2,
133
- minContainerHeight: 2,
134
- maxContainerWidth: Infinity,
135
- maxContainerHeight: Infinity
136
- }
137
- });