@layers-app/shared 0.2.5 → 0.2.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 (155) hide show
  1. package/dist/assets/svg/flags/es.svg.js +4 -0
  2. package/dist/assets/svg/flags/ru.svg.js +4 -0
  3. package/dist/assets/svg/flags/us.svg.js +4 -0
  4. package/dist/assets/svg/globeIcon.svg.js +5 -0
  5. package/dist/assets/svg/socials/github.svg.js +5 -0
  6. package/dist/assets/svg/socials/instagram.svg.js +5 -0
  7. package/dist/assets/svg/socials/x.svg.js +5 -0
  8. package/dist/assets/svg/socials/youtube.svg.js +5 -0
  9. package/dist/components/AppContainer/components/AppsSidebar/UserSection.d.ts.map +1 -1
  10. package/dist/components/AppContainer/components/AppsSidebar/UserSection.js +30 -30
  11. package/dist/components/AppContainer/hooks/useAppContainer.d.ts +1 -1
  12. package/dist/components/AppContainer/hooks/useAppContainer.d.ts.map +1 -1
  13. package/dist/components/AppContainer/hooks/useAppContainer.js +45 -42
  14. package/dist/components/AppContainer/hooks/useAppContainerDataStore.d.ts.map +1 -1
  15. package/dist/components/AppContainer/hooks/useAppContainerDataStore.js +1 -0
  16. package/dist/components/AppContainer/types.d.ts +1 -0
  17. package/dist/components/AppContainer/types.d.ts.map +1 -1
  18. package/dist/components/AttachmentsGalleryModal/components/ShakePlayer/ShakaPlayer.d.ts.map +1 -1
  19. package/dist/components/FilePicker/FilePicker.d.ts +33 -2
  20. package/dist/components/FilePicker/FilePicker.d.ts.map +1 -1
  21. package/dist/components/FilePicker/FilePicker.js +161 -110
  22. package/dist/components/FilePicker/FilePicker.module.css.js +9 -7
  23. package/dist/components/FilePicker/FilePickerGoogleDrive.d.ts +22 -0
  24. package/dist/components/FilePicker/FilePickerGoogleDrive.d.ts.map +1 -0
  25. package/dist/components/FilePicker/FilePickerGoogleDrive.js +86 -0
  26. package/dist/components/FilePicker/FilePickerUnsplash.d.ts.map +1 -1
  27. package/dist/components/FilePicker/FilePickerUnsplash.js +69 -52
  28. package/dist/components/FormViewer/hooks/useFormGlobalTheme.js +15 -15
  29. package/dist/components/FormViewer/hooks/useInterpolateText.js +3 -3
  30. package/dist/components/FormViewer/store/formStore.js +3 -3
  31. package/dist/components/FormViewer/store/selectors.js +1 -1
  32. package/dist/components/GroupAvatar/index.d.ts +1 -0
  33. package/dist/components/GroupAvatar/index.d.ts.map +1 -1
  34. package/dist/components/GroupAvatar/index.js +9 -8
  35. package/dist/components/ImageCropper/ImageCropper.d.ts +19 -0
  36. package/dist/components/ImageCropper/ImageCropper.d.ts.map +1 -0
  37. package/dist/components/ImageCropper/ImageCropper.js +356 -0
  38. package/dist/components/ImageCropper/ImageCropper.module.css.js +51 -0
  39. package/dist/components/ImageCropper/cropUtils.d.ts +22 -0
  40. package/dist/components/ImageCropper/cropUtils.d.ts.map +1 -0
  41. package/dist/components/ImageCropper/cropUtils.js +42 -0
  42. package/dist/components/ImageCropper/index.d.ts +4 -0
  43. package/dist/components/ImageCropper/index.d.ts.map +1 -0
  44. package/dist/components/ImageCropper/useCropInteraction.d.ts +28 -0
  45. package/dist/components/ImageCropper/useCropInteraction.d.ts.map +1 -0
  46. package/dist/components/ImageCropper/useCropInteraction.js +76 -0
  47. package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.d.ts +21 -0
  48. package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.d.ts.map +1 -0
  49. package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.js +73 -0
  50. package/dist/components/IntegrationFlowAnimation/IntegrationFlowAnimation.module.css.js +19 -0
  51. package/dist/components/IntegrationFlowAnimation/icons/GoogleDriveIcon.d.ts +6 -0
  52. package/dist/components/IntegrationFlowAnimation/icons/GoogleDriveIcon.d.ts.map +1 -0
  53. package/dist/components/IntegrationFlowAnimation/icons/GoogleDriveIcon.js +60 -0
  54. package/dist/components/IntegrationFlowAnimation/icons/LayersCubeIcon.d.ts +6 -0
  55. package/dist/components/IntegrationFlowAnimation/icons/LayersCubeIcon.d.ts.map +1 -0
  56. package/dist/components/IntegrationFlowAnimation/icons/LayersCubeIcon.js +21 -0
  57. package/dist/components/IntegrationFlowAnimation/icons/NotionIcon.d.ts +6 -0
  58. package/dist/components/IntegrationFlowAnimation/icons/NotionIcon.d.ts.map +1 -0
  59. package/dist/components/IntegrationFlowAnimation/icons/NotionIcon.js +35 -0
  60. package/dist/components/IntegrationFlowAnimation/icons/index.d.ts +4 -0
  61. package/dist/components/IntegrationFlowAnimation/icons/index.d.ts.map +1 -0
  62. package/dist/components/IntegrationFlowAnimation/index.d.ts +5 -0
  63. package/dist/components/IntegrationFlowAnimation/index.d.ts.map +1 -0
  64. package/dist/components/LanguagePicker/LanguagePicker.d.ts +2 -1
  65. package/dist/components/LanguagePicker/LanguagePicker.d.ts.map +1 -1
  66. package/dist/components/LanguagePicker/LanguagePicker.js +26 -22
  67. package/dist/components/MediaLibrary/MediaLibrary.d.ts +3 -0
  68. package/dist/components/MediaLibrary/MediaLibrary.d.ts.map +1 -0
  69. package/dist/components/MediaLibrary/MediaLibrary.js +93 -0
  70. package/dist/components/MediaLibrary/MediaLibrary.module.css.js +17 -0
  71. package/dist/components/MediaLibrary/MediaLibraryBreadcrumbs.d.ts +8 -0
  72. package/dist/components/MediaLibrary/MediaLibraryBreadcrumbs.d.ts.map +1 -0
  73. package/dist/components/MediaLibrary/MediaLibraryBreadcrumbs.js +22 -0
  74. package/dist/components/MediaLibrary/MediaLibraryBrowser.d.ts +12 -0
  75. package/dist/components/MediaLibrary/MediaLibraryBrowser.d.ts.map +1 -0
  76. package/dist/components/MediaLibrary/MediaLibraryBrowser.js +52 -0
  77. package/dist/components/MediaLibrary/MediaLibraryRow.d.ts +9 -0
  78. package/dist/components/MediaLibrary/MediaLibraryRow.d.ts.map +1 -0
  79. package/dist/components/MediaLibrary/MediaLibraryRow.js +29 -0
  80. package/dist/components/MediaLibrary/index.d.ts +4 -0
  81. package/dist/components/MediaLibrary/index.d.ts.map +1 -0
  82. package/dist/components/MediaLibrary/types.d.ts +31 -0
  83. package/dist/components/MediaLibrary/types.d.ts.map +1 -0
  84. package/dist/components/NoData/NoData.d.ts +6 -1
  85. package/dist/components/NoData/NoData.d.ts.map +1 -1
  86. package/dist/components/NoData/NoData.js +85 -82
  87. package/dist/components/SettingsSection/index.d.ts +12 -0
  88. package/dist/components/SettingsSection/index.d.ts.map +1 -0
  89. package/dist/components/SettingsSection/index.js +36 -0
  90. package/dist/components/SettingsSection/styles.module.css.js +7 -0
  91. package/dist/components/SocialLinkRow/index.d.ts +11 -0
  92. package/dist/components/SocialLinkRow/index.d.ts.map +1 -0
  93. package/dist/components/SocialLinkRow/index.js +109 -0
  94. package/dist/components/SortableList/components/SortableItem/SortableItem.js +3 -3
  95. package/dist/components/StorageUsageProgress/index.js +26 -24
  96. package/dist/components/TimezonePicker/index.d.ts +9 -0
  97. package/dist/components/TimezonePicker/index.d.ts.map +1 -0
  98. package/dist/components/TimezonePicker/index.js +90 -0
  99. package/dist/components/WorkspaceMenu/WorkspaceItem.d.ts.map +1 -1
  100. package/dist/components/WorkspaceMenu/WorkspaceItem.js +18 -17
  101. package/dist/components/WorkspaceMenu/WorkspaceMenu.d.ts.map +1 -1
  102. package/dist/components/WorkspaceMenu/WorkspaceMenu.js +70 -69
  103. package/dist/components/modals/RemoveConfirmModal.js +1 -1
  104. package/dist/components/table/components/TableHeaders.js +3 -3
  105. package/dist/components/table/components/TablePanel.js +1 -1
  106. package/dist/components/table/helpers/columns.js +3 -3
  107. package/dist/components/table/hooks/TableProvider.js +3 -3
  108. package/dist/components/table/selectors.js +6 -6
  109. package/dist/helpers/getFileType.d.ts +1 -2
  110. package/dist/helpers/getFileType.d.ts.map +1 -1
  111. package/dist/helpers/getFileType.js +5 -6
  112. package/dist/helpers/showNotifications.d.ts +14 -3
  113. package/dist/helpers/showNotifications.d.ts.map +1 -1
  114. package/dist/helpers/showNotifications.js +152 -61
  115. package/dist/helpers/showNotifications.module.css.js +29 -0
  116. package/dist/helpers/timezones.d.ts +12 -0
  117. package/dist/helpers/timezones.d.ts.map +1 -0
  118. package/dist/helpers/timezones.js +59 -0
  119. package/dist/hooks/useNumberQueryParam.js +3 -3
  120. package/dist/hooks/useVideoUploadGuard.d.ts +2 -0
  121. package/dist/hooks/useVideoUploadGuard.d.ts.map +1 -0
  122. package/dist/hooks/useVideoUploadGuard.js +24 -0
  123. package/dist/index.css +1 -1
  124. package/dist/index.d.ts +10 -1
  125. package/dist/index.d.ts.map +1 -1
  126. package/dist/index.js +449 -406
  127. package/dist/lang/locales/ui_en.json.js +24 -22
  128. package/dist/lang/locales/ui_es.json.js +20 -18
  129. package/dist/lang/locales/ui_ru.json.js +20 -18
  130. package/dist/lib/contentImport/index.d.ts +4 -0
  131. package/dist/lib/contentImport/index.d.ts.map +1 -0
  132. package/dist/lib/contentImport/lexicalSerializer.d.ts +19 -0
  133. package/dist/lib/contentImport/lexicalSerializer.d.ts.map +1 -0
  134. package/dist/lib/contentImport/lexicalSerializer.js +215 -0
  135. package/dist/lib/contentImport/types.d.ts +161 -0
  136. package/dist/lib/contentImport/types.d.ts.map +1 -0
  137. package/dist/lib/contentImport/utils.d.ts +35 -0
  138. package/dist/lib/contentImport/utils.d.ts.map +1 -0
  139. package/dist/lib/contentImport/utils.js +145 -0
  140. package/dist/node_modules/countries-and-timezones/esm/index.js +4031 -0
  141. package/dist/store/plansModal.d.ts.map +1 -1
  142. package/dist/store/plansModal.js +8 -7
  143. package/dist/utils/formatStorage.d.ts +7 -1
  144. package/dist/utils/formatStorage.d.ts.map +1 -1
  145. package/dist/utils/formatStorage.js +10 -5
  146. package/dist/utils/getCroppedBlob.d.ts +3 -0
  147. package/dist/utils/getCroppedBlob.d.ts.map +1 -0
  148. package/dist/utils/getCroppedBlob.js +21 -0
  149. package/package.json +1 -1
  150. package/dist/assets/images/flags/es.svg.js +0 -4
  151. package/dist/assets/images/flags/ru.svg.js +0 -4
  152. package/dist/assets/images/flags/us.svg.js +0 -4
  153. package/dist/components/PaymentSuccess/PaymentSuccess.d.ts +0 -2
  154. package/dist/components/PaymentSuccess/PaymentSuccess.d.ts.map +0 -1
  155. package/dist/components/PaymentSuccess/PaymentSuccess.js +0 -41
