@uniformdev/canvas 19.198.2-alpha.0 → 19.198.3-alpha.5
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/dist/index.esm.js +27 -1
- package/dist/index.js +27 -1
- package/dist/index.mjs +27 -1
- package/package.json +5 -5
package/dist/index.esm.js
CHANGED
@@ -2705,8 +2705,34 @@ var createCanvasChannel = ({
|
|
2705
2705
|
};
|
2706
2706
|
|
2707
2707
|
// src/preview/createEventBus.ts
|
2708
|
+
var PUSHER_SRC = "https://js.pusher.com/7.0.3/pusher.min.js";
|
2709
|
+
async function loadPusher() {
|
2710
|
+
if (typeof document === "undefined" || typeof window === "undefined") {
|
2711
|
+
return;
|
2712
|
+
}
|
2713
|
+
if (window.Pusher) {
|
2714
|
+
return window.Pusher;
|
2715
|
+
}
|
2716
|
+
return new Promise((resolve, reject) => {
|
2717
|
+
const timeout = setTimeout(() => {
|
2718
|
+
if (window.Pusher) {
|
2719
|
+
resolve(window.Pusher);
|
2720
|
+
}
|
2721
|
+
reject(
|
2722
|
+
`Unable to load pusher.js; Uniform Canvas live preview disabled. Consider adding <script src="${PUSHER_SRC}"></script> manually.`
|
2723
|
+
);
|
2724
|
+
}, 5e3);
|
2725
|
+
const pusher = document.createElement("script");
|
2726
|
+
pusher.src = PUSHER_SRC;
|
2727
|
+
pusher.addEventListener("load", () => {
|
2728
|
+
clearTimeout(timeout);
|
2729
|
+
resolve(window.Pusher);
|
2730
|
+
});
|
2731
|
+
document.head.appendChild(pusher);
|
2732
|
+
});
|
2733
|
+
}
|
2708
2734
|
async function createEventBus() {
|
2709
|
-
const WindowPusher =
|
2735
|
+
const WindowPusher = await loadPusher();
|
2710
2736
|
if (!WindowPusher) {
|
2711
2737
|
return;
|
2712
2738
|
}
|
package/dist/index.js
CHANGED
@@ -2863,8 +2863,34 @@ var createCanvasChannel = ({
|
|
2863
2863
|
};
|
2864
2864
|
|
2865
2865
|
// src/preview/createEventBus.ts
|
2866
|
+
var PUSHER_SRC = "https://js.pusher.com/7.0.3/pusher.min.js";
|
2867
|
+
async function loadPusher() {
|
2868
|
+
if (typeof document === "undefined" || typeof window === "undefined") {
|
2869
|
+
return;
|
2870
|
+
}
|
2871
|
+
if (window.Pusher) {
|
2872
|
+
return window.Pusher;
|
2873
|
+
}
|
2874
|
+
return new Promise((resolve, reject) => {
|
2875
|
+
const timeout = setTimeout(() => {
|
2876
|
+
if (window.Pusher) {
|
2877
|
+
resolve(window.Pusher);
|
2878
|
+
}
|
2879
|
+
reject(
|
2880
|
+
`Unable to load pusher.js; Uniform Canvas live preview disabled. Consider adding <script src="${PUSHER_SRC}"></script> manually.`
|
2881
|
+
);
|
2882
|
+
}, 5e3);
|
2883
|
+
const pusher = document.createElement("script");
|
2884
|
+
pusher.src = PUSHER_SRC;
|
2885
|
+
pusher.addEventListener("load", () => {
|
2886
|
+
clearTimeout(timeout);
|
2887
|
+
resolve(window.Pusher);
|
2888
|
+
});
|
2889
|
+
document.head.appendChild(pusher);
|
2890
|
+
});
|
2891
|
+
}
|
2866
2892
|
async function createEventBus() {
|
2867
|
-
const WindowPusher =
|
2893
|
+
const WindowPusher = await loadPusher();
|
2868
2894
|
if (!WindowPusher) {
|
2869
2895
|
return;
|
2870
2896
|
}
|
package/dist/index.mjs
CHANGED
@@ -2705,8 +2705,34 @@ var createCanvasChannel = ({
|
|
2705
2705
|
};
|
2706
2706
|
|
2707
2707
|
// src/preview/createEventBus.ts
|
2708
|
+
var PUSHER_SRC = "https://js.pusher.com/7.0.3/pusher.min.js";
|
2709
|
+
async function loadPusher() {
|
2710
|
+
if (typeof document === "undefined" || typeof window === "undefined") {
|
2711
|
+
return;
|
2712
|
+
}
|
2713
|
+
if (window.Pusher) {
|
2714
|
+
return window.Pusher;
|
2715
|
+
}
|
2716
|
+
return new Promise((resolve, reject) => {
|
2717
|
+
const timeout = setTimeout(() => {
|
2718
|
+
if (window.Pusher) {
|
2719
|
+
resolve(window.Pusher);
|
2720
|
+
}
|
2721
|
+
reject(
|
2722
|
+
`Unable to load pusher.js; Uniform Canvas live preview disabled. Consider adding <script src="${PUSHER_SRC}"></script> manually.`
|
2723
|
+
);
|
2724
|
+
}, 5e3);
|
2725
|
+
const pusher = document.createElement("script");
|
2726
|
+
pusher.src = PUSHER_SRC;
|
2727
|
+
pusher.addEventListener("load", () => {
|
2728
|
+
clearTimeout(timeout);
|
2729
|
+
resolve(window.Pusher);
|
2730
|
+
});
|
2731
|
+
document.head.appendChild(pusher);
|
2732
|
+
});
|
2733
|
+
}
|
2708
2734
|
async function createEventBus() {
|
2709
|
-
const WindowPusher =
|
2735
|
+
const WindowPusher = await loadPusher();
|
2710
2736
|
if (!WindowPusher) {
|
2711
2737
|
return;
|
2712
2738
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@uniformdev/canvas",
|
3
|
-
"version": "19.198.
|
3
|
+
"version": "19.198.3-alpha.5+c37bbd4ef2",
|
4
4
|
"description": "Common functionality and types for Uniform Canvas",
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
6
6
|
"main": "./dist/index.js",
|
@@ -38,9 +38,9 @@
|
|
38
38
|
"pusher-js": "8.2.0"
|
39
39
|
},
|
40
40
|
"dependencies": {
|
41
|
-
"@uniformdev/assets": "19.198.
|
42
|
-
"@uniformdev/context": "19.198.
|
43
|
-
"@uniformdev/richtext": "19.198.
|
41
|
+
"@uniformdev/assets": "19.198.3-alpha.5+c37bbd4ef2",
|
42
|
+
"@uniformdev/context": "19.198.3-alpha.5+c37bbd4ef2",
|
43
|
+
"@uniformdev/richtext": "19.198.3-alpha.5+c37bbd4ef2",
|
44
44
|
"immer": "10.1.1"
|
45
45
|
},
|
46
46
|
"files": [
|
@@ -49,5 +49,5 @@
|
|
49
49
|
"publishConfig": {
|
50
50
|
"access": "public"
|
51
51
|
},
|
52
|
-
"gitHead": "
|
52
|
+
"gitHead": "c37bbd4ef2353582b4125b9dd21599634ecd5165"
|
53
53
|
}
|