microboard-temp 0.4.107 → 0.5.0

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/esm/index.js CHANGED
@@ -47666,6 +47666,19 @@ function throttle(func, delay) {
47666
47666
  };
47667
47667
  }
47668
47668
 
47669
+ // src/Keyboard/HotkeyRegistry.ts
47670
+ var editModeHotkeyRegistry = {};
47671
+ var viewModeHotkeyRegistry = {};
47672
+ var hotkeyNames = {};
47673
+ function registerHotkey({ name, hotkey, hotkeyConfig, boardMode }) {
47674
+ if (boardMode === "edit") {
47675
+ editModeHotkeyRegistry[name] = hotkeyConfig;
47676
+ } else {
47677
+ viewModeHotkeyRegistry[name] = hotkeyConfig;
47678
+ }
47679
+ hotkeyNames[name] = hotkey;
47680
+ }
47681
+
47669
47682
  // src/Items/Examples/CardGame/Card/Card.ts
47670
47683
  var defaultCardData = {
47671
47684
  itemType: "Card",
@@ -47782,6 +47795,23 @@ registerItem({
47782
47795
  item: Card,
47783
47796
  defaultData: defaultCardData
47784
47797
  });
47798
+ registerHotkey({
47799
+ name: "flipCard",
47800
+ hotkey: { key: { button: "KeyF" }, label: { windows: "F", mac: "F" } },
47801
+ boardMode: "edit",
47802
+ hotkeyConfig: {
47803
+ allItemsType: ["Card"],
47804
+ cb: (event, board) => {
47805
+ const cards = board?.selection.items.list();
47806
+ if (!cards) {
47807
+ return;
47808
+ }
47809
+ cards.forEach((card) => {
47810
+ card.toggleIsOpen();
47811
+ });
47812
+ }
47813
+ }
47814
+ });
47785
47815
  // src/Items/Examples/CardGame/Deck/Deck.ts
47786
47816
  var defaultDeckData = {
47787
47817
  itemType: "Deck"
@@ -49212,10 +49242,11 @@ var hotkeys_default = {
49212
49242
 
49213
49243
  // src/Keyboard/isHotkeyPushed.ts
49214
49244
  function isHotkeyPushed(hotkey, event) {
49215
- if (!hotkeys_default[hotkey]) {
49245
+ const hotkeys = { ...hotkeys_default, ...hotkeyNames };
49246
+ if (!hotkeys[hotkey]) {
49216
49247
  return false;
49217
49248
  }
49218
- const { key } = hotkeys_default[hotkey];
49249
+ const { key } = hotkeys[hotkey];
49219
49250
  const isControlPushed = event.ctrlKey || event.metaKey;
49220
49251
  const isShiftPushed = event.shiftKey;
49221
49252
  const isAltPushed = event.altKey;
@@ -49595,13 +49626,14 @@ function logHotkey(hotkeyConfig, hotkeyName, status, context) {
49595
49626
 
49596
49627
  // src/Keyboard/checkHotkeys.ts
49597
49628
  function checkHotkeys(hotkeyMap, event, board) {
49598
- const entries = Object.entries(hotkeyMap);
49629
+ const fullHotkeysMap = { ...hotkeyMap, ...board.getInterfaceType() === "edit" ? editModeHotkeyRegistry : viewModeHotkeyRegistry };
49630
+ const entries = Object.entries(fullHotkeysMap);
49599
49631
  for (const [hotkey, configOrCb] of entries) {
49600
49632
  if (isHotkeyPushed(hotkey, event)) {
49601
49633
  const context = board.selection.getContext();
49602
49634
  if (typeof configOrCb === "function") {
49603
49635
  event.preventDefault();
49604
- configOrCb(event);
49636
+ configOrCb(event, board);
49605
49637
  logHotkey(configOrCb, hotkey, "triggered", context);
49606
49638
  return true;
49607
49639
  }
@@ -49628,7 +49660,7 @@ function checkHotkeys(hotkeyMap, event, board) {
49628
49660
  if (preventDefault) {
49629
49661
  event.preventDefault();
49630
49662
  }
49631
- cb(event);
49663
+ cb(event, board);
49632
49664
  logHotkey(configOrCb, hotkey, "triggered", context);
49633
49665
  return true;
49634
49666
  }
@@ -52875,416 +52907,6 @@ class BoardSelection {
52875
52907
  });
52876
52908
  }
52877
52909
  }
52878
- // src/public/customWebComponents.js
52879
- var customWebComponents_default = `/* eslint-disable max-classes-per-file, @typescript-eslint/no-useless-constructor */
52880
- class RichTextElement extends HTMLElement {
52881
- constructor() {
52882
- super();
52883
- }
52884
- }
52885
-
52886
- class ShapeItemElement extends HTMLElement {
52887
- constructor() {
52888
- super();
52889
- }
52890
- }
52891
-
52892
- class StickerElement extends HTMLElement {
52893
- constructor() {
52894
- super();
52895
- }
52896
- }
52897
-
52898
- class DrawingElement extends HTMLElement {
52899
- constructor() {
52900
- super();
52901
- }
52902
- }
52903
-
52904
- class ConnectorElement extends HTMLElement {
52905
- constructor() {
52906
- super();
52907
- }
52908
- }
52909
-
52910
- class FrameItemElement extends HTMLElement {
52911
- constructor() {
52912
- super();
52913
- }
52914
- }
52915
-
52916
- class ImageItemElement extends HTMLElement {
52917
- constructor() {
52918
- super();
52919
- }
52920
- }
52921
-
52922
- class LinkItemElement extends HTMLElement {
52923
- constructor() {
52924
- super();
52925
- }
52926
- }
52927
-
52928
- class AINodeItemElement extends HTMLElement {
52929
- constructor() {
52930
- super();
52931
- }
52932
- }
52933
-
52934
- class VideoItemElement extends HTMLElement {
52935
- constructor() {
52936
- super();
52937
- }
52938
- }
52939
-
52940
- class CommentElement extends HTMLElement {
52941
- constructor() {
52942
- super();
52943
- }
52944
- }
52945
-
52946
- class AudioItemElement extends HTMLElement {
52947
- constructor() {
52948
- super();
52949
- }
52950
- }
52951
-
52952
- customElements.define("rich-text", RichTextElement);
52953
- customElements.define("shape-item", ShapeItemElement);
52954
- customElements.define("sticker-item", StickerElement);
52955
- customElements.define("drawing-item", DrawingElement);
52956
- customElements.define("connector-item", ConnectorElement);
52957
- customElements.define("frame-item", FrameItemElement);
52958
- customElements.define("image-item", ImageItemElement);
52959
- customElements.define("link-item", LinkItemElement);
52960
- customElements.define("ainode-item", AINodeItemElement);
52961
- customElements.define("video-item", VideoItemElement);
52962
- customElements.define("comment-item", CommentElement);
52963
- customElements.define("audio-item", AudioItemElement);
52964
-
52965
- document.addEventListener("DOMContentLoaded", () => {
52966
- const itemsDiv = document.querySelector("#items");
52967
- if (!itemsDiv) {
52968
- console.error("ITEMS DIV NOT FOUND!");
52969
- return;
52970
- }
52971
- let isDragging = false;
52972
- let startX, startY;
52973
- let translateX = 0;
52974
- let translateY = 0;
52975
- let scale = 1;
52976
-
52977
- itemsDiv.style.transformOrigin = "0 0";
52978
- document.body.style.cursor = "grab";
52979
-
52980
- function updateTransform() {
52981
- itemsDiv.style.transform =
52982
- "translate(" +
52983
- translateX +
52984
- "px, " +
52985
- translateY +
52986
- "px) scale(" +
52987
- scale +
52988
- ")";
52989
- }
52990
-
52991
- function handleMouseDown(ev) {
52992
- isDragging = true;
52993
- startX = ev.clientX;
52994
- startY = ev.clientY;
52995
- itemsDiv.style.cursor = "grabbing";
52996
- }
52997
-
52998
- function handleMouseMove(ev) {
52999
- if (!isDragging) {
53000
- return;
53001
- }
53002
- const dx = ev.clientX - startX;
53003
- const dy = ev.clientY - startY;
53004
- startX += dx;
53005
- startY += dy;
53006
- translateX += dx;
53007
- translateY += dy;
53008
- updateTransform();
53009
- }
53010
-
53011
- function handleMouseUp(ev) {
53012
- if (!isDragging) {
53013
- return;
53014
- }
53015
- isDragging = false;
53016
- itemsDiv.style.cursor = "grab";
53017
- }
53018
-
53019
- function handleWheel(ev) {
53020
- ev.preventDefault();
53021
- const factor = ev.deltaY < 0 ? 1.1 : 0.9;
53022
- translateX = ev.clientX - (ev.clientX - translateX) * factor;
53023
- translateY = ev.clientY - (ev.clientY - translateY) * factor;
53024
- scale *= factor;
53025
- updateTransform();
53026
- }
53027
-
53028
- document.addEventListener("mousedown", handleMouseDown);
53029
- document.addEventListener("mousemove", handleMouseMove);
53030
- document.addEventListener("mouseup", handleMouseUp);
53031
- document.addEventListener("wheel", handleWheel, { passive: false });
53032
-
53033
- const titlePanel = document.createElement("div");
53034
- titlePanel.style.boxShadow = "0px 10px 16px -3px rgba(20, 21, 26, 0.08)";
53035
- titlePanel.style.position = "fixed";
53036
- titlePanel.style.left = "12px";
53037
- titlePanel.style.top = "12px";
53038
- titlePanel.style.borderRadius = "12px";
53039
- titlePanel.style.backgroundColor = "#ffff";
53040
- titlePanel.style.display = "flex";
53041
- titlePanel.style.alignItems = "center";
53042
- titlePanel.style.gap = "8px";
53043
- titlePanel.style.padding = "0 12px";
53044
- titlePanel.style.height = "48px";
53045
- const editButton = document.createElement("button");
53046
- const editIcon = document.createElementNS(
53047
- "http://www.w3.org/2000/svg",
53048
- "svg",
53049
- );
53050
- editIcon.setAttribute("width", "13");
53051
- editIcon.setAttribute("height", "13");
53052
- editIcon.setAttribute("viewBox", "0 0 13 13");
53053
- editIcon.setAttribute("fill", "none");
53054
- editIcon.setAttribute("xmlns", "http://www.w3.org/2000/svg");
53055
- const editIconPath = document.createElementNS(
53056
- "http://www.w3.org/2000/svg",
53057
- "path",
53058
- );
53059
- editIconPath.setAttribute(
53060
- "d",
53061
- "M7.838 0.999902V2.33324H1.33333V11.6666H10.6667V5.1619H12V12.3332C12 12.51 11.9298 12.6796 11.8047 12.8046C11.6797 12.9297 11.5101 12.9999 11.3333 12.9999H0.666667C0.489856 12.9999 0.320286 12.9297 0.195262 12.8046C0.0702379 12.6796 0 12.51 0 12.3332V1.66657C0 1.48976 0.0702379 1.32019 0.195262 1.19516C0.320286 1.07014 0.489856 0.999902 0.666667 0.999902H7.838ZM11.1847 0.872018C11.4453 0.611315 11.868 0.611355 12.1285 0.872108C12.3889 1.1327 12.3889 1.55503 12.1284 1.81553L6.472 7.4719L5.53067 7.4739L5.52933 6.52924L11.1847 0.872018Z",
53062
- );
53063
- editIconPath.setAttribute("fill", "#ffff");
53064
- editIcon.appendChild(editIconPath);
53065
- editButton.appendChild(editIcon);
53066
- const editFileText = document.createElement("p");
53067
- const isSnapshotInIframe =
53068
- window.parent &&
53069
- window.parent !== window &&
53070
- window.parent.location.href.includes("/snapshots/");
53071
- editFileText.textContent = isSnapshotInIframe ? "Edit copy" : "Edit file";
53072
- editButton.appendChild(editFileText);
53073
-
53074
- editButton.style.backgroundColor = "rgba(20, 21, 26, 1)";
53075
- editButton.style.cursor = "pointer";
53076
- editButton.style.boxShadow = "0px 1px 2px 0px rgba(20, 21, 26, 0.05)";
53077
- editButton.style.color = "#ffff";
53078
- editButton.style.fontSize = "14px";
53079
- editButton.style.lineHeight = "20px";
53080
- editButton.style.display = "flex";
53081
- editButton.style.alignItems = "center";
53082
- editButton.style.gap = "8px";
53083
- editButton.style.padding = "8px";
53084
- editButton.style.borderRadius = "10px";
53085
- const separator = document.createElement("div");
53086
- separator.style.borderRight = "1px solid rgba(222, 224, 227, 1)";
53087
- separator.style.height = "100%";
53088
- const boardName = document.createElement("div");
53089
- const fileIcon = document.createElementNS(
53090
- "http://www.w3.org/2000/svg",
53091
- "svg",
53092
- );
53093
- fileIcon.setAttribute("width", "16");
53094
- fileIcon.setAttribute("height", "18");
53095
- fileIcon.setAttribute("viewBox", "0 0 16 18");
53096
- fileIcon.setAttribute("fill", "none");
53097
- fileIcon.setAttribute("xmlns", "http://www.w3.org/2000/svg");
53098
- const path = document.createElementNS("http://www.w3.org/2000/svg", "path");
53099
- path.setAttribute(
53100
- "d",
53101
- "M10.5 2.33341H2.16667V15.6667H13.8333V5.66675H10.5V2.33341ZM0.5 1.49341C0.5 1.03675 0.8725 0.666748 1.3325 0.666748H11.3333L15.5 4.83342V16.4942C15.5008 16.6037 15.48 16.7122 15.4388 16.8136C15.3976 16.915 15.3369 17.0073 15.2601 17.0852C15.1832 17.1631 15.0918 17.2252 14.991 17.2678C14.8902 17.3103 14.7819 17.3327 14.6725 17.3334H1.3275C1.10865 17.3319 0.899181 17.2443 0.744348 17.0897C0.589515 16.935 0.501746 16.7256 0.5 16.5067V1.49341ZM7.16667 8.16675V5.66675H8.83333V8.16675H11.3333V9.83342H8.83333V12.3334H7.16667V9.83342H4.66667V8.16675H7.16667Z",
53102
- );
53103
- path.setAttribute("fill", "#696B76");
53104
- fileIcon.appendChild(path);
53105
- boardName.appendChild(fileIcon);
53106
- const boardNameTag = document.querySelector('meta[name="board-name"]');
53107
- let boardNameStr = "Untitled";
53108
- if (boardNameTag) {
53109
- boardNameStr = boardNameTag.getAttribute("content");
53110
- }
53111
- const p = document.createElement("p");
53112
- p.textContent = boardNameStr;
53113
- p.style.fontSize = "16px";
53114
- p.style.lineHeight = "24px";
53115
- boardName.appendChild(p);
53116
- const cloudIcon = document.createElementNS(
53117
- "http://www.w3.org/2000/svg",
53118
- "svg",
53119
- );
53120
- cloudIcon.setAttribute("width", "20");
53121
- cloudIcon.setAttribute("height", "18");
53122
- cloudIcon.setAttribute("viewBox", "0 0 20 18");
53123
- cloudIcon.setAttribute("fill", "none");
53124
- cloudIcon.setAttribute("xmlns", "http://www.w3.org/2000/svg");
53125
- const cloudIconPath = document.createElementNS(
53126
- "http://www.w3.org/2000/svg",
53127
- "path",
53128
- );
53129
- cloudIconPath.setAttribute(
53130
- "d",
53131
- "M2.92711 0.75009L18.8371 16.6601L17.6579 17.8393L15.9796 16.1601C15.401 16.3854 14.7855 16.5007 14.1646 16.5001H5.83128C4.65063 16.5008 3.50782 16.0838 2.60518 15.3227C1.70255 14.5617 1.09833 13.5058 0.89953 12.342C0.700726 11.1782 0.920157 9.98165 1.51897 8.96413C2.11778 7.94662 3.05734 7.17382 4.17128 6.78259C4.13561 6.05854 4.23538 5.3342 4.46544 4.64676L1.74794 1.92842L2.92711 0.75009ZM5.83128 6.50009C5.83128 6.56759 5.83294 6.63592 5.83628 6.70259L5.89461 7.94259L4.72461 8.35426C3.98336 8.6164 3.35857 9.132 2.96052 9.81003C2.56248 10.4881 2.41678 11.2849 2.54916 12.0599C2.68153 12.8349 3.08347 13.5383 3.684 14.0457C4.28453 14.5532 5.04504 14.8322 5.83128 14.8334H14.1646C14.3196 14.8334 14.4721 14.8226 14.6213 14.8026L5.85628 6.03759C5.83961 6.18926 5.83128 6.34342 5.83128 6.50009ZM9.99794 0.666756C10.7878 0.666732 11.5694 0.827112 12.2954 1.13817C13.0214 1.44923 13.6767 1.90449 14.2215 2.47635C14.7664 3.04821 15.1894 3.72476 15.4649 4.46498C15.7405 5.2052 15.8629 5.99367 15.8246 6.78259C16.5167 7.02639 17.1467 7.41945 17.6699 7.93391C18.1931 8.44837 18.5967 9.07163 18.8521 9.75951C19.1076 10.4474 19.2085 11.183 19.1479 11.9143C19.0873 12.6455 18.8665 13.3545 18.5013 13.9909L17.2571 12.7468C17.5023 12.1401 17.5636 11.4747 17.4331 10.8335C17.3027 10.1924 16.9864 9.60375 16.5237 9.14112C16.061 8.67849 15.4723 8.36232 14.8311 8.23202C14.1899 8.10173 13.5245 8.16308 12.9179 8.40842L11.6729 7.16259C12.4071 6.74176 13.2571 6.50009 14.1646 6.50009C14.1646 5.73714 13.9551 4.98884 13.559 4.33679C13.1629 3.68473 12.5953 3.15396 11.9182 2.80235C11.2411 2.45073 10.4805 2.29177 9.71923 2.34281C8.95799 2.39384 8.22538 2.65291 7.60127 3.09176L6.40961 1.90009C7.43392 1.09887 8.69749 0.664571 9.99794 0.666756Z",
53132
- );
53133
- cloudIconPath.setAttribute("fill", "#696B76");
53134
- cloudIcon.appendChild(cloudIconPath);
53135
- boardName.appendChild(cloudIcon);
53136
- boardName.style.display = "flex";
53137
- boardName.style.alignItems = "center";
53138
- boardName.style.gap = "8px";
53139
- titlePanel.appendChild(boardName);
53140
- titlePanel.appendChild(separator);
53141
- titlePanel.appendChild(editButton);
53142
- document.body.appendChild(titlePanel);
53143
-
53144
- editButton.onclick = async () => {
53145
- editButton.disabled = true;
53146
- editButton.textContent = "Loading...";
53147
-
53148
- try {
53149
- document.removeEventListener("mousedown", handleMouseDown);
53150
- document.removeEventListener("mousemove", handleMouseMove);
53151
- document.removeEventListener("mouseup", handleMouseUp);
53152
- document.removeEventListener("wheel", handleWheel, {
53153
- passive: false,
53154
- });
53155
- translateX = 0;
53156
- translateY = 0;
53157
- scale = 1;
53158
- updateTransform();
53159
-
53160
- const { initBrowserSettings } = await import(
53161
- "https://www.unpkg.com/test_package_board@0.0.99/dist/bundle.js"
53162
- );
53163
- initBrowserSettings();
53164
-
53165
- const { createApp } = await import(
53166
- "https://www.unpkg.com/test_package_board@0.0.99/dist/bundle.js"
53167
- );
53168
-
53169
- const app = createApp();
53170
- window.app = app;
53171
- const stringed = await app.openAndEditFile();
53172
-
53173
- if (stringed) {
53174
- await app.openBoardFromFile();
53175
- app.getBoard().deserializeHTML(stringed);
53176
- app.localRender("items");
53177
- }
53178
-
53179
- const response = await fetch(
53180
- "https://www.unpkg.com/test_package_board@0.0.99/dist/bundle.css",
53181
- );
53182
- const cssText = await response.text();
53183
- const styleEl = document.createElement("style");
53184
- styleEl.textContent = cssText;
53185
- document.body.appendChild(styleEl);
53186
-
53187
- const responseSvg = await fetch(
53188
- "https://www.unpkg.com/test_package_board@0.0.99/dist/sprite.svg",
53189
- );
53190
- const svgText = await responseSvg.text();
53191
- const div = document.createElement("div");
53192
- div.style.display = "none";
53193
- div.id = "sprite";
53194
- div.innerHTML = svgText;
53195
- document.body.appendChild(div);
53196
- } finally {
53197
- editButton.disabled = false;
53198
- editButton.textContent = "Edit board";
53199
- }
53200
- };
53201
- });
53202
- `;
53203
-
53204
- // src/public/index.css
53205
- var public_default = `@import "https://fonts.googleapis.com/css2?family=Manrope:wght@200..800&display=swap";
53206
- @import "https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700&display=swap";
53207
-
53208
- /* ../src/index.css */
53209
- :root {
53210
- --background-surface-default: rgb(255, 255, 255);
53211
- --background-button-secondary: rgb(255, 255, 255);
53212
- --background-button-secondary-hover: rgb(247, 247, 248);
53213
- --background-badge-purple-disabled: rgb(247, 241, 253);
53214
- --background-badge-gray: rgb(233, 234, 236);
53215
- --background-accent-purple: rgb(146, 79, 232);
53216
- --border-action-normal: rgb(222, 223, 227);
53217
- --border-action-focus: rgb(146, 79, 232);
53218
- --border-select-primary: rgb(146, 79, 232);
53219
- --text-base-primary: rgb(20, 21, 26);
53220
- --text-base-secondary: rgba(15, 19, 36, 0.6);
53221
- --text-base-quaternary: rgb(10, 15, 41, 0.25);
53222
- --text-accent-purple: rgb(152, 89, 233);
53223
- --icon-base-primary: rgb(20, 21, 26);
53224
- --icon-base-secondary: rgb(105, 107, 118);
53225
- --icon-accent-purple: rgb(146, 79, 232);
53226
- --absolute-position-panel-padding: 12px;
53227
- }
53228
- * {
53229
- box-sizing: border-box;
53230
- padding: 0;
53231
- margin: 0;
53232
- border: none;
53233
- background: none;
53234
- font-family: inherit;
53235
- }
53236
- html {
53237
- font-size: 62.5%;
53238
- }
53239
- body {
53240
- color: var(--text-base-primary);
53241
- font-size: 1.6rem;
53242
- font-optical-sizing: auto;
53243
- font-style: normal;
53244
- font-family: "Manrope", sans-serif;
53245
- }
53246
- html,
53247
- body {
53248
- overscroll-behavior-x: none;
53249
- -webkit-user-select: none;
53250
- }
53251
- input:-webkit-autofill,
53252
- input:-webkit-autofill:hover,
53253
- input:-webkit-autofill:focus,
53254
- input:-webkit-autofill:active {
53255
- -webkit-box-shadow: 0 0 0 30px white inset !important;
53256
- }
53257
- `;
53258
-
53259
- // src/public/loadLinkImages.js
53260
- var loadLinkImages_default = `document.addEventListener("DOMContentLoaded", function () {
53261
- document.querySelectorAll(".link-object").forEach(linkItem => {
53262
- const linkImage = linkItem.querySelector(".link-image");
53263
- const linkContainer = linkItem.querySelector("a");
53264
- linkImage.onerror = () => {
53265
- linkImage.onerror = null;
53266
- linkImage.style.display = "none";
53267
- const svgNamespace = "http://www.w3.org/2000/svg";
53268
- const svg = document.createElementNS(svgNamespace, "svg");
53269
- svg.setAttribute("width", "20");
53270
- svg.setAttribute("height", "20");
53271
- svg.setAttribute("viewBox", "0 0 13 14");
53272
- svg.setAttribute("fill", "none");
53273
-
53274
- const path = document.createElementNS(svgNamespace, "path");
53275
- path.setAttribute(
53276
- "d",
53277
- "M11.0054 3.414L2.39838 12.021L0.984375 10.607L9.59037 2H2.00538V0H13.0054V11H11.0054V3.414Z",
53278
- );
53279
- path.setAttribute("fill", "#924FE8");
53280
- svg.appendChild(path);
53281
-
53282
- linkContainer.appendChild(svg);
53283
- };
53284
- });
53285
- });
53286
- `;
53287
-
53288
52910
  // src/Board.ts
53289
52911
  class Board {
53290
52912
  boardId;
@@ -53667,47 +53289,29 @@ class Board {
53667
53289
  return this.copy();
53668
53290
  }
53669
53291
  serializeHTML() {
53670
- const customTagsScript = customWebComponents_default;
53671
- const loadLinksImagesScript = loadLinkImages_default;
53672
- const css = public_default;
53673
53292
  const boardName = this.getName() || this.getBoardId();
53674
53293
  const items = this.items.getWholeHTML(conf.documentFactory);
53675
53294
  const itemsDiv = `<div id="items">${items}</div>`;
53676
53295
  const scripts = `
53677
- <script type="module">${customTagsScript}</script>
53678
- <script defer>${loadLinksImagesScript}</script>
53296
+ <script type="module" src="https://unpkg.com/microboard-ui-temp/dist/customWebComponents.js"></script>
53297
+ <script type="module" src="https://unpkg.com/microboard-ui-temp/dist/controlsHandlers.js"></script>
53298
+ <script type="module" src="https://unpkg.com/microboard-ui-temp/dist/titlePanel.js"></script>
53299
+ <script defer src="https://unpkg.com/microboard-ui-temp/dist/loadLinksImages.js"></script>
53679
53300
  `;
53680
53301
  const body = `<body style="overflow-x: hidden; overflow-y: hidden;">${itemsDiv}${scripts}</body>`;
53681
53302
  const head = `
53682
- <head>
53683
- <meta charset="utf-8" />
53684
- <meta name="last-event-order" content="${this.events?.log.getLastIndex()}" />
53685
- <title>Microboard ${this.getBoardId()}</title>
53686
- <link rel="preconnect" href="https://fonts.googleapis.com">
53687
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
53688
- <link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700&display=swap"
53689
- rel="stylesheet"
53690
- />
53691
- <style>${css}</style>
53692
- <style>
53693
- ::-webkit-scrollbar {
53694
- appearance: none;
53695
- width: 3px;
53696
- height: 3px
53697
- }
53698
- ::-webkit-scrollbar-button {
53699
- display: none;
53700
- }
53701
- ::-webkit-scrollbar-thumb {
53702
- display: block;
53703
- background-color: black;
53704
- border-radius: 2px;
53705
- }
53706
- body {
53707
- background-color: rgba(200, 200, 200, 0.2);
53708
- }
53709
- </style>
53710
- </head>`.replace(/\t|\n/g, "");
53303
+ <head>
53304
+ <meta charset="utf-8" />
53305
+ <meta name="last-event-order" content="${this.events?.log.getLastIndex()}" />
53306
+ <title>Microboard ${boardName}</title>
53307
+ <link rel="preconnect" href="https://fonts.googleapis.com" />
53308
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
53309
+ <link
53310
+ href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700&display=swap"
53311
+ rel="stylesheet"
53312
+ />
53313
+ <link rel="stylesheet" crossorigin href="https://unpkg.com/microboard-ui-temp/dist/board.css" />
53314
+ </head>`.replace(/\t|\n/g, "");
53711
53315
  return `${head}${body}`;
53712
53316
  }
53713
53317
  deserializeHTMLAndEmit(stringedHTML) {
@@ -53777,7 +53381,10 @@ class Board {
53777
53381
  const addItem = (itemData) => {
53778
53382
  const item = this.createItem(itemData.id, itemData);
53779
53383
  if (item instanceof Connector2) {
53780
- createdConnectors[itemData.id] = { item, itemData };
53384
+ createdConnectors[itemData.id] = {
53385
+ item,
53386
+ itemData
53387
+ };
53781
53388
  }
53782
53389
  if ("index" in item && item.index) {
53783
53390
  createdGroups[item.getId()] = { item, itemData };
@@ -53812,10 +53419,16 @@ class Board {
53812
53419
  for (const itemData of items) {
53813
53420
  const item = this.createItem(itemData.id, itemData);
53814
53421
  if (item instanceof Connector2) {
53815
- createdConnectors[itemData.id] = { item, itemData };
53422
+ createdConnectors[itemData.id] = {
53423
+ item,
53424
+ itemData
53425
+ };
53816
53426
  }
53817
53427
  if ("index" in item && item.index) {
53818
- createdGroups[item.getId()] = { item, itemData };
53428
+ createdGroups[item.getId()] = {
53429
+ item,
53430
+ itemData
53431
+ };
53819
53432
  }
53820
53433
  this.index.insert(item);
53821
53434
  }
@@ -56718,6 +56331,7 @@ function initI18N(i18nInstance) {
56718
56331
  return i18nInstance;
56719
56332
  }
56720
56333
  export {
56334
+ viewModeHotkeyRegistry,
56721
56335
  validateRichTextData,
56722
56336
  validateItemsMap,
56723
56337
  uploadVideoToStorage,
@@ -56757,6 +56371,7 @@ export {
56757
56371
  isFiniteNumber,
56758
56372
  isControlCharacter,
56759
56373
  initI18N,
56374
+ hotkeyNames,
56760
56375
  getYouTubeVideoPreview,
56761
56376
  getYouTubeThumbnail,
56762
56377
  getVideoMetadata,
@@ -56771,6 +56386,7 @@ export {
56771
56386
  forceNumberIntoInterval,
56772
56387
  fileTosha256,
56773
56388
  exportBoardSnapshot,
56389
+ editModeHotkeyRegistry,
56774
56390
  decodeHtml,
56775
56391
  defaultCursors as cursors,
56776
56392
  createVideoItem,