@jackuait/blok 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +190 -0
- package/README.md +23 -0
- package/dist/blok.mjs +5 -0
- package/dist/blok.umd.js +53 -0
- package/dist/bundle-6e604287.mjs +340 -0
- package/dist/codex-7de6c88e.mjs +15668 -0
- package/dist/vendor.LICENSE.txt +545 -0
- package/package.json +108 -0
- package/types/api/block.d.ts +87 -0
- package/types/api/blocks.d.ts +136 -0
- package/types/api/caret.d.ts +67 -0
- package/types/api/events.d.ts +28 -0
- package/types/api/i18n.d.ts +11 -0
- package/types/api/index.d.ts +17 -0
- package/types/api/inline-toolbar.d.ts +15 -0
- package/types/api/listeners.d.ts +32 -0
- package/types/api/notifier.d.ts +14 -0
- package/types/api/readonly.d.ts +17 -0
- package/types/api/sanitizer.d.ts +14 -0
- package/types/api/saver.d.ts +13 -0
- package/types/api/selection.d.ts +41 -0
- package/types/api/styles.d.ts +44 -0
- package/types/api/toolbar.d.ts +26 -0
- package/types/api/tools.d.ts +11 -0
- package/types/api/tooltip.d.ts +30 -0
- package/types/api/ui.d.ts +24 -0
- package/types/block-tunes/block-tune-data.d.ts +1 -0
- package/types/block-tunes/block-tune.d.ts +60 -0
- package/types/block-tunes/index.d.ts +1 -0
- package/types/configs/conversion-config.ts +26 -0
- package/types/configs/editor-config.d.ts +107 -0
- package/types/configs/i18n-config.d.ts +16 -0
- package/types/configs/i18n-dictionary.d.ts +93 -0
- package/types/configs/index.d.ts +7 -0
- package/types/configs/log-levels.d.ts +9 -0
- package/types/configs/paste-config.d.ts +38 -0
- package/types/configs/sanitizer-config.d.ts +43 -0
- package/types/data-formats/block-data.d.ts +23 -0
- package/types/data-formats/block-id.ts +4 -0
- package/types/data-formats/index.d.ts +2 -0
- package/types/data-formats/output-data.d.ts +46 -0
- package/types/events/block/Base.ts +11 -0
- package/types/events/block/BlockAdded.ts +21 -0
- package/types/events/block/BlockChanged.ts +21 -0
- package/types/events/block/BlockMoved.ts +26 -0
- package/types/events/block/BlockRemoved.ts +21 -0
- package/types/events/block/index.ts +44 -0
- package/types/index.d.ts +191 -0
- package/types/tools/adapters/base-tool-adapter.d.ts +76 -0
- package/types/tools/adapters/block-tool-adapter.d.ts +78 -0
- package/types/tools/adapters/block-tune-adapter.d.ts +14 -0
- package/types/tools/adapters/inline-tool-adapter.d.ts +10 -0
- package/types/tools/adapters/tool-factory.d.ts +5 -0
- package/types/tools/adapters/tool-type.ts +18 -0
- package/types/tools/adapters/tools-collection.d.ts +34 -0
- package/types/tools/block-tool-data.d.ts +5 -0
- package/types/tools/block-tool.d.ts +121 -0
- package/types/tools/hook-events.d.ts +23 -0
- package/types/tools/index.d.ts +16 -0
- package/types/tools/inline-tool.d.ts +37 -0
- package/types/tools/menu-config.d.ts +46 -0
- package/types/tools/paste-events.d.ts +52 -0
- package/types/tools/tool-config.d.ts +4 -0
- package/types/tools/tool-settings.d.ts +79 -0
- package/types/tools/tool.d.ts +65 -0
- package/types/utils/popover/hint.d.ts +29 -0
- package/types/utils/popover/index.d.ts +5 -0
- package/types/utils/popover/popover-event.ts +15 -0
- package/types/utils/popover/popover-item-type.ts +13 -0
- package/types/utils/popover/popover-item.d.ts +253 -0
- package/types/utils/popover/popover.d.ts +112 -0
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
import { g as P } from "./codex-7de6c88e.mjs";
|
|
2
|
+
function $(C, R) {
|
|
3
|
+
for (var m = 0; m < R.length; m++) {
|
|
4
|
+
const y = R[m];
|
|
5
|
+
if (typeof y != "string" && !Array.isArray(y)) {
|
|
6
|
+
for (const i in y)
|
|
7
|
+
if (i !== "default" && !(i in C)) {
|
|
8
|
+
const e = Object.getOwnPropertyDescriptor(y, i);
|
|
9
|
+
e && Object.defineProperty(C, i, e.get ? e : {
|
|
10
|
+
enumerable: !0,
|
|
11
|
+
get: () => y[i]
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return Object.freeze(Object.defineProperty(C, Symbol.toStringTag, { value: "Module" }));
|
|
17
|
+
}
|
|
18
|
+
var M = {}, z = {
|
|
19
|
+
get exports() {
|
|
20
|
+
return M;
|
|
21
|
+
},
|
|
22
|
+
set exports(C) {
|
|
23
|
+
M = C;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
(function(C, R) {
|
|
27
|
+
(function(m, y) {
|
|
28
|
+
C.exports = y();
|
|
29
|
+
})(window, function() {
|
|
30
|
+
return function(m) {
|
|
31
|
+
var y = {};
|
|
32
|
+
function i(e) {
|
|
33
|
+
if (y[e])
|
|
34
|
+
return y[e].exports;
|
|
35
|
+
var r = y[e] = { i: e, l: !1, exports: {} };
|
|
36
|
+
return m[e].call(r.exports, r, r.exports, i), r.l = !0, r.exports;
|
|
37
|
+
}
|
|
38
|
+
return i.m = m, i.c = y, i.d = function(e, r, s) {
|
|
39
|
+
i.o(e, r) || Object.defineProperty(e, r, { enumerable: !0, get: s });
|
|
40
|
+
}, i.r = function(e) {
|
|
41
|
+
typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e, "__esModule", { value: !0 });
|
|
42
|
+
}, i.t = function(e, r) {
|
|
43
|
+
if (1 & r && (e = i(e)), 8 & r || 4 & r && typeof e == "object" && e && e.__esModule)
|
|
44
|
+
return e;
|
|
45
|
+
var s = /* @__PURE__ */ Object.create(null);
|
|
46
|
+
if (i.r(s), Object.defineProperty(s, "default", { enumerable: !0, value: e }), 2 & r && typeof e != "string")
|
|
47
|
+
for (var x in e)
|
|
48
|
+
i.d(s, x, function(u) {
|
|
49
|
+
return e[u];
|
|
50
|
+
}.bind(null, x));
|
|
51
|
+
return s;
|
|
52
|
+
}, i.n = function(e) {
|
|
53
|
+
var r = e && e.__esModule ? function() {
|
|
54
|
+
return e.default;
|
|
55
|
+
} : function() {
|
|
56
|
+
return e;
|
|
57
|
+
};
|
|
58
|
+
return i.d(r, "a", r), r;
|
|
59
|
+
}, i.o = function(e, r) {
|
|
60
|
+
return Object.prototype.hasOwnProperty.call(e, r);
|
|
61
|
+
}, i.p = "/", i(i.s = 0);
|
|
62
|
+
}([function(m, y, i) {
|
|
63
|
+
i(1), /*!
|
|
64
|
+
* Codex JavaScript Notification module
|
|
65
|
+
* https://github.com/codex-team/js-notifier
|
|
66
|
+
*/
|
|
67
|
+
m.exports = function() {
|
|
68
|
+
var e = i(6), r = "cdx-notify--bounce-in", s = null;
|
|
69
|
+
return { show: function(x) {
|
|
70
|
+
if (x.message) {
|
|
71
|
+
(function() {
|
|
72
|
+
if (s)
|
|
73
|
+
return !0;
|
|
74
|
+
s = e.getWrapper(), document.body.appendChild(s);
|
|
75
|
+
})();
|
|
76
|
+
var u = null, g = x.time || 8e3;
|
|
77
|
+
switch (x.type) {
|
|
78
|
+
case "confirm":
|
|
79
|
+
u = e.confirm(x);
|
|
80
|
+
break;
|
|
81
|
+
case "prompt":
|
|
82
|
+
u = e.prompt(x);
|
|
83
|
+
break;
|
|
84
|
+
default:
|
|
85
|
+
u = e.alert(x), window.setTimeout(function() {
|
|
86
|
+
u.remove();
|
|
87
|
+
}, g);
|
|
88
|
+
}
|
|
89
|
+
s.appendChild(u), u.classList.add(r);
|
|
90
|
+
}
|
|
91
|
+
} };
|
|
92
|
+
}();
|
|
93
|
+
}, function(m, y, i) {
|
|
94
|
+
var e = i(2);
|
|
95
|
+
typeof e == "string" && (e = [[m.i, e, ""]]);
|
|
96
|
+
var r = { hmr: !0, transform: void 0, insertInto: void 0 };
|
|
97
|
+
i(4)(e, r), e.locals && (m.exports = e.locals);
|
|
98
|
+
}, function(m, y, i) {
|
|
99
|
+
(m.exports = i(3)(!1)).push([m.i, `.cdx-notify--error{background:#fffbfb!important}.cdx-notify--error::before{background:#fb5d5d!important}.cdx-notify__input{max-width:130px;padding:5px 10px;background:#f7f7f7;border:0;border-radius:3px;font-size:13px;color:#656b7c;outline:0}.cdx-notify__input:-ms-input-placeholder{color:#656b7c}.cdx-notify__input::placeholder{color:#656b7c}.cdx-notify__input:focus:-ms-input-placeholder{color:rgba(101,107,124,.3)}.cdx-notify__input:focus::placeholder{color:rgba(101,107,124,.3)}.cdx-notify__button{border:none;border-radius:3px;font-size:13px;padding:5px 10px;cursor:pointer}.cdx-notify__button:last-child{margin-left:10px}.cdx-notify__button--cancel{background:#f2f5f7;box-shadow:0 2px 1px 0 rgba(16,19,29,0);color:#656b7c}.cdx-notify__button--cancel:hover{background:#eee}.cdx-notify__button--confirm{background:#34c992;box-shadow:0 1px 1px 0 rgba(18,49,35,.05);color:#fff}.cdx-notify__button--confirm:hover{background:#33b082}.cdx-notify__btns-wrapper{display:-ms-flexbox;display:flex;-ms-flex-flow:row nowrap;flex-flow:row nowrap;margin-top:5px}.cdx-notify__cross{position:absolute;top:5px;right:5px;width:10px;height:10px;padding:5px;opacity:.54;cursor:pointer}.cdx-notify__cross::after,.cdx-notify__cross::before{content:'';position:absolute;left:9px;top:5px;height:12px;width:2px;background:#575d67}.cdx-notify__cross::before{transform:rotate(-45deg)}.cdx-notify__cross::after{transform:rotate(45deg)}.cdx-notify__cross:hover{opacity:1}.cdx-notifies{position:fixed;z-index:2;bottom:20px;left:20px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif}.cdx-notify{position:relative;width:220px;margin-top:15px;padding:13px 16px;background:#fff;box-shadow:0 11px 17px 0 rgba(23,32,61,.13);border-radius:5px;font-size:14px;line-height:1.4em;word-wrap:break-word}.cdx-notify::before{content:'';position:absolute;display:block;top:0;left:0;width:3px;height:calc(100% - 6px);margin:3px;border-radius:5px;background:0 0}@keyframes bounceIn{0%{opacity:0;transform:scale(.3)}50%{opacity:1;transform:scale(1.05)}70%{transform:scale(.9)}100%{transform:scale(1)}}.cdx-notify--bounce-in{animation-name:bounceIn;animation-duration:.6s;animation-iteration-count:1}.cdx-notify--success{background:#fafffe!important}.cdx-notify--success::before{background:#41ffb1!important}`, ""]);
|
|
100
|
+
}, function(m, y) {
|
|
101
|
+
m.exports = function(i) {
|
|
102
|
+
var e = [];
|
|
103
|
+
return e.toString = function() {
|
|
104
|
+
return this.map(function(r) {
|
|
105
|
+
var s = function(x, u) {
|
|
106
|
+
var g = x[1] || "", l = x[3];
|
|
107
|
+
if (!l)
|
|
108
|
+
return g;
|
|
109
|
+
if (u && typeof btoa == "function") {
|
|
110
|
+
var L = (d = l, "/*# sourceMappingURL=data:application/json;charset=utf-8;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(d)))) + " */"), E = l.sources.map(function(p) {
|
|
111
|
+
return "/*# sourceURL=" + l.sourceRoot + p + " */";
|
|
112
|
+
});
|
|
113
|
+
return [g].concat(E).concat([L]).join(`
|
|
114
|
+
`);
|
|
115
|
+
}
|
|
116
|
+
var d;
|
|
117
|
+
return [g].join(`
|
|
118
|
+
`);
|
|
119
|
+
}(r, i);
|
|
120
|
+
return r[2] ? "@media " + r[2] + "{" + s + "}" : s;
|
|
121
|
+
}).join("");
|
|
122
|
+
}, e.i = function(r, s) {
|
|
123
|
+
typeof r == "string" && (r = [[null, r, ""]]);
|
|
124
|
+
for (var x = {}, u = 0; u < this.length; u++) {
|
|
125
|
+
var g = this[u][0];
|
|
126
|
+
typeof g == "number" && (x[g] = !0);
|
|
127
|
+
}
|
|
128
|
+
for (u = 0; u < r.length; u++) {
|
|
129
|
+
var l = r[u];
|
|
130
|
+
typeof l[0] == "number" && x[l[0]] || (s && !l[2] ? l[2] = s : s && (l[2] = "(" + l[2] + ") and (" + s + ")"), e.push(l));
|
|
131
|
+
}
|
|
132
|
+
}, e;
|
|
133
|
+
};
|
|
134
|
+
}, function(m, y, i) {
|
|
135
|
+
var e, r, s = {}, x = (e = function() {
|
|
136
|
+
return window && document && document.all && !window.atob;
|
|
137
|
+
}, function() {
|
|
138
|
+
return r === void 0 && (r = e.apply(this, arguments)), r;
|
|
139
|
+
}), u = function(n) {
|
|
140
|
+
var t = {};
|
|
141
|
+
return function(o) {
|
|
142
|
+
if (typeof o == "function")
|
|
143
|
+
return o();
|
|
144
|
+
if (t[o] === void 0) {
|
|
145
|
+
var a = function(b) {
|
|
146
|
+
return document.querySelector(b);
|
|
147
|
+
}.call(this, o);
|
|
148
|
+
if (window.HTMLIFrameElement && a instanceof window.HTMLIFrameElement)
|
|
149
|
+
try {
|
|
150
|
+
a = a.contentDocument.head;
|
|
151
|
+
} catch {
|
|
152
|
+
a = null;
|
|
153
|
+
}
|
|
154
|
+
t[o] = a;
|
|
155
|
+
}
|
|
156
|
+
return t[o];
|
|
157
|
+
};
|
|
158
|
+
}(), g = null, l = 0, L = [], E = i(5);
|
|
159
|
+
function d(n, t) {
|
|
160
|
+
for (var o = 0; o < n.length; o++) {
|
|
161
|
+
var a = n[o], b = s[a.id];
|
|
162
|
+
if (b) {
|
|
163
|
+
b.refs++;
|
|
164
|
+
for (var f = 0; f < b.parts.length; f++)
|
|
165
|
+
b.parts[f](a.parts[f]);
|
|
166
|
+
for (; f < a.parts.length; f++)
|
|
167
|
+
b.parts.push(j(a.parts[f], t));
|
|
168
|
+
} else {
|
|
169
|
+
var _ = [];
|
|
170
|
+
for (f = 0; f < a.parts.length; f++)
|
|
171
|
+
_.push(j(a.parts[f], t));
|
|
172
|
+
s[a.id] = { id: a.id, refs: 1, parts: _ };
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
function p(n, t) {
|
|
177
|
+
for (var o = [], a = {}, b = 0; b < n.length; b++) {
|
|
178
|
+
var f = n[b], _ = t.base ? f[0] + t.base : f[0], c = { css: f[1], media: f[2], sourceMap: f[3] };
|
|
179
|
+
a[_] ? a[_].parts.push(c) : o.push(a[_] = { id: _, parts: [c] });
|
|
180
|
+
}
|
|
181
|
+
return o;
|
|
182
|
+
}
|
|
183
|
+
function w(n, t) {
|
|
184
|
+
var o = u(n.insertInto);
|
|
185
|
+
if (!o)
|
|
186
|
+
throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");
|
|
187
|
+
var a = L[L.length - 1];
|
|
188
|
+
if (n.insertAt === "top")
|
|
189
|
+
a ? a.nextSibling ? o.insertBefore(t, a.nextSibling) : o.appendChild(t) : o.insertBefore(t, o.firstChild), L.push(t);
|
|
190
|
+
else if (n.insertAt === "bottom")
|
|
191
|
+
o.appendChild(t);
|
|
192
|
+
else {
|
|
193
|
+
if (typeof n.insertAt != "object" || !n.insertAt.before)
|
|
194
|
+
throw new Error(`[Style Loader]
|
|
195
|
+
|
|
196
|
+
Invalid value for parameter 'insertAt' ('options.insertAt') found.
|
|
197
|
+
Must be 'top', 'bottom', or Object.
|
|
198
|
+
(https://github.com/webpack-contrib/style-loader#insertat)
|
|
199
|
+
`);
|
|
200
|
+
var b = u(n.insertInto + " " + n.insertAt.before);
|
|
201
|
+
o.insertBefore(t, b);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
function v(n) {
|
|
205
|
+
if (n.parentNode === null)
|
|
206
|
+
return !1;
|
|
207
|
+
n.parentNode.removeChild(n);
|
|
208
|
+
var t = L.indexOf(n);
|
|
209
|
+
t >= 0 && L.splice(t, 1);
|
|
210
|
+
}
|
|
211
|
+
function h(n) {
|
|
212
|
+
var t = document.createElement("style");
|
|
213
|
+
return n.attrs.type === void 0 && (n.attrs.type = "text/css"), T(t, n.attrs), w(n, t), t;
|
|
214
|
+
}
|
|
215
|
+
function T(n, t) {
|
|
216
|
+
Object.keys(t).forEach(function(o) {
|
|
217
|
+
n.setAttribute(o, t[o]);
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
function j(n, t) {
|
|
221
|
+
var o, a, b, f;
|
|
222
|
+
if (t.transform && n.css) {
|
|
223
|
+
if (!(f = t.transform(n.css)))
|
|
224
|
+
return function() {
|
|
225
|
+
};
|
|
226
|
+
n.css = f;
|
|
227
|
+
}
|
|
228
|
+
if (t.singleton) {
|
|
229
|
+
var _ = l++;
|
|
230
|
+
o = g || (g = h(t)), a = A.bind(null, o, _, !1), b = A.bind(null, o, _, !0);
|
|
231
|
+
} else
|
|
232
|
+
n.sourceMap && typeof URL == "function" && typeof URL.createObjectURL == "function" && typeof URL.revokeObjectURL == "function" && typeof Blob == "function" && typeof btoa == "function" ? (o = function(c) {
|
|
233
|
+
var k = document.createElement("link");
|
|
234
|
+
return c.attrs.type === void 0 && (c.attrs.type = "text/css"), c.attrs.rel = "stylesheet", T(k, c.attrs), w(c, k), k;
|
|
235
|
+
}(t), a = function(c, k, U) {
|
|
236
|
+
var S = U.css, I = U.sourceMap, N = k.convertToAbsoluteUrls === void 0 && I;
|
|
237
|
+
(k.convertToAbsoluteUrls || N) && (S = E(S)), I && (S += `
|
|
238
|
+
/*# sourceMappingURL=data:application/json;base64,` + btoa(unescape(encodeURIComponent(JSON.stringify(I)))) + " */");
|
|
239
|
+
var D = new Blob([S], { type: "text/css" }), H = c.href;
|
|
240
|
+
c.href = URL.createObjectURL(D), H && URL.revokeObjectURL(H);
|
|
241
|
+
}.bind(null, o, t), b = function() {
|
|
242
|
+
v(o), o.href && URL.revokeObjectURL(o.href);
|
|
243
|
+
}) : (o = h(t), a = function(c, k) {
|
|
244
|
+
var U = k.css, S = k.media;
|
|
245
|
+
if (S && c.setAttribute("media", S), c.styleSheet)
|
|
246
|
+
c.styleSheet.cssText = U;
|
|
247
|
+
else {
|
|
248
|
+
for (; c.firstChild; )
|
|
249
|
+
c.removeChild(c.firstChild);
|
|
250
|
+
c.appendChild(document.createTextNode(U));
|
|
251
|
+
}
|
|
252
|
+
}.bind(null, o), b = function() {
|
|
253
|
+
v(o);
|
|
254
|
+
});
|
|
255
|
+
return a(n), function(c) {
|
|
256
|
+
if (c) {
|
|
257
|
+
if (c.css === n.css && c.media === n.media && c.sourceMap === n.sourceMap)
|
|
258
|
+
return;
|
|
259
|
+
a(n = c);
|
|
260
|
+
} else
|
|
261
|
+
b();
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
m.exports = function(n, t) {
|
|
265
|
+
if (typeof DEBUG < "u" && DEBUG && typeof document != "object")
|
|
266
|
+
throw new Error("The style-loader cannot be used in a non-browser environment");
|
|
267
|
+
(t = t || {}).attrs = typeof t.attrs == "object" ? t.attrs : {}, t.singleton || typeof t.singleton == "boolean" || (t.singleton = x()), t.insertInto || (t.insertInto = "head"), t.insertAt || (t.insertAt = "bottom");
|
|
268
|
+
var o = p(n, t);
|
|
269
|
+
return d(o, t), function(a) {
|
|
270
|
+
for (var b = [], f = 0; f < o.length; f++) {
|
|
271
|
+
var _ = o[f];
|
|
272
|
+
(c = s[_.id]).refs--, b.push(c);
|
|
273
|
+
}
|
|
274
|
+
for (a && d(p(a, t), t), f = 0; f < b.length; f++) {
|
|
275
|
+
var c;
|
|
276
|
+
if ((c = b[f]).refs === 0) {
|
|
277
|
+
for (var k = 0; k < c.parts.length; k++)
|
|
278
|
+
c.parts[k]();
|
|
279
|
+
delete s[c.id];
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
};
|
|
283
|
+
};
|
|
284
|
+
var O, B = (O = [], function(n, t) {
|
|
285
|
+
return O[n] = t, O.filter(Boolean).join(`
|
|
286
|
+
`);
|
|
287
|
+
});
|
|
288
|
+
function A(n, t, o, a) {
|
|
289
|
+
var b = o ? "" : a.css;
|
|
290
|
+
if (n.styleSheet)
|
|
291
|
+
n.styleSheet.cssText = B(t, b);
|
|
292
|
+
else {
|
|
293
|
+
var f = document.createTextNode(b), _ = n.childNodes;
|
|
294
|
+
_[t] && n.removeChild(_[t]), _.length ? n.insertBefore(f, _[t]) : n.appendChild(f);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}, function(m, y) {
|
|
298
|
+
m.exports = function(i) {
|
|
299
|
+
var e = typeof window < "u" && window.location;
|
|
300
|
+
if (!e)
|
|
301
|
+
throw new Error("fixUrls requires window.location");
|
|
302
|
+
if (!i || typeof i != "string")
|
|
303
|
+
return i;
|
|
304
|
+
var r = e.protocol + "//" + e.host, s = r + e.pathname.replace(/\/[^\/]*$/, "/");
|
|
305
|
+
return i.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi, function(x, u) {
|
|
306
|
+
var g, l = u.trim().replace(/^"(.*)"$/, function(L, E) {
|
|
307
|
+
return E;
|
|
308
|
+
}).replace(/^'(.*)'$/, function(L, E) {
|
|
309
|
+
return E;
|
|
310
|
+
});
|
|
311
|
+
return /^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(l) ? x : (g = l.indexOf("//") === 0 ? l : l.indexOf("/") === 0 ? r + l : s + l.replace(/^\.\//, ""), "url(" + JSON.stringify(g) + ")");
|
|
312
|
+
});
|
|
313
|
+
};
|
|
314
|
+
}, function(m, y, i) {
|
|
315
|
+
var e, r, s, x, u, g, l, L, E;
|
|
316
|
+
m.exports = (e = "cdx-notifies", r = "cdx-notify", s = "cdx-notify__cross", x = "cdx-notify__button--confirm", u = "cdx-notify__button--cancel", g = "cdx-notify__input", l = "cdx-notify__button", L = "cdx-notify__btns-wrapper", { alert: E = function(d) {
|
|
317
|
+
var p = document.createElement("DIV"), w = document.createElement("DIV"), v = d.message, h = d.style;
|
|
318
|
+
return p.classList.add(r), h && p.classList.add(r + "--" + h), p.innerHTML = v, w.classList.add(s), w.addEventListener("click", p.remove.bind(p)), p.appendChild(w), p;
|
|
319
|
+
}, confirm: function(d) {
|
|
320
|
+
var p = E(d), w = document.createElement("div"), v = document.createElement("button"), h = document.createElement("button"), T = p.querySelector("." + s), j = d.cancelHandler, O = d.okHandler;
|
|
321
|
+
return w.classList.add(L), v.innerHTML = d.okText || "Confirm", h.innerHTML = d.cancelText || "Cancel", v.classList.add(l), h.classList.add(l), v.classList.add(x), h.classList.add(u), j && typeof j == "function" && (h.addEventListener("click", j), T.addEventListener("click", j)), O && typeof O == "function" && v.addEventListener("click", O), v.addEventListener("click", p.remove.bind(p)), h.addEventListener("click", p.remove.bind(p)), w.appendChild(v), w.appendChild(h), p.appendChild(w), p;
|
|
322
|
+
}, prompt: function(d) {
|
|
323
|
+
var p = E(d), w = document.createElement("div"), v = document.createElement("button"), h = document.createElement("input"), T = p.querySelector("." + s), j = d.cancelHandler, O = d.okHandler;
|
|
324
|
+
return w.classList.add(L), v.innerHTML = d.okText || "Ok", v.classList.add(l), v.classList.add(x), h.classList.add(g), d.placeholder && h.setAttribute("placeholder", d.placeholder), d.default && (h.value = d.default), d.inputType && (h.type = d.inputType), j && typeof j == "function" && T.addEventListener("click", j), O && typeof O == "function" && v.addEventListener("click", function() {
|
|
325
|
+
O(h.value);
|
|
326
|
+
}), v.addEventListener("click", p.remove.bind(p)), w.appendChild(h), w.appendChild(v), p.appendChild(w), p;
|
|
327
|
+
}, getWrapper: function() {
|
|
328
|
+
var d = document.createElement("DIV");
|
|
329
|
+
return d.classList.add(e), d;
|
|
330
|
+
} });
|
|
331
|
+
}]);
|
|
332
|
+
});
|
|
333
|
+
})(z);
|
|
334
|
+
const F = /* @__PURE__ */ P(M), J = /* @__PURE__ */ $({
|
|
335
|
+
__proto__: null,
|
|
336
|
+
default: F
|
|
337
|
+
}, [M]);
|
|
338
|
+
export {
|
|
339
|
+
J as b
|
|
340
|
+
};
|