@everymatrix/general-tutorial-slider 1.31.1 → 1.32.4

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 (48) hide show
  1. package/LICENSE +21 -0
  2. package/package.json +3 -2
  3. package/dist/cjs/general-tutorial-slider.cjs.entry.js +0 -344
  4. package/dist/cjs/general-tutorial-slider.cjs.js +0 -19
  5. package/dist/cjs/index-18ec3908.js +0 -1282
  6. package/dist/cjs/index.cjs.js +0 -2
  7. package/dist/cjs/loader.cjs.js +0 -21
  8. package/dist/collection/collection-manifest.json +0 -12
  9. package/dist/collection/components/general-tutorial-slider/general-tutorial-slider.css +0 -168
  10. package/dist/collection/components/general-tutorial-slider/general-tutorial-slider.js +0 -526
  11. package/dist/collection/index.js +0 -1
  12. package/dist/collection/utils/locale.utils.js +0 -40
  13. package/dist/collection/utils/utils.js +0 -39
  14. package/dist/components/general-tutorial-slider.d.ts +0 -11
  15. package/dist/components/general-tutorial-slider.js +0 -377
  16. package/dist/components/index.d.ts +0 -26
  17. package/dist/components/index.js +0 -1
  18. package/dist/esm/general-tutorial-slider.entry.js +0 -340
  19. package/dist/esm/general-tutorial-slider.js +0 -17
  20. package/dist/esm/index-a2165162.js +0 -1256
  21. package/dist/esm/index.js +0 -1
  22. package/dist/esm/loader.js +0 -17
  23. package/dist/esm/polyfills/core-js.js +0 -11
  24. package/dist/esm/polyfills/css-shim.js +0 -1
  25. package/dist/esm/polyfills/dom.js +0 -79
  26. package/dist/esm/polyfills/es5-html-element.js +0 -1
  27. package/dist/esm/polyfills/index.js +0 -34
  28. package/dist/esm/polyfills/system.js +0 -6
  29. package/dist/general-tutorial-slider/general-tutorial-slider.esm.js +0 -1
  30. package/dist/general-tutorial-slider/index.esm.js +0 -0
  31. package/dist/general-tutorial-slider/p-a5ce3c59.entry.js +0 -1
  32. package/dist/general-tutorial-slider/p-a878ee14.js +0 -1
  33. package/dist/index.cjs.js +0 -1
  34. package/dist/index.js +0 -1
  35. package/dist/stencil.config.js +0 -22
  36. package/dist/types/Users/sebastian.strulea/Documents/work/widgets-stencil/packages/general-tutorial-slider/.stencil/packages/general-tutorial-slider/stencil.config.d.ts +0 -2
  37. package/dist/types/components/general-tutorial-slider/general-tutorial-slider.d.ts +0 -90
  38. package/dist/types/components.d.ts +0 -141
  39. package/dist/types/index.d.ts +0 -1
  40. package/dist/types/stencil-public-runtime.d.ts +0 -1565
  41. package/dist/types/utils/locale.utils.d.ts +0 -1
  42. package/dist/types/utils/utils.d.ts +0 -9
  43. package/loader/cdn.js +0 -3
  44. package/loader/index.cjs.js +0 -3
  45. package/loader/index.d.ts +0 -12
  46. package/loader/index.es2017.js +0 -3
  47. package/loader/index.js +0 -4
  48. package/loader/package.json +0 -10
