@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
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Shared utilities for content import serialization.
3
+ * Integration-agnostic — no source-specific logic.
4
+ */
5
+ export declare function escapeHtml(text: string): string;
6
+ export interface ParsedVideo {
7
+ platform: string;
8
+ id: string;
9
+ }
10
+ /**
11
+ * Parse a video URL into platform + video ID.
12
+ * Detects YouTube, VK, Rutube. Falls back to "link".
13
+ * NOTE: Vimeo is handled by the editor's EmbedNode, not VideoNode.
14
+ */
15
+ export declare function parseVideoUrl(url: string): ParsedVideo;
16
+ /**
17
+ * Get an embeddable URL for a video platform + ID.
18
+ */
19
+ export declare function getVideoEmbedUrl(platform: string, id: string): string;
20
+ export interface ParsedEmbed {
21
+ platform: string;
22
+ id: string;
23
+ }
24
+ /**
25
+ * Parse an embed URL into platform + embed ID.
26
+ * Detects all platforms supported by the Lexical editor's EmbedNode.
27
+ */
28
+ export declare function parseEmbedUrl(url: string): ParsedEmbed;
29
+ /**
30
+ * Check if a URL points to a known video platform (YouTube, VK, Rutube).
31
+ * Used by the embed handler to route video-capable URLs to VideoBlock.
32
+ * NOTE: Vimeo is excluded — it maps to EmbedNode in the editor.
33
+ */
34
+ export declare function isVideoPlatformUrl(url: string): boolean;
35
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/lib/contentImport/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAO/C;AAID,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAqCtD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAWrE;AAID,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CA2MtD;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAGvD"}
@@ -0,0 +1,145 @@
1
+ function r(o) {
2
+ return o.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
3
+ }
4
+ function e(o) {
5
+ try {
6
+ const i = new URL(o);
7
+ if (i.hostname === "www.youtube.com" || i.hostname === "youtube.com" || i.hostname === "m.youtube.com") {
8
+ const t = i.searchParams.get("v");
9
+ if (t) return { platform: "youtube", id: t };
10
+ }
11
+ if (i.hostname === "youtu.be") {
12
+ const t = i.pathname.slice(1);
13
+ if (t) return { platform: "youtube", id: t };
14
+ }
15
+ if (i.hostname === "vk.com" || i.hostname === "www.vk.com" || i.hostname === "vkvideo.ru")
16
+ return { platform: "vk", id: o };
17
+ if (i.hostname === "rutube.ru" || i.hostname === "www.rutube.ru") {
18
+ const t = i.pathname.match(/\/video\/([a-f0-9]+)/);
19
+ if (t) return { platform: "rutube", id: t[1] };
20
+ }
21
+ } catch {
22
+ }
23
+ return { platform: "link", id: o };
24
+ }
25
+ function a(o, i) {
26
+ switch (o) {
27
+ case "youtube":
28
+ return `https://www.youtube.com/embed/${i}`;
29
+ case "rutube":
30
+ return `https://rutube.ru/play/embed/${i}`;
31
+ case "vk":
32
+ return i;
33
+ default:
34
+ return i;
35
+ }
36
+ }
37
+ function m(o) {
38
+ try {
39
+ const i = new URL(o), t = i.hostname;
40
+ if (t === "www.figma.com" || t === "figma.com")
41
+ return { platform: "figma", id: o };
42
+ if (t === "open.spotify.com" || t === "spotify.com")
43
+ return { platform: "spotify", id: o };
44
+ if (t === "vimeo.com" || t === "www.vimeo.com" || t === "player.vimeo.com")
45
+ return { platform: "vimeo", id: o };
46
+ if (t === "miro.com" || t === "www.miro.com")
47
+ return { platform: "miro", id: o };
48
+ if (t.includes("excalidraw.com"))
49
+ return { platform: "excalidraw", id: o };
50
+ if (t.includes("tldraw.com"))
51
+ return { platform: "tldraw", id: o };
52
+ if (t === "docs.google.com")
53
+ return i.pathname.includes("/forms/") ? { platform: "google-forms", id: o } : i.pathname.includes("/drawings/") ? { platform: "google-drawings", id: o } : i.pathname.includes("/document/") ? { platform: "google-docs", id: o } : i.pathname.includes("/spreadsheets/") ? { platform: "google-sheets", id: o } : i.pathname.includes("/presentation/") ? { platform: "google-slides", id: o } : { platform: "google-docs", id: o };
54
+ if (t === "drive.google.com")
55
+ return { platform: "google-drive", id: o };
56
+ if (t === "calendar.google.com")
57
+ return { platform: "google-calendar", id: o };
58
+ if (t === "www.google.com" && (i.pathname.startsWith("/maps") || i.pathname.startsWith("/maps/")))
59
+ return { platform: "google-maps", id: o };
60
+ if (t === "maps.app.goo.gl" || t === "goo.gl")
61
+ return { platform: "google-maps", id: o };
62
+ if (t === "codepen.io" || t === "www.codepen.io")
63
+ return { platform: "codepen", id: o };
64
+ if (t === "gist.github.com")
65
+ return { platform: "github", id: o };
66
+ if (t === "dbdiagram.io" || t === "www.dbdiagram.io")
67
+ return { platform: "dbdiagram", id: o };
68
+ if (t === "viewer.diagrams.net" || t === "app.diagrams.net")
69
+ return { platform: "diagrams", id: o };
70
+ if (t === "www.loom.com" || t === "loom.com")
71
+ return { platform: "loom", id: o };
72
+ if (t === "share.descript.com")
73
+ return { platform: "descript", id: o };
74
+ if (t === "airtable.com" || t === "www.airtable.com")
75
+ return { platform: "airtable", id: o };
76
+ if (t === "trello.com" || t === "www.trello.com")
77
+ return { platform: "trello", id: o };
78
+ if (t === "www.instagram.com" || t === "instagram.com")
79
+ return { platform: "instagram", id: o };
80
+ if (t === "twitter.com" || t === "www.twitter.com" || t === "x.com" || t === "www.x.com")
81
+ return { platform: "twitter", id: o };
82
+ if (t === "www.linkedin.com" || t === "linkedin.com")
83
+ return { platform: "linkedin", id: o };
84
+ if (t === "www.pinterest.com" || t === "pinterest.com" || t.endsWith(".pinterest.com"))
85
+ return { platform: "pinterest", id: o };
86
+ if (t === "soundcloud.com" || t === "www.soundcloud.com")
87
+ return { platform: "soundcloud", id: o };
88
+ if (t === "framer.com" || t === "www.framer.com" || t.endsWith(".framer.com"))
89
+ return { platform: "framer", id: o };
90
+ if (t === "invis.io" || t === "www.invisionapp.com" || t === "invisionapp.com")
91
+ return { platform: "invision", id: o };
92
+ if (t === "www.canva.com" || t === "canva.com")
93
+ return { platform: "canva", id: o };
94
+ if (t === "pitch.com" || t === "www.pitch.com" || t === "app.pitch.com")
95
+ return { platform: "pitch", id: o };
96
+ if (t === "abstract.com" || t === "www.abstract.com" || t === "app.abstract.com")
97
+ return { platform: "abstract", id: o };
98
+ if (t === "marvelapp.com" || t === "www.marvelapp.com")
99
+ return { platform: "marvel", id: o };
100
+ if (t.includes("typeform.com"))
101
+ return { platform: "typeform", id: o };
102
+ if (t === "jsfiddle.net" || t === "www.jsfiddle.net")
103
+ return { platform: "jsfiddle", id: o };
104
+ if (t === "gitlab.com" || t === "www.gitlab.com")
105
+ return { platform: "gitlab", id: o };
106
+ if (t === "swagger.io" || t === "petstore.swagger.io" || t === "editor.swagger.io")
107
+ return { platform: "swagger", id: o };
108
+ if (t.includes("lucidchart.com") || t.includes("lucid.app"))
109
+ return { platform: "lucidchart", id: o };
110
+ if (t === "scribehow.com" || t === "www.scribehow.com")
111
+ return { platform: "scribe", id: o };
112
+ if (t.includes("gliffy.com"))
113
+ return { platform: "gliffy", id: o };
114
+ if (t === "app.clickup.com" || t === "clickup.com")
115
+ return { platform: "clickup", id: o };
116
+ if (t === "app.smartsuite.com" || t === "smartsuite.com")
117
+ return { platform: "smartsuite", id: o };
118
+ if (t === "www.bilibili.com" || t === "bilibili.com" || t === "player.bilibili.com")
119
+ return { platform: "bilibili", id: o };
120
+ if (t === "otter.ai" || t === "www.otter.ai")
121
+ return { platform: "otter", id: o };
122
+ if (t === "business.google.com" || t === "www.google.com" && i.pathname.startsWith("/business"))
123
+ return { platform: "google-business", id: o };
124
+ if (t.includes("camunda.com") || t.includes("cawemo.com"))
125
+ return { platform: "camunda", id: o };
126
+ if (t.includes("modeanalytics.com") || t === "mode.com" || t === "app.mode.com")
127
+ return { platform: "mode", id: o };
128
+ if (t === "val.town" || t === "www.val.town")
129
+ return { platform: "valtown", id: o };
130
+ if (t.includes("getgrist.com"))
131
+ return { platform: "grist", id: o };
132
+ } catch {
133
+ }
134
+ return { platform: "generic", id: o };
135
+ }
136
+ function n(o) {
137
+ return e(o).platform !== "link";
138
+ }
139
+ export {
140
+ r as escapeHtml,
141
+ a as getVideoEmbedUrl,
142
+ n as isVideoPlatformUrl,
143
+ m as parseEmbedUrl,
144
+ e as parseVideoUrl
145
+ };