microboard-ui-temp 0.0.36 → 0.0.38
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/board.html +3 -3
- package/dist/customWebComponents.js +6 -6
- package/dist/index.js +17 -11
- package/package.json +2 -2
package/dist/board.html
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<link
|
|
12
12
|
rel="stylesheet"
|
|
13
13
|
crossorigin
|
|
14
|
-
href="https://unpkg.com/microboard-ui-temp@0.0.
|
|
14
|
+
href="https://unpkg.com/microboard-ui-temp@0.0.38/dist/board.css"
|
|
15
15
|
/>
|
|
16
16
|
<body style="overflow-x: hidden; overflow-y: hidden">
|
|
17
17
|
<div id="items">
|
|
@@ -84,11 +84,11 @@
|
|
|
84
84
|
</div>
|
|
85
85
|
<script
|
|
86
86
|
type="module"
|
|
87
|
-
src="https://unpkg.com/microboard-ui-temp@0.0.
|
|
87
|
+
src="https://unpkg.com/microboard-ui-temp@0.0.38/dist/customWebComponents.js"
|
|
88
88
|
></script>
|
|
89
89
|
<script
|
|
90
90
|
defer
|
|
91
|
-
src="https://unpkg.com/microboard-ui-temp@0.0.
|
|
91
|
+
src="https://unpkg.com/microboard-ui-temp@0.0.38/dist/loadLinksImages.js"
|
|
92
92
|
></script>
|
|
93
93
|
</body>
|
|
94
94
|
</head>
|
|
@@ -275,9 +275,9 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
|
275
275
|
translateY = 0;
|
|
276
276
|
scale = 1;
|
|
277
277
|
updateTransform();
|
|
278
|
-
const { initInter } = await import("https://www.unpkg.com/microboard-ui-temp@0.0.
|
|
278
|
+
const { initInter } = await import("https://www.unpkg.com/microboard-ui-temp@0.0.38/dist/index.js");
|
|
279
279
|
initInter();
|
|
280
|
-
const { createApp } = await import("https://www.unpkg.com/microboard-ui-temp@0.0.
|
|
280
|
+
const { createApp } = await import("https://www.unpkg.com/microboard-ui-temp@0.0.38/dist/index.js");
|
|
281
281
|
const app = createApp();
|
|
282
282
|
window.app = app;
|
|
283
283
|
const stringed = await app.openAndEditFile();
|
|
@@ -286,12 +286,12 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
|
286
286
|
app.getBoard().deserializeHTML(stringed);
|
|
287
287
|
app.localRender("items");
|
|
288
288
|
}
|
|
289
|
-
const response = await fetch("https://www.unpkg.com/microboard-ui-temp@0.0.
|
|
289
|
+
const response = await fetch("https://www.unpkg.com/microboard-ui-temp@0.0.38/dist/index.css");
|
|
290
290
|
const cssText = await response.text();
|
|
291
291
|
const styleEl = document.createElement("style");
|
|
292
292
|
styleEl.textContent = cssText;
|
|
293
293
|
document.body.appendChild(styleEl);
|
|
294
|
-
const responseSvg = await fetch("https://www.unpkg.com/microboard-ui-temp@0.0.
|
|
294
|
+
const responseSvg = await fetch("https://www.unpkg.com/microboard-ui-temp@0.0.38/dist/sprite.svg");
|
|
295
295
|
const svgText = await responseSvg.text();
|
|
296
296
|
const div = document.createElement("div");
|
|
297
297
|
div.style.display = "none";
|
|
@@ -308,8 +308,8 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
|
308
308
|
ev.stopPropagation();
|
|
309
309
|
const htmlContent = document.documentElement.innerHTML;
|
|
310
310
|
const boardName2 = document.title?.trim() || "shared-board";
|
|
311
|
-
const { boardsApi, createApp,
|
|
312
|
-
|
|
311
|
+
const { boardsApi, createApp, frontConf } = await import("https://www.unpkg.com/microboard-ui-temp@0.0.38/dist/index.js");
|
|
312
|
+
frontConf.apiURL = "https://dev-app.microboard.io/api/v1/";
|
|
313
313
|
const boardId = await boardsApi.createBoardUnAuthed(boardName2);
|
|
314
314
|
const app = createApp();
|
|
315
315
|
window.app = app;
|
package/dist/index.js
CHANGED
|
@@ -215912,9 +215912,7 @@ var conf = {
|
|
|
215912
215912
|
FORCE_HOTKEYS: "auto",
|
|
215913
215913
|
debug: false,
|
|
215914
215914
|
FALLBACK_LNG: "en",
|
|
215915
|
-
cursorsMap
|
|
215916
|
-
apiURL: undefined,
|
|
215917
|
-
wsURL: undefined
|
|
215915
|
+
cursorsMap
|
|
215918
215916
|
};
|
|
215919
215917
|
initDefaultI18N();
|
|
215920
215918
|
|
|
@@ -256095,9 +256093,14 @@ class Deck extends BaseItem {
|
|
|
256095
256093
|
}
|
|
256096
256094
|
}
|
|
256097
256095
|
updateCache(context) {
|
|
256096
|
+
const width2 = this.getWidth();
|
|
256097
|
+
const height3 = this.getHeight();
|
|
256098
|
+
if (!width2 || !height3) {
|
|
256099
|
+
return;
|
|
256100
|
+
}
|
|
256098
256101
|
const tempCanvas = document.createElement("canvas");
|
|
256099
|
-
tempCanvas.width =
|
|
256100
|
-
tempCanvas.height =
|
|
256102
|
+
tempCanvas.width = width2;
|
|
256103
|
+
tempCanvas.height = height3;
|
|
256101
256104
|
const tempCtx = tempCanvas.getContext("2d");
|
|
256102
256105
|
if (!tempCtx)
|
|
256103
256106
|
return;
|
|
@@ -283983,6 +283986,10 @@ __export(exports_auth, {
|
|
|
283983
283986
|
});
|
|
283984
283987
|
|
|
283985
283988
|
// src/Config.ts
|
|
283989
|
+
var frontConf = {
|
|
283990
|
+
apiURL: undefined,
|
|
283991
|
+
wsURL: undefined
|
|
283992
|
+
};
|
|
283986
283993
|
var isSnapshotInIframe = typeof window !== "undefined" && window.parent && window.parent !== window && window.parent.location.href.includes("/snapshots/");
|
|
283987
283994
|
var baseUrl = typeof process !== "undefined" && process.env.BASE_URL ? process.env.BASE_URL : isSnapshotInIframe ? `${window.parent.location.protocol}//${window.parent.location.host}` : `${location.protocol}//${location.host}`;
|
|
283988
283995
|
var parsedUrl = new URL(baseUrl);
|
|
@@ -283992,15 +283999,14 @@ function getApiUrl(path4) {
|
|
|
283992
283999
|
if (!path4) {
|
|
283993
284000
|
path4 = "";
|
|
283994
284001
|
}
|
|
283995
|
-
|
|
283996
|
-
|
|
283997
|
-
return `${conf.apiURL}${path4}`;
|
|
284002
|
+
if (frontConf.apiURL) {
|
|
284003
|
+
return `${frontConf.apiURL}${path4}`;
|
|
283998
284004
|
}
|
|
283999
284005
|
return `${PROTOCOL}//${HOST}/api/v1${path4}`;
|
|
284000
284006
|
}
|
|
284001
284007
|
function getWebsocketUrl() {
|
|
284002
|
-
if (
|
|
284003
|
-
return
|
|
284008
|
+
if (frontConf.wsURL) {
|
|
284009
|
+
return frontConf.wsURL;
|
|
284004
284010
|
}
|
|
284005
284011
|
return `${PROTOCOL === "https:" ? "wss" : "ws"}://${HOST}/ws`;
|
|
284006
284012
|
}
|
|
@@ -447143,9 +447149,9 @@ export {
|
|
|
447143
447149
|
sprite_default as sprite,
|
|
447144
447150
|
exports_media as mediaApi,
|
|
447145
447151
|
initInter,
|
|
447152
|
+
frontConf,
|
|
447146
447153
|
customCursors_default as customCursors,
|
|
447147
447154
|
createApp,
|
|
447148
|
-
conf,
|
|
447149
447155
|
exports_boards as boardsApi,
|
|
447150
447156
|
exports_billing as billingApi,
|
|
447151
447157
|
exports_auth as authApi,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "microboard-ui-temp",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.38",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"i18next-browser-languagedetector": "^8.2.0",
|
|
51
51
|
"js-cookie": "^3.0.5",
|
|
52
52
|
"jwt-decode": "^4.0.0",
|
|
53
|
-
"microboard-temp": "^0.4.
|
|
53
|
+
"microboard-temp": "^0.4.93",
|
|
54
54
|
"nanoid": "^5.1.5",
|
|
55
55
|
"prop-types": "^15.8.1",
|
|
56
56
|
"react-hot-toast": "2.4.1",
|