fec-dev-designer 1.0.0 → 1.0.2

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.
@@ -0,0 +1,5 @@
1
+ const t = "devtools-plugin:setup", s = "plugin:settings:set";
2
+ export {
3
+ s as HOOK_PLUGIN_SETTINGS_SET,
4
+ t as HOOK_SETUP
5
+ };
@@ -0,0 +1,12 @@
1
+ function e() {
2
+ return o().__VUE_DEVTOOLS_GLOBAL_HOOK__;
3
+ }
4
+ function o() {
5
+ return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
6
+ }
7
+ const n = typeof Proxy == "function";
8
+ export {
9
+ e as getDevtoolsGlobalHook,
10
+ o as getTarget,
11
+ n as isProxyAvailable
12
+ };
@@ -0,0 +1,19 @@
1
+ import { isProxyAvailable as s, getTarget as n, getDevtoolsGlobalHook as P } from "./env.js";
2
+ import { HOOK_SETUP as a } from "./const.js";
3
+ import { ApiProxy as E } from "./proxy.js";
4
+ function m(i, o) {
5
+ const t = i, _ = n(), r = P(), l = s && t.enableEarlyProxy;
6
+ if (r && (_.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !l))
7
+ r.emit(a, i, o);
8
+ else {
9
+ const e = l ? new E(t, r) : null;
10
+ (_.__VUE_DEVTOOLS_PLUGINS__ = _.__VUE_DEVTOOLS_PLUGINS__ || []).push({
11
+ pluginDescriptor: t,
12
+ setupFn: o,
13
+ proxy: e
14
+ }), e && o(e.proxiedTarget);
15
+ }
16
+ }
17
+ export {
18
+ m as setupDevtoolsPlugin
19
+ };
@@ -0,0 +1,67 @@
1
+ import { HOOK_PLUGIN_SETTINGS_SET as h } from "./const.js";
2
+ import { now as u } from "./time.js";
3
+ class d {
4
+ constructor(i, s) {
5
+ this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = i, this.hook = s;
6
+ const a = {};
7
+ if (i.settings)
8
+ for (const e in i.settings) {
9
+ const t = i.settings[e];
10
+ a[e] = t.defaultValue;
11
+ }
12
+ const o = `__vue-devtools-plugin-settings__${i.id}`;
13
+ let n = Object.assign({}, a);
14
+ try {
15
+ const e = localStorage.getItem(o), t = JSON.parse(e);
16
+ Object.assign(n, t);
17
+ } catch {
18
+ }
19
+ this.fallbacks = {
20
+ getSettings() {
21
+ return n;
22
+ },
23
+ setSettings(e) {
24
+ try {
25
+ localStorage.setItem(o, JSON.stringify(e));
26
+ } catch {
27
+ }
28
+ n = e;
29
+ },
30
+ now() {
31
+ return u();
32
+ }
33
+ }, s && s.on(h, (e, t) => {
34
+ e === this.plugin.id && this.fallbacks.setSettings(t);
35
+ }), this.proxiedOn = new Proxy({}, {
36
+ get: (e, t) => this.target ? this.target.on[t] : (...r) => {
37
+ this.onQueue.push({
38
+ method: t,
39
+ args: r
40
+ });
41
+ }
42
+ }), this.proxiedTarget = new Proxy({}, {
43
+ get: (e, t) => this.target ? this.target[t] : t === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(t) ? (...r) => (this.targetQueue.push({
44
+ method: t,
45
+ args: r,
46
+ resolve: () => {
47
+ }
48
+ }), this.fallbacks[t](...r)) : (...r) => new Promise((g) => {
49
+ this.targetQueue.push({
50
+ method: t,
51
+ args: r,
52
+ resolve: g
53
+ });
54
+ })
55
+ });
56
+ }
57
+ async setRealTarget(i) {
58
+ this.target = i;
59
+ for (const s of this.onQueue)
60
+ this.target.on[s.method](...s.args);
61
+ for (const s of this.targetQueue)
62
+ s.resolve(await this.target[s.method](...s.args));
63
+ }
64
+ }
65
+ export {
66
+ d as ApiProxy
67
+ };
@@ -0,0 +1,12 @@
1
+ let e, n;
2
+ function r() {
3
+ var o;
4
+ return e !== void 0 || (typeof window < "u" && window.performance ? (e = !0, n = window.performance) : typeof globalThis < "u" && (!((o = globalThis.perf_hooks) === null || o === void 0) && o.performance) ? (e = !0, n = globalThis.perf_hooks.performance) : e = !1), e;
5
+ }
6
+ function f() {
7
+ return r() ? n.now() : Date.now();
8
+ }
9
+ export {
10
+ r as isPerformanceSupported,
11
+ f as now
12
+ };
@@ -0,0 +1,4 @@
1
+ const e = "";
2
+ export {
3
+ e as default
4
+ };