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