@@ -1,377 +0,0 @@
1
- import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
-
3
- const DEFAULT_LANGUAGE = 'en';
4
- const SUPPORTED_LANGUAGES = ['ro', 'en', 'fr', 'ar', 'hu', 'hr'];
5
- const TRANSLATIONS = {
6
- en: {
7
- error: 'Error',
8
- noResults: 'Loading, please wait ...',
9
- },
10
- hu: {
11
- error: 'Error',
12
- noResults: 'Loading, please wait ...',
13
- },
14
- ro: {
15
- error: 'Eroare',
16
- noResults: 'Loading, please wait ...',
17
- },
18
- fr: {
19
- error: 'Error',
20
- noResults: 'Loading, please wait ...',
21
- },
22
- ar: {
23
- error: 'خطأ',
24
- noResults: 'Loading, please wait ...',
25
- },
26
- hr: {
27
- error: 'Greška',
28
- noResults: 'Učitavanje, molimo pričekajte ...',
29
- },
30
- 'es-mx': {
31
- 'error': 'Error',
32
- 'noResults': 'Cargando, espere por favor…'
33
- },
34
- 'pt-br': {
35
- 'error': 'Erro',
36
- 'noResults': 'Carregando, espere por favor…'
37
- }
38
- };
39
- const translate = (key, customLang) => {
40
- const lang = customLang;
41
- return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
42
- };
43
-
44
- /**
45
- * @name isMobile
46
- * @description A method that returns if the browser used to access the app is from a mobile device or not
47
- * @param {String} userAgent window.navigator.userAgent
48
- * @returns {Boolean} true or false
49
- */
50
- const isMobile = (userAgent) => {
51
- return !!(userAgent.toLowerCase().match(/android/i) ||
52
- userAgent.toLowerCase().match(/blackberry|bb/i) ||
53
- userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||
54
- userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
55
- };
56
- const getDevice = () => {
57
- let userAgent = window.navigator.userAgent;
58
- if (userAgent.toLowerCase().match(/android/i)) {
59
- return 'Android';
60
- }
61
- if (userAgent.toLowerCase().match(/iphone/i)) {
62
- return 'iPhone';
63
- }
64
- if (userAgent.toLowerCase().match(/ipad|ipod/i)) {
65
- return 'iPad';
66
- }
67
- return 'PC';
68
- };
69
- const getDevicePlatform = () => {
70
- const device = getDevice();
71
- if (device) {
72
- if (device === 'PC') {
73
- return 'dk';
74
- }
75
- else if (device === 'iPad' || device === 'iPhone') {
76
- return 'ios';
77
- }
78
- else {
79
- return 'mtWeb';
80
- }
81
- }
82
- };
83
-
84
- const generalTutorialSliderCss = ":host {\n display: block;\n}\n\n.GeneralTutorialSliderError {\n display: flex;\n justify-content: center;\n flex-direction: column;\n}\n.GeneralTutorialSliderError.TitleError {\n color: red;\n}\n\nmain {\n width: 100%;\n overflow: hidden;\n}\n\n.TutorialWrapper {\n width: 100%;\n display: flex;\n flex: 0 0 auto;\n justify-content: center;\n flex-direction: column;\n overflow: auto;\n}\n\n.TutorialContent {\n display: flex;\n justify-content: center;\n flex-direction: row;\n}\n\n.TutorialItems {\n display: flex;\n transition: transform 0.4s ease-in-out;\n transform: translateX(0px);\n}\n\n.TutorialItem {\n flex: 0 0 auto;\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: center;\n color: #000;\n background-color: #f5f5f5;\n border-radius: 5px;\n user-select: none;\n}\n.TutorialItem .ItemTitle {\n padding: 25px 15px;\n font-size: 18px;\n font-weight: 600;\n color: var(--emfe-w-color-secondary, #FD2839);\n}\n.TutorialItem .ItemImage {\n overflow: hidden;\n}\n.TutorialItem .ItemImage img, .TutorialItem .ItemImage video {\n height: auto;\n width: 450px;\n}\n.TutorialItem .ItemDescription {\n font-size: 14px;\n padding: 25px 15px;\n font-weight: 400;\n color: #000;\n}\n\n.SliderNavButton {\n border: 0px;\n width: 25px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.SliderNavButton svg {\n width: 20px;\n stroke: var(--emfe-w-color-secondary, #FD2839);\n}\n\n.DisabledArrow svg {\n opacity: 0.2;\n stroke: var(--emfe-w-color-secondary, #FD2839);\n pointer-events: none;\n}\n\n.DotsWrapper {\n width: 100%;\n margin: 0 auto;\n margin-top: 20px;\n height: 30px;\n}\n.DotsWrapper ul.Dots {\n display: flex;\n justify-content: center;\n padding: 0;\n}\n.DotsWrapper ul.Dots li {\n height: 10px;\n width: 10px;\n background: #ccc;\n border-radius: 50%;\n margin-left: 3px;\n margin-right: 3px;\n list-style: none;\n cursor: pointer;\n}\n.DotsWrapper ul.Dots li:hover {\n background: #bbb;\n}\n.DotsWrapper ul.Dots li.active {\n border: solid 1px var(--emfe-w-color-secondary, #FD2839);\n background: var(--emfe-w-color-secondary, #FD2839);\n}\n.DotsWrapper ul.Dots li.default {\n border: solid 1px var(--emfe-w-color-secondary, #FD2839);\n background-color: #FFF;\n}\n\n@container (max-width: 475px) {\n @media screen and (orientation: landscape) {\n .TutorialItem {\n width: 100%;\n }\n }\n main {\n height: 90cqh;\n }\n\n .TutorialItems {\n height: inherit;\n }\n\n .TutorialItem {\n min-width: 100%;\n max-height: 800px;\n overflow: auto;\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: center;\n color: #000;\n background-color: #f5f5f5;\n border-radius: 5px;\n user-select: none;\n }\n .TutorialItem .ItemTitle {\n padding: 25px 15px;\n font-size: 18px;\n font-weight: 600;\n color: var(--emfe-w-color-secondary, #FD2839);\n }\n .TutorialItem .ItemImage {\n min-height: 200px;\n }\n .TutorialItem .ItemImage img, .TutorialItem .ItemImage video {\n height: auto;\n width: 100%;\n }\n .TutorialItem .ItemDescription {\n font-size: 14px;\n padding: 25px 15px;\n font-weight: 400;\n color: #000;\n }\n}";
85
-
86
- const GeneralTutorialSlider$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
87
- constructor() {
88
- super();
89
- this.__registerHost();
90
- this.__attachShadow();
91
- /**
92
- * Client custom styling via inline style
93
- */
94
- this.clientStyling = '';
95
- /**
96
- * Client custom styling via url
97
- */
98
- this.clientStylingUrl = '';
99
- /**
100
- * Language of the widget
101
- */
102
- this.language = 'en';
103
- /**
104
- * User roles
105
- */
106
- this.userRoles = 'everyone';
107
- /**
108
- * CMS Endpoint stage
109
- */
110
- this.cmsEnv = 'stage';
111
- /**
112
- * Show slider dots
113
- */
114
- this.showSliderDots = true;
115
- /**
116
- * Show slider navigate arrows
117
- */
118
- this.showSliderArrows = true;
119
- /**
120
- * Show slider navigate arrows on mobile
121
- */
122
- this.showSliderArrowsMobile = false;
123
- /**
124
- * Auto-scroll will only function if it is set to true, and otherwise it will be ignored.
125
- */
126
- this.enableAutoScroll = false;
127
- /**
128
- * Set interval period for slider
129
- */
130
- this.intervalPeriod = 5000;
131
- /**
132
- * Set the number of slides you wish to display.
133
- */
134
- this.scrollItems = 1;
135
- /**
136
- * Set the number of slides you wish to display.
137
- */
138
- this.itemsPerPage = 1;
139
- this.hasErrors = false;
140
- this.limitStylingAppends = false;
141
- this.isLoading = true;
142
- this.activeIndex = 0;
143
- this.tutorialElementWidth = 0;
144
- this.userAgent = window.navigator.userAgent;
145
- this.isMobile = isMobile(this.userAgent);
146
- this.allElementsWidth = 0;
147
- this.xDown = null;
148
- this.yDown = null;
149
- this.resizeHandler = () => {
150
- this.recalculateItemsPerPage();
151
- };
152
- this.orientationChangeHandler = () => {
153
- setTimeout(() => {
154
- this.recalculateItemsPerPage();
155
- }, 10);
156
- };
157
- this.setClientStyling = () => {
158
- let sheet = document.createElement('style');
159
- sheet.innerHTML = this.clientStyling;
160
- this.stylingContainer.prepend(sheet);
161
- };
162
- this.setClientStylingURL = () => {
163
- let url = new URL(this.clientStylingUrl);
164
- let cssFile = document.createElement('style');
165
- fetch(url.href)
166
- .then((res) => res.text())
167
- .then((data) => {
168
- cssFile.innerHTML = data;
169
- setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
170
- })
171
- .catch((err) => {
172
- console.log('error ', err);
173
- });
174
- };
175
- }
176
- watchEndpoint(newValue, oldValue) {
177
- if (newValue && newValue != oldValue && this.cmsEndpoint) {
178
- this.getGeneralTutorialSlider().then((tutorialContent) => {
179
- this.tutorialData = tutorialContent;
180
- });
181
- }
182
- }
183
- connectedCallback() {
184
- window.screen.orientation.addEventListener('change', this.orientationChangeHandler);
185
- }
186
- componentWillLoad() {
187
- if (this.cmsEndpoint && this.language) {
188
- return this.getGeneralTutorialSlider().then((tutorialContent) => {
189
- this.tutorialData = tutorialContent;
190
- });
191
- }
192
- }
193
- componentDidLoad() {
194
- window.addEventListener('resize', this.resizeHandler);
195
- }
196
- componentDidRender() {
197
- this.el.addEventListener('touchstart', this.handleTouchStart.bind(this), { passive: true });
198
- this.el.addEventListener('touchmove', this.handleTouchMove.bind(this), { passive: true });
199
- this.recalculateItemsPerPage();
200
- // start custom styling area
201
- if (!this.limitStylingAppends && this.stylingContainer) {
202
- if (this.clientStyling)
203
- this.setClientStyling();
204
- if (this.clientStylingUrl)
205
- this.setClientStylingURL();
206
- this.limitStylingAppends = true;
207
- }
208
- // end custom styling area
209
- }
210
- componentDidUpdate() {
211
- this.recalculateItemsPerPage();
212
- }
213
- disconnectedCallback() {
214
- this.el.removeEventListener('touchstart', this.handleTouchStart);
215
- this.el.removeEventListener('touchmove', this.handleTouchMove);
216
- window.screen.orientation.removeEventListener('change', this.orientationChangeHandler);
217
- window.removeEventListener('resize', this.resizeHandler);
218
- }
219
- getGeneralTutorialSlider() {
220
- let url = new URL(`${this.cmsEndpoint}/${this.language}/slider-onboarding`);
221
- url.searchParams.append('env', this.cmsEnv);
222
- url.searchParams.append('userRoles', this.userRoles);
223
- url.searchParams.append('device', getDevicePlatform());
224
- return new Promise((resolve, reject) => {
225
- this.isLoading = true;
226
- fetch(url.href)
227
- .then((res) => res.json())
228
- .then((tutorialContent) => {
229
- resolve(tutorialContent);
230
- }).catch((err) => {
231
- console.error(err);
232
- this.hasErrors = true;
233
- reject(err);
234
- }).finally(() => {
235
- this.isLoading = false;
236
- });
237
- });
238
- }
239
- move(direction) {
240
- this.setActive(this.activeIndex + direction);
241
- }
242
- ;
243
- //calculate itemsperpage by tutorials length to avoid empty in the tutorials end
244
- recalculateItemsPerPage() {
245
- if (!this.tutorialsElement)
246
- return;
247
- this.tutorialElementWidth = this.tutorialsElement.clientWidth;
248
- this.allElementsWidth = (this.tutorialData.length - 1) * this.tutorialElementWidth;
249
- }
250
- ;
251
- goTo(index) {
252
- let diff = this.activeIndex - index;
253
- if (diff > 0) {
254
- for (let i = 0; i < diff; i++) {
255
- this.move(-1);
256
- }
257
- }
258
- else {
259
- for (let i = 0; i > diff; i--) {
260
- this.move(1);
261
- }
262
- }
263
- }
264
- handleTouchStart(evt) {
265
- const firstTouch = this.getTouches(evt)[0];
266
- this.xDown = firstTouch.clientX;
267
- this.yDown = firstTouch.clientY;
268
- }
269
- getTouches(evt) {
270
- return evt.touches || evt.originalEvent.touches;
271
- }
272
- handleTouchMove(evt) {
273
- if (!this.xDown || !this.yDown)
274
- return;
275
- let xUp = evt.touches[0].clientX;
276
- let yUp = evt.touches[0].clientY;
277
- let xDiff = this.xDown - xUp;
278
- let yDiff = this.yDown - yUp;
279
- if (Math.abs(xDiff) > Math.abs(yDiff)) {
280
- if (xDiff > 0) {
281
- this.move(1);
282
- }
283
- else {
284
- this.move(-1);
285
- }
286
- }
287
- this.xDown = null;
288
- this.yDown = null;
289
- }
290
- ;
291
- setActive(index) {
292
- const maxLength = this.tutorialData.length;
293
- if (index >= 0) {
294
- if (index >= maxLength - 1) {
295
- this.activeIndex = maxLength - 1;
296
- }
297
- else {
298
- this.activeIndex = index;
299
- }
300
- }
301
- else {
302
- this.activeIndex = 0;
303
- }
304
- }
305
- renderDots() {
306
- const dots = [];
307
- for (let index = 0; index < this.tutorialData.length / this.itemsPerPage; index++) {
308
- dots.push(h("li", { class: index == this.activeIndex ? 'active' : 'default', onClick: () => { this.goTo(index); this.setActive(index); } }));
309
- }
310
- return dots;
311
- }
312
- render() {
313
- const styles = {
314
- transform: `translate(${(this.allElementsWidth / (this.tutorialData.length - 1) * this.activeIndex) * -1}px, 0px)`
315
- };
316
- const itemStyle = {
317
- width: `${this.tutorialElementWidth / this.itemsPerPage}px`
318
- };
319
- if (this.hasErrors) {
320
- return (h("div", { class: "GeneralTutorialSliderError" }, h("div", { class: "TitleError" }, translate('error', this.language))));
321
- }
322
- if (!this.isLoading) {
323
- return (h("div", { ref: el => this.stylingContainer = el }, h("div", { class: "TutorialWrapper" }, h("div", { class: "TutorialContent", ref: (el) => this.slider = el }, ((this.showSliderArrows && !this.isMobile) ||
324
- (this.showSliderArrowsMobile && this.isMobile)) &&
325
- h("div", { class: this.activeIndex === 0 ? 'SliderNavButton DisabledArrow' : 'SliderNavButton', onClick: () => this.move(-1) }, h("svg", { fill: "none", stroke: "var(--emfe-w-color-secondary, #FD2839)", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M15 19l-7-7 7-7" }))), h("main", null, h("div", { style: styles, ref: (el) => this.tutorialsElement = el, class: "TutorialItems" }, this.tutorialData.map((data) => {
326
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
327
- return h("div", { class: "TutorialItem", style: itemStyle }, h("div", { class: "ItemTitle", innerHTML: data === null || data === void 0 ? void 0 : data.title }), ((_a = data === null || data === void 0 ? void 0 : data.media) === null || _a === void 0 ? void 0 : _a.images) ? (h("div", { class: "ItemImage" }, this.isMobile ? (h("img", { src: (_e = (_d = (_c = (_b = data === null || data === void 0 ? void 0 : data.media) === null || _b === void 0 ? void 0 : _b.images[0]) === null || _c === void 0 ? void 0 : _c.sources) === null || _d === void 0 ? void 0 : _d.find((source) => source.media === 'mobile')) === null || _e === void 0 ? void 0 : _e.src, alt: data === null || data === void 0 ? void 0 : data.slug })) : (h("img", { src: (_j = (_h = (_g = (_f = data === null || data === void 0 ? void 0 : data.media) === null || _f === void 0 ? void 0 : _f.images[0]) === null || _g === void 0 ? void 0 : _g.sources) === null || _h === void 0 ? void 0 : _h.find((source) => source.media === 'desktop')) === null || _j === void 0 ? void 0 : _j.src, alt: data === null || data === void 0 ? void 0 : data.slug })))) : ((_k = data === null || data === void 0 ? void 0 : data.media) === null || _k === void 0 ? void 0 : _k.video) ? (h("div", { class: "ItemImage" }, this.isMobile ? (h("video", { controls: true, loop: true, autoplay: true }, h("source", { src: (_p = (_o = (_m = (_l = data === null || data === void 0 ? void 0 : data.media) === null || _l === void 0 ? void 0 : _l.video[0]) === null || _m === void 0 ? void 0 : _m.sources) === null || _o === void 0 ? void 0 : _o.find((source) => source.media === 'mobile')) === null || _p === void 0 ? void 0 : _p.src, type: "video/mp4" }))) : (h("video", { controls: true, loop: true, autoplay: true }, h("source", { src: (_t = (_s = (_r = (_q = data === null || data === void 0 ? void 0 : data.media) === null || _q === void 0 ? void 0 : _q.video[0]) === null || _r === void 0 ? void 0 : _r.sources) === null || _s === void 0 ? void 0 : _s.find((source) => source.media === 'desktop')) === null || _t === void 0 ? void 0 : _t.src, type: "video/mp4" }))))) : null, h("div", { class: "ItemDescription", innerHTML: data === null || data === void 0 ? void 0 : data.content }));
328
- }))), ((this.showSliderArrows && !this.isMobile) ||
329
- (this.showSliderArrowsMobile && this.isMobile)) &&
330
- h("div", { class: this.activeIndex === this.tutorialData.length - 1 ? ' SliderNavButton DisabledArrow disabled' : 'SliderNavButton', onClick: () => this.move(1) }, h("svg", { fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M9 5l7 7-7 7" }))), h("div", null)), this.showSliderDots &&
331
- h("div", { class: "DotsWrapper" }, h("ul", { class: "Dots" }, this.renderDots())))));
332
- }
333
- }
334
- get el() { return this; }
335
- static get watchers() { return {
336
- "cmsEndpoint": ["watchEndpoint"],
337
- "language": ["watchEndpoint"]
338
- }; }
339
- static get style() { return generalTutorialSliderCss; }
340
- }, [1, "general-tutorial-slider", {
341
- "clientStyling": [513, "client-styling"],
342
- "clientStylingUrl": [513, "client-styling-url"],
343
- "language": [513],
344
- "cmsEndpoint": [513, "cms-endpoint"],
345
- "userRoles": [513, "user-roles"],
346
- "cmsEnv": [513, "cms-env"],
347
- "showSliderDots": [516, "show-slider-dots"],
348
- "showSliderArrows": [516, "show-slider-arrows"],
349
- "showSliderArrowsMobile": [516, "show-slider-arrows-mobile"],
350
- "enableAutoScroll": [516, "enable-auto-scroll"],
351
- "intervalPeriod": [514, "interval-period"],
352
- "scrollItems": [520, "scroll-items"],
353
- "itemsPerPage": [514, "items-per-page"],
354
- "hasErrors": [32],
355
- "limitStylingAppends": [32],
356
- "isLoading": [32],
357
- "activeIndex": [32],
358
- "tutorialElementWidth": [32]
359
- }]);
360
- function defineCustomElement$1() {
361
- if (typeof customElements === "undefined") {
362
- return;
363
- }
364
- const components = ["general-tutorial-slider"];
365
- components.forEach(tagName => { switch (tagName) {
366
- case "general-tutorial-slider":
367
- if (!customElements.get(tagName)) {
368
- customElements.define(tagName, GeneralTutorialSlider$1);
369
- }
370
- break;
371
- } });
372
- }
373
-
374
- const GeneralTutorialSlider = GeneralTutorialSlider$1;
375
- const defineCustomElement = defineCustomElement$1;
376
-
377
- export { GeneralTutorialSlider, defineCustomElement };
@@ -1,26 +0,0 @@
1
- /* GeneralTutorialSlider custom elements */
2
-
3
- import type { Components, JSX } from "../types/components";
4
-
5
- /**
6
- * Used to manually set the base path where assets can be found.
7
- * If the script is used as "module", it's recommended to use "import.meta.url",
8
- * such as "setAssetPath(import.meta.url)". Other options include
9
- * "setAssetPath(document.currentScript.src)", or using a bundler's replace plugin to
10
- * dynamically set the path at build time, such as "setAssetPath(process.env.ASSET_PATH)".
11
- * But do note that this configuration depends on how your script is bundled, or lack of
12
- * bundling, and where your assets can be loaded from. Additionally custom bundling
13
- * will have to ensure the static assets are copied to its build directory.
14
- */
15
- export declare const setAssetPath: (path: string) => void;
16
-
17
- export interface SetPlatformOptions {
18
- raf?: (c: FrameRequestCallback) => number;
19
- ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
20
- rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
21
- }
22
- export declare const setPlatformOptions: (opts: SetPlatformOptions) => void;
23
-
24
- export type { Components, JSX };
25
-
26
- export * from '../types';
@@ -1 +0,0 @@
1
- export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';