kritzel-stencil 0.4.4 → 0.4.6

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.
Files changed (128) hide show
  1. package/dist/cjs/kritzel-active-users_47.cjs.entry.js +79 -13
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/stencil.cjs.js +1 -1
  4. package/dist/collection/classes/core/viewport.class.js +14 -1
  5. package/dist/collection/components/core/kritzel-editor/kritzel-editor.js +48 -8
  6. package/dist/collection/components/core/kritzel-engine/kritzel-engine.js +84 -3
  7. package/dist/collection/constants/version.js +1 -1
  8. package/dist/components/index.js +1226 -1
  9. package/dist/components/kritzel-active-users.js +6 -1
  10. package/dist/components/kritzel-avatar.js +6 -1
  11. package/dist/components/kritzel-awareness-cursors.js +6 -1
  12. package/dist/components/kritzel-back-to-content.js +6 -1
  13. package/dist/components/kritzel-brush-style.js +64 -1
  14. package/dist/components/kritzel-button.js +6 -1
  15. package/dist/components/kritzel-color-palette.js +6 -1
  16. package/dist/components/kritzel-color.js +6 -1
  17. package/dist/components/kritzel-context-menu.js +6 -1
  18. package/dist/components/kritzel-controls.js +6 -1
  19. package/dist/components/kritzel-current-user-dialog.js +6 -1
  20. package/dist/components/kritzel-current-user.js +6 -1
  21. package/dist/components/kritzel-cursor-trail.js +6 -1
  22. package/dist/components/kritzel-dialog.js +6 -1
  23. package/dist/components/kritzel-dropdown.js +6 -1
  24. package/dist/components/kritzel-editor.js +4404 -1
  25. package/dist/components/kritzel-engine.js +6 -1
  26. package/dist/components/kritzel-export.js +6 -1
  27. package/dist/components/kritzel-font-family.js +6 -1
  28. package/dist/components/kritzel-font-size.js +6 -1
  29. package/dist/components/kritzel-font.js +6 -1
  30. package/dist/components/kritzel-icon.js +6 -1
  31. package/dist/components/kritzel-input.js +6 -1
  32. package/dist/components/kritzel-line-endings.js +6 -1
  33. package/dist/components/kritzel-loading-overlay.js +6 -1
  34. package/dist/components/kritzel-login-dialog.js +6 -1
  35. package/dist/components/kritzel-master-detail.js +6 -1
  36. package/dist/components/kritzel-menu-item.js +6 -1
  37. package/dist/components/kritzel-menu.js +6 -1
  38. package/dist/components/kritzel-more-menu.js +6 -1
  39. package/dist/components/kritzel-notification-card.js +6 -1
  40. package/dist/components/kritzel-numeric-input.js +6 -1
  41. package/dist/components/kritzel-opacity-slider.js +6 -1
  42. package/dist/components/kritzel-pill-tabs.js +6 -1
  43. package/dist/components/kritzel-portal.js +6 -1
  44. package/dist/components/kritzel-settings.js +6 -1
  45. package/dist/components/kritzel-shape-fill.js +6 -1
  46. package/dist/components/kritzel-share-dialog.js +6 -1
  47. package/dist/components/kritzel-slide-toggle.js +6 -1
  48. package/dist/components/kritzel-split-button.js +6 -1
  49. package/dist/components/kritzel-stroke-size.js +6 -1
  50. package/dist/components/kritzel-sync-indicator.js +6 -1
  51. package/dist/components/kritzel-tool-config.js +6 -1
  52. package/dist/components/kritzel-tooltip.js +6 -1
  53. package/dist/components/kritzel-utility-panel.js +6 -1
  54. package/dist/components/kritzel-watermark.js +6 -1
  55. package/dist/components/kritzel-workspace-manager.js +6 -1
  56. package/dist/components/kritzel-zoom-panel.js +6 -1
  57. package/dist/components/p-894OnDQV.js +39 -1
  58. package/dist/components/p-B43upypT.js +1500 -1
  59. package/dist/components/p-B5oHmPJb.js +97 -1
  60. package/dist/components/p-B6t5q-V4.js +63 -1
  61. package/dist/components/p-B8Xi4Clg.js +43 -1
  62. package/dist/components/p-BBmP8lVY.js +51726 -0
  63. package/dist/components/p-BDzlx2hB.js +135 -1
  64. package/dist/components/p-BFTU3MAI.js +7 -1
  65. package/dist/components/p-BFYtCsZu.js +56 -1
  66. package/dist/components/p-BI2ng9I_.js +62 -1
  67. package/dist/components/p-BTzlrIxe.js +194 -1
  68. package/dist/components/p-BmyTdQGy.js +1090 -1
  69. package/dist/components/p-BsANVili.js +150 -1
  70. package/dist/components/p-BxpKq94F.js +290 -1
  71. package/dist/components/p-C38P-Vd0.js +446 -1
  72. package/dist/components/p-C4NrrUfN.js +77 -1
  73. package/dist/components/p-CW-VyJgK.js +6 -1
  74. package/dist/components/p-CWRSGYOE.js +57 -1
  75. package/dist/components/p-CXpv9Rxe.js +106 -1
  76. package/dist/components/p-Ca-igU1f.js +320 -1
  77. package/dist/components/p-CdR76C4L.js +165 -1
  78. package/dist/components/p-Ch42cOeY.js +320 -0
  79. package/dist/components/p-ClFprFvz.js +209 -1
  80. package/dist/components/p-Cm33td2O.js +122 -1
  81. package/dist/components/p-CqLgB8JK.js +91 -1
  82. package/dist/components/p-Cr682JI_.js +156 -1
  83. package/dist/components/p-CsvMgk_f.js +62 -1
  84. package/dist/components/p-CwJwsRR3.js +277 -1
  85. package/dist/components/p-Cymum41a.js +88 -1
  86. package/dist/components/p-D09kgc5Q.js +94 -1
  87. package/dist/components/p-D30zs0kA.js +121 -1
  88. package/dist/components/p-D3y_Hauo.js +85 -1
  89. package/dist/components/p-D5jf8wAu.js +142 -1
  90. package/dist/components/p-D82VaHce.js +53 -1
  91. package/dist/components/p-DAwPPDMS.js +101 -1
  92. package/dist/components/p-DEBwmRTC.js +55 -1
  93. package/dist/components/p-DIazmg6w.js +52 -1
  94. package/dist/components/p-DJ88BrIW.js +70 -1
  95. package/dist/components/p-DJkKlUyZ.js +182 -1
  96. package/dist/components/p-DUYmwrWV.js +3267 -1
  97. package/dist/components/p-DX2nriaq.js +486 -1
  98. package/dist/components/p-Dd-pMvlr.js +20 -1
  99. package/dist/components/p-Df3BwVGy.js +299 -1
  100. package/dist/components/p-DgJ0ufzr.js +43 -1
  101. package/dist/components/p-DkUb2czk.js +70 -1
  102. package/dist/components/p-Dlp84thc.js +57 -1
  103. package/dist/components/p-JYj3Facr.js +431 -1
  104. package/dist/components/p-Ka7OWbnk.js +2304 -1
  105. package/dist/components/p-PSFAfAyd.js +49 -1
  106. package/dist/components/p-WUdQqYnu.js +118 -1
  107. package/dist/components/p-djJSnjAX.js +84 -1
  108. package/dist/components/p-e6Zpc9Vp.js +143 -1
  109. package/dist/components/p-jGOpkGDl.js +30 -1
  110. package/dist/components/p-pagW8YF7.js +99 -1
  111. package/dist/esm/kritzel-active-users_47.entry.js +79 -13
  112. package/dist/esm/loader.js +1 -1
  113. package/dist/esm/stencil.js +1 -1
  114. package/dist/stencil/index.esm.js +1172 -1
  115. package/dist/stencil/p-5b969a42.entry.js +36109 -0
  116. package/dist/stencil/p-DQuL1Twl.js +3 -1
  117. package/dist/stencil/p-Dhio9uis.js +1717 -2
  118. package/dist/stencil/p-fb32cd8f.entry.js +29 -1
  119. package/dist/stencil/p-uC7_X6yr.js +30737 -1
  120. package/dist/stencil/stencil.esm.js +21 -1
  121. package/dist/types/components/core/kritzel-editor/kritzel-editor.d.ts +2 -0
  122. package/dist/types/components/core/kritzel-engine/kritzel-engine.d.ts +7 -0
  123. package/dist/types/components.d.ts +10 -0
  124. package/dist/types/constants/version.d.ts +1 -1
  125. package/package.json +1 -1
  126. package/dist/components/p--Oazz-BP.js +0 -9
  127. package/dist/components/p-Xsiz1D5Q.js +0 -1
  128. package/dist/stencil/p-9abc21b9.entry.js +0 -9
