@examind/block-types 0.1.18

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 (59) hide show
  1. package/README.md +40 -0
  2. package/package.json +21 -0
  3. package/types/examind/index.d.ts +12 -0
  4. package/types/examind/nodes/EssayQuestionNode.ts +16 -0
  5. package/types/examind/nodes/FillInTheBlankQuestionNode.ts +14 -0
  6. package/types/examind/nodes/FillInTheBlankSpaceNode.ts +21 -0
  7. package/types/examind/nodes/FinancialStatementQuestionNode.ts +46 -0
  8. package/types/examind/nodes/HorizontalRuleNode.ts +3 -0
  9. package/types/examind/nodes/ImageNode.ts +18 -0
  10. package/types/examind/nodes/JournalEntryQuestionNode.ts +32 -0
  11. package/types/examind/nodes/MatchingQuestionNode.ts +21 -0
  12. package/types/examind/nodes/MultipleOptionQuestionNode.ts +29 -0
  13. package/types/examind/nodes/ShortAnswerQuestionNode.ts +15 -0
  14. package/types/examind/nodes/SimulationQuestionNode.ts +15 -0
  15. package/types/examind/nodes/VariableNode.ts +24 -0
  16. package/types/index.ts +2 -0
  17. package/types/lexical/LexicalCommands.ts +159 -0
  18. package/types/lexical/LexicalConstants.ts +51 -0
  19. package/types/lexical/LexicalEditor.ts +597 -0
  20. package/types/lexical/LexicalEditorState.ts +30 -0
  21. package/types/lexical/LexicalEvents.ts +13 -0
  22. package/types/lexical/LexicalGC.ts +13 -0
  23. package/types/lexical/LexicalMutations.ts +10 -0
  24. package/types/lexical/LexicalNode.ts +460 -0
  25. package/types/lexical/LexicalNodeState.ts +379 -0
  26. package/types/lexical/LexicalNormalization.ts +9 -0
  27. package/types/lexical/LexicalReconciler.ts +13 -0
  28. package/types/lexical/LexicalSelection.ts +295 -0
  29. package/types/lexical/LexicalUpdateTags.ts +51 -0
  30. package/types/lexical/LexicalUpdates.ts +31 -0
  31. package/types/lexical/LexicalUtils.ts +304 -0
  32. package/types/lexical/index.ts +35 -0
  33. package/types/lexical/link/index.ts +125 -0
  34. package/types/lexical/list/LexicalListItemNode.ts +65 -0
  35. package/types/lexical/list/LexicalListNode.ts +56 -0
  36. package/types/lexical/list/checkList.ts +9 -0
  37. package/types/lexical/list/formatList.ts +69 -0
  38. package/types/lexical/list/index.ts +11 -0
  39. package/types/lexical/list/utils.ts +64 -0
  40. package/types/lexical/nodes/ArtificialNode.ts +12 -0
  41. package/types/lexical/nodes/LexicalDecoratorNode.ts +26 -0
  42. package/types/lexical/nodes/LexicalElementNode.ts +207 -0
  43. package/types/lexical/nodes/LexicalLineBreakNode.ts +25 -0
  44. package/types/lexical/nodes/LexicalParagraphNode.ts +31 -0
  45. package/types/lexical/nodes/LexicalRootNode.ts +30 -0
  46. package/types/lexical/nodes/LexicalTabNode.ts +28 -0
  47. package/types/lexical/nodes/LexicalTextNode.ts +288 -0
  48. package/types/lexical/rich-text/index.ts +53 -0
  49. package/types/lexical/table/LexicalTableCellNode.ts +72 -0
  50. package/types/lexical/table/LexicalTableCommands.ts +17 -0
  51. package/types/lexical/table/LexicalTableNode.ts +65 -0
  52. package/types/lexical/table/LexicalTableObserver.ts +108 -0
  53. package/types/lexical/table/LexicalTablePluginHelpers.ts +25 -0
  54. package/types/lexical/table/LexicalTableRowNode.ts +34 -0
  55. package/types/lexical/table/LexicalTableSelection.ts +74 -0
  56. package/types/lexical/table/LexicalTableSelectionHelpers.ts +40 -0
  57. package/types/lexical/table/LexicalTableUtils.ts +112 -0
  58. package/types/lexical/table/constants.ts +8 -0
  59. package/types/lexical/table/index.ts +16 -0
