@tsparticles/interaction-external-bubble 3.0.0-alpha.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 (67) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +70 -0
  3. package/browser/Bubbler.js +294 -0
  4. package/browser/IBubblerProcessParam.js +1 -0
  5. package/browser/Options/Classes/Bubble.js +16 -0
  6. package/browser/Options/Classes/BubbleBase.js +34 -0
  7. package/browser/Options/Classes/BubbleDiv.js +26 -0
  8. package/browser/Options/Classes/BubbleOptions.js +1 -0
  9. package/browser/Options/Interfaces/IBubble.js +1 -0
  10. package/browser/Options/Interfaces/IBubbleBase.js +1 -0
  11. package/browser/Options/Interfaces/IBubbleDiv.js +1 -0
  12. package/browser/ProcessBubbleType.js +1 -0
  13. package/browser/Types.js +1 -0
  14. package/browser/index.js +10 -0
  15. package/cjs/Bubbler.js +309 -0
  16. package/cjs/IBubblerProcessParam.js +2 -0
  17. package/cjs/Options/Classes/Bubble.js +20 -0
  18. package/cjs/Options/Classes/BubbleBase.js +38 -0
  19. package/cjs/Options/Classes/BubbleDiv.js +30 -0
  20. package/cjs/Options/Classes/BubbleOptions.js +2 -0
  21. package/cjs/Options/Interfaces/IBubble.js +2 -0
  22. package/cjs/Options/Interfaces/IBubbleBase.js +2 -0
  23. package/cjs/Options/Interfaces/IBubbleDiv.js +2 -0
  24. package/cjs/ProcessBubbleType.js +2 -0
  25. package/cjs/Types.js +2 -0
  26. package/cjs/index.js +39 -0
  27. package/esm/Bubbler.js +294 -0
  28. package/esm/IBubblerProcessParam.js +1 -0
  29. package/esm/Options/Classes/Bubble.js +16 -0
  30. package/esm/Options/Classes/BubbleBase.js +34 -0
  31. package/esm/Options/Classes/BubbleDiv.js +26 -0
  32. package/esm/Options/Classes/BubbleOptions.js +1 -0
  33. package/esm/Options/Interfaces/IBubble.js +1 -0
  34. package/esm/Options/Interfaces/IBubbleBase.js +1 -0
  35. package/esm/Options/Interfaces/IBubbleDiv.js +1 -0
  36. package/esm/ProcessBubbleType.js +1 -0
  37. package/esm/Types.js +1 -0
  38. package/esm/index.js +10 -0
  39. package/package.json +82 -0
  40. package/report.html +39 -0
  41. package/tsparticles.interaction.external.bubble.js +520 -0
  42. package/tsparticles.interaction.external.bubble.min.js +2 -0
  43. package/tsparticles.interaction.external.bubble.min.js.LICENSE.txt +8 -0
  44. package/types/Bubbler.d.ts +20 -0
  45. package/types/IBubblerProcessParam.d.ts +10 -0
  46. package/types/Options/Classes/Bubble.d.ts +8 -0
  47. package/types/Options/Classes/BubbleBase.d.ts +13 -0
  48. package/types/Options/Classes/BubbleDiv.d.ts +10 -0
  49. package/types/Options/Classes/BubbleOptions.d.ts +7 -0
  50. package/types/Options/Interfaces/IBubble.d.ts +6 -0
  51. package/types/Options/Interfaces/IBubbleBase.d.ts +9 -0
  52. package/types/Options/Interfaces/IBubbleDiv.d.ts +4 -0
  53. package/types/ProcessBubbleType.d.ts +5 -0
  54. package/types/Types.d.ts +23 -0
  55. package/types/index.d.ts +8 -0
  56. package/umd/Bubbler.js +308 -0
  57. package/umd/IBubblerProcessParam.js +12 -0
  58. package/umd/Options/Classes/Bubble.js +30 -0
  59. package/umd/Options/Classes/BubbleBase.js +48 -0
  60. package/umd/Options/Classes/BubbleDiv.js +40 -0
  61. package/umd/Options/Classes/BubbleOptions.js +12 -0
  62. package/umd/Options/Interfaces/IBubble.js +12 -0
  63. package/umd/Options/Interfaces/IBubbleBase.js +12 -0
  64. package/umd/Options/Interfaces/IBubbleDiv.js +12 -0
  65. package/umd/ProcessBubbleType.js +12 -0
  66. package/umd/Types.js +12 -0
  67. package/umd/index.js +38 -0
