From ec75f128d82e27edd3b6f17204a8c651bd0f21dd Mon Sep 17 00:00:00 2001
From: Parsa Gholipour <12parsa@gmail.com>
Date: Sat, 1 Oct 2022 12:17:58 +0330
Subject: [PATCH] first
---
dist/Sharee.e2d7a306.js | 611 ++++++++++++++++++
dist/_virtual/_commonjsHelpers.js | 4 -
dist/_virtual/index.js | 4 -
dist/_virtual/jsx-runtime.js | 6 -
dist/_virtual/jsx-runtime2.js | 4 -
.../_virtual/react-jsx-runtime.development.js | 4 -
.../react-jsx-runtime.production.min.js | 4 -
dist/{src/locales/en.js => en.7ffedfe0.js} | 0
dist/node_modules/lodash.merge/index.js | 477 --------------
.../cjs/react-jsx-runtime.development.js | 592 -----------------
.../cjs/react-jsx-runtime.production.min.js | 32 -
dist/node_modules/react/jsx-runtime.js | 6 -
dist/sharee-react.js.js | 15 +
...pt_setup_true_lang.js => sharee-vue.js.js} | 17 +-
dist/sharee.js.js | 5 +
dist/src/assets/icons/Copy.js | 6 -
dist/src/assets/icons/Facebook.js | 7 -
dist/src/assets/icons/Linkedin.js | 5 -
dist/src/assets/icons/Telegram.js | 5 -
dist/src/assets/icons/Twitter.js | 17 -
dist/src/assets/icons/Whatsapp.js | 28 -
dist/src/assets/styles/style.js | 4 -
dist/src/build.js | 8 -
dist/src/common/ShareeOptions.js | 12 -
dist/src/lib/Sharee.js | 45 --
dist/src/lib/drivers/CopyDriver.js | 34 -
dist/src/lib/drivers/Driver.js | 24 -
dist/src/lib/drivers/FacebookDriver.js | 23 -
dist/src/lib/drivers/LinkedinDriver.js | 23 -
dist/src/lib/drivers/TelegramDriver.js | 23 -
dist/src/lib/drivers/TwitterDriver.js | 23 -
dist/src/lib/drivers/WhatsappDriver.js | 24 -
dist/src/lib/drivers/index.js | 17 -
dist/src/lib/helpers/index.js | 12 -
dist/src/lib/strategies/BaseStrategy.js | 20 -
dist/src/lib/strategies/DropdownStrategy.js | 122 ----
dist/src/lib/strategies/FixedStrategy.js | 82 ---
dist/src/lib/strategies/NormalStrategy.js | 83 ---
dist/src/lib/strategies/TextStrategy.js | 79 ---
dist/src/lib/strategies/index.js | 13 -
dist/src/locales/fa.js | 19 -
dist/src/react/Sharee.js | 14 -
dist/src/vue/Sharee.js | 5 -
package-lock.json | 418 ++++++------
package.json | 12 +-
react/index.d.ts | 6 +
src/build.ts | 2 -
src/locales/fa.json | 3 +-
src/react/Sharee.tsx | 2 +-
vite.config.js | 8 +-
vue/index.d.ts | 6 +
51 files changed, 890 insertions(+), 2125 deletions(-)
create mode 100644 dist/Sharee.e2d7a306.js
delete mode 100644 dist/_virtual/_commonjsHelpers.js
delete mode 100644 dist/_virtual/index.js
delete mode 100644 dist/_virtual/jsx-runtime.js
delete mode 100644 dist/_virtual/jsx-runtime2.js
delete mode 100644 dist/_virtual/react-jsx-runtime.development.js
delete mode 100644 dist/_virtual/react-jsx-runtime.production.min.js
rename dist/{src/locales/en.js => en.7ffedfe0.js} (100%)
delete mode 100644 dist/node_modules/lodash.merge/index.js
delete mode 100644 dist/node_modules/react/cjs/react-jsx-runtime.development.js
delete mode 100644 dist/node_modules/react/cjs/react-jsx-runtime.production.min.js
delete mode 100644 dist/node_modules/react/jsx-runtime.js
create mode 100644 dist/sharee-react.js.js
rename dist/{src/vue/Sharee.vue_vue_type_script_setup_true_lang.js => sharee-vue.js.js} (57%)
create mode 100644 dist/sharee.js.js
delete mode 100644 dist/src/assets/icons/Copy.js
delete mode 100644 dist/src/assets/icons/Facebook.js
delete mode 100644 dist/src/assets/icons/Linkedin.js
delete mode 100644 dist/src/assets/icons/Telegram.js
delete mode 100644 dist/src/assets/icons/Twitter.js
delete mode 100644 dist/src/assets/icons/Whatsapp.js
delete mode 100644 dist/src/assets/styles/style.js
delete mode 100644 dist/src/build.js
delete mode 100644 dist/src/common/ShareeOptions.js
delete mode 100644 dist/src/lib/Sharee.js
delete mode 100644 dist/src/lib/drivers/CopyDriver.js
delete mode 100644 dist/src/lib/drivers/Driver.js
delete mode 100644 dist/src/lib/drivers/FacebookDriver.js
delete mode 100644 dist/src/lib/drivers/LinkedinDriver.js
delete mode 100644 dist/src/lib/drivers/TelegramDriver.js
delete mode 100644 dist/src/lib/drivers/TwitterDriver.js
delete mode 100644 dist/src/lib/drivers/WhatsappDriver.js
delete mode 100644 dist/src/lib/drivers/index.js
delete mode 100644 dist/src/lib/helpers/index.js
delete mode 100644 dist/src/lib/strategies/BaseStrategy.js
delete mode 100644 dist/src/lib/strategies/DropdownStrategy.js
delete mode 100644 dist/src/lib/strategies/FixedStrategy.js
delete mode 100644 dist/src/lib/strategies/NormalStrategy.js
delete mode 100644 dist/src/lib/strategies/TextStrategy.js
delete mode 100644 dist/src/lib/strategies/index.js
delete mode 100644 dist/src/locales/fa.js
delete mode 100644 dist/src/react/Sharee.js
delete mode 100644 dist/src/vue/Sharee.js
create mode 100644 react/index.d.ts
create mode 100644 vue/index.d.ts
diff --git a/dist/Sharee.e2d7a306.js b/dist/Sharee.e2d7a306.js
new file mode 100644
index 0000000..34e22f4
--- /dev/null
+++ b/dist/Sharee.e2d7a306.js
@@ -0,0 +1,611 @@
+var y = Object.defineProperty;
+var T = (o, s, e) => s in o ? y(o, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[s] = e;
+var n = (o, s, e) => (T(o, typeof s != "symbol" ? s + "" : s, e), e);
+import l from "lodash.merge";
+const u = {
+ showTransitionDuration: "200ms",
+ lang: "fa",
+ onLoad: () => {
+ },
+ drivers: ["copy", "telegram", "facebook", "whatsapp", "twitter", "linkedin"],
+ ripple: !0,
+ mode: "normal"
+}, m = "rtl", g = "\u0627\u0634\u062A\u0631\u0627\u06A9 \u062F\u0631 \u062A\u0644\u06AF\u0631\u0627\u0645", E = "\u06A9\u067E\u06CC \u0644\u06CC\u0646\u06A9", C = "\u0628\u0627 \u0645\u0648\u0641\u0642\u06CC\u062A \u06A9\u067E\u06CC \u0634\u062F!", f = "\u0627\u0634\u062A\u0631\u0627\u06A9 \u062F\u0631 \u0648\u0627\u062A\u0633\u0627\u067E", L = "\u0627\u0634\u062A\u0631\u0627\u06A9 \u062F\u0631 \u062A\u0648\u06CC\u06CC\u062A\u0631", w = "\u0627\u0634\u062A\u0631\u0627\u06A9 \u062F\u0631 \u0644\u06CC\u0646\u06A9\u062F\u06CC\u0646", h = {
+ Direction: m,
+ Telegram: g,
+ Copy_Link: E,
+ CopiedSuccessfully: C,
+ Whatsapp: f,
+ Twitter: L,
+ Linkedin: w
+}, k = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
+ __proto__: null,
+ Direction: m,
+ Telegram: g,
+ Copy_Link: E,
+ CopiedSuccessfully: C,
+ Whatsapp: f,
+ Twitter: L,
+ Linkedin: w,
+ default: h
+}, Symbol.toStringTag, { value: "Module" }));
+class a {
+ constructor(s, e) {
+ n(this, "lang");
+ n(this, "mainEl", null);
+ n(this, "options");
+ n(this, "rippleColor", "#ffffff75");
+ n(this, "rippleInitialized", !1);
+ this.options = e, this.lang = s;
+ }
+ getButtonText() {
+ return this.lang[this.buttonText.replaceAll(" ", "_")] || this.buttonText;
+ }
+ onClick(s) {
+ }
+ getName() {
+ return this.constructor.name;
+ }
+}
+const D = `\r
+`;
+class b extends a {
+ constructor(e, t) {
+ super(e, t);
+ n(this, "buttonText", "Telegram");
+ n(this, "icon", D);
+ n(this, "backgroundColor", "#0088CC");
+ n(this, "backgroundHoverColor", "#0371aa");
+ n(this, "textColor", "#fff");
+ n(this, "textHoverColor", "#fff");
+ }
+ getLink() {
+ var e, t;
+ return `https://telegram.me/share/url?url=${(e = this.options) == null ? void 0 : e.shareLink}&text=${encodeURIComponent((t = this.options) == null ? void 0 : t.shareText)}`;
+ }
+}
+const _ = `\r
+\r
+\r
+`;
+class H extends a {
+ constructor(e, t) {
+ super(e, t);
+ n(this, "buttonText", "Whatsapp");
+ n(this, "icon", _);
+ n(this, "backgroundColor", "#25D366");
+ n(this, "backgroundHoverColor", "#20bd5a");
+ n(this, "textColor", "#fff");
+ n(this, "textHoverColor", "#fff");
+ }
+ getLink() {
+ var e, t;
+ return `whatsapp://send?text=${(e = this.options) == null ? void 0 : e.shareText}
+ ${(t = this.options) == null ? void 0 : t.shareLink}`;
+ }
+}
+const M = `\r
+\r
+`;
+class S extends a {
+ constructor(e, t) {
+ super(e, t);
+ n(this, "buttonText", "Copy Link");
+ n(this, "icon", M);
+ n(this, "backgroundColor", "#797979");
+ n(this, "backgroundHoverColor", "#5e5e5e");
+ n(this, "textColor", "#fff");
+ n(this, "textHoverColor", "#fff");
+ n(this, "timeout", 0);
+ }
+ onClick(e) {
+ super.onClick(e);
+ const t = this.lang.CopiedSuccessfully, r = e.currentTarget.querySelector("div:nth-child(2)");
+ if (r.innerHTML === t) {
+ r.innerHTML = this.getButtonText();
+ return;
+ }
+ let x = window.location.href;
+ navigator.clipboard.writeText(x).then(() => {
+ r.innerHTML = t, r.style.transition = "300ms all", r.style.transform = "scale(1)", r.style.transform = `scale(1.07) translateX(${this.lang.Direction === "rtl" ? "-" : ""}4px)`, clearTimeout(this.timeout), this.timeout = setTimeout(() => {
+ r.innerHTML = this.getButtonText(), r.style.transition = "none", r.style.transform = "scale(1)";
+ }, 5e3);
+ });
+ }
+}
+const z = `\r
+`;
+class O extends a {
+ constructor(e, t) {
+ super(e, t);
+ n(this, "buttonText", "Twitter");
+ n(this, "icon", z);
+ n(this, "backgroundColor", "#1DA1F2");
+ n(this, "backgroundHoverColor", "#1a93dd");
+ n(this, "textColor", "#fff");
+ n(this, "textHoverColor", "#fff");
+ }
+ getLink() {
+ var e, t;
+ return `https://twitter.com/share?text=${encodeURIComponent((e = this.options) == null ? void 0 : e.shareText)}&url=${(t = this.options) == null ? void 0 : t.shareLink}`;
+ }
+}
+const R = `\r
+`;
+class B extends a {
+ constructor(e, t) {
+ super(e, t);
+ n(this, "buttonText", "Linkedin");
+ n(this, "icon", R);
+ n(this, "backgroundColor", "#0077B5");
+ n(this, "backgroundHoverColor", "#026092");
+ n(this, "textColor", "#fff");
+ n(this, "textHoverColor", "#fff");
+ }
+ getLink() {
+ var e, t;
+ return `https://twitter.com/share?text=${encodeURIComponent((e = this.options) == null ? void 0 : e.shareText)}&url=${(t = this.options) == null ? void 0 : t.shareLink}`;
+ }
+}
+const $ = `\r
+`;
+class I extends a {
+ constructor(e, t) {
+ super(e, t);
+ n(this, "buttonText", "Facebook");
+ n(this, "icon", $);
+ n(this, "backgroundColor", "#4267B2");
+ n(this, "backgroundHoverColor", "#355696");
+ n(this, "textColor", "#fff");
+ n(this, "textHoverColor", "#fff");
+ }
+ getLink() {
+ var e, t;
+ return `https://twitter.com/share?text=${encodeURIComponent((e = this.options) == null ? void 0 : e.shareText)}&url=${(t = this.options) == null ? void 0 : t.shareLink}`;
+ }
+}
+const d = new Object({
+ telegram: b,
+ whatsapp: H,
+ copy: S,
+ twitter: O,
+ linkedin: B,
+ facebook: I
+});
+class c {
+ constructor() {
+ n(this, "eventListeners", []);
+ }
+ resolveDriver(s) {
+ if (d.hasOwnProperty(s))
+ return d[s];
+ throw new Error(`Unknown driver: ${s}`);
+ }
+ shouldRenderDriver(s) {
+ return !0;
+ }
+}
+const P = {
+ type: "column",
+ animation: "fade-down"
+};
+class v extends c {
+ constructor(e) {
+ super();
+ n(this, "sharee");
+ n(this, "elementHovering", !1);
+ n(this, "shareeElHovering", !1);
+ n(this, "shareeEl");
+ n(this, "driverListeners", {});
+ n(this, "hideTimeout", 0);
+ n(this, "options");
+ this.sharee = e, this.shareeEl = document.createElement("div"), this.options = l({}, P, e.options.modeOptions);
+ }
+ show() {
+ this.shareeEl.classList.add("showing"), setTimeout(() => {
+ this.shareeEl.classList.add("show");
+ const e = this.sharee.targetElement.getBoundingClientRect(), t = e.x, i = e.y;
+ this.sharee.lang.Direction === "ltr" ? (this.shareeEl.style.left = `${t}px`, this.shareeEl.style.right = "unset") : (this.shareeEl.style.right = `${t}px`, this.shareeEl.style.left = "unset"), this.shareeEl.style.top = `${i + e.height}px`;
+ });
+ }
+ hide() {
+ var e;
+ (e = this.shareeEl) == null || e.classList.remove("show"), clearTimeout(this.hideTimeout), this.hideTimeout = setTimeout(() => {
+ var t;
+ (t = this.shareeEl) == null || t.classList.remove("showing");
+ }, Number.parseInt(this.sharee.options.showTransitionDuration));
+ }
+ elementOnMouseEnter() {
+ this.elementHovering = !0, this.show();
+ }
+ elementOnMouseLeave() {
+ setTimeout(() => this.elementHovering = !1), setTimeout(() => {
+ this.shareeElHovering || this.hide();
+ });
+ }
+ shareElOnMouseEnter() {
+ this.elementHovering && this.show(), this.shareeElHovering = !0;
+ }
+ shareElOnMouseLeave() {
+ setTimeout(() => this.shareeElHovering = !1), setTimeout(() => {
+ this.elementHovering || this.hide();
+ });
+ }
+ listenEvents() {
+ this.shareeEl.addEventListener("mouseenter", this.shareElOnMouseEnter.bind(this)), this.shareeEl.addEventListener("mouseleave", this.shareElOnMouseLeave.bind(this));
+ const e = this.elementOnMouseEnter.bind(this), t = this.elementOnMouseLeave.bind(this);
+ this.sharee.targetElement.addEventListener("mouseenter", e), this.sharee.targetElement.addEventListener("mouseleave", t), this.eventListeners.push([this.sharee.targetElement, "mouseenter", e]), this.eventListeners.push([this.sharee.targetElement, "mouseleave", t]);
+ }
+ destroy() {
+ window.shareeEl = this.shareeEl, this.eventListeners.forEach((e) => {
+ e[0].removeEventListener(e[1], e[2]);
+ }), this.shareeEl.parentElement.removeChild(this.shareeEl);
+ }
+ reRender() {
+ this.destroy(), setTimeout(() => {
+ this.render();
+ });
+ }
+ render() {
+ this.shareeEl = document.createElement("div"), this.shareeEl.classList.add("sharee__dropdown"), this.shareeEl.classList.add("sharee__" + this.sharee.lang.Direction), this.shareeEl.classList.add(this.options.animation), this.shareeEl.style.transition = "all " + this.sharee.options.showTransitionDuration, this.shareeEl.style.transitionProperty = "transform, opacity";
+ for (let e of this.sharee.options.drivers) {
+ if (!this.shouldRenderDriver(e))
+ continue;
+ const t = this.resolveDriver(e), i = new t(this.sharee.lang, {
+ lang: this.sharee.lang,
+ shareText: this.sharee.getShareText(),
+ shareLink: this.sharee.getShareLink(),
+ ripple: this.sharee.options.ripple
+ }), r = this.renderDriver(i);
+ this.shareeEl.appendChild(r);
+ }
+ document.body.appendChild(this.shareeEl), this.listenEvents(), this.options.type === "grid" ? this.shareeEl.classList.add("sharee__dropdown__grid") : this.options.type === "row" && this.shareeEl.classList.add("sharee__dropdown__row");
+ }
+ onDriverMouseEnter(e) {
+ return () => {
+ e.mainEl.style.backgroundColor = e.backgroundHoverColor, e.mainEl.style.color = e.textHoverColor;
+ };
+ }
+ onDriverMouseLeave(e) {
+ return () => {
+ this.initDriverStyles(e);
+ };
+ }
+ onDriverClick(e) {
+ return (t) => {
+ e.onClick(t);
+ };
+ }
+ initDriverStyles(e) {
+ var t, i;
+ e.mainEl.style.backgroundColor = e.backgroundColor, e.mainEl.style.color = e.textColor, e.mainEl.style.transition = (((t = e.options) == null ? void 0 : t.transitionDuration) || "200ms") + " all", (i = e.options) != null && i.ripple && this.initRipple(e);
+ }
+ initRipple(e) {
+ e.rippleInitialized || (e.rippleInitialized = !0, import("ripple-effects").then((t) => {
+ t.default(e.mainEl, {
+ background: e.rippleColor
+ });
+ }));
+ }
+ renderDriver(e) {
+ e.mainEl = document.createElement("a"), "getLink" in e && (e.mainEl.href = e.getLink()), this.initDriverStyles(e), this.listenDriverEvents(e);
+ const t = document.createElement("div");
+ t.innerHTML = e.icon;
+ const i = document.createElement("div");
+ return i.innerHTML = e.getButtonText(), e.mainEl.appendChild(t), e.mainEl.appendChild(i), e.mainEl;
+ }
+ listenDriverEvents(e) {
+ const t = this.onDriverMouseEnter(e), i = this.onDriverMouseLeave(e), r = this.onDriverClick(e);
+ this.driverListeners[e.buttonText] = [t, i, r], e.mainEl.addEventListener("mouseenter", t), e.mainEl.addEventListener("mouseleave", i), e.mainEl.addEventListener("click", r);
+ }
+}
+function p(o, s) {
+ var e;
+ do {
+ if ((e = o == null ? void 0 : o.className) != null && e.includes(s))
+ return !0;
+ o = o.parentNode;
+ } while (o);
+ return !1;
+}
+class V extends v {
+ constructor(s) {
+ super(s), this.options.type = "row";
+ }
+ show() {
+ this.shareeEl.classList.add("showing"), setTimeout(() => {
+ this.shareeEl.classList.add("show");
+ });
+ }
+ getDistanceFromTop() {
+ return window.pageXOffset || document.documentElement.scrollTop || document.body.scrollTop;
+ }
+ getTooltipPosition() {
+ let s;
+ try {
+ s = window.getSelection().getRangeAt(0).getBoundingClientRect();
+ } catch {
+ return { left: 0, top: 0 };
+ }
+ const e = 30, t = s.top, i = s.left + (s.width - e * this.sharee.options.drivers.length) / 2;
+ return { top: t, left: i };
+ }
+ setPosition(s) {
+ this.shareeEl.style.right = "unset";
+ const { left: e, top: t } = this.getTooltipPosition();
+ return e === 0 ? (this.hide(), !1) : (s.x + 300 > window.innerWidth ? this.shareeEl.style.left = e + "px" : this.shareeEl.style.left = e + "px", this.shareeEl.style.top = `${t + 26}px`, !0);
+ }
+ shouldRenderDriver(s) {
+ return s !== "copy";
+ }
+ getSelectedText() {
+ var s;
+ try {
+ window.getSelection().getRangeAt(0);
+ } catch {
+ return !1;
+ }
+ return window.getSelection ? (s = window.getSelection()) == null ? void 0 : s.toString() : typeof document.selection < "u" ? document.selection.createRange().text : "";
+ }
+ destroy() {
+ super.destroy(), window.removeEventListener("resize", this.windowOnResize);
+ }
+ render() {
+ super.render(), this.shareeEl.classList.add("sharee__text");
+ }
+ documentOnClick(s) {
+ p(s.target, "sharee__text") || this.hide();
+ }
+ elementOnMouseUp(s) {
+ const e = s.currentTarget;
+ setTimeout(() => {
+ const t = this.getSelectedText();
+ !t || p(e, "sharee__text") || (this.sharee.options.shareText = t, this.reRender(), setTimeout(() => {
+ this.show(), setTimeout(() => {
+ this.setPosition(s);
+ });
+ }));
+ });
+ }
+ windowOnResize() {
+ this.hide();
+ }
+ listenEvents() {
+ const s = this.elementOnMouseUp.bind(this), e = this.documentOnClick.bind(this);
+ this.sharee.targetElement.addEventListener("mouseup", s), document.addEventListener("click", e);
+ const t = this.windowOnResize.bind(this);
+ window.addEventListener("resize", t), this.eventListeners.push([this.sharee.targetElement, "mouseup", s]), this.eventListeners.push([document, "click", e]), this.eventListeners.push([window, "resize", t]);
+ }
+ renderDriver(s) {
+ s.mainEl = document.createElement("a"), s.mainEl.title = s.getButtonText(), "getLink" in s && (s.mainEl.href = s.getLink()), this.initDriverStyles(s), this.listenDriverEvents(s);
+ const e = document.createElement("div");
+ return e.innerHTML = s.icon, s.mainEl.appendChild(e), s.mainEl;
+ }
+}
+const j = {
+ noTitle: !1
+};
+class N extends c {
+ constructor(e) {
+ super();
+ n(this, "sharee");
+ n(this, "elementHovering", !1);
+ n(this, "shareeElHovering", !1);
+ n(this, "shareeEl");
+ n(this, "driverListeners", {});
+ n(this, "hideTimeout", 0);
+ n(this, "options");
+ this.sharee = e, this.shareeEl = document.createElement("div"), this.options = l({}, j, e.options.modeOptions);
+ }
+ hide() {
+ var e;
+ (e = this.shareeEl) == null || e.classList.remove("show"), clearTimeout(this.hideTimeout), this.hideTimeout = setTimeout(() => {
+ var t;
+ (t = this.shareeEl) == null || t.classList.remove("showing");
+ }, Number.parseInt(this.sharee.options.showTransitionDuration));
+ }
+ destroy() {
+ this.eventListeners.forEach((e) => {
+ e[0].removeEventListener(e[1], e[2]);
+ }), this.shareeEl.parentElement.removeChild(this.shareeEl);
+ }
+ reRender() {
+ this.destroy(), setTimeout(() => {
+ this.render();
+ });
+ }
+ render() {
+ this.shareeEl = document.createElement("div"), this.shareeEl.classList.add("sharee__normal"), this.shareeEl.classList.add("sharee__" + this.sharee.lang.Direction), this.shareeEl.style.transition = "all " + this.sharee.options.showTransitionDuration, this.shareeEl.style.transitionProperty = "transform, opacity";
+ for (let e of this.sharee.options.drivers) {
+ if (!this.shouldRenderDriver(e))
+ continue;
+ const t = this.resolveDriver(e), i = new t(this.sharee.lang, {
+ lang: this.sharee.lang,
+ shareText: this.sharee.getShareText(),
+ shareLink: this.sharee.getShareLink(),
+ ripple: this.sharee.options.ripple
+ }), r = this.renderDriver(i);
+ this.shareeEl.appendChild(r);
+ }
+ this.sharee.targetElement.appendChild(this.shareeEl);
+ }
+ onDriverClick(e) {
+ return (t) => {
+ e.onClick(t);
+ };
+ }
+ initDriverStyles(e) {
+ var t, i;
+ e.mainEl.style.backgroundColor = e.backgroundColor, e.mainEl.style.color = e.textColor, e.mainEl.style.transition = (((t = e.options) == null ? void 0 : t.transitionDuration) || "200ms") + " background, 1s max-width", (i = e.options) != null && i.ripple && this.initRipple(e);
+ }
+ initRipple(e) {
+ e.rippleInitialized || (e.rippleInitialized = !0, import("ripple-effects").then((t) => {
+ t.default(e.mainEl, {
+ background: e.rippleColor
+ });
+ }));
+ }
+ renderDriver(e) {
+ e.mainEl = document.createElement("a"), "getLink" in e && (e.mainEl.href = e.getLink()), this.initDriverStyles(e), this.listenDriverEvents(e);
+ const t = document.createElement("div");
+ t.innerHTML = e.icon;
+ const i = document.createElement("div");
+ return i.innerHTML = e.getButtonText(), e.mainEl.appendChild(t), this.options.noTitle ? (e.mainEl.title = e.getButtonText(), e.mainEl.classList.add("sharee__no-title")) : e.mainEl.appendChild(i), e.mainEl.classList.add("sharee__driver__" + e.getName()), e.mainEl;
+ }
+ listenDriverEvents(e) {
+ const t = this.onDriverClick(e);
+ this.driverListeners[e.buttonText] = [t], e.mainEl.addEventListener("click", t);
+ }
+}
+const U = {
+ position: "top-right",
+ noTitle: !1
+};
+class A extends c {
+ constructor(e) {
+ super();
+ n(this, "sharee");
+ n(this, "shareeEl");
+ n(this, "driverListeners", {});
+ n(this, "options");
+ this.sharee = e, this.shareeEl = document.createElement("div"), this.options = l({}, U, e.options.modeOptions);
+ }
+ destroy() {
+ window.shareeEl = this.shareeEl, console.log(this.shareeEl), this.eventListeners.forEach((e) => {
+ e[0].removeEventListener(e[1], e[2]);
+ }), this.shareeEl.parentElement.removeChild(this.shareeEl);
+ }
+ reRender() {
+ this.destroy(), setTimeout(() => {
+ this.render();
+ });
+ }
+ getPositionClass() {
+ }
+ render() {
+ this.shareeEl = document.createElement("div"), this.shareeEl.classList.add("sharee__fixed"), this.shareeEl.classList.add("sharee__" + this.sharee.lang.Direction), this.shareeEl.classList.add("sharee__position__" + this.options.position), this.shareeEl.style.transition = "all " + this.sharee.options.showTransitionDuration, this.shareeEl.style.transitionProperty = "transform, opacity";
+ for (let e of this.sharee.options.drivers) {
+ if (!this.shouldRenderDriver(e))
+ continue;
+ const t = this.resolveDriver(e), i = new t(this.sharee.lang, {
+ lang: this.sharee.lang,
+ shareText: this.sharee.getShareText(),
+ shareLink: this.sharee.getShareLink(),
+ ripple: this.sharee.options.ripple
+ }), r = this.renderDriver(i);
+ this.shareeEl.appendChild(r);
+ }
+ document.body.appendChild(this.shareeEl);
+ }
+ onDriverMouseEnter(e) {
+ return () => {
+ e.mainEl.style.backgroundColor = e.backgroundHoverColor, e.mainEl.style.color = e.textHoverColor;
+ };
+ }
+ onDriverMouseLeave(e) {
+ return () => {
+ this.initDriverStyles(e);
+ };
+ }
+ onDriverClick(e) {
+ return (t) => {
+ e.onClick(t);
+ };
+ }
+ initDriverStyles(e) {
+ var t, i;
+ e.mainEl.style.backgroundColor = e.backgroundColor, e.mainEl.style.color = e.textColor, e.mainEl.style.transition = (((t = e.options) == null ? void 0 : t.transitionDuration) || "200ms") + " all", (i = e.options) != null && i.ripple && this.initRipple(e);
+ }
+ initRipple(e) {
+ e.rippleInitialized || (e.rippleInitialized = !0, import("ripple-effects").then((t) => {
+ t.default(e.mainEl, {
+ background: e.rippleColor
+ });
+ }));
+ }
+ renderDriver(e) {
+ e.mainEl = document.createElement("a"), "getLink" in e && (e.mainEl.href = e.getLink()), this.initDriverStyles(e);
+ const t = document.createElement("div");
+ t.innerHTML = e.icon;
+ const i = document.createElement("div");
+ return i.innerHTML = e.getButtonText(), e.mainEl.appendChild(t), this.options.noTitle ? (e.mainEl.title = e.getButtonText(), e.mainEl.classList.add("sharee__no-title")) : e.mainEl.appendChild(i), e.mainEl.classList.add("sharee__driver__" + e.getName()), e.mainEl;
+ }
+}
+const F = {
+ dropdown: v,
+ text: V,
+ normal: N,
+ fixed: A
+};
+class q {
+ constructor(s, e = u) {
+ n(this, "options");
+ n(this, "lang", h);
+ n(this, "strategy");
+ n(this, "targetElement");
+ this.targetElement = s, this.options = l({}, u, e);
+ const t = F[this.options.mode];
+ if (typeof t > "u")
+ throw new Error('Selected mode "' + e.mode + '" not found');
+ this.strategy = new t(this), this.init().then(() => {
+ this.strategy.render();
+ });
+ }
+ async init() {
+ this.targetElement.sharee = this, await this.setLang(this.options.lang, this.options.langs);
+ }
+ async setLang(s, e = {}) {
+ const t = /* @__PURE__ */ Object.assign({ "../locales/en.json": () => import("./en.7ffedfe0.js"), "../locales/fa.json": () => Promise.resolve().then(() => k) });
+ let i = h;
+ for (const r in t)
+ r.includes(s) && (t[r] instanceof Function ? i = { ...await t[r]() } : i = { ...t[r] }, e[s] && l(i, e[s]));
+ this.lang = i;
+ }
+ getShareText() {
+ return this.options.shareText || document.title;
+ }
+ getShareLink() {
+ return this.options.shareLink || window.location.href;
+ }
+ destroy() {
+ this.strategy.destroy();
+ }
+}
+export {
+ q as S
+};
diff --git a/dist/_virtual/_commonjsHelpers.js b/dist/_virtual/_commonjsHelpers.js
deleted file mode 100644
index 0823cfc..0000000
--- a/dist/_virtual/_commonjsHelpers.js
+++ /dev/null
@@ -1,4 +0,0 @@
-var e = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
-export {
- e as commonjsGlobal
-};
diff --git a/dist/_virtual/index.js b/dist/_virtual/index.js
deleted file mode 100644
index 93cb445..0000000
--- a/dist/_virtual/index.js
+++ /dev/null
@@ -1,4 +0,0 @@
-var e = { exports: {} };
-export {
- e as l
-};
diff --git a/dist/_virtual/jsx-runtime.js b/dist/_virtual/jsx-runtime.js
deleted file mode 100644
index 34d8bfc..0000000
--- a/dist/_virtual/jsx-runtime.js
+++ /dev/null
@@ -1,6 +0,0 @@
-import "../node_modules/react/jsx-runtime.js";
-import { j as o } from "./jsx-runtime2.js";
-const r = o.exports.jsx;
-export {
- r as jsx
-};
diff --git a/dist/_virtual/jsx-runtime2.js b/dist/_virtual/jsx-runtime2.js
deleted file mode 100644
index 22566f1..0000000
--- a/dist/_virtual/jsx-runtime2.js
+++ /dev/null
@@ -1,4 +0,0 @@
-var e = { exports: {} };
-export {
- e as j
-};
diff --git a/dist/_virtual/react-jsx-runtime.development.js b/dist/_virtual/react-jsx-runtime.development.js
deleted file mode 100644
index f51b016..0000000
--- a/dist/_virtual/react-jsx-runtime.development.js
+++ /dev/null
@@ -1,4 +0,0 @@
-var e = {};
-export {
- e as __exports
-};
diff --git a/dist/_virtual/react-jsx-runtime.production.min.js b/dist/_virtual/react-jsx-runtime.production.min.js
deleted file mode 100644
index dde9254..0000000
--- a/dist/_virtual/react-jsx-runtime.production.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-var r = {};
-export {
- r as __exports
-};
diff --git a/dist/src/locales/en.js b/dist/en.7ffedfe0.js
similarity index 100%
rename from dist/src/locales/en.js
rename to dist/en.7ffedfe0.js
diff --git a/dist/node_modules/lodash.merge/index.js b/dist/node_modules/lodash.merge/index.js
deleted file mode 100644
index 458870c..0000000
--- a/dist/node_modules/lodash.merge/index.js
+++ /dev/null
@@ -1,477 +0,0 @@
-import { commonjsGlobal as M } from "../../_virtual/_commonjsHelpers.js";
-import { l as J } from "../../_virtual/index.js";
-(function(w, U) {
- var Ot = 200, W = "__lodash_hash_undefined__", wt = 800, Ct = 16, X = 9007199254740991, Y = "[object Arguments]", jt = "[object Array]", St = "[object AsyncFunction]", xt = "[object Boolean]", It = "[object Date]", Pt = "[object Error]", Z = "[object Function]", zt = "[object GeneratorFunction]", Et = "[object Map]", Mt = "[object Number]", Ut = "[object Null]", Q = "[object Object]", Ft = "[object Proxy]", Dt = "[object RegExp]", Nt = "[object Set]", Gt = "[object String]", Rt = "[object Undefined]", Ht = "[object WeakMap]", Lt = "[object ArrayBuffer]", Bt = "[object DataView]", $t = "[object Float32Array]", Kt = "[object Float64Array]", qt = "[object Int8Array]", Vt = "[object Int16Array]", Jt = "[object Int32Array]", Wt = "[object Uint8Array]", Xt = "[object Uint8ClampedArray]", Yt = "[object Uint16Array]", Zt = "[object Uint32Array]", Qt = /[\\^$.*+?()[\]{}|]/g, kt = /^\[object .+?Constructor\]$/, te = /^(?:0|[1-9]\d*)$/, u = {};
- u[$t] = u[Kt] = u[qt] = u[Vt] = u[Jt] = u[Wt] = u[Xt] = u[Yt] = u[Zt] = !0, u[Y] = u[jt] = u[Lt] = u[xt] = u[Bt] = u[It] = u[Pt] = u[Z] = u[Et] = u[Mt] = u[Q] = u[Dt] = u[Nt] = u[Gt] = u[Ht] = !1;
- var k = typeof M == "object" && M && M.Object === Object && M, ee = typeof self == "object" && self && self.Object === Object && self, v = k || ee || Function("return this")(), tt = U && !U.nodeType && U, T = tt && !0 && w && !w.nodeType && w, et = T && T.exports === tt, F = et && k.process, nt = function() {
- try {
- var t = T && T.require && T.require("util").types;
- return t || F && F.binding && F.binding("util");
- } catch {
- }
- }(), rt = nt && nt.isTypedArray;
- function ne(t, e, n) {
- switch (n.length) {
- case 0:
- return t.call(e);
- case 1:
- return t.call(e, n[0]);
- case 2:
- return t.call(e, n[0], n[1]);
- case 3:
- return t.call(e, n[0], n[1], n[2]);
- }
- return t.apply(e, n);
- }
- function re(t, e) {
- for (var n = -1, r = Array(t); ++n < t; )
- r[n] = e(n);
- return r;
- }
- function ie(t) {
- return function(e) {
- return t(e);
- };
- }
- function ae(t, e) {
- return t == null ? void 0 : t[e];
- }
- function oe(t, e) {
- return function(n) {
- return t(e(n));
- };
- }
- var ue = Array.prototype, fe = Function.prototype, C = Object.prototype, D = v["__core-js_shared__"], j = fe.toString, h = C.hasOwnProperty, it = function() {
- var t = /[^.]+$/.exec(D && D.keys && D.keys.IE_PROTO || "");
- return t ? "Symbol(src)_1." + t : "";
- }(), at = C.toString, se = j.call(Object), ce = RegExp(
- "^" + j.call(h).replace(Qt, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
- ), S = et ? v.Buffer : void 0, ot = v.Symbol, ut = v.Uint8Array, ft = S ? S.allocUnsafe : void 0, st = oe(Object.getPrototypeOf, Object), ct = Object.create, le = C.propertyIsEnumerable, he = ue.splice, d = ot ? ot.toStringTag : void 0, x = function() {
- try {
- var t = R(Object, "defineProperty");
- return t({}, "", {}), t;
- } catch {
- }
- }(), pe = S ? S.isBuffer : void 0, lt = Math.max, de = Date.now, ht = R(v, "Map"), m = R(Object, "create"), ge = function() {
- function t() {
- }
- return function(e) {
- if (!_(e))
- return {};
- if (ct)
- return ct(e);
- t.prototype = e;
- var n = new t();
- return t.prototype = void 0, n;
- };
- }();
- function g(t) {
- var e = -1, n = t == null ? 0 : t.length;
- for (this.clear(); ++e < n; ) {
- var r = t[e];
- this.set(r[0], r[1]);
- }
- }
- function _e() {
- this.__data__ = m ? m(null) : {}, this.size = 0;
- }
- function be(t) {
- var e = this.has(t) && delete this.__data__[t];
- return this.size -= e ? 1 : 0, e;
- }
- function ye(t) {
- var e = this.__data__;
- if (m) {
- var n = e[t];
- return n === W ? void 0 : n;
- }
- return h.call(e, t) ? e[t] : void 0;
- }
- function ve(t) {
- var e = this.__data__;
- return m ? e[t] !== void 0 : h.call(e, t);
- }
- function Te(t, e) {
- var n = this.__data__;
- return this.size += this.has(t) ? 0 : 1, n[t] = m && e === void 0 ? W : e, this;
- }
- g.prototype.clear = _e, g.prototype.delete = be, g.prototype.get = ye, g.prototype.has = ve, g.prototype.set = Te;
- function p(t) {
- var e = -1, n = t == null ? 0 : t.length;
- for (this.clear(); ++e < n; ) {
- var r = t[e];
- this.set(r[0], r[1]);
- }
- }
- function me() {
- this.__data__ = [], this.size = 0;
- }
- function Ae(t) {
- var e = this.__data__, n = I(e, t);
- if (n < 0)
- return !1;
- var r = e.length - 1;
- return n == r ? e.pop() : he.call(e, n, 1), --this.size, !0;
- }
- function Oe(t) {
- var e = this.__data__, n = I(e, t);
- return n < 0 ? void 0 : e[n][1];
- }
- function we(t) {
- return I(this.__data__, t) > -1;
- }
- function Ce(t, e) {
- var n = this.__data__, r = I(n, t);
- return r < 0 ? (++this.size, n.push([t, e])) : n[r][1] = e, this;
- }
- p.prototype.clear = me, p.prototype.delete = Ae, p.prototype.get = Oe, p.prototype.has = we, p.prototype.set = Ce;
- function b(t) {
- var e = -1, n = t == null ? 0 : t.length;
- for (this.clear(); ++e < n; ) {
- var r = t[e];
- this.set(r[0], r[1]);
- }
- }
- function je() {
- this.size = 0, this.__data__ = {
- hash: new g(),
- map: new (ht || p)(),
- string: new g()
- };
- }
- function Se(t) {
- var e = z(this, t).delete(t);
- return this.size -= e ? 1 : 0, e;
- }
- function xe(t) {
- return z(this, t).get(t);
- }
- function Ie(t) {
- return z(this, t).has(t);
- }
- function Pe(t, e) {
- var n = z(this, t), r = n.size;
- return n.set(t, e), this.size += n.size == r ? 0 : 1, this;
- }
- b.prototype.clear = je, b.prototype.delete = Se, b.prototype.get = xe, b.prototype.has = Ie, b.prototype.set = Pe;
- function y(t) {
- var e = this.__data__ = new p(t);
- this.size = e.size;
- }
- function ze() {
- this.__data__ = new p(), this.size = 0;
- }
- function Ee(t) {
- var e = this.__data__, n = e.delete(t);
- return this.size = e.size, n;
- }
- function Me(t) {
- return this.__data__.get(t);
- }
- function Ue(t) {
- return this.__data__.has(t);
- }
- function Fe(t, e) {
- var n = this.__data__;
- if (n instanceof p) {
- var r = n.__data__;
- if (!ht || r.length < Ot - 1)
- return r.push([t, e]), this.size = ++n.size, this;
- n = this.__data__ = new b(r);
- }
- return n.set(t, e), this.size = n.size, this;
- }
- y.prototype.clear = ze, y.prototype.delete = Ee, y.prototype.get = Me, y.prototype.has = Ue, y.prototype.set = Fe;
- function De(t, e) {
- var n = B(t), r = !n && L(t), a = !n && !r && bt(t), o = !n && !r && !a && vt(t), f = n || r || a || o, i = f ? re(t.length, String) : [], s = i.length;
- for (var l in t)
- (e || h.call(t, l)) && !(f && (l == "length" || a && (l == "offset" || l == "parent") || o && (l == "buffer" || l == "byteLength" || l == "byteOffset") || gt(l, s))) && i.push(l);
- return i;
- }
- function N(t, e, n) {
- (n !== void 0 && !E(t[e], n) || n === void 0 && !(e in t)) && G(t, e, n);
- }
- function Ne(t, e, n) {
- var r = t[e];
- (!(h.call(t, e) && E(r, n)) || n === void 0 && !(e in t)) && G(t, e, n);
- }
- function I(t, e) {
- for (var n = t.length; n--; )
- if (E(t[n][0], e))
- return n;
- return -1;
- }
- function G(t, e, n) {
- e == "__proto__" && x ? x(t, e, {
- configurable: !0,
- enumerable: !0,
- value: n,
- writable: !0
- }) : t[e] = n;
- }
- var Ge = Ze();
- function P(t) {
- return t == null ? t === void 0 ? Rt : Ut : d && d in Object(t) ? Qe(t) : an(t);
- }
- function pt(t) {
- return A(t) && P(t) == Y;
- }
- function Re(t) {
- if (!_(t) || nn(t))
- return !1;
- var e = K(t) ? ce : kt;
- return e.test(sn(t));
- }
- function He(t) {
- return A(t) && yt(t.length) && !!u[P(t)];
- }
- function Le(t) {
- if (!_(t))
- return rn(t);
- var e = _t(t), n = [];
- for (var r in t)
- r == "constructor" && (e || !h.call(t, r)) || n.push(r);
- return n;
- }
- function dt(t, e, n, r, a) {
- t !== e && Ge(e, function(o, f) {
- if (a || (a = new y()), _(o))
- Be(t, e, f, n, dt, r, a);
- else {
- var i = r ? r(H(t, f), o, f + "", t, e, a) : void 0;
- i === void 0 && (i = o), N(t, f, i);
- }
- }, Tt);
- }
- function Be(t, e, n, r, a, o, f) {
- var i = H(t, n), s = H(e, n), l = f.get(s);
- if (l) {
- N(t, n, l);
- return;
- }
- var c = o ? o(i, s, n + "", t, e, f) : void 0, O = c === void 0;
- if (O) {
- var q = B(s), V = !q && bt(s), At = !q && !V && vt(s);
- c = s, q || V || At ? B(i) ? c = i : cn(i) ? c = We(i) : V ? (O = !1, c = qe(s, !0)) : At ? (O = !1, c = Je(s, !0)) : c = [] : ln(s) || L(s) ? (c = i, L(i) ? c = hn(i) : (!_(i) || K(i)) && (c = ke(s))) : O = !1;
- }
- O && (f.set(s, c), a(c, s, r, o, f), f.delete(s)), N(t, n, c);
- }
- function $e(t, e) {
- return un(on(t, e, mt), t + "");
- }
- var Ke = x ? function(t, e) {
- return x(t, "toString", {
- configurable: !0,
- enumerable: !1,
- value: dn(e),
- writable: !0
- });
- } : mt;
- function qe(t, e) {
- if (e)
- return t.slice();
- var n = t.length, r = ft ? ft(n) : new t.constructor(n);
- return t.copy(r), r;
- }
- function Ve(t) {
- var e = new t.constructor(t.byteLength);
- return new ut(e).set(new ut(t)), e;
- }
- function Je(t, e) {
- var n = e ? Ve(t.buffer) : t.buffer;
- return new t.constructor(n, t.byteOffset, t.length);
- }
- function We(t, e) {
- var n = -1, r = t.length;
- for (e || (e = Array(r)); ++n < r; )
- e[n] = t[n];
- return e;
- }
- function Xe(t, e, n, r) {
- var a = !n;
- n || (n = {});
- for (var o = -1, f = e.length; ++o < f; ) {
- var i = e[o], s = r ? r(n[i], t[i], i, n, t) : void 0;
- s === void 0 && (s = t[i]), a ? G(n, i, s) : Ne(n, i, s);
- }
- return n;
- }
- function Ye(t) {
- return $e(function(e, n) {
- var r = -1, a = n.length, o = a > 1 ? n[a - 1] : void 0, f = a > 2 ? n[2] : void 0;
- for (o = t.length > 3 && typeof o == "function" ? (a--, o) : void 0, f && tn(n[0], n[1], f) && (o = a < 3 ? void 0 : o, a = 1), e = Object(e); ++r < a; ) {
- var i = n[r];
- i && t(e, i, r, o);
- }
- return e;
- });
- }
- function Ze(t) {
- return function(e, n, r) {
- for (var a = -1, o = Object(e), f = r(e), i = f.length; i--; ) {
- var s = f[t ? i : ++a];
- if (n(o[s], s, o) === !1)
- break;
- }
- return e;
- };
- }
- function z(t, e) {
- var n = t.__data__;
- return en(e) ? n[typeof e == "string" ? "string" : "hash"] : n.map;
- }
- function R(t, e) {
- var n = ae(t, e);
- return Re(n) ? n : void 0;
- }
- function Qe(t) {
- var e = h.call(t, d), n = t[d];
- try {
- t[d] = void 0;
- var r = !0;
- } catch {
- }
- var a = at.call(t);
- return r && (e ? t[d] = n : delete t[d]), a;
- }
- function ke(t) {
- return typeof t.constructor == "function" && !_t(t) ? ge(st(t)) : {};
- }
- function gt(t, e) {
- var n = typeof t;
- return e = e == null ? X : e, !!e && (n == "number" || n != "symbol" && te.test(t)) && t > -1 && t % 1 == 0 && t < e;
- }
- function tn(t, e, n) {
- if (!_(n))
- return !1;
- var r = typeof e;
- return (r == "number" ? $(n) && gt(e, n.length) : r == "string" && e in n) ? E(n[e], t) : !1;
- }
- function en(t) {
- var e = typeof t;
- return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
- }
- function nn(t) {
- return !!it && it in t;
- }
- function _t(t) {
- var e = t && t.constructor, n = typeof e == "function" && e.prototype || C;
- return t === n;
- }
- function rn(t) {
- var e = [];
- if (t != null)
- for (var n in Object(t))
- e.push(n);
- return e;
- }
- function an(t) {
- return at.call(t);
- }
- function on(t, e, n) {
- return e = lt(e === void 0 ? t.length - 1 : e, 0), function() {
- for (var r = arguments, a = -1, o = lt(r.length - e, 0), f = Array(o); ++a < o; )
- f[a] = r[e + a];
- a = -1;
- for (var i = Array(e + 1); ++a < e; )
- i[a] = r[a];
- return i[e] = n(f), ne(t, this, i);
- };
- }
- function H(t, e) {
- if (!(e === "constructor" && typeof t[e] == "function") && e != "__proto__")
- return t[e];
- }
- var un = fn(Ke);
- function fn(t) {
- var e = 0, n = 0;
- return function() {
- var r = de(), a = Ct - (r - n);
- if (n = r, a > 0) {
- if (++e >= wt)
- return arguments[0];
- } else
- e = 0;
- return t.apply(void 0, arguments);
- };
- }
- function sn(t) {
- if (t != null) {
- try {
- return j.call(t);
- } catch {
- }
- try {
- return t + "";
- } catch {
- }
- }
- return "";
- }
- function E(t, e) {
- return t === e || t !== t && e !== e;
- }
- var L = pt(function() {
- return arguments;
- }()) ? pt : function(t) {
- return A(t) && h.call(t, "callee") && !le.call(t, "callee");
- }, B = Array.isArray;
- function $(t) {
- return t != null && yt(t.length) && !K(t);
- }
- function cn(t) {
- return A(t) && $(t);
- }
- var bt = pe || gn;
- function K(t) {
- if (!_(t))
- return !1;
- var e = P(t);
- return e == Z || e == zt || e == St || e == Ft;
- }
- function yt(t) {
- return typeof t == "number" && t > -1 && t % 1 == 0 && t <= X;
- }
- function _(t) {
- var e = typeof t;
- return t != null && (e == "object" || e == "function");
- }
- function A(t) {
- return t != null && typeof t == "object";
- }
- function ln(t) {
- if (!A(t) || P(t) != Q)
- return !1;
- var e = st(t);
- if (e === null)
- return !0;
- var n = h.call(e, "constructor") && e.constructor;
- return typeof n == "function" && n instanceof n && j.call(n) == se;
- }
- var vt = rt ? ie(rt) : He;
- function hn(t) {
- return Xe(t, Tt(t));
- }
- function Tt(t) {
- return $(t) ? De(t, !0) : Le(t);
- }
- var pn = Ye(function(t, e, n) {
- dt(t, e, n);
- });
- function dn(t) {
- return function() {
- return t;
- };
- }
- function mt(t) {
- return t;
- }
- function gn() {
- return !1;
- }
- w.exports = pn;
-})(J, J.exports);
-const yn = J.exports;
-export {
- yn as default
-};
diff --git a/dist/node_modules/react/cjs/react-jsx-runtime.development.js b/dist/node_modules/react/cjs/react-jsx-runtime.development.js
deleted file mode 100644
index d69c8a4..0000000
--- a/dist/node_modules/react/cjs/react-jsx-runtime.development.js
+++ /dev/null
@@ -1,592 +0,0 @@
-import { __exports as R } from "../../../_virtual/react-jsx-runtime.development.js";
-import tr from "react";
-/**
- * @license React
- * react-jsx-runtime.development.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-var he;
-function ir() {
- return he ? R : (he = 1, process.env.NODE_ENV !== "production" && function() {
- var Ee = tr, x = Symbol.for("react.element"), ye = Symbol.for("react.portal"), _ = Symbol.for("react.fragment"), U = Symbol.for("react.strict_mode"), N = Symbol.for("react.profiler"), B = Symbol.for("react.provider"), q = Symbol.for("react.context"), T = Symbol.for("react.forward_ref"), k = Symbol.for("react.suspense"), D = Symbol.for("react.suspense_list"), C = Symbol.for("react.memo"), F = Symbol.for("react.lazy"), me = Symbol.for("react.offscreen"), G = Symbol.iterator, Re = "@@iterator";
- function _e(e) {
- if (e === null || typeof e != "object")
- return null;
- var r = G && e[G] || e[Re];
- return typeof r == "function" ? r : null;
- }
- var b = Ee.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
- function l(e) {
- {
- for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
- t[n - 1] = arguments[n];
- Te("error", e, t);
- }
- }
- function Te(e, r, t) {
- {
- var n = b.ReactDebugCurrentFrame, o = n.getStackAddendum();
- o !== "" && (r += "%s", t = t.concat([o]));
- var u = t.map(function(i) {
- return String(i);
- });
- u.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, u);
- }
- }
- var Ce = !1, Pe = !1, we = !1, Oe = !1, Se = !1, z;
- z = Symbol.for("react.module.reference");
- function je(e) {
- return !!(typeof e == "string" || typeof e == "function" || e === _ || e === N || Se || e === U || e === k || e === D || Oe || e === me || Ce || Pe || we || typeof e == "object" && e !== null && (e.$$typeof === F || e.$$typeof === C || e.$$typeof === B || e.$$typeof === q || e.$$typeof === T || e.$$typeof === z || e.getModuleId !== void 0));
- }
- function xe(e, r, t) {
- var n = e.displayName;
- if (n)
- return n;
- var o = r.displayName || r.name || "";
- return o !== "" ? t + "(" + o + ")" : t;
- }
- function J(e) {
- return e.displayName || "Context";
- }
- function d(e) {
- if (e == null)
- return null;
- if (typeof e.tag == "number" && l("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
- return e.displayName || e.name || null;
- if (typeof e == "string")
- return e;
- switch (e) {
- case _:
- return "Fragment";
- case ye:
- return "Portal";
- case N:
- return "Profiler";
- case U:
- return "StrictMode";
- case k:
- return "Suspense";
- case D:
- return "SuspenseList";
- }
- if (typeof e == "object")
- switch (e.$$typeof) {
- case q:
- var r = e;
- return J(r) + ".Consumer";
- case B:
- var t = e;
- return J(t._context) + ".Provider";
- case T:
- return xe(e, e.render, "ForwardRef");
- case C:
- var n = e.displayName || null;
- return n !== null ? n : d(e.type) || "Memo";
- case F: {
- var o = e, u = o._payload, i = o._init;
- try {
- return d(i(u));
- } catch {
- return null;
- }
- }
- }
- return null;
- }
- var g = Object.assign, y = 0, K, H, X, Z, Q, ee, re;
- function te() {
- }
- te.__reactDisabledLog = !0;
- function ke() {
- {
- if (y === 0) {
- K = console.log, H = console.info, X = console.warn, Z = console.error, Q = console.group, ee = console.groupCollapsed, re = console.groupEnd;
- var e = {
- configurable: !0,
- enumerable: !0,
- value: te,
- writable: !0
- };
- Object.defineProperties(console, {
- info: e,
- log: e,
- warn: e,
- error: e,
- group: e,
- groupCollapsed: e,
- groupEnd: e
- });
- }
- y++;
- }
- }
- function De() {
- {
- if (y--, y === 0) {
- var e = {
- configurable: !0,
- enumerable: !0,
- writable: !0
- };
- Object.defineProperties(console, {
- log: g({}, e, {
- value: K
- }),
- info: g({}, e, {
- value: H
- }),
- warn: g({}, e, {
- value: X
- }),
- error: g({}, e, {
- value: Z
- }),
- group: g({}, e, {
- value: Q
- }),
- groupCollapsed: g({}, e, {
- value: ee
- }),
- groupEnd: g({}, e, {
- value: re
- })
- });
- }
- y < 0 && l("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
- }
- }
- var A = b.ReactCurrentDispatcher, I;
- function P(e, r, t) {
- {
- if (I === void 0)
- try {
- throw Error();
- } catch (o) {
- var n = o.stack.trim().match(/\n( *(at )?)/);
- I = n && n[1] || "";
- }
- return `
-` + I + e;
- }
- }
- var W = !1, w;
- {
- var Fe = typeof WeakMap == "function" ? WeakMap : Map;
- w = new Fe();
- }
- function ne(e, r) {
- if (!e || W)
- return "";
- {
- var t = w.get(e);
- if (t !== void 0)
- return t;
- }
- var n;
- W = !0;
- var o = Error.prepareStackTrace;
- Error.prepareStackTrace = void 0;
- var u;
- u = A.current, A.current = null, ke();
- try {
- if (r) {
- var i = function() {
- throw Error();
- };
- if (Object.defineProperty(i.prototype, "props", {
- set: function() {
- throw Error();
- }
- }), typeof Reflect == "object" && Reflect.construct) {
- try {
- Reflect.construct(i, []);
- } catch (p) {
- n = p;
- }
- Reflect.construct(e, [], i);
- } else {
- try {
- i.call();
- } catch (p) {
- n = p;
- }
- e.call(i.prototype);
- }
- } else {
- try {
- throw Error();
- } catch (p) {
- n = p;
- }
- e();
- }
- } catch (p) {
- if (p && n && typeof p.stack == "string") {
- for (var a = p.stack.split(`
-`), c = n.stack.split(`
-`), s = a.length - 1, f = c.length - 1; s >= 1 && f >= 0 && a[s] !== c[f]; )
- f--;
- for (; s >= 1 && f >= 0; s--, f--)
- if (a[s] !== c[f]) {
- if (s !== 1 || f !== 1)
- do
- if (s--, f--, f < 0 || a[s] !== c[f]) {
- var v = `
-` + a[s].replace(" at new ", " at ");
- return e.displayName && v.includes("") && (v = v.replace("", e.displayName)), typeof e == "function" && w.set(e, v), v;
- }
- while (s >= 1 && f >= 0);
- break;
- }
- }
- } finally {
- W = !1, A.current = u, De(), Error.prepareStackTrace = o;
- }
- var E = e ? e.displayName || e.name : "", be = E ? P(E) : "";
- return typeof e == "function" && w.set(e, be), be;
- }
- function Ae(e, r, t) {
- return ne(e, !1);
- }
- function Ie(e) {
- var r = e.prototype;
- return !!(r && r.isReactComponent);
- }
- function O(e, r, t) {
- if (e == null)
- return "";
- if (typeof e == "function")
- return ne(e, Ie(e));
- if (typeof e == "string")
- return P(e);
- switch (e) {
- case k:
- return P("Suspense");
- case D:
- return P("SuspenseList");
- }
- if (typeof e == "object")
- switch (e.$$typeof) {
- case T:
- return Ae(e.render);
- case C:
- return O(e.type, r, t);
- case F: {
- var n = e, o = n._payload, u = n._init;
- try {
- return O(u(o), r, t);
- } catch {
- }
- }
- }
- return "";
- }
- var S = Object.prototype.hasOwnProperty, ae = {}, ie = b.ReactDebugCurrentFrame;
- function j(e) {
- if (e) {
- var r = e._owner, t = O(e.type, e._source, r ? r.type : null);
- ie.setExtraStackFrame(t);
- } else
- ie.setExtraStackFrame(null);
- }
- function We(e, r, t, n, o) {
- {
- var u = Function.call.bind(S);
- for (var i in e)
- if (u(e, i)) {
- var a = void 0;
- try {
- if (typeof e[i] != "function") {
- var c = Error((n || "React class") + ": " + t + " type `" + i + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[i] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
- throw c.name = "Invariant Violation", c;
- }
- a = e[i](r, i, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
- } catch (s) {
- a = s;
- }
- a && !(a instanceof Error) && (j(o), l("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", n || "React class", t, i, typeof a), j(null)), a instanceof Error && !(a.message in ae) && (ae[a.message] = !0, j(o), l("Failed %s type: %s", t, a.message), j(null));
- }
- }
- }
- var $e = Array.isArray;
- function $(e) {
- return $e(e);
- }
- function Ye(e) {
- {
- var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
- return t;
- }
- }
- function Me(e) {
- try {
- return oe(e), !1;
- } catch {
- return !0;
- }
- }
- function oe(e) {
- return "" + e;
- }
- function ue(e) {
- if (Me(e))
- return l("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ye(e)), oe(e);
- }
- var m = b.ReactCurrentOwner, Ve = {
- key: !0,
- ref: !0,
- __self: !0,
- __source: !0
- }, se, fe, Y;
- Y = {};
- function Le(e) {
- if (S.call(e, "ref")) {
- var r = Object.getOwnPropertyDescriptor(e, "ref").get;
- if (r && r.isReactWarning)
- return !1;
- }
- return e.ref !== void 0;
- }
- function Ue(e) {
- if (S.call(e, "key")) {
- var r = Object.getOwnPropertyDescriptor(e, "key").get;
- if (r && r.isReactWarning)
- return !1;
- }
- return e.key !== void 0;
- }
- function Ne(e, r) {
- if (typeof e.ref == "string" && m.current && r && m.current.stateNode !== r) {
- var t = d(m.current.type);
- Y[t] || (l('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', d(m.current.type), e.ref), Y[t] = !0);
- }
- }
- function Be(e, r) {
- {
- var t = function() {
- se || (se = !0, l("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
- };
- t.isReactWarning = !0, Object.defineProperty(e, "key", {
- get: t,
- configurable: !0
- });
- }
- }
- function qe(e, r) {
- {
- var t = function() {
- fe || (fe = !0, l("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
- };
- t.isReactWarning = !0, Object.defineProperty(e, "ref", {
- get: t,
- configurable: !0
- });
- }
- }
- var Ge = function(e, r, t, n, o, u, i) {
- var a = {
- $$typeof: x,
- type: e,
- key: r,
- ref: t,
- props: i,
- _owner: u
- };
- return a._store = {}, Object.defineProperty(a._store, "validated", {
- configurable: !1,
- enumerable: !1,
- writable: !0,
- value: !1
- }), Object.defineProperty(a, "_self", {
- configurable: !1,
- enumerable: !1,
- writable: !1,
- value: n
- }), Object.defineProperty(a, "_source", {
- configurable: !1,
- enumerable: !1,
- writable: !1,
- value: o
- }), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
- };
- function ze(e, r, t, n, o) {
- {
- var u, i = {}, a = null, c = null;
- t !== void 0 && (ue(t), a = "" + t), Ue(r) && (ue(r.key), a = "" + r.key), Le(r) && (c = r.ref, Ne(r, o));
- for (u in r)
- S.call(r, u) && !Ve.hasOwnProperty(u) && (i[u] = r[u]);
- if (e && e.defaultProps) {
- var s = e.defaultProps;
- for (u in s)
- i[u] === void 0 && (i[u] = s[u]);
- }
- if (a || c) {
- var f = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
- a && Be(i, f), c && qe(i, f);
- }
- return Ge(e, a, c, o, n, m.current, i);
- }
- }
- var M = b.ReactCurrentOwner, le = b.ReactDebugCurrentFrame;
- function h(e) {
- if (e) {
- var r = e._owner, t = O(e.type, e._source, r ? r.type : null);
- le.setExtraStackFrame(t);
- } else
- le.setExtraStackFrame(null);
- }
- var V;
- V = !1;
- function L(e) {
- return typeof e == "object" && e !== null && e.$$typeof === x;
- }
- function ce() {
- {
- if (M.current) {
- var e = d(M.current.type);
- if (e)
- return `
-
-Check the render method of \`` + e + "`.";
- }
- return "";
- }
- }
- function Je(e) {
- {
- if (e !== void 0) {
- var r = e.fileName.replace(/^.*[\\\/]/, ""), t = e.lineNumber;
- return `
-
-Check your code at ` + r + ":" + t + ".";
- }
- return "";
- }
- }
- var ve = {};
- function Ke(e) {
- {
- var r = ce();
- if (!r) {
- var t = typeof e == "string" ? e : e.displayName || e.name;
- t && (r = `
-
-Check the top-level render call using <` + t + ">.");
- }
- return r;
- }
- }
- function de(e, r) {
- {
- if (!e._store || e._store.validated || e.key != null)
- return;
- e._store.validated = !0;
- var t = Ke(r);
- if (ve[t])
- return;
- ve[t] = !0;
- var n = "";
- e && e._owner && e._owner !== M.current && (n = " It was passed a child from " + d(e._owner.type) + "."), h(e), l('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), h(null);
- }
- }
- function pe(e, r) {
- {
- if (typeof e != "object")
- return;
- if ($(e))
- for (var t = 0; t < e.length; t++) {
- var n = e[t];
- L(n) && de(n, r);
- }
- else if (L(e))
- e._store && (e._store.validated = !0);
- else if (e) {
- var o = _e(e);
- if (typeof o == "function" && o !== e.entries)
- for (var u = o.call(e), i; !(i = u.next()).done; )
- L(i.value) && de(i.value, r);
- }
- }
- }
- function He(e) {
- {
- var r = e.type;
- if (r == null || typeof r == "string")
- return;
- var t;
- if (typeof r == "function")
- t = r.propTypes;
- else if (typeof r == "object" && (r.$$typeof === T || r.$$typeof === C))
- t = r.propTypes;
- else
- return;
- if (t) {
- var n = d(r);
- We(t, e.props, "prop", n, e);
- } else if (r.PropTypes !== void 0 && !V) {
- V = !0;
- var o = d(r);
- l("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", o || "Unknown");
- }
- typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && l("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
- }
- }
- function Xe(e) {
- {
- for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
- var n = r[t];
- if (n !== "children" && n !== "key") {
- h(e), l("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), h(null);
- break;
- }
- }
- e.ref !== null && (h(e), l("Invalid attribute `ref` supplied to `React.Fragment`."), h(null));
- }
- }
- function ge(e, r, t, n, o, u) {
- {
- var i = je(e);
- if (!i) {
- var a = "";
- (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (a += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
- var c = Je(o);
- c ? a += c : a += ce();
- var s;
- e === null ? s = "null" : $(e) ? s = "array" : e !== void 0 && e.$$typeof === x ? (s = "<" + (d(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : s = typeof e, l("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", s, a);
- }
- var f = ze(e, r, t, o, u);
- if (f == null)
- return f;
- if (i) {
- var v = r.children;
- if (v !== void 0)
- if (n)
- if ($(v)) {
- for (var E = 0; E < v.length; E++)
- pe(v[E], e);
- Object.freeze && Object.freeze(v);
- } else
- l("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
- else
- pe(v, e);
- }
- return e === _ ? Xe(f) : He(f), f;
- }
- }
- function Ze(e, r, t) {
- return ge(e, r, t, !0);
- }
- function Qe(e, r, t) {
- return ge(e, r, t, !1);
- }
- var er = Qe, rr = Ze;
- R.Fragment = _, R.jsx = er, R.jsxs = rr;
- }(), R);
-}
-export {
- ir as __require
-};
diff --git a/dist/node_modules/react/cjs/react-jsx-runtime.production.min.js b/dist/node_modules/react/cjs/react-jsx-runtime.production.min.js
deleted file mode 100644
index e7239cb..0000000
--- a/dist/node_modules/react/cjs/react-jsx-runtime.production.min.js
+++ /dev/null
@@ -1,32 +0,0 @@
-import { __exports as t } from "../../../_virtual/react-jsx-runtime.production.min.js";
-import R from "react";
-/**
- * @license React
- * react-jsx-runtime.production.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-var p;
-function v() {
- if (p)
- return t;
- p = 1;
- var s = R, m = Symbol.for("react.element"), l = Symbol.for("react.fragment"), c = Object.prototype.hasOwnProperty, d = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, y = { key: !0, ref: !0, __self: !0, __source: !0 };
- function i(o, r, u) {
- var e, n = {}, _ = null, f = null;
- u !== void 0 && (_ = "" + u), r.key !== void 0 && (_ = "" + r.key), r.ref !== void 0 && (f = r.ref);
- for (e in r)
- c.call(r, e) && !y.hasOwnProperty(e) && (n[e] = r[e]);
- if (o && o.defaultProps)
- for (e in r = o.defaultProps, r)
- n[e] === void 0 && (n[e] = r[e]);
- return { $$typeof: m, type: o, key: _, ref: f, props: n, _owner: d.current };
- }
- return t.Fragment = l, t.jsx = i, t.jsxs = i, t;
-}
-export {
- v as __require
-};
diff --git a/dist/node_modules/react/jsx-runtime.js b/dist/node_modules/react/jsx-runtime.js
deleted file mode 100644
index e444de4..0000000
--- a/dist/node_modules/react/jsx-runtime.js
+++ /dev/null
@@ -1,6 +0,0 @@
-import { j as r } from "../../_virtual/jsx-runtime2.js";
-import { __require as i } from "./cjs/react-jsx-runtime.production.min.js";
-import { __require as o } from "./cjs/react-jsx-runtime.development.js";
-(function(e) {
- process.env.NODE_ENV === "production" ? e.exports = i() : e.exports = o();
-})(r);
diff --git a/dist/sharee-react.js.js b/dist/sharee-react.js.js
new file mode 100644
index 0000000..b757758
--- /dev/null
+++ b/dist/sharee-react.js.js
@@ -0,0 +1,15 @@
+import { useRef as n, useEffect as u } from "react";
+import { S as o } from "./Sharee.e2d7a306.js";
+import { jsx as f } from "react/jsx-runtime";
+import "lodash.merge";
+function m(e) {
+ const t = n(null), r = n(null);
+ return u(() => () => {
+ r.current && r.current.destroy(), r.current = new o(t.current, e);
+ }, [e]), /* @__PURE__ */ f("div", {
+ ref: t
+ });
+}
+export {
+ m as default
+};
diff --git a/dist/src/vue/Sharee.vue_vue_type_script_setup_true_lang.js b/dist/sharee-vue.js.js
similarity index 57%
rename from dist/src/vue/Sharee.vue_vue_type_script_setup_true_lang.js
rename to dist/sharee-vue.js.js
index c67801c..9467e03 100644
--- a/dist/src/vue/Sharee.vue_vue_type_script_setup_true_lang.js
+++ b/dist/sharee-vue.js.js
@@ -1,6 +1,7 @@
-import { defineComponent as a, ref as r, onMounted as u, onUnmounted as s, openBlock as p, createElementBlock as c } from "vue";
-import i from "../lib/Sharee.js";
-const f = /* @__PURE__ */ a({
+import { defineComponent as a, ref as r, onMounted as s, onUnmounted as u, openBlock as p, createElementBlock as i } from "vue";
+import { S as c } from "./Sharee.e2d7a306.js";
+import "lodash.merge";
+const _ = /* @__PURE__ */ a({
__name: "Sharee",
props: {
lang: null,
@@ -18,17 +19,17 @@ const f = /* @__PURE__ */ a({
const n = t;
console.log(n);
const l = r(null), o = r(null);
- return u(() => {
- o.value = new i(l.value, n);
- }), s(() => {
+ return s(() => {
+ o.value = new c(l.value, n);
+ }), u(() => {
var e;
(e = o.value) == null || e.destroy();
- }), (e, m) => (p(), c("div", {
+ }), (e, m) => (p(), i("div", {
ref_key: "shareeEl",
ref: l
}, null, 512));
}
});
export {
- f as default
+ _ as default
};
diff --git a/dist/sharee.js.js b/dist/sharee.js.js
new file mode 100644
index 0000000..ce980f5
--- /dev/null
+++ b/dist/sharee.js.js
@@ -0,0 +1,5 @@
+import { S as a } from "./Sharee.e2d7a306.js";
+import "lodash.merge";
+export {
+ a as default
+};
diff --git a/dist/src/assets/icons/Copy.js b/dist/src/assets/icons/Copy.js
deleted file mode 100644
index 3b8f314..0000000
--- a/dist/src/assets/icons/Copy.js
+++ /dev/null
@@ -1,6 +0,0 @@
-const a = `\r
-\r
-`;
-export {
- a as default
-};
diff --git a/dist/src/assets/icons/Facebook.js b/dist/src/assets/icons/Facebook.js
deleted file mode 100644
index 52e431c..0000000
--- a/dist/src/assets/icons/Facebook.js
+++ /dev/null
@@ -1,7 +0,0 @@
-const o = `\r
-`;
-export {
- o as default
-};
diff --git a/dist/src/assets/icons/Linkedin.js b/dist/src/assets/icons/Linkedin.js
deleted file mode 100644
index 5c942e4..0000000
--- a/dist/src/assets/icons/Linkedin.js
+++ /dev/null
@@ -1,5 +0,0 @@
-const L = `\r
-`;
-export {
- L as default
-};
diff --git a/dist/src/assets/icons/Telegram.js b/dist/src/assets/icons/Telegram.js
deleted file mode 100644
index 80afcae..0000000
--- a/dist/src/assets/icons/Telegram.js
+++ /dev/null
@@ -1,5 +0,0 @@
-const C = `\r
-`;
-export {
- C as default
-};
diff --git a/dist/src/assets/icons/Twitter.js b/dist/src/assets/icons/Twitter.js
deleted file mode 100644
index 406a8a5..0000000
--- a/dist/src/assets/icons/Twitter.js
+++ /dev/null
@@ -1,17 +0,0 @@
-const r = `\r
-`;
-export {
- r as default
-};
diff --git a/dist/src/assets/icons/Whatsapp.js b/dist/src/assets/icons/Whatsapp.js
deleted file mode 100644
index 9db9167..0000000
--- a/dist/src/assets/icons/Whatsapp.js
+++ /dev/null
@@ -1,28 +0,0 @@
-const t = `\r
-\r
-\r
-`;
-export {
- t as default
-};
diff --git a/dist/src/assets/styles/style.js b/dist/src/assets/styles/style.js
deleted file mode 100644
index 87ad279..0000000
--- a/dist/src/assets/styles/style.js
+++ /dev/null
@@ -1,4 +0,0 @@
-const t = "";
-export {
- t as default
-};
diff --git a/dist/src/build.js b/dist/src/build.js
deleted file mode 100644
index e4fb989..0000000
--- a/dist/src/build.js
+++ /dev/null
@@ -1,8 +0,0 @@
-import { default as r } from "./lib/Sharee.js";
-import { default as f } from "./vue/Sharee.vue_vue_type_script_setup_true_lang.js";
-import { default as u } from "./react/Sharee.js";
-export {
- u as ShareeReact,
- f as ShareeVue,
- r as default
-};
diff --git a/dist/src/common/ShareeOptions.js b/dist/src/common/ShareeOptions.js
deleted file mode 100644
index cf5ba6a..0000000
--- a/dist/src/common/ShareeOptions.js
+++ /dev/null
@@ -1,12 +0,0 @@
-const e = {
- showTransitionDuration: "200ms",
- lang: "fa",
- onLoad: () => {
- },
- drivers: ["copy", "telegram", "facebook", "whatsapp", "twitter", "linkedin"],
- ripple: !0,
- mode: "normal"
-};
-export {
- e as shareeDefaultOptions
-};
diff --git a/dist/src/lib/Sharee.js b/dist/src/lib/Sharee.js
deleted file mode 100644
index 456dbba..0000000
--- a/dist/src/lib/Sharee.js
+++ /dev/null
@@ -1,45 +0,0 @@
-var f = Object.defineProperty;
-var g = (i, t, e) => t in i ? f(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
-var o = (i, t, e) => (g(i, typeof t != "symbol" ? t + "" : t, e), e);
-import { shareeDefaultOptions as a } from "../common/ShareeOptions.js";
-import h from "../locales/fa.js";
-import c from "./strategies/index.js";
-import l from "../../node_modules/lodash.merge/index.js";
-import "../assets/styles/style.js";
-class E {
- constructor(t, e = a) {
- o(this, "options");
- o(this, "lang", h);
- o(this, "strategy");
- o(this, "targetElement");
- this.targetElement = t, this.options = l({}, a, e);
- const s = c[this.options.mode];
- if (typeof s > "u")
- throw new Error('Selected mode "' + e.mode + '" not found');
- this.strategy = new s(this), this.init().then(() => {
- this.strategy.render();
- });
- }
- async init() {
- this.targetElement.sharee = this, await this.setLang(this.options.lang, this.options.langs);
- }
- async setLang(t, e = {}) {
- const s = /* @__PURE__ */ Object.assign({ "../locales/en.json": () => import("../locales/en.js"), "../locales/fa.json": () => import("../locales/fa.js") });
- let n = h;
- for (const r in s)
- r.includes(t) && (s[r] instanceof Function ? n = { ...await s[r]() } : n = { ...s[r] }, e[t] && l(n, e[t]));
- this.lang = n;
- }
- getShareText() {
- return this.options.shareText || document.title;
- }
- getShareLink() {
- return this.options.shareLink || window.location.href;
- }
- destroy() {
- this.strategy.destroy();
- }
-}
-export {
- E as default
-};
diff --git a/dist/src/lib/drivers/CopyDriver.js b/dist/src/lib/drivers/CopyDriver.js
deleted file mode 100644
index 2c4b5cb..0000000
--- a/dist/src/lib/drivers/CopyDriver.js
+++ /dev/null
@@ -1,34 +0,0 @@
-var l = Object.defineProperty;
-var c = (n, o, t) => o in n ? l(n, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[o] = t;
-var r = (n, o, t) => (c(n, typeof o != "symbol" ? o + "" : o, t), t);
-import a from "./Driver.js";
-import u from "../../assets/icons/Copy.js";
-class x extends a {
- constructor(t, i) {
- super(t, i);
- r(this, "buttonText", "Copy Link");
- r(this, "icon", u);
- r(this, "backgroundColor", "#797979");
- r(this, "backgroundHoverColor", "#5e5e5e");
- r(this, "textColor", "#fff");
- r(this, "textHoverColor", "#fff");
- r(this, "timeout", 0);
- }
- onClick(t) {
- super.onClick(t);
- const i = this.lang.CopiedSuccessfully, e = t.currentTarget.querySelector("div:nth-child(2)");
- if (e.innerHTML === i) {
- e.innerHTML = this.getButtonText();
- return;
- }
- let s = window.location.href;
- navigator.clipboard.writeText(s).then(() => {
- e.innerHTML = i, e.style.transition = "300ms all", e.style.transform = "scale(1)", e.style.transform = `scale(1.07) translateX(${this.lang.Direction === "rtl" ? "-" : ""}4px)`, clearTimeout(this.timeout), this.timeout = setTimeout(() => {
- e.innerHTML = this.getButtonText(), e.style.transition = "none", e.style.transform = "scale(1)";
- }, 5e3);
- });
- }
-}
-export {
- x as default
-};
diff --git a/dist/src/lib/drivers/Driver.js b/dist/src/lib/drivers/Driver.js
deleted file mode 100644
index bd3a05d..0000000
--- a/dist/src/lib/drivers/Driver.js
+++ /dev/null
@@ -1,24 +0,0 @@
-var i = Object.defineProperty;
-var o = (l, t, e) => t in l ? i(l, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : l[t] = e;
-var n = (l, t, e) => (o(l, typeof t != "symbol" ? t + "" : t, e), e);
-class s {
- constructor(t, e) {
- n(this, "lang");
- n(this, "mainEl", null);
- n(this, "options");
- n(this, "rippleColor", "#ffffff75");
- n(this, "rippleInitialized", !1);
- this.options = e, this.lang = t;
- }
- getButtonText() {
- return this.lang[this.buttonText.replaceAll(" ", "_")] || this.buttonText;
- }
- onClick(t) {
- }
- getName() {
- return this.constructor.name;
- }
-}
-export {
- s as default
-};
diff --git a/dist/src/lib/drivers/FacebookDriver.js b/dist/src/lib/drivers/FacebookDriver.js
deleted file mode 100644
index 696c3bc..0000000
--- a/dist/src/lib/drivers/FacebookDriver.js
+++ /dev/null
@@ -1,23 +0,0 @@
-var s = Object.defineProperty;
-var i = (e, t, o) => t in e ? s(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
-var r = (e, t, o) => (i(e, typeof t != "symbol" ? t + "" : t, o), o);
-import a from "./Driver.js";
-import c from "../../assets/icons/Facebook.js";
-class k extends a {
- constructor(o, n) {
- super(o, n);
- r(this, "buttonText", "Facebook");
- r(this, "icon", c);
- r(this, "backgroundColor", "#4267B2");
- r(this, "backgroundHoverColor", "#355696");
- r(this, "textColor", "#fff");
- r(this, "textHoverColor", "#fff");
- }
- getLink() {
- var o, n;
- return `https://twitter.com/share?text=${encodeURIComponent((o = this.options) == null ? void 0 : o.shareText)}&url=${(n = this.options) == null ? void 0 : n.shareLink}`;
- }
-}
-export {
- k as default
-};
diff --git a/dist/src/lib/drivers/LinkedinDriver.js b/dist/src/lib/drivers/LinkedinDriver.js
deleted file mode 100644
index af28c21..0000000
--- a/dist/src/lib/drivers/LinkedinDriver.js
+++ /dev/null
@@ -1,23 +0,0 @@
-var i = Object.defineProperty;
-var s = (e, t, o) => t in e ? i(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
-var r = (e, t, o) => (s(e, typeof t != "symbol" ? t + "" : t, o), o);
-import f from "./Driver.js";
-import a from "../../assets/icons/Linkedin.js";
-class u extends f {
- constructor(o, n) {
- super(o, n);
- r(this, "buttonText", "Linkedin");
- r(this, "icon", a);
- r(this, "backgroundColor", "#0077B5");
- r(this, "backgroundHoverColor", "#026092");
- r(this, "textColor", "#fff");
- r(this, "textHoverColor", "#fff");
- }
- getLink() {
- var o, n;
- return `https://twitter.com/share?text=${encodeURIComponent((o = this.options) == null ? void 0 : o.shareText)}&url=${(n = this.options) == null ? void 0 : n.shareLink}`;
- }
-}
-export {
- u as default
-};
diff --git a/dist/src/lib/drivers/TelegramDriver.js b/dist/src/lib/drivers/TelegramDriver.js
deleted file mode 100644
index 97c4110..0000000
--- a/dist/src/lib/drivers/TelegramDriver.js
+++ /dev/null
@@ -1,23 +0,0 @@
-var n = Object.defineProperty;
-var s = (t, r, e) => r in t ? n(t, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[r] = e;
-var o = (t, r, e) => (s(t, typeof r != "symbol" ? r + "" : r, e), e);
-import l from "./Driver.js";
-import i from "../../assets/icons/Telegram.js";
-class g extends l {
- constructor(e, a) {
- super(e, a);
- o(this, "buttonText", "Telegram");
- o(this, "icon", i);
- o(this, "backgroundColor", "#0088CC");
- o(this, "backgroundHoverColor", "#0371aa");
- o(this, "textColor", "#fff");
- o(this, "textHoverColor", "#fff");
- }
- getLink() {
- var e, a;
- return `https://telegram.me/share/url?url=${(e = this.options) == null ? void 0 : e.shareLink}&text=${encodeURIComponent((a = this.options) == null ? void 0 : a.shareText)}`;
- }
-}
-export {
- g as default
-};
diff --git a/dist/src/lib/drivers/TwitterDriver.js b/dist/src/lib/drivers/TwitterDriver.js
deleted file mode 100644
index e947546..0000000
--- a/dist/src/lib/drivers/TwitterDriver.js
+++ /dev/null
@@ -1,23 +0,0 @@
-var n = Object.defineProperty;
-var s = (e, r, t) => r in e ? n(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t;
-var o = (e, r, t) => (s(e, typeof r != "symbol" ? r + "" : r, t), t);
-import a from "./Driver.js";
-import f from "../../assets/icons/Twitter.js";
-class d extends a {
- constructor(t, i) {
- super(t, i);
- o(this, "buttonText", "Twitter");
- o(this, "icon", f);
- o(this, "backgroundColor", "#1DA1F2");
- o(this, "backgroundHoverColor", "#1a93dd");
- o(this, "textColor", "#fff");
- o(this, "textHoverColor", "#fff");
- }
- getLink() {
- var t, i;
- return `https://twitter.com/share?text=${encodeURIComponent((t = this.options) == null ? void 0 : t.shareText)}&url=${(i = this.options) == null ? void 0 : i.shareLink}`;
- }
-}
-export {
- d as default
-};
diff --git a/dist/src/lib/drivers/WhatsappDriver.js b/dist/src/lib/drivers/WhatsappDriver.js
deleted file mode 100644
index 28dee4a..0000000
--- a/dist/src/lib/drivers/WhatsappDriver.js
+++ /dev/null
@@ -1,24 +0,0 @@
-var a = Object.defineProperty;
-var p = (e, o, t) => o in e ? a(e, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[o] = t;
-var r = (e, o, t) => (p(e, typeof o != "symbol" ? o + "" : o, t), t);
-import n from "./Driver.js";
-import i from "../../assets/icons/Whatsapp.js";
-class x extends n {
- constructor(t, s) {
- super(t, s);
- r(this, "buttonText", "Whatsapp");
- r(this, "icon", i);
- r(this, "backgroundColor", "#25D366");
- r(this, "backgroundHoverColor", "#20bd5a");
- r(this, "textColor", "#fff");
- r(this, "textHoverColor", "#fff");
- }
- getLink() {
- var t, s;
- return `whatsapp://send?text=${(t = this.options) == null ? void 0 : t.shareText}
- ${(s = this.options) == null ? void 0 : s.shareLink}`;
- }
-}
-export {
- x as default
-};
diff --git a/dist/src/lib/drivers/index.js b/dist/src/lib/drivers/index.js
deleted file mode 100644
index f99912f..0000000
--- a/dist/src/lib/drivers/index.js
+++ /dev/null
@@ -1,17 +0,0 @@
-import r from "./TelegramDriver.js";
-import e from "./WhatsappDriver.js";
-import o from "./CopyDriver.js";
-import i from "./TwitterDriver.js";
-import t from "./LinkedinDriver.js";
-import m from "./FacebookDriver.js";
-const c = new Object({
- telegram: r,
- whatsapp: e,
- copy: o,
- twitter: i,
- linkedin: t,
- facebook: m
-});
-export {
- c as default
-};
diff --git a/dist/src/lib/helpers/index.js b/dist/src/lib/helpers/index.js
deleted file mode 100644
index 3cda8b5..0000000
--- a/dist/src/lib/helpers/index.js
+++ /dev/null
@@ -1,12 +0,0 @@
-function u(r, a) {
- var s;
- do {
- if ((s = r == null ? void 0 : r.className) != null && s.includes(a))
- return !0;
- r = r.parentNode;
- } while (r);
- return !1;
-}
-export {
- u as hasClass
-};
diff --git a/dist/src/lib/strategies/BaseStrategy.js b/dist/src/lib/strategies/BaseStrategy.js
deleted file mode 100644
index 870fc17..0000000
--- a/dist/src/lib/strategies/BaseStrategy.js
+++ /dev/null
@@ -1,20 +0,0 @@
-var o = Object.defineProperty;
-var i = (e, r, t) => r in e ? o(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t;
-var s = (e, r, t) => (i(e, typeof r != "symbol" ? r + "" : r, t), t);
-import n from "../drivers/index.js";
-class u {
- constructor() {
- s(this, "eventListeners", []);
- }
- resolveDriver(r) {
- if (n.hasOwnProperty(r))
- return n[r];
- throw new Error(`Unknown driver: ${r}`);
- }
- shouldRenderDriver(r) {
- return !0;
- }
-}
-export {
- u as default
-};
diff --git a/dist/src/lib/strategies/DropdownStrategy.js b/dist/src/lib/strategies/DropdownStrategy.js
deleted file mode 100644
index 3c25b45..0000000
--- a/dist/src/lib/strategies/DropdownStrategy.js
+++ /dev/null
@@ -1,122 +0,0 @@
-var h = Object.defineProperty;
-var a = (r, i, e) => i in r ? h(r, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[i] = e;
-var n = (r, i, e) => (a(r, typeof i != "symbol" ? i + "" : i, e), e);
-import l from "./BaseStrategy.js";
-import E from "../../../node_modules/lodash.merge/index.js";
-const m = {
- type: "column",
- animation: "fade-down"
-};
-class p extends l {
- constructor(e) {
- super();
- n(this, "sharee");
- n(this, "elementHovering", !1);
- n(this, "shareeElHovering", !1);
- n(this, "shareeEl");
- n(this, "driverListeners", {});
- n(this, "hideTimeout", 0);
- n(this, "options");
- this.sharee = e, this.shareeEl = document.createElement("div"), this.options = E({}, m, e.options.modeOptions);
- }
- show() {
- this.shareeEl.classList.add("showing"), setTimeout(() => {
- this.shareeEl.classList.add("show");
- const e = this.sharee.targetElement.getBoundingClientRect(), t = e.x, s = e.y;
- this.sharee.lang.Direction === "ltr" ? (this.shareeEl.style.left = `${t}px`, this.shareeEl.style.right = "unset") : (this.shareeEl.style.right = `${t}px`, this.shareeEl.style.left = "unset"), this.shareeEl.style.top = `${s + e.height}px`;
- });
- }
- hide() {
- var e;
- (e = this.shareeEl) == null || e.classList.remove("show"), clearTimeout(this.hideTimeout), this.hideTimeout = setTimeout(() => {
- var t;
- (t = this.shareeEl) == null || t.classList.remove("showing");
- }, Number.parseInt(this.sharee.options.showTransitionDuration));
- }
- elementOnMouseEnter() {
- this.elementHovering = !0, this.show();
- }
- elementOnMouseLeave() {
- setTimeout(() => this.elementHovering = !1), setTimeout(() => {
- this.shareeElHovering || this.hide();
- });
- }
- shareElOnMouseEnter() {
- this.elementHovering && this.show(), this.shareeElHovering = !0;
- }
- shareElOnMouseLeave() {
- setTimeout(() => this.shareeElHovering = !1), setTimeout(() => {
- this.elementHovering || this.hide();
- });
- }
- listenEvents() {
- this.shareeEl.addEventListener("mouseenter", this.shareElOnMouseEnter.bind(this)), this.shareeEl.addEventListener("mouseleave", this.shareElOnMouseLeave.bind(this));
- const e = this.elementOnMouseEnter.bind(this), t = this.elementOnMouseLeave.bind(this);
- this.sharee.targetElement.addEventListener("mouseenter", e), this.sharee.targetElement.addEventListener("mouseleave", t), this.eventListeners.push([this.sharee.targetElement, "mouseenter", e]), this.eventListeners.push([this.sharee.targetElement, "mouseleave", t]);
- }
- destroy() {
- window.shareeEl = this.shareeEl, this.eventListeners.forEach((e) => {
- e[0].removeEventListener(e[1], e[2]);
- }), this.shareeEl.parentElement.removeChild(this.shareeEl);
- }
- reRender() {
- this.destroy(), setTimeout(() => {
- this.render();
- });
- }
- render() {
- this.shareeEl = document.createElement("div"), this.shareeEl.classList.add("sharee__dropdown"), this.shareeEl.classList.add("sharee__" + this.sharee.lang.Direction), this.shareeEl.classList.add(this.options.animation), this.shareeEl.style.transition = "all " + this.sharee.options.showTransitionDuration, this.shareeEl.style.transitionProperty = "transform, opacity";
- for (let e of this.sharee.options.drivers) {
- if (!this.shouldRenderDriver(e))
- continue;
- const t = this.resolveDriver(e), s = new t(this.sharee.lang, {
- lang: this.sharee.lang,
- shareText: this.sharee.getShareText(),
- shareLink: this.sharee.getShareLink(),
- ripple: this.sharee.options.ripple
- }), o = this.renderDriver(s);
- this.shareeEl.appendChild(o);
- }
- document.body.appendChild(this.shareeEl), this.listenEvents(), this.options.type === "grid" ? this.shareeEl.classList.add("sharee__dropdown__grid") : this.options.type === "row" && this.shareeEl.classList.add("sharee__dropdown__row");
- }
- onDriverMouseEnter(e) {
- return () => {
- e.mainEl.style.backgroundColor = e.backgroundHoverColor, e.mainEl.style.color = e.textHoverColor;
- };
- }
- onDriverMouseLeave(e) {
- return () => {
- this.initDriverStyles(e);
- };
- }
- onDriverClick(e) {
- return (t) => {
- e.onClick(t);
- };
- }
- initDriverStyles(e) {
- var t, s;
- e.mainEl.style.backgroundColor = e.backgroundColor, e.mainEl.style.color = e.textColor, e.mainEl.style.transition = (((t = e.options) == null ? void 0 : t.transitionDuration) || "200ms") + " all", (s = e.options) != null && s.ripple && this.initRipple(e);
- }
- initRipple(e) {
- e.rippleInitialized || (e.rippleInitialized = !0, import("ripple-effects").then((t) => {
- t.default(e.mainEl, {
- background: e.rippleColor
- });
- }));
- }
- renderDriver(e) {
- e.mainEl = document.createElement("a"), "getLink" in e && (e.mainEl.href = e.getLink()), this.initDriverStyles(e), this.listenDriverEvents(e);
- const t = document.createElement("div");
- t.innerHTML = e.icon;
- const s = document.createElement("div");
- return s.innerHTML = e.getButtonText(), e.mainEl.appendChild(t), e.mainEl.appendChild(s), e.mainEl;
- }
- listenDriverEvents(e) {
- const t = this.onDriverMouseEnter(e), s = this.onDriverMouseLeave(e), o = this.onDriverClick(e);
- this.driverListeners[e.buttonText] = [t, s, o], e.mainEl.addEventListener("mouseenter", t), e.mainEl.addEventListener("mouseleave", s), e.mainEl.addEventListener("click", o);
- }
-}
-export {
- p as default
-};
diff --git a/dist/src/lib/strategies/FixedStrategy.js b/dist/src/lib/strategies/FixedStrategy.js
deleted file mode 100644
index 53ecca9..0000000
--- a/dist/src/lib/strategies/FixedStrategy.js
+++ /dev/null
@@ -1,82 +0,0 @@
-var l = Object.defineProperty;
-var r = (n, s, e) => s in n ? l(n, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[s] = e;
-var o = (n, s, e) => (r(n, typeof s != "symbol" ? s + "" : s, e), e);
-import h from "./BaseStrategy.js";
-import p from "../../../node_modules/lodash.merge/index.js";
-const c = {
- position: "top-right",
- noTitle: !1
-};
-class u extends h {
- constructor(e) {
- super();
- o(this, "sharee");
- o(this, "shareeEl");
- o(this, "driverListeners", {});
- o(this, "options");
- this.sharee = e, this.shareeEl = document.createElement("div"), this.options = p({}, c, e.options.modeOptions);
- }
- destroy() {
- window.shareeEl = this.shareeEl, console.log(this.shareeEl), this.eventListeners.forEach((e) => {
- e[0].removeEventListener(e[1], e[2]);
- }), this.shareeEl.parentElement.removeChild(this.shareeEl);
- }
- reRender() {
- this.destroy(), setTimeout(() => {
- this.render();
- });
- }
- getPositionClass() {
- }
- render() {
- this.shareeEl = document.createElement("div"), this.shareeEl.classList.add("sharee__fixed"), this.shareeEl.classList.add("sharee__" + this.sharee.lang.Direction), this.shareeEl.classList.add("sharee__position__" + this.options.position), this.shareeEl.style.transition = "all " + this.sharee.options.showTransitionDuration, this.shareeEl.style.transitionProperty = "transform, opacity";
- for (let e of this.sharee.options.drivers) {
- if (!this.shouldRenderDriver(e))
- continue;
- const t = this.resolveDriver(e), i = new t(this.sharee.lang, {
- lang: this.sharee.lang,
- shareText: this.sharee.getShareText(),
- shareLink: this.sharee.getShareLink(),
- ripple: this.sharee.options.ripple
- }), a = this.renderDriver(i);
- this.shareeEl.appendChild(a);
- }
- document.body.appendChild(this.shareeEl);
- }
- onDriverMouseEnter(e) {
- return () => {
- e.mainEl.style.backgroundColor = e.backgroundHoverColor, e.mainEl.style.color = e.textHoverColor;
- };
- }
- onDriverMouseLeave(e) {
- return () => {
- this.initDriverStyles(e);
- };
- }
- onDriverClick(e) {
- return (t) => {
- e.onClick(t);
- };
- }
- initDriverStyles(e) {
- var t, i;
- e.mainEl.style.backgroundColor = e.backgroundColor, e.mainEl.style.color = e.textColor, e.mainEl.style.transition = (((t = e.options) == null ? void 0 : t.transitionDuration) || "200ms") + " all", (i = e.options) != null && i.ripple && this.initRipple(e);
- }
- initRipple(e) {
- e.rippleInitialized || (e.rippleInitialized = !0, import("ripple-effects").then((t) => {
- t.default(e.mainEl, {
- background: e.rippleColor
- });
- }));
- }
- renderDriver(e) {
- e.mainEl = document.createElement("a"), "getLink" in e && (e.mainEl.href = e.getLink()), this.initDriverStyles(e);
- const t = document.createElement("div");
- t.innerHTML = e.icon;
- const i = document.createElement("div");
- return i.innerHTML = e.getButtonText(), e.mainEl.appendChild(t), this.options.noTitle ? (e.mainEl.title = e.getButtonText(), e.mainEl.classList.add("sharee__no-title")) : e.mainEl.appendChild(i), e.mainEl.classList.add("sharee__driver__" + e.getName()), e.mainEl;
- }
-}
-export {
- u as default
-};
diff --git a/dist/src/lib/strategies/NormalStrategy.js b/dist/src/lib/strategies/NormalStrategy.js
deleted file mode 100644
index ce4c50c..0000000
--- a/dist/src/lib/strategies/NormalStrategy.js
+++ /dev/null
@@ -1,83 +0,0 @@
-var r = Object.defineProperty;
-var l = (a, s, e) => s in a ? r(a, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[s] = e;
-var i = (a, s, e) => (l(a, typeof s != "symbol" ? s + "" : s, e), e);
-import h from "./BaseStrategy.js";
-import m from "../../../node_modules/lodash.merge/index.js";
-const p = {
- noTitle: !1
-};
-class u extends h {
- constructor(e) {
- super();
- i(this, "sharee");
- i(this, "elementHovering", !1);
- i(this, "shareeElHovering", !1);
- i(this, "shareeEl");
- i(this, "driverListeners", {});
- i(this, "hideTimeout", 0);
- i(this, "options");
- this.sharee = e, this.shareeEl = document.createElement("div"), this.options = m({}, p, e.options.modeOptions);
- }
- hide() {
- var e;
- (e = this.shareeEl) == null || e.classList.remove("show"), clearTimeout(this.hideTimeout), this.hideTimeout = setTimeout(() => {
- var t;
- (t = this.shareeEl) == null || t.classList.remove("showing");
- }, Number.parseInt(this.sharee.options.showTransitionDuration));
- }
- destroy() {
- this.eventListeners.forEach((e) => {
- e[0].removeEventListener(e[1], e[2]);
- }), this.shareeEl.parentElement.removeChild(this.shareeEl);
- }
- reRender() {
- this.destroy(), setTimeout(() => {
- this.render();
- });
- }
- render() {
- this.shareeEl = document.createElement("div"), this.shareeEl.classList.add("sharee__normal"), this.shareeEl.classList.add("sharee__" + this.sharee.lang.Direction), this.shareeEl.style.transition = "all " + this.sharee.options.showTransitionDuration, this.shareeEl.style.transitionProperty = "transform, opacity";
- for (let e of this.sharee.options.drivers) {
- if (!this.shouldRenderDriver(e))
- continue;
- const t = this.resolveDriver(e), n = new t(this.sharee.lang, {
- lang: this.sharee.lang,
- shareText: this.sharee.getShareText(),
- shareLink: this.sharee.getShareLink(),
- ripple: this.sharee.options.ripple
- }), o = this.renderDriver(n);
- this.shareeEl.appendChild(o);
- }
- this.sharee.targetElement.appendChild(this.shareeEl);
- }
- onDriverClick(e) {
- return (t) => {
- e.onClick(t);
- };
- }
- initDriverStyles(e) {
- var t, n;
- e.mainEl.style.backgroundColor = e.backgroundColor, e.mainEl.style.color = e.textColor, e.mainEl.style.transition = (((t = e.options) == null ? void 0 : t.transitionDuration) || "200ms") + " background, 1s max-width", (n = e.options) != null && n.ripple && this.initRipple(e);
- }
- initRipple(e) {
- e.rippleInitialized || (e.rippleInitialized = !0, import("ripple-effects").then((t) => {
- t.default(e.mainEl, {
- background: e.rippleColor
- });
- }));
- }
- renderDriver(e) {
- e.mainEl = document.createElement("a"), "getLink" in e && (e.mainEl.href = e.getLink()), this.initDriverStyles(e), this.listenDriverEvents(e);
- const t = document.createElement("div");
- t.innerHTML = e.icon;
- const n = document.createElement("div");
- return n.innerHTML = e.getButtonText(), e.mainEl.appendChild(t), this.options.noTitle ? (e.mainEl.title = e.getButtonText(), e.mainEl.classList.add("sharee__no-title")) : e.mainEl.appendChild(n), e.mainEl.classList.add("sharee__driver__" + e.getName()), e.mainEl;
- }
- listenDriverEvents(e) {
- const t = this.onDriverClick(e);
- this.driverListeners[e.buttonText] = [t], e.mainEl.addEventListener("click", t);
- }
-}
-export {
- u as default
-};
diff --git a/dist/src/lib/strategies/TextStrategy.js b/dist/src/lib/strategies/TextStrategy.js
deleted file mode 100644
index 80bf278..0000000
--- a/dist/src/lib/strategies/TextStrategy.js
+++ /dev/null
@@ -1,79 +0,0 @@
-import { hasClass as n } from "../helpers/index.js";
-import o from "./DropdownStrategy.js";
-class a extends o {
- constructor(e) {
- super(e), this.options.type = "row";
- }
- show() {
- this.shareeEl.classList.add("showing"), setTimeout(() => {
- this.shareeEl.classList.add("show");
- });
- }
- getDistanceFromTop() {
- return window.pageXOffset || document.documentElement.scrollTop || document.body.scrollTop;
- }
- getTooltipPosition() {
- let e;
- try {
- e = window.getSelection().getRangeAt(0).getBoundingClientRect();
- } catch {
- return { left: 0, top: 0 };
- }
- const t = 30, s = e.top, i = e.left + (e.width - t * this.sharee.options.drivers.length) / 2;
- return { top: s, left: i };
- }
- setPosition(e) {
- this.shareeEl.style.right = "unset";
- const { left: t, top: s } = this.getTooltipPosition();
- return t === 0 ? (this.hide(), !1) : (e.x + 300 > window.innerWidth ? this.shareeEl.style.left = t + "px" : this.shareeEl.style.left = t + "px", this.shareeEl.style.top = `${s + 26}px`, !0);
- }
- shouldRenderDriver(e) {
- return e !== "copy";
- }
- getSelectedText() {
- var e;
- try {
- window.getSelection().getRangeAt(0);
- } catch {
- return !1;
- }
- return window.getSelection ? (e = window.getSelection()) == null ? void 0 : e.toString() : typeof document.selection < "u" ? document.selection.createRange().text : "";
- }
- destroy() {
- super.destroy(), window.removeEventListener("resize", this.windowOnResize);
- }
- render() {
- super.render(), this.shareeEl.classList.add("sharee__text");
- }
- documentOnClick(e) {
- n(e.target, "sharee__text") || this.hide();
- }
- elementOnMouseUp(e) {
- const t = e.currentTarget;
- setTimeout(() => {
- const s = this.getSelectedText();
- !s || n(t, "sharee__text") || (this.sharee.options.shareText = s, this.reRender(), setTimeout(() => {
- this.show(), setTimeout(() => {
- this.setPosition(e);
- });
- }));
- });
- }
- windowOnResize() {
- this.hide();
- }
- listenEvents() {
- const e = this.elementOnMouseUp.bind(this), t = this.documentOnClick.bind(this);
- this.sharee.targetElement.addEventListener("mouseup", e), document.addEventListener("click", t);
- const s = this.windowOnResize.bind(this);
- window.addEventListener("resize", s), this.eventListeners.push([this.sharee.targetElement, "mouseup", e]), this.eventListeners.push([document, "click", t]), this.eventListeners.push([window, "resize", s]);
- }
- renderDriver(e) {
- e.mainEl = document.createElement("a"), e.mainEl.title = e.getButtonText(), "getLink" in e && (e.mainEl.href = e.getLink()), this.initDriverStyles(e), this.listenDriverEvents(e);
- const t = document.createElement("div");
- return t.innerHTML = e.icon, e.mainEl.appendChild(t), e.mainEl;
- }
-}
-export {
- a as default
-};
diff --git a/dist/src/lib/strategies/index.js b/dist/src/lib/strategies/index.js
deleted file mode 100644
index 44ff6b9..0000000
--- a/dist/src/lib/strategies/index.js
+++ /dev/null
@@ -1,13 +0,0 @@
-import t from "./DropdownStrategy.js";
-import r from "./TextStrategy.js";
-import o from "./NormalStrategy.js";
-import e from "./FixedStrategy.js";
-const d = {
- dropdown: t,
- text: r,
- normal: o,
- fixed: e
-};
-export {
- d as default
-};
diff --git a/dist/src/locales/fa.js b/dist/src/locales/fa.js
deleted file mode 100644
index b9a7400..0000000
--- a/dist/src/locales/fa.js
+++ /dev/null
@@ -1,19 +0,0 @@
-const t = "rtl", e = "\u0627\u0634\u062A\u0631\u0627\u06A9 \u062F\u0631 \u062A\u0644\u06AF\u0631\u0627\u0645", n = "\u06A9\u067E\u06CC \u0644\u06CC\u0646\u06A9", o = "\u0628\u0627 \u0645\u0648\u0641\u0642\u06CC\u062A \u06A9\u067E\u06CC \u0634\u062F!", s = "\u0627\u0634\u062A\u0631\u0627\u06A9 \u062F\u0631 \u0648\u0627\u062A\u0633\u0627\u067E", c = "\u0627\u0634\u062A\u0631\u0627\u06A9 \u062F\u0631 \u062A\u0648\u06CC\u06CC\u062A\u0631", i = "\u0627\u0634\u062A\u0631\u0627\u06A9 \u062F\u0631 \u0644\u06CC\u0646\u06A9\u062F\u06CC\u0646", a = {
- Direction: t,
- Telegram: e,
- Copy_Link: n,
- CopiedSuccessfully: o,
- Whatsapp: s,
- Twitter: c,
- Linkedin: i
-};
-export {
- o as CopiedSuccessfully,
- n as Copy_Link,
- t as Direction,
- i as Linkedin,
- e as Telegram,
- c as Twitter,
- s as Whatsapp,
- a as default
-};
diff --git a/dist/src/react/Sharee.js b/dist/src/react/Sharee.js
deleted file mode 100644
index e9ea93a..0000000
--- a/dist/src/react/Sharee.js
+++ /dev/null
@@ -1,14 +0,0 @@
-import { useRef as n, useEffect as u } from "react";
-import f from "../lib/Sharee.js";
-import { jsx as o } from "../../_virtual/jsx-runtime.js";
-function i(e) {
- const t = n(null), r = n(null);
- return u(() => () => {
- r.current && r.current.destroy(), r.current = new f(t.current, e);
- }, [e]), /* @__PURE__ */ o("div", {
- ref: t
- });
-}
-export {
- i as default
-};
diff --git a/dist/src/vue/Sharee.js b/dist/src/vue/Sharee.js
deleted file mode 100644
index 612d88e..0000000
--- a/dist/src/vue/Sharee.js
+++ /dev/null
@@ -1,5 +0,0 @@
-import "./Sharee.vue_vue_type_script_setup_true_lang.js";
-import { default as t } from "./Sharee.vue_vue_type_script_setup_true_lang.js";
-export {
- t as default
-};
diff --git a/package-lock.json b/package-lock.json
index 2ae2892..5f9f4e7 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,13 @@
{
- "name": "sharee-js",
- "version": "1.0.0",
+ "name": "sharee",
+ "version": "1.0.3",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
- "name": "sharee-js",
- "version": "1.0.0",
+ "name": "sharee",
+ "version": "1.0.3",
+ "license": "ISC",
"dependencies": {
"lodash.merge": "^4.6.2",
"ripple-effects": "^1.0.2"
@@ -458,10 +459,26 @@
"node": ">=6.9.0"
}
},
+ "node_modules/@esbuild/android-arm": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.15.9.tgz",
+ "integrity": "sha512-VZPy/ETF3fBG5PiinIkA0W/tlsvlEgJccyN2DzWZEl0DlVKRbu91PvY2D6Lxgluj4w9QtYHjOWjAT44C+oQ+EQ==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
"node_modules/@esbuild/linux-loong64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.14.54.tgz",
- "integrity": "sha512-bZBrLAIX1kpWelV0XemxBZllyRmM6vgFQQG2GdNb+r3Fkp0FOh1NJSvekXDs7jq70k4euu1cryLMfU+mTXlEpw==",
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.15.9.tgz",
+ "integrity": "sha512-O+NfmkfRrb3uSsTa4jE3WApidSe3N5++fyOVGP1SmMZi4A3BZELkhUUvj5hwmMuNdlpzAZ8iAPz2vmcR7DCFQA==",
"cpu": [
"loong64"
],
@@ -924,9 +941,9 @@
"dev": true
},
"node_modules/esbuild": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.54.tgz",
- "integrity": "sha512-Cy9llcy8DvET5uznocPyqL3BFRrFXSVqbgpMJ9Wz8oVjZlh/zUSNbPRbov0VX7VxN2JH1Oa0uNxZ7eLRb62pJA==",
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.15.9.tgz",
+ "integrity": "sha512-OnYr1rkMVxtmMHIAKZLMcEUlJmqcbxBz9QoBU8G9v455na0fuzlT/GLu6l+SRghrk0Mm2fSSciMmzV43Q8e0Gg==",
"dev": true,
"hasInstallScript": true,
"bin": {
@@ -936,33 +953,34 @@
"node": ">=12"
},
"optionalDependencies": {
- "@esbuild/linux-loong64": "0.14.54",
- "esbuild-android-64": "0.14.54",
- "esbuild-android-arm64": "0.14.54",
- "esbuild-darwin-64": "0.14.54",
- "esbuild-darwin-arm64": "0.14.54",
- "esbuild-freebsd-64": "0.14.54",
- "esbuild-freebsd-arm64": "0.14.54",
- "esbuild-linux-32": "0.14.54",
- "esbuild-linux-64": "0.14.54",
- "esbuild-linux-arm": "0.14.54",
- "esbuild-linux-arm64": "0.14.54",
- "esbuild-linux-mips64le": "0.14.54",
- "esbuild-linux-ppc64le": "0.14.54",
- "esbuild-linux-riscv64": "0.14.54",
- "esbuild-linux-s390x": "0.14.54",
- "esbuild-netbsd-64": "0.14.54",
- "esbuild-openbsd-64": "0.14.54",
- "esbuild-sunos-64": "0.14.54",
- "esbuild-windows-32": "0.14.54",
- "esbuild-windows-64": "0.14.54",
- "esbuild-windows-arm64": "0.14.54"
+ "@esbuild/android-arm": "0.15.9",
+ "@esbuild/linux-loong64": "0.15.9",
+ "esbuild-android-64": "0.15.9",
+ "esbuild-android-arm64": "0.15.9",
+ "esbuild-darwin-64": "0.15.9",
+ "esbuild-darwin-arm64": "0.15.9",
+ "esbuild-freebsd-64": "0.15.9",
+ "esbuild-freebsd-arm64": "0.15.9",
+ "esbuild-linux-32": "0.15.9",
+ "esbuild-linux-64": "0.15.9",
+ "esbuild-linux-arm": "0.15.9",
+ "esbuild-linux-arm64": "0.15.9",
+ "esbuild-linux-mips64le": "0.15.9",
+ "esbuild-linux-ppc64le": "0.15.9",
+ "esbuild-linux-riscv64": "0.15.9",
+ "esbuild-linux-s390x": "0.15.9",
+ "esbuild-netbsd-64": "0.15.9",
+ "esbuild-openbsd-64": "0.15.9",
+ "esbuild-sunos-64": "0.15.9",
+ "esbuild-windows-32": "0.15.9",
+ "esbuild-windows-64": "0.15.9",
+ "esbuild-windows-arm64": "0.15.9"
}
},
"node_modules/esbuild-android-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.14.54.tgz",
- "integrity": "sha512-Tz2++Aqqz0rJ7kYBfz+iqyE3QMycD4vk7LBRyWaAVFgFtQ/O8EJOnVmTOiDWYZ/uYzB4kvP+bqejYdVKzE5lAQ==",
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.15.9.tgz",
+ "integrity": "sha512-HQCX7FJn9T4kxZQkhPjNZC7tBWZqJvhlLHPU2SFzrQB/7nDXjmTIFpFTjt7Bd1uFpeXmuwf5h5fZm+x/hLnhbw==",
"cpu": [
"x64"
],
@@ -976,9 +994,9 @@
}
},
"node_modules/esbuild-android-arm64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.54.tgz",
- "integrity": "sha512-F9E+/QDi9sSkLaClO8SOV6etqPd+5DgJje1F9lOWoNncDdOBL2YF59IhsWATSt0TLZbYCf3pNlTHvVV5VfHdvg==",
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.15.9.tgz",
+ "integrity": "sha512-E6zbLfqbFVCNEKircSHnPiSTsm3fCRxeIMPfrkS33tFjIAoXtwegQfVZqMGR0FlsvVxp2NEDOUz+WW48COCjSg==",
"cpu": [
"arm64"
],
@@ -992,9 +1010,9 @@
}
},
"node_modules/esbuild-darwin-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.54.tgz",
- "integrity": "sha512-jtdKWV3nBviOd5v4hOpkVmpxsBy90CGzebpbO9beiqUYVMBtSc0AL9zGftFuBon7PNDcdvNCEuQqw2x0wP9yug==",
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.9.tgz",
+ "integrity": "sha512-gI7dClcDN/HHVacZhTmGjl0/TWZcGuKJ0I7/xDGJwRQQn7aafZGtvagOFNmuOq+OBFPhlPv1T6JElOXb0unkSQ==",
"cpu": [
"x64"
],
@@ -1008,9 +1026,9 @@
}
},
"node_modules/esbuild-darwin-arm64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.54.tgz",
- "integrity": "sha512-OPafJHD2oUPyvJMrsCvDGkRrVCar5aVyHfWGQzY1dWnzErjrDuSETxwA2HSsyg2jORLY8yBfzc1MIpUkXlctmw==",
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.9.tgz",
+ "integrity": "sha512-VZIMlcRN29yg/sv7DsDwN+OeufCcoTNaTl3Vnav7dL/nvsApD7uvhVRbgyMzv0zU/PP0xRhhIpTyc7lxEzHGSw==",
"cpu": [
"arm64"
],
@@ -1024,9 +1042,9 @@
}
},
"node_modules/esbuild-freebsd-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.54.tgz",
- "integrity": "sha512-OKwd4gmwHqOTp4mOGZKe/XUlbDJ4Q9TjX0hMPIDBUWWu/kwhBAudJdBoxnjNf9ocIB6GN6CPowYpR/hRCbSYAg==",
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.9.tgz",
+ "integrity": "sha512-uM4z5bTvuAXqPxrI204txhlsPIolQPWRMLenvGuCPZTnnGlCMF2QLs0Plcm26gcskhxewYo9LkkmYSS5Czrb5A==",
"cpu": [
"x64"
],
@@ -1040,9 +1058,9 @@
}
},
"node_modules/esbuild-freebsd-arm64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.54.tgz",
- "integrity": "sha512-sFwueGr7OvIFiQT6WeG0jRLjkjdqWWSrfbVwZp8iMP+8UHEHRBvlaxL6IuKNDwAozNUmbb8nIMXa7oAOARGs1Q==",
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.9.tgz",
+ "integrity": "sha512-HHDjT3O5gWzicGdgJ5yokZVN9K9KG05SnERwl9nBYZaCjcCgj/sX8Ps1jvoFSfNCO04JSsHSOWo4qvxFuj8FoA==",
"cpu": [
"arm64"
],
@@ -1056,9 +1074,9 @@
}
},
"node_modules/esbuild-linux-32": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.54.tgz",
- "integrity": "sha512-1ZuY+JDI//WmklKlBgJnglpUL1owm2OX+8E1syCD6UAxcMM/XoWd76OHSjl/0MR0LisSAXDqgjT3uJqT67O3qw==",
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.15.9.tgz",
+ "integrity": "sha512-AQIdE8FugGt1DkcekKi5ycI46QZpGJ/wqcMr7w6YUmOmp2ohQ8eO4sKUsOxNOvYL7hGEVwkndSyszR6HpVHLFg==",
"cpu": [
"ia32"
],
@@ -1072,9 +1090,9 @@
}
},
"node_modules/esbuild-linux-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.54.tgz",
- "integrity": "sha512-EgjAgH5HwTbtNsTqQOXWApBaPVdDn7XcK+/PtJwZLT1UmpLoznPd8c5CxqsH2dQK3j05YsB3L17T8vE7cp4cCg==",
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.15.9.tgz",
+ "integrity": "sha512-4RXjae7g6Qs7StZyiYyXTZXBlfODhb1aBVAjd+ANuPmMhWthQilWo7rFHwJwL7DQu1Fjej2sODAVwLbcIVsAYQ==",
"cpu": [
"x64"
],
@@ -1088,9 +1106,9 @@
}
},
"node_modules/esbuild-linux-arm": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.54.tgz",
- "integrity": "sha512-qqz/SjemQhVMTnvcLGoLOdFpCYbz4v4fUo+TfsWG+1aOu70/80RV6bgNpR2JCrppV2moUQkww+6bWxXRL9YMGw==",
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.15.9.tgz",
+ "integrity": "sha512-3Zf2GVGUOI7XwChH3qrnTOSqfV1V4CAc/7zLVm4lO6JT6wbJrTgEYCCiNSzziSju+J9Jhf9YGWk/26quWPC6yQ==",
"cpu": [
"arm"
],
@@ -1104,9 +1122,9 @@
}
},
"node_modules/esbuild-linux-arm64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.54.tgz",
- "integrity": "sha512-WL71L+0Rwv+Gv/HTmxTEmpv0UgmxYa5ftZILVi2QmZBgX3q7+tDeOQNqGtdXSdsL8TQi1vIaVFHUPDe0O0kdig==",
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.9.tgz",
+ "integrity": "sha512-a+bTtxJmYmk9d+s2W4/R1SYKDDAldOKmWjWP0BnrWtDbvUBNOm++du0ysPju4mZVoEFgS1yLNW+VXnG/4FNwdQ==",
"cpu": [
"arm64"
],
@@ -1120,9 +1138,9 @@
}
},
"node_modules/esbuild-linux-mips64le": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.54.tgz",
- "integrity": "sha512-qTHGQB8D1etd0u1+sB6p0ikLKRVuCWhYQhAHRPkO+OF3I/iSlTKNNS0Lh2Oc0g0UFGguaFZZiPJdJey3AGpAlw==",
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.9.tgz",
+ "integrity": "sha512-Zn9HSylDp89y+TRREMDoGrc3Z4Hs5u56ozZLQCiZAUx2+HdbbXbWdjmw3FdTJ/i7t5Cew6/Q+6kfO3KCcFGlyw==",
"cpu": [
"mips64el"
],
@@ -1136,9 +1154,9 @@
}
},
"node_modules/esbuild-linux-ppc64le": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.54.tgz",
- "integrity": "sha512-j3OMlzHiqwZBDPRCDFKcx595XVfOfOnv68Ax3U4UKZ3MTYQB5Yz3X1mn5GnodEVYzhtZgxEBidLWeIs8FDSfrQ==",
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.9.tgz",
+ "integrity": "sha512-OEiOxNAMH9ENFYqRsWUj3CWyN3V8P3ZXyfNAtX5rlCEC/ERXrCEFCJji/1F6POzsXAzxvUJrTSTCy7G6BhA6Fw==",
"cpu": [
"ppc64"
],
@@ -1152,9 +1170,9 @@
}
},
"node_modules/esbuild-linux-riscv64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.54.tgz",
- "integrity": "sha512-y7Vt7Wl9dkOGZjxQZnDAqqn+XOqFD7IMWiewY5SPlNlzMX39ocPQlOaoxvT4FllA5viyV26/QzHtvTjVNOxHZg==",
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.9.tgz",
+ "integrity": "sha512-ukm4KsC3QRausEFjzTsOZ/qqazw0YvJsKmfoZZm9QW27OHjk2XKSQGGvx8gIEswft/Sadp03/VZvAaqv5AIwNA==",
"cpu": [
"riscv64"
],
@@ -1168,9 +1186,9 @@
}
},
"node_modules/esbuild-linux-s390x": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.54.tgz",
- "integrity": "sha512-zaHpW9dziAsi7lRcyV4r8dhfG1qBidQWUXweUjnw+lliChJqQr+6XD71K41oEIC3Mx1KStovEmlzm+MkGZHnHA==",
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.9.tgz",
+ "integrity": "sha512-uDOQEH55wQ6ahcIKzQr3VyjGc6Po/xblLGLoUk3fVL1qjlZAibtQr6XRfy5wPJLu/M2o0vQKLq4lyJ2r1tWKcw==",
"cpu": [
"s390x"
],
@@ -1184,9 +1202,9 @@
}
},
"node_modules/esbuild-netbsd-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.54.tgz",
- "integrity": "sha512-PR01lmIMnfJTgeU9VJTDY9ZerDWVFIUzAtJuDHwwceppW7cQWjBBqP48NdeRtoP04/AtO9a7w3viI+PIDr6d+w==",
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.9.tgz",
+ "integrity": "sha512-yWgxaYTQz+TqX80wXRq6xAtb7GSBAp6gqLKfOdANg9qEmAI1Bxn04IrQr0Mzm4AhxvGKoHzjHjMgXbCCSSDxcw==",
"cpu": [
"x64"
],
@@ -1200,9 +1218,9 @@
}
},
"node_modules/esbuild-openbsd-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.54.tgz",
- "integrity": "sha512-Qyk7ikT2o7Wu76UsvvDS5q0amJvmRzDyVlL0qf5VLsLchjCa1+IAvd8kTBgUxD7VBUUVgItLkk609ZHUc1oCaw==",
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.9.tgz",
+ "integrity": "sha512-JmS18acQl4iSAjrEha1MfEmUMN4FcnnrtTaJ7Qg0tDCOcgpPPQRLGsZqhes0vmx8VA6IqRyScqXvaL7+Q0Uf3A==",
"cpu": [
"x64"
],
@@ -1216,9 +1234,9 @@
}
},
"node_modules/esbuild-sunos-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.54.tgz",
- "integrity": "sha512-28GZ24KmMSeKi5ueWzMcco6EBHStL3B6ubM7M51RmPwXQGLe0teBGJocmWhgwccA1GeFXqxzILIxXpHbl9Q/Kw==",
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.15.9.tgz",
+ "integrity": "sha512-UKynGSWpzkPmXW3D2UMOD9BZPIuRaSqphxSCwScfEE05Be3KAmvjsBhht1fLzKpiFVJb0BYMd4jEbWMyJ/z1hQ==",
"cpu": [
"x64"
],
@@ -1232,9 +1250,9 @@
}
},
"node_modules/esbuild-windows-32": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.54.tgz",
- "integrity": "sha512-T+rdZW19ql9MjS7pixmZYVObd9G7kcaZo+sETqNH4RCkuuYSuv9AGHUVnPoP9hhuE1WM1ZimHz1CIBHBboLU7w==",
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.15.9.tgz",
+ "integrity": "sha512-aqXvu4/W9XyTVqO/hw3rNxKE1TcZiEYHPsXM9LwYmKSX9/hjvfIJzXwQBlPcJ/QOxedfoMVH0YnhhQ9Ffb0RGA==",
"cpu": [
"ia32"
],
@@ -1248,9 +1266,9 @@
}
},
"node_modules/esbuild-windows-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.54.tgz",
- "integrity": "sha512-AoHTRBUuYwXtZhjXZbA1pGfTo8cJo3vZIcWGLiUcTNgHpJJMC1rVA44ZereBHMJtotyN71S8Qw0npiCIkW96cQ==",
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.15.9.tgz",
+ "integrity": "sha512-zm7h91WUmlS4idMtjvCrEeNhlH7+TNOmqw5dJPJZrgFaxoFyqYG6CKDpdFCQXdyKpD5yvzaQBOMVTCBVKGZDEg==",
"cpu": [
"x64"
],
@@ -1264,9 +1282,9 @@
}
},
"node_modules/esbuild-windows-arm64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.54.tgz",
- "integrity": "sha512-M0kuUvXhot1zOISQGXwWn6YtS+Y/1RT9WrVIOywZnJHo3jCDyewAc79aKNQWFCQm+xNHVTq9h8dZKvygoXQQRg==",
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.9.tgz",
+ "integrity": "sha512-yQEVIv27oauAtvtuhJVfSNMztJJX47ismRS6Sv2QMVV9RM+6xjbMWuuwM2nxr5A2/gj/mu2z9YlQxiwoFRCfZA==",
"cpu": [
"arm64"
],
@@ -1559,9 +1577,9 @@
"integrity": "sha512-NNXCmovX7AyFmA1/tLUy6NOQFMe4xU1Qa1LeytMeXY8FT+aWC1epXKYkQe1bnZNa9LB6c0Y5Z/qjv4D6c7Yb0A=="
},
"node_modules/rollup": {
- "version": "2.77.2",
- "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.77.2.tgz",
- "integrity": "sha512-m/4YzYgLcpMQbxX3NmAqDvwLATZzxt8bIegO78FZLl+lAgKJBd1DRAOeEiZcKOIOPjxE6ewHWHNgGEalFXuz1g==",
+ "version": "2.78.1",
+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.78.1.tgz",
+ "integrity": "sha512-VeeCgtGi4P+o9hIg+xz4qQpRl6R401LWEXBmxYKOV4zlF82lyhgh2hTZnheFUbANE8l2A41F458iwj2vEYaXJg==",
"dev": true,
"bin": {
"rollup": "dist/bin/rollup"
@@ -1700,15 +1718,15 @@
}
},
"node_modules/vite": {
- "version": "3.0.5",
- "resolved": "https://registry.npmjs.org/vite/-/vite-3.0.5.tgz",
- "integrity": "sha512-bRvrt9Tw8EGW4jj64aYFTnVg134E8hgDxyl/eEHnxiGqYk7/pTPss6CWlurqPOUzqvEoZkZ58Ws+Iu8MB87iMA==",
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/vite/-/vite-3.1.3.tgz",
+ "integrity": "sha512-/3XWiktaopByM5bd8dqvHxRt5EEgRikevnnrpND0gRfNkrMrPaGGexhtLCzv15RcCMtV2CLw+BPas8YFeSG0KA==",
"dev": true,
"dependencies": {
- "esbuild": "^0.14.47",
+ "esbuild": "^0.15.6",
"postcss": "^8.4.16",
"resolve": "^1.22.1",
- "rollup": "^2.75.6"
+ "rollup": "~2.78.0"
},
"bin": {
"vite": "bin/vite.js"
@@ -2095,10 +2113,17 @@
"to-fast-properties": "^2.0.0"
}
},
+ "@esbuild/android-arm": {
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.15.9.tgz",
+ "integrity": "sha512-VZPy/ETF3fBG5PiinIkA0W/tlsvlEgJccyN2DzWZEl0DlVKRbu91PvY2D6Lxgluj4w9QtYHjOWjAT44C+oQ+EQ==",
+ "dev": true,
+ "optional": true
+ },
"@esbuild/linux-loong64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.14.54.tgz",
- "integrity": "sha512-bZBrLAIX1kpWelV0XemxBZllyRmM6vgFQQG2GdNb+r3Fkp0FOh1NJSvekXDs7jq70k4euu1cryLMfU+mTXlEpw==",
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.15.9.tgz",
+ "integrity": "sha512-O+NfmkfRrb3uSsTa4jE3WApidSe3N5++fyOVGP1SmMZi4A3BZELkhUUvj5hwmMuNdlpzAZ8iAPz2vmcR7DCFQA==",
"dev": true,
"optional": true
},
@@ -2491,171 +2516,172 @@
"dev": true
},
"esbuild": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.54.tgz",
- "integrity": "sha512-Cy9llcy8DvET5uznocPyqL3BFRrFXSVqbgpMJ9Wz8oVjZlh/zUSNbPRbov0VX7VxN2JH1Oa0uNxZ7eLRb62pJA==",
- "dev": true,
- "requires": {
- "@esbuild/linux-loong64": "0.14.54",
- "esbuild-android-64": "0.14.54",
- "esbuild-android-arm64": "0.14.54",
- "esbuild-darwin-64": "0.14.54",
- "esbuild-darwin-arm64": "0.14.54",
- "esbuild-freebsd-64": "0.14.54",
- "esbuild-freebsd-arm64": "0.14.54",
- "esbuild-linux-32": "0.14.54",
- "esbuild-linux-64": "0.14.54",
- "esbuild-linux-arm": "0.14.54",
- "esbuild-linux-arm64": "0.14.54",
- "esbuild-linux-mips64le": "0.14.54",
- "esbuild-linux-ppc64le": "0.14.54",
- "esbuild-linux-riscv64": "0.14.54",
- "esbuild-linux-s390x": "0.14.54",
- "esbuild-netbsd-64": "0.14.54",
- "esbuild-openbsd-64": "0.14.54",
- "esbuild-sunos-64": "0.14.54",
- "esbuild-windows-32": "0.14.54",
- "esbuild-windows-64": "0.14.54",
- "esbuild-windows-arm64": "0.14.54"
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.15.9.tgz",
+ "integrity": "sha512-OnYr1rkMVxtmMHIAKZLMcEUlJmqcbxBz9QoBU8G9v455na0fuzlT/GLu6l+SRghrk0Mm2fSSciMmzV43Q8e0Gg==",
+ "dev": true,
+ "requires": {
+ "@esbuild/android-arm": "0.15.9",
+ "@esbuild/linux-loong64": "0.15.9",
+ "esbuild-android-64": "0.15.9",
+ "esbuild-android-arm64": "0.15.9",
+ "esbuild-darwin-64": "0.15.9",
+ "esbuild-darwin-arm64": "0.15.9",
+ "esbuild-freebsd-64": "0.15.9",
+ "esbuild-freebsd-arm64": "0.15.9",
+ "esbuild-linux-32": "0.15.9",
+ "esbuild-linux-64": "0.15.9",
+ "esbuild-linux-arm": "0.15.9",
+ "esbuild-linux-arm64": "0.15.9",
+ "esbuild-linux-mips64le": "0.15.9",
+ "esbuild-linux-ppc64le": "0.15.9",
+ "esbuild-linux-riscv64": "0.15.9",
+ "esbuild-linux-s390x": "0.15.9",
+ "esbuild-netbsd-64": "0.15.9",
+ "esbuild-openbsd-64": "0.15.9",
+ "esbuild-sunos-64": "0.15.9",
+ "esbuild-windows-32": "0.15.9",
+ "esbuild-windows-64": "0.15.9",
+ "esbuild-windows-arm64": "0.15.9"
}
},
"esbuild-android-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.14.54.tgz",
- "integrity": "sha512-Tz2++Aqqz0rJ7kYBfz+iqyE3QMycD4vk7LBRyWaAVFgFtQ/O8EJOnVmTOiDWYZ/uYzB4kvP+bqejYdVKzE5lAQ==",
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.15.9.tgz",
+ "integrity": "sha512-HQCX7FJn9T4kxZQkhPjNZC7tBWZqJvhlLHPU2SFzrQB/7nDXjmTIFpFTjt7Bd1uFpeXmuwf5h5fZm+x/hLnhbw==",
"dev": true,
"optional": true
},
"esbuild-android-arm64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.54.tgz",
- "integrity": "sha512-F9E+/QDi9sSkLaClO8SOV6etqPd+5DgJje1F9lOWoNncDdOBL2YF59IhsWATSt0TLZbYCf3pNlTHvVV5VfHdvg==",
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.15.9.tgz",
+ "integrity": "sha512-E6zbLfqbFVCNEKircSHnPiSTsm3fCRxeIMPfrkS33tFjIAoXtwegQfVZqMGR0FlsvVxp2NEDOUz+WW48COCjSg==",
"dev": true,
"optional": true
},
"esbuild-darwin-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.54.tgz",
- "integrity": "sha512-jtdKWV3nBviOd5v4hOpkVmpxsBy90CGzebpbO9beiqUYVMBtSc0AL9zGftFuBon7PNDcdvNCEuQqw2x0wP9yug==",
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.9.tgz",
+ "integrity": "sha512-gI7dClcDN/HHVacZhTmGjl0/TWZcGuKJ0I7/xDGJwRQQn7aafZGtvagOFNmuOq+OBFPhlPv1T6JElOXb0unkSQ==",
"dev": true,
"optional": true
},
"esbuild-darwin-arm64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.54.tgz",
- "integrity": "sha512-OPafJHD2oUPyvJMrsCvDGkRrVCar5aVyHfWGQzY1dWnzErjrDuSETxwA2HSsyg2jORLY8yBfzc1MIpUkXlctmw==",
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.9.tgz",
+ "integrity": "sha512-VZIMlcRN29yg/sv7DsDwN+OeufCcoTNaTl3Vnav7dL/nvsApD7uvhVRbgyMzv0zU/PP0xRhhIpTyc7lxEzHGSw==",
"dev": true,
"optional": true
},
"esbuild-freebsd-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.54.tgz",
- "integrity": "sha512-OKwd4gmwHqOTp4mOGZKe/XUlbDJ4Q9TjX0hMPIDBUWWu/kwhBAudJdBoxnjNf9ocIB6GN6CPowYpR/hRCbSYAg==",
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.9.tgz",
+ "integrity": "sha512-uM4z5bTvuAXqPxrI204txhlsPIolQPWRMLenvGuCPZTnnGlCMF2QLs0Plcm26gcskhxewYo9LkkmYSS5Czrb5A==",
"dev": true,
"optional": true
},
"esbuild-freebsd-arm64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.54.tgz",
- "integrity": "sha512-sFwueGr7OvIFiQT6WeG0jRLjkjdqWWSrfbVwZp8iMP+8UHEHRBvlaxL6IuKNDwAozNUmbb8nIMXa7oAOARGs1Q==",
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.9.tgz",
+ "integrity": "sha512-HHDjT3O5gWzicGdgJ5yokZVN9K9KG05SnERwl9nBYZaCjcCgj/sX8Ps1jvoFSfNCO04JSsHSOWo4qvxFuj8FoA==",
"dev": true,
"optional": true
},
"esbuild-linux-32": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.54.tgz",
- "integrity": "sha512-1ZuY+JDI//WmklKlBgJnglpUL1owm2OX+8E1syCD6UAxcMM/XoWd76OHSjl/0MR0LisSAXDqgjT3uJqT67O3qw==",
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.15.9.tgz",
+ "integrity": "sha512-AQIdE8FugGt1DkcekKi5ycI46QZpGJ/wqcMr7w6YUmOmp2ohQ8eO4sKUsOxNOvYL7hGEVwkndSyszR6HpVHLFg==",
"dev": true,
"optional": true
},
"esbuild-linux-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.54.tgz",
- "integrity": "sha512-EgjAgH5HwTbtNsTqQOXWApBaPVdDn7XcK+/PtJwZLT1UmpLoznPd8c5CxqsH2dQK3j05YsB3L17T8vE7cp4cCg==",
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.15.9.tgz",
+ "integrity": "sha512-4RXjae7g6Qs7StZyiYyXTZXBlfODhb1aBVAjd+ANuPmMhWthQilWo7rFHwJwL7DQu1Fjej2sODAVwLbcIVsAYQ==",
"dev": true,
"optional": true
},
"esbuild-linux-arm": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.54.tgz",
- "integrity": "sha512-qqz/SjemQhVMTnvcLGoLOdFpCYbz4v4fUo+TfsWG+1aOu70/80RV6bgNpR2JCrppV2moUQkww+6bWxXRL9YMGw==",
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.15.9.tgz",
+ "integrity": "sha512-3Zf2GVGUOI7XwChH3qrnTOSqfV1V4CAc/7zLVm4lO6JT6wbJrTgEYCCiNSzziSju+J9Jhf9YGWk/26quWPC6yQ==",
"dev": true,
"optional": true
},
"esbuild-linux-arm64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.54.tgz",
- "integrity": "sha512-WL71L+0Rwv+Gv/HTmxTEmpv0UgmxYa5ftZILVi2QmZBgX3q7+tDeOQNqGtdXSdsL8TQi1vIaVFHUPDe0O0kdig==",
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.9.tgz",
+ "integrity": "sha512-a+bTtxJmYmk9d+s2W4/R1SYKDDAldOKmWjWP0BnrWtDbvUBNOm++du0ysPju4mZVoEFgS1yLNW+VXnG/4FNwdQ==",
"dev": true,
"optional": true
},
"esbuild-linux-mips64le": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.54.tgz",
- "integrity": "sha512-qTHGQB8D1etd0u1+sB6p0ikLKRVuCWhYQhAHRPkO+OF3I/iSlTKNNS0Lh2Oc0g0UFGguaFZZiPJdJey3AGpAlw==",
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.9.tgz",
+ "integrity": "sha512-Zn9HSylDp89y+TRREMDoGrc3Z4Hs5u56ozZLQCiZAUx2+HdbbXbWdjmw3FdTJ/i7t5Cew6/Q+6kfO3KCcFGlyw==",
"dev": true,
"optional": true
},
"esbuild-linux-ppc64le": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.54.tgz",
- "integrity": "sha512-j3OMlzHiqwZBDPRCDFKcx595XVfOfOnv68Ax3U4UKZ3MTYQB5Yz3X1mn5GnodEVYzhtZgxEBidLWeIs8FDSfrQ==",
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.9.tgz",
+ "integrity": "sha512-OEiOxNAMH9ENFYqRsWUj3CWyN3V8P3ZXyfNAtX5rlCEC/ERXrCEFCJji/1F6POzsXAzxvUJrTSTCy7G6BhA6Fw==",
"dev": true,
"optional": true
},
"esbuild-linux-riscv64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.54.tgz",
- "integrity": "sha512-y7Vt7Wl9dkOGZjxQZnDAqqn+XOqFD7IMWiewY5SPlNlzMX39ocPQlOaoxvT4FllA5viyV26/QzHtvTjVNOxHZg==",
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.9.tgz",
+ "integrity": "sha512-ukm4KsC3QRausEFjzTsOZ/qqazw0YvJsKmfoZZm9QW27OHjk2XKSQGGvx8gIEswft/Sadp03/VZvAaqv5AIwNA==",
"dev": true,
"optional": true
},
"esbuild-linux-s390x": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.54.tgz",
- "integrity": "sha512-zaHpW9dziAsi7lRcyV4r8dhfG1qBidQWUXweUjnw+lliChJqQr+6XD71K41oEIC3Mx1KStovEmlzm+MkGZHnHA==",
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.9.tgz",
+ "integrity": "sha512-uDOQEH55wQ6ahcIKzQr3VyjGc6Po/xblLGLoUk3fVL1qjlZAibtQr6XRfy5wPJLu/M2o0vQKLq4lyJ2r1tWKcw==",
"dev": true,
"optional": true
},
"esbuild-netbsd-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.54.tgz",
- "integrity": "sha512-PR01lmIMnfJTgeU9VJTDY9ZerDWVFIUzAtJuDHwwceppW7cQWjBBqP48NdeRtoP04/AtO9a7w3viI+PIDr6d+w==",
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.9.tgz",
+ "integrity": "sha512-yWgxaYTQz+TqX80wXRq6xAtb7GSBAp6gqLKfOdANg9qEmAI1Bxn04IrQr0Mzm4AhxvGKoHzjHjMgXbCCSSDxcw==",
"dev": true,
"optional": true
},
"esbuild-openbsd-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.54.tgz",
- "integrity": "sha512-Qyk7ikT2o7Wu76UsvvDS5q0amJvmRzDyVlL0qf5VLsLchjCa1+IAvd8kTBgUxD7VBUUVgItLkk609ZHUc1oCaw==",
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.9.tgz",
+ "integrity": "sha512-JmS18acQl4iSAjrEha1MfEmUMN4FcnnrtTaJ7Qg0tDCOcgpPPQRLGsZqhes0vmx8VA6IqRyScqXvaL7+Q0Uf3A==",
"dev": true,
"optional": true
},
"esbuild-sunos-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.54.tgz",
- "integrity": "sha512-28GZ24KmMSeKi5ueWzMcco6EBHStL3B6ubM7M51RmPwXQGLe0teBGJocmWhgwccA1GeFXqxzILIxXpHbl9Q/Kw==",
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.15.9.tgz",
+ "integrity": "sha512-UKynGSWpzkPmXW3D2UMOD9BZPIuRaSqphxSCwScfEE05Be3KAmvjsBhht1fLzKpiFVJb0BYMd4jEbWMyJ/z1hQ==",
"dev": true,
"optional": true
},
"esbuild-windows-32": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.54.tgz",
- "integrity": "sha512-T+rdZW19ql9MjS7pixmZYVObd9G7kcaZo+sETqNH4RCkuuYSuv9AGHUVnPoP9hhuE1WM1ZimHz1CIBHBboLU7w==",
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.15.9.tgz",
+ "integrity": "sha512-aqXvu4/W9XyTVqO/hw3rNxKE1TcZiEYHPsXM9LwYmKSX9/hjvfIJzXwQBlPcJ/QOxedfoMVH0YnhhQ9Ffb0RGA==",
"dev": true,
"optional": true
},
"esbuild-windows-64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.54.tgz",
- "integrity": "sha512-AoHTRBUuYwXtZhjXZbA1pGfTo8cJo3vZIcWGLiUcTNgHpJJMC1rVA44ZereBHMJtotyN71S8Qw0npiCIkW96cQ==",
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.15.9.tgz",
+ "integrity": "sha512-zm7h91WUmlS4idMtjvCrEeNhlH7+TNOmqw5dJPJZrgFaxoFyqYG6CKDpdFCQXdyKpD5yvzaQBOMVTCBVKGZDEg==",
"dev": true,
"optional": true
},
"esbuild-windows-arm64": {
- "version": "0.14.54",
- "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.54.tgz",
- "integrity": "sha512-M0kuUvXhot1zOISQGXwWn6YtS+Y/1RT9WrVIOywZnJHo3jCDyewAc79aKNQWFCQm+xNHVTq9h8dZKvygoXQQRg==",
+ "version": "0.15.9",
+ "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.9.tgz",
+ "integrity": "sha512-yQEVIv27oauAtvtuhJVfSNMztJJX47ismRS6Sv2QMVV9RM+6xjbMWuuwM2nxr5A2/gj/mu2z9YlQxiwoFRCfZA==",
"dev": true,
"optional": true
},
@@ -2859,9 +2885,9 @@
"integrity": "sha512-NNXCmovX7AyFmA1/tLUy6NOQFMe4xU1Qa1LeytMeXY8FT+aWC1epXKYkQe1bnZNa9LB6c0Y5Z/qjv4D6c7Yb0A=="
},
"rollup": {
- "version": "2.77.2",
- "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.77.2.tgz",
- "integrity": "sha512-m/4YzYgLcpMQbxX3NmAqDvwLATZzxt8bIegO78FZLl+lAgKJBd1DRAOeEiZcKOIOPjxE6ewHWHNgGEalFXuz1g==",
+ "version": "2.78.1",
+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.78.1.tgz",
+ "integrity": "sha512-VeeCgtGi4P+o9hIg+xz4qQpRl6R401LWEXBmxYKOV4zlF82lyhgh2hTZnheFUbANE8l2A41F458iwj2vEYaXJg==",
"dev": true,
"requires": {
"fsevents": "~2.3.2"
@@ -2947,16 +2973,16 @@
}
},
"vite": {
- "version": "3.0.5",
- "resolved": "https://registry.npmjs.org/vite/-/vite-3.0.5.tgz",
- "integrity": "sha512-bRvrt9Tw8EGW4jj64aYFTnVg134E8hgDxyl/eEHnxiGqYk7/pTPss6CWlurqPOUzqvEoZkZ58Ws+Iu8MB87iMA==",
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/vite/-/vite-3.1.3.tgz",
+ "integrity": "sha512-/3XWiktaopByM5bd8dqvHxRt5EEgRikevnnrpND0gRfNkrMrPaGGexhtLCzv15RcCMtV2CLw+BPas8YFeSG0KA==",
"dev": true,
"requires": {
- "esbuild": "^0.14.47",
+ "esbuild": "^0.15.6",
"fsevents": "~2.3.2",
"postcss": "^8.4.16",
"resolve": "^1.22.1",
- "rollup": "^2.75.6"
+ "rollup": "~2.78.0"
}
},
"vue": {
diff --git a/package.json b/package.json
index 7112cd0..023a27b 100644
--- a/package.json
+++ b/package.json
@@ -1,8 +1,9 @@
{
"name": "sharee",
"private": false,
- "version": "1.0.1",
- "main": "./dist/src/build.js",
+ "version": "1.0.6",
+ "main": "./dist/build.js",
+ "module": "./dist/build.js",
"types": "./src/lib/main.d.ts",
"type": "module",
"scripts": {
@@ -11,9 +12,10 @@
"preview": "vite preview"
},
"exports": {
- ".": "./dist/src/build.js",
- "./vue": "./dist/src/vue/Sharee.js",
- "./react": "./dist/src/react/Sharee.js"
+ ".": "./dist/sharee.js",
+ "./vue": "./dist/sharee-vue.js",
+ "./react": "./dist/sharee-react.js",
+ "./styles": "./dist/style.css"
},
"devDependencies": {
"@types/lodash.merge": "^4.6.7",
diff --git a/react/index.d.ts b/react/index.d.ts
new file mode 100644
index 0000000..83a7955
--- /dev/null
+++ b/react/index.d.ts
@@ -0,0 +1,6 @@
+import ShareeOptions from "../src/common/ShareeOptions";
+import { FunctionComponent } from "react";
+
+declare const Sharee: FunctionComponent;
+
+export default Sharee;
diff --git a/src/build.ts b/src/build.ts
index 809bc41..4c6c39b 100644
--- a/src/build.ts
+++ b/src/build.ts
@@ -1,3 +1 @@
export {default as default} from "./lib/Sharee"
-export {default as ShareeVue} from './vue/Sharee.vue'
-export {default as ShareeReact} from './react/Sharee'
diff --git a/src/locales/fa.json b/src/locales/fa.json
index 2fda602..3dddfc4 100644
--- a/src/locales/fa.json
+++ b/src/locales/fa.json
@@ -5,5 +5,6 @@
"CopiedSuccessfully": "با موفقیت کپی شد!",
"Whatsapp": "اشتراک در واتساپ",
"Twitter": "اشتراک در توییتر",
- "Linkedin": "اشتراک در لینکدین"
+ "Linkedin": "اشتراک در لینکدین",
+ "Facebook": "اشتراک در فیسبوک"
}
diff --git a/src/react/Sharee.tsx b/src/react/Sharee.tsx
index 17645e3..8db31f7 100644
--- a/src/react/Sharee.tsx
+++ b/src/react/Sharee.tsx
@@ -1,4 +1,4 @@
-import {useEffect, useRef, useState} from "react";
+import {useEffect, useRef} from "react";
import ShareeClass from '../lib/Sharee'
import ShareeOptions from "../common/ShareeOptions";
diff --git a/vite.config.js b/vite.config.js
index 0e2690f..276e0ba 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -14,11 +14,15 @@ export default defineConfig({
formats: ['es']
},
rollupOptions: {
+ input: {
+ 'sharee.js': resolve(__dirname, 'src/build.ts'),
+ 'sharee-vue.js': resolve(__dirname, 'src/vue/Sharee.vue'),
+ 'sharee-react.js': resolve(__dirname, 'src/react/Sharee.tsx')
+ },
// make sure to externalize deps that shouldn't be bundled
// into your library
- external: ['vue', 'react', 'react-dom', 'react-scripts', 'ripple-effects', '@types/react', '@types/react-dom'],
+ external: ['vue', 'react', 'react-dom', 'ripple-effects', 'lodash.merge', 'react/jsx-runtime', '@vitejs/plugin-react'],
output: {
- preserveModules: true,
entryFileNames: ({ name: fileName }) => {
return `${fileName}.js`
},
diff --git a/vue/index.d.ts b/vue/index.d.ts
new file mode 100644
index 0000000..2b84917
--- /dev/null
+++ b/vue/index.d.ts
@@ -0,0 +1,6 @@
+import ShareeOptions from "../src/common/ShareeOptions";
+import {DefineComponent} from "vue";
+
+declare const Sharee: DefineComponent;
+
+export default Sharee;