@eventuras/scribo 0.8.3 → 0.10.7

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 (164) hide show
  1. package/dist/App.d.ts +11 -0
  2. package/dist/App.d.ts.map +1 -0
  3. package/dist/MarkdownEditor.d.ts +18 -0
  4. package/dist/MarkdownEditor.d.ts.map +1 -0
  5. package/dist/MarkdownEditor2.js +111 -0
  6. package/dist/MarkdownEditor2.js.map +1 -0
  7. package/dist/MarkdownInput.d.ts +27 -0
  8. package/dist/MarkdownInput.d.ts.map +1 -0
  9. package/dist/MarkdownInput.js +57 -0
  10. package/dist/MarkdownInput.js.map +1 -0
  11. package/dist/callout.js +5 -0
  12. package/dist/context/SharedHistoryContext.d.ts +11 -0
  13. package/dist/context/SharedHistoryContext.d.ts.map +1 -0
  14. package/dist/context/SharedHistoryContext.js +12 -0
  15. package/dist/context/SharedHistoryContext.js.map +1 -0
  16. package/dist/index.d.ts +1 -0
  17. package/dist/index.d.ts.map +1 -0
  18. package/dist/main.d.ts +5 -0
  19. package/dist/main.d.ts.map +1 -0
  20. package/dist/main.js +4 -0
  21. package/dist/nodes/EditorNodes.d.ts +4 -0
  22. package/dist/nodes/EditorNodes.d.ts.map +1 -0
  23. package/dist/nodes/EditorNodes.js +39 -0
  24. package/dist/nodes/EditorNodes.js.map +1 -0
  25. package/dist/nodes/callout/CalloutComponent.d.ts +6 -0
  26. package/dist/nodes/callout/CalloutComponent.d.ts.map +1 -0
  27. package/dist/nodes/callout/CalloutComponent.js +53 -0
  28. package/dist/nodes/callout/CalloutComponent.js.map +1 -0
  29. package/dist/nodes/callout/CalloutNode.d.ts +27 -0
  30. package/dist/nodes/callout/CalloutNode.d.ts.map +1 -0
  31. package/dist/nodes/callout/CalloutNode.js +153 -0
  32. package/dist/nodes/callout/CalloutNode.js.map +1 -0
  33. package/dist/nodes/callout/CalloutTransformer.d.ts +3 -0
  34. package/dist/nodes/callout/CalloutTransformer.d.ts.map +1 -0
  35. package/dist/nodes/callout/CalloutTransformer.js +48 -0
  36. package/dist/nodes/callout/CalloutTransformer.js.map +1 -0
  37. package/dist/nodes/callout/calloutPlugin.d.ts +3 -0
  38. package/dist/nodes/callout/calloutPlugin.d.ts.map +1 -0
  39. package/dist/nodes/callout/calloutPlugin.js +34 -0
  40. package/dist/nodes/callout/calloutPlugin.js.map +1 -0
  41. package/dist/nodes/callout/index.d.ts +6 -0
  42. package/dist/nodes/callout/index.d.ts.map +1 -0
  43. package/dist/nodes/schedule/ScheduleItemComponent.d.ts +9 -0
  44. package/dist/nodes/schedule/ScheduleItemComponent.d.ts.map +1 -0
  45. package/dist/nodes/schedule/ScheduleItemComponent.js +167 -0
  46. package/dist/nodes/schedule/ScheduleItemComponent.js.map +1 -0
  47. package/dist/nodes/schedule/ScheduleItemNode.d.ts +31 -0
  48. package/dist/nodes/schedule/ScheduleItemNode.d.ts.map +1 -0
  49. package/dist/nodes/schedule/ScheduleItemNode.js +94 -0
  50. package/dist/nodes/schedule/ScheduleItemNode.js.map +1 -0
  51. package/dist/nodes/schedule/ScheduleTransformer.d.ts +22 -0
  52. package/dist/nodes/schedule/ScheduleTransformer.d.ts.map +1 -0
  53. package/dist/nodes/schedule/ScheduleTransformer.js +60 -0
  54. package/dist/nodes/schedule/ScheduleTransformer.js.map +1 -0
  55. package/dist/nodes/schedule/index.d.ts +5 -0
  56. package/dist/nodes/schedule/index.d.ts.map +1 -0
  57. package/dist/nodes/schedule/schedulePlugin.d.ts +3 -0
  58. package/dist/nodes/schedule/schedulePlugin.d.ts.map +1 -0
  59. package/dist/nodes/schedule/schedulePlugin.js +33 -0
  60. package/dist/nodes/schedule/schedulePlugin.js.map +1 -0
  61. package/dist/plugins/AutoLinkPlugin.d.ts +3 -0
  62. package/dist/plugins/AutoLinkPlugin.d.ts.map +1 -0
  63. package/dist/plugins/AutoLinkPlugin.js +22 -0
  64. package/dist/plugins/AutoLinkPlugin.js.map +1 -0
  65. package/dist/plugins/FloatingLinkEditorPlugin.d.ts +7 -0
  66. package/dist/plugins/FloatingLinkEditorPlugin.d.ts.map +1 -0
  67. package/dist/plugins/FloatingLinkEditorPlugin2.js +302 -0
  68. package/dist/plugins/FloatingLinkEditorPlugin2.js.map +1 -0
  69. package/dist/plugins/HistoryPlugin.d.ts +26 -0
  70. package/dist/plugins/HistoryPlugin.d.ts.map +1 -0
  71. package/dist/plugins/LinkPlugin.d.ts +3 -0
  72. package/dist/plugins/LinkPlugin.d.ts.map +1 -0
  73. package/dist/plugins/LinkPlugin.js +18 -0
  74. package/dist/plugins/LinkPlugin.js.map +1 -0
  75. package/dist/plugins/ToolbarPlugin.d.ts +7 -0
  76. package/dist/plugins/ToolbarPlugin.d.ts.map +1 -0
  77. package/dist/plugins/ToolbarPlugin.js +372 -0
  78. package/dist/plugins/ToolbarPlugin.js.map +1 -0
  79. package/dist/schedule.js +4 -0
  80. package/dist/scribo.css +1977 -0
  81. package/dist/themes/EditorTheme.d.ts +4 -0
  82. package/dist/themes/EditorTheme.d.ts.map +1 -0
  83. package/dist/themes/EditorTheme2.js +107 -0
  84. package/dist/themes/EditorTheme2.js.map +1 -0
  85. package/dist/types.d.ts +26 -0
  86. package/dist/types.d.ts.map +1 -0
  87. package/dist/ui/ContentEditable.d.ts +6 -0
  88. package/dist/ui/ContentEditable.d.ts.map +1 -0
  89. package/dist/ui/ContentEditable2.js +14 -0
  90. package/dist/ui/ContentEditable2.js.map +1 -0
  91. package/dist/ui/DropDown.d.ts +18 -0
  92. package/dist/ui/DropDown.d.ts.map +1 -0
  93. package/dist/ui/DropDown.js +162 -0
  94. package/dist/ui/DropDown.js.map +1 -0
  95. package/dist/ui/Placeholder.d.ts +6 -0
  96. package/dist/ui/Placeholder.d.ts.map +1 -0
  97. package/dist/ui/Placeholder2.js +13 -0
  98. package/dist/ui/Placeholder2.js.map +1 -0
  99. package/dist/utils/environment.d.ts +24 -0
  100. package/dist/utils/environment.d.ts.map +1 -0
  101. package/dist/utils/environment.js +20 -0
  102. package/dist/utils/environment.js.map +1 -0
  103. package/dist/utils/getSelectedNode.d.ts +3 -0
  104. package/dist/utils/getSelectedNode.d.ts.map +1 -0
  105. package/dist/utils/getSelectedNode.js +23 -0
  106. package/dist/utils/getSelectedNode.js.map +1 -0
  107. package/dist/utils/setFloatingElemPosition.d.ts +2 -0
  108. package/dist/utils/setFloatingElemPosition.d.ts.map +1 -0
  109. package/dist/utils/setFloatingElemPositionForLinkEditor.d.ts +2 -0
  110. package/dist/utils/setFloatingElemPositionForLinkEditor.d.ts.map +1 -0
  111. package/dist/utils/setFloatingElemPositionForLinkEditor.js +33 -0
  112. package/dist/utils/setFloatingElemPositionForLinkEditor.js.map +1 -0
  113. package/dist/utils/url.d.ts +11 -0
  114. package/dist/utils/url.d.ts.map +1 -0
  115. package/dist/utils/url.js +33 -0
  116. package/dist/utils/url.js.map +1 -0
  117. package/dist/vite.svg +1 -0
  118. package/package.json +55 -38
  119. package/src/MarkdownEditor.css +61 -47
  120. package/src/MarkdownEditor.tsx +76 -29
  121. package/src/MarkdownInput.tsx +9 -10
  122. package/src/context/SharedHistoryContext.tsx +8 -16
  123. package/src/main.tsx +3 -3
  124. package/src/nodes/EditorNodes.ts +10 -10
  125. package/src/nodes/callout/Callout.css +94 -0
  126. package/src/nodes/callout/CalloutComponent.tsx +61 -0
  127. package/src/nodes/callout/CalloutNode.ts +197 -0
  128. package/src/nodes/callout/CalloutTransformer.ts +87 -0
  129. package/src/nodes/callout/calloutPlugin.ts +37 -0
  130. package/src/nodes/callout/index.ts +5 -0
  131. package/src/nodes/schedule/ScheduleItem.css +140 -0
  132. package/src/nodes/schedule/ScheduleItemComponent.tsx +195 -0
  133. package/src/nodes/schedule/ScheduleItemNode.ts +135 -0
  134. package/src/nodes/schedule/ScheduleTransformer.ts +80 -0
  135. package/src/nodes/schedule/index.ts +4 -0
  136. package/src/nodes/schedule/schedulePlugin.ts +33 -0
  137. package/src/plugins/AutoLinkPlugin.tsx +5 -10
  138. package/src/plugins/FloatingLinkEditorPlugin.tsx +42 -66
  139. package/src/plugins/HistoryPlugin.tsx +20 -30
  140. package/src/plugins/LinkPlugin.tsx +2 -3
  141. package/src/plugins/ToolbarPlugin.tsx +129 -141
  142. package/src/themes/EditorTheme.css +9 -5
  143. package/src/themes/EditorTheme.ts +89 -90
  144. package/src/types.ts +27 -0
  145. package/src/ui/ContentEditable.tsx +5 -5
  146. package/src/ui/DropDown.tsx +23 -41
  147. package/src/ui/Placeholder.tsx +21 -21
  148. package/src/utils/environment.ts +6 -12
  149. package/src/utils/getSelectedNode.ts +3 -5
  150. package/src/utils/setFloatingElemPosition.ts +2 -5
  151. package/src/utils/setFloatingElemPositionForLinkEditor.ts +1 -1
  152. package/src/utils/url.ts +4 -10
  153. package/tsconfig.json +8 -0
  154. package/CHANGELOG.md +0 -65
  155. package/README.md +0 -126
  156. package/RELEASE.md +0 -102
  157. package/eslint.config.js +0 -4
  158. package/src/App.css +0 -35
  159. package/src/App.tsx +0 -42
  160. package/src/index.tsx +0 -13
  161. package/tsconfig.node.json +0 -11
  162. package/vite.config.site.ts +0 -19
  163. package/vite.config.ts +0 -33
  164. /package/{src → dist}/vite-env.d.ts +0 -0