@@ -531,6 +531,12 @@ export class KritzelEditor {
531
531
  async triggerSelectionChange() {
532
532
  return this.engineRef.triggerSelectionChange();
533
533
  }
534
+ async beginSceneBootstrap() {
535
+ return this.engineRef.beginSceneBootstrap();
536
+ }
537
+ async endSceneBootstrap() {
538
+ return this.engineRef.endSceneBootstrap();
539
+ }
534
540
  async getDisplayableShortcuts() {
535
541
  return this.engineRef.getDisplayableShortcuts();
536
542
  }
@@ -1010,36 +1016,36 @@ export class KritzelEditor {
1010
1016
  const isLoggedIn = this.isLoggedIn;
1011
1017
  const shouldShowCurrentUser = isLoggedIn;
1012
1018
  const shouldShowLoginButton = this.isReady && !!this.loginConfig && !isLoggedIn;
1013
- return (h(Host, { key: '00d652c74feac7b4917772146368125da6deeb1c' }, h("div", { key: 'f8fb86b45b0cdabb5e3ad52de6d6ef31a71a09e4', class: "editor-content", style: {
1019
+ return (h(Host, { key: '0fea11ea16e8baca0a7ecbd22c8025b47d451ac0' }, h("div", { key: 'd2ed05c8a6ecbe5b3cc4fc8bc12affefc1c15976', class: "editor-content", style: {
1014
1020
  opacity: this.isEditorVisible ? '1' : '0',
1015
1021
  visibility: this.isEditorVisible ? 'visible' : 'hidden',
1016
1022
  transition: 'opacity 0.2s ease-in-out, visibility 0.2s ease-in-out',
1017
- } }, h("div", { key: '2378c776d8eecf2614567bed11c6e93fb338e302', class: "top-left-buttons" }, h("kritzel-workspace-manager", { key: 'ce41192540169694482d6f8cca60701bc4427438', visible: this.isWorkspaceManagerVisible, workspaces: this.workspaces, activeWorkspace: this.activeWorkspace, terms: this.resolvedTerms, onWorkspaceChange: event => (this.activeWorkspace = event.detail), onIsWorkspaceManagerReady: () => (this.isWorkspaceManagerReady = true) }), h("kritzel-back-to-content", { key: 'ec269d3e9f589362d8301370778f0c5e4252eead', visible: this.isBackToContentButtonVisible, text: this.resolvedTerms['backToContent.label'] ?? 'Back to content', onBackToContent: () => this.backToContent() })), this.activeNotification && (h("div", { key: '847ed8149d556c934090424ff54b17b6721ccc76', class: "top-center-notification-layer", role: "presentation" }, h("div", { key: '61d8b8e91cda100ffa6620db26ba6dfb2232946a', class: { 'top-center-notification-container': true, 'is-dismissing': this.isNotificationDismissing }, role: "presentation" }, h("kritzel-notification-card", { key: 'b7e132773225ace38e447756110dd39e4661f5fc', notification: this.activeNotification, locale: this.locale, onDismiss: this.dismissNotification, onHoverChange: event => this.handleNotificationHoverChange(event) })))), h("kritzel-engine", { key: '3e4a6d0dbc015ec675fb21a59990c87e9eaa805f', ref: el => {
1023
+ } }, h("div", { key: '3dfab068157d0091834c80d901262228b4f63546', class: "top-left-buttons" }, h("kritzel-workspace-manager", { key: 'e70f2a26a371a13c771d2b45f12fbd7f41fa7f9a', visible: this.isWorkspaceManagerVisible, workspaces: this.workspaces, activeWorkspace: this.activeWorkspace, terms: this.resolvedTerms, onWorkspaceChange: event => (this.activeWorkspace = event.detail), onIsWorkspaceManagerReady: () => (this.isWorkspaceManagerReady = true) }), h("kritzel-back-to-content", { key: 'f0e4851612bac461d97d16c0f23aeefbd1a220e4', visible: this.isBackToContentButtonVisible, text: this.resolvedTerms['backToContent.label'] ?? 'Back to content', onBackToContent: () => this.backToContent() })), this.activeNotification && (h("div", { key: '633dcabf1875a0af0399807f111d19e8e1d2781e', class: "top-center-notification-layer", role: "presentation" }, h("div", { key: '67336263f6de75f03116d751157b78b8f42649c8', class: { 'top-center-notification-container': true, 'is-dismissing': this.isNotificationDismissing }, role: "presentation" }, h("kritzel-notification-card", { key: 'b0316aa4e37283d1de8a969c07523c28408ce474', notification: this.activeNotification, locale: this.locale, onDismiss: this.dismissNotification, onHoverChange: event => this.handleNotificationHoverChange(event) })))), h("kritzel-engine", { key: '6e9c047b04221332ffb5a50970d8f37592db4b5d', ref: el => {
1018
1024
  if (el) {
1019
1025
  this.engineRef = el;
1020
1026
  }
1021
- }, workspace: this.activeWorkspace, activeWorkspaceId: this.activeWorkspaceId, editorId: this.editorId, syncConfig: this.syncConfig, assetStorageConfig: this.assetStorageConfig, user: this.user, scaleMax: this.scaleMax, lockDrawingScale: this.lockDrawingScale, isObjectDistanceFadingActive: this.isObjectDistanceFadingActive, scaleMin: this.scaleMin, cursorTarget: this.cursorTarget, isLoading: this.isLoading, viewportBoundaryLeft: this.viewportBoundaryLeft, viewportBoundaryRight: this.viewportBoundaryRight, viewportBoundaryTop: this.viewportBoundaryTop, viewportBoundaryBottom: this.viewportBoundaryBottom, isPanningEnabled: this.isPanningEnabled, isZoomingEnabled: this.isZoomingEnabled, theme: this.theme, themes: this.themes, licenseKey: this.licenseKey, locale: this.locale, locales: this.locales, fallbackLocale: this.fallbackLocale, debugInfo: this.debugInfo, globalContextMenuItems: this.globalContextMenuItems, objectContextMenuItems: this.objectContextMenuItems, onIsEngineReady: event => this.onEngineReady(event), onWorkspacesChange: event => this.handleWorkspacesChange(event), onActiveWorkspaceChange: event => this.handleActiveWorkspaceChange(event), onObjectsChange: event => this.handleObjectsChange(event), onObjectsAdded: event => this.handleObjectsAdded(event), onObjectsRemoved: event => this.handleObjectsRemoved(event), onObjectsUpdated: event => this.handleObjectsUpdated(event), onUndoStateChange: event => this.handleUndoStateChange(event), onObjectsInViewportChange: event => this.handleObjectsInViewportChange(event), onViewportChange: event => this.handleViewportChange(event), onAwarenessChange: event => this.handleAwarenessChange(event), onNotificationsChange: event => this.handleNotificationsChange(event) }), h("kritzel-controls", { key: 'f84607a0a4d0762c1249400f85b7b8454d672c1e', visible: this.isControlsVisible, class: { 'keyboard-open': this.isVirtualKeyboardOpen }, ref: el => {
1027
+ }, workspace: this.activeWorkspace, activeWorkspaceId: this.activeWorkspaceId, editorId: this.editorId, syncConfig: this.syncConfig, assetStorageConfig: this.assetStorageConfig, user: this.user, scaleMax: this.scaleMax, lockDrawingScale: this.lockDrawingScale, isObjectDistanceFadingActive: this.isObjectDistanceFadingActive, scaleMin: this.scaleMin, cursorTarget: this.cursorTarget, isLoading: this.isLoading, viewportBoundaryLeft: this.viewportBoundaryLeft, viewportBoundaryRight: this.viewportBoundaryRight, viewportBoundaryTop: this.viewportBoundaryTop, viewportBoundaryBottom: this.viewportBoundaryBottom, isPanningEnabled: this.isPanningEnabled, isZoomingEnabled: this.isZoomingEnabled, theme: this.theme, themes: this.themes, licenseKey: this.licenseKey, locale: this.locale, locales: this.locales, fallbackLocale: this.fallbackLocale, debugInfo: this.debugInfo, globalContextMenuItems: this.globalContextMenuItems, objectContextMenuItems: this.objectContextMenuItems, onIsEngineReady: event => this.onEngineReady(event), onWorkspacesChange: event => this.handleWorkspacesChange(event), onActiveWorkspaceChange: event => this.handleActiveWorkspaceChange(event), onObjectsChange: event => this.handleObjectsChange(event), onObjectsAdded: event => this.handleObjectsAdded(event), onObjectsRemoved: event => this.handleObjectsRemoved(event), onObjectsUpdated: event => this.handleObjectsUpdated(event), onUndoStateChange: event => this.handleUndoStateChange(event), onObjectsInViewportChange: event => this.handleObjectsInViewportChange(event), onViewportChange: event => this.handleViewportChange(event), onAwarenessChange: event => this.handleAwarenessChange(event), onNotificationsChange: event => this.handleNotificationsChange(event) }), h("kritzel-controls", { key: 'a664a3b51842238e092835ba6e68b63409829dba', visible: this.isControlsVisible, class: { 'keyboard-open': this.isVirtualKeyboardOpen }, ref: el => {
1022
1028
  if (el) {
1023
1029
  this.controlsRef = el;
1024
1030
  }
1025
- }, controls: this.normalizedControls, isUtilityPanelVisible: this.isUtilityPanelVisible, undoState: this.undoState ?? undefined, theme: this.theme, terms: this.resolvedTerms, onIsControlsReady: () => (this.isControlsReady = true) }), h("div", { key: 'e2691e7c730195e197511cb1e4d0fe707677b5ff', class: "bottom-left-buttons" }, h("kritzel-zoom-panel", { key: 'd0ac6624eab49af78d4761c3ad91842834717aad', visible: this.isZoomPanelVisible, disabled: !this.isZoomingEnabled, zoomPercent: this.currentZoomPercent, terms: this.resolvedTerms, onZoomIn: () => this.zoomIn(), onZoomOut: () => this.zoomOut() })), h("div", { key: 'ad3d386ab7e8ad9fdfbb12754db005bc85fa28ce', class: "top-right-buttons" }, h("kritzel-settings", { key: '566024ac6f3d8f7f20238cc1f83882b39dbf698e', ref: el => {
1031
+ }, controls: this.normalizedControls, isUtilityPanelVisible: this.isUtilityPanelVisible, undoState: this.undoState ?? undefined, theme: this.theme, terms: this.resolvedTerms, onIsControlsReady: () => (this.isControlsReady = true) }), h("div", { key: '7da601af2f3e5be020b2dacac9ed377660488005', class: "bottom-left-buttons" }, h("kritzel-zoom-panel", { key: 'e764e09ab790810620527618e40c298495c56b72', visible: this.isZoomPanelVisible, disabled: !this.isZoomingEnabled, zoomPercent: this.currentZoomPercent, terms: this.resolvedTerms, onZoomIn: () => this.zoomIn(), onZoomOut: () => this.zoomOut() })), h("div", { key: 'c846bd187a9c3d4e4c9034a605ea77500a815cd2', class: "top-right-buttons" }, h("kritzel-settings", { key: '1b0d3c6acda30f6222dcf13f131d4cad87ced86b', ref: el => {
1026
1032
  if (el) {
1027
1033
  this.settingsRef = el;
1028
1034
  }
1029
- }, shortcuts: this.shortcuts, availableThemes: this.themes && this.themes.length > 0 ? this.themes.map(t => t.name) : ['light', 'dark'], availableLocales: this.availableLocaleOptions, settings: this.currentSettingsConfig, terms: this.resolvedTerms, onSettingsChange: event => this.handleSettingsChange(event) }), h("kritzel-export", { key: '4a23ea0c6e070d424a90e9fc87de04e11cff7ade', ref: el => {
1035
+ }, shortcuts: this.shortcuts, availableThemes: this.themes && this.themes.length > 0 ? this.themes.map(t => t.name) : ['light', 'dark'], availableLocales: this.availableLocaleOptions, settings: this.currentSettingsConfig, terms: this.resolvedTerms, onSettingsChange: event => this.handleSettingsChange(event) }), h("kritzel-export", { key: '7a81c4ff0c57159e892f393649fff5a0199b9875', ref: el => {
1030
1036
  if (el) {
1031
1037
  this.exportRef = el;
1032
1038
  }
1033
- }, workspaceName: this.activeWorkspace?.name || 'workspace', terms: this.resolvedTerms, onExportPng: () => this.engineRef.exportViewportAsPng(), onExportSvg: () => this.engineRef.exportViewportAsSvg(), onExportJson: event => this.engineRef.downloadAsJson(event.detail) }), h("kritzel-active-users", { key: 'feef074b52e552fa2ef7e8258002571aca4c5abd', users: this.activeUsers }), shouldShowCurrentUser && h("kritzel-current-user", { key: '844c722545363eaf7eec69037a835eae943afeb9', user: this.user, terms: this.resolvedTerms, onClick: () => this.currentUserDialogRef?.open() }), shouldShowCurrentUser && (h("kritzel-current-user-dialog", { key: '8363c1d3230d111cf1ace0ccf805669e592bb533', ref: el => {
1039
+ }, workspaceName: this.activeWorkspace?.name || 'workspace', terms: this.resolvedTerms, onExportPng: () => this.engineRef.exportViewportAsPng(), onExportSvg: () => this.engineRef.exportViewportAsSvg(), onExportJson: event => this.engineRef.downloadAsJson(event.detail) }), h("kritzel-active-users", { key: '4bde72a3369f8bc1b61a8c765c7a9f95204316d6', users: this.activeUsers }), shouldShowCurrentUser && h("kritzel-current-user", { key: 'f03fd82e0adbd13746197e2f850cd378657aa2de', user: this.user, terms: this.resolvedTerms, onClick: () => this.currentUserDialogRef?.open() }), shouldShowCurrentUser && (h("kritzel-current-user-dialog", { key: '6b9e5ad046b65f874b0dc11e65264f998f8ce97c', ref: el => {
1034
1040
  if (el) {
1035
1041
  this.currentUserDialogRef = el;
1036
1042
  this.currentUserDialogRef.addEventListener('logoutRequest', this.handleCurrentUserLogout);
1037
1043
  }
1038
- }, user: this.user, terms: this.resolvedTerms })), shouldShowLoginButton && (h("kritzel-button", { key: '68ddf8c3aabc7634b4c1d88f3d2d584fa1f1b150', onButtonClick: () => this.loginDialogRef?.open() }, this.resolvedTerms['login.dialogTitle'] ?? 'Sign in')), h("kritzel-more-menu", { key: '39b938f5792f7a36bbf21ed88a1a5c7717a785a6', items: this.moreMenuItems, visible: this.isMoreMenuVisible, terms: this.resolvedTerms }), h("kritzel-share-dialog", { key: '61ed918499760d874d5d2ec140d3cf59ce94520b', ref: el => {
1044
+ }, user: this.user, terms: this.resolvedTerms })), shouldShowLoginButton && (h("kritzel-button", { key: '41adb50a6e861c57621d0ac65cbf5c8c152c096d', onButtonClick: () => this.loginDialogRef?.open() }, this.resolvedTerms['login.dialogTitle'] ?? 'Sign in')), h("kritzel-more-menu", { key: 'cc62a0b8a6af7d54637783f4138b7f5283e0ff58', items: this.moreMenuItems, visible: this.isMoreMenuVisible, terms: this.resolvedTerms }), h("kritzel-share-dialog", { key: '4239378411242077f1c44500e17cf9118842f44e', ref: el => {
1039
1045
  if (el) {
1040
1046
  this.shareDialogRef = el;
1041
1047
  }
1042
- }, isPublic: this.currentIsPublic, workspaceId: this.activeWorkspace?.id, terms: this.resolvedTerms, onToggleIsPublic: this.handleToggleIsPublic }), this.loginConfig && (h("kritzel-login-dialog", { key: '5f6528a57884bd1494e45755609e710f69041a4d', ref: el => {
1048
+ }, isPublic: this.currentIsPublic, workspaceId: this.activeWorkspace?.id, terms: this.resolvedTerms, onToggleIsPublic: this.handleToggleIsPublic }), this.loginConfig && (h("kritzel-login-dialog", { key: 'c68ce90d2cc0dc96eeafd36355b91e19f921d8f7', ref: el => {
1043
1049
  if (el) {
1044
1050
  this.loginDialogRef = el;
1045
1051
  }
@@ -3722,6 +3728,40 @@ export class KritzelEditor {
3722
3728
  "tags": []
3723
3729
  }
3724
3730
  },
3731
+ "beginSceneBootstrap": {
3732
+ "complexType": {
3733
+ "signature": "() => Promise<void>",
3734
+ "parameters": [],
3735
+ "references": {
3736
+ "Promise": {
3737
+ "location": "global",
3738
+ "id": "global::Promise"
3739
+ }
3740
+ },
3741
+ "return": "Promise<void>"
3742
+ },
3743
+ "docs": {
3744
+ "text": "",
3745
+ "tags": []
3746
+ }
3747
+ },
3748
+ "endSceneBootstrap": {
3749
+ "complexType": {
3750
+ "signature": "() => Promise<void>",
3751
+ "parameters": [],
3752
+ "references": {
3753
+ "Promise": {
3754
+ "location": "global",
3755
+ "id": "global::Promise"
3756
+ }
3757
+ },
3758
+ "return": "Promise<void>"
3759
+ },
3760
+ "docs": {
3761
+ "text": "",
3762
+ "tags": []
3763
+ }
3764
+ },
3725
3765
  "getDisplayableShortcuts": {
3726
3766
  "complexType": {
3727
3767
  "signature": "() => Promise<Omit<KritzelShortcut, \"action\" | \"condition\">[]>",
@@ -264,6 +264,31 @@ export class KritzelEngine {
264
264
  async triggerSelectionChange() {
265
265
  this.objectsSelectionChange.emit();
266
266
  }
267
+ /** Starts a scene bootstrap phase by hiding the scene immediately. */
268
+ async beginSceneBootstrap() {
269
+ if (this._sceneBootstrapTransitionTimer !== null) {
270
+ clearTimeout(this._sceneBootstrapTransitionTimer);
271
+ this._sceneBootstrapTransitionTimer = null;
272
+ }
273
+ this._sceneBootstrapTransitionEnabled = false;
274
+ this._sceneBootstrapOpacity = 0;
275
+ this.core.rerender();
276
+ }
277
+ /** Ends a scene bootstrap phase by fading the scene back in. */
278
+ async endSceneBootstrap() {
279
+ if (this._sceneBootstrapTransitionTimer !== null) {
280
+ clearTimeout(this._sceneBootstrapTransitionTimer);
281
+ this._sceneBootstrapTransitionTimer = null;
282
+ }
283
+ this._sceneBootstrapTransitionEnabled = true;
284
+ this._sceneBootstrapOpacity = 1;
285
+ this.core.rerender();
286
+ this._sceneBootstrapTransitionTimer = setTimeout(() => {
287
+ this._sceneBootstrapTransitionEnabled = false;
288
+ this._sceneBootstrapTransitionTimer = null;
289
+ this.core.rerender();
290
+ }, 220);
291
+ }
267
292
  handleWheel(ev) {
268
293
  if (this.core.store.isDisabled) {
269
294
  return;
@@ -1439,14 +1464,26 @@ export class KritzelEngine {
1439
1464
  // Revive and add objects to the current workspace
1440
1465
  if (data.objects && Array.isArray(data.objects)) {
1441
1466
  const reviver = new KritzelReviver(this.core);
1442
- for (const objData of data.objects) {
1443
- const revivedObj = reviver.revive(objData);
1444
- if (revivedObj) {
1467
+ const objectsMap = this.core.store.objects;
1468
+ const insertRevivedObjects = () => {
1469
+ for (const objData of data.objects) {
1470
+ const revivedObj = reviver.revive(objData);
1471
+ if (!revivedObj) {
1472
+ continue;
1473
+ }
1445
1474
  // Update workspaceId to the current workspace's ID
1446
1475
  revivedObj.workspaceId = currentWorkspaceId;
1447
1476
  this.core.addObject(revivedObj);
1448
1477
  loadedCount++;
1449
1478
  }
1479
+ };
1480
+ if (objectsMap) {
1481
+ objectsMap.transaction(() => {
1482
+ insertRevivedObjects();
1483
+ });
1484
+ }
1485
+ else {
1486
+ insertRevivedObjects();
1450
1487
  }
1451
1488
  }
1452
1489
  // Rerender to apply changes
@@ -1808,6 +1845,9 @@ export class KritzelEngine {
1808
1845
  _hasLoggedUnlicensedWelcomeBanner = false;
1809
1846
  _previousVisibleCustomElements = new Set();
1810
1847
  _revealedImageKeys = new Set();
1848
+ _sceneBootstrapOpacity = 1;
1849
+ _sceneBootstrapTransitionEnabled = false;
1850
+ _sceneBootstrapTransitionTimer = null;
1811
1851
  _defaultUndoState = {
1812
1852
  canUndo: false,
1813
1853
  canRedo: false,
@@ -1901,6 +1941,10 @@ export class KritzelEngine {
1901
1941
  disconnectedCallback() {
1902
1942
  this.throttledPointerMoveMulti.cancel();
1903
1943
  this._revealedImageKeys.clear();
1944
+ if (this._sceneBootstrapTransitionTimer !== null) {
1945
+ clearTimeout(this._sceneBootstrapTransitionTimer);
1946
+ this._sceneBootstrapTransitionTimer = null;
1947
+ }
1904
1948
  // Unmount all remaining custom elements
1905
1949
  if (this.core.store.allObjects) {
1906
1950
  this.core.store.allObjects.forEach(object => {
@@ -2349,6 +2393,9 @@ export class KritzelEngine {
2349
2393
  }
2350
2394
  return (h(Host, null, h("kritzel-loading-overlay", { visible: this.core.store.state.isLoading, text: this.core.localizationManager.translate('engine.loading') }), h("kritzel-sync-indicator", { visible: this.isSyncing, text: "Syncing..." }), this.core.store.state.debugInfo.showViewportInfo && (h("div", { class: "debug-panel" }, h("div", null, "ActiveWorkspaceId: ", this.core.store.state?.activeWorkspace?.id), h("div", null, "ActiveWorkspaceName: ", this.core.store.state?.activeWorkspace?.name), h("div", null, "TranslateX: ", this.core.store.state?.translateX), h("div", null, "TranslateY: ", this.core.store.state?.translateY), h("div", null, "ViewportWidth: ", this.core.store.state?.viewportWidth), h("div", null, "ViewportHeight: ", this.core.store.state?.viewportHeight), h("div", null, "PointerCount: ", this.core.store.state.pointers.size), h("div", null, "Scale: ", this.core.store.state?.scale), h("div", null, "ActiveTool: ", this.core.store.state?.activeTool?.name), h("div", null, "HasViewportChanged: ", this.core.store.state?.hasViewportChanged ? 'true' : 'false'), h("div", null, "IsEnabled: ", this.core.store.state?.isEnabled ? 'true' : 'false'), h("div", null, "IsScaling: ", this.core.store.state?.isScaling ? 'true' : 'false'), h("div", null, "IsPanning: ", this.core.store.state?.isPanning ? 'true' : 'false'), h("div", null, "IsSelecting: ", this.isSelecting ? 'true' : 'false'), h("div", null, "IsSelectionActive: ", this.isSelectionActive ? 'true' : 'false'), h("div", null, "IsResizeHandleSelected: ", this.core.store.state.isResizeHandleSelected ? 'true' : 'false'), h("div", null, "IsRotationHandleSelected: ", this.core.store.state.isRotationHandleSelected ? 'true' : 'false'), h("div", null, "IsRotationHandleHovered: ", this.core.store.state.isRotationHandleHovered ? 'true' : 'false'), h("div", null, "IsDrawing: ", this.core.store.state.isDrawing ? 'true' : 'false'), h("div", null, "IsWriting: ", this.core.store.state.isWriting ? 'true' : 'false'), h("div", null, "IsPointerDown: ", this.core.store.isPointerDown ? 'true' : 'false'), h("div", null, "PointerX: ", this.core.store.state?.pointerX), h("div", null, "PointerY: ", this.core.store.state?.pointerY), h("div", null, "TotalObjects: ", this.core.store.totalObjectCount), h("div", null, "ObjectsInViewport: ", this.core.store.objectsInViewport.length), h("div", null, "SelectedObjects: ", this.core.store.selectionGroup?.objects.length || 0), h("div", null, "ViewportCenter: (", viewportCenterX.toFixed(2), ", ", viewportCenterY.toFixed(2), ")"))), h("div", { id: "origin", class: "origin", style: {
2351
2395
  transform: `matrix(${this.core.store.state?.scale}, 0, 0, ${this.core.store.state?.scale}, ${this.core.store.state?.translateX}, ${this.core.store.state?.translateY})`,
2396
+ opacity: this._sceneBootstrapOpacity.toString(),
2397
+ transition: this._sceneBootstrapTransitionEnabled ? 'opacity 220ms ease-out' : 'none',
2398
+ willChange: this._sceneBootstrapTransitionEnabled ? 'opacity' : undefined,
2352
2399
  } }, visibleObjects?.map(object => {
2353
2400
  const { multiplied: effectiveOpacity, overridden: effectiveOpacityString } = this.getObjectEffectiveOpacity(object, viewportScale);
2354
2401
  return (h("div", { key: object.id, id: object.id, class: "object", style: {
@@ -3783,6 +3830,40 @@ export class KritzelEngine {
3783
3830
  "tags": []
3784
3831
  }
3785
3832
  },
3833
+ "beginSceneBootstrap": {
3834
+ "complexType": {
3835
+ "signature": "() => Promise<void>",
3836
+ "parameters": [],
3837
+ "references": {
3838
+ "Promise": {
3839
+ "location": "global",
3840
+ "id": "global::Promise"
3841
+ }
3842
+ },
3843
+ "return": "Promise<void>"
3844
+ },
3845
+ "docs": {
3846
+ "text": "Starts a scene bootstrap phase by hiding the scene immediately.",
3847
+ "tags": []
3848
+ }
3849
+ },
3850
+ "endSceneBootstrap": {
3851
+ "complexType": {
3852
+ "signature": "() => Promise<void>",
3853
+ "parameters": [],
3854
+ "references": {
3855
+ "Promise": {
3856
+ "location": "global",
3857
+ "id": "global::Promise"
3858
+ }
3859
+ },
3860
+ "return": "Promise<void>"
3861
+ },
3862
+ "docs": {
3863
+ "text": "Ends a scene bootstrap phase by fading the scene back in.",
3864
+ "tags": []
3865
+ }
3866
+ },
3786
3867
  "registerTool": {
3787
3868
  "complexType": {
3788
3869
  "signature": "(toolName: string, toolClass: any, toolConfig?: KritzelTextToolConfig | KritzelBrushToolConfig | KritzelLineToolConfig | KritzelShapeToolConfig) => Promise<KritzelBaseTool | null>",
@@ -3,4 +3,4 @@
3
3
  * This file is auto-generated by the version bump scripts.
4
4
  * Do not modify manually.
5
5
  */
6
- export const KRITZEL_VERSION = '0.4.4';
6
+ export const KRITZEL_VERSION = '0.4.6';