package/cjs/Bubbler.js ADDED
@@ -0,0 +1,309 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.Bubbler = void 0;
13
+ const engine_1 = require("@tsparticles/engine");
14
+ const Bubble_1 = require("./Options/Classes/Bubble");
15
+ function calculateBubbleValue(particleValue, modeValue, optionsValue, ratio) {
16
+ if (modeValue >= optionsValue) {
17
+ const value = particleValue + (modeValue - optionsValue) * ratio;
18
+ return (0, engine_1.clamp)(value, particleValue, modeValue);
19
+ }
20
+ else if (modeValue < optionsValue) {
21
+ const value = particleValue - (optionsValue - modeValue) * ratio;
22
+ return (0, engine_1.clamp)(value, modeValue, particleValue);
23
+ }
24
+ }
25
+ class Bubbler extends engine_1.ExternalInteractorBase {
26
+ constructor(container) {
27
+ super(container);
28
+ if (!container.bubble) {
29
+ container.bubble = {};
30
+ }
31
+ this.handleClickMode = (mode) => {
32
+ if (mode !== "bubble") {
33
+ return;
34
+ }
35
+ if (!container.bubble) {
36
+ container.bubble = {};
37
+ }
38
+ container.bubble.clicking = true;
39
+ };
40
+ }
41
+ clear(particle, delta, force) {
42
+ if (particle.bubble.inRange && !force) {
43
+ return;
44
+ }
45
+ delete particle.bubble.div;
46
+ delete particle.bubble.opacity;
47
+ delete particle.bubble.radius;
48
+ delete particle.bubble.color;
49
+ }
50
+ init() {
51
+ const container = this.container, bubble = container.actualOptions.interactivity.modes.bubble;
52
+ if (!bubble) {
53
+ return;
54
+ }
55
+ container.retina.bubbleModeDistance = bubble.distance * container.retina.pixelRatio;
56
+ if (bubble.size !== undefined) {
57
+ container.retina.bubbleModeSize = bubble.size * container.retina.pixelRatio;
58
+ }
59
+ }
60
+ interact(delta) {
61
+ return __awaiter(this, void 0, void 0, function* () {
62
+ const options = this.container.actualOptions, events = options.interactivity.events, onHover = events.onHover, onClick = events.onClick, hoverEnabled = onHover.enable, hoverMode = onHover.mode, clickEnabled = onClick.enable, clickMode = onClick.mode, divs = events.onDiv;
63
+ if (hoverEnabled && (0, engine_1.isInArray)("bubble", hoverMode)) {
64
+ this.hoverBubble(delta);
65
+ }
66
+ else if (clickEnabled && (0, engine_1.isInArray)("bubble", clickMode)) {
67
+ this.clickBubble(delta);
68
+ }
69
+ else {
70
+ (0, engine_1.divModeExecute)("bubble", divs, (selector, div) => this.singleSelectorHover(delta, selector, div));
71
+ }
72
+ });
73
+ }
74
+ isEnabled(particle) {
75
+ var _a;
76
+ const container = this.container, options = container.actualOptions, mouse = container.interactivity.mouse, events = ((_a = particle === null || particle === void 0 ? void 0 : particle.interactivity) !== null && _a !== void 0 ? _a : options.interactivity).events, divs = events.onDiv, divBubble = (0, engine_1.isDivModeEnabled)("bubble", divs);
77
+ if (!(divBubble || (events.onHover.enable && mouse.position) || (events.onClick.enable && mouse.clickPosition))) {
78
+ return false;
79
+ }
80
+ const hoverMode = events.onHover.mode;
81
+ const clickMode = events.onClick.mode;
82
+ return (0, engine_1.isInArray)("bubble", hoverMode) || (0, engine_1.isInArray)("bubble", clickMode) || divBubble;
83
+ }
84
+ loadModeOptions(options, ...sources) {
85
+ if (!options.bubble) {
86
+ options.bubble = new Bubble_1.Bubble();
87
+ }
88
+ for (const source of sources) {
89
+ options.bubble.load(source === null || source === void 0 ? void 0 : source.bubble);
90
+ }
91
+ }
92
+ reset(particle) {
93
+ particle.bubble.inRange = false;
94
+ }
95
+ clickBubble(delta) {
96
+ var _a, _b;
97
+ const container = this.container, options = container.actualOptions, mouseClickPos = container.interactivity.mouse.clickPosition, bubble = options.interactivity.modes.bubble;
98
+ if (!bubble || !mouseClickPos) {
99
+ return;
100
+ }
101
+ if (!container.bubble) {
102
+ container.bubble = {};
103
+ }
104
+ const distance = container.retina.bubbleModeDistance;
105
+ if (!distance || distance < 0) {
106
+ return;
107
+ }
108
+ const query = container.particles.quadTree.queryCircle(mouseClickPos, distance, (p) => this.isEnabled(p));
109
+ for (const particle of query) {
110
+ if (!container.bubble.clicking) {
111
+ continue;
112
+ }
113
+ particle.bubble.inRange = !container.bubble.durationEnd;
114
+ const pos = particle.getPosition(), distMouse = (0, engine_1.getDistance)(pos, mouseClickPos), timeSpent = (new Date().getTime() - (container.interactivity.mouse.clickTime || 0)) / 1000;
115
+ if (timeSpent > bubble.duration) {
116
+ container.bubble.durationEnd = true;
117
+ }
118
+ if (timeSpent > bubble.duration * 2) {
119
+ container.bubble.clicking = false;
120
+ container.bubble.durationEnd = false;
121
+ }
122
+ const sizeData = {
123
+ bubbleObj: {
124
+ optValue: container.retina.bubbleModeSize,
125
+ value: particle.bubble.radius,
126
+ },
127
+ particlesObj: {
128
+ optValue: (0, engine_1.getRangeMax)(particle.options.size.value) * container.retina.pixelRatio,
129
+ value: particle.size.value,
130
+ },
131
+ type: "size",
132
+ };
133
+ this.process(particle, distMouse, timeSpent, sizeData);
134
+ const opacityData = {
135
+ bubbleObj: {
136
+ optValue: bubble.opacity,
137
+ value: particle.bubble.opacity,
138
+ },
139
+ particlesObj: {
140
+ optValue: (0, engine_1.getRangeMax)(particle.options.opacity.value),
141
+ value: (_b = (_a = particle.opacity) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : 1,
142
+ },
143
+ type: "opacity",
144
+ };
145
+ this.process(particle, distMouse, timeSpent, opacityData);
146
+ if (!container.bubble.durationEnd) {
147
+ if (distMouse <= distance) {
148
+ this.hoverBubbleColor(particle, distMouse);
149
+ }
150
+ else {
151
+ delete particle.bubble.color;
152
+ }
153
+ }
154
+ else {
155
+ delete particle.bubble.color;
156
+ }
157
+ }
158
+ }
159
+ hoverBubble(delta) {
160
+ const container = this.container, mousePos = container.interactivity.mouse.position, distance = container.retina.bubbleModeDistance;
161
+ if (!distance || distance < 0 || mousePos === undefined) {
162
+ return;
163
+ }
164
+ const query = container.particles.quadTree.queryCircle(mousePos, distance, (p) => this.isEnabled(p));
165
+ for (const particle of query) {
166
+ particle.bubble.inRange = true;
167
+ const pos = particle.getPosition(), pointDistance = (0, engine_1.getDistance)(pos, mousePos), ratio = 1 - pointDistance / distance;
168
+ if (pointDistance <= distance) {
169
+ if (ratio >= 0 && container.interactivity.status === engine_1.mouseMoveEvent) {
170
+ this.hoverBubbleSize(particle, ratio);
171
+ this.hoverBubbleOpacity(particle, ratio);
172
+ this.hoverBubbleColor(particle, ratio);
173
+ }
174
+ }
175
+ else {
176
+ this.reset(particle);
177
+ }
178
+ if (container.interactivity.status === engine_1.mouseLeaveEvent) {
179
+ this.reset(particle);
180
+ }
181
+ }
182
+ }
183
+ hoverBubbleColor(particle, ratio, divBubble) {
184
+ const options = this.container.actualOptions;
185
+ const bubbleOptions = divBubble !== null && divBubble !== void 0 ? divBubble : options.interactivity.modes.bubble;
186
+ if (!bubbleOptions) {
187
+ return;
188
+ }
189
+ if (!particle.bubble.finalColor) {
190
+ const modeColor = bubbleOptions.color;
191
+ if (!modeColor) {
192
+ return;
193
+ }
194
+ const bubbleColor = (0, engine_1.itemFromSingleOrMultiple)(modeColor);
195
+ particle.bubble.finalColor = (0, engine_1.rangeColorToHsl)(bubbleColor);
196
+ }
197
+ if (!particle.bubble.finalColor) {
198
+ return;
199
+ }
200
+ if (bubbleOptions.mix) {
201
+ particle.bubble.color = undefined;
202
+ const pColor = particle.getFillColor();
203
+ particle.bubble.color = pColor
204
+ ? (0, engine_1.rgbToHsl)((0, engine_1.colorMix)(pColor, particle.bubble.finalColor, 1 - ratio, ratio))
205
+ : particle.bubble.finalColor;
206
+ }
207
+ else {
208
+ particle.bubble.color = particle.bubble.finalColor;
209
+ }
210
+ }
211
+ hoverBubbleOpacity(particle, ratio, divBubble) {
212
+ var _a, _b, _c, _d;
213
+ const container = this.container, options = container.actualOptions, modeOpacity = (_a = divBubble === null || divBubble === void 0 ? void 0 : divBubble.opacity) !== null && _a !== void 0 ? _a : (_b = options.interactivity.modes.bubble) === null || _b === void 0 ? void 0 : _b.opacity;
214
+ if (!modeOpacity) {
215
+ return;
216
+ }
217
+ const optOpacity = particle.options.opacity.value;
218
+ const pOpacity = (_d = (_c = particle.opacity) === null || _c === void 0 ? void 0 : _c.value) !== null && _d !== void 0 ? _d : 1;
219
+ const opacity = calculateBubbleValue(pOpacity, modeOpacity, (0, engine_1.getRangeMax)(optOpacity), ratio);
220
+ if (opacity !== undefined) {
221
+ particle.bubble.opacity = opacity;
222
+ }
223
+ }
224
+ hoverBubbleSize(particle, ratio, divBubble) {
225
+ const container = this.container, modeSize = (divBubble === null || divBubble === void 0 ? void 0 : divBubble.size) ? divBubble.size * container.retina.pixelRatio : container.retina.bubbleModeSize;
226
+ if (modeSize === undefined) {
227
+ return;
228
+ }
229
+ const optSize = (0, engine_1.getRangeMax)(particle.options.size.value) * container.retina.pixelRatio;
230
+ const pSize = particle.size.value;
231
+ const size = calculateBubbleValue(pSize, modeSize, optSize, ratio);
232
+ if (size !== undefined) {
233
+ particle.bubble.radius = size;
234
+ }
235
+ }
236
+ process(particle, distMouse, timeSpent, data) {
237
+ const container = this.container, bubbleParam = data.bubbleObj.optValue, options = container.actualOptions, bubble = options.interactivity.modes.bubble;
238
+ if (!bubble || bubbleParam === undefined) {
239
+ return;
240
+ }
241
+ const bubbleDuration = bubble.duration, bubbleDistance = container.retina.bubbleModeDistance, particlesParam = data.particlesObj.optValue, pObjBubble = data.bubbleObj.value, pObj = data.particlesObj.value || 0, type = data.type;
242
+ if (!bubbleDistance || bubbleDistance < 0 || bubbleParam === particlesParam) {
243
+ return;
244
+ }
245
+ if (!container.bubble) {
246
+ container.bubble = {};
247
+ }
248
+ if (!container.bubble.durationEnd) {
249
+ if (distMouse <= bubbleDistance) {
250
+ const obj = pObjBubble !== null && pObjBubble !== void 0 ? pObjBubble : pObj;
251
+ if (obj !== bubbleParam) {
252
+ const value = pObj - (timeSpent * (pObj - bubbleParam)) / bubbleDuration;
253
+ if (type === "size") {
254
+ particle.bubble.radius = value;
255
+ }
256
+ if (type === "opacity") {
257
+ particle.bubble.opacity = value;
258
+ }
259
+ }
260
+ }
261
+ else {
262
+ if (type === "size") {
263
+ delete particle.bubble.radius;
264
+ }
265
+ if (type === "opacity") {
266
+ delete particle.bubble.opacity;
267
+ }
268
+ }
269
+ }
270
+ else if (pObjBubble) {
271
+ if (type === "size") {
272
+ delete particle.bubble.radius;
273
+ }
274
+ if (type === "opacity") {
275
+ delete particle.bubble.opacity;
276
+ }
277
+ }
278
+ }
279
+ singleSelectorHover(delta, selector, div) {
280
+ const container = this.container, selectors = document.querySelectorAll(selector), bubble = container.actualOptions.interactivity.modes.bubble;
281
+ if (!bubble || !selectors.length) {
282
+ return;
283
+ }
284
+ selectors.forEach((item) => {
285
+ const elem = item, pxRatio = container.retina.pixelRatio, pos = {
286
+ x: (elem.offsetLeft + elem.offsetWidth / 2) * pxRatio,
287
+ y: (elem.offsetTop + elem.offsetHeight / 2) * pxRatio,
288
+ }, repulseRadius = (elem.offsetWidth / 2) * pxRatio, area = div.type === "circle"
289
+ ? new engine_1.Circle(pos.x, pos.y, repulseRadius)
290
+ : new engine_1.Rectangle(elem.offsetLeft * pxRatio, elem.offsetTop * pxRatio, elem.offsetWidth * pxRatio, elem.offsetHeight * pxRatio), query = container.particles.quadTree.query(area, (p) => this.isEnabled(p));
291
+ for (const particle of query) {
292
+ if (!area.contains(particle.getPosition())) {
293
+ continue;
294
+ }
295
+ particle.bubble.inRange = true;
296
+ const divs = bubble.divs;
297
+ const divBubble = (0, engine_1.divMode)(divs, elem);
298
+ if (!particle.bubble.div || particle.bubble.div !== elem) {
299
+ this.clear(particle, delta, true);
300
+ particle.bubble.div = elem;
301
+ }
302
+ this.hoverBubbleSize(particle, 1, divBubble);
303
+ this.hoverBubbleOpacity(particle, 1, divBubble);
304
+ this.hoverBubbleColor(particle, 1, divBubble);
305
+ }
306
+ });
307
+ }
308
+ }
309
+ exports.Bubbler = Bubbler;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Bubble = void 0;
4
+ const BubbleBase_1 = require("./BubbleBase");
5
+ const BubbleDiv_1 = require("./BubbleDiv");
6
+ const engine_1 = require("@tsparticles/engine");
7
+ class Bubble extends BubbleBase_1.BubbleBase {
8
+ load(data) {
9
+ super.load(data);
10
+ if (!data) {
11
+ return;
12
+ }
13
+ this.divs = (0, engine_1.executeOnSingleOrMultiple)(data.divs, (div) => {
14
+ const tmp = new BubbleDiv_1.BubbleDiv();
15
+ tmp.load(div);
16
+ return tmp;
17
+ });
18
+ }
19
+ }
20
+ exports.Bubble = Bubble;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BubbleBase = void 0;
4
+ const engine_1 = require("@tsparticles/engine");
5
+ class BubbleBase {
6
+ constructor() {
7
+ this.distance = 200;
8
+ this.duration = 0.4;
9
+ this.mix = false;
10
+ }
11
+ load(data) {
12
+ if (!data) {
13
+ return;
14
+ }
15
+ if (data.distance !== undefined) {
16
+ this.distance = data.distance;
17
+ }
18
+ if (data.duration !== undefined) {
19
+ this.duration = data.duration;
20
+ }
21
+ if (data.mix !== undefined) {
22
+ this.mix = data.mix;
23
+ }
24
+ if (data.opacity !== undefined) {
25
+ this.opacity = data.opacity;
26
+ }
27
+ if (data.color !== undefined) {
28
+ const sourceColor = this.color instanceof Array ? undefined : this.color;
29
+ this.color = (0, engine_1.executeOnSingleOrMultiple)(data.color, (color) => {
30
+ return engine_1.OptionsColor.create(sourceColor, color);
31
+ });
32
+ }
33
+ if (data.size !== undefined) {
34
+ this.size = data.size;
35
+ }
36
+ }
37
+ }
38
+ exports.BubbleBase = BubbleBase;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BubbleDiv = void 0;
4
+ const BubbleBase_1 = require("./BubbleBase");
5
+ const engine_1 = require("@tsparticles/engine");
6
+ class BubbleDiv extends BubbleBase_1.BubbleBase {
7
+ constructor() {
8
+ super();
9
+ this.selectors = [];
10
+ }
11
+ get ids() {
12
+ return (0, engine_1.executeOnSingleOrMultiple)(this.selectors, (t) => t.replace("#", ""));
13
+ }
14
+ set ids(value) {
15
+ this.selectors = (0, engine_1.executeOnSingleOrMultiple)(value, (t) => `#${t}`);
16
+ }
17
+ load(data) {
18
+ super.load(data);
19
+ if (!data) {
20
+ return;
21
+ }
22
+ if (data.ids !== undefined) {
23
+ this.ids = data.ids;
24
+ }
25
+ if (data.selectors !== undefined) {
26
+ this.selectors = data.selectors;
27
+ }
28
+ }
29
+ }
30
+ exports.BubbleDiv = BubbleDiv;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/cjs/Types.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/cjs/index.js ADDED
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
17
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
18
+ return new (P || (P = Promise))(function (resolve, reject) {
19
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
20
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
21
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
22
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
23
+ });
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.loadExternalBubbleInteraction = void 0;
27
+ const Bubbler_1 = require("./Bubbler");
28
+ function loadExternalBubbleInteraction(engine) {
29
+ return __awaiter(this, void 0, void 0, function* () {
30
+ yield engine.addInteractor("externalBubble", (container) => new Bubbler_1.Bubbler(container));
31
+ });
32
+ }
33
+ exports.loadExternalBubbleInteraction = loadExternalBubbleInteraction;
34
+ __exportStar(require("./Options/Classes/BubbleBase"), exports);
35
+ __exportStar(require("./Options/Classes/BubbleDiv"), exports);
36
+ __exportStar(require("./Options/Classes/Bubble"), exports);
37
+ __exportStar(require("./Options/Interfaces/IBubbleBase"), exports);
38
+ __exportStar(require("./Options/Interfaces/IBubbleDiv"), exports);
39
+ __exportStar(require("./Options/Interfaces/IBubble"), exports);