@@ -0,0 +1,4 @@
1
+ import { EditorThemeClasses } from 'lexical';
2
+ declare const theme: EditorThemeClasses;
3
+ export default theme;
4
+ //# sourceMappingURL=EditorTheme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EditorTheme.d.ts","sourceRoot":"","sources":["../../src/themes/EditorTheme.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD,QAAA,MAAM,KAAK,EAAE,kBAsGZ,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -0,0 +1,107 @@
1
+ /* empty css */
2
+ //#region src/themes/EditorTheme.ts
3
+ var theme = {
4
+ blockCursor: "EditorTheme__blockCursor",
5
+ characterLimit: "EditorTheme__characterLimit",
6
+ code: "EditorTheme__code",
7
+ codeHighlight: {
8
+ atrule: "EditorTheme__tokenAttr",
9
+ attr: "EditorTheme__tokenAttr",
10
+ boolean: "EditorTheme__tokenProperty",
11
+ builtin: "EditorTheme__tokenSelector",
12
+ cdata: "EditorTheme__tokenComment",
13
+ char: "EditorTheme__tokenSelector",
14
+ class: "EditorTheme__tokenFunction",
15
+ "class-name": "EditorTheme__tokenFunction",
16
+ comment: "EditorTheme__tokenComment",
17
+ constant: "EditorTheme__tokenProperty",
18
+ deleted: "EditorTheme__tokenProperty",
19
+ doctype: "EditorTheme__tokenComment",
20
+ entity: "EditorTheme__tokenOperator",
21
+ function: "EditorTheme__tokenFunction",
22
+ important: "EditorTheme__tokenVariable",
23
+ inserted: "EditorTheme__tokenSelector",
24
+ keyword: "EditorTheme__tokenAttr",
25
+ namespace: "EditorTheme__tokenVariable",
26
+ number: "EditorTheme__tokenProperty",
27
+ operator: "EditorTheme__tokenOperator",
28
+ prolog: "EditorTheme__tokenComment",
29
+ property: "EditorTheme__tokenProperty",
30
+ punctuation: "EditorTheme__tokenPunctuation",
31
+ regex: "EditorTheme__tokenVariable",
32
+ selector: "EditorTheme__tokenSelector",
33
+ string: "EditorTheme__tokenSelector",
34
+ symbol: "EditorTheme__tokenProperty",
35
+ tag: "EditorTheme__tokenProperty",
36
+ url: "EditorTheme__tokenOperator",
37
+ variable: "EditorTheme__tokenVariable"
38
+ },
39
+ embedBlock: {
40
+ base: "EditorTheme__embedBlock",
41
+ focus: "EditorTheme__embedBlockFocus"
42
+ },
43
+ hashtag: "EditorTheme__hashtag",
44
+ heading: {
45
+ h1: "EditorTheme__h1",
46
+ h2: "EditorTheme__h2",
47
+ h3: "EditorTheme__h3",
48
+ h4: "EditorTheme__h4",
49
+ h5: "EditorTheme__h5",
50
+ h6: "EditorTheme__h6"
51
+ },
52
+ image: "editor-image",
53
+ indent: "EditorTheme__indent",
54
+ inlineImage: "inline-editor-image",
55
+ layoutContainer: "EditorTheme__layoutContaner",
56
+ layoutItem: "EditorTheme__layoutItem",
57
+ link: "EditorTheme__link",
58
+ list: {
59
+ listitem: "EditorTheme__listItem",
60
+ listitemChecked: "EditorTheme__listItemChecked",
61
+ listitemUnchecked: "EditorTheme__listItemUnchecked",
62
+ nested: { listitem: "EditorTheme__nestedListItem" },
63
+ olDepth: [
64
+ "EditorTheme__ol1",
65
+ "EditorTheme__ol2",
66
+ "EditorTheme__ol3",
67
+ "EditorTheme__ol4",
68
+ "EditorTheme__ol5"
69
+ ],
70
+ ul: "EditorTheme__ul"
71
+ },
72
+ ltr: "EditorTheme__ltr",
73
+ mark: "EditorTheme__mark",
74
+ markOverlap: "EditorTheme__markOverlap",
75
+ paragraph: "EditorTheme__paragraph",
76
+ quote: "EditorTheme__quote",
77
+ rtl: "EditorTheme__rtl",
78
+ table: "EditorTheme__table",
79
+ tableAddColumns: "EditorTheme__tableAddColumns",
80
+ tableAddRows: "EditorTheme__tableAddRows",
81
+ tableCell: "EditorTheme__tableCell",
82
+ tableCellActionButton: "EditorTheme__tableCellActionButton",
83
+ tableCellActionButtonContainer: "EditorTheme__tableCellActionButtonContainer",
84
+ tableCellEditing: "EditorTheme__tableCellEditing",
85
+ tableCellHeader: "EditorTheme__tableCellHeader",
86
+ tableCellPrimarySelected: "EditorTheme__tableCellPrimarySelected",
87
+ tableCellResizer: "EditorTheme__tableCellResizer",
88
+ tableCellSelected: "EditorTheme__tableCellSelected",
89
+ tableCellSortedIndicator: "EditorTheme__tableCellSortedIndicator",
90
+ tableResizeRuler: "EditorTheme__tableCellResizeRuler",
91
+ tableSelected: "EditorTheme__tableSelected",
92
+ tableSelection: "EditorTheme__tableSelection",
93
+ text: {
94
+ bold: "EditorTheme__textBold",
95
+ code: "EditorTheme__textCode",
96
+ italic: "EditorTheme__textItalic",
97
+ strikethrough: "EditorTheme__textStrikethrough",
98
+ subscript: "EditorTheme__textSubscript",
99
+ superscript: "EditorTheme__textSuperscript",
100
+ underline: "EditorTheme__textUnderline",
101
+ underlineStrikethrough: "EditorTheme__textUnderlineStrikethrough"
102
+ }
103
+ };
104
+ //#endregion
105
+ export { theme as default };
106
+
107
+ //# sourceMappingURL=EditorTheme2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EditorTheme2.js","names":[],"sources":["../../src/themes/EditorTheme.ts"],"sourcesContent":["/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport './EditorTheme.css';\n\nimport type { EditorThemeClasses } from 'lexical';\n\nconst theme: EditorThemeClasses = {\n blockCursor: 'EditorTheme__blockCursor',\n characterLimit: 'EditorTheme__characterLimit',\n code: 'EditorTheme__code',\n codeHighlight: {\n atrule: 'EditorTheme__tokenAttr',\n attr: 'EditorTheme__tokenAttr',\n boolean: 'EditorTheme__tokenProperty',\n builtin: 'EditorTheme__tokenSelector',\n cdata: 'EditorTheme__tokenComment',\n char: 'EditorTheme__tokenSelector',\n class: 'EditorTheme__tokenFunction',\n 'class-name': 'EditorTheme__tokenFunction',\n comment: 'EditorTheme__tokenComment',\n constant: 'EditorTheme__tokenProperty',\n deleted: 'EditorTheme__tokenProperty',\n doctype: 'EditorTheme__tokenComment',\n entity: 'EditorTheme__tokenOperator',\n function: 'EditorTheme__tokenFunction',\n important: 'EditorTheme__tokenVariable',\n inserted: 'EditorTheme__tokenSelector',\n keyword: 'EditorTheme__tokenAttr',\n namespace: 'EditorTheme__tokenVariable',\n number: 'EditorTheme__tokenProperty',\n operator: 'EditorTheme__tokenOperator',\n prolog: 'EditorTheme__tokenComment',\n property: 'EditorTheme__tokenProperty',\n punctuation: 'EditorTheme__tokenPunctuation',\n regex: 'EditorTheme__tokenVariable',\n selector: 'EditorTheme__tokenSelector',\n string: 'EditorTheme__tokenSelector',\n symbol: 'EditorTheme__tokenProperty',\n tag: 'EditorTheme__tokenProperty',\n url: 'EditorTheme__tokenOperator',\n variable: 'EditorTheme__tokenVariable',\n },\n embedBlock: {\n base: 'EditorTheme__embedBlock',\n focus: 'EditorTheme__embedBlockFocus',\n },\n hashtag: 'EditorTheme__hashtag',\n heading: {\n h1: 'EditorTheme__h1',\n h2: 'EditorTheme__h2',\n h3: 'EditorTheme__h3',\n h4: 'EditorTheme__h4',\n h5: 'EditorTheme__h5',\n h6: 'EditorTheme__h6',\n },\n image: 'editor-image',\n indent: 'EditorTheme__indent',\n inlineImage: 'inline-editor-image',\n layoutContainer: 'EditorTheme__layoutContaner',\n layoutItem: 'EditorTheme__layoutItem',\n link: 'EditorTheme__link',\n list: {\n listitem: 'EditorTheme__listItem',\n listitemChecked: 'EditorTheme__listItemChecked',\n listitemUnchecked: 'EditorTheme__listItemUnchecked',\n nested: {\n listitem: 'EditorTheme__nestedListItem',\n },\n olDepth: [\n 'EditorTheme__ol1',\n 'EditorTheme__ol2',\n 'EditorTheme__ol3',\n 'EditorTheme__ol4',\n 'EditorTheme__ol5',\n ],\n ul: 'EditorTheme__ul',\n },\n ltr: 'EditorTheme__ltr',\n mark: 'EditorTheme__mark',\n markOverlap: 'EditorTheme__markOverlap',\n paragraph: 'EditorTheme__paragraph',\n quote: 'EditorTheme__quote',\n rtl: 'EditorTheme__rtl',\n table: 'EditorTheme__table',\n tableAddColumns: 'EditorTheme__tableAddColumns',\n tableAddRows: 'EditorTheme__tableAddRows',\n tableCell: 'EditorTheme__tableCell',\n tableCellActionButton: 'EditorTheme__tableCellActionButton',\n tableCellActionButtonContainer: 'EditorTheme__tableCellActionButtonContainer',\n tableCellEditing: 'EditorTheme__tableCellEditing',\n tableCellHeader: 'EditorTheme__tableCellHeader',\n tableCellPrimarySelected: 'EditorTheme__tableCellPrimarySelected',\n tableCellResizer: 'EditorTheme__tableCellResizer',\n tableCellSelected: 'EditorTheme__tableCellSelected',\n tableCellSortedIndicator: 'EditorTheme__tableCellSortedIndicator',\n tableResizeRuler: 'EditorTheme__tableCellResizeRuler',\n tableSelected: 'EditorTheme__tableSelected',\n tableSelection: 'EditorTheme__tableSelection',\n text: {\n bold: 'EditorTheme__textBold',\n code: 'EditorTheme__textCode',\n italic: 'EditorTheme__textItalic',\n strikethrough: 'EditorTheme__textStrikethrough',\n subscript: 'EditorTheme__textSubscript',\n superscript: 'EditorTheme__textSuperscript',\n underline: 'EditorTheme__textUnderline',\n underlineStrikethrough: 'EditorTheme__textUnderlineStrikethrough',\n },\n};\n\nexport default theme;\n"],"mappings":";;AAYA,IAAM,QAA4B;CAChC,aAAa;CACb,gBAAgB;CAChB,MAAM;CACN,eAAe;EACb,QAAQ;EACR,MAAM;EACN,SAAS;EACT,SAAS;EACT,OAAO;EACP,MAAM;EACN,OAAO;EACP,cAAc;EACd,SAAS;EACT,UAAU;EACV,SAAS;EACT,SAAS;EACT,QAAQ;EACR,UAAU;EACV,WAAW;EACX,UAAU;EACV,SAAS;EACT,WAAW;EACX,QAAQ;EACR,UAAU;EACV,QAAQ;EACR,UAAU;EACV,aAAa;EACb,OAAO;EACP,UAAU;EACV,QAAQ;EACR,QAAQ;EACR,KAAK;EACL,KAAK;EACL,UAAU;CACZ;CACA,YAAY;EACV,MAAM;EACN,OAAO;CACT;CACA,SAAS;CACT,SAAS;EACP,IAAI;EACJ,IAAI;EACJ,IAAI;EACJ,IAAI;EACJ,IAAI;EACJ,IAAI;CACN;CACA,OAAO;CACP,QAAQ;CACR,aAAa;CACb,iBAAiB;CACjB,YAAY;CACZ,MAAM;CACN,MAAM;EACJ,UAAU;EACV,iBAAiB;EACjB,mBAAmB;EACnB,QAAQ,EACN,UAAU,8BACZ;EACA,SAAS;GACP;GACA;GACA;GACA;GACA;EACF;EACA,IAAI;CACN;CACA,KAAK;CACL,MAAM;CACN,aAAa;CACb,WAAW;CACX,OAAO;CACP,KAAK;CACL,OAAO;CACP,iBAAiB;CACjB,cAAc;CACd,WAAW;CACX,uBAAuB;CACvB,gCAAgC;CAChC,kBAAkB;CAClB,iBAAiB;CACjB,0BAA0B;CAC1B,kBAAkB;CAClB,mBAAmB;CACnB,0BAA0B;CAC1B,kBAAkB;CAClB,eAAe;CACf,gBAAgB;CAChB,MAAM;EACJ,MAAM;EACN,MAAM;EACN,QAAQ;EACR,eAAe;EACf,WAAW;EACX,aAAa;EACb,WAAW;EACX,wBAAwB;CAC1B;AACF"}
@@ -0,0 +1,26 @@
1
+ import { Transformer } from '@lexical/markdown';
2
+ import { Klass, LexicalNode } from 'lexical';
3
+ import { ComponentType } from 'react';
4
+ export interface ScriboToolbarButton {
5
+ /** Unique key */
6
+ key: string;
7
+ /** Tooltip / aria-label */
8
+ label: string;
9
+ /** CSS class for the icon */
10
+ iconClass?: string;
11
+ /** Called when the button is clicked */
12
+ onSelect: (editor: import('lexical').LexicalEditor) => void;
13
+ }
14
+ export interface ScriboPlugin {
15
+ /** Unique name for the plugin */
16
+ name: string;
17
+ /** Lexical nodes to register */
18
+ nodes?: Klass<LexicalNode>[];
19
+ /** Markdown transformers (placed before built-in transformers) */
20
+ transformers?: Transformer[];
21
+ /** Buttons to add to the toolbar */
22
+ toolbarButtons?: ScriboToolbarButton[];
23
+ /** React components to render inside the LexicalComposer (must accept no props) */
24
+ editorPlugins?: ComponentType<object>[];
25
+ }
26
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,MAAM,WAAW,mBAAmB;IAClC,iBAAiB;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,2BAA2B;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wCAAwC;IACxC,QAAQ,EAAE,CAAC,MAAM,EAAE,OAAO,SAAS,EAAE,aAAa,KAAK,IAAI,CAAC;CAC7D;AAED,MAAM,WAAW,YAAY;IAC3B,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,gCAAgC;IAChC,KAAK,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,EAAE,CAAC;IAC7B,kEAAkE;IAClE,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;IAC7B,oCAAoC;IACpC,cAAc,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACvC,mFAAmF;IACnF,aAAa,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,EAAE,CAAC;CACzC"}
@@ -0,0 +1,6 @@
1
+ import { JSX } from 'react';
2
+ export default function LexicalContentEditable({ className, id, }: Readonly<{
3
+ className?: string;
4
+ id?: string;
5
+ }>): JSX.Element;
6
+ //# sourceMappingURL=ContentEditable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContentEditable.d.ts","sourceRoot":"","sources":["../../src/ui/ContentEditable.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,uBAAuB,CAAC;AAI/B,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAAC,EAC7C,SAAS,EACT,EAAE,GACH,EAAE,QAAQ,CAAC;IACV,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,CAAC,GAAG,GAAG,CAAC,OAAO,CAEf"}
@@ -0,0 +1,14 @@
1
+ /* empty css */
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { ContentEditable } from "@lexical/react/LexicalContentEditable";
4
+ //#region src/ui/ContentEditable.tsx
5
+ function LexicalContentEditable({ className, id }) {
6
+ return /* @__PURE__ */ jsx(ContentEditable, {
7
+ className: className || "ContentEditable__root",
8
+ id
9
+ });
10
+ }
11
+ //#endregion
12
+ export { LexicalContentEditable as default };
13
+
14
+ //# sourceMappingURL=ContentEditable2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContentEditable2.js","names":[],"sources":["../../src/ui/ContentEditable.tsx"],"sourcesContent":["/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nimport type { JSX } from 'react';\nimport './ContentEditable.css';\n\nimport { ContentEditable } from '@lexical/react/LexicalContentEditable';\n\nexport default function LexicalContentEditable({\n className,\n id,\n}: Readonly<{\n className?: string;\n id?: string;\n}>): JSX.Element {\n return <ContentEditable className={className || 'ContentEditable__root'} id={id} />;\n}\n"],"mappings":";;;;AAYA,SAAwB,uBAAuB,EAC7C,WACA,MAIe;CACf,OAAO,oBAAC,iBAAD;EAAiB,WAAW,aAAa;EAA6B;CAAK,CAAA;AACpF"}
@@ -0,0 +1,18 @@
1
+ import { JSX, ReactNode } from 'react';
2
+ import * as React from 'react';
3
+ export declare function DropDownItem({ children, className, onClick, title, }: Readonly<{
4
+ children: React.ReactNode;
5
+ className: string;
6
+ onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
7
+ title?: string;
8
+ }>): JSX.Element;
9
+ export default function DropDown({ disabled, buttonLabel, buttonAriaLabel, buttonClassName, buttonIconClassName, children, stopCloseOnClickSelf, }: Readonly<{
10
+ disabled?: boolean;
11
+ buttonAriaLabel?: string;
12
+ buttonClassName: string;
13
+ buttonIconClassName?: string;
14
+ buttonLabel?: string;
15
+ children: ReactNode;
16
+ stopCloseOnClickSelf?: boolean;
17
+ }>): JSX.Element;
18
+ //# sourceMappingURL=DropDown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DropDown.d.ts","sourceRoot":"","sources":["../../src/ui/DropDown.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,SAAS,EAAqD,MAAM,OAAO,CAAC;AAW1F,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,SAAS,EACT,OAAO,EACP,KAAK,GACN,EAAE,QAAQ,CAAC;IACV,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAC9D,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC,eAsBD;AA8ED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAC/B,QAAgB,EAChB,WAAW,EACX,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,QAAQ,EACR,oBAAoB,GACrB,EAAE,QAAQ,CAAC;IACV,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;IACpB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC,GAAG,GAAG,CAAC,OAAO,CA+Ff"}
@@ -0,0 +1,162 @@
1
+ import { isDOMNode } from "lexical";
2
+ import * as React from "react";
3
+ import { useCallback, useEffect, useMemo, useRef, useState } from "react";
4
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
+ import { createPortal } from "react-dom";
6
+ //#region src/ui/DropDown.tsx
7
+ /**
8
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
9
+ *
10
+ * This source code is licensed under the MIT license found in the
11
+ * LICENSE file in the root directory of this source tree.
12
+ *
13
+ */
14
+ var DropDownContext = React.createContext(null);
15
+ var dropDownPadding = 4;
16
+ function DropDownItem({ children, className, onClick, title }) {
17
+ const ref = useRef(null);
18
+ const dropDownContext = React.useContext(DropDownContext);
19
+ if (dropDownContext === null) throw new Error("DropDownItem must be used within a DropDown");
20
+ const { registerItem } = dropDownContext;
21
+ useEffect(() => {
22
+ if (ref?.current) registerItem(ref);
23
+ }, [ref, registerItem]);
24
+ return /* @__PURE__ */ jsx("button", {
25
+ className,
26
+ onClick,
27
+ ref,
28
+ title,
29
+ type: "button",
30
+ children
31
+ });
32
+ }
33
+ function DropDownItems({ children, dropDownRef, onClose }) {
34
+ const [items, setItems] = useState();
35
+ const [highlightedItem, setHighlightedItem] = useState();
36
+ const registerItem = useCallback((itemRef) => {
37
+ setItems((prev) => prev ? [...prev, itemRef] : [itemRef]);
38
+ }, [setItems]);
39
+ const handleKeyDown = (event) => {
40
+ if (!items) return;
41
+ const key = event.key;
42
+ if ([
43
+ "Escape",
44
+ "ArrowUp",
45
+ "ArrowDown",
46
+ "Tab"
47
+ ].includes(key)) event.preventDefault();
48
+ if (key === "Escape" || key === "Tab") onClose();
49
+ else if (key === "ArrowUp") setHighlightedItem((prev) => {
50
+ if (!prev) return items[0];
51
+ const index = items.indexOf(prev) - 1;
52
+ return items[index === -1 ? items.length - 1 : index];
53
+ });
54
+ else if (key === "ArrowDown") setHighlightedItem((prev) => {
55
+ if (!prev) return items[0];
56
+ return items[items.indexOf(prev) + 1];
57
+ });
58
+ };
59
+ const contextValue = useMemo(() => ({ registerItem }), [registerItem]);
60
+ useEffect(() => {
61
+ if (items && !highlightedItem) setHighlightedItem(items[0]);
62
+ if (highlightedItem?.current) highlightedItem.current.focus();
63
+ }, [items, highlightedItem]);
64
+ return /* @__PURE__ */ jsx(DropDownContext.Provider, {
65
+ value: contextValue,
66
+ children: /* @__PURE__ */ jsx("div", {
67
+ className: "dropdown",
68
+ ref: dropDownRef,
69
+ onKeyDown: handleKeyDown,
70
+ children
71
+ })
72
+ });
73
+ }
74
+ function DropDown({ disabled = false, buttonLabel, buttonAriaLabel, buttonClassName, buttonIconClassName, children, stopCloseOnClickSelf }) {
75
+ const dropDownRef = useRef(null);
76
+ const buttonRef = useRef(null);
77
+ const [showDropDown, setShowDropDown] = useState(false);
78
+ const handleClose = () => {
79
+ setShowDropDown(false);
80
+ if (buttonRef?.current) buttonRef.current.focus();
81
+ };
82
+ useEffect(() => {
83
+ const button = buttonRef.current;
84
+ const dropDown = dropDownRef.current;
85
+ if (showDropDown && button !== null && dropDown !== null) {
86
+ const { top, left } = button.getBoundingClientRect();
87
+ dropDown.style.top = `${top + button.offsetHeight + dropDownPadding}px`;
88
+ dropDown.style.left = `${Math.min(left, window.innerWidth - dropDown.offsetWidth - 20)}px`;
89
+ }
90
+ }, [
91
+ dropDownRef,
92
+ buttonRef,
93
+ showDropDown
94
+ ]);
95
+ useEffect(() => {
96
+ const button = buttonRef.current;
97
+ if (button !== null && showDropDown) {
98
+ const handle = (event) => {
99
+ const target = event.target;
100
+ if (!isDOMNode(target)) return;
101
+ if (stopCloseOnClickSelf) {
102
+ if (dropDownRef.current?.contains(target)) return;
103
+ }
104
+ if (!button.contains(target)) setShowDropDown(false);
105
+ };
106
+ document.addEventListener("click", handle);
107
+ return () => {
108
+ document.removeEventListener("click", handle);
109
+ };
110
+ }
111
+ }, [
112
+ dropDownRef,
113
+ buttonRef,
114
+ showDropDown,
115
+ stopCloseOnClickSelf
116
+ ]);
117
+ useEffect(() => {
118
+ const handleButtonPositionUpdate = () => {
119
+ if (showDropDown) {
120
+ const button = buttonRef.current;
121
+ const dropDown = dropDownRef.current;
122
+ if (button !== null && dropDown !== null) {
123
+ const { top } = button.getBoundingClientRect();
124
+ const newPosition = top + button.offsetHeight + dropDownPadding;
125
+ if (newPosition !== dropDown.getBoundingClientRect().top) dropDown.style.top = `${newPosition}px`;
126
+ }
127
+ }
128
+ };
129
+ document.addEventListener("scroll", handleButtonPositionUpdate);
130
+ return () => {
131
+ document.removeEventListener("scroll", handleButtonPositionUpdate);
132
+ };
133
+ }, [
134
+ buttonRef,
135
+ dropDownRef,
136
+ showDropDown
137
+ ]);
138
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("button", {
139
+ type: "button",
140
+ disabled,
141
+ "aria-label": buttonAriaLabel || buttonLabel,
142
+ className: buttonClassName,
143
+ onClick: () => setShowDropDown(!showDropDown),
144
+ ref: buttonRef,
145
+ children: [
146
+ buttonIconClassName && /* @__PURE__ */ jsx("span", { className: buttonIconClassName }),
147
+ buttonLabel && /* @__PURE__ */ jsx("span", {
148
+ className: "text dropdown-button-text",
149
+ children: buttonLabel
150
+ }),
151
+ /* @__PURE__ */ jsx("i", { className: "chevron-down" })
152
+ ]
153
+ }), showDropDown && createPortal(/* @__PURE__ */ jsx(DropDownItems, {
154
+ dropDownRef,
155
+ onClose: handleClose,
156
+ children
157
+ }), document.body)] });
158
+ }
159
+ //#endregion
160
+ export { DropDownItem, DropDown as default };
161
+
162
+ //# sourceMappingURL=DropDown.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DropDown.js","names":[],"sources":["../../src/ui/DropDown.tsx"],"sourcesContent":["/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { isDOMNode } from 'lexical';\nimport type { JSX } from 'react';\nimport * as React from 'react';\nimport { type ReactNode, useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { createPortal } from 'react-dom';\n\ntype DropDownContextType = {\n registerItem: (ref: React.RefObject<HTMLButtonElement>) => void;\n};\n\nconst DropDownContext = React.createContext<DropDownContextType | null>(null);\n\nconst dropDownPadding = 4;\n\nexport function DropDownItem({\n children,\n className,\n onClick,\n title,\n}: Readonly<{\n children: React.ReactNode;\n className: string;\n onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;\n title?: string;\n}>) {\n const ref = useRef<HTMLButtonElement>(null);\n\n const dropDownContext = React.useContext(DropDownContext);\n\n if (dropDownContext === null) {\n throw new Error('DropDownItem must be used within a DropDown');\n }\n\n const { registerItem } = dropDownContext;\n\n useEffect(() => {\n if (ref?.current) {\n registerItem(ref as React.RefObject<HTMLButtonElement>);\n }\n }, [ref, registerItem]);\n\n return (\n <button className={className} onClick={onClick} ref={ref} title={title} type=\"button\">\n {children}\n </button>\n );\n}\n\nfunction DropDownItems({\n children,\n dropDownRef,\n onClose,\n}: Readonly<{\n children: React.ReactNode;\n dropDownRef: React.Ref<HTMLDivElement>;\n onClose: () => void;\n}>) {\n const [items, setItems] = useState<React.RefObject<HTMLButtonElement>[]>();\n const [highlightedItem, setHighlightedItem] = useState<React.RefObject<HTMLButtonElement>>();\n\n const registerItem = useCallback(\n (itemRef: React.RefObject<HTMLButtonElement>) => {\n setItems((prev) => (prev ? [...prev, itemRef] : [itemRef]));\n },\n [setItems]\n );\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (!items) {\n return;\n }\n\n const key = event.key;\n\n if (['Escape', 'ArrowUp', 'ArrowDown', 'Tab'].includes(key)) {\n event.preventDefault();\n }\n\n if (key === 'Escape' || key === 'Tab') {\n onClose();\n } else if (key === 'ArrowUp') {\n setHighlightedItem((prev) => {\n if (!prev) {\n return items[0];\n }\n const index = items.indexOf(prev) - 1;\n return items[index === -1 ? items.length - 1 : index];\n });\n } else if (key === 'ArrowDown') {\n setHighlightedItem((prev) => {\n if (!prev) {\n return items[0];\n }\n return items[items.indexOf(prev) + 1];\n });\n }\n };\n\n const contextValue = useMemo(\n () => ({\n registerItem,\n }),\n [registerItem]\n );\n\n useEffect(() => {\n if (items && !highlightedItem) {\n setHighlightedItem(items[0]);\n }\n\n if (highlightedItem?.current) {\n highlightedItem.current.focus();\n }\n }, [items, highlightedItem]);\n\n return (\n <DropDownContext.Provider value={contextValue}>\n <div className=\"dropdown\" ref={dropDownRef} onKeyDown={handleKeyDown}>\n {children}\n </div>\n </DropDownContext.Provider>\n );\n}\n\nexport default function DropDown({\n disabled = false,\n buttonLabel,\n buttonAriaLabel,\n buttonClassName,\n buttonIconClassName,\n children,\n stopCloseOnClickSelf,\n}: Readonly<{\n disabled?: boolean;\n buttonAriaLabel?: string;\n buttonClassName: string;\n buttonIconClassName?: string;\n buttonLabel?: string;\n children: ReactNode;\n stopCloseOnClickSelf?: boolean;\n}>): JSX.Element {\n const dropDownRef = useRef<HTMLDivElement>(null);\n const buttonRef = useRef<HTMLButtonElement>(null);\n const [showDropDown, setShowDropDown] = useState(false);\n\n const handleClose = () => {\n setShowDropDown(false);\n if (buttonRef?.current) {\n buttonRef.current.focus();\n }\n };\n\n useEffect(() => {\n const button = buttonRef.current;\n const dropDown = dropDownRef.current;\n\n if (showDropDown && button !== null && dropDown !== null) {\n const { top, left } = button.getBoundingClientRect();\n dropDown.style.top = `${top + button.offsetHeight + dropDownPadding}px`;\n dropDown.style.left = `${Math.min(left, window.innerWidth - dropDown.offsetWidth - 20)}px`;\n }\n }, [dropDownRef, buttonRef, showDropDown]);\n\n useEffect(() => {\n const button = buttonRef.current;\n\n if (button !== null && showDropDown) {\n const handle = (event: MouseEvent) => {\n const target = event.target;\n if (!isDOMNode(target)) {\n return;\n }\n if (stopCloseOnClickSelf) {\n if (dropDownRef.current?.contains(target)) {\n return;\n }\n }\n if (!button.contains(target)) {\n setShowDropDown(false);\n }\n };\n document.addEventListener('click', handle);\n\n return () => {\n document.removeEventListener('click', handle);\n };\n }\n }, [dropDownRef, buttonRef, showDropDown, stopCloseOnClickSelf]);\n\n useEffect(() => {\n const handleButtonPositionUpdate = () => {\n if (showDropDown) {\n const button = buttonRef.current;\n const dropDown = dropDownRef.current;\n if (button !== null && dropDown !== null) {\n const { top } = button.getBoundingClientRect();\n const newPosition = top + button.offsetHeight + dropDownPadding;\n if (newPosition !== dropDown.getBoundingClientRect().top) {\n dropDown.style.top = `${newPosition}px`;\n }\n }\n }\n };\n\n document.addEventListener('scroll', handleButtonPositionUpdate);\n\n return () => {\n document.removeEventListener('scroll', handleButtonPositionUpdate);\n };\n }, [buttonRef, dropDownRef, showDropDown]);\n\n return (\n <>\n <button\n type=\"button\"\n disabled={disabled}\n aria-label={buttonAriaLabel || buttonLabel}\n className={buttonClassName}\n onClick={() => setShowDropDown(!showDropDown)}\n ref={buttonRef}\n >\n {buttonIconClassName && <span className={buttonIconClassName} />}\n {buttonLabel && <span className=\"text dropdown-button-text\">{buttonLabel}</span>}\n <i className=\"chevron-down\" />\n </button>\n\n {showDropDown &&\n createPortal(\n <DropDownItems dropDownRef={dropDownRef} onClose={handleClose}>\n {children}\n </DropDownItems>,\n document.body\n )}\n </>\n );\n}\n"],"mappings":"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"}
@@ -0,0 +1,6 @@
1
+ import { JSX, ReactNode } from 'react';
2
+ export default function Placeholder({ children, className, }: Readonly<{
3
+ children: ReactNode;
4
+ className?: string;
5
+ }>): JSX.Element;
6
+ //# sourceMappingURL=Placeholder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Placeholder.d.ts","sourceRoot":"","sources":["../../src/ui/Placeholder.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,QAAQ,EACR,SAAS,GACV,EAAE,QAAQ,CAAC;IACV,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC,GAAG,GAAG,CAAC,OAAO,CAEf"}
@@ -0,0 +1,13 @@
1
+ /* empty css */
2
+ import { jsx } from "react/jsx-runtime";
3
+ //#region src/ui/Placeholder.tsx
4
+ function Placeholder({ children, className }) {
5
+ return /* @__PURE__ */ jsx("div", {
6
+ className: className || "Placeholder__root",
7
+ children
8
+ });
9
+ }
10
+ //#endregion
11
+ export { Placeholder as default };
12
+
13
+ //# sourceMappingURL=Placeholder2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Placeholder2.js","names":[],"sources":["../../src/ui/Placeholder.tsx"],"sourcesContent":["/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nimport type { JSX } from 'react';\nimport './Placeholder.css';\n\nimport type { ReactNode } from 'react';\n\nexport default function Placeholder({\n children,\n className,\n}: Readonly<{\n children: ReactNode;\n className?: string;\n}>): JSX.Element {\n return <div className={className || 'Placeholder__root'}>{children}</div>;\n}\n"],"mappings":";;;AAYA,SAAwB,YAAY,EAClC,UACA,aAIe;CACf,OAAO,oBAAC,OAAD;EAAK,WAAW,aAAa;EAAsB;CAAc,CAAA;AAC1E"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+ export declare const CAN_USE_DOM: boolean;
9
+ declare global {
10
+ interface Document {
11
+ documentMode?: unknown;
12
+ }
13
+ interface Window {
14
+ MSStream?: unknown;
15
+ }
16
+ }
17
+ export declare const IS_APPLE = false;
18
+ export declare const IS_FIREFOX: boolean;
19
+ export declare const CAN_USE_BEFORE_INPUT: boolean;
20
+ export declare const IS_SAFARI: boolean;
21
+ export declare const IS_IOS: boolean;
22
+ export declare const IS_CHROME: boolean;
23
+ export declare const IS_APPLE_WEBKIT: boolean;
24
+ //# sourceMappingURL=environment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../src/utils/environment.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,eAAO,MAAM,WAAW,EAAE,OAC8D,CAAC;AAEzF,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,QAAQ;QAChB,YAAY,CAAC,EAAE,OAAO,CAAC;KACxB;IAED,UAAU,MAAM;QACd,QAAQ,CAAC,EAAE,OAAO,CAAC;KACpB;CACF;AAKD,eAAO,MAAM,QAAQ,QAAQ,CAAC;AAG9B,eAAO,MAAM,UAAU,EAAE,OACoD,CAAC;AAE9E,eAAO,MAAM,oBAAoB,EAAE,OAGxB,CAAC;AAEZ,eAAO,MAAM,SAAS,EAAE,OAC4C,CAAC;AAErE,eAAO,MAAM,MAAM,EAAE,OAC4D,CAAC;AAIlF,eAAO,MAAM,SAAS,EAAE,OAAqE,CAAC;AAG9F,eAAO,MAAM,eAAe,SACkD,CAAC"}
@@ -0,0 +1,20 @@
1
+ //#region src/utils/environment.ts
2
+ /**
3
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ *
8
+ */
9
+ var CAN_USE_DOM = typeof window !== "undefined" && typeof window.document?.createElement !== "undefined";
10
+ var documentMode = CAN_USE_DOM && "documentMode" in document ? document.documentMode : null;
11
+ CAN_USE_DOM && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);
12
+ CAN_USE_DOM && "InputEvent" in window && !documentMode && "getTargetRanges" in new window.InputEvent("input");
13
+ CAN_USE_DOM && /Version\/[\d.]+.*Safari/.test(navigator.userAgent);
14
+ CAN_USE_DOM && /iPad|iPhone|iPod/.test(navigator.userAgent) && window.MSStream;
15
+ var IS_CHROME = CAN_USE_DOM && /^(?=.*Chrome).*/i.test(navigator.userAgent);
16
+ CAN_USE_DOM && /AppleWebKit\/[\d.]+/.test(navigator.userAgent);
17
+ //#endregion
18
+ export { CAN_USE_DOM, IS_CHROME };
19
+
20
+ //# sourceMappingURL=environment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"environment.js","names":[],"sources":["../../src/utils/environment.ts"],"sourcesContent":["/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nexport const CAN_USE_DOM: boolean =\n typeof window !== 'undefined' && typeof window.document?.createElement !== 'undefined';\n\ndeclare global {\n interface Document {\n documentMode?: unknown;\n }\n\n interface Window {\n MSStream?: unknown;\n }\n}\n\nconst documentMode = CAN_USE_DOM && 'documentMode' in document ? document.documentMode : null;\n\n//TODO forcing false on this to stop mismatch render between ssr and clientside\nexport const IS_APPLE = false;\n//CAN_USE_DOM && /Mac|iPod|iPhone|iPad/.test(navigator.platform);\n\nexport const IS_FIREFOX: boolean =\n CAN_USE_DOM && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);\n\nexport const CAN_USE_BEFORE_INPUT: boolean =\n CAN_USE_DOM && 'InputEvent' in window && !documentMode\n ? 'getTargetRanges' in new window.InputEvent('input')\n : false;\n\nexport const IS_SAFARI: boolean =\n CAN_USE_DOM && /Version\\/[\\d.]+.*Safari/.test(navigator.userAgent);\n\nexport const IS_IOS: boolean =\n CAN_USE_DOM && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;\n\n// Keep these in case we need to use them in the future.\n// export const IS_WINDOWS: boolean = CAN_USE_DOM && /Win/.test(navigator.platform);\nexport const IS_CHROME: boolean = CAN_USE_DOM && /^(?=.*Chrome).*/i.test(navigator.userAgent);\n// export const canUseTextInputEvent: boolean = CAN_USE_DOM && 'TextEvent' in window && !documentMode;\n\nexport const IS_APPLE_WEBKIT =\n CAN_USE_DOM && /AppleWebKit\\/[\\d.]+/.test(navigator.userAgent) && !IS_CHROME;\n"],"mappings":";;;;;;;;AAQA,IAAa,cACX,OAAO,WAAW,eAAe,OAAO,OAAO,UAAU,kBAAkB;AAY7E,IAAM,eAAe,eAAe,kBAAkB,WAAW,SAAS,eAAe;AAOvF,eAAe,mCAAmC,KAAK,UAAU,SAAS;AAG1E,eAAe,gBAAgB,UAAU,CAAC,gBACtC,qBAAqB,IAAI,OAAO,WAAW,OAAO;AAItD,eAAe,0BAA0B,KAAK,UAAU,SAAS;AAGjE,eAAe,mBAAmB,KAAK,UAAU,SAAS,KAAM,OAAO;AAIzE,IAAa,YAAqB,eAAe,mBAAmB,KAAK,UAAU,SAAS;AAI1F,eAAe,sBAAsB,KAAK,UAAU,SAAS"}
@@ -0,0 +1,3 @@
1
+ import { ElementNode, RangeSelection, TextNode } from 'lexical';
2
+ export declare function getSelectedNode(selection: RangeSelection): TextNode | ElementNode;
3
+ //# sourceMappingURL=getSelectedNode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSelectedNode.d.ts","sourceRoot":"","sources":["../../src/utils/getSelectedNode.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAErE,wBAAgB,eAAe,CAAC,SAAS,EAAE,cAAc,GAAG,QAAQ,GAAG,WAAW,CAcjF"}
@@ -0,0 +1,23 @@
1
+ import { $isAtNodeEnd } from "@lexical/selection";
2
+ //#region src/utils/getSelectedNode.ts
3
+ /**
4
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ *
9
+ * source: https://github.com/facebook/lexical/blob/main/packages/lexical-playground/src/utils/getSelectedNode.ts
10
+ */
11
+ function getSelectedNode(selection) {
12
+ const anchor = selection.anchor;
13
+ const focus = selection.focus;
14
+ const anchorNode = selection.anchor.getNode();
15
+ const focusNode = selection.focus.getNode();
16
+ if (anchorNode === focusNode) return anchorNode;
17
+ if (selection.isBackward()) return $isAtNodeEnd(focus) ? anchorNode : focusNode;
18
+ else return $isAtNodeEnd(anchor) ? anchorNode : focusNode;
19
+ }
20
+ //#endregion
21
+ export { getSelectedNode };
22
+
23
+ //# sourceMappingURL=getSelectedNode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSelectedNode.js","names":[],"sources":["../../src/utils/getSelectedNode.ts"],"sourcesContent":["/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * source: https://github.com/facebook/lexical/blob/main/packages/lexical-playground/src/utils/getSelectedNode.ts\n */\nimport { $isAtNodeEnd } from '@lexical/selection';\nimport type { ElementNode, RangeSelection, TextNode } from 'lexical';\n\nexport function getSelectedNode(selection: RangeSelection): TextNode | ElementNode {\n const anchor = selection.anchor;\n const focus = selection.focus;\n const anchorNode = selection.anchor.getNode();\n const focusNode = selection.focus.getNode();\n if (anchorNode === focusNode) {\n return anchorNode;\n }\n const isBackward = selection.isBackward();\n if (isBackward) {\n return $isAtNodeEnd(focus) ? anchorNode : focusNode;\n } else {\n return $isAtNodeEnd(anchor) ? anchorNode : focusNode;\n }\n}\n"],"mappings":";;;;;;;;;;AAWA,SAAgB,gBAAgB,WAAmD;CACjF,MAAM,SAAS,UAAU;CACzB,MAAM,QAAQ,UAAU;CACxB,MAAM,aAAa,UAAU,OAAO,QAAQ;CAC5C,MAAM,YAAY,UAAU,MAAM,QAAQ;CAC1C,IAAI,eAAe,WACjB,OAAO;CAGT,IADmB,UAAU,WACzB,GACF,OAAO,aAAa,KAAK,IAAI,aAAa;MAE1C,OAAO,aAAa,MAAM,IAAI,aAAa;AAE/C"}
@@ -0,0 +1,2 @@
1
+ export declare function setFloatingElemPosition(targetRect: DOMRect | null, floatingElem: HTMLElement, anchorElem: HTMLElement, isLink?: boolean, verticalGap?: number, horizontalOffset?: number): void;
2
+ //# sourceMappingURL=setFloatingElemPosition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setFloatingElemPosition.d.ts","sourceRoot":"","sources":["../../src/utils/setFloatingElemPosition.ts"],"names":[],"mappings":"AAUA,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,OAAO,GAAG,IAAI,EAC1B,YAAY,EAAE,WAAW,EACzB,UAAU,EAAE,WAAW,EACvB,MAAM,GAAE,OAAe,EACvB,WAAW,GAAE,MAAqB,EAClC,gBAAgB,GAAE,MAA0B,GAC3C,IAAI,CA8BN"}
@@ -0,0 +1,2 @@
1
+ export declare function setFloatingElemPositionForLinkEditor(targetRect: DOMRect | null, floatingElem: HTMLElement, anchorElem: HTMLElement, verticalGap?: number, horizontalOffset?: number): void;
2
+ //# sourceMappingURL=setFloatingElemPositionForLinkEditor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setFloatingElemPositionForLinkEditor.d.ts","sourceRoot":"","sources":["../../src/utils/setFloatingElemPositionForLinkEditor.ts"],"names":[],"mappings":"AAUA,wBAAgB,oCAAoC,CAClD,UAAU,EAAE,OAAO,GAAG,IAAI,EAC1B,YAAY,EAAE,WAAW,EACzB,UAAU,EAAE,WAAW,EACvB,WAAW,GAAE,MAAqB,EAClC,gBAAgB,GAAE,MAA0B,GAC3C,IAAI,CA6BN"}
@@ -0,0 +1,33 @@
1
+ //#region src/utils/setFloatingElemPositionForLinkEditor.ts
2
+ /**
3
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ *
8
+ */
9
+ var VERTICAL_GAP = 10;
10
+ var HORIZONTAL_OFFSET = 5;
11
+ function setFloatingElemPositionForLinkEditor(targetRect, floatingElem, anchorElem, verticalGap = VERTICAL_GAP, horizontalOffset = HORIZONTAL_OFFSET) {
12
+ const scrollerElem = anchorElem.parentElement;
13
+ if (targetRect === null || !scrollerElem) {
14
+ floatingElem.style.opacity = "0";
15
+ floatingElem.style.transform = "translate(-10000px, -10000px)";
16
+ return;
17
+ }
18
+ const floatingElemRect = floatingElem.getBoundingClientRect();
19
+ const anchorElementRect = anchorElem.getBoundingClientRect();
20
+ const editorScrollerRect = scrollerElem.getBoundingClientRect();
21
+ let top = targetRect.top - verticalGap;
22
+ let left = targetRect.left - horizontalOffset;
23
+ if (top < editorScrollerRect.top) top += floatingElemRect.height + targetRect.height + verticalGap * 2;
24
+ if (left + floatingElemRect.width > editorScrollerRect.right) left = editorScrollerRect.right - floatingElemRect.width - horizontalOffset;
25
+ top -= anchorElementRect.top;
26
+ left -= anchorElementRect.left;
27
+ floatingElem.style.opacity = "1";
28
+ floatingElem.style.transform = `translate(${left}px, ${top}px)`;
29
+ }
30
+ //#endregion
31
+ export { setFloatingElemPositionForLinkEditor };
32
+
33
+ //# sourceMappingURL=setFloatingElemPositionForLinkEditor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setFloatingElemPositionForLinkEditor.js","names":[],"sources":["../../src/utils/setFloatingElemPositionForLinkEditor.ts"],"sourcesContent":["/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nconst VERTICAL_GAP = 10;\nconst HORIZONTAL_OFFSET = 5;\n\nexport function setFloatingElemPositionForLinkEditor(\n targetRect: DOMRect | null,\n floatingElem: HTMLElement,\n anchorElem: HTMLElement,\n verticalGap: number = VERTICAL_GAP,\n horizontalOffset: number = HORIZONTAL_OFFSET\n): void {\n const scrollerElem = anchorElem.parentElement;\n\n if (targetRect === null || !scrollerElem) {\n floatingElem.style.opacity = '0';\n floatingElem.style.transform = 'translate(-10000px, -10000px)';\n return;\n }\n\n const floatingElemRect = floatingElem.getBoundingClientRect();\n const anchorElementRect = anchorElem.getBoundingClientRect();\n const editorScrollerRect = scrollerElem.getBoundingClientRect();\n\n let top = targetRect.top - verticalGap;\n let left = targetRect.left - horizontalOffset;\n\n if (top < editorScrollerRect.top) {\n top += floatingElemRect.height + targetRect.height + verticalGap * 2;\n }\n\n if (left + floatingElemRect.width > editorScrollerRect.right) {\n left = editorScrollerRect.right - floatingElemRect.width - horizontalOffset;\n }\n\n top -= anchorElementRect.top;\n left -= anchorElementRect.left;\n\n floatingElem.style.opacity = '1';\n floatingElem.style.transform = `translate(${left}px, ${top}px)`;\n}\n"],"mappings":";;;;;;;;AAOA,IAAM,eAAe;AACrB,IAAM,oBAAoB;AAE1B,SAAgB,qCACd,YACA,cACA,YACA,cAAsB,cACtB,mBAA2B,mBACrB;CACN,MAAM,eAAe,WAAW;CAEhC,IAAI,eAAe,QAAQ,CAAC,cAAc;EACxC,aAAa,MAAM,UAAU;EAC7B,aAAa,MAAM,YAAY;EAC/B;CACF;CAEA,MAAM,mBAAmB,aAAa,sBAAsB;CAC5D,MAAM,oBAAoB,WAAW,sBAAsB;CAC3D,MAAM,qBAAqB,aAAa,sBAAsB;CAE9D,IAAI,MAAM,WAAW,MAAM;CAC3B,IAAI,OAAO,WAAW,OAAO;CAE7B,IAAI,MAAM,mBAAmB,KAC3B,OAAO,iBAAiB,SAAS,WAAW,SAAS,cAAc;CAGrE,IAAI,OAAO,iBAAiB,QAAQ,mBAAmB,OACrD,OAAO,mBAAmB,QAAQ,iBAAiB,QAAQ;CAG7D,OAAO,kBAAkB;CACzB,QAAQ,kBAAkB;CAE1B,aAAa,MAAM,UAAU;CAC7B,aAAa,MAAM,YAAY,aAAa,KAAK,MAAM,IAAI;AAC7D"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * Source: https://github.com/facebook/lexical/blob/main/packages/lexical-playground/src/utils/url.ts
8
+ */
9
+ export declare function sanitizeUrl(url: string): string;
10
+ export declare function validateUrl(url: string): boolean;
11
+ //# sourceMappingURL=url.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../src/utils/url.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAW/C;AAMD,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAIhD"}