package/README.md ADDED
@@ -0,0 +1,40 @@
1
+ # @examind/block-types
2
+
3
+ TypeScript type definitions shared between `@examind/block-editor` and `@examind/block-sdk`.
4
+
5
+ ## Purpose
6
+
7
+ - Defines shared types across Examind block editor packages
8
+ - Extracts necessary type definitions from Lexical
9
+ - Allows `@examind/block-sdk` to avoid a direct dependency on Lexical
10
+ - Zero runtime payload (declaration files only)
11
+
12
+ ## Usage
13
+
14
+ ```typescript
15
+ import type {
16
+ LexicalEditor,
17
+ LexicalNode,
18
+ } from '@examind/block-types';
19
+ ```
20
+
21
+ ## Development
22
+
23
+ This package contains only TypeScript declaration files (`.d.ts`), with no compilation step required.
24
+
25
+ ```bash
26
+ # Copy types from Lexical
27
+ pnpm copy-types
28
+ ```
29
+
30
+ ## Integration
31
+
32
+ In consuming packages:
33
+
34
+ ```json
35
+ {
36
+ "devDependencies": {
37
+ "@examind/block-types": "workspace:*"
38
+ }
39
+ }
40
+ ```
package/package.json ADDED
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "@examind/block-types",
3
+ "version": "0.1.18",
4
+ "@comment version": [
5
+ "Don't specify package version here. It will be injected by publish workflow."
6
+ ],
7
+ "description": "TypeScript type definitions for Lexical editor state",
8
+ "types": "types/index.ts",
9
+ "files": [
10
+ "types/**/*.ts"
11
+ ],
12
+ "keywords": [],
13
+ "author": "",
14
+ "license": "ISC",
15
+ "devDependencies": {
16
+ "typescript": "5.7.2"
17
+ },
18
+ "scripts": {
19
+ "copy-types": "node scripts/copy-types.js"
20
+ }
21
+ }
@@ -0,0 +1,12 @@
1
+ export * from './nodes/EssayQuestionNode';
2
+ export * from './nodes/FillInTheBlankQuestionNode';
3
+ export * from './nodes/FillInTheBlankSpaceNode';
4
+ export * from './nodes/FinancialStatementQuestionNode';
5
+ export * from './nodes/HorizontalRuleNode';
6
+ export * from './nodes/ImageNode';
7
+ export * from './nodes/JournalEntryQuestionNode';
8
+ export * from './nodes/MatchingQuestionNode';
9
+ export * from './nodes/MultipleOptionQuestionNode';
10
+ export * from './nodes/ShortAnswerQuestionNode';
11
+ export * from './nodes/SimulationQuestionNode';
12
+ export * from './nodes/VariableNode';
@@ -0,0 +1,16 @@
1
+ import {
2
+ type SerializedLexicalNode,
3
+ type Spread,
4
+ } from '../../lexical';
5
+
6
+ export type SerializedEssayQuestionNode = Spread<
7
+ {
8
+ id: string;
9
+ points: number;
10
+ maxWords: number;
11
+ hideChat: boolean;
12
+ aiSystemMessage: string | null;
13
+ aiChatModel: string | null;
14
+ },
15
+ SerializedLexicalNode
16
+ >;
@@ -0,0 +1,14 @@
1
+ import {
2
+ type SerializedEditor,
3
+ type SerializedLexicalNode,
4
+ type Spread,
5
+ } from '../../lexical';
6
+
7
+ export type SerializedFillInTheBlankQuestionNode = Spread<
8
+ {
9
+ id: string;
10
+ pointsPerSpace: number;
11
+ content: SerializedEditor;
12
+ },
13
+ SerializedLexicalNode
14
+ >;
@@ -0,0 +1,21 @@
1
+ import {
2
+ type SerializedLexicalNode,
3
+ type Spread,
4
+ } from '../../lexical';
5
+
6
+ export type FillInTheBlankSpaceType = 'Text' | 'Number' | 'Dropdown';
7
+
8
+ export type SerializedFillInTheBlankSpaceNode = Spread<
9
+ {
10
+ id: string;
11
+ spaceName: string;
12
+ matches: string;
13
+ caseSensitive?: boolean;
14
+ errorsAllowed?: number;
15
+ minDecimals?: number;
16
+ errorTolerance?: number;
17
+ distractors?: string;
18
+ spaceType: FillInTheBlankSpaceType;
19
+ },
20
+ SerializedLexicalNode
21
+ >;
@@ -0,0 +1,46 @@
1
+ import {
2
+ type SerializedEditor,
3
+ type SerializedLexicalNode,
4
+ type Spread,
5
+ } from '../../lexical';
6
+
7
+ export type FinancialStatementRowType = 'Heading' | 'Line';
8
+
9
+ export type SerializableFinancialStatementHeading = {
10
+ type: FinancialStatementRowType;
11
+ id: string;
12
+ depth: number;
13
+ entry: string;
14
+ isHint: boolean;
15
+ };
16
+
17
+ export type SerializableFinancialStatementLine = {
18
+ type: FinancialStatementRowType;
19
+ id: string;
20
+ depth: number;
21
+ entry: string;
22
+ amount: SerializedEditor;
23
+ isEntryHint: boolean;
24
+ isAmountHint: boolean;
25
+ role: 'line-item' | 'subtotal' | 'total' | null;
26
+ };
27
+
28
+ export type SerializableFinancialStatementRow =
29
+ | SerializableFinancialStatementHeading
30
+ | SerializableFinancialStatementLine;
31
+ export type SerializableFinancialStatementDistractor = {
32
+ id: string;
33
+ entry: string;
34
+ };
35
+
36
+ export type SerializedFinancialStatementQuestionNode = Spread<
37
+ {
38
+ id: string;
39
+ points: number;
40
+ header: SerializedEditor;
41
+ columnHeaders: Array<string>;
42
+ rows: Array<SerializableFinancialStatementRow>;
43
+ distractors: Array<SerializableFinancialStatementDistractor>;
44
+ },
45
+ SerializedLexicalNode
46
+ >;
@@ -0,0 +1,3 @@
1
+ import { type SerializedLexicalNode } from '../../lexical';
2
+
3
+ export type SerializedHorizontalRuleNode = SerializedLexicalNode;
@@ -0,0 +1,18 @@
1
+ import {
2
+ type SerializedEditor,
3
+ type SerializedLexicalNode,
4
+ type Spread,
5
+ } from '../../lexical';
6
+
7
+ export type SerializedImageNode = Spread<
8
+ {
9
+ altText: string;
10
+ caption: SerializedEditor;
11
+ showCaption: boolean;
12
+ src: string;
13
+ width: string;
14
+ align: string;
15
+ showBorder: boolean;
16
+ },
17
+ SerializedLexicalNode
18
+ >;
@@ -0,0 +1,32 @@
1
+ import {
2
+ type SerializedEditor,
3
+ type SerializedLexicalNode,
4
+ type Spread,
5
+ } from '../../lexical';
6
+
7
+ const JournalTypes = [
8
+ 'default',
9
+ 'noEntryRequiredCorrect',
10
+ 'noEntryRequiredDistractor',
11
+ ] as const;
12
+
13
+ export type JournalType = (typeof JournalTypes)[number];
14
+
15
+ export type SerializedJournalEntryQuestionItem = {
16
+ id: string;
17
+ correct: boolean;
18
+ account: SerializedEditor;
19
+ debit?: SerializedEditor;
20
+ credit?: SerializedEditor;
21
+ };
22
+
23
+ export type SerializedJournalEntryQuestionNode = Spread<
24
+ {
25
+ id: string;
26
+ journalType: JournalType;
27
+ points: number;
28
+ errorTolerance?: number;
29
+ lineItems: Array<SerializedJournalEntryQuestionItem>;
30
+ },
31
+ SerializedLexicalNode
32
+ >;
@@ -0,0 +1,21 @@
1
+ import {
2
+ type SerializedEditor,
3
+ type SerializedLexicalNode,
4
+ type Spread,
5
+ } from '../../lexical';
6
+
7
+ export type SerializedQuestionItem = {
8
+ id: string;
9
+ correct: boolean;
10
+ itemPremiseContent?: SerializedEditor;
11
+ itemOptionContent: SerializedEditor;
12
+ };
13
+
14
+ export type SerializedMatchingQuestionNode = Spread<
15
+ {
16
+ id: string;
17
+ pointsPerMatch: number;
18
+ items: Array<SerializedQuestionItem>;
19
+ },
20
+ SerializedLexicalNode
21
+ >;
@@ -0,0 +1,29 @@
1
+ import {
2
+ type SerializedEditor,
3
+ type SerializedLexicalNode,
4
+ type Spread,
5
+ } from '../../lexical';
6
+
7
+ export type QuestionType = 'multiple-choice' | 'multiple-answers';
8
+ export type GradingType = 'partialCreditWithPenalty' | 'exactMatch';
9
+
10
+ export type SerializedMultipleOptionQuestionItem = {
11
+ id: string;
12
+ correct?: boolean;
13
+ content: SerializedEditor;
14
+ };
15
+
16
+ export type SerializedMultipleOptionQuestionNode = Spread<
17
+ {
18
+ id: string;
19
+ questionType: QuestionType;
20
+ points: number;
21
+ choices?: number;
22
+ correctChoices?: number;
23
+ incorrectChoices?: number;
24
+ grading?: GradingType;
25
+ noneOfTheAbove?: boolean;
26
+ options: Array<SerializedMultipleOptionQuestionItem>;
27
+ },
28
+ SerializedLexicalNode
29
+ >;
@@ -0,0 +1,15 @@
1
+ import {
2
+ type SerializedEditor,
3
+ type SerializedLexicalNode,
4
+ type Spread,
5
+ } from '../../lexical';
6
+
7
+ export type SerializedShortAnswerQuestionNode = Spread<
8
+ {
9
+ id: string;
10
+ points: number;
11
+ maxWords: number;
12
+ notes: SerializedEditor;
13
+ },
14
+ SerializedLexicalNode
15
+ >;
@@ -0,0 +1,15 @@
1
+ import {
2
+ type SerializedLexicalNode,
3
+ type Spread,
4
+ } from '../../lexical';
5
+
6
+ export type SerializedSimulationQuestionNode = Spread<
7
+ {
8
+ id: string;
9
+ points: number;
10
+ aiSystemMessage: string | null;
11
+ aiChatModel: string | null;
12
+ step2Instructions: string | null;
13
+ },
14
+ SerializedLexicalNode
15
+ >;
@@ -0,0 +1,24 @@
1
+ import {
2
+ type SerializedLexicalNode,
3
+ type Spread,
4
+ } from '../../lexical';
5
+
6
+ export type VariableFormatsType = readonly [
7
+ '0',
8
+ '0,0',
9
+ '0,0.0',
10
+ '0,0.00',
11
+ '(0,0)',
12
+ '(0,0.00)',
13
+ ];
14
+
15
+ export type SerializedVariableNode = Spread<
16
+ {
17
+ variableName: string;
18
+ variableFormat?: VariableFormatsType[number];
19
+ isBold?: boolean;
20
+ isItalic?: boolean;
21
+ isUnderline?: boolean;
22
+ },
23
+ SerializedLexicalNode
24
+ >;
package/types/index.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './examind';
2
+ export * from './lexical';
@@ -0,0 +1,159 @@
1
+ // THIS FILE IS AUTO-GENERATED
2
+ // To regenerate, run: pnpm build (from the root of the project)
3
+
4
+ // Type definitions based on Lexical
5
+ // Original copyright: Meta Platforms, Inc. and affiliates.
6
+
7
+ import type { LexicalCommand } from './LexicalEditor';
8
+ import type { LexicalNode } from './LexicalNode';
9
+ import type { BaseSelection } from './LexicalSelection';
10
+ import type { ElementFormatType } from './nodes/LexicalElementNode';
11
+ import type { TextFormatType } from './nodes/LexicalTextNode';
12
+ export type PasteCommandType = ClipboardEvent | InputEvent | KeyboardEvent;
13
+ export declare function createCommand<T>(type?: string): LexicalCommand<T>;
14
+ export declare const SELECTION_CHANGE_COMMAND: LexicalCommand<void>;
15
+ export declare const SELECTION_INSERT_CLIPBOARD_NODES_COMMAND: LexicalCommand<{
16
+ nodes: Array<LexicalNode>;
17
+ selection: BaseSelection;
18
+ }>;
19
+ export declare const CLICK_COMMAND: LexicalCommand<MouseEvent>;
20
+ /**
21
+ * Dispatched to delete a character, the payload will be `true` if the deletion
22
+ * is backwards (backspace or delete on macOS) and `false` if forwards
23
+ * (delete or Fn+Delete on macOS).
24
+ */
25
+ export declare const DELETE_CHARACTER_COMMAND: LexicalCommand<boolean>;
26
+ /**
27
+ * Dispatched to insert a line break. With a false payload the
28
+ * cursor moves to the new line (Shift+Enter), with a true payload the cursor
29
+ * does not move (Ctrl+O on macOS).
30
+ */
31
+ export declare const INSERT_LINE_BREAK_COMMAND: LexicalCommand<boolean>;
32
+ export declare const INSERT_PARAGRAPH_COMMAND: LexicalCommand<void>;
33
+ export declare const CONTROLLED_TEXT_INSERTION_COMMAND: LexicalCommand<InputEvent | string>;
34
+ export declare const PASTE_COMMAND: LexicalCommand<PasteCommandType>;
35
+ export declare const REMOVE_TEXT_COMMAND: LexicalCommand<InputEvent | null>;
36
+ /**
37
+ * Dispatched to delete a word, the payload will be `true` if the deletion is
38
+ * backwards (Ctrl+Backspace or Opt+Delete on macOS), and `false` if
39
+ * forwards (Ctrl+Delete or Fn+Opt+Delete on macOS).
40
+ */
41
+ export declare const DELETE_WORD_COMMAND: LexicalCommand<boolean>;
42
+ /**
43
+ * Dispatched to delete a line, the payload will be `true` if the deletion is
44
+ * backwards (Cmd+Delete on macOS), and `false` if forwards
45
+ * (Fn+Cmd+Delete on macOS).
46
+ */
47
+ export declare const DELETE_LINE_COMMAND: LexicalCommand<boolean>;
48
+ /**
49
+ * Dispatched to format the selected text.
50
+ */
51
+ export declare const FORMAT_TEXT_COMMAND: LexicalCommand<TextFormatType>;
52
+ /**
53
+ * Dispatched on undo (Cmd+Z on macOS, Ctrl+Z elsewhere).
54
+ */
55
+ export declare const UNDO_COMMAND: LexicalCommand<void>;
56
+ /**
57
+ * Dispatched on redo (Shift+Cmd+Z on macOS, Shift+Ctrl+Z or Ctrl+Y elsewhere).
58
+ */
59
+ export declare const REDO_COMMAND: LexicalCommand<void>;
60
+ /**
61
+ * Dispatched when any key is pressed.
62
+ */
63
+ export declare const KEY_DOWN_COMMAND: LexicalCommand<KeyboardEvent>;
64
+ /**
65
+ * Dispatched when the `'ArrowRight'` key is pressed.
66
+ * The shift modifier key may also be down.
67
+ */
68
+ export declare const KEY_ARROW_RIGHT_COMMAND: LexicalCommand<KeyboardEvent>;
69
+ /**
70
+ * Dispatched when the move to end keyboard shortcut is pressed,
71
+ * (Cmd+Right on macOS; Ctrl+Right elsewhere).
72
+ */
73
+ export declare const MOVE_TO_END: LexicalCommand<KeyboardEvent>;
74
+ /**
75
+ * Dispatched when the `'ArrowLeft'` key is pressed.
76
+ * The shift modifier key may also be down.
77
+ */
78
+ export declare const KEY_ARROW_LEFT_COMMAND: LexicalCommand<KeyboardEvent>;
79
+ /**
80
+ * Dispatched when the move to start keyboard shortcut is pressed,
81
+ * (Cmd+Left on macOS; Ctrl+Left elsewhere).
82
+ */
83
+ export declare const MOVE_TO_START: LexicalCommand<KeyboardEvent>;
84
+ /**
85
+ * Dispatched when the `'ArrowUp'` key is pressed.
86
+ * The shift and/or alt (option) modifier keys may also be down.
87
+ */
88
+ export declare const KEY_ARROW_UP_COMMAND: LexicalCommand<KeyboardEvent>;
89
+ /**
90
+ * Dispatched when the `'ArrowUp'` key is pressed.
91
+ * The shift and/or alt (option) modifier keys may also be down.
92
+ */
93
+ export declare const KEY_ARROW_DOWN_COMMAND: LexicalCommand<KeyboardEvent>;
94
+ /**
95
+ * Dispatched when the enter key is pressed, may also be called with a null
96
+ * payload when the intent is to insert a newline. The shift modifier key
97
+ * must be down, any other modifier keys may also be down.
98
+ */
99
+ export declare const KEY_ENTER_COMMAND: LexicalCommand<KeyboardEvent | null>;
100
+ /**
101
+ * Dispatched whenever the space (`' '`) key is pressed, any modifier
102
+ * keys may be down.
103
+ */
104
+ export declare const KEY_SPACE_COMMAND: LexicalCommand<KeyboardEvent>;
105
+ /**
106
+ * Dispatched whenever the `'Backspace'` key is pressed, the shift
107
+ * modifier key may be down.
108
+ */
109
+ export declare const KEY_BACKSPACE_COMMAND: LexicalCommand<KeyboardEvent>;
110
+ /**
111
+ * Dispatched whenever the `'Escape'` key is pressed, any modifier
112
+ * keys may be down.
113
+ */
114
+ export declare const KEY_ESCAPE_COMMAND: LexicalCommand<KeyboardEvent>;
115
+ /**
116
+ * Dispatched whenever the `'Delete'` key is pressed (Fn+Delete on macOS).
117
+ */
118
+ export declare const KEY_DELETE_COMMAND: LexicalCommand<KeyboardEvent>;
119
+ /**
120
+ * Dispatched whenever the `'Tab'` key is pressed. The shift modifier key
121
+ * may be down.
122
+ */
123
+ export declare const KEY_TAB_COMMAND: LexicalCommand<KeyboardEvent>;
124
+ export declare const INSERT_TAB_COMMAND: LexicalCommand<void>;
125
+ export declare const INDENT_CONTENT_COMMAND: LexicalCommand<void>;
126
+ export declare const OUTDENT_CONTENT_COMMAND: LexicalCommand<void>;
127
+ export declare const DROP_COMMAND: LexicalCommand<DragEvent>;
128
+ export declare const FORMAT_ELEMENT_COMMAND: LexicalCommand<ElementFormatType>;
129
+ export declare const DRAGSTART_COMMAND: LexicalCommand<DragEvent>;
130
+ export declare const DRAGOVER_COMMAND: LexicalCommand<DragEvent>;
131
+ export declare const DRAGEND_COMMAND: LexicalCommand<DragEvent>;
132
+ /**
133
+ * Dispatched on a copy event, either via the clipboard or a KeyboardEvent
134
+ * (Cmd+C on macOS, Ctrl+C elsewhere).
135
+ */
136
+ export declare const COPY_COMMAND: LexicalCommand<ClipboardEvent | KeyboardEvent | null>;
137
+ /**
138
+ * Dispatched on a cut event, either via the clipboard or a KeyboardEvent
139
+ * (Cmd+X on macOS, Ctrl+X elsewhere).
140
+ */
141
+ export declare const CUT_COMMAND: LexicalCommand<ClipboardEvent | KeyboardEvent | null>;
142
+ /**
143
+ * Dispatched on the select all keyboard shortcut
144
+ * (Cmd+A on macOS, Ctrl+A elsehwere).
145
+ */
146
+ export declare const SELECT_ALL_COMMAND: LexicalCommand<KeyboardEvent>;
147
+ export declare const CLEAR_EDITOR_COMMAND: LexicalCommand<void>;
148
+ export declare const CLEAR_HISTORY_COMMAND: LexicalCommand<void>;
149
+ export declare const CAN_REDO_COMMAND: LexicalCommand<boolean>;
150
+ export declare const CAN_UNDO_COMMAND: LexicalCommand<boolean>;
151
+ export declare const FOCUS_COMMAND: LexicalCommand<FocusEvent>;
152
+ export declare const BLUR_COMMAND: LexicalCommand<FocusEvent>;
153
+ /**
154
+ * @deprecated in v0.31.0, use KEY_DOWN_COMMAND and check for modifiers
155
+ * directly.
156
+ *
157
+ * Dispatched after any KeyboardEvent when modifiers are pressed
158
+ */
159
+ export declare const KEY_MODIFIER_COMMAND: LexicalCommand<KeyboardEvent>;
@@ -0,0 +1,51 @@
1
+ // THIS FILE IS AUTO-GENERATED
2
+ // To regenerate, run: pnpm build (from the root of the project)
3
+
4
+ // Type definitions based on Lexical
5
+ // Original copyright: Meta Platforms, Inc. and affiliates.
6
+
7
+ import type { ElementFormatType } from './nodes/LexicalElementNode';
8
+ import type { TextDetailType, TextFormatType, TextModeType } from './nodes/LexicalTextNode';
9
+ export declare const DOM_ELEMENT_TYPE = 1;
10
+ export declare const DOM_TEXT_TYPE = 3;
11
+ export declare const DOM_DOCUMENT_TYPE = 9;
12
+ export declare const DOM_DOCUMENT_FRAGMENT_TYPE = 11;
13
+ export declare const NO_DIRTY_NODES = 0;
14
+ export declare const HAS_DIRTY_NODES = 1;
15
+ export declare const FULL_RECONCILE = 2;
16
+ export declare const IS_NORMAL = 0;
17
+ export declare const IS_TOKEN = 1;
18
+ export declare const IS_SEGMENTED = 2;
19
+ export declare const IS_BOLD = 1;
20
+ export declare const IS_ITALIC: number;
21
+ export declare const IS_STRIKETHROUGH: number;
22
+ export declare const IS_UNDERLINE: number;
23
+ export declare const IS_CODE: number;
24
+ export declare const IS_SUBSCRIPT: number;
25
+ export declare const IS_SUPERSCRIPT: number;
26
+ export declare const IS_HIGHLIGHT: number;
27
+ export declare const IS_LOWERCASE: number;
28
+ export declare const IS_UPPERCASE: number;
29
+ export declare const IS_CAPITALIZE: number;
30
+ export declare const IS_ALL_FORMATTING: number;
31
+ export declare const IS_DIRECTIONLESS = 1;
32
+ export declare const IS_UNMERGEABLE: number;
33
+ export declare const IS_ALIGN_LEFT = 1;
34
+ export declare const IS_ALIGN_CENTER = 2;
35
+ export declare const IS_ALIGN_RIGHT = 3;
36
+ export declare const IS_ALIGN_JUSTIFY = 4;
37
+ export declare const IS_ALIGN_START = 5;
38
+ export declare const IS_ALIGN_END = 6;
39
+ export declare const NON_BREAKING_SPACE = "\u00A0";
40
+ export declare const COMPOSITION_SUFFIX: string;
41
+ export declare const DOUBLE_LINE_BREAK = "\n\n";
42
+ export declare const COMPOSITION_START_CHAR: string;
43
+ export declare const RTL_REGEX: RegExp;
44
+ export declare const LTR_REGEX: RegExp;
45
+ export declare const TEXT_TYPE_TO_FORMAT: Record<TextFormatType | string, number>;
46
+ export declare const DETAIL_TYPE_TO_DETAIL: Record<TextDetailType | string, number>;
47
+ export declare const ELEMENT_TYPE_TO_FORMAT: Record<Exclude<ElementFormatType, ''>, number>;
48
+ export declare const ELEMENT_FORMAT_TO_TYPE: Record<number, ElementFormatType>;
49
+ export declare const TEXT_MODE_TO_TYPE: Record<TextModeType, 0 | 1 | 2>;
50
+ export declare const TEXT_TYPE_TO_MODE: Record<number, TextModeType>;
51
+ export declare const NODE_STATE_KEY = "$";