@@ -1,29 +1,31 @@
1
- const e = { searchResults: "Search results", icons: "Icons", searchNoResults: "No results found", chooseColor: "Choose color", categories: { activity: "Activities", custom: "Custom", flags: "Flags", foods: "Food and drinks", frequent: "Recent", nature: "Animals and nature", objects: "Objects", people: "Emotions and people", places: "Travel and places", symbols: "Symbols" } }, o = { label: "Image", change: "Change", description: "You can upload images up to 256×256 and up to 5mb." }, a = { colorGradients: "Colors and gradients", jamesWebbTelescope: "Telescope", nasaArchive: "Planet", theIndianEdition: "Cyberpunk", theMetMuseum: "Museum", theMetMuseumPatterns: "Pattern", theMetMuseumJapanesePrints: "Nature", rijkmuseum: "Black hole" }, s = { gallery: "Gallery", upload: "Upload", uploadFile: "Upload file", maxFileSize: "Images wider than 1600px are recommended. Maximum file size: 5MB.", link: "Link", searchImages: "Search Image", pasteLink: "Paste an image link...", submitLink: "Apply", worksWithAnyImage: "Works with any image from the Internet", searchImage: "Search for an image...", noResult: "No image found for your query.", change: "Change cover", invalidLink: "Invalid link", position: "Reposition", dragSave: "Save position", dragCancel: "Cancel" }, r = { color: "Color", background: "Background", colors: { standard: "Standard", gray: "Gray", brown: "Brown", orange: "Orange", yellow: "Yellow", green: "Green", blue: "Blue", purple: "Purple", pink: "Pink", red: "Red" } }, n = { save: "Save" }, i = "Remove", t = "Error", l = "Drag images here or click to select files", c = { dropFileHere: { image: "Drag images here or click to select files", video: "Drag videos here or click to select files", audio: "Drag audio files here or click to select files", file: "Drag files here or click to select files" }, description: { image: "Images wider than 1600px are recommended. Maximum file size: {{maxSize}}MB.", video: "Maximum file size: {{maxSize}}MB.", audio: "Maximum file size: {{maxSize}}MB.", file: "Maximum file size: {{maxSize}}MB.", avatar: "Images wider than 256×256 px are recommended. Maximum file size: {{maxSize}}MB." }, errors: { typeIsNotAllowed: "This file type is not supported", shouldNotExceed: "File size should not exceed 5 MB.", doNotUploadMoreThanSingleFile: "Please upload no more than one file." } }, u = { download: "Download", zoomOut: "Zoom out", zoomIn: "Zoom in", close: "Close", fileError: "Upload failed. Please try again." }, d = { day_one: "{{count}} day ago", day_other: "{{count}} days ago", hour_one: "{{count}} hour ago", hour_other: "{{count}} hours ago", minute_one: "{{count}} minute ago", minute_other: "{{count}} minutes ago", second_one: "{{count}} second ago", second_other: "{{count}} seconds ago", justNow: "just now", shortDay: "{{count}}d ago.", shortHour: "{{count}}h ago.", shortMinute: "{{count}}m ago.", shortSecond: "{{count}}s ago.", shortJustNow: "now." }, m = {
1
+ const e = { searchResults: "Search results", icons: "Icons", searchNoResults: "No results found", chooseColor: "Choose color", categories: { activity: "Activities", custom: "Custom", flags: "Flags", foods: "Food and drinks", frequent: "Recent", nature: "Animals and nature", objects: "Objects", people: "Emotions and people", places: "Travel and places", symbols: "Symbols" } }, o = { label: "Image", change: "Change", description: "You can upload images up to 256×256 and up to 5mb." }, i = { colorGradients: "Colors and gradients", jamesWebbTelescope: "Telescope", nasaArchive: "Planet", theIndianEdition: "Cyberpunk", theMetMuseum: "Museum", theMetMuseumPatterns: "Pattern", theMetMuseumJapanesePrints: "Nature", rijkmuseum: "Black hole" }, a = { gallery: "Gallery", upload: "Upload", uploadFile: "Upload file", maxFileSize: "Images wider than 1600px are recommended. Maximum file size: 5MB.", link: "Link", searchImages: "Search Image", pasteLink: "Paste an image link...", submitLink: "Apply", worksWithAnyImage: "Works with any image from the Internet", searchImage: "Search for an image...", noResult: "No image found for your query.", change: "Change cover", invalidLink: "Invalid link", position: "Reposition", dragSave: "Save position", dragCancel: "Cancel", photoBy: "By", googleDrive: "Google Drive", media: "Media" }, r = { googleDrive: "Google Drive", oneDrive: "OneDrive", dropbox: "Dropbox", connect: "Connect Google Drive", connectDescription: "Connect your Google Drive account to import files", disconnect: "Disconnect", openPicker: "Open Google Drive", importing: "Importing file...", importComplete: "File imported successfully", importFailed: "Failed to import file", retry: "Try again", description: "Import a file from your Google Drive", goToSettings: "Connect Google Drive in Settings to import files", searchFiles: "Search Google Drive" }, n = { color: "Color", background: "Background", colors: { standard: "Standard", gray: "Gray", brown: "Brown", orange: "Orange", yellow: "Yellow", green: "Green", blue: "Blue", purple: "Purple", pink: "Pink", red: "Red" } }, t = { save: "Save" }, s = "Remove", l = "Error", c = "Drag images here or click to select files", u = { dropFileHere: { image: "Drag images here or click to select files", video: "Drag videos here or click to select files", audio: "Drag audio files here or click to select files", file: "Drag files here or click to select files" }, description: { image: "Images wider than 1600px are recommended. Maximum file size: {{maxSize}}MB.", video: "Maximum file size: {{maxSize}}MB.", audio: "Maximum file size: {{maxSize}}MB.", file: "Maximum file size: {{maxSize}}MB.", avatar: "Images wider than 256×256 px are recommended. Maximum file size: {{maxSize}}MB." }, errors: { typeIsNotAllowed: "This file type is not supported", shouldNotExceed: "File size should not exceed 5 MB.", doNotUploadMoreThanSingleFile: "Please upload no more than one file." } }, d = { download: "Download", zoomOut: "Zoom out", zoomIn: "Zoom in", close: "Close", fileError: "Upload failed. Please try again." }, m = { day_one: "{{count}} day ago", day_other: "{{count}} days ago", hour_one: "{{count}} hour ago", hour_other: "{{count}} hours ago", minute_one: "{{count}} minute ago", minute_other: "{{count}} minutes ago", second_one: "{{count}} second ago", second_other: "{{count}} seconds ago", justNow: "just now", shortDay: "{{count}}d ago.", shortHour: "{{count}}h ago.", shortMinute: "{{count}}m ago.", shortSecond: "{{count}}s ago.", shortJustNow: "now." }, g = {
2
2
  emojiPicker: e,
3
3
  uploadImage: o,
4
- coverGroups: a,
5
- changeCover: s,
6
- colorPicker: r,
7
- customDrawer: n,
8
- remove: i,
9
- errorMessage: t,
10
- dropFileHere: l,
11
- filePicker: c,
12
- gallery: u,
13
- relativeTime: d
4
+ coverGroups: i,
5
+ changeCover: a,
6
+ externalDrive: r,
7
+ colorPicker: n,
8
+ customDrawer: t,
9
+ remove: s,
10
+ errorMessage: l,
11
+ dropFileHere: c,
12
+ filePicker: u,
13
+ gallery: d,
14
+ relativeTime: m
14
15
  };
15
16
  export {
16
- s as changeCover,
17
- r as colorPicker,
18
- a as coverGroups,
19
- n as customDrawer,
20
- m as default,
21
- l as dropFileHere,
17
+ a as changeCover,
18
+ n as colorPicker,
19
+ i as coverGroups,
20
+ t as customDrawer,
21
+ g as default,
22
+ c as dropFileHere,
22
23
  e as emojiPicker,
23
- t as errorMessage,
24
- c as filePicker,
25
- u as gallery,
26
- d as relativeTime,
27
- i as remove,
24
+ l as errorMessage,
25
+ r as externalDrive,
26
+ u as filePicker,
27
+ d as gallery,
28
+ m as relativeTime,
29
+ s as remove,
28
30
  o as uploadImage
29
31
  };
@@ -1,29 +1,31 @@
1
- const e = { searchResults: "Resultados de búsqueda", icons: "Iconos", searchNoResults: "No se encontraron resultados", chooseColor: "Elegir color", categories: { activity: "Actividades", custom: "Personalizado", flags: "Banderas", foods: "Comida y bebidas", frequent: "Usados frecuentemente", nature: "Animales y naturaleza", objects: "Objetos", people: "Emociones y personas", places: "Viajes y lugares", symbols: "Símbolos" } }, a = { label: "Imagen", change: "Cambiar", description: "Puedes subir imágenes de hasta 256×256 y hasta 5 MB." }, o = { colorGradients: "Colores y degradados", jamesWebbTelescope: "Telescopio", nasaArchive: "Planeta", theIndianEdition: "Cyberpunk", theMetMuseum: "Museo", theMetMuseumPatterns: "Patrón", theMetMuseumJapanesePrints: "Naturaleza", rijkmuseum: "Agujero negro" }, r = { gallery: "Galería", upload: "Subir", uploadFile: "Subir archivo", maxFileSize: "Se recomiendan imágenes de más de 1600px de ancho. Tamaño máximo de archivo: 5MB.", link: "Enlace", searchImages: "Buscar imagen", pasteLink: "Pegar enlace de imagen...", submitLink: "Aplicar", worksWithAnyImage: "Funciona con cualquier imagen de Internet", searchImage: "Buscar imagen...", noResult: "No se encontró ninguna imagen para tu búsqueda.", change: "Cambiar portada", invalidLink: "Enlace inválido", position: "Reposicionar", dragSave: "Guardar posición", dragCancel: "Cancelar" }, s = { color: "Color", background: "Fondo", colors: { standard: "Estándar", gray: "Gris", brown: "Marrón", orange: "Naranja", yellow: "Amarillo", green: "Verde", blue: "Azul", purple: "Púrpura", pink: "Rosa", red: "Rojo" } }, n = { save: "Guardar" }, i = "Eliminar", c = "Error", t = "Arrastra imágenes aquí o haz clic para seleccionar archivos", d = { dropFileHere: { image: "Arrastra imágenes aquí o haz clic para seleccionar archivos", video: "Arrastra videos aquí o haz clic para seleccionar archivos", audio: "Arrastra archivos de audio aquí o haz clic para seleccionar archivos", file: "Arrastra archivos aquí o haz clic para seleccionar archivos" }, description: { image: "Se recomiendan imágenes de más de 1600px de ancho. Tamaño máximo de archivo: {{maxSize}}MB.", video: "Tamaño máximo de archivo: {{maxSize}}MB.", audio: "Tamaño máximo de archivo: {{maxSize}}MB.", file: "Tamaño máximo de archivo: {{maxSize}}MB.", avatar: "Se recomiendan imágenes de más de 256×256 px. Tamaño máximo de archivo: {{maxSize}}MB." }, errors: { typeIsNotAllowed: "Este tipo de archivo no es compatible", shouldNotExceed: "El tamaño del archivo no debe exceder 5 MB.", doNotUploadMoreThanSingleFile: "Por favor, carga no más de un archivo." } }, l = { download: "Descargar", zoomOut: "Alejar", zoomIn: "Acercar", close: "Cerrar", fileError: "La carga falló. Por favor, inténtalo de nuevo." }, u = { day_one: "hace {{count}} día", day_other: "hace {{count}} días", hour_one: "hace {{count}} hora", hour_other: "hace {{count}} horas", minute_one: "hace {{count}} minuto", minute_other: "hace {{count}} minutos", second_one: "hace {{count}} segundo", second_other: "hace {{count}} segundos", justNow: "ahora mismo", shortDay: "hace {{count}}d.", shortHour: "hace {{count}}h.", shortMinute: "hace {{count}}m.", shortSecond: "hace {{count}}s.", shortJustNow: "ahora." }, m = {
1
+ const e = { searchResults: "Resultados de búsqueda", icons: "Iconos", searchNoResults: "No se encontraron resultados", chooseColor: "Elegir color", categories: { activity: "Actividades", custom: "Personalizado", flags: "Banderas", foods: "Comida y bebidas", frequent: "Usados frecuentemente", nature: "Animales y naturaleza", objects: "Objetos", people: "Emociones y personas", places: "Viajes y lugares", symbols: "Símbolos" } }, o = { label: "Imagen", change: "Cambiar", description: "Puedes subir imágenes de hasta 256×256 y hasta 5 MB." }, a = { colorGradients: "Colores y degradados", jamesWebbTelescope: "Telescopio", nasaArchive: "Planeta", theIndianEdition: "Cyberpunk", theMetMuseum: "Museo", theMetMuseumPatterns: "Patrón", theMetMuseumJapanesePrints: "Naturaleza", rijkmuseum: "Agujero negro" }, r = { gallery: "Galería", upload: "Subir", uploadFile: "Subir archivo", maxFileSize: "Se recomiendan imágenes de más de 1600px de ancho. Tamaño máximo de archivo: 5MB.", link: "Enlace", searchImages: "Buscar imagen", pasteLink: "Pegar enlace de imagen...", submitLink: "Aplicar", worksWithAnyImage: "Funciona con cualquier imagen de Internet", searchImage: "Buscar imagen...", noResult: "No se encontró ninguna imagen para tu búsqueda.", change: "Cambiar portada", invalidLink: "Enlace inválido", position: "Reposicionar", dragSave: "Guardar posición", dragCancel: "Cancelar", photoBy: "Por", googleDrive: "Google Drive", media: "Media" }, i = { googleDrive: "Google Drive", oneDrive: "OneDrive", dropbox: "Dropbox", connect: "Conectar Google Drive", connectDescription: "Conecta tu cuenta de Google Drive para importar archivos", disconnect: "Desconectar", openPicker: "Abrir Google Drive", importing: "Importando archivo...", importComplete: "Archivo importado exitosamente", importFailed: "Error al importar archivo", retry: "Intentar de nuevo", description: "Importar un archivo desde tu Google Drive", goToSettings: "Conecta Google Drive en Configuración para importar archivos", searchFiles: "Buscar en Google Drive" }, n = { color: "Color", background: "Fondo", colors: { standard: "Estándar", gray: "Gris", brown: "Marrón", orange: "Naranja", yellow: "Amarillo", green: "Verde", blue: "Azul", purple: "Púrpura", pink: "Rosa", red: "Rojo" } }, c = { save: "Guardar" }, s = "Eliminar", t = "Error", l = "Arrastra imágenes aquí o haz clic para seleccionar archivos", d = { dropFileHere: { image: "Arrastra imágenes aquí o haz clic para seleccionar archivos", video: "Arrastra videos aquí o haz clic para seleccionar archivos", audio: "Arrastra archivos de audio aquí o haz clic para seleccionar archivos", file: "Arrastra archivos aquí o haz clic para seleccionar archivos" }, description: { image: "Se recomiendan imágenes de más de 1600px de ancho. Tamaño máximo de archivo: {{maxSize}}MB.", video: "Tamaño máximo de archivo: {{maxSize}}MB.", audio: "Tamaño máximo de archivo: {{maxSize}}MB.", file: "Tamaño máximo de archivo: {{maxSize}}MB.", avatar: "Se recomiendan imágenes de más de 256×256 px. Tamaño máximo de archivo: {{maxSize}}MB." }, errors: { typeIsNotAllowed: "Este tipo de archivo no es compatible", shouldNotExceed: "El tamaño del archivo no debe exceder 5 MB.", doNotUploadMoreThanSingleFile: "Por favor, carga no más de un archivo." } }, m = { download: "Descargar", zoomOut: "Alejar", zoomIn: "Acercar", close: "Cerrar", fileError: "La carga falló. Por favor, inténtalo de nuevo." }, u = { day_one: "hace {{count}} día", day_other: "hace {{count}} días", hour_one: "hace {{count}} hora", hour_other: "hace {{count}} horas", minute_one: "hace {{count}} minuto", minute_other: "hace {{count}} minutos", second_one: "hace {{count}} segundo", second_other: "hace {{count}} segundos", justNow: "ahora mismo", shortDay: "hace {{count}}d.", shortHour: "hace {{count}}h.", shortMinute: "hace {{count}}m.", shortSecond: "hace {{count}}s.", shortJustNow: "ahora." }, h = {
2
2
  emojiPicker: e,
3
- uploadImage: a,
4
- coverGroups: o,
3
+ uploadImage: o,
4
+ coverGroups: a,
5
5
  changeCover: r,
6
- colorPicker: s,
7
- customDrawer: n,
8
- remove: i,
9
- errorMessage: c,
10
- dropFileHere: t,
6
+ externalDrive: i,
7
+ colorPicker: n,
8
+ customDrawer: c,
9
+ remove: s,
10
+ errorMessage: t,
11
+ dropFileHere: l,
11
12
  filePicker: d,
12
- gallery: l,
13
+ gallery: m,
13
14
  relativeTime: u
14
15
  };
15
16
  export {
16
17
  r as changeCover,
17
- s as colorPicker,
18
- o as coverGroups,
19
- n as customDrawer,
20
- m as default,
21
- t as dropFileHere,
18
+ n as colorPicker,
19
+ a as coverGroups,
20
+ c as customDrawer,
21
+ h as default,
22
+ l as dropFileHere,
22
23
  e as emojiPicker,
23
- c as errorMessage,
24
+ t as errorMessage,
25
+ i as externalDrive,
24
26
  d as filePicker,
25
- l as gallery,
27
+ m as gallery,
26
28
  u as relativeTime,
27
- i as remove,
28
- a as uploadImage
29
+ s as remove,
30
+ o as uploadImage
29
31
  };
@@ -1,29 +1,31 @@
1
- const e = { searchResults: "Результаты поиска", searchNoResults: "Результаты не найдены", icons: "Иконки", chooseColor: "Выбрать цвет", categories: { activity: "Активности", custom: "Свои", flags: "Флаги", foods: "Еда и напитки", frequent: "Часто используемые", nature: "Животные и природа", objects: "Предметы", people: "Эмоции и люди", places: "Путешествия и места", symbols: "Символы" } }, o = { colorGradients: "Цвета и градиенты", jamesWebbTelescope: "Телескоп", nasaArchive: "Планета", theIndianEdition: "Киберпанк", theMetMuseum: "Музей", theMetMuseumPatterns: "Паттерн", theMetMuseumJapanesePrints: "Природа", rijkmuseum: "Черная дыра" }, t = { gallery: "Галерея", upload: "Загрузить", uploadFile: "Загрузить файл", maxFileSize: "Рекомендуются изображения шире 1600px. Максимальный размер файла: 5МБ.", link: "Ссылка", searchImages: "Поиск изображения", pasteLink: "Вставьте ссылку на изображение...", submitLink: "Применить", worksWithAnyImage: "Работает с любыми изображениями из Интернета", searchImage: "Поиск изображения...", noResult: "По вашему запросу изображений не найдено", change: "Изменить обложку", invalidLink: "Неверная ссылка", position: "Изменить Позицию", dragSave: "Сохранить", dragCancel: "Отменить" }, n = { label: "Изображение", change: "Изменить", description: "Вы можете загружать изображения размером до 256×256 и весом до 5 МБ." }, r = { color: "Цвет", background: "Подложка", colors: { standard: "Стандартный", gray: "Серый", brown: "Коричневый", orange: "Оранжевый", yellow: "Желтый", green: "Зеленый", blue: "Синий", purple: "Фиолетовый", pink: "Розовый", red: "Красный" } }, s = { save: "Сохранить" }, a = "Удалить", c = "Ошибка", u = "Перетащите изображения сюда или нажмите, чтобы выбрать файлы", i = { dropFileHere: { image: "Перетащите изображения сюда или нажмите, чтобы выбрать файлы", video: "Перетащите видео сюда или нажмите, чтобы выбрать файлы", audio: "Перетащите аудио файлы сюда или нажмите, чтобы выбрать файлы", file: "Перетащите файлы сюда или нажмите, чтобы выбрать файлы" }, description: { image: "Рекомендуются изображения шире 1600px. Максимальный размер файла: {{maxSize}}МБ.", video: "Максимальный размер файла: {{maxSize}}МБ.", audio: "Максимальный размер файла: {{maxSize}}МБ.", file: "Максимальный размер файла: {{maxSize}}МБ.", avatar: "Рекомендуются изображения шире 256×256 px. Максимальный размер файла: {{maxSize}}МБ." }, errors: { typeIsNotAllowed: "Этот тип файла не поддерживается", shouldNotExceed: "Размер файла не должен превышать 5 МБ.", doNotUploadMoreThanSingleFile: "Пожалуйста, загрузите не более одного файла." } }, l = { download: "Скачать", zoomOut: "Уменьшить", zoomIn: "Приблизить", close: "Закрыть", fileError: "Загрузка не удалась. Попробуйте снова." }, d = { day_one: "{{count}} день назад", day_few: "{{count}} дня назад", day_many: "{{count}} дней назад", day_other: "{{count}} дней назад", hour_one: "{{count}} час назад", hour_few: "{{count}} часа назад", hour_many: "{{count}} часов назад", hour_other: "{{count}} часов назад", minute_one: "{{count}} минута назад", minute_few: "{{count}} минуты назад", minute_many: "{{count}} минут назад", minute_other: "{{count}} минут назад", second_one: "{{count}} секунда назад", second_few: "{{count}} секунды назад", second_many: "{{count}} секунд назад", second_other: "{{count}} секунд назад", justNow: "только что", shortDay: "{{count}}д назад.", shortHour: "{{count}}ч назад.", shortMinute: "{{count}}м назад.", shortSecond: "{{count}}с назад.", shortJustNow: "сейчас." }, m = {
1
+ const e = { searchResults: "Результаты поиска", searchNoResults: "Результаты не найдены", icons: "Иконки", chooseColor: "Выбрать цвет", categories: { activity: "Активности", custom: "Свои", flags: "Флаги", foods: "Еда и напитки", frequent: "Часто используемые", nature: "Животные и природа", objects: "Предметы", people: "Эмоции и люди", places: "Путешествия и места", symbols: "Символы" } }, o = { colorGradients: "Цвета и градиенты", jamesWebbTelescope: "Телескоп", nasaArchive: "Планета", theIndianEdition: "Киберпанк", theMetMuseum: "Музей", theMetMuseumPatterns: "Паттерн", theMetMuseumJapanesePrints: "Природа", rijkmuseum: "Черная дыра" }, t = { gallery: "Галерея", upload: "Загрузить", uploadFile: "Загрузить файл", maxFileSize: "Рекомендуются изображения шире 1600px. Максимальный размер файла: 5МБ.", link: "Ссылка", searchImages: "Поиск изображения", pasteLink: "Вставьте ссылку на изображение...", submitLink: "Применить", worksWithAnyImage: "Работает с любыми изображениями из Интернета", searchImage: "Поиск изображения...", noResult: "По вашему запросу изображений не найдено", change: "Изменить обложку", invalidLink: "Неверная ссылка", position: "Изменить Позицию", dragSave: "Сохранить", dragCancel: "Отменить", photoBy: "Автор", googleDrive: "Google Drive", media: "Медиа" }, n = { googleDrive: "Google Drive", oneDrive: "OneDrive", dropbox: "Dropbox", connect: "Подключить Google Drive", connectDescription: "Подключите Google Drive для импорта файлов", disconnect: "Отключить", openPicker: "Открыть Google Drive", importing: "Импорт файла...", importComplete: "Файл успешно импортирован", importFailed: "Не удалось импортировать файл", retry: "Попробовать снова", description: "Импортировать файл из Google Drive", goToSettings: "Подключите Google Drive в Настройках для импорта файлов", searchFiles: "Поиск в Google Drive" }, r = { label: "Изображение", change: "Изменить", description: "Вы можете загружать изображения размером до 256×256 и весом до 5 МБ." }, i = { color: "Цвет", background: "Подложка", colors: { standard: "Стандартный", gray: "Серый", brown: "Коричневый", orange: "Оранжевый", yellow: "Желтый", green: "Зеленый", blue: "Синий", purple: "Фиолетовый", pink: "Розовый", red: "Красный" } }, c = { save: "Сохранить" }, s = "Удалить", a = "Ошибка", u = "Перетащите изображения сюда или нажмите, чтобы выбрать файлы", l = { dropFileHere: { image: "Перетащите изображения сюда или нажмите, чтобы выбрать файлы", video: "Перетащите видео сюда или нажмите, чтобы выбрать файлы", audio: "Перетащите аудио файлы сюда или нажмите, чтобы выбрать файлы", file: "Перетащите файлы сюда или нажмите, чтобы выбрать файлы" }, description: { image: "Рекомендуются изображения шире 1600px. Максимальный размер файла: {{maxSize}}МБ.", video: "Максимальный размер файла: {{maxSize}}МБ.", audio: "Максимальный размер файла: {{maxSize}}МБ.", file: "Максимальный размер файла: {{maxSize}}МБ.", avatar: "Рекомендуются изображения шире 256×256 px. Максимальный размер файла: {{maxSize}}МБ." }, errors: { typeIsNotAllowed: "Этот тип файла не поддерживается", shouldNotExceed: "Размер файла не должен превышать 5 МБ.", doNotUploadMoreThanSingleFile: "Пожалуйста, загрузите не более одного файла." } }, d = { download: "Скачать", zoomOut: "Уменьшить", zoomIn: "Приблизить", close: "Закрыть", fileError: "Загрузка не удалась. Попробуйте снова." }, m = { day_one: "{{count}} день назад", day_few: "{{count}} дня назад", day_many: "{{count}} дней назад", day_other: "{{count}} дней назад", hour_one: "{{count}} час назад", hour_few: "{{count}} часа назад", hour_many: "{{count}} часов назад", hour_other: "{{count}} часов назад", minute_one: "{{count}} минута назад", minute_few: "{{count}} минуты назад", minute_many: "{{count}} минут назад", minute_other: "{{count}} минут назад", second_one: "{{count}} секунда назад", second_few: "{{count}} секунды назад", second_many: "{{count}} секунд назад", second_other: "{{count}} секунд назад", justNow: "только что", shortDay: "{{count}}д назад.", shortHour: "{{count}}ч назад.", shortMinute: "{{count}}м назад.", shortSecond: "{{count}}с назад.", shortJustNow: "сейчас." }, g = {
2
2
  emojiPicker: e,
3
3
  coverGroups: o,
4
4
  changeCover: t,
5
- uploadImage: n,
6
- colorPicker: r,
7
- customDrawer: s,
8
- remove: a,
9
- errorMessage: c,
5
+ externalDrive: n,
6
+ uploadImage: r,
7
+ colorPicker: i,
8
+ customDrawer: c,
9
+ remove: s,
10
+ errorMessage: a,
10
11
  dropFileHere: u,
11
- filePicker: i,
12
- gallery: l,
13
- relativeTime: d
12
+ filePicker: l,
13
+ gallery: d,
14
+ relativeTime: m
14
15
  };
15
16
  export {
16
17
  t as changeCover,
17
- r as colorPicker,
18
+ i as colorPicker,
18
19
  o as coverGroups,
19
- s as customDrawer,
20
- m as default,
20
+ c as customDrawer,
21
+ g as default,
21
22
  u as dropFileHere,
22
23
  e as emojiPicker,
23
- c as errorMessage,
24
- i as filePicker,
25
- l as gallery,
26
- d as relativeTime,
27
- a as remove,
28
- n as uploadImage
24
+ a as errorMessage,
25
+ n as externalDrive,
26
+ l as filePicker,
27
+ d as gallery,
28
+ m as relativeTime,
29
+ s as remove,
30
+ r as uploadImage
29
31
  };
@@ -0,0 +1,4 @@
1
+ export type { ContentImport } from './types';
2
+ export { serializeToLexicalHtml, type SerializerOptions, } from './lexicalSerializer';
3
+ export { escapeHtml, parseVideoUrl, getVideoEmbedUrl, parseEmbedUrl, isVideoPlatformUrl, type ParsedVideo, type ParsedEmbed, } from './utils';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/contentImport/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,EACL,sBAAsB,EACtB,KAAK,iBAAiB,GACvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,UAAU,EACV,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,KAAK,WAAW,EAChB,KAAK,WAAW,GACjB,MAAM,SAAS,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Universal Lexical HTML Serializer.
3
+ *
4
+ * Converts ContentImport.Block[] → HTML that matches Lexical's exportDOM()
5
+ * output. Integration-agnostic — knows nothing about Notion, Jira, etc.
6
+ *
7
+ * IMPORTANT: The generated HTML must include `dsd__theme__*` CSS classes
8
+ * that match the editor's theme configuration. This ensures correct rendering
9
+ * in both the Lexical editor (via importDOM) AND the public/share view
10
+ * (via dangerouslySetInnerHTML + StylesProvider CSS).
11
+ */
12
+ import type { ContentImport } from './types';
13
+ export type SerializerOptions = ContentImport.SerializerOptions;
14
+ /**
15
+ * Serialize universal blocks to Lexical-compatible HTML.
16
+ * Handles list grouping, nested structures, and all Lexical patterns.
17
+ */
18
+ export declare function serializeToLexicalHtml(blocks: ContentImport.Block[], options?: SerializerOptions): Promise<string>;
19
+ //# sourceMappingURL=lexicalSerializer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lexicalSerializer.d.ts","sourceRoot":"","sources":["../../../src/lib/contentImport/lexicalSerializer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAI7C,MAAM,MAAM,iBAAiB,GAAG,aAAa,CAAC,iBAAiB,CAAC;AAIhE;;;GAGG;AACH,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,aAAa,CAAC,KAAK,EAAE,EAC7B,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,MAAM,CAAC,CA+CjB"}
@@ -0,0 +1,215 @@
1
+ import { escapeHtml as n, getVideoEmbedUrl as v } from "./utils.js";
2
+ async function w(e, i) {
3
+ const t = [];
4
+ let a = 0;
5
+ for (; a < e.length; ) {
6
+ const l = e[a];
7
+ if (l.type === "bulleted_list_item") {
8
+ const s = [];
9
+ for (; a < e.length && e[a].type === "bulleted_list_item"; )
10
+ s.push(await d(e[a], i)), a++;
11
+ t.push(`<ul class="dsd__theme__ul">${s.join("")}</ul>`);
12
+ continue;
13
+ }
14
+ if (l.type === "numbered_list_item") {
15
+ const s = [];
16
+ for (; a < e.length && e[a].type === "numbered_list_item"; )
17
+ s.push(await d(e[a], i)), a++;
18
+ t.push(`<ol class="dsd__theme__ol1">${s.join("")}</ol>`);
19
+ continue;
20
+ }
21
+ if (l.type === "checklist_item") {
22
+ const s = [];
23
+ for (; a < e.length && e[a].type === "checklist_item"; )
24
+ s.push(await d(e[a], i)), a++;
25
+ t.push(
26
+ `<ul __lexicallisttype="check" class="dsd__theme__checklist">${s.join("")}</ul>`
27
+ );
28
+ continue;
29
+ }
30
+ t.push(await d(l, i)), a++;
31
+ }
32
+ return t.join(`
33
+ `);
34
+ }
35
+ async function d(e, i) {
36
+ let t = "";
37
+ if (e.children && e.children.length > 0 && (t = await w(e.children, i)), e.type === "image" && i?.onImageFound)
38
+ try {
39
+ const a = await i.onImageFound(e.url);
40
+ e.url = a;
41
+ } catch {
42
+ }
43
+ switch (e.type) {
44
+ case "paragraph":
45
+ return y(e, t);
46
+ case "heading":
47
+ return x(e);
48
+ case "bulleted_list_item":
49
+ return p(e, t, "ul");
50
+ case "numbered_list_item":
51
+ return p(e, t, "ol");
52
+ case "checklist_item":
53
+ return z(e, t);
54
+ case "quote":
55
+ return C(e, t);
56
+ case "callout":
57
+ return j(e, t);
58
+ case "toggle":
59
+ return I(e, t);
60
+ case "code":
61
+ return H(e, i);
62
+ case "divider":
63
+ return "<hr />";
64
+ case "image":
65
+ return L(e);
66
+ case "video":
67
+ return U(e);
68
+ case "audio":
69
+ return R(e);
70
+ case "file":
71
+ return q(e);
72
+ case "embed":
73
+ return A(e);
74
+ case "bookmark":
75
+ return S(e);
76
+ case "table":
77
+ return B(e);
78
+ case "table_row":
79
+ return E(e);
80
+ case "column_list":
81
+ return F(e, t);
82
+ case "column":
83
+ return T(t);
84
+ case "child_docs":
85
+ return '<div data-child-docs="true"></div>';
86
+ default:
87
+ return "";
88
+ }
89
+ }
90
+ function r(e) {
91
+ return !e || e.length === 0 ? "" : e.map((i) => {
92
+ let t = n(i.text);
93
+ i.annotations?.code && (t = `<code class="dsd__theme__textCode">${t}</code>`), i.annotations?.bold && (t = `<strong class="dsd__theme__textBold">${t}</strong>`), i.annotations?.italic && (t = `<em class="dsd__theme__textItalic">${t}</em>`), i.annotations?.strikethrough && (t = `<s class="dsd__theme__textStrikethrough">${t}</s>`), i.annotations?.underline && (t = `<u class="dsd__theme__textUnderline">${t}</u>`);
94
+ const a = [];
95
+ return i.annotations?.color && a.push(`color: ${i.annotations.color}`), i.annotations?.backgroundColor && a.push(`background-color: ${i.annotations.backgroundColor}`), a.length > 0 && (t = `<span lexical-element="true" style="${a.join("; ")}">${t}</span>`), i.link && (t = `<a href="${n(i.link.url)}" class="dsd__theme__link">${t}</a>`), t;
96
+ }).join("");
97
+ }
98
+ function o(e) {
99
+ return !e || e.length === 0 ? "" : `<p class="dsd__theme__paragraph" dir="ltr"><em class="dsd__theme__textItalic">${r(e)}</em></p>`;
100
+ }
101
+ function y(e, i) {
102
+ return `<p class="dsd__theme__paragraph" dir="ltr">${r(e.content)}</p>${i}`;
103
+ }
104
+ function x(e) {
105
+ const i = r(e.content);
106
+ return `<h${e.level} class="dsd__theme__h${e.level}" dir="ltr">${i}</h${e.level}>`;
107
+ }
108
+ function p(e, i, t) {
109
+ const a = r(e.content), s = i ? `<li class="dsd__theme__nestedListItem"><${t} class="${t === "ul" ? "dsd__theme__ul" : "dsd__theme__ol1"}">${i}</${t}></li>` : "";
110
+ return `<li class="dsd__theme__listItem" dir="ltr">${a}${s}</li>`;
111
+ }
112
+ function z(e, i) {
113
+ const t = r(e.content), a = e.checked ? "dsd__theme__listItemChecked" : "dsd__theme__listItemUnchecked", l = i ? `<ul __lexicallisttype="check" class="dsd__theme__checklist">${i}</ul>` : "";
114
+ return `<li class="${a}" dir="ltr" aria-checked="${e.checked}">${t}${l}</li>`;
115
+ }
116
+ function C(e, i) {
117
+ return `<blockquote class="dsd__theme__quote">${r(e.content)}${i}</blockquote>`;
118
+ }
119
+ function j(e, i) {
120
+ const t = n(e.emoji), a = `e=${encodeURIComponent(e.emoji)}`, l = r(e.content);
121
+ return `<div class="dsd__theme__callout-wrapper" data-type="${t}" style="background-color: ${e.backgroundColor}"><div class="callout-image" data-emoji="${n(a)}" data-emoji-char="${t}"></div><div class="dsd__theme__callout-container">${l}${i}</div></div>`;
122
+ }
123
+ function I(e, i) {
124
+ const t = r(e.title);
125
+ let a = "";
126
+ return e.headingLevel === 1 ? a = ' style="font-weight:700;font-size:1.875em;line-height:1.3;margin:0"' : e.headingLevel === 2 ? a = ' style="font-weight:600;font-size:1.5em;line-height:1.3;margin:0"' : e.headingLevel === 3 ? a = ' style="font-weight:600;font-size:1.25em;line-height:1.3;margin:0"' : e.headingLevel === 4 ? a = ' style="font-weight:600;font-size:1.125em;line-height:1.3;margin:0"' : e.headingLevel === 5 ? a = ' style="font-weight:600;font-size:1em;line-height:1.3;margin:0"' : e.headingLevel === 6 && (a = ' style="font-weight:600;font-size:0.875em;line-height:1.3;margin:0"'), `<details class="Collapsible__container"><summary class="Collapsible__title"${a}>${t}</summary><div class="Collapsible__content" data-lexical-collapsible-content="true">${i}</div></details>`;
127
+ }
128
+ function H(e, i) {
129
+ const t = (e.language || "").toLowerCase().trim(), a = i?.normalizeLanguage?.(t) ?? t, l = a && a !== "plain" ? n(a) : "";
130
+ return '<pre class="dsd__theme__code"' + (l ? ` data-language="${l}" data-highlight-language="${l}"` : "") + ` data-collapsed="false">${n(e.code)}</pre>`;
131
+ }
132
+ function L(e) {
133
+ const i = e.caption && e.caption.length > 0 ? `<figcaption>${r(e.caption)}</figcaption>` : "";
134
+ return `<figure><img src="${n(e.url)}" alt="${n(e.alt || "")}" data-id="0" width="inherit" height="inherit" />` + i + "</figure>";
135
+ }
136
+ function U(e) {
137
+ if (!e.url)
138
+ return '<p class="dsd__theme__paragraph" dir="ltr"><em class="dsd__theme__textItalic">Video unavailable</em></p>';
139
+ const i = o(e.caption);
140
+ if (e.platform !== "link") {
141
+ const t = v(e.platform, e.videoId);
142
+ return `<iframe src="${n(t)}" data-lexical-platform="${n(e.platform)}" data-lexical-videoid="${n(e.videoId)}" width="100%" height="100%" frameborder="0" allowfullscreen></iframe>` + i;
143
+ }
144
+ return `<video src="${n(e.url)}" data-lexical-platform="link" data-lexical-videoid="${n(e.url)}" controls width="100%" height="100%"></video>` + i;
145
+ }
146
+ function R(e) {
147
+ const i = o(e.caption);
148
+ return `<span class="audio-container" data-src="${n(e.url)}"><audio controls src="${n(e.url)}"></audio></span>` + i;
149
+ }
150
+ function q(e) {
151
+ const i = e.url.split("/").pop()?.split("?")[0]?.split(".").pop()?.toLowerCase() || "", a = {
152
+ pdf: "📄",
153
+ doc: "📝",
154
+ docx: "📝",
155
+ xls: "📊",
156
+ xlsx: "📊",
157
+ csv: "📊",
158
+ ppt: "📊",
159
+ pptx: "📊",
160
+ zip: "📦",
161
+ rar: "📦",
162
+ "7z": "📦",
163
+ mp3: "🎵",
164
+ wav: "🎵",
165
+ ogg: "🎵",
166
+ mp4: "🎬",
167
+ mov: "🎬",
168
+ png: "🖼️",
169
+ jpg: "🖼️",
170
+ jpeg: "🖼️",
171
+ gif: "🖼️",
172
+ svg: "🖼️"
173
+ }[i] || "📎", l = o(e.caption);
174
+ return `<span class="file-container" data-src="${n(e.url)}" width="100" height="100" style="justify-content: left"><div>${a} ${n(e.label)}</div></span>` + l;
175
+ }
176
+ function A(e) {
177
+ if (!e.url) return "";
178
+ const i = o(e.caption);
179
+ return `<iframe data-lexical-platform="${n(e.platform)}" data-lexical-embedid="${n(e.embedId)}" src="${n(e.url)}" width="100%" height="376px" frameborder="0" allowfullscreen></iframe>` + i;
180
+ }
181
+ function S(e) {
182
+ const i = e.label && e.label.length > 0 ? r(e.label) : n(e.url);
183
+ let t = "";
184
+ try {
185
+ t = new URL(e.url).hostname;
186
+ } catch {
187
+ }
188
+ const a = t ? ` <em style="color:#9b9a97;font-size:0.85em">(${n(t)})</em>` : "";
189
+ return `<p class="dsd__theme__paragraph" dir="ltr"><a href="${n(e.url)}" target="_blank" rel="noopener noreferrer" class="dsd__theme__link">${i}</a>${a}</p>`;
190
+ }
191
+ function B(e) {
192
+ return `<div class="dsd__theme__table-scrollable-wrapper"><table class="dsd__theme__table">${(e.children || []).map((a, l) => {
193
+ const s = e.hasColumnHeader && l === 0;
194
+ return `<tr>${(a.cells || []).map((f, c) => {
195
+ const _ = r(f), g = _ ? `<p class="dsd__theme__paragraph" dir="ltr">${_}</p>` : "", u = a.cellColors?.[c], $ = u ? ` style="background-color: ${u}"` : "", h = s || e.hasRowHeader && c === 0 && !s, m = h ? "th" : "td";
196
+ return `<${m} class="${h ? "dsd__theme__tableCellHeader" : "dsd__theme__tableCell"}"${$}>${g}</${m}>`;
197
+ }).join("")}</tr>`;
198
+ }).join("")}</table></div>`;
199
+ }
200
+ function E(e) {
201
+ return `<tr>${(e.cells || []).map((t) => {
202
+ const a = r(t);
203
+ return `<td class="dsd__theme__tableCell">${a ? `<p class="dsd__theme__paragraph" dir="ltr">${a}</p>` : ""}</td>`;
204
+ }).join("")}</tr>`;
205
+ }
206
+ function F(e, i) {
207
+ const t = e.children?.length || 2;
208
+ return `<div data-lexical-layout-container="true" class="dsd__theme__layoutContainer" style="grid-template-columns: ${Array(t).fill("1fr").join(" ")}">${i}</div>`;
209
+ }
210
+ function T(e) {
211
+ return '<div class="dsd__theme__layoutItem">' + e + '<div class="dsd__theme__layoutDivider"></div></div>';
212
+ }
213
+ export {
214
+ w as serializeToLexicalHtml
215
+ };
@@ -0,0 +1,161 @@
1
+ /**
2
+ * Universal intermediate format for importing content into LAYERS.
3
+ *
4
+ * Integration adapters (Notion, Jira, Google Docs, …) transform their
5
+ * source-specific data into this format. The Lexical serializer then
6
+ * converts it to HTML that matches Lexical's importDOM expectations.
7
+ */
8
+ export declare namespace ContentImport {
9
+ interface RichTextSegment {
10
+ text: string;
11
+ annotations?: {
12
+ bold?: boolean;
13
+ italic?: boolean;
14
+ strikethrough?: boolean;
15
+ underline?: boolean;
16
+ code?: boolean;
17
+ /** CSS color value, e.g. "#9b9a97" */
18
+ color?: string;
19
+ /** CSS background-color value, e.g. "#ebeced" */
20
+ backgroundColor?: string;
21
+ };
22
+ link?: {
23
+ url: string;
24
+ };
25
+ }
26
+ type BlockType = 'paragraph' | 'heading' | 'bulleted_list_item' | 'numbered_list_item' | 'checklist_item' | 'quote' | 'callout' | 'toggle' | 'code' | 'divider' | 'image' | 'video' | 'audio' | 'file' | 'embed' | 'bookmark' | 'table' | 'table_row' | 'column_list' | 'column' | 'child_docs';
27
+ interface BaseBlock {
28
+ type: BlockType;
29
+ children?: Block[];
30
+ }
31
+ interface TextBlock extends BaseBlock {
32
+ type: 'paragraph' | 'quote';
33
+ content: RichTextSegment[];
34
+ }
35
+ interface HeadingBlock extends BaseBlock {
36
+ type: 'heading';
37
+ level: 1 | 2 | 3 | 4 | 5 | 6;
38
+ content: RichTextSegment[];
39
+ }
40
+ interface ListItemBlock extends BaseBlock {
41
+ type: 'bulleted_list_item' | 'numbered_list_item';
42
+ content: RichTextSegment[];
43
+ }
44
+ interface ChecklistItemBlock extends BaseBlock {
45
+ type: 'checklist_item';
46
+ content: RichTextSegment[];
47
+ checked: boolean;
48
+ }
49
+ interface CalloutBlock extends BaseBlock {
50
+ type: 'callout';
51
+ content: RichTextSegment[];
52
+ emoji: string;
53
+ /** CSS hex background-color, e.g. "#faebdd" */
54
+ backgroundColor: string;
55
+ }
56
+ interface ToggleBlock extends BaseBlock {
57
+ type: 'toggle';
58
+ title: RichTextSegment[];
59
+ /** When toggle was created from a toggleable heading, stores the original level */
60
+ headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
61
+ }
62
+ interface CodeBlock extends BaseBlock {
63
+ type: 'code';
64
+ /** Language identifier, e.g. "typescript", "python" */
65
+ language: string;
66
+ /** Raw code text (not rich text) */
67
+ code: string;
68
+ }
69
+ interface DividerBlock extends BaseBlock {
70
+ type: 'divider';
71
+ }
72
+ interface ImageBlock extends BaseBlock {
73
+ type: 'image';
74
+ url: string;
75
+ alt?: string;
76
+ caption?: RichTextSegment[];
77
+ }
78
+ interface VideoBlock extends BaseBlock {
79
+ type: 'video';
80
+ url: string;
81
+ /** "youtube" | "vimeo" | "vk" | "rutube" | "link" */
82
+ platform: string;
83
+ /** Platform-specific video ID, or the full URL for "link" */
84
+ videoId: string;
85
+ caption?: RichTextSegment[];
86
+ }
87
+ interface AudioBlock extends BaseBlock {
88
+ type: 'audio';
89
+ url: string;
90
+ caption?: RichTextSegment[];
91
+ }
92
+ interface FileBlock extends BaseBlock {
93
+ type: 'file';
94
+ url: string;
95
+ /** Display name shown to the user */
96
+ label: string;
97
+ caption?: RichTextSegment[];
98
+ }
99
+ interface EmbedBlock extends BaseBlock {
100
+ type: 'embed';
101
+ url: string;
102
+ /** "figma" | "spotify" | "miro" | "google-docs" | "generic" | … */
103
+ platform: string;
104
+ /** Platform-specific embed ID, or the full URL */
105
+ embedId: string;
106
+ caption?: RichTextSegment[];
107
+ }
108
+ interface BookmarkBlock extends BaseBlock {
109
+ type: 'bookmark';
110
+ url: string;
111
+ label?: RichTextSegment[];
112
+ }
113
+ interface TableBlock extends BaseBlock {
114
+ type: 'table';
115
+ hasColumnHeader: boolean;
116
+ hasRowHeader: boolean;
117
+ }
118
+ interface TableRowBlock extends BaseBlock {
119
+ type: 'table_row';
120
+ cells: RichTextSegment[][];
121
+ /** Per-cell background colors extracted from source annotations */
122
+ cellColors?: (string | null)[];
123
+ }
124
+ interface ColumnListBlock extends BaseBlock {
125
+ type: 'column_list';
126
+ }
127
+ interface ColumnBlock extends BaseBlock {
128
+ type: 'column';
129
+ }
130
+ interface ChildDocsBlock extends BaseBlock {
131
+ type: 'child_docs';
132
+ }
133
+ type Block = TextBlock | HeadingBlock | ListItemBlock | ChecklistItemBlock | CalloutBlock | ToggleBlock | CodeBlock | DividerBlock | ImageBlock | VideoBlock | AudioBlock | FileBlock | EmbedBlock | BookmarkBlock | TableBlock | TableRowBlock | ColumnListBlock | ColumnBlock | ChildDocsBlock;
134
+ interface SerializerOptions {
135
+ /** Called when an image block is encountered. Return a new URL (e.g. after re-uploading). */
136
+ onImageFound?: (url: string) => Promise<string>;
137
+ /** Source-specific language normalization (e.g. "plain text" → "plain"). */
138
+ normalizeLanguage?: (lang: string) => string;
139
+ }
140
+ /** Standard result returned by any source adapter (Notion, ClickUp, Jira, …). */
141
+ interface AdapterResult {
142
+ title: string;
143
+ /** Icon in IconEntity format, e.g. "e=💡" */
144
+ icon?: string;
145
+ blocks: Block[];
146
+ /**
147
+ * Index of the parent page in the same AdapterResult[] array.
148
+ * `undefined` means root-level (parent is workspace).
149
+ * Adapters must topologically sort their results so that
150
+ * parents appear before their children.
151
+ */
152
+ parentIndex?: number;
153
+ /**
154
+ * Pre-serialized Lexical HTML. When set, the import pipeline
155
+ * skips `serializeToLexicalHtml()` and uses this value directly.
156
+ * This allows adapters to overlap serialization with I/O.
157
+ */
158
+ _preSerializedHtml?: string;
159
+ }
160
+ }
161
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/contentImport/types.ts"],"names":[],"mappings":"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"}