@examind/block-editor 0.1.22 → 0.1.24
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.
- package/dist/index.css +59 -79
- package/dist/index.js +954 -850
- package/dist/index.mjs +1115 -1017
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -105,7 +105,7 @@ function ResizeObserver(props) {
|
|
|
105
105
|
|
|
106
106
|
// src/plugins/CalloutBoxPlugin/CalloutBoxNode.tsx
|
|
107
107
|
var import_lexical54 = require("lexical");
|
|
108
|
-
var
|
|
108
|
+
var import_lucide_react13 = require("lucide-react");
|
|
109
109
|
|
|
110
110
|
// src/components/icon/Icon.tsx
|
|
111
111
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
@@ -6092,80 +6092,22 @@ function $isFinancialStatementQuestionNode(node) {
|
|
|
6092
6092
|
}
|
|
6093
6093
|
|
|
6094
6094
|
// src/plugins/MatchingQuestionPlugin/MatchingQuestionNode.tsx
|
|
6095
|
-
var
|
|
6095
|
+
var import_lexical30 = require("lexical");
|
|
6096
6096
|
var import_nanoid3 = require("nanoid");
|
|
6097
6097
|
|
|
6098
|
-
// src/plugins/
|
|
6098
|
+
// src/plugins/VariablesPlugin/VariableToolbarAgentPlugin.tsx
|
|
6099
6099
|
var import_LexicalComposerContext23 = require("@lexical/react/LexicalComposerContext");
|
|
6100
|
+
var import_utils8 = require("@lexical/utils");
|
|
6100
6101
|
var import_lexical27 = require("lexical");
|
|
6101
6102
|
var import_react42 = require("react");
|
|
6102
6103
|
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
6103
|
-
|
|
6104
|
-
const { nodeKey, itemIndex } = props;
|
|
6105
|
-
const [editor] = (0, import_LexicalComposerContext23.useLexicalComposerContext)();
|
|
6106
|
-
const addDistractor = (0, import_react42.useCallback)(() => {
|
|
6107
|
-
editor.update(
|
|
6108
|
-
() => {
|
|
6109
|
-
const foundNode = (0, import_lexical27.$getNodeByKey)(nodeKey);
|
|
6110
|
-
if ($isMatchingQuestionNode(foundNode)) {
|
|
6111
|
-
foundNode.addItem(itemIndex, false);
|
|
6112
|
-
}
|
|
6113
|
-
},
|
|
6114
|
-
{
|
|
6115
|
-
onUpdate: () => {
|
|
6116
|
-
editor.getEditorState().read(() => {
|
|
6117
|
-
const foundNode = (0, import_lexical27.$getNodeByKey)(nodeKey);
|
|
6118
|
-
if ($isMatchingQuestionNode(foundNode)) {
|
|
6119
|
-
const newQuestionItem = foundNode.__items[itemIndex + 1];
|
|
6120
|
-
if (newQuestionItem.itemOptionContent) {
|
|
6121
|
-
newQuestionItem.itemOptionContent.update(() => {
|
|
6122
|
-
const root = (0, import_lexical27.$getRoot)();
|
|
6123
|
-
let firstChild = root.getFirstChild();
|
|
6124
|
-
if (!firstChild) {
|
|
6125
|
-
firstChild = (0, import_lexical27.$createParagraphNode)();
|
|
6126
|
-
root.append(firstChild);
|
|
6127
|
-
}
|
|
6128
|
-
firstChild.selectStart();
|
|
6129
|
-
});
|
|
6130
|
-
}
|
|
6131
|
-
}
|
|
6132
|
-
});
|
|
6133
|
-
}
|
|
6134
|
-
}
|
|
6135
|
-
);
|
|
6136
|
-
}, [editor, nodeKey, itemIndex]);
|
|
6137
|
-
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "matching-question-prompt-question-item-wrapper", children: [
|
|
6138
|
-
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", {}),
|
|
6139
|
-
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "matching-question-distractor-button", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
6140
|
-
Button,
|
|
6141
|
-
{
|
|
6142
|
-
label: "Add Distractor",
|
|
6143
|
-
variant: "text",
|
|
6144
|
-
size: "small",
|
|
6145
|
-
onClick: addDistractor
|
|
6146
|
-
}
|
|
6147
|
-
) })
|
|
6148
|
-
] });
|
|
6149
|
-
}
|
|
6150
|
-
|
|
6151
|
-
// src/plugins/MatchingQuestionPlugin/MatchingQuestionComponent.tsx
|
|
6152
|
-
var import_LexicalComposerContext26 = require("@lexical/react/LexicalComposerContext");
|
|
6153
|
-
var import_lexical30 = require("lexical");
|
|
6154
|
-
var import_react45 = require("react");
|
|
6155
|
-
|
|
6156
|
-
// src/plugins/VariablesPlugin/VariableToolbarAgentPlugin.tsx
|
|
6157
|
-
var import_LexicalComposerContext24 = require("@lexical/react/LexicalComposerContext");
|
|
6158
|
-
var import_utils8 = require("@lexical/utils");
|
|
6159
|
-
var import_lexical28 = require("lexical");
|
|
6160
|
-
var import_react43 = require("react");
|
|
6161
|
-
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
6162
|
-
var VARIABLE_TOOLBAR_SELECTION_CHANGE_COMMAND = (0, import_lexical28.createCommand)("VARIABLE_TOOLBAR_SELECTION_CHANGE_COMMAND");
|
|
6104
|
+
var VARIABLE_TOOLBAR_SELECTION_CHANGE_COMMAND = (0, import_lexical27.createCommand)("VARIABLE_TOOLBAR_SELECTION_CHANGE_COMMAND");
|
|
6163
6105
|
function VariableToolbarAgentPlugin() {
|
|
6164
|
-
const [editor] = (0,
|
|
6165
|
-
(0,
|
|
6106
|
+
const [editor] = (0, import_LexicalComposerContext23.useLexicalComposerContext)();
|
|
6107
|
+
(0, import_react42.useEffect)(() => {
|
|
6166
6108
|
return (0, import_utils8.mergeRegister)(
|
|
6167
6109
|
editor.registerCommand(
|
|
6168
|
-
|
|
6110
|
+
import_lexical27.SELECTION_CHANGE_COMMAND,
|
|
6169
6111
|
(_payload, activeEditor) => {
|
|
6170
6112
|
if (editor === activeEditor) {
|
|
6171
6113
|
activeEditor.dispatchCommand(
|
|
@@ -6175,7 +6117,7 @@ function VariableToolbarAgentPlugin() {
|
|
|
6175
6117
|
}
|
|
6176
6118
|
return false;
|
|
6177
6119
|
},
|
|
6178
|
-
|
|
6120
|
+
import_lexical27.COMMAND_PRIORITY_EDITOR
|
|
6179
6121
|
),
|
|
6180
6122
|
editor.registerUpdateListener(({ tags }) => {
|
|
6181
6123
|
if (!tags.has("history-merge")) {
|
|
@@ -6187,37 +6129,248 @@ function VariableToolbarAgentPlugin() {
|
|
|
6187
6129
|
})
|
|
6188
6130
|
);
|
|
6189
6131
|
}, [editor]);
|
|
6190
|
-
return /* @__PURE__ */ (0,
|
|
6132
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_jsx_runtime54.Fragment, {});
|
|
6191
6133
|
}
|
|
6192
6134
|
|
|
6193
|
-
// src/plugins/MatchingQuestionPlugin/
|
|
6194
|
-
var import_LexicalComposerContext25 = require("@lexical/react/LexicalComposerContext");
|
|
6135
|
+
// src/plugins/MatchingQuestionPlugin/QuestionDistractorItemComponent.tsx
|
|
6195
6136
|
var import_LexicalErrorBoundary3 = require("@lexical/react/LexicalErrorBoundary");
|
|
6196
6137
|
var import_LexicalHistoryPlugin4 = require("@lexical/react/LexicalHistoryPlugin");
|
|
6197
6138
|
var import_LexicalNestedComposer3 = require("@lexical/react/LexicalNestedComposer");
|
|
6198
6139
|
var import_LexicalRichTextPlugin2 = require("@lexical/react/LexicalRichTextPlugin");
|
|
6199
|
-
var import_clsx2 = __toESM(require("clsx"));
|
|
6200
|
-
var import_lexical29 = require("lexical");
|
|
6201
6140
|
var import_lucide_react6 = require("lucide-react");
|
|
6141
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
6142
|
+
function QuestionDistractorItemComponent(props) {
|
|
6143
|
+
const { nodeKey, itemOptionContent } = props;
|
|
6144
|
+
const { historyState } = useSharedHistoryContext();
|
|
6145
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
|
|
6146
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
6147
|
+
"div",
|
|
6148
|
+
{
|
|
6149
|
+
className: "matching-question-prompt-question-item-controls",
|
|
6150
|
+
style: { gridColumn: "span 2" },
|
|
6151
|
+
"data-selectable": "true",
|
|
6152
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
6153
|
+
Button,
|
|
6154
|
+
{
|
|
6155
|
+
StartIcon: import_lucide_react6.XIcon,
|
|
6156
|
+
size: "small",
|
|
6157
|
+
variant: "text",
|
|
6158
|
+
className: "danger"
|
|
6159
|
+
}
|
|
6160
|
+
) })
|
|
6161
|
+
}
|
|
6162
|
+
),
|
|
6163
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
6164
|
+
"div",
|
|
6165
|
+
{
|
|
6166
|
+
className: "matching-question-prompt-question-item",
|
|
6167
|
+
"data-selectable": "true",
|
|
6168
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_LexicalNestedComposer3.LexicalNestedComposer, { initialEditor: itemOptionContent, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(NestedEditor, { nodeKey, children: [
|
|
6169
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(SettingsPanelNestedAgentPlugin, {}),
|
|
6170
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
6171
|
+
import_LexicalRichTextPlugin2.RichTextPlugin,
|
|
6172
|
+
{
|
|
6173
|
+
contentEditable: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(NestedContentEditable, {}),
|
|
6174
|
+
ErrorBoundary: import_LexicalErrorBoundary3.LexicalErrorBoundary,
|
|
6175
|
+
placeholder: null
|
|
6176
|
+
},
|
|
6177
|
+
nodeKey
|
|
6178
|
+
),
|
|
6179
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_LexicalHistoryPlugin4.HistoryPlugin, { externalHistoryState: historyState }),
|
|
6180
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
6181
|
+
TextToolbarAgentPlugin,
|
|
6182
|
+
{
|
|
6183
|
+
decoratorNode: MatchingQuestionNode
|
|
6184
|
+
}
|
|
6185
|
+
),
|
|
6186
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
6187
|
+
TypeaheadVariableAgentPlugin,
|
|
6188
|
+
{
|
|
6189
|
+
decoratorNode: MatchingQuestionNode
|
|
6190
|
+
}
|
|
6191
|
+
),
|
|
6192
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(VariableComponentPlugin, {}),
|
|
6193
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(VariableToolbarAgentPlugin, {})
|
|
6194
|
+
] }) })
|
|
6195
|
+
}
|
|
6196
|
+
)
|
|
6197
|
+
] });
|
|
6198
|
+
}
|
|
6199
|
+
|
|
6200
|
+
// src/plugins/MatchingQuestionPlugin/MatchingQuestionComponent.tsx
|
|
6201
|
+
var import_LexicalComposerContext25 = require("@lexical/react/LexicalComposerContext");
|
|
6202
|
+
var import_lexical29 = require("lexical");
|
|
6203
|
+
var import_lucide_react8 = require("lucide-react");
|
|
6202
6204
|
var import_react44 = require("react");
|
|
6205
|
+
|
|
6206
|
+
// src/plugins/MatchingQuestionPlugin/QuestionItemComponent.tsx
|
|
6207
|
+
var import_LexicalComposerContext24 = require("@lexical/react/LexicalComposerContext");
|
|
6208
|
+
var import_LexicalErrorBoundary4 = require("@lexical/react/LexicalErrorBoundary");
|
|
6209
|
+
var import_LexicalHistoryPlugin5 = require("@lexical/react/LexicalHistoryPlugin");
|
|
6210
|
+
var import_LexicalNestedComposer4 = require("@lexical/react/LexicalNestedComposer");
|
|
6211
|
+
var import_LexicalRichTextPlugin3 = require("@lexical/react/LexicalRichTextPlugin");
|
|
6212
|
+
var import_lexical28 = require("lexical");
|
|
6213
|
+
var import_lucide_react7 = require("lucide-react");
|
|
6214
|
+
var import_react43 = require("react");
|
|
6203
6215
|
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
6204
6216
|
function QuestionItemComponent(props) {
|
|
6205
6217
|
const {
|
|
6206
6218
|
nodeKey,
|
|
6207
|
-
id,
|
|
6208
6219
|
itemIndex,
|
|
6209
|
-
correct,
|
|
6210
6220
|
itemPremiseContent,
|
|
6211
6221
|
itemOptionContent
|
|
6212
6222
|
} = props;
|
|
6213
6223
|
const { historyState } = useSharedHistoryContext();
|
|
6224
|
+
const [editor] = (0, import_LexicalComposerContext24.useLexicalComposerContext)();
|
|
6225
|
+
const removeItem = (0, import_react43.useCallback)(() => {
|
|
6226
|
+
editor.update(() => {
|
|
6227
|
+
const foundNode = (0, import_lexical28.$getNodeByKey)(nodeKey);
|
|
6228
|
+
if ($isMatchingQuestionNode(foundNode)) {
|
|
6229
|
+
foundNode.removeItem(itemIndex);
|
|
6230
|
+
}
|
|
6231
|
+
});
|
|
6232
|
+
}, [editor, nodeKey, itemIndex]);
|
|
6233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
|
|
6234
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
6235
|
+
"div",
|
|
6236
|
+
{
|
|
6237
|
+
className: "matching-question-prompt-question-item-controls",
|
|
6238
|
+
"data-selectable": "true",
|
|
6239
|
+
children: [
|
|
6240
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { "data-selectable": "true", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
6241
|
+
Button,
|
|
6242
|
+
{
|
|
6243
|
+
StartIcon: import_lucide_react7.Check,
|
|
6244
|
+
size: "small",
|
|
6245
|
+
variant: "text",
|
|
6246
|
+
className: "success"
|
|
6247
|
+
}
|
|
6248
|
+
) }),
|
|
6249
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { "data-selectable": "true", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
6250
|
+
"sl-tooltip",
|
|
6251
|
+
{
|
|
6252
|
+
style: { "--show-delay": "1000" },
|
|
6253
|
+
hoist: true,
|
|
6254
|
+
content: "Remove match",
|
|
6255
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
6256
|
+
Button,
|
|
6257
|
+
{
|
|
6258
|
+
StartIcon: import_lucide_react7.Trash2,
|
|
6259
|
+
size: "small",
|
|
6260
|
+
variant: "text",
|
|
6261
|
+
className: "neutral",
|
|
6262
|
+
onClick: removeItem
|
|
6263
|
+
}
|
|
6264
|
+
)
|
|
6265
|
+
}
|
|
6266
|
+
) })
|
|
6267
|
+
]
|
|
6268
|
+
}
|
|
6269
|
+
),
|
|
6270
|
+
itemPremiseContent ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
6271
|
+
"div",
|
|
6272
|
+
{
|
|
6273
|
+
className: "matching-question-prompt-question-item",
|
|
6274
|
+
"data-selectable": "true",
|
|
6275
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_LexicalNestedComposer4.LexicalNestedComposer, { initialEditor: itemPremiseContent, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(NestedEditor, { nodeKey, children: [
|
|
6276
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(SettingsPanelNestedAgentPlugin, {}),
|
|
6277
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
6278
|
+
import_LexicalRichTextPlugin3.RichTextPlugin,
|
|
6279
|
+
{
|
|
6280
|
+
contentEditable: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(NestedContentEditable, {}),
|
|
6281
|
+
ErrorBoundary: import_LexicalErrorBoundary4.LexicalErrorBoundary,
|
|
6282
|
+
placeholder: null
|
|
6283
|
+
},
|
|
6284
|
+
nodeKey
|
|
6285
|
+
),
|
|
6286
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_LexicalHistoryPlugin5.HistoryPlugin, { externalHistoryState: historyState }),
|
|
6287
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
6288
|
+
TextToolbarAgentPlugin,
|
|
6289
|
+
{
|
|
6290
|
+
decoratorNode: MatchingQuestionNode
|
|
6291
|
+
}
|
|
6292
|
+
),
|
|
6293
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
6294
|
+
TypeaheadVariableAgentPlugin,
|
|
6295
|
+
{
|
|
6296
|
+
decoratorNode: MatchingQuestionNode
|
|
6297
|
+
}
|
|
6298
|
+
),
|
|
6299
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(VariableComponentPlugin, {})
|
|
6300
|
+
] }) })
|
|
6301
|
+
}
|
|
6302
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", {}),
|
|
6303
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
6304
|
+
"div",
|
|
6305
|
+
{
|
|
6306
|
+
className: "matching-question-prompt-question-item",
|
|
6307
|
+
"data-selectable": "true",
|
|
6308
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_LexicalNestedComposer4.LexicalNestedComposer, { initialEditor: itemOptionContent, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(NestedEditor, { nodeKey, children: [
|
|
6309
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(SettingsPanelNestedAgentPlugin, {}),
|
|
6310
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
6311
|
+
import_LexicalRichTextPlugin3.RichTextPlugin,
|
|
6312
|
+
{
|
|
6313
|
+
contentEditable: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(NestedContentEditable, {}),
|
|
6314
|
+
ErrorBoundary: import_LexicalErrorBoundary4.LexicalErrorBoundary,
|
|
6315
|
+
placeholder: null
|
|
6316
|
+
},
|
|
6317
|
+
nodeKey
|
|
6318
|
+
),
|
|
6319
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_LexicalHistoryPlugin5.HistoryPlugin, { externalHistoryState: historyState }),
|
|
6320
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
6321
|
+
TextToolbarAgentPlugin,
|
|
6322
|
+
{
|
|
6323
|
+
decoratorNode: MatchingQuestionNode
|
|
6324
|
+
}
|
|
6325
|
+
),
|
|
6326
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
6327
|
+
TypeaheadVariableAgentPlugin,
|
|
6328
|
+
{
|
|
6329
|
+
decoratorNode: MatchingQuestionNode
|
|
6330
|
+
}
|
|
6331
|
+
),
|
|
6332
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(VariableComponentPlugin, {}),
|
|
6333
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(VariableToolbarAgentPlugin, {})
|
|
6334
|
+
] }) })
|
|
6335
|
+
}
|
|
6336
|
+
)
|
|
6337
|
+
] });
|
|
6338
|
+
}
|
|
6339
|
+
|
|
6340
|
+
// src/plugins/MatchingQuestionPlugin/MatchingQuestionComponent.tsx
|
|
6341
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
6342
|
+
function MatchingQuestionComponent(props) {
|
|
6343
|
+
const { nodeKey, items, id } = props;
|
|
6214
6344
|
const [editor] = (0, import_LexicalComposerContext25.useLexicalComposerContext)();
|
|
6345
|
+
const rootElementRef = (0, import_react44.useRef)(null);
|
|
6346
|
+
(0, import_react44.useEffect)(() => {
|
|
6347
|
+
return editor.registerCommand(
|
|
6348
|
+
import_lexical29.CLICK_COMMAND,
|
|
6349
|
+
(event, _activeEditor) => {
|
|
6350
|
+
if (rootElementRef.current?.contains(event.target) && event.target.hasAttribute(
|
|
6351
|
+
"data-selectable"
|
|
6352
|
+
)) {
|
|
6353
|
+
editor.update(() => {
|
|
6354
|
+
const foundNode = (0, import_lexical29.$getNodeByKey)(nodeKey);
|
|
6355
|
+
if ($isMatchingQuestionNode(foundNode)) {
|
|
6356
|
+
const selection = (0, import_lexical29.$createNodeSelection)();
|
|
6357
|
+
selection.add(nodeKey);
|
|
6358
|
+
(0, import_lexical29.$setSelection)(selection);
|
|
6359
|
+
}
|
|
6360
|
+
});
|
|
6361
|
+
}
|
|
6362
|
+
return false;
|
|
6363
|
+
},
|
|
6364
|
+
import_lexical29.COMMAND_PRIORITY_LOW
|
|
6365
|
+
);
|
|
6366
|
+
}, [editor]);
|
|
6215
6367
|
const addItem = (0, import_react44.useCallback)(() => {
|
|
6368
|
+
const itemIndex = items.length - 1;
|
|
6216
6369
|
editor.update(
|
|
6217
6370
|
() => {
|
|
6218
6371
|
const foundNode = (0, import_lexical29.$getNodeByKey)(nodeKey);
|
|
6219
6372
|
if ($isMatchingQuestionNode(foundNode)) {
|
|
6220
|
-
foundNode.addItem(itemIndex,
|
|
6373
|
+
foundNode.addItem(itemIndex, true);
|
|
6221
6374
|
}
|
|
6222
6375
|
},
|
|
6223
6376
|
{
|
|
@@ -6237,178 +6390,19 @@ function QuestionItemComponent(props) {
|
|
|
6237
6390
|
firstChild.selectStart();
|
|
6238
6391
|
});
|
|
6239
6392
|
}
|
|
6240
|
-
if (newQuestionItem.itemOptionContent) {
|
|
6241
|
-
newQuestionItem.itemOptionContent.update(() => {
|
|
6242
|
-
const root = (0, import_lexical29.$getRoot)();
|
|
6243
|
-
let firstChild = root.getFirstChild();
|
|
6244
|
-
if (!firstChild) {
|
|
6245
|
-
firstChild = (0, import_lexical29.$createParagraphNode)();
|
|
6246
|
-
root.append(firstChild);
|
|
6247
|
-
}
|
|
6248
|
-
if (!newQuestionItem.itemPremiseContent) {
|
|
6249
|
-
firstChild.selectStart();
|
|
6250
|
-
}
|
|
6251
|
-
});
|
|
6252
|
-
}
|
|
6253
6393
|
}
|
|
6254
6394
|
});
|
|
6255
6395
|
}
|
|
6256
6396
|
}
|
|
6257
6397
|
);
|
|
6258
|
-
}, [editor, nodeKey,
|
|
6259
|
-
const removeItem = (0, import_react44.useCallback)(() => {
|
|
6260
|
-
editor.update(() => {
|
|
6261
|
-
const foundNode = (0, import_lexical29.$getNodeByKey)(nodeKey);
|
|
6262
|
-
if ($isMatchingQuestionNode(foundNode)) {
|
|
6263
|
-
foundNode.removeItem(itemIndex);
|
|
6264
|
-
}
|
|
6265
|
-
});
|
|
6266
|
-
}, [editor, nodeKey, itemIndex]);
|
|
6267
|
-
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
6268
|
-
"div",
|
|
6269
|
-
{
|
|
6270
|
-
id,
|
|
6271
|
-
className: "matching-question-prompt-question-item-wrapper",
|
|
6272
|
-
children: [
|
|
6273
|
-
itemPremiseContent ? /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
6274
|
-
"div",
|
|
6275
|
-
{
|
|
6276
|
-
className: "matching-question-prompt-question-item",
|
|
6277
|
-
"data-selectable": "true",
|
|
6278
|
-
children: [
|
|
6279
|
-
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "title", "data-selectable": "true", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { "data-selectable": "true", children: "Item Premise" }) }),
|
|
6280
|
-
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { style: { height: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_LexicalNestedComposer3.LexicalNestedComposer, { initialEditor: itemPremiseContent, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(NestedEditor, { nodeKey, children: [
|
|
6281
|
-
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(SettingsPanelNestedAgentPlugin, {}),
|
|
6282
|
-
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
6283
|
-
import_LexicalRichTextPlugin2.RichTextPlugin,
|
|
6284
|
-
{
|
|
6285
|
-
contentEditable: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(NestedContentEditable, {}),
|
|
6286
|
-
ErrorBoundary: import_LexicalErrorBoundary3.LexicalErrorBoundary,
|
|
6287
|
-
placeholder: null
|
|
6288
|
-
},
|
|
6289
|
-
nodeKey
|
|
6290
|
-
),
|
|
6291
|
-
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_LexicalHistoryPlugin4.HistoryPlugin, { externalHistoryState: historyState }),
|
|
6292
|
-
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
6293
|
-
TextToolbarAgentPlugin,
|
|
6294
|
-
{
|
|
6295
|
-
decoratorNode: MatchingQuestionNode
|
|
6296
|
-
}
|
|
6297
|
-
),
|
|
6298
|
-
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
6299
|
-
TypeaheadVariableAgentPlugin,
|
|
6300
|
-
{
|
|
6301
|
-
decoratorNode: MatchingQuestionNode
|
|
6302
|
-
}
|
|
6303
|
-
),
|
|
6304
|
-
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(VariableComponentPlugin, {})
|
|
6305
|
-
] }) }) })
|
|
6306
|
-
]
|
|
6307
|
-
}
|
|
6308
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", {}),
|
|
6309
|
-
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
6310
|
-
"div",
|
|
6311
|
-
{
|
|
6312
|
-
className: (0, import_clsx2.default)("matching-question-prompt-question-item", {
|
|
6313
|
-
correct,
|
|
6314
|
-
incorrect: !correct
|
|
6315
|
-
}),
|
|
6316
|
-
"data-selectable": "true",
|
|
6317
|
-
children: [
|
|
6318
|
-
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "title", "data-selectable": "true", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { "data-selectable": "true", children: correct ? "Correct Choice" : "Incorrect Choice" }) }),
|
|
6319
|
-
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { style: { height: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_LexicalNestedComposer3.LexicalNestedComposer, { initialEditor: itemOptionContent, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(NestedEditor, { nodeKey, children: [
|
|
6320
|
-
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(SettingsPanelNestedAgentPlugin, {}),
|
|
6321
|
-
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
6322
|
-
import_LexicalRichTextPlugin2.RichTextPlugin,
|
|
6323
|
-
{
|
|
6324
|
-
contentEditable: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(NestedContentEditable, {}),
|
|
6325
|
-
ErrorBoundary: import_LexicalErrorBoundary3.LexicalErrorBoundary,
|
|
6326
|
-
placeholder: null
|
|
6327
|
-
},
|
|
6328
|
-
nodeKey
|
|
6329
|
-
),
|
|
6330
|
-
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_LexicalHistoryPlugin4.HistoryPlugin, { externalHistoryState: historyState }),
|
|
6331
|
-
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
6332
|
-
TextToolbarAgentPlugin,
|
|
6333
|
-
{
|
|
6334
|
-
decoratorNode: MatchingQuestionNode
|
|
6335
|
-
}
|
|
6336
|
-
),
|
|
6337
|
-
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
6338
|
-
TypeaheadVariableAgentPlugin,
|
|
6339
|
-
{
|
|
6340
|
-
decoratorNode: MatchingQuestionNode
|
|
6341
|
-
}
|
|
6342
|
-
),
|
|
6343
|
-
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(VariableComponentPlugin, {}),
|
|
6344
|
-
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(VariableToolbarAgentPlugin, {})
|
|
6345
|
-
] }) }) }),
|
|
6346
|
-
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "controls", children: [
|
|
6347
|
-
itemIndex > 0 ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
6348
|
-
Button,
|
|
6349
|
-
{
|
|
6350
|
-
StartIcon: import_lucide_react6.CircleMinus,
|
|
6351
|
-
size: "medium",
|
|
6352
|
-
variant: "text",
|
|
6353
|
-
className: "cancel",
|
|
6354
|
-
onClick: removeItem
|
|
6355
|
-
}
|
|
6356
|
-
) }) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", {}),
|
|
6357
|
-
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
6358
|
-
Button,
|
|
6359
|
-
{
|
|
6360
|
-
StartIcon: import_lucide_react6.CirclePlus,
|
|
6361
|
-
size: "medium",
|
|
6362
|
-
variant: "text",
|
|
6363
|
-
className: "cancel",
|
|
6364
|
-
onClick: addItem
|
|
6365
|
-
}
|
|
6366
|
-
) })
|
|
6367
|
-
] })
|
|
6368
|
-
]
|
|
6369
|
-
}
|
|
6370
|
-
)
|
|
6371
|
-
]
|
|
6372
|
-
}
|
|
6373
|
-
);
|
|
6374
|
-
}
|
|
6375
|
-
|
|
6376
|
-
// src/plugins/MatchingQuestionPlugin/MatchingQuestionComponent.tsx
|
|
6377
|
-
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
6378
|
-
function MatchingQuestionComponent(props) {
|
|
6379
|
-
const { nodeKey, items, id } = props;
|
|
6380
|
-
const [editor] = (0, import_LexicalComposerContext26.useLexicalComposerContext)();
|
|
6381
|
-
const rootElementRef = (0, import_react45.useRef)(null);
|
|
6382
|
-
(0, import_react45.useEffect)(() => {
|
|
6383
|
-
return editor.registerCommand(
|
|
6384
|
-
import_lexical30.CLICK_COMMAND,
|
|
6385
|
-
(event, _activeEditor) => {
|
|
6386
|
-
if (rootElementRef.current?.contains(event.target) && event.target.hasAttribute(
|
|
6387
|
-
"data-selectable"
|
|
6388
|
-
)) {
|
|
6389
|
-
editor.update(() => {
|
|
6390
|
-
const foundNode = (0, import_lexical30.$getNodeByKey)(nodeKey);
|
|
6391
|
-
if ($isMatchingQuestionNode(foundNode)) {
|
|
6392
|
-
const selection = (0, import_lexical30.$createNodeSelection)();
|
|
6393
|
-
selection.add(nodeKey);
|
|
6394
|
-
(0, import_lexical30.$setSelection)(selection);
|
|
6395
|
-
}
|
|
6396
|
-
});
|
|
6397
|
-
}
|
|
6398
|
-
return false;
|
|
6399
|
-
},
|
|
6400
|
-
import_lexical30.COMMAND_PRIORITY_LOW
|
|
6401
|
-
);
|
|
6402
|
-
}, [editor]);
|
|
6403
|
-
const doNeedDistractor = items.reduce((a, i) => {
|
|
6404
|
-
return i.correct ? a : ++a;
|
|
6405
|
-
}, 0) <= 0;
|
|
6398
|
+
}, [editor, nodeKey, items]);
|
|
6406
6399
|
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
6407
6400
|
"div",
|
|
6408
6401
|
{
|
|
6409
6402
|
ref: rootElementRef,
|
|
6410
6403
|
id,
|
|
6411
6404
|
className: "matching-question-prompt",
|
|
6405
|
+
"data-selectable": "true",
|
|
6412
6406
|
children: [
|
|
6413
6407
|
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
6414
6408
|
"div",
|
|
@@ -6424,27 +6418,76 @@ function MatchingQuestionComponent(props) {
|
|
|
6424
6418
|
className: "matching-question-prompt-items",
|
|
6425
6419
|
"data-selectable": "true",
|
|
6426
6420
|
children: [
|
|
6427
|
-
|
|
6421
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", {}),
|
|
6422
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
6423
|
+
"div",
|
|
6424
|
+
{
|
|
6425
|
+
className: "matching-question-prompt-title",
|
|
6426
|
+
"data-selectable": "true",
|
|
6427
|
+
style: { textAlign: "center" },
|
|
6428
|
+
children: "Item Premise"
|
|
6429
|
+
}
|
|
6430
|
+
),
|
|
6431
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
6432
|
+
"div",
|
|
6433
|
+
{
|
|
6434
|
+
className: "matching-question-prompt-title",
|
|
6435
|
+
"data-selectable": "true",
|
|
6436
|
+
style: { textAlign: "center" },
|
|
6437
|
+
children: "Correct Match"
|
|
6438
|
+
}
|
|
6439
|
+
),
|
|
6440
|
+
items.filter((i) => !!i.correct).map((questionItem, itemIndex) => {
|
|
6428
6441
|
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
6429
6442
|
QuestionItemComponent,
|
|
6430
6443
|
{
|
|
6431
6444
|
nodeKey,
|
|
6432
|
-
id: questionItem.id,
|
|
6433
6445
|
itemIndex,
|
|
6434
|
-
correct: questionItem.correct,
|
|
6435
6446
|
itemOptionContent: questionItem.itemOptionContent,
|
|
6436
6447
|
itemPremiseContent: questionItem.itemPremiseContent
|
|
6437
6448
|
},
|
|
6438
6449
|
questionItem.id
|
|
6439
6450
|
);
|
|
6440
6451
|
}),
|
|
6441
|
-
|
|
6442
|
-
|
|
6452
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
6453
|
+
"div",
|
|
6443
6454
|
{
|
|
6444
|
-
|
|
6445
|
-
|
|
6455
|
+
className: "matching-question-prompt-footer",
|
|
6456
|
+
style: { gridColumn: "span 3", justifyContent: "end" },
|
|
6457
|
+
"data-selectable": "true",
|
|
6458
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
6459
|
+
Button,
|
|
6460
|
+
{
|
|
6461
|
+
size: "medium",
|
|
6462
|
+
variant: "text",
|
|
6463
|
+
StartIcon: import_lucide_react8.Plus,
|
|
6464
|
+
label: "ADD MATCH",
|
|
6465
|
+
onClick: addItem
|
|
6466
|
+
}
|
|
6467
|
+
)
|
|
6446
6468
|
}
|
|
6447
|
-
)
|
|
6469
|
+
),
|
|
6470
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { "data-selectable": "true" }),
|
|
6471
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { "data-selectable": "true" }),
|
|
6472
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
6473
|
+
"div",
|
|
6474
|
+
{
|
|
6475
|
+
className: "matching-question-prompt-title",
|
|
6476
|
+
"data-selectable": "true",
|
|
6477
|
+
style: { textAlign: "center" },
|
|
6478
|
+
children: "Incorrect Match (one per line)"
|
|
6479
|
+
}
|
|
6480
|
+
),
|
|
6481
|
+
items.filter((i) => !i.correct).map((questionItem) => {
|
|
6482
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
6483
|
+
QuestionDistractorItemComponent,
|
|
6484
|
+
{
|
|
6485
|
+
nodeKey,
|
|
6486
|
+
itemOptionContent: questionItem.itemOptionContent
|
|
6487
|
+
},
|
|
6488
|
+
questionItem.id
|
|
6489
|
+
);
|
|
6490
|
+
})
|
|
6448
6491
|
]
|
|
6449
6492
|
}
|
|
6450
6493
|
)
|
|
@@ -6457,9 +6500,9 @@ function MatchingQuestionComponent(props) {
|
|
|
6457
6500
|
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
6458
6501
|
var TYPE_NAME5 = "matching-question";
|
|
6459
6502
|
function initNewContentEditor() {
|
|
6460
|
-
return (0,
|
|
6503
|
+
return (0, import_lexical30.createEditor)();
|
|
6461
6504
|
}
|
|
6462
|
-
var MatchingQuestionNode = class _MatchingQuestionNode extends
|
|
6505
|
+
var MatchingQuestionNode = class _MatchingQuestionNode extends import_lexical30.DecoratorNode {
|
|
6463
6506
|
constructor(pointsPerMatch, items, id, key) {
|
|
6464
6507
|
super(key);
|
|
6465
6508
|
this.__id = id || (0, import_nanoid3.nanoid)();
|
|
@@ -6483,6 +6526,11 @@ var MatchingQuestionNode = class _MatchingQuestionNode extends import_lexical31.
|
|
|
6483
6526
|
itemOptionContent: initNewContentEditor()
|
|
6484
6527
|
});
|
|
6485
6528
|
}
|
|
6529
|
+
this.__items.push({
|
|
6530
|
+
id: (0, import_nanoid3.nanoid)(),
|
|
6531
|
+
correct: false,
|
|
6532
|
+
itemOptionContent: initNewContentEditor()
|
|
6533
|
+
});
|
|
6486
6534
|
}
|
|
6487
6535
|
}
|
|
6488
6536
|
static getType() {
|
|
@@ -6517,7 +6565,7 @@ var MatchingQuestionNode = class _MatchingQuestionNode extends import_lexical31.
|
|
|
6517
6565
|
static importJSON(serializedNode) {
|
|
6518
6566
|
const restoredItems = [];
|
|
6519
6567
|
for (const item of serializedNode.items) {
|
|
6520
|
-
const optionNestedEditor = (0,
|
|
6568
|
+
const optionNestedEditor = (0, import_lexical30.createEditor)();
|
|
6521
6569
|
const editorState = optionNestedEditor.parseEditorState(
|
|
6522
6570
|
item.itemOptionContent.editorState
|
|
6523
6571
|
);
|
|
@@ -6525,7 +6573,7 @@ var MatchingQuestionNode = class _MatchingQuestionNode extends import_lexical31.
|
|
|
6525
6573
|
optionNestedEditor.setEditorState(editorState);
|
|
6526
6574
|
}
|
|
6527
6575
|
if (item.correct && item.itemPremiseContent) {
|
|
6528
|
-
const premiseNestedEditor = (0,
|
|
6576
|
+
const premiseNestedEditor = (0, import_lexical30.createEditor)();
|
|
6529
6577
|
const editorState2 = premiseNestedEditor.parseEditorState(
|
|
6530
6578
|
item.itemPremiseContent.editorState
|
|
6531
6579
|
);
|
|
@@ -6599,7 +6647,7 @@ var MatchingQuestionNode = class _MatchingQuestionNode extends import_lexical31.
|
|
|
6599
6647
|
writable.__items = newItems;
|
|
6600
6648
|
}
|
|
6601
6649
|
removeItem(optionItemIndex) {
|
|
6602
|
-
if (this.__items.length >
|
|
6650
|
+
if (this.__items.length > 2 && this.__items.length > optionItemIndex) {
|
|
6603
6651
|
const writable = this.getWritable();
|
|
6604
6652
|
const newItems = [...writable.__items];
|
|
6605
6653
|
newItems.splice(optionItemIndex, 1);
|
|
@@ -6618,7 +6666,7 @@ var MatchingQuestionNode = class _MatchingQuestionNode extends import_lexical31.
|
|
|
6618
6666
|
}
|
|
6619
6667
|
};
|
|
6620
6668
|
function $createMatchingQuestionNode(pointsPerMatch, items, id) {
|
|
6621
|
-
return (0,
|
|
6669
|
+
return (0, import_lexical30.$applyNodeReplacement)(
|
|
6622
6670
|
new MatchingQuestionNode(pointsPerMatch, items, id)
|
|
6623
6671
|
);
|
|
6624
6672
|
}
|
|
@@ -6627,41 +6675,41 @@ function $isMatchingQuestionNode(node) {
|
|
|
6627
6675
|
}
|
|
6628
6676
|
|
|
6629
6677
|
// src/plugins/MultipleOptionQuestionPlugin/MultipleOptionQuestionNode.tsx
|
|
6630
|
-
var
|
|
6678
|
+
var import_lexical34 = require("lexical");
|
|
6631
6679
|
var import_nanoid4 = require("nanoid");
|
|
6632
6680
|
|
|
6633
6681
|
// src/plugins/MultipleOptionQuestionPlugin/MultipleOptionQuestionComponent.tsx
|
|
6634
|
-
var
|
|
6635
|
-
var
|
|
6636
|
-
var
|
|
6637
|
-
var
|
|
6682
|
+
var import_LexicalComposerContext28 = require("@lexical/react/LexicalComposerContext");
|
|
6683
|
+
var import_lexical33 = require("lexical");
|
|
6684
|
+
var import_lucide_react11 = require("lucide-react");
|
|
6685
|
+
var import_react47 = require("react");
|
|
6638
6686
|
|
|
6639
6687
|
// src/plugins/MultipleOptionQuestionPlugin/MultipleOptionQuestionItemComponent.tsx
|
|
6640
|
-
var
|
|
6641
|
-
var
|
|
6642
|
-
var
|
|
6643
|
-
var
|
|
6644
|
-
var
|
|
6645
|
-
var
|
|
6646
|
-
var
|
|
6647
|
-
var
|
|
6648
|
-
var
|
|
6688
|
+
var import_LexicalComposerContext26 = require("@lexical/react/LexicalComposerContext");
|
|
6689
|
+
var import_LexicalErrorBoundary5 = require("@lexical/react/LexicalErrorBoundary");
|
|
6690
|
+
var import_LexicalHistoryPlugin6 = require("@lexical/react/LexicalHistoryPlugin");
|
|
6691
|
+
var import_LexicalNestedComposer5 = require("@lexical/react/LexicalNestedComposer");
|
|
6692
|
+
var import_LexicalRichTextPlugin4 = require("@lexical/react/LexicalRichTextPlugin");
|
|
6693
|
+
var import_clsx2 = __toESM(require("clsx"));
|
|
6694
|
+
var import_lexical31 = require("lexical");
|
|
6695
|
+
var import_lucide_react9 = require("lucide-react");
|
|
6696
|
+
var import_react45 = require("react");
|
|
6649
6697
|
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
6650
6698
|
function MultipleOptionQuestionItemComponent(props) {
|
|
6651
6699
|
const { nodeKey, id, optionIndex, correct, content } = props;
|
|
6652
6700
|
const { historyState } = useSharedHistoryContext();
|
|
6653
|
-
const [editor] = (0,
|
|
6654
|
-
const toggleChoice = (0,
|
|
6701
|
+
const [editor] = (0, import_LexicalComposerContext26.useLexicalComposerContext)();
|
|
6702
|
+
const toggleChoice = (0, import_react45.useCallback)(() => {
|
|
6655
6703
|
editor.update(() => {
|
|
6656
|
-
const foundNode = (0,
|
|
6704
|
+
const foundNode = (0, import_lexical31.$getNodeByKey)(nodeKey);
|
|
6657
6705
|
if ($isMultipleOptionQuestionNode(foundNode)) {
|
|
6658
6706
|
foundNode.setCorrectChoice(optionIndex, !correct);
|
|
6659
6707
|
}
|
|
6660
6708
|
});
|
|
6661
6709
|
}, [editor, nodeKey, optionIndex, correct]);
|
|
6662
|
-
const removeOptionItem = (0,
|
|
6710
|
+
const removeOptionItem = (0, import_react45.useCallback)(() => {
|
|
6663
6711
|
editor.update(() => {
|
|
6664
|
-
const foundNode = (0,
|
|
6712
|
+
const foundNode = (0, import_lexical31.$getNodeByKey)(nodeKey);
|
|
6665
6713
|
if ($isMultipleOptionQuestionNode(foundNode)) {
|
|
6666
6714
|
foundNode.removeOptionItem(optionIndex);
|
|
6667
6715
|
}
|
|
@@ -6671,7 +6719,7 @@ function MultipleOptionQuestionItemComponent(props) {
|
|
|
6671
6719
|
"div",
|
|
6672
6720
|
{
|
|
6673
6721
|
id,
|
|
6674
|
-
className: (0,
|
|
6722
|
+
className: (0, import_clsx2.default)("multiple-option-question-prompt-option-item", {
|
|
6675
6723
|
correct: !!correct,
|
|
6676
6724
|
incorrect: !correct
|
|
6677
6725
|
}),
|
|
@@ -6691,10 +6739,10 @@ function MultipleOptionQuestionItemComponent(props) {
|
|
|
6691
6739
|
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
6692
6740
|
Button,
|
|
6693
6741
|
{
|
|
6694
|
-
StartIcon: correct ?
|
|
6742
|
+
StartIcon: correct ? import_lucide_react9.Check : import_lucide_react9.XIcon,
|
|
6695
6743
|
size: "small",
|
|
6696
6744
|
variant: "text",
|
|
6697
|
-
className: (0,
|
|
6745
|
+
className: (0, import_clsx2.default)({
|
|
6698
6746
|
success: !!correct,
|
|
6699
6747
|
danger: !correct
|
|
6700
6748
|
}),
|
|
@@ -6711,7 +6759,7 @@ function MultipleOptionQuestionItemComponent(props) {
|
|
|
6711
6759
|
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
6712
6760
|
Button,
|
|
6713
6761
|
{
|
|
6714
|
-
StartIcon:
|
|
6762
|
+
StartIcon: import_lucide_react9.Trash2,
|
|
6715
6763
|
size: "small",
|
|
6716
6764
|
variant: "text",
|
|
6717
6765
|
className: "neutral",
|
|
@@ -6721,18 +6769,18 @@ function MultipleOptionQuestionItemComponent(props) {
|
|
|
6721
6769
|
}
|
|
6722
6770
|
) })
|
|
6723
6771
|
] }),
|
|
6724
|
-
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { style: { width: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
6772
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { style: { width: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_LexicalNestedComposer5.LexicalNestedComposer, { initialEditor: content, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(NestedEditor, { nodeKey, children: [
|
|
6725
6773
|
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(SettingsPanelNestedAgentPlugin, {}),
|
|
6726
6774
|
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
6727
|
-
|
|
6775
|
+
import_LexicalRichTextPlugin4.RichTextPlugin,
|
|
6728
6776
|
{
|
|
6729
6777
|
contentEditable: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(NestedContentEditable, {}),
|
|
6730
|
-
ErrorBoundary:
|
|
6778
|
+
ErrorBoundary: import_LexicalErrorBoundary5.LexicalErrorBoundary,
|
|
6731
6779
|
placeholder: null
|
|
6732
6780
|
},
|
|
6733
6781
|
nodeKey
|
|
6734
6782
|
),
|
|
6735
|
-
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
6783
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_LexicalHistoryPlugin6.HistoryPlugin, { externalHistoryState: historyState }),
|
|
6736
6784
|
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
6737
6785
|
TextToolbarAgentPlugin,
|
|
6738
6786
|
{
|
|
@@ -6754,17 +6802,17 @@ function MultipleOptionQuestionItemComponent(props) {
|
|
|
6754
6802
|
}
|
|
6755
6803
|
|
|
6756
6804
|
// src/plugins/MultipleOptionQuestionPlugin/MultipleOptionQuestionNoneOfTheAboveItem.tsx
|
|
6757
|
-
var
|
|
6758
|
-
var
|
|
6759
|
-
var
|
|
6760
|
-
var
|
|
6805
|
+
var import_LexicalComposerContext27 = require("@lexical/react/LexicalComposerContext");
|
|
6806
|
+
var import_lexical32 = require("lexical");
|
|
6807
|
+
var import_lucide_react10 = require("lucide-react");
|
|
6808
|
+
var import_react46 = require("react");
|
|
6761
6809
|
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
6762
6810
|
function MultipleOptionQuestionNoneOfTheAboveItem(props) {
|
|
6763
6811
|
const { nodeKey } = props;
|
|
6764
|
-
const [editor] = (0,
|
|
6765
|
-
const removeOptionItem = (0,
|
|
6812
|
+
const [editor] = (0, import_LexicalComposerContext27.useLexicalComposerContext)();
|
|
6813
|
+
const removeOptionItem = (0, import_react46.useCallback)(() => {
|
|
6766
6814
|
editor.update(() => {
|
|
6767
|
-
const foundNode = (0,
|
|
6815
|
+
const foundNode = (0, import_lexical32.$getNodeByKey)(nodeKey);
|
|
6768
6816
|
if ($isMultipleOptionQuestionNode(foundNode)) {
|
|
6769
6817
|
foundNode.setNoneOfTheAbove(false);
|
|
6770
6818
|
}
|
|
@@ -6780,7 +6828,7 @@ function MultipleOptionQuestionNoneOfTheAboveItem(props) {
|
|
|
6780
6828
|
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
6781
6829
|
Button,
|
|
6782
6830
|
{
|
|
6783
|
-
StartIcon:
|
|
6831
|
+
StartIcon: import_lucide_react10.Check,
|
|
6784
6832
|
size: "small",
|
|
6785
6833
|
variant: "text",
|
|
6786
6834
|
className: "success"
|
|
@@ -6795,7 +6843,7 @@ function MultipleOptionQuestionNoneOfTheAboveItem(props) {
|
|
|
6795
6843
|
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
6796
6844
|
Button,
|
|
6797
6845
|
{
|
|
6798
|
-
StartIcon:
|
|
6846
|
+
StartIcon: import_lucide_react10.Trash2,
|
|
6799
6847
|
size: "small",
|
|
6800
6848
|
variant: "text",
|
|
6801
6849
|
className: "neutral",
|
|
@@ -6815,13 +6863,13 @@ function MultipleOptionQuestionNoneOfTheAboveItem(props) {
|
|
|
6815
6863
|
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
6816
6864
|
function MultipleOptionQuestionComponent(props) {
|
|
6817
6865
|
const { nodeKey, options, questionType, noneOfTheAbove } = props;
|
|
6818
|
-
const [editor] = (0,
|
|
6819
|
-
const rootElementRef = (0,
|
|
6820
|
-
const addOptionItem = (0,
|
|
6866
|
+
const [editor] = (0, import_LexicalComposerContext28.useLexicalComposerContext)();
|
|
6867
|
+
const rootElementRef = (0, import_react47.useRef)(null);
|
|
6868
|
+
const addOptionItem = (0, import_react47.useCallback)(() => {
|
|
6821
6869
|
let newContent = void 0;
|
|
6822
6870
|
editor.update(
|
|
6823
6871
|
() => {
|
|
6824
|
-
const foundNode = (0,
|
|
6872
|
+
const foundNode = (0, import_lexical33.$getNodeByKey)(nodeKey);
|
|
6825
6873
|
if ($isMultipleOptionQuestionNode(foundNode)) {
|
|
6826
6874
|
newContent = foundNode.addOptionItem(options.length, false);
|
|
6827
6875
|
}
|
|
@@ -6829,31 +6877,31 @@ function MultipleOptionQuestionComponent(props) {
|
|
|
6829
6877
|
{
|
|
6830
6878
|
onUpdate: () => {
|
|
6831
6879
|
newContent?.update(() => {
|
|
6832
|
-
(0,
|
|
6880
|
+
(0, import_lexical33.$getRoot)().selectStart();
|
|
6833
6881
|
});
|
|
6834
6882
|
}
|
|
6835
6883
|
}
|
|
6836
6884
|
);
|
|
6837
6885
|
}, [editor, options, nodeKey]);
|
|
6838
|
-
(0,
|
|
6886
|
+
(0, import_react47.useEffect)(() => {
|
|
6839
6887
|
return editor.registerCommand(
|
|
6840
|
-
|
|
6888
|
+
import_lexical33.CLICK_COMMAND,
|
|
6841
6889
|
(event, _activeEditor) => {
|
|
6842
6890
|
if (rootElementRef.current?.contains(event.target) && event.target.hasAttribute(
|
|
6843
6891
|
"data-selectable"
|
|
6844
6892
|
)) {
|
|
6845
6893
|
editor.update(() => {
|
|
6846
|
-
const foundNode = (0,
|
|
6894
|
+
const foundNode = (0, import_lexical33.$getNodeByKey)(nodeKey);
|
|
6847
6895
|
if ($isMultipleOptionQuestionNode(foundNode)) {
|
|
6848
|
-
const selection = (0,
|
|
6896
|
+
const selection = (0, import_lexical33.$createNodeSelection)();
|
|
6849
6897
|
selection.add(nodeKey);
|
|
6850
|
-
(0,
|
|
6898
|
+
(0, import_lexical33.$setSelection)(selection);
|
|
6851
6899
|
}
|
|
6852
6900
|
});
|
|
6853
6901
|
}
|
|
6854
6902
|
return false;
|
|
6855
6903
|
},
|
|
6856
|
-
|
|
6904
|
+
import_lexical33.COMMAND_PRIORITY_LOW
|
|
6857
6905
|
);
|
|
6858
6906
|
}, [editor]);
|
|
6859
6907
|
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
@@ -6904,7 +6952,7 @@ function MultipleOptionQuestionComponent(props) {
|
|
|
6904
6952
|
{
|
|
6905
6953
|
size: "medium",
|
|
6906
6954
|
variant: "text",
|
|
6907
|
-
StartIcon:
|
|
6955
|
+
StartIcon: import_lucide_react11.Plus,
|
|
6908
6956
|
label: "ADD LINE",
|
|
6909
6957
|
onClick: addOptionItem
|
|
6910
6958
|
}
|
|
@@ -6918,9 +6966,9 @@ function MultipleOptionQuestionComponent(props) {
|
|
|
6918
6966
|
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
6919
6967
|
var TYPE_NAME6 = "multiple-option-question";
|
|
6920
6968
|
function initNewContentEditor2() {
|
|
6921
|
-
return (0,
|
|
6969
|
+
return (0, import_lexical34.createEditor)();
|
|
6922
6970
|
}
|
|
6923
|
-
var MultipleOptionQuestionNode = class _MultipleOptionQuestionNode extends
|
|
6971
|
+
var MultipleOptionQuestionNode = class _MultipleOptionQuestionNode extends import_lexical34.DecoratorNode {
|
|
6924
6972
|
constructor(questionType, points, choices, correctChoices, incorrectChoices, grading, noneOfTheAbove, options, id, key) {
|
|
6925
6973
|
super(key);
|
|
6926
6974
|
this.__id = id || (0, import_nanoid4.nanoid)();
|
|
@@ -6937,7 +6985,7 @@ var MultipleOptionQuestionNode = class _MultipleOptionQuestionNode extends impor
|
|
|
6937
6985
|
this.__options.push({
|
|
6938
6986
|
id: optionItem.id,
|
|
6939
6987
|
correct: optionItem.correct,
|
|
6940
|
-
content: optionItem.content || (0,
|
|
6988
|
+
content: optionItem.content || (0, import_lexical34.createEditor)()
|
|
6941
6989
|
});
|
|
6942
6990
|
}
|
|
6943
6991
|
} else {
|
|
@@ -7000,7 +7048,7 @@ var MultipleOptionQuestionNode = class _MultipleOptionQuestionNode extends impor
|
|
|
7000
7048
|
static importJSON(serializedNode) {
|
|
7001
7049
|
const restoredOptions = [];
|
|
7002
7050
|
for (const optionItem of serializedNode.options) {
|
|
7003
|
-
const nestedEditor = (0,
|
|
7051
|
+
const nestedEditor = (0, import_lexical34.createEditor)();
|
|
7004
7052
|
const editorState = nestedEditor.parseEditorState(
|
|
7005
7053
|
optionItem.content.editorState
|
|
7006
7054
|
);
|
|
@@ -7128,9 +7176,9 @@ var MultipleOptionQuestionNode = class _MultipleOptionQuestionNode extends impor
|
|
|
7128
7176
|
const newOptions = [...writable.__options];
|
|
7129
7177
|
const content = initNewContentEditor2();
|
|
7130
7178
|
content.update(() => {
|
|
7131
|
-
const root = (0,
|
|
7132
|
-
const firstChild = (0,
|
|
7133
|
-
firstChild.append((0,
|
|
7179
|
+
const root = (0, import_lexical34.$getRoot)();
|
|
7180
|
+
const firstChild = (0, import_lexical34.$createParagraphNode)();
|
|
7181
|
+
firstChild.append((0, import_lexical34.$createTextNode)(initialOptionText));
|
|
7134
7182
|
root.append(firstChild);
|
|
7135
7183
|
});
|
|
7136
7184
|
newOptions.push({
|
|
@@ -7154,7 +7202,7 @@ var MultipleOptionQuestionNode = class _MultipleOptionQuestionNode extends impor
|
|
|
7154
7202
|
}
|
|
7155
7203
|
};
|
|
7156
7204
|
function $createMultipleOptionQuestionNode(questionType, points, choices, correctChoices, incorrectChoices, grading, noneOfTheAbove, options, id) {
|
|
7157
|
-
return (0,
|
|
7205
|
+
return (0, import_lexical34.$applyNodeReplacement)(
|
|
7158
7206
|
new MultipleOptionQuestionNode(
|
|
7159
7207
|
questionType,
|
|
7160
7208
|
points,
|
|
@@ -7169,7 +7217,7 @@ function $createMultipleOptionQuestionNode(questionType, points, choices, correc
|
|
|
7169
7217
|
);
|
|
7170
7218
|
}
|
|
7171
7219
|
function $createEmptyMultipleOptionQuestionNode(questionType, points) {
|
|
7172
|
-
return (0,
|
|
7220
|
+
return (0, import_lexical34.$applyNodeReplacement)(
|
|
7173
7221
|
new MultipleOptionQuestionNode(
|
|
7174
7222
|
questionType,
|
|
7175
7223
|
points,
|
|
@@ -7191,12 +7239,67 @@ function $isMultipleOptionQuestionNode(node) {
|
|
|
7191
7239
|
var import_lexical38 = require("lexical");
|
|
7192
7240
|
var import_nanoid5 = require("nanoid");
|
|
7193
7241
|
|
|
7242
|
+
// src/plugins/EditorPlaceholderPlugin/EditorPlaceholderPlugin.tsx
|
|
7243
|
+
var import_LexicalComposerContext29 = require("@lexical/react/LexicalComposerContext");
|
|
7244
|
+
var import_lexical35 = require("lexical");
|
|
7245
|
+
var import_react48 = require("react");
|
|
7246
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
7247
|
+
var attrName = "data-editor-placeholder";
|
|
7248
|
+
var attrText = "Write your answer here";
|
|
7249
|
+
function EditorPlaceholderPlugin() {
|
|
7250
|
+
const [editor] = (0, import_LexicalComposerContext29.useLexicalComposerContext)();
|
|
7251
|
+
(0, import_react48.useEffect)(() => {
|
|
7252
|
+
editor.getEditorState().read(() => {
|
|
7253
|
+
const root = (0, import_lexical35.$getRoot)();
|
|
7254
|
+
const isEmpty = root.getTextContent().trim().length === 0;
|
|
7255
|
+
if (isEmpty) {
|
|
7256
|
+
const rooKeys = root.getChildrenKeys();
|
|
7257
|
+
if (rooKeys && rooKeys.length > 0) {
|
|
7258
|
+
const element = editor.getElementByKey(rooKeys[0]);
|
|
7259
|
+
if (element) {
|
|
7260
|
+
element.setAttribute(attrName, attrText);
|
|
7261
|
+
}
|
|
7262
|
+
}
|
|
7263
|
+
}
|
|
7264
|
+
});
|
|
7265
|
+
return editor.registerUpdateListener(
|
|
7266
|
+
({ editorState, dirtyElements, dirtyLeaves, tags }) => {
|
|
7267
|
+
if (dirtyElements.size === 0 && dirtyLeaves.size === 0 || tags.has("history-merge")) {
|
|
7268
|
+
return;
|
|
7269
|
+
}
|
|
7270
|
+
editorState.read(() => {
|
|
7271
|
+
const root = (0, import_lexical35.$getRoot)();
|
|
7272
|
+
const isEmpty = root.getTextContent().trim().length === 0;
|
|
7273
|
+
if (isEmpty) {
|
|
7274
|
+
const rooKeys = root.getChildrenKeys();
|
|
7275
|
+
if (rooKeys && rooKeys.length > 0) {
|
|
7276
|
+
const element = editor.getElementByKey(rooKeys[0]);
|
|
7277
|
+
if (element && !element.hasAttribute(attrName)) {
|
|
7278
|
+
element.setAttribute(attrName, attrText);
|
|
7279
|
+
}
|
|
7280
|
+
}
|
|
7281
|
+
} else {
|
|
7282
|
+
const rooKeys = root.getChildrenKeys();
|
|
7283
|
+
if (rooKeys && rooKeys.length > 0) {
|
|
7284
|
+
const element = editor.getElementByKey(rooKeys[0]);
|
|
7285
|
+
if (element && element.hasAttribute(attrName)) {
|
|
7286
|
+
element.removeAttribute(attrName);
|
|
7287
|
+
}
|
|
7288
|
+
}
|
|
7289
|
+
}
|
|
7290
|
+
});
|
|
7291
|
+
}
|
|
7292
|
+
);
|
|
7293
|
+
}, [editor]);
|
|
7294
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_jsx_runtime63.Fragment, {});
|
|
7295
|
+
}
|
|
7296
|
+
|
|
7194
7297
|
// src/plugins/WordsCounterPlugin/WordsCounterPlugin.tsx
|
|
7195
7298
|
var import_LexicalComposerContext30 = require("@lexical/react/LexicalComposerContext");
|
|
7196
7299
|
var import_lexical36 = require("lexical");
|
|
7197
7300
|
var import_debounce3 = __toESM(require("lodash-es/debounce"));
|
|
7198
7301
|
var import_react49 = require("react");
|
|
7199
|
-
var
|
|
7302
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
7200
7303
|
function countWords(text) {
|
|
7201
7304
|
if (text && text.trim().length > 0) {
|
|
7202
7305
|
const words = text.split(" ").filter((word) => word && word.trim().length > 0);
|
|
@@ -7225,18 +7328,18 @@ function WordsCounterPlugin(props) {
|
|
|
7225
7328
|
}
|
|
7226
7329
|
);
|
|
7227
7330
|
}, [editor]);
|
|
7228
|
-
return /* @__PURE__ */ (0,
|
|
7331
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_jsx_runtime64.Fragment, {});
|
|
7229
7332
|
}
|
|
7230
7333
|
|
|
7231
7334
|
// src/plugins/ShortAnswerQuestionPlugin/ShortAnswerQuestionComponent.tsx
|
|
7232
7335
|
var import_LexicalComposerContext31 = require("@lexical/react/LexicalComposerContext");
|
|
7233
|
-
var
|
|
7234
|
-
var
|
|
7235
|
-
var
|
|
7236
|
-
var
|
|
7336
|
+
var import_LexicalErrorBoundary6 = require("@lexical/react/LexicalErrorBoundary");
|
|
7337
|
+
var import_LexicalHistoryPlugin7 = require("@lexical/react/LexicalHistoryPlugin");
|
|
7338
|
+
var import_LexicalNestedComposer6 = require("@lexical/react/LexicalNestedComposer");
|
|
7339
|
+
var import_LexicalRichTextPlugin5 = require("@lexical/react/LexicalRichTextPlugin");
|
|
7237
7340
|
var import_lexical37 = require("lexical");
|
|
7238
7341
|
var import_react50 = require("react");
|
|
7239
|
-
var
|
|
7342
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
7240
7343
|
function getFooterText(wordsCount) {
|
|
7241
7344
|
return `${wordsCount} / 100 words`;
|
|
7242
7345
|
}
|
|
@@ -7267,14 +7370,14 @@ function ShortAnswerQuestionComponent(props) {
|
|
|
7267
7370
|
import_lexical37.COMMAND_PRIORITY_LOW
|
|
7268
7371
|
);
|
|
7269
7372
|
}, [editor]);
|
|
7270
|
-
return /* @__PURE__ */ (0,
|
|
7373
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
7271
7374
|
"div",
|
|
7272
7375
|
{
|
|
7273
7376
|
ref: rootElementRef,
|
|
7274
7377
|
id,
|
|
7275
7378
|
className: "short-answer-question-prompt",
|
|
7276
7379
|
children: [
|
|
7277
|
-
/* @__PURE__ */ (0,
|
|
7380
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
7278
7381
|
"div",
|
|
7279
7382
|
{
|
|
7280
7383
|
className: "short-answer-question-prompt-title",
|
|
@@ -7282,38 +7385,38 @@ function ShortAnswerQuestionComponent(props) {
|
|
|
7282
7385
|
children: "Short Answer"
|
|
7283
7386
|
}
|
|
7284
7387
|
),
|
|
7285
|
-
/* @__PURE__ */ (0,
|
|
7388
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
7286
7389
|
"div",
|
|
7287
7390
|
{
|
|
7288
7391
|
className: "short-answer-question-prompt-content",
|
|
7289
7392
|
"data-selectable": "true",
|
|
7290
|
-
children: /* @__PURE__ */ (0,
|
|
7291
|
-
/* @__PURE__ */ (0,
|
|
7292
|
-
/* @__PURE__ */ (0,
|
|
7293
|
-
|
|
7393
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_LexicalNestedComposer6.LexicalNestedComposer, { initialEditor: notes, children: /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(NestedEditor, { nodeKey, children: [
|
|
7394
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(SettingsPanelNestedAgentPlugin, {}),
|
|
7395
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
7396
|
+
import_LexicalRichTextPlugin5.RichTextPlugin,
|
|
7294
7397
|
{
|
|
7295
|
-
contentEditable: /* @__PURE__ */ (0,
|
|
7296
|
-
ErrorBoundary:
|
|
7398
|
+
contentEditable: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(NestedContentEditable, {}),
|
|
7399
|
+
ErrorBoundary: import_LexicalErrorBoundary6.LexicalErrorBoundary,
|
|
7297
7400
|
placeholder: null
|
|
7298
7401
|
},
|
|
7299
7402
|
nodeKey
|
|
7300
7403
|
),
|
|
7301
|
-
/* @__PURE__ */ (0,
|
|
7302
|
-
/* @__PURE__ */ (0,
|
|
7404
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_LexicalHistoryPlugin7.HistoryPlugin, { externalHistoryState: historyState }),
|
|
7405
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
7303
7406
|
TextToolbarAgentPlugin,
|
|
7304
7407
|
{
|
|
7305
7408
|
decoratorNode: ShortAnswerQuestionNode
|
|
7306
7409
|
}
|
|
7307
7410
|
),
|
|
7308
|
-
/* @__PURE__ */ (0,
|
|
7411
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
7309
7412
|
TypeaheadVariableAgentPlugin,
|
|
7310
7413
|
{
|
|
7311
7414
|
decoratorNode: ShortAnswerQuestionNode
|
|
7312
7415
|
}
|
|
7313
7416
|
),
|
|
7314
|
-
/* @__PURE__ */ (0,
|
|
7315
|
-
/* @__PURE__ */ (0,
|
|
7316
|
-
/* @__PURE__ */ (0,
|
|
7417
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(VariableComponentPlugin, {}),
|
|
7418
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(VariableToolbarAgentPlugin, {}),
|
|
7419
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
7317
7420
|
WordsCounterPlugin,
|
|
7318
7421
|
{
|
|
7319
7422
|
onChange: (wordsCount) => {
|
|
@@ -7322,16 +7425,17 @@ function ShortAnswerQuestionComponent(props) {
|
|
|
7322
7425
|
}
|
|
7323
7426
|
}
|
|
7324
7427
|
}
|
|
7325
|
-
)
|
|
7428
|
+
),
|
|
7429
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(EditorPlaceholderPlugin, {})
|
|
7326
7430
|
] }) }) })
|
|
7327
7431
|
}
|
|
7328
7432
|
),
|
|
7329
|
-
/* @__PURE__ */ (0,
|
|
7433
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
7330
7434
|
"div",
|
|
7331
7435
|
{
|
|
7332
7436
|
"data-selectable": "true",
|
|
7333
7437
|
className: "short-answer-question-prompt-footer",
|
|
7334
|
-
children: /* @__PURE__ */ (0,
|
|
7438
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { ref: promptFooterTextRef })
|
|
7335
7439
|
}
|
|
7336
7440
|
)
|
|
7337
7441
|
]
|
|
@@ -7340,7 +7444,7 @@ function ShortAnswerQuestionComponent(props) {
|
|
|
7340
7444
|
}
|
|
7341
7445
|
|
|
7342
7446
|
// src/plugins/ShortAnswerQuestionPlugin/ShortAnswerQuestionNode.tsx
|
|
7343
|
-
var
|
|
7447
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
7344
7448
|
var TYPE_NAME7 = "short-answer-question";
|
|
7345
7449
|
function initNewContentEditor3() {
|
|
7346
7450
|
return (0, import_lexical38.createEditor)();
|
|
@@ -7429,7 +7533,7 @@ var ShortAnswerQuestionNode = class _ShortAnswerQuestionNode extends import_lexi
|
|
|
7429
7533
|
writable.__maxWords = maxWords;
|
|
7430
7534
|
}
|
|
7431
7535
|
decorate() {
|
|
7432
|
-
return /* @__PURE__ */ (0,
|
|
7536
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
7433
7537
|
ShortAnswerQuestionComponent,
|
|
7434
7538
|
{
|
|
7435
7539
|
nodeKey: this.__key,
|
|
@@ -7453,7 +7557,7 @@ var import_LexicalComposerContext32 = require("@lexical/react/LexicalComposerCon
|
|
|
7453
7557
|
var import_utils9 = require("@lexical/utils");
|
|
7454
7558
|
var import_lexical39 = require("lexical");
|
|
7455
7559
|
var import_react51 = require("react");
|
|
7456
|
-
var
|
|
7560
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
7457
7561
|
var TYPEAHEAD_VARIABLE_COMMAND = (0, import_lexical39.createCommand)("TYPEAHEAD_VARIABLE_COMMAND");
|
|
7458
7562
|
function TypeaheadVariableAgentPlugin(props) {
|
|
7459
7563
|
const { decoratorNode } = props;
|
|
@@ -7472,20 +7576,20 @@ function TypeaheadVariableAgentPlugin(props) {
|
|
|
7472
7576
|
);
|
|
7473
7577
|
}
|
|
7474
7578
|
}, [editor, modulesNumber, decoratorNode, hasModule]);
|
|
7475
|
-
return /* @__PURE__ */ (0,
|
|
7579
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_jsx_runtime67.Fragment, {});
|
|
7476
7580
|
}
|
|
7477
7581
|
|
|
7478
7582
|
// src/plugins/JournalEntryQuestionPlugin/JournalEntryQuestionItemComponent.tsx
|
|
7479
7583
|
var import_LexicalComposerContext33 = require("@lexical/react/LexicalComposerContext");
|
|
7480
|
-
var
|
|
7481
|
-
var
|
|
7482
|
-
var
|
|
7483
|
-
var
|
|
7484
|
-
var
|
|
7584
|
+
var import_LexicalErrorBoundary7 = require("@lexical/react/LexicalErrorBoundary");
|
|
7585
|
+
var import_LexicalHistoryPlugin8 = require("@lexical/react/LexicalHistoryPlugin");
|
|
7586
|
+
var import_LexicalNestedComposer7 = require("@lexical/react/LexicalNestedComposer");
|
|
7587
|
+
var import_LexicalRichTextPlugin6 = require("@lexical/react/LexicalRichTextPlugin");
|
|
7588
|
+
var import_clsx3 = __toESM(require("clsx"));
|
|
7485
7589
|
var import_lexical40 = require("lexical");
|
|
7486
|
-
var
|
|
7590
|
+
var import_lucide_react12 = require("lucide-react");
|
|
7487
7591
|
var import_react52 = require("react");
|
|
7488
|
-
var
|
|
7592
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
7489
7593
|
function JournalEntryQuestionItemComponent(props) {
|
|
7490
7594
|
const { nodeKey, id, itemIndex, correct, credit, debit, account } = props;
|
|
7491
7595
|
const { historyState } = useSharedHistoryContext();
|
|
@@ -7549,16 +7653,16 @@ function JournalEntryQuestionItemComponent(props) {
|
|
|
7549
7653
|
}
|
|
7550
7654
|
});
|
|
7551
7655
|
}, [editor, nodeKey, itemIndex]);
|
|
7552
|
-
return /* @__PURE__ */ (0,
|
|
7656
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
7553
7657
|
"div",
|
|
7554
7658
|
{
|
|
7555
7659
|
id,
|
|
7556
7660
|
className: "journal-entry-question-prompt-question-item-wrapper",
|
|
7557
7661
|
children: [
|
|
7558
|
-
/* @__PURE__ */ (0,
|
|
7662
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
7559
7663
|
"div",
|
|
7560
7664
|
{
|
|
7561
|
-
className: (0,
|
|
7665
|
+
className: (0, import_clsx3.default)(
|
|
7562
7666
|
"journal-entry-question-prompt-question-item",
|
|
7563
7667
|
{
|
|
7564
7668
|
correct,
|
|
@@ -7567,40 +7671,40 @@ function JournalEntryQuestionItemComponent(props) {
|
|
|
7567
7671
|
),
|
|
7568
7672
|
"data-selectable": "true",
|
|
7569
7673
|
children: [
|
|
7570
|
-
/* @__PURE__ */ (0,
|
|
7571
|
-
/* @__PURE__ */ (0,
|
|
7572
|
-
/* @__PURE__ */ (0,
|
|
7573
|
-
/* @__PURE__ */ (0,
|
|
7574
|
-
|
|
7674
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "title", "data-selectable": "true", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { "data-selectable": "true", children: correct ? "Account" : "Incorrect Choices (1 per line)" }) }),
|
|
7675
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { style: { height: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_LexicalNestedComposer7.LexicalNestedComposer, { initialEditor: account, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(NestedEditor, { nodeKey, children: [
|
|
7676
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(SettingsPanelNestedAgentPlugin, {}),
|
|
7677
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
7678
|
+
import_LexicalRichTextPlugin6.RichTextPlugin,
|
|
7575
7679
|
{
|
|
7576
|
-
contentEditable: /* @__PURE__ */ (0,
|
|
7577
|
-
ErrorBoundary:
|
|
7680
|
+
contentEditable: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(NestedContentEditable, {}),
|
|
7681
|
+
ErrorBoundary: import_LexicalErrorBoundary7.LexicalErrorBoundary,
|
|
7578
7682
|
placeholder: null
|
|
7579
7683
|
},
|
|
7580
7684
|
nodeKey
|
|
7581
7685
|
),
|
|
7582
|
-
/* @__PURE__ */ (0,
|
|
7583
|
-
/* @__PURE__ */ (0,
|
|
7686
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_LexicalHistoryPlugin8.HistoryPlugin, { externalHistoryState: historyState }),
|
|
7687
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
7584
7688
|
TextToolbarAgentPlugin,
|
|
7585
7689
|
{
|
|
7586
7690
|
decoratorNode: JournalEntryQuestionNode
|
|
7587
7691
|
}
|
|
7588
7692
|
),
|
|
7589
|
-
/* @__PURE__ */ (0,
|
|
7693
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
7590
7694
|
TypeaheadVariableAgentPlugin,
|
|
7591
7695
|
{
|
|
7592
7696
|
decoratorNode: JournalEntryQuestionNode
|
|
7593
7697
|
}
|
|
7594
7698
|
),
|
|
7595
|
-
/* @__PURE__ */ (0,
|
|
7699
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(VariableComponentPlugin, {})
|
|
7596
7700
|
] }) }) })
|
|
7597
7701
|
]
|
|
7598
7702
|
}
|
|
7599
7703
|
),
|
|
7600
|
-
debit ? /* @__PURE__ */ (0,
|
|
7704
|
+
debit ? /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
7601
7705
|
"div",
|
|
7602
7706
|
{
|
|
7603
|
-
className: (0,
|
|
7707
|
+
className: (0, import_clsx3.default)(
|
|
7604
7708
|
"journal-entry-question-prompt-question-item",
|
|
7605
7709
|
{
|
|
7606
7710
|
correct,
|
|
@@ -7609,40 +7713,40 @@ function JournalEntryQuestionItemComponent(props) {
|
|
|
7609
7713
|
),
|
|
7610
7714
|
"data-selectable": "true",
|
|
7611
7715
|
children: [
|
|
7612
|
-
/* @__PURE__ */ (0,
|
|
7613
|
-
/* @__PURE__ */ (0,
|
|
7614
|
-
/* @__PURE__ */ (0,
|
|
7615
|
-
/* @__PURE__ */ (0,
|
|
7616
|
-
|
|
7716
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "title", "data-selectable": "true", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { "data-selectable": "true", children: "Debit" }) }),
|
|
7717
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { style: { height: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_LexicalNestedComposer7.LexicalNestedComposer, { initialEditor: debit, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(NestedEditor, { nodeKey, children: [
|
|
7718
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(SettingsPanelNestedAgentPlugin, {}),
|
|
7719
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
7720
|
+
import_LexicalRichTextPlugin6.RichTextPlugin,
|
|
7617
7721
|
{
|
|
7618
|
-
contentEditable: /* @__PURE__ */ (0,
|
|
7619
|
-
ErrorBoundary:
|
|
7722
|
+
contentEditable: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(NestedContentEditable, {}),
|
|
7723
|
+
ErrorBoundary: import_LexicalErrorBoundary7.LexicalErrorBoundary,
|
|
7620
7724
|
placeholder: null
|
|
7621
7725
|
},
|
|
7622
7726
|
nodeKey
|
|
7623
7727
|
),
|
|
7624
|
-
/* @__PURE__ */ (0,
|
|
7625
|
-
/* @__PURE__ */ (0,
|
|
7728
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_LexicalHistoryPlugin8.HistoryPlugin, { externalHistoryState: historyState }),
|
|
7729
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
7626
7730
|
TextToolbarAgentPlugin,
|
|
7627
7731
|
{
|
|
7628
7732
|
decoratorNode: JournalEntryQuestionNode
|
|
7629
7733
|
}
|
|
7630
7734
|
),
|
|
7631
|
-
/* @__PURE__ */ (0,
|
|
7735
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
7632
7736
|
TypeaheadVariableAgentPlugin,
|
|
7633
7737
|
{
|
|
7634
7738
|
decoratorNode: JournalEntryQuestionNode
|
|
7635
7739
|
}
|
|
7636
7740
|
),
|
|
7637
|
-
/* @__PURE__ */ (0,
|
|
7741
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(VariableComponentPlugin, {})
|
|
7638
7742
|
] }) }) })
|
|
7639
7743
|
]
|
|
7640
7744
|
}
|
|
7641
|
-
) : /* @__PURE__ */ (0,
|
|
7642
|
-
credit ? /* @__PURE__ */ (0,
|
|
7745
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", {}),
|
|
7746
|
+
credit ? /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
7643
7747
|
"div",
|
|
7644
7748
|
{
|
|
7645
|
-
className: (0,
|
|
7749
|
+
className: (0, import_clsx3.default)(
|
|
7646
7750
|
"journal-entry-question-prompt-question-item",
|
|
7647
7751
|
{
|
|
7648
7752
|
correct,
|
|
@@ -7651,49 +7755,49 @@ function JournalEntryQuestionItemComponent(props) {
|
|
|
7651
7755
|
),
|
|
7652
7756
|
"data-selectable": "true",
|
|
7653
7757
|
children: [
|
|
7654
|
-
/* @__PURE__ */ (0,
|
|
7655
|
-
/* @__PURE__ */ (0,
|
|
7656
|
-
/* @__PURE__ */ (0,
|
|
7657
|
-
/* @__PURE__ */ (0,
|
|
7658
|
-
|
|
7758
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "title", "data-selectable": "true", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { "data-selectable": "true", children: "Credit" }) }),
|
|
7759
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { style: { height: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_LexicalNestedComposer7.LexicalNestedComposer, { initialEditor: credit, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(NestedEditor, { nodeKey, children: [
|
|
7760
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(SettingsPanelNestedAgentPlugin, {}),
|
|
7761
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
7762
|
+
import_LexicalRichTextPlugin6.RichTextPlugin,
|
|
7659
7763
|
{
|
|
7660
|
-
contentEditable: /* @__PURE__ */ (0,
|
|
7661
|
-
ErrorBoundary:
|
|
7764
|
+
contentEditable: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(NestedContentEditable, {}),
|
|
7765
|
+
ErrorBoundary: import_LexicalErrorBoundary7.LexicalErrorBoundary,
|
|
7662
7766
|
placeholder: null
|
|
7663
7767
|
},
|
|
7664
7768
|
nodeKey
|
|
7665
7769
|
),
|
|
7666
|
-
/* @__PURE__ */ (0,
|
|
7667
|
-
/* @__PURE__ */ (0,
|
|
7770
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_LexicalHistoryPlugin8.HistoryPlugin, { externalHistoryState: historyState }),
|
|
7771
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
7668
7772
|
TextToolbarAgentPlugin,
|
|
7669
7773
|
{
|
|
7670
7774
|
decoratorNode: JournalEntryQuestionNode
|
|
7671
7775
|
}
|
|
7672
7776
|
),
|
|
7673
|
-
/* @__PURE__ */ (0,
|
|
7777
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
7674
7778
|
TypeaheadVariableAgentPlugin,
|
|
7675
7779
|
{
|
|
7676
7780
|
decoratorNode: JournalEntryQuestionNode
|
|
7677
7781
|
}
|
|
7678
7782
|
),
|
|
7679
|
-
/* @__PURE__ */ (0,
|
|
7680
|
-
/* @__PURE__ */ (0,
|
|
7783
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(VariableComponentPlugin, {}),
|
|
7784
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(VariableToolbarAgentPlugin, {})
|
|
7681
7785
|
] }) }) }),
|
|
7682
|
-
/* @__PURE__ */ (0,
|
|
7683
|
-
itemIndex > 0 ? /* @__PURE__ */ (0,
|
|
7786
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "controls", children: [
|
|
7787
|
+
itemIndex > 0 ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
7684
7788
|
Button,
|
|
7685
7789
|
{
|
|
7686
|
-
StartIcon:
|
|
7790
|
+
StartIcon: import_lucide_react12.CircleMinus,
|
|
7687
7791
|
size: "medium",
|
|
7688
7792
|
variant: "text",
|
|
7689
7793
|
className: "cancel",
|
|
7690
7794
|
onClick: removeItem
|
|
7691
7795
|
}
|
|
7692
|
-
) }) : /* @__PURE__ */ (0,
|
|
7693
|
-
/* @__PURE__ */ (0,
|
|
7796
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", {}),
|
|
7797
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
7694
7798
|
Button,
|
|
7695
7799
|
{
|
|
7696
|
-
StartIcon:
|
|
7800
|
+
StartIcon: import_lucide_react12.CirclePlus,
|
|
7697
7801
|
size: "medium",
|
|
7698
7802
|
variant: "text",
|
|
7699
7803
|
className: "cancel",
|
|
@@ -7703,14 +7807,14 @@ function JournalEntryQuestionItemComponent(props) {
|
|
|
7703
7807
|
] })
|
|
7704
7808
|
]
|
|
7705
7809
|
}
|
|
7706
|
-
) : /* @__PURE__ */ (0,
|
|
7810
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", {})
|
|
7707
7811
|
]
|
|
7708
7812
|
}
|
|
7709
7813
|
);
|
|
7710
7814
|
}
|
|
7711
7815
|
|
|
7712
7816
|
// src/plugins/JournalEntryQuestionPlugin/JournalEntryQuestionComponent.tsx
|
|
7713
|
-
var
|
|
7817
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
7714
7818
|
function JournalEntryQuestionComponent(props) {
|
|
7715
7819
|
const { nodeKey, journalType, lineItems, id } = props;
|
|
7716
7820
|
const [editor] = (0, import_LexicalComposerContext34.useLexicalComposerContext)();
|
|
@@ -7736,14 +7840,14 @@ function JournalEntryQuestionComponent(props) {
|
|
|
7736
7840
|
import_lexical41.COMMAND_PRIORITY_LOW
|
|
7737
7841
|
);
|
|
7738
7842
|
}, [editor]);
|
|
7739
|
-
return /* @__PURE__ */ (0,
|
|
7843
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
7740
7844
|
"div",
|
|
7741
7845
|
{
|
|
7742
7846
|
ref: rootElementRef,
|
|
7743
7847
|
id,
|
|
7744
7848
|
className: "journal-entry-question-prompt",
|
|
7745
7849
|
children: [
|
|
7746
|
-
/* @__PURE__ */ (0,
|
|
7850
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
7747
7851
|
"div",
|
|
7748
7852
|
{
|
|
7749
7853
|
className: "journal-entry-question-prompt-title",
|
|
@@ -7751,26 +7855,26 @@ function JournalEntryQuestionComponent(props) {
|
|
|
7751
7855
|
children: "Journal Entry"
|
|
7752
7856
|
}
|
|
7753
7857
|
),
|
|
7754
|
-
/* @__PURE__ */ (0,
|
|
7858
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
7755
7859
|
"div",
|
|
7756
7860
|
{
|
|
7757
7861
|
className: "journal-entry-question-prompt-items",
|
|
7758
7862
|
"data-selectable": "true",
|
|
7759
7863
|
children: [
|
|
7760
|
-
journalType === "noEntryRequiredCorrect" && /* @__PURE__ */ (0,
|
|
7864
|
+
journalType === "noEntryRequiredCorrect" && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
7761
7865
|
"div",
|
|
7762
7866
|
{
|
|
7763
7867
|
className: "journal-entry-question-prompt-question-item correct",
|
|
7764
7868
|
"data-selectable": "true",
|
|
7765
7869
|
children: [
|
|
7766
|
-
/* @__PURE__ */ (0,
|
|
7767
|
-
/* @__PURE__ */ (0,
|
|
7870
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "title", "data-selectable": "true", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { "data-selectable": "true", children: "Correct Choice" }) }),
|
|
7871
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { "data-selectable": "true", children: "No Entry Required" })
|
|
7768
7872
|
]
|
|
7769
7873
|
}
|
|
7770
7874
|
),
|
|
7771
7875
|
journalType === "noEntryRequiredCorrect" && lineItems.map((journalEntryItem, itemIndex) => {
|
|
7772
7876
|
if (!journalEntryItem.correct) {
|
|
7773
|
-
return /* @__PURE__ */ (0,
|
|
7877
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
7774
7878
|
JournalEntryQuestionItemComponent,
|
|
7775
7879
|
{
|
|
7776
7880
|
nodeKey,
|
|
@@ -7786,7 +7890,7 @@ function JournalEntryQuestionComponent(props) {
|
|
|
7786
7890
|
}
|
|
7787
7891
|
}),
|
|
7788
7892
|
(journalType === "default" || journalType === "noEntryRequiredDistractor") && lineItems.map((journalEntryItem, itemIndex) => {
|
|
7789
|
-
return /* @__PURE__ */ (0,
|
|
7893
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
7790
7894
|
JournalEntryQuestionItemComponent,
|
|
7791
7895
|
{
|
|
7792
7896
|
nodeKey,
|
|
@@ -7811,7 +7915,7 @@ function JournalEntryQuestionComponent(props) {
|
|
|
7811
7915
|
// src/plugins/JournalEntryQuestionPlugin/JournalEntryQuestionNode.tsx
|
|
7812
7916
|
var import_lexical42 = require("lexical");
|
|
7813
7917
|
var import_nanoid6 = require("nanoid");
|
|
7814
|
-
var
|
|
7918
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
7815
7919
|
var TYPE_NAME8 = "journal-entry-question";
|
|
7816
7920
|
var JournalTypeLabelMap = {
|
|
7817
7921
|
default: "Default",
|
|
@@ -8008,7 +8112,7 @@ var JournalEntryQuestionNode = class _JournalEntryQuestionNode extends import_le
|
|
|
8008
8112
|
}
|
|
8009
8113
|
}
|
|
8010
8114
|
decorate() {
|
|
8011
|
-
return /* @__PURE__ */ (0,
|
|
8115
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
8012
8116
|
JournalEntryQuestionComponent,
|
|
8013
8117
|
{
|
|
8014
8118
|
nodeKey: this.__key,
|
|
@@ -8039,7 +8143,7 @@ var import_LexicalComposerContext35 = require("@lexical/react/LexicalComposerCon
|
|
|
8039
8143
|
var import_utils10 = require("@lexical/utils");
|
|
8040
8144
|
var import_lexical43 = require("lexical");
|
|
8041
8145
|
var import_react54 = require("react");
|
|
8042
|
-
var
|
|
8146
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
8043
8147
|
var TEXT_TOOLBAR_SELECTION_CHANGE_COMMAND = (0, import_lexical43.createCommand)("TEXT_TOOLBAR_SELECTION_CHANGE_COMMAND");
|
|
8044
8148
|
function TextToolbarAgentPlugin(props) {
|
|
8045
8149
|
const { decoratorNode } = props;
|
|
@@ -8069,7 +8173,7 @@ function TextToolbarAgentPlugin(props) {
|
|
|
8069
8173
|
})
|
|
8070
8174
|
);
|
|
8071
8175
|
}, [editor]);
|
|
8072
|
-
return /* @__PURE__ */ (0,
|
|
8176
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_jsx_runtime71.Fragment, {});
|
|
8073
8177
|
}
|
|
8074
8178
|
|
|
8075
8179
|
// src/plugins/TypeaheadMenuPlugin/TypeaheadMenuAgentPlugin.tsx
|
|
@@ -8077,7 +8181,7 @@ var import_LexicalComposerContext36 = require("@lexical/react/LexicalComposerCon
|
|
|
8077
8181
|
var import_utils11 = require("@lexical/utils");
|
|
8078
8182
|
var import_lexical44 = require("lexical");
|
|
8079
8183
|
var import_react55 = require("react");
|
|
8080
|
-
var
|
|
8184
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
8081
8185
|
var TYPEAHEAD_MENU_COMMAND = (0, import_lexical44.createCommand)("TEXT_TOOLBAR_SELECTION_CHANGE_COMMAND");
|
|
8082
8186
|
function TypeaheadMenuAgentPlugin(props) {
|
|
8083
8187
|
const { decoratorNode } = props;
|
|
@@ -8093,16 +8197,16 @@ function TypeaheadMenuAgentPlugin(props) {
|
|
|
8093
8197
|
})
|
|
8094
8198
|
);
|
|
8095
8199
|
}, [editor, decoratorNode]);
|
|
8096
|
-
return /* @__PURE__ */ (0,
|
|
8200
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_jsx_runtime72.Fragment, {});
|
|
8097
8201
|
}
|
|
8098
8202
|
|
|
8099
8203
|
// src/plugins/FillInTheBlankQuestionPlugin/FillInTheBlankQuestionComponent.tsx
|
|
8100
8204
|
var import_LexicalComposerContext38 = require("@lexical/react/LexicalComposerContext");
|
|
8101
|
-
var
|
|
8102
|
-
var
|
|
8205
|
+
var import_LexicalErrorBoundary8 = require("@lexical/react/LexicalErrorBoundary");
|
|
8206
|
+
var import_LexicalHistoryPlugin9 = require("@lexical/react/LexicalHistoryPlugin");
|
|
8103
8207
|
var import_LexicalListPlugin = require("@lexical/react/LexicalListPlugin");
|
|
8104
|
-
var
|
|
8105
|
-
var
|
|
8208
|
+
var import_LexicalNestedComposer8 = require("@lexical/react/LexicalNestedComposer");
|
|
8209
|
+
var import_LexicalRichTextPlugin7 = require("@lexical/react/LexicalRichTextPlugin");
|
|
8106
8210
|
var import_LexicalTabIndentationPlugin = require("@lexical/react/LexicalTabIndentationPlugin");
|
|
8107
8211
|
var import_lexical47 = require("lexical");
|
|
8108
8212
|
var import_react57 = require("react");
|
|
@@ -8149,7 +8253,7 @@ var import_LexicalComposerContext37 = require("@lexical/react/LexicalComposerCon
|
|
|
8149
8253
|
var import_utils12 = require("@lexical/utils");
|
|
8150
8254
|
var import_lexical46 = require("lexical");
|
|
8151
8255
|
var import_react56 = require("react");
|
|
8152
|
-
var
|
|
8256
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
8153
8257
|
function FillInTheBlankSpaceComponentPlugin() {
|
|
8154
8258
|
const { nestedEditorId } = useNestedEditor();
|
|
8155
8259
|
const [editor] = (0, import_LexicalComposerContext37.useLexicalComposerContext)();
|
|
@@ -8230,11 +8334,11 @@ function FillInTheBlankSpaceComponentPlugin() {
|
|
|
8230
8334
|
)
|
|
8231
8335
|
);
|
|
8232
8336
|
}, [editor, nestedEditorId]);
|
|
8233
|
-
return /* @__PURE__ */ (0,
|
|
8337
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_jsx_runtime73.Fragment, {});
|
|
8234
8338
|
}
|
|
8235
8339
|
|
|
8236
8340
|
// src/plugins/FillInTheBlankQuestionPlugin/FillInTheBlankQuestionComponent.tsx
|
|
8237
|
-
var
|
|
8341
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
8238
8342
|
var CREATE_SPACE_FROM_SELECTION_COMMAND = (0, import_lexical47.createCommand)("CREATE_SPACE_FROM_SELECTION_COMMAND");
|
|
8239
8343
|
function FillInTheBlankQuestionComponent(props) {
|
|
8240
8344
|
const { nodeKey, id, content } = props;
|
|
@@ -8266,14 +8370,14 @@ function FillInTheBlankQuestionComponent(props) {
|
|
|
8266
8370
|
import_lexical47.COMMAND_PRIORITY_LOW
|
|
8267
8371
|
);
|
|
8268
8372
|
}, [editor]);
|
|
8269
|
-
return /* @__PURE__ */ (0,
|
|
8373
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
8270
8374
|
"div",
|
|
8271
8375
|
{
|
|
8272
8376
|
ref: rootElementRef,
|
|
8273
8377
|
id,
|
|
8274
8378
|
className: "fill-in-the-blank-question-prompt",
|
|
8275
8379
|
children: [
|
|
8276
|
-
/* @__PURE__ */ (0,
|
|
8380
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
8277
8381
|
"div",
|
|
8278
8382
|
{
|
|
8279
8383
|
className: "fill-in-the-blank-question-prompt-title",
|
|
@@ -8281,51 +8385,51 @@ function FillInTheBlankQuestionComponent(props) {
|
|
|
8281
8385
|
children: "Fill In The Blank"
|
|
8282
8386
|
}
|
|
8283
8387
|
),
|
|
8284
|
-
/* @__PURE__ */ (0,
|
|
8388
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
8285
8389
|
"div",
|
|
8286
8390
|
{
|
|
8287
8391
|
className: "fill-in-the-blank-question-prompt-content",
|
|
8288
8392
|
"data-selectable": "true",
|
|
8289
8393
|
children: [
|
|
8290
|
-
/* @__PURE__ */ (0,
|
|
8291
|
-
/* @__PURE__ */ (0,
|
|
8292
|
-
/* @__PURE__ */ (0,
|
|
8293
|
-
/* @__PURE__ */ (0,
|
|
8294
|
-
/* @__PURE__ */ (0,
|
|
8295
|
-
/* @__PURE__ */ (0,
|
|
8296
|
-
|
|
8394
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "title", "data-selectable": "true", children: "Statement" }),
|
|
8395
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_LexicalNestedComposer8.LexicalNestedComposer, { initialEditor: content, children: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(NestedEditor, { nodeKey, children: [
|
|
8396
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(SettingsPanelNestedAgentPlugin, {}),
|
|
8397
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(FillInTheBlankSpaceComponentPlugin, {}),
|
|
8398
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(FillInTheBlankSpaceSettingsPlugin, {}),
|
|
8399
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
8400
|
+
import_LexicalRichTextPlugin7.RichTextPlugin,
|
|
8297
8401
|
{
|
|
8298
|
-
contentEditable: /* @__PURE__ */ (0,
|
|
8299
|
-
ErrorBoundary:
|
|
8402
|
+
contentEditable: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(NestedContentEditable, {}),
|
|
8403
|
+
ErrorBoundary: import_LexicalErrorBoundary8.LexicalErrorBoundary,
|
|
8300
8404
|
placeholder: null
|
|
8301
8405
|
},
|
|
8302
8406
|
nodeKey
|
|
8303
8407
|
),
|
|
8304
|
-
/* @__PURE__ */ (0,
|
|
8305
|
-
/* @__PURE__ */ (0,
|
|
8408
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_LexicalHistoryPlugin9.HistoryPlugin, { externalHistoryState: historyState }),
|
|
8409
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
8306
8410
|
TextToolbarAgentPlugin,
|
|
8307
8411
|
{
|
|
8308
8412
|
decoratorNode: FillInTheBlankQuestionNode
|
|
8309
8413
|
}
|
|
8310
8414
|
),
|
|
8311
|
-
/* @__PURE__ */ (0,
|
|
8415
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
8312
8416
|
TypeaheadVariableAgentPlugin,
|
|
8313
8417
|
{
|
|
8314
8418
|
decoratorNode: FillInTheBlankQuestionNode
|
|
8315
8419
|
}
|
|
8316
8420
|
),
|
|
8317
|
-
/* @__PURE__ */ (0,
|
|
8318
|
-
/* @__PURE__ */ (0,
|
|
8319
|
-
/* @__PURE__ */ (0,
|
|
8421
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(VariableComponentPlugin, {}),
|
|
8422
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(VariableToolbarAgentPlugin, {}),
|
|
8423
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
8320
8424
|
TypeaheadMenuAgentPlugin,
|
|
8321
8425
|
{
|
|
8322
8426
|
decoratorNode: FillInTheBlankQuestionNode
|
|
8323
8427
|
}
|
|
8324
8428
|
),
|
|
8325
|
-
/* @__PURE__ */ (0,
|
|
8326
|
-
/* @__PURE__ */ (0,
|
|
8327
|
-
/* @__PURE__ */ (0,
|
|
8328
|
-
/* @__PURE__ */ (0,
|
|
8429
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_LexicalListPlugin.ListPlugin, {}),
|
|
8430
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(ListLevelLimitPlugin, {}),
|
|
8431
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Table, {}),
|
|
8432
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_LexicalTabIndentationPlugin.TabIndentationPlugin, {})
|
|
8329
8433
|
] }) })
|
|
8330
8434
|
]
|
|
8331
8435
|
}
|
|
@@ -8336,7 +8440,7 @@ function FillInTheBlankQuestionComponent(props) {
|
|
|
8336
8440
|
}
|
|
8337
8441
|
|
|
8338
8442
|
// src/plugins/FillInTheBlankQuestionPlugin/FillInTheBlankQuestionNode.tsx
|
|
8339
|
-
var
|
|
8443
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
8340
8444
|
var TYPE_NAME9 = "fill-in-the-blank-question";
|
|
8341
8445
|
function initNewContentEditor5() {
|
|
8342
8446
|
return (0, import_lexical48.createEditor)();
|
|
@@ -8417,7 +8521,7 @@ var FillInTheBlankQuestionNode = class _FillInTheBlankQuestionNode extends impor
|
|
|
8417
8521
|
writable.__pointsPerSpace = points <= 0 ? 1 : points;
|
|
8418
8522
|
}
|
|
8419
8523
|
decorate() {
|
|
8420
|
-
return /* @__PURE__ */ (0,
|
|
8524
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
8421
8525
|
FillInTheBlankQuestionComponent,
|
|
8422
8526
|
{
|
|
8423
8527
|
nodeKey: this.__key,
|
|
@@ -8441,7 +8545,7 @@ var import_LexicalComposerContext39 = require("@lexical/react/LexicalComposerCon
|
|
|
8441
8545
|
var import_table10 = require("@lexical/table");
|
|
8442
8546
|
var import_lexical49 = require("lexical");
|
|
8443
8547
|
var import_react58 = require("react");
|
|
8444
|
-
var
|
|
8548
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
8445
8549
|
function SmartTableSettings(props) {
|
|
8446
8550
|
const { nodeKey } = props;
|
|
8447
8551
|
const isHeaderRowInputRef = (0, import_react58.useRef)(null);
|
|
@@ -8462,8 +8566,8 @@ function SmartTableSettings(props) {
|
|
|
8462
8566
|
});
|
|
8463
8567
|
}
|
|
8464
8568
|
}, [editor, nodeKey]);
|
|
8465
|
-
return /* @__PURE__ */ (0,
|
|
8466
|
-
/* @__PURE__ */ (0,
|
|
8569
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(import_jsx_runtime76.Fragment, { children: [
|
|
8570
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
8467
8571
|
Checkbox,
|
|
8468
8572
|
{
|
|
8469
8573
|
ref: isHeaderRowInputRef,
|
|
@@ -8492,7 +8596,7 @@ function SmartTableSettings(props) {
|
|
|
8492
8596
|
}
|
|
8493
8597
|
}
|
|
8494
8598
|
) }),
|
|
8495
|
-
/* @__PURE__ */ (0,
|
|
8599
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
8496
8600
|
Checkbox,
|
|
8497
8601
|
{
|
|
8498
8602
|
ref: isRowStripingInputRef,
|
|
@@ -8519,7 +8623,7 @@ var import_utils13 = require("@lexical/utils");
|
|
|
8519
8623
|
var import_lexical50 = require("lexical");
|
|
8520
8624
|
var import_debounce4 = __toESM(require("lodash-es/debounce"));
|
|
8521
8625
|
var import_react59 = require("react");
|
|
8522
|
-
var
|
|
8626
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
8523
8627
|
var REQUEST_DECORATOR_NODE_COMMAND = (0, import_lexical50.createCommand)("REQUEST_DECORATOR_NODE_COMMAND");
|
|
8524
8628
|
var RESPONSE_DECORATOR_NODE_COMMAND = (0, import_lexical50.createCommand)("RESPONSE_DECORATOR_NODE_COMMAND");
|
|
8525
8629
|
function SettingsPanelPlugin() {
|
|
@@ -8671,16 +8775,16 @@ function SettingsPanelPlugin() {
|
|
|
8671
8775
|
currentStickyRef.current?.hide();
|
|
8672
8776
|
}
|
|
8673
8777
|
}, [settingsPanelSwitch, selectedNode]);
|
|
8674
|
-
return /* @__PURE__ */ (0,
|
|
8675
|
-
/* @__PURE__ */ (0,
|
|
8676
|
-
return /* @__PURE__ */ (0,
|
|
8778
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_jsx_runtime77.Fragment, { children: settingsPanelSwitch === "on" && drawer && /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [
|
|
8779
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(StickyToPosition, { ref: tableStickyRef, container: drawer, children: (data, position, isVisible) => {
|
|
8780
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { style: { width: position.width }, children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
8677
8781
|
SettingsCard,
|
|
8678
8782
|
{
|
|
8679
8783
|
isVisible: !!isVisible,
|
|
8680
8784
|
container: drawer,
|
|
8681
8785
|
title: "Table Settings",
|
|
8682
8786
|
onClose: toggleSettingsPanelSwitch,
|
|
8683
|
-
children: /* @__PURE__ */ (0,
|
|
8787
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
8684
8788
|
SmartTableSettings,
|
|
8685
8789
|
{
|
|
8686
8790
|
nodeKey: data.nodeKey
|
|
@@ -8690,8 +8794,8 @@ function SettingsPanelPlugin() {
|
|
|
8690
8794
|
}
|
|
8691
8795
|
) });
|
|
8692
8796
|
} }),
|
|
8693
|
-
/* @__PURE__ */ (0,
|
|
8694
|
-
return /* @__PURE__ */ (0,
|
|
8797
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(StickyToPosition, { ref: emptyStickyRef, container: drawer, children: (_data, position, isVisible) => {
|
|
8798
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { style: { width: position.width }, children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
8695
8799
|
SettingsExtraCard,
|
|
8696
8800
|
{
|
|
8697
8801
|
isVisible: !!isVisible,
|
|
@@ -8709,7 +8813,7 @@ function SettingsPanelPlugin() {
|
|
|
8709
8813
|
var import_LexicalComposerContext41 = require("@lexical/react/LexicalComposerContext");
|
|
8710
8814
|
var import_lexical51 = require("lexical");
|
|
8711
8815
|
var import_react60 = require("react");
|
|
8712
|
-
var
|
|
8816
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
8713
8817
|
function SettingsPanelNestedAgentPlugin() {
|
|
8714
8818
|
const { nestedEditorId, decoratorNodeKey } = useNestedEditor();
|
|
8715
8819
|
const [editor] = (0, import_LexicalComposerContext41.useLexicalComposerContext)();
|
|
@@ -8742,7 +8846,7 @@ function SettingsPanelNestedAgentPlugin() {
|
|
|
8742
8846
|
import_lexical51.COMMAND_PRIORITY_EDITOR
|
|
8743
8847
|
);
|
|
8744
8848
|
}, [editor, nestedEditorId, decoratorNodeKey]);
|
|
8745
|
-
return /* @__PURE__ */ (0,
|
|
8849
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_jsx_runtime78.Fragment, {});
|
|
8746
8850
|
}
|
|
8747
8851
|
|
|
8748
8852
|
// src/utils/getLineBreakNodeBeforeCaretOnLastLine.ts
|
|
@@ -8792,15 +8896,15 @@ function getLineBreakNodeBeforeCaretOnLastLine(paragraph, selection) {
|
|
|
8792
8896
|
}
|
|
8793
8897
|
|
|
8794
8898
|
// src/plugins/CalloutBoxPlugin/CalloutBoxComponent.tsx
|
|
8795
|
-
var
|
|
8796
|
-
var
|
|
8797
|
-
var
|
|
8899
|
+
var import_LexicalErrorBoundary9 = require("@lexical/react/LexicalErrorBoundary");
|
|
8900
|
+
var import_LexicalHistoryPlugin10 = require("@lexical/react/LexicalHistoryPlugin");
|
|
8901
|
+
var import_LexicalNestedComposer9 = require("@lexical/react/LexicalNestedComposer");
|
|
8798
8902
|
var import_LexicalPlainTextPlugin2 = require("@lexical/react/LexicalPlainTextPlugin");
|
|
8799
8903
|
var import_useLexicalNodeSelection3 = require("@lexical/react/useLexicalNodeSelection");
|
|
8800
8904
|
var import_utils14 = require("@lexical/utils");
|
|
8801
8905
|
var import_lexical53 = require("lexical");
|
|
8802
8906
|
var import_react61 = require("react");
|
|
8803
|
-
var
|
|
8907
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
8804
8908
|
function CalloutBoxComponent(props) {
|
|
8805
8909
|
const { nodeKey, content, calloutType } = props;
|
|
8806
8910
|
const { historyState } = useSharedHistoryContext();
|
|
@@ -8885,7 +8989,7 @@ function CalloutBoxComponent(props) {
|
|
|
8885
8989
|
);
|
|
8886
8990
|
}
|
|
8887
8991
|
}, [content]);
|
|
8888
|
-
return /* @__PURE__ */ (0,
|
|
8992
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
|
|
8889
8993
|
"div",
|
|
8890
8994
|
{
|
|
8891
8995
|
className: "callout-box",
|
|
@@ -8895,29 +8999,29 @@ function CalloutBoxComponent(props) {
|
|
|
8895
8999
|
outline: isSelected ? "1px dashed var(--sl-color-primary-500)" : void 0
|
|
8896
9000
|
},
|
|
8897
9001
|
children: [
|
|
8898
|
-
/* @__PURE__ */ (0,
|
|
9002
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "callout-box-icon", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
8899
9003
|
Icon,
|
|
8900
9004
|
{
|
|
8901
9005
|
style: { color: `var(${CALLOUT_COLORS[calloutType]}-400)` },
|
|
8902
9006
|
icon: CALLOUT_ICONS[calloutType]
|
|
8903
9007
|
}
|
|
8904
9008
|
) }),
|
|
8905
|
-
/* @__PURE__ */ (0,
|
|
9009
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
8906
9010
|
"div",
|
|
8907
9011
|
{
|
|
8908
9012
|
className: "callout-box-content",
|
|
8909
9013
|
style: { color: `var(${CALLOUT_COLORS[calloutType]}-600)` },
|
|
8910
|
-
children: /* @__PURE__ */ (0,
|
|
8911
|
-
/* @__PURE__ */ (0,
|
|
8912
|
-
/* @__PURE__ */ (0,
|
|
9014
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_LexicalNestedComposer9.LexicalNestedComposer, { initialEditor: content, children: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(NestedEditor, { nodeKey, children: [
|
|
9015
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(SettingsPanelNestedAgentPlugin, {}),
|
|
9016
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
8913
9017
|
import_LexicalPlainTextPlugin2.PlainTextPlugin,
|
|
8914
9018
|
{
|
|
8915
|
-
contentEditable: /* @__PURE__ */ (0,
|
|
8916
|
-
ErrorBoundary:
|
|
9019
|
+
contentEditable: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(NestedContentEditable, {}),
|
|
9020
|
+
ErrorBoundary: import_LexicalErrorBoundary9.LexicalErrorBoundary
|
|
8917
9021
|
}
|
|
8918
9022
|
),
|
|
8919
|
-
/* @__PURE__ */ (0,
|
|
8920
|
-
/* @__PURE__ */ (0,
|
|
9023
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_LexicalHistoryPlugin10.HistoryPlugin, { externalHistoryState: historyState }),
|
|
9024
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(TextToolbarAgentPlugin, { decoratorNode: CalloutBoxNode })
|
|
8921
9025
|
] }) })
|
|
8922
9026
|
}
|
|
8923
9027
|
)
|
|
@@ -8927,10 +9031,10 @@ function CalloutBoxComponent(props) {
|
|
|
8927
9031
|
}
|
|
8928
9032
|
|
|
8929
9033
|
// src/plugins/CalloutBoxPlugin/CalloutBoxNode.tsx
|
|
8930
|
-
var
|
|
9034
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
8931
9035
|
var CALLOUT_ICONS = {
|
|
8932
|
-
info:
|
|
8933
|
-
tip:
|
|
9036
|
+
info: import_lucide_react13.Info,
|
|
9037
|
+
tip: import_lucide_react13.Lightbulb
|
|
8934
9038
|
};
|
|
8935
9039
|
var CALLOUT_COLORS = {
|
|
8936
9040
|
info: "--sl-color-primary",
|
|
@@ -9021,7 +9125,7 @@ var CalloutBoxNode = class _CalloutBoxNode extends import_lexical54.DecoratorNod
|
|
|
9021
9125
|
writable.__calloutType = value;
|
|
9022
9126
|
}
|
|
9023
9127
|
decorate() {
|
|
9024
|
-
return /* @__PURE__ */ (0,
|
|
9128
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
9025
9129
|
CalloutBoxComponent,
|
|
9026
9130
|
{
|
|
9027
9131
|
nodeKey: this.getKey(),
|
|
@@ -9049,7 +9153,7 @@ var import_nanoid8 = require("nanoid");
|
|
|
9049
9153
|
var import_LexicalComposerContext42 = require("@lexical/react/LexicalComposerContext");
|
|
9050
9154
|
var import_lexical55 = require("lexical");
|
|
9051
9155
|
var import_react62 = require("react");
|
|
9052
|
-
var
|
|
9156
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
9053
9157
|
function EssayQuestionComponent(props) {
|
|
9054
9158
|
const { nodeKey, id, aiSystemMessage } = props;
|
|
9055
9159
|
const [editor] = (0, import_LexicalComposerContext42.useLexicalComposerContext)();
|
|
@@ -9075,14 +9179,14 @@ function EssayQuestionComponent(props) {
|
|
|
9075
9179
|
import_lexical55.COMMAND_PRIORITY_LOW
|
|
9076
9180
|
);
|
|
9077
9181
|
}, [editor]);
|
|
9078
|
-
return /* @__PURE__ */ (0,
|
|
9182
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
|
|
9079
9183
|
"div",
|
|
9080
9184
|
{
|
|
9081
9185
|
ref: rootElementRef,
|
|
9082
9186
|
id,
|
|
9083
9187
|
className: "essay-question-prompt",
|
|
9084
9188
|
children: [
|
|
9085
|
-
/* @__PURE__ */ (0,
|
|
9189
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
9086
9190
|
"div",
|
|
9087
9191
|
{
|
|
9088
9192
|
className: "essay-question-prompt-title",
|
|
@@ -9090,12 +9194,12 @@ function EssayQuestionComponent(props) {
|
|
|
9090
9194
|
children: "Essay"
|
|
9091
9195
|
}
|
|
9092
9196
|
),
|
|
9093
|
-
/* @__PURE__ */ (0,
|
|
9197
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
9094
9198
|
"div",
|
|
9095
9199
|
{
|
|
9096
9200
|
className: "essay-question-prompt-content",
|
|
9097
9201
|
"data-selectable": "true",
|
|
9098
|
-
children: /* @__PURE__ */ (0,
|
|
9202
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "title", "data-selectable": "true", children: aiSystemMessage })
|
|
9099
9203
|
}
|
|
9100
9204
|
)
|
|
9101
9205
|
]
|
|
@@ -9104,7 +9208,7 @@ function EssayQuestionComponent(props) {
|
|
|
9104
9208
|
}
|
|
9105
9209
|
|
|
9106
9210
|
// src/plugins/EssayQuestionPlugin/EssayQuestionNode.tsx
|
|
9107
|
-
var
|
|
9211
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
9108
9212
|
var TYPE_NAME11 = "essay-question";
|
|
9109
9213
|
var EssayQuestionNode = class _EssayQuestionNode extends import_lexical56.DecoratorNode {
|
|
9110
9214
|
constructor(points, maxWords, hideChat, aiSystemMessage, aiChatModel, id, key) {
|
|
@@ -9191,7 +9295,7 @@ var EssayQuestionNode = class _EssayQuestionNode extends import_lexical56.Decora
|
|
|
9191
9295
|
writable.__maxWords = maxWords;
|
|
9192
9296
|
}
|
|
9193
9297
|
decorate() {
|
|
9194
|
-
return /* @__PURE__ */ (0,
|
|
9298
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
9195
9299
|
EssayQuestionComponent,
|
|
9196
9300
|
{
|
|
9197
9301
|
nodeKey: this.__key,
|
|
@@ -9223,7 +9327,7 @@ var import_useLexicalNodeSelection4 = require("@lexical/react/useLexicalNodeSele
|
|
|
9223
9327
|
var import_utils15 = require("@lexical/utils");
|
|
9224
9328
|
var import_lexical57 = require("lexical");
|
|
9225
9329
|
var import_react63 = require("react");
|
|
9226
|
-
var
|
|
9330
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
9227
9331
|
var INSERT_HORIZONTAL_RULE_COMMAND = (0, import_lexical57.createCommand)("INSERT_HORIZONTAL_RULE_COMMAND");
|
|
9228
9332
|
function HorizontalRuleComponent({ nodeKey }) {
|
|
9229
9333
|
const [editor] = (0, import_LexicalComposerContext43.useLexicalComposerContext)();
|
|
@@ -9335,7 +9439,7 @@ var HorizontalRuleNode = class _HorizontalRuleNode extends import_lexical57.Deco
|
|
|
9335
9439
|
return false;
|
|
9336
9440
|
}
|
|
9337
9441
|
decorate() {
|
|
9338
|
-
return /* @__PURE__ */ (0,
|
|
9442
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(HorizontalRuleComponent, { nodeKey: this.__key });
|
|
9339
9443
|
}
|
|
9340
9444
|
};
|
|
9341
9445
|
function $convertHorizontalRuleElement() {
|
|
@@ -9356,7 +9460,7 @@ var import_nanoid9 = require("nanoid");
|
|
|
9356
9460
|
var import_LexicalComposerContext44 = require("@lexical/react/LexicalComposerContext");
|
|
9357
9461
|
var import_lexical58 = require("lexical");
|
|
9358
9462
|
var import_react64 = require("react");
|
|
9359
|
-
var
|
|
9463
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
9360
9464
|
function SimulationQuestionComponent(props) {
|
|
9361
9465
|
const { nodeKey, id, aiSystemMessage, step2Instruction } = props;
|
|
9362
9466
|
const [editor] = (0, import_LexicalComposerContext44.useLexicalComposerContext)();
|
|
@@ -9382,14 +9486,14 @@ function SimulationQuestionComponent(props) {
|
|
|
9382
9486
|
import_lexical58.COMMAND_PRIORITY_LOW
|
|
9383
9487
|
);
|
|
9384
9488
|
}, [editor]);
|
|
9385
|
-
return /* @__PURE__ */ (0,
|
|
9489
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
9386
9490
|
"div",
|
|
9387
9491
|
{
|
|
9388
9492
|
ref: rootElementRef,
|
|
9389
9493
|
id,
|
|
9390
9494
|
className: "simulation-question-prompt",
|
|
9391
9495
|
children: [
|
|
9392
|
-
/* @__PURE__ */ (0,
|
|
9496
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9393
9497
|
"div",
|
|
9394
9498
|
{
|
|
9395
9499
|
className: "simulation-question-prompt-title",
|
|
@@ -9397,14 +9501,14 @@ function SimulationQuestionComponent(props) {
|
|
|
9397
9501
|
children: "Simulation"
|
|
9398
9502
|
}
|
|
9399
9503
|
),
|
|
9400
|
-
/* @__PURE__ */ (0,
|
|
9504
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
9401
9505
|
"div",
|
|
9402
9506
|
{
|
|
9403
9507
|
className: "simulation-question-prompt-content",
|
|
9404
9508
|
"data-selectable": "true",
|
|
9405
9509
|
children: [
|
|
9406
|
-
/* @__PURE__ */ (0,
|
|
9407
|
-
/* @__PURE__ */ (0,
|
|
9510
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "title", "data-selectable": "true", children: aiSystemMessage }),
|
|
9511
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { children: step2Instruction })
|
|
9408
9512
|
]
|
|
9409
9513
|
}
|
|
9410
9514
|
)
|
|
@@ -9414,7 +9518,7 @@ function SimulationQuestionComponent(props) {
|
|
|
9414
9518
|
}
|
|
9415
9519
|
|
|
9416
9520
|
// src/plugins/SimulationQuestionPlugin/SimulationQuestionNode.tsx
|
|
9417
|
-
var
|
|
9521
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
9418
9522
|
var TYPE_NAME12 = "simulation-question";
|
|
9419
9523
|
var SimulationQuestionNode = class _SimulationQuestionNode extends import_lexical59.DecoratorNode {
|
|
9420
9524
|
constructor(points, aiSystemMessage, aiChatModel, step2Instructions, id, key) {
|
|
@@ -9493,7 +9597,7 @@ var SimulationQuestionNode = class _SimulationQuestionNode extends import_lexica
|
|
|
9493
9597
|
writable.__points = points <= 0 ? 1 : points;
|
|
9494
9598
|
}
|
|
9495
9599
|
decorate() {
|
|
9496
|
-
return /* @__PURE__ */ (0,
|
|
9600
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
9497
9601
|
SimulationQuestionComponent,
|
|
9498
9602
|
{
|
|
9499
9603
|
nodeKey: this.__key,
|
|
@@ -9589,9 +9693,9 @@ var initialEditorRegistry = {
|
|
|
9589
9693
|
};
|
|
9590
9694
|
|
|
9591
9695
|
// src/content/drawer/Drawer.tsx
|
|
9592
|
-
var
|
|
9696
|
+
var import_lucide_react14 = require("lucide-react");
|
|
9593
9697
|
var import_react65 = require("react");
|
|
9594
|
-
var
|
|
9698
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
9595
9699
|
var Drawer = (0, import_react65.forwardRef)(
|
|
9596
9700
|
(props, ref) => {
|
|
9597
9701
|
const {
|
|
@@ -9606,18 +9710,18 @@ var Drawer = (0, import_react65.forwardRef)(
|
|
|
9606
9710
|
setShowSettingsButton(true);
|
|
9607
9711
|
}
|
|
9608
9712
|
}, [modulesNumber, hasModule]);
|
|
9609
|
-
return /* @__PURE__ */ (0,
|
|
9713
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
9610
9714
|
"nav",
|
|
9611
9715
|
{
|
|
9612
9716
|
ref,
|
|
9613
9717
|
className: !showSettingsButton ? "disabled" : settingsPanelSwitch === "on" ? "shown" : "hidden",
|
|
9614
|
-
children: settingsPanelSwitch === "off" && /* @__PURE__ */ (0,
|
|
9718
|
+
children: settingsPanelSwitch === "off" && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
9615
9719
|
Button,
|
|
9616
9720
|
{
|
|
9617
9721
|
className: "cancel",
|
|
9618
9722
|
variant: "text",
|
|
9619
9723
|
size: "large",
|
|
9620
|
-
StartIcon:
|
|
9724
|
+
StartIcon: import_lucide_react14.Menu,
|
|
9621
9725
|
onClick: toggleSettingsPanelSwitch
|
|
9622
9726
|
}
|
|
9623
9727
|
) })
|
|
@@ -9628,9 +9732,9 @@ var Drawer = (0, import_react65.forwardRef)(
|
|
|
9628
9732
|
|
|
9629
9733
|
// src/content/editable/ContentEditable.tsx
|
|
9630
9734
|
var import_LexicalContentEditable2 = require("@lexical/react/LexicalContentEditable");
|
|
9631
|
-
var
|
|
9735
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
9632
9736
|
function ContentEditable() {
|
|
9633
|
-
return /* @__PURE__ */ (0,
|
|
9737
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_LexicalContentEditable2.ContentEditable, { className: "content" });
|
|
9634
9738
|
}
|
|
9635
9739
|
|
|
9636
9740
|
// src/content/node/NodeProvider.tsx
|
|
@@ -9638,7 +9742,7 @@ var import_react81 = __toESM(require("react"));
|
|
|
9638
9742
|
|
|
9639
9743
|
// src/components/inputs/DropdownWrapper.tsx
|
|
9640
9744
|
var import_react66 = require("react");
|
|
9641
|
-
var
|
|
9745
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
9642
9746
|
var DropdownWrapper = (0, import_react66.forwardRef)((props, ref) => {
|
|
9643
9747
|
const {
|
|
9644
9748
|
className,
|
|
@@ -9721,9 +9825,9 @@ var DropdownWrapper = (0, import_react66.forwardRef)((props, ref) => {
|
|
|
9721
9825
|
subMenu
|
|
9722
9826
|
} = menuItem;
|
|
9723
9827
|
if (menuItemDivider) {
|
|
9724
|
-
menuItemElement = /* @__PURE__ */ (0,
|
|
9828
|
+
menuItemElement = /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("sl-divider", { ...triggerData }, `menuItem${menuItemId}`);
|
|
9725
9829
|
} else if (menuItemIsGroup) {
|
|
9726
|
-
menuItemElement = /* @__PURE__ */ (0,
|
|
9830
|
+
menuItemElement = /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("sl-menu-label", { children: menuItemLabel }, `menuItem${menuItemId}`);
|
|
9727
9831
|
} else if (subMenu) {
|
|
9728
9832
|
const subMenuElements = [];
|
|
9729
9833
|
let subTabsIndex = 0;
|
|
@@ -9732,7 +9836,7 @@ var DropdownWrapper = (0, import_react66.forwardRef)((props, ref) => {
|
|
|
9732
9836
|
createMenuItem(subMenuItem, subTabsIndex++)
|
|
9733
9837
|
);
|
|
9734
9838
|
}
|
|
9735
|
-
menuItemElement = /* @__PURE__ */ (0,
|
|
9839
|
+
menuItemElement = /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
|
|
9736
9840
|
"sl-menu-item",
|
|
9737
9841
|
{
|
|
9738
9842
|
className: menuItemClassName,
|
|
@@ -9742,7 +9846,7 @@ var DropdownWrapper = (0, import_react66.forwardRef)((props, ref) => {
|
|
|
9742
9846
|
e.stopPropagation();
|
|
9743
9847
|
},
|
|
9744
9848
|
children: [
|
|
9745
|
-
MenuItemIcon && /* @__PURE__ */ (0,
|
|
9849
|
+
MenuItemIcon && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
9746
9850
|
Icon,
|
|
9747
9851
|
{
|
|
9748
9852
|
style: { color: menuItemColor || "inherit" },
|
|
@@ -9751,7 +9855,7 @@ var DropdownWrapper = (0, import_react66.forwardRef)((props, ref) => {
|
|
|
9751
9855
|
}
|
|
9752
9856
|
),
|
|
9753
9857
|
menuItemLabel,
|
|
9754
|
-
/* @__PURE__ */ (0,
|
|
9858
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
9755
9859
|
"sl-menu",
|
|
9756
9860
|
{
|
|
9757
9861
|
slot: "submenu",
|
|
@@ -9776,7 +9880,7 @@ var DropdownWrapper = (0, import_react66.forwardRef)((props, ref) => {
|
|
|
9776
9880
|
menuItemAttributes.type = "checkbox";
|
|
9777
9881
|
menuItemAttributes.checked = menuItemSelected;
|
|
9778
9882
|
}
|
|
9779
|
-
menuItemElement = /* @__PURE__ */ (0,
|
|
9883
|
+
menuItemElement = /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
|
|
9780
9884
|
"sl-menu-item",
|
|
9781
9885
|
{
|
|
9782
9886
|
value: menuItemId,
|
|
@@ -9788,7 +9892,7 @@ var DropdownWrapper = (0, import_react66.forwardRef)((props, ref) => {
|
|
|
9788
9892
|
e.stopPropagation();
|
|
9789
9893
|
},
|
|
9790
9894
|
children: [
|
|
9791
|
-
MenuItemIcon && /* @__PURE__ */ (0,
|
|
9895
|
+
MenuItemIcon && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
9792
9896
|
Icon,
|
|
9793
9897
|
{
|
|
9794
9898
|
style: { color: menuItemColor || "inherit" },
|
|
@@ -9797,7 +9901,7 @@ var DropdownWrapper = (0, import_react66.forwardRef)((props, ref) => {
|
|
|
9797
9901
|
}
|
|
9798
9902
|
),
|
|
9799
9903
|
menuItemLabel,
|
|
9800
|
-
menuItemIsError && /* @__PURE__ */ (0,
|
|
9904
|
+
menuItemIsError && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(DotBadge, { variant: "danger", leftSided: true })
|
|
9801
9905
|
]
|
|
9802
9906
|
},
|
|
9803
9907
|
`menuItem${menuItemId}`
|
|
@@ -9863,7 +9967,7 @@ var DropdownWrapper = (0, import_react66.forwardRef)((props, ref) => {
|
|
|
9863
9967
|
}
|
|
9864
9968
|
};
|
|
9865
9969
|
}, []);
|
|
9866
|
-
const buttonElement = /* @__PURE__ */ (0,
|
|
9970
|
+
const buttonElement = /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
|
|
9867
9971
|
"sl-dropdown",
|
|
9868
9972
|
{
|
|
9869
9973
|
ref: dropdownRef,
|
|
@@ -9872,7 +9976,7 @@ var DropdownWrapper = (0, import_react66.forwardRef)((props, ref) => {
|
|
|
9872
9976
|
...dropdownAttributes,
|
|
9873
9977
|
children: [
|
|
9874
9978
|
children,
|
|
9875
|
-
menuItems.length > 0 && /* @__PURE__ */ (0,
|
|
9979
|
+
menuItems.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
9876
9980
|
"sl-menu",
|
|
9877
9981
|
{
|
|
9878
9982
|
ref: menuRef,
|
|
@@ -9950,7 +10054,7 @@ function validatePointsInput(input) {
|
|
|
9950
10054
|
}
|
|
9951
10055
|
|
|
9952
10056
|
// src/plugins/FillInTheBlankQuestionPlugin/FillInTheBlankQuestionSettings.tsx
|
|
9953
|
-
var
|
|
10057
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
9954
10058
|
function FillInTheBlankQuestionSettings(props) {
|
|
9955
10059
|
const { nodeKey } = props;
|
|
9956
10060
|
const [editor] = (0, import_LexicalComposerContext45.useLexicalComposerContext)();
|
|
@@ -9969,7 +10073,7 @@ function FillInTheBlankQuestionSettings(props) {
|
|
|
9969
10073
|
if (!foundNode) {
|
|
9970
10074
|
return null;
|
|
9971
10075
|
}
|
|
9972
|
-
return /* @__PURE__ */ (0,
|
|
10076
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
9973
10077
|
TextInput,
|
|
9974
10078
|
{
|
|
9975
10079
|
ref: pointsTextInputRef,
|
|
@@ -9999,7 +10103,7 @@ function FillInTheBlankQuestionSettings(props) {
|
|
|
9999
10103
|
}
|
|
10000
10104
|
|
|
10001
10105
|
// src/plugins/FillInTheBlankQuestionPlugin/FillInTheBlankQuestionPlugin.tsx
|
|
10002
|
-
var
|
|
10106
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
10003
10107
|
var INSERT_FILL_IN_THE_BLANK_QUESTION_COMMAND = (0, import_lexical62.createCommand)("INSERT_FILL_IN_THE_BLANK_QUESTION_COMMAND");
|
|
10004
10108
|
function FillInTheBlankQuestionPlugin() {
|
|
10005
10109
|
const {
|
|
@@ -10121,20 +10225,20 @@ function FillInTheBlankQuestionPlugin() {
|
|
|
10121
10225
|
}
|
|
10122
10226
|
}
|
|
10123
10227
|
}, [isBlockEditorReady]);
|
|
10124
|
-
return /* @__PURE__ */ (0,
|
|
10228
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_jsx_runtime90.Fragment, { children: drawer && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
10125
10229
|
StickyToPosition,
|
|
10126
10230
|
{
|
|
10127
10231
|
ref: settingsPanelStickyRef,
|
|
10128
10232
|
container: drawer,
|
|
10129
10233
|
children: (data, position, isVisible) => {
|
|
10130
|
-
return /* @__PURE__ */ (0,
|
|
10234
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { style: { width: position.width }, children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
10131
10235
|
SettingsCard,
|
|
10132
10236
|
{
|
|
10133
10237
|
isVisible: !!isVisible,
|
|
10134
10238
|
container: drawer,
|
|
10135
10239
|
title: "Fill In The Blank Settings",
|
|
10136
10240
|
onClose: toggleSettingsPanelSwitch,
|
|
10137
|
-
children: /* @__PURE__ */ (0,
|
|
10241
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
10138
10242
|
FillInTheBlankQuestionSettings,
|
|
10139
10243
|
{
|
|
10140
10244
|
nodeKey: data.nodeKey
|
|
@@ -10198,7 +10302,7 @@ function validatePointsInput2(input) {
|
|
|
10198
10302
|
}
|
|
10199
10303
|
|
|
10200
10304
|
// src/plugins/JournalEntryQuestionPlugin/JournalEntryQuestionSettings.tsx
|
|
10201
|
-
var
|
|
10305
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
10202
10306
|
function JournalEntryQuestionSettings(props) {
|
|
10203
10307
|
const { nodeKey } = props;
|
|
10204
10308
|
const [editor] = (0, import_LexicalComposerContext47.useLexicalComposerContext)();
|
|
@@ -10231,8 +10335,8 @@ function JournalEntryQuestionSettings(props) {
|
|
|
10231
10335
|
if (!foundNode) {
|
|
10232
10336
|
return null;
|
|
10233
10337
|
}
|
|
10234
|
-
return /* @__PURE__ */ (0,
|
|
10235
|
-
/* @__PURE__ */ (0,
|
|
10338
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(import_jsx_runtime91.Fragment, { children: [
|
|
10339
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
10236
10340
|
TextInput,
|
|
10237
10341
|
{
|
|
10238
10342
|
ref: pointsTextInputRef,
|
|
@@ -10259,7 +10363,7 @@ function JournalEntryQuestionSettings(props) {
|
|
|
10259
10363
|
}
|
|
10260
10364
|
}
|
|
10261
10365
|
) }),
|
|
10262
|
-
/* @__PURE__ */ (0,
|
|
10366
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
10263
10367
|
TextInput,
|
|
10264
10368
|
{
|
|
10265
10369
|
ref: errorToleranceTextInputRef,
|
|
@@ -10290,7 +10394,7 @@ function JournalEntryQuestionSettings(props) {
|
|
|
10290
10394
|
}
|
|
10291
10395
|
}
|
|
10292
10396
|
) }),
|
|
10293
|
-
/* @__PURE__ */ (0,
|
|
10397
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
10294
10398
|
RadioGroup,
|
|
10295
10399
|
{
|
|
10296
10400
|
ref: typeRadioGroupRef,
|
|
@@ -10312,7 +10416,7 @@ function JournalEntryQuestionSettings(props) {
|
|
|
10312
10416
|
}
|
|
10313
10417
|
|
|
10314
10418
|
// src/plugins/JournalEntryQuestionPlugin/JournalEntryQuestionPlugin.tsx
|
|
10315
|
-
var
|
|
10419
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
10316
10420
|
var INSERT_JOURNAL_ENTRY_QUESTION_COMMAND = (0, import_lexical64.createCommand)("INSERT_JOURNAL_ENTRY_QUESTION_COMMAND");
|
|
10317
10421
|
function JournalEntryQuestionPlugin() {
|
|
10318
10422
|
const {
|
|
@@ -10417,20 +10521,20 @@ function JournalEntryQuestionPlugin() {
|
|
|
10417
10521
|
);
|
|
10418
10522
|
}
|
|
10419
10523
|
}, [isBlockEditorReady]);
|
|
10420
|
-
return /* @__PURE__ */ (0,
|
|
10524
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_jsx_runtime92.Fragment, { children: drawer && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
10421
10525
|
StickyToPosition,
|
|
10422
10526
|
{
|
|
10423
10527
|
ref: settingsPanelStickyRef,
|
|
10424
10528
|
container: drawer,
|
|
10425
10529
|
children: (data, position, isVisible) => {
|
|
10426
|
-
return /* @__PURE__ */ (0,
|
|
10530
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { style: { width: position.width }, children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
10427
10531
|
SettingsCard,
|
|
10428
10532
|
{
|
|
10429
10533
|
isVisible: !!isVisible,
|
|
10430
10534
|
container: drawer,
|
|
10431
10535
|
title: "Journal Entry Settings",
|
|
10432
10536
|
onClose: toggleSettingsPanelSwitch,
|
|
10433
|
-
children: isVisible && /* @__PURE__ */ (0,
|
|
10537
|
+
children: isVisible && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
10434
10538
|
JournalEntryQuestionSettings,
|
|
10435
10539
|
{
|
|
10436
10540
|
nodeKey: data.nodeKey
|
|
@@ -10468,7 +10572,7 @@ function validatePointsInput3(input) {
|
|
|
10468
10572
|
}
|
|
10469
10573
|
|
|
10470
10574
|
// src/plugins/MatchingQuestionPlugin/MatchingQuestionSettings.tsx
|
|
10471
|
-
var
|
|
10575
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
10472
10576
|
function MatchingQuestionSettings(props) {
|
|
10473
10577
|
const { nodeKey } = props;
|
|
10474
10578
|
const [editor] = (0, import_LexicalComposerContext49.useLexicalComposerContext)();
|
|
@@ -10487,7 +10591,7 @@ function MatchingQuestionSettings(props) {
|
|
|
10487
10591
|
if (!foundNode) {
|
|
10488
10592
|
return null;
|
|
10489
10593
|
}
|
|
10490
|
-
return /* @__PURE__ */ (0,
|
|
10594
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
10491
10595
|
TextInput,
|
|
10492
10596
|
{
|
|
10493
10597
|
ref: pointsTextInputRef,
|
|
@@ -10521,7 +10625,7 @@ var import_LexicalComposerContext50 = require("@lexical/react/LexicalComposerCon
|
|
|
10521
10625
|
var import_utils18 = require("@lexical/utils");
|
|
10522
10626
|
var import_lexical66 = require("lexical");
|
|
10523
10627
|
var import_react72 = require("react");
|
|
10524
|
-
var
|
|
10628
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
10525
10629
|
var INSERT_MATCHING_QUESTION_COMMAND = (0, import_lexical66.createCommand)("INSERT_MATCHING_QUESTION_COMMAND");
|
|
10526
10630
|
function MatchingQuestionPlugin() {
|
|
10527
10631
|
const {
|
|
@@ -10599,20 +10703,20 @@ function MatchingQuestionPlugin() {
|
|
|
10599
10703
|
);
|
|
10600
10704
|
}
|
|
10601
10705
|
}, [isBlockEditorReady]);
|
|
10602
|
-
return /* @__PURE__ */ (0,
|
|
10706
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_jsx_runtime94.Fragment, { children: drawer && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
10603
10707
|
StickyToPosition,
|
|
10604
10708
|
{
|
|
10605
10709
|
ref: settingsPanelStickyRef,
|
|
10606
10710
|
container: drawer,
|
|
10607
10711
|
children: (data, position, isVisible) => {
|
|
10608
|
-
return /* @__PURE__ */ (0,
|
|
10712
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { style: { width: position.width }, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
10609
10713
|
SettingsCard,
|
|
10610
10714
|
{
|
|
10611
10715
|
isVisible: !!isVisible,
|
|
10612
10716
|
container: drawer,
|
|
10613
10717
|
title: "Matching Settings",
|
|
10614
10718
|
onClose: toggleSettingsPanelSwitch,
|
|
10615
|
-
children: isVisible && /* @__PURE__ */ (0,
|
|
10719
|
+
children: isVisible && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
10616
10720
|
MatchingQuestionSettings,
|
|
10617
10721
|
{
|
|
10618
10722
|
nodeKey: data.nodeKey
|
|
@@ -10714,7 +10818,7 @@ function validatePointsInput4(input) {
|
|
|
10714
10818
|
}
|
|
10715
10819
|
|
|
10716
10820
|
// src/plugins/MultipleOptionQuestionPlugin/MultipleOptionQuestionSettings.tsx
|
|
10717
|
-
var
|
|
10821
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
10718
10822
|
function MultipleOptionQuestionSettings(props) {
|
|
10719
10823
|
const { nodeKey, questionType } = props;
|
|
10720
10824
|
const [editor] = (0, import_LexicalComposerContext51.useLexicalComposerContext)();
|
|
@@ -10863,8 +10967,8 @@ function MultipleOptionQuestionSettings(props) {
|
|
|
10863
10967
|
if (!foundNodeRef) {
|
|
10864
10968
|
return null;
|
|
10865
10969
|
}
|
|
10866
|
-
return /* @__PURE__ */ (0,
|
|
10867
|
-
/* @__PURE__ */ (0,
|
|
10970
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(import_jsx_runtime95.Fragment, { children: [
|
|
10971
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10868
10972
|
TextInput,
|
|
10869
10973
|
{
|
|
10870
10974
|
ref: pointsTextInputRef,
|
|
@@ -10879,7 +10983,7 @@ function MultipleOptionQuestionSettings(props) {
|
|
|
10879
10983
|
},
|
|
10880
10984
|
`points_${nodeKey}`
|
|
10881
10985
|
) }),
|
|
10882
|
-
questionType === "multiple-answers" && /* @__PURE__ */ (0,
|
|
10986
|
+
questionType === "multiple-answers" && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10883
10987
|
RadioGroup,
|
|
10884
10988
|
{
|
|
10885
10989
|
ref: gradingRadioGroupRef,
|
|
@@ -10900,7 +11004,7 @@ function MultipleOptionQuestionSettings(props) {
|
|
|
10900
11004
|
},
|
|
10901
11005
|
`grading_${nodeKey}`
|
|
10902
11006
|
) }),
|
|
10903
|
-
questionType === "multiple-answers" && /* @__PURE__ */ (0,
|
|
11007
|
+
questionType === "multiple-answers" && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10904
11008
|
TextInput,
|
|
10905
11009
|
{
|
|
10906
11010
|
ref: correctChoicesTextInputRef,
|
|
@@ -10915,7 +11019,7 @@ function MultipleOptionQuestionSettings(props) {
|
|
|
10915
11019
|
},
|
|
10916
11020
|
`correctChoices_${nodeKey}`
|
|
10917
11021
|
) }),
|
|
10918
|
-
questionType === "multiple-answers" && /* @__PURE__ */ (0,
|
|
11022
|
+
questionType === "multiple-answers" && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10919
11023
|
TextInput,
|
|
10920
11024
|
{
|
|
10921
11025
|
ref: incorrectChoicesTextInputRef,
|
|
@@ -10930,7 +11034,7 @@ function MultipleOptionQuestionSettings(props) {
|
|
|
10930
11034
|
},
|
|
10931
11035
|
`incorrectChoices_${nodeKey}`
|
|
10932
11036
|
) }),
|
|
10933
|
-
questionType === "multiple-choice" && /* @__PURE__ */ (0,
|
|
11037
|
+
questionType === "multiple-choice" && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10934
11038
|
TextInput,
|
|
10935
11039
|
{
|
|
10936
11040
|
ref: choicesTextInputRef,
|
|
@@ -10945,13 +11049,13 @@ function MultipleOptionQuestionSettings(props) {
|
|
|
10945
11049
|
},
|
|
10946
11050
|
`choices_${nodeKey}`
|
|
10947
11051
|
) }),
|
|
10948
|
-
/* @__PURE__ */ (0,
|
|
11052
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10949
11053
|
"div",
|
|
10950
11054
|
{
|
|
10951
11055
|
style: {
|
|
10952
11056
|
paddingBottom: "var(--sl-spacing-medium)"
|
|
10953
11057
|
},
|
|
10954
|
-
children: /* @__PURE__ */ (0,
|
|
11058
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
10955
11059
|
Checkbox,
|
|
10956
11060
|
{
|
|
10957
11061
|
ref: noneOfTheAboveInputRef,
|
|
@@ -10969,7 +11073,7 @@ function MultipleOptionQuestionSettings(props) {
|
|
|
10969
11073
|
}
|
|
10970
11074
|
|
|
10971
11075
|
// src/plugins/MultipleOptionQuestionPlugin/MultipleOptionQuestionPlugin.tsx
|
|
10972
|
-
var
|
|
11076
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
10973
11077
|
var INSERT_MULTIPLE_OPTION_QUESTION_COMMAND = (0, import_lexical68.createCommand)("INSERT_MULTIPLE_OPTION_QUESTION_COMMAND");
|
|
10974
11078
|
var REPLACE_LIST_WITH_MULTIPLE_OPTION_QUESTION_COMMAND = (0, import_lexical68.createCommand)("REPLACE_LIST_WITH_MULTIPLE_OPTION_QUESTION_COMMAND");
|
|
10975
11079
|
var REPLACE_MULTIPLE_OPTION_QUESTION_COMMAND = (0, import_lexical68.createCommand)("REPLACE_MULTIPLE_OPTION_QUESTION_COMMAND");
|
|
@@ -11169,7 +11273,7 @@ function MultipleOptionQuestionPlugin() {
|
|
|
11169
11273
|
);
|
|
11170
11274
|
}
|
|
11171
11275
|
}, [isBlockEditorReady]);
|
|
11172
|
-
return /* @__PURE__ */ (0,
|
|
11276
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_jsx_runtime96.Fragment, { children: drawer && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
11173
11277
|
StickyToPosition,
|
|
11174
11278
|
{
|
|
11175
11279
|
ref: settingsPanelStickyRef,
|
|
@@ -11186,14 +11290,14 @@ function MultipleOptionQuestionPlugin() {
|
|
|
11186
11290
|
}
|
|
11187
11291
|
});
|
|
11188
11292
|
}
|
|
11189
|
-
return /* @__PURE__ */ (0,
|
|
11293
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { style: { width: position.width }, children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
11190
11294
|
SettingsCard,
|
|
11191
11295
|
{
|
|
11192
11296
|
isVisible: !!isVisible,
|
|
11193
11297
|
container: drawer,
|
|
11194
11298
|
title: questionType === "multiple-answers" ? "Multiple Answers Settings" : "Multiple Choice Settings",
|
|
11195
11299
|
onClose: toggleSettingsPanelSwitch,
|
|
11196
|
-
children: isVisible && questionType && /* @__PURE__ */ (0,
|
|
11300
|
+
children: isVisible && questionType && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
11197
11301
|
MultipleOptionQuestionSettings,
|
|
11198
11302
|
{
|
|
11199
11303
|
nodeKey: data.nodeKey,
|
|
@@ -11260,7 +11364,7 @@ function validatePointsInput5(input) {
|
|
|
11260
11364
|
}
|
|
11261
11365
|
|
|
11262
11366
|
// src/plugins/ShortAnswerQuestionPlugin/ShortAnswerQuestionSettings.tsx
|
|
11263
|
-
var
|
|
11367
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
11264
11368
|
function ShortAnswerQuestionSettings(props) {
|
|
11265
11369
|
const { nodeKey } = props;
|
|
11266
11370
|
const [editor] = (0, import_LexicalComposerContext53.useLexicalComposerContext)();
|
|
@@ -11280,8 +11384,8 @@ function ShortAnswerQuestionSettings(props) {
|
|
|
11280
11384
|
if (!foundNode) {
|
|
11281
11385
|
return null;
|
|
11282
11386
|
}
|
|
11283
|
-
return /* @__PURE__ */ (0,
|
|
11284
|
-
/* @__PURE__ */ (0,
|
|
11387
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(import_jsx_runtime97.Fragment, { children: [
|
|
11388
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
11285
11389
|
TextInput,
|
|
11286
11390
|
{
|
|
11287
11391
|
ref: pointsTextInputRef,
|
|
@@ -11308,7 +11412,7 @@ function ShortAnswerQuestionSettings(props) {
|
|
|
11308
11412
|
}
|
|
11309
11413
|
}
|
|
11310
11414
|
) }),
|
|
11311
|
-
/* @__PURE__ */ (0,
|
|
11415
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
11312
11416
|
TextInput,
|
|
11313
11417
|
{
|
|
11314
11418
|
ref: maxWordsTextInputRef,
|
|
@@ -11339,7 +11443,7 @@ function ShortAnswerQuestionSettings(props) {
|
|
|
11339
11443
|
}
|
|
11340
11444
|
|
|
11341
11445
|
// src/plugins/ShortAnswerQuestionPlugin/ShortAnswerQuestionPlugin.tsx
|
|
11342
|
-
var
|
|
11446
|
+
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
11343
11447
|
var INSERT_SHORT_ANSWER_QUESTION_COMMAND = (0, import_lexical70.createCommand)("INSERT_SHORT_ANSWER_QUESTION_COMMAND");
|
|
11344
11448
|
function ShortAnswerQuestionPlugin() {
|
|
11345
11449
|
const {
|
|
@@ -11414,20 +11518,20 @@ function ShortAnswerQuestionPlugin() {
|
|
|
11414
11518
|
);
|
|
11415
11519
|
}
|
|
11416
11520
|
}, [isBlockEditorReady]);
|
|
11417
|
-
return /* @__PURE__ */ (0,
|
|
11521
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_jsx_runtime98.Fragment, { children: drawer && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
11418
11522
|
StickyToPosition,
|
|
11419
11523
|
{
|
|
11420
11524
|
ref: settingsPanelStickyRef,
|
|
11421
11525
|
container: drawer,
|
|
11422
11526
|
children: (data, position, isVisible) => {
|
|
11423
|
-
return /* @__PURE__ */ (0,
|
|
11527
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { style: { width: position.width }, children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
11424
11528
|
SettingsCard,
|
|
11425
11529
|
{
|
|
11426
11530
|
isVisible: !!isVisible,
|
|
11427
11531
|
container: drawer,
|
|
11428
11532
|
title: "Short Answer Settings",
|
|
11429
11533
|
onClose: toggleSettingsPanelSwitch,
|
|
11430
|
-
children: isVisible && /* @__PURE__ */ (0,
|
|
11534
|
+
children: isVisible && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
11431
11535
|
ShortAnswerQuestionSettings,
|
|
11432
11536
|
{
|
|
11433
11537
|
nodeKey: data.nodeKey
|
|
@@ -11444,9 +11548,9 @@ function ShortAnswerQuestionPlugin() {
|
|
|
11444
11548
|
var import_list5 = require("@lexical/list");
|
|
11445
11549
|
var import_rich_text2 = require("@lexical/rich-text");
|
|
11446
11550
|
var import_lexical71 = require("lexical");
|
|
11447
|
-
var
|
|
11551
|
+
var import_lucide_react15 = require("lucide-react");
|
|
11448
11552
|
var import_react77 = require("react");
|
|
11449
|
-
var
|
|
11553
|
+
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
11450
11554
|
var handlerStyle3 = {
|
|
11451
11555
|
display: "flex",
|
|
11452
11556
|
zIndex: 10,
|
|
@@ -11472,7 +11576,7 @@ function AddMenuHandle(props) {
|
|
|
11472
11576
|
{
|
|
11473
11577
|
id: "paragraph",
|
|
11474
11578
|
label: "Paragraph",
|
|
11475
|
-
Icon:
|
|
11579
|
+
Icon: import_lucide_react15.Pilcrow,
|
|
11476
11580
|
onClick: () => {
|
|
11477
11581
|
currentEditor.update(() => {
|
|
11478
11582
|
if (nodeKey) {
|
|
@@ -11494,7 +11598,7 @@ function AddMenuHandle(props) {
|
|
|
11494
11598
|
{
|
|
11495
11599
|
id: "heading-h1",
|
|
11496
11600
|
label: "Heading 1",
|
|
11497
|
-
Icon:
|
|
11601
|
+
Icon: import_lucide_react15.Heading1,
|
|
11498
11602
|
onClick: () => {
|
|
11499
11603
|
currentEditor.update(() => {
|
|
11500
11604
|
if (nodeKey) {
|
|
@@ -11511,7 +11615,7 @@ function AddMenuHandle(props) {
|
|
|
11511
11615
|
{
|
|
11512
11616
|
id: "heading-h2",
|
|
11513
11617
|
label: "Heading 2",
|
|
11514
|
-
Icon:
|
|
11618
|
+
Icon: import_lucide_react15.Heading2,
|
|
11515
11619
|
onClick: () => {
|
|
11516
11620
|
currentEditor.update(() => {
|
|
11517
11621
|
if (nodeKey) {
|
|
@@ -11528,7 +11632,7 @@ function AddMenuHandle(props) {
|
|
|
11528
11632
|
{
|
|
11529
11633
|
id: "heading-h3",
|
|
11530
11634
|
label: "Heading 3",
|
|
11531
|
-
Icon:
|
|
11635
|
+
Icon: import_lucide_react15.Heading3,
|
|
11532
11636
|
onClick: () => {
|
|
11533
11637
|
currentEditor.update(() => {
|
|
11534
11638
|
if (nodeKey) {
|
|
@@ -11550,7 +11654,7 @@ function AddMenuHandle(props) {
|
|
|
11550
11654
|
{
|
|
11551
11655
|
id: "ordered-list",
|
|
11552
11656
|
label: "Ordered List",
|
|
11553
|
-
Icon:
|
|
11657
|
+
Icon: import_lucide_react15.ListOrdered,
|
|
11554
11658
|
onClick: () => {
|
|
11555
11659
|
currentEditor.update(() => {
|
|
11556
11660
|
if (nodeKey) {
|
|
@@ -11571,7 +11675,7 @@ function AddMenuHandle(props) {
|
|
|
11571
11675
|
{
|
|
11572
11676
|
id: "unordered-list",
|
|
11573
11677
|
label: "Unordered List",
|
|
11574
|
-
Icon:
|
|
11678
|
+
Icon: import_lucide_react15.List,
|
|
11575
11679
|
onClick: () => {
|
|
11576
11680
|
currentEditor.update(() => {
|
|
11577
11681
|
if (nodeKey) {
|
|
@@ -11592,7 +11696,7 @@ function AddMenuHandle(props) {
|
|
|
11592
11696
|
{
|
|
11593
11697
|
id: "horizontal-rule",
|
|
11594
11698
|
label: "Divider",
|
|
11595
|
-
Icon:
|
|
11699
|
+
Icon: import_lucide_react15.SquareSplitVertical,
|
|
11596
11700
|
onClick: () => {
|
|
11597
11701
|
currentEditor.update(() => {
|
|
11598
11702
|
if (nodeKey) {
|
|
@@ -11613,7 +11717,7 @@ function AddMenuHandle(props) {
|
|
|
11613
11717
|
menu2.push({
|
|
11614
11718
|
id: "image",
|
|
11615
11719
|
label: "Image",
|
|
11616
|
-
Icon:
|
|
11720
|
+
Icon: import_lucide_react15.ImageIcon,
|
|
11617
11721
|
onClick: () => {
|
|
11618
11722
|
currentEditor.update(() => {
|
|
11619
11723
|
if (nodeKey) {
|
|
@@ -11638,7 +11742,7 @@ function AddMenuHandle(props) {
|
|
|
11638
11742
|
menu2.push({
|
|
11639
11743
|
id: `callout-box`,
|
|
11640
11744
|
label: "Callout",
|
|
11641
|
-
Icon:
|
|
11745
|
+
Icon: import_lucide_react15.MessageSquareQuote,
|
|
11642
11746
|
onClick: () => {
|
|
11643
11747
|
if (nodeKey) {
|
|
11644
11748
|
currentEditor.dispatchCommand(
|
|
@@ -11662,7 +11766,7 @@ function AddMenuHandle(props) {
|
|
|
11662
11766
|
{
|
|
11663
11767
|
id: "smart-table",
|
|
11664
11768
|
label: "Table",
|
|
11665
|
-
Icon:
|
|
11769
|
+
Icon: import_lucide_react15.Table2,
|
|
11666
11770
|
onClick: () => {
|
|
11667
11771
|
if (nodeKey) {
|
|
11668
11772
|
currentEditor.dispatchCommand(
|
|
@@ -11687,7 +11791,7 @@ function AddMenuHandle(props) {
|
|
|
11687
11791
|
{
|
|
11688
11792
|
id: "multiple-answers",
|
|
11689
11793
|
label: "Multiple Answers",
|
|
11690
|
-
Icon:
|
|
11794
|
+
Icon: import_lucide_react15.ListChecks,
|
|
11691
11795
|
onClick: () => {
|
|
11692
11796
|
if (nodeKey) {
|
|
11693
11797
|
currentEditor.dispatchCommand(
|
|
@@ -11704,7 +11808,7 @@ function AddMenuHandle(props) {
|
|
|
11704
11808
|
{
|
|
11705
11809
|
id: "multiple-choice",
|
|
11706
11810
|
label: "Multiple Choice",
|
|
11707
|
-
Icon:
|
|
11811
|
+
Icon: import_lucide_react15.LayoutList,
|
|
11708
11812
|
onClick: () => {
|
|
11709
11813
|
if (nodeKey) {
|
|
11710
11814
|
currentEditor.dispatchCommand(
|
|
@@ -11721,7 +11825,7 @@ function AddMenuHandle(props) {
|
|
|
11721
11825
|
{
|
|
11722
11826
|
id: "short-answer-question",
|
|
11723
11827
|
label: "Short Answer",
|
|
11724
|
-
Icon:
|
|
11828
|
+
Icon: import_lucide_react15.FileQuestion,
|
|
11725
11829
|
onClick: () => {
|
|
11726
11830
|
if (nodeKey) {
|
|
11727
11831
|
currentEditor.dispatchCommand(
|
|
@@ -11737,7 +11841,7 @@ function AddMenuHandle(props) {
|
|
|
11737
11841
|
{
|
|
11738
11842
|
id: "matching-question",
|
|
11739
11843
|
label: "Matching",
|
|
11740
|
-
Icon:
|
|
11844
|
+
Icon: import_lucide_react15.ArrowRightLeft,
|
|
11741
11845
|
onClick: () => {
|
|
11742
11846
|
if (nodeKey) {
|
|
11743
11847
|
currentEditor.dispatchCommand(
|
|
@@ -11753,7 +11857,7 @@ function AddMenuHandle(props) {
|
|
|
11753
11857
|
{
|
|
11754
11858
|
id: "fill-in-the-blank-question",
|
|
11755
11859
|
label: "Fill In The Blank",
|
|
11756
|
-
Icon:
|
|
11860
|
+
Icon: import_lucide_react15.Space,
|
|
11757
11861
|
onClick: () => {
|
|
11758
11862
|
if (nodeKey) {
|
|
11759
11863
|
currentEditor.dispatchCommand(
|
|
@@ -11769,7 +11873,7 @@ function AddMenuHandle(props) {
|
|
|
11769
11873
|
{
|
|
11770
11874
|
id: "journal-entry-question",
|
|
11771
11875
|
label: "Journal Entry",
|
|
11772
|
-
Icon:
|
|
11876
|
+
Icon: import_lucide_react15.Calculator,
|
|
11773
11877
|
onClick: () => {
|
|
11774
11878
|
if (nodeKey) {
|
|
11775
11879
|
currentEditor.dispatchCommand(
|
|
@@ -11788,7 +11892,7 @@ function AddMenuHandle(props) {
|
|
|
11788
11892
|
}
|
|
11789
11893
|
return menu2;
|
|
11790
11894
|
}, [hoveredNode]);
|
|
11791
|
-
return /* @__PURE__ */ (0,
|
|
11895
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { id: handlerKey, style: handlerStyle3, children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
11792
11896
|
DropdownWrapper,
|
|
11793
11897
|
{
|
|
11794
11898
|
placement: "bottom-start",
|
|
@@ -11799,20 +11903,20 @@ function AddMenuHandle(props) {
|
|
|
11799
11903
|
onHideMenu: () => {
|
|
11800
11904
|
removeVisiblePopup();
|
|
11801
11905
|
},
|
|
11802
|
-
children: /* @__PURE__ */ (0,
|
|
11906
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { slot: "trigger", className: "add-menu-handle", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Icon, { icon: import_lucide_react15.Plus }) })
|
|
11803
11907
|
}
|
|
11804
11908
|
) });
|
|
11805
11909
|
}
|
|
11806
11910
|
|
|
11807
11911
|
// src/content/node/menus/copyToClipboardMenu.tsx
|
|
11808
11912
|
var import_lexical72 = require("lexical");
|
|
11809
|
-
var
|
|
11913
|
+
var import_lucide_react16 = require("lucide-react");
|
|
11810
11914
|
function renderCopyToClipboardMenu(nodeKey, editor) {
|
|
11811
11915
|
return [
|
|
11812
11916
|
{
|
|
11813
11917
|
id: "copyToClipboardMenu",
|
|
11814
11918
|
label: "Copy to Clipboard",
|
|
11815
|
-
Icon:
|
|
11919
|
+
Icon: import_lucide_react16.ClipboardCopy,
|
|
11816
11920
|
onClick: () => {
|
|
11817
11921
|
editor.update(() => {
|
|
11818
11922
|
let nodeSerialized = void 0;
|
|
@@ -11833,13 +11937,13 @@ function renderCopyToClipboardMenu(nodeKey, editor) {
|
|
|
11833
11937
|
|
|
11834
11938
|
// src/content/node/menus/deleteMenu.tsx
|
|
11835
11939
|
var import_lexical73 = require("lexical");
|
|
11836
|
-
var
|
|
11940
|
+
var import_lucide_react17 = require("lucide-react");
|
|
11837
11941
|
function renderDeleteMenu(nodeKey, editor) {
|
|
11838
11942
|
return [
|
|
11839
11943
|
{
|
|
11840
11944
|
id: "deleteMenu",
|
|
11841
11945
|
label: "Delete",
|
|
11842
|
-
Icon:
|
|
11946
|
+
Icon: import_lucide_react17.Trash2,
|
|
11843
11947
|
onClick: () => {
|
|
11844
11948
|
editor.update(() => {
|
|
11845
11949
|
const targetNode = (0, import_lexical73.$getNodeByKey)(nodeKey);
|
|
@@ -11870,7 +11974,7 @@ function renderDeleteMenu(nodeKey, editor) {
|
|
|
11870
11974
|
// src/content/node/menus/listReplaceMenu.tsx
|
|
11871
11975
|
var import_list6 = require("@lexical/list");
|
|
11872
11976
|
var import_lexical74 = require("lexical");
|
|
11873
|
-
var
|
|
11977
|
+
var import_lucide_react18 = require("lucide-react");
|
|
11874
11978
|
function renderListReplaceMenu(nodeKey, editor) {
|
|
11875
11979
|
let listType = void 0;
|
|
11876
11980
|
editor.getEditorState().read(() => {
|
|
@@ -11883,7 +11987,7 @@ function renderListReplaceMenu(nodeKey, editor) {
|
|
|
11883
11987
|
{
|
|
11884
11988
|
id: "replace_with_ordered_list",
|
|
11885
11989
|
label: "Ordered List",
|
|
11886
|
-
Icon:
|
|
11990
|
+
Icon: import_lucide_react18.ListOrdered,
|
|
11887
11991
|
selected: listType === "number",
|
|
11888
11992
|
onClick: () => {
|
|
11889
11993
|
editor.update(() => {
|
|
@@ -11900,7 +12004,7 @@ function renderListReplaceMenu(nodeKey, editor) {
|
|
|
11900
12004
|
{
|
|
11901
12005
|
id: "replace_with_unordered_list",
|
|
11902
12006
|
label: "Unordered List",
|
|
11903
|
-
Icon:
|
|
12007
|
+
Icon: import_lucide_react18.List,
|
|
11904
12008
|
selected: listType === "bullet",
|
|
11905
12009
|
onClick: () => {
|
|
11906
12010
|
editor.update(() => {
|
|
@@ -11921,7 +12025,7 @@ function renderListReplaceMenu(nodeKey, editor) {
|
|
|
11921
12025
|
var import_rich_text3 = require("@lexical/rich-text");
|
|
11922
12026
|
var import_selection = require("@lexical/selection");
|
|
11923
12027
|
var import_lexical75 = require("lexical");
|
|
11924
|
-
var
|
|
12028
|
+
var import_lucide_react19 = require("lucide-react");
|
|
11925
12029
|
function renderTypographyReplaceMenu(nodeKey, editor) {
|
|
11926
12030
|
let nodeType = "";
|
|
11927
12031
|
let nodeTag = "";
|
|
@@ -11938,7 +12042,7 @@ function renderTypographyReplaceMenu(nodeKey, editor) {
|
|
|
11938
12042
|
{
|
|
11939
12043
|
id: "replace_with_heading_1",
|
|
11940
12044
|
label: "Heading 1",
|
|
11941
|
-
Icon:
|
|
12045
|
+
Icon: import_lucide_react19.Heading1,
|
|
11942
12046
|
selected: import_rich_text3.HeadingNode.getType() === nodeType && nodeTag === "h1",
|
|
11943
12047
|
onClick: () => {
|
|
11944
12048
|
editor.update(() => {
|
|
@@ -11955,7 +12059,7 @@ function renderTypographyReplaceMenu(nodeKey, editor) {
|
|
|
11955
12059
|
{
|
|
11956
12060
|
id: "replace_with_heading_2",
|
|
11957
12061
|
label: "Heading 2",
|
|
11958
|
-
Icon:
|
|
12062
|
+
Icon: import_lucide_react19.Heading2,
|
|
11959
12063
|
selected: import_rich_text3.HeadingNode.getType() === nodeType && nodeTag === "h2",
|
|
11960
12064
|
onClick: () => {
|
|
11961
12065
|
editor.update(() => {
|
|
@@ -11972,7 +12076,7 @@ function renderTypographyReplaceMenu(nodeKey, editor) {
|
|
|
11972
12076
|
{
|
|
11973
12077
|
id: "replace_with_heading_3",
|
|
11974
12078
|
label: "Heading 3",
|
|
11975
|
-
Icon:
|
|
12079
|
+
Icon: import_lucide_react19.Heading3,
|
|
11976
12080
|
selected: import_rich_text3.HeadingNode.getType() === nodeType && nodeTag === "h3",
|
|
11977
12081
|
onClick: () => {
|
|
11978
12082
|
editor.update(() => {
|
|
@@ -11989,7 +12093,7 @@ function renderTypographyReplaceMenu(nodeKey, editor) {
|
|
|
11989
12093
|
{
|
|
11990
12094
|
id: "replace_with_paragraph",
|
|
11991
12095
|
label: "Paragraph",
|
|
11992
|
-
Icon:
|
|
12096
|
+
Icon: import_lucide_react19.Pilcrow,
|
|
11993
12097
|
selected: import_lexical75.ParagraphNode.getType() === nodeType,
|
|
11994
12098
|
onClick: () => {
|
|
11995
12099
|
editor.update(() => {
|
|
@@ -12009,13 +12113,13 @@ function renderTypographyReplaceMenu(nodeKey, editor) {
|
|
|
12009
12113
|
// src/content/node/menus/listReplaceWithQuestionMenu.tsx
|
|
12010
12114
|
var import_list7 = require("@lexical/list");
|
|
12011
12115
|
var import_lexical76 = require("lexical");
|
|
12012
|
-
var
|
|
12116
|
+
var import_lucide_react20 = require("lucide-react");
|
|
12013
12117
|
function renderListReplaceWithQuestionMenu(nodeKey, editor) {
|
|
12014
12118
|
return [
|
|
12015
12119
|
{
|
|
12016
12120
|
id: "replace_with_multiple_answers",
|
|
12017
12121
|
label: "Multiple Answers",
|
|
12018
|
-
Icon:
|
|
12122
|
+
Icon: import_lucide_react20.ListChecks,
|
|
12019
12123
|
onClick: () => {
|
|
12020
12124
|
editor.update(() => {
|
|
12021
12125
|
const targetNode = (0, import_lexical76.$getNodeByKey)(nodeKey);
|
|
@@ -12034,7 +12138,7 @@ function renderListReplaceWithQuestionMenu(nodeKey, editor) {
|
|
|
12034
12138
|
{
|
|
12035
12139
|
id: "replace_with_multiple_choice",
|
|
12036
12140
|
label: "Multiple Choice",
|
|
12037
|
-
Icon:
|
|
12141
|
+
Icon: import_lucide_react20.LayoutList,
|
|
12038
12142
|
onClick: () => {
|
|
12039
12143
|
editor.update(() => {
|
|
12040
12144
|
const targetNode = (0, import_lexical76.$getNodeByKey)(nodeKey);
|
|
@@ -12055,7 +12159,7 @@ function renderListReplaceWithQuestionMenu(nodeKey, editor) {
|
|
|
12055
12159
|
|
|
12056
12160
|
// src/content/node/menus/multipleOptionsQuestionReplaceMenu.tsx
|
|
12057
12161
|
var import_lexical77 = require("lexical");
|
|
12058
|
-
var
|
|
12162
|
+
var import_lucide_react21 = require("lucide-react");
|
|
12059
12163
|
function renderMultipleOptionsQuestionReplaceMenu(nodeKey, editor) {
|
|
12060
12164
|
let questionType = void 0;
|
|
12061
12165
|
editor.getEditorState().read(() => {
|
|
@@ -12068,7 +12172,7 @@ function renderMultipleOptionsQuestionReplaceMenu(nodeKey, editor) {
|
|
|
12068
12172
|
{
|
|
12069
12173
|
id: "replace_with_multiple_answers",
|
|
12070
12174
|
label: "Multiple Answers",
|
|
12071
|
-
Icon:
|
|
12175
|
+
Icon: import_lucide_react21.ListChecks,
|
|
12072
12176
|
selected: questionType === "multiple-answers",
|
|
12073
12177
|
onClick: () => {
|
|
12074
12178
|
editor.update(() => {
|
|
@@ -12088,7 +12192,7 @@ function renderMultipleOptionsQuestionReplaceMenu(nodeKey, editor) {
|
|
|
12088
12192
|
{
|
|
12089
12193
|
id: "replace_with_multiple_choice",
|
|
12090
12194
|
label: "Multiple Choice",
|
|
12091
|
-
Icon:
|
|
12195
|
+
Icon: import_lucide_react21.LayoutList,
|
|
12092
12196
|
selected: questionType === "multiple-choice",
|
|
12093
12197
|
onClick: () => {
|
|
12094
12198
|
editor.update(() => {
|
|
@@ -12113,9 +12217,9 @@ var import_core7 = require("@dnd-kit/core");
|
|
|
12113
12217
|
var import_list8 = require("@lexical/list");
|
|
12114
12218
|
var import_rich_text4 = require("@lexical/rich-text");
|
|
12115
12219
|
var import_lexical78 = require("lexical");
|
|
12116
|
-
var
|
|
12220
|
+
var import_lucide_react22 = require("lucide-react");
|
|
12117
12221
|
var import_react78 = require("react");
|
|
12118
|
-
var
|
|
12222
|
+
var import_jsx_runtime100 = require("react/jsx-runtime");
|
|
12119
12223
|
var handlerStyle4 = {
|
|
12120
12224
|
display: "flex",
|
|
12121
12225
|
zIndex: 10,
|
|
@@ -12202,7 +12306,7 @@ function DragHandle(props) {
|
|
|
12202
12306
|
}
|
|
12203
12307
|
return menu2;
|
|
12204
12308
|
}, [hoveredNode, currentEditor]);
|
|
12205
|
-
return /* @__PURE__ */ (0,
|
|
12309
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
12206
12310
|
"div",
|
|
12207
12311
|
{
|
|
12208
12312
|
id: handlerKey,
|
|
@@ -12210,7 +12314,7 @@ function DragHandle(props) {
|
|
|
12210
12314
|
...listeners,
|
|
12211
12315
|
...attributes,
|
|
12212
12316
|
style: handlerStyle4,
|
|
12213
|
-
children: /* @__PURE__ */ (0,
|
|
12317
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
12214
12318
|
DropdownWrapper,
|
|
12215
12319
|
{
|
|
12216
12320
|
placement: "bottom-start",
|
|
@@ -12221,7 +12325,7 @@ function DragHandle(props) {
|
|
|
12221
12325
|
onHideMenu: () => {
|
|
12222
12326
|
removeVisiblePopup();
|
|
12223
12327
|
},
|
|
12224
|
-
children: /* @__PURE__ */ (0,
|
|
12328
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { slot: "trigger", className: "draggable-handle", children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Icon, { icon: import_lucide_react22.GripVertical }) })
|
|
12225
12329
|
}
|
|
12226
12330
|
)
|
|
12227
12331
|
}
|
|
@@ -12255,7 +12359,7 @@ function findNodePosition(rows, point, lastFound) {
|
|
|
12255
12359
|
}
|
|
12256
12360
|
|
|
12257
12361
|
// src/content/node/NodeDragOverlay.tsx
|
|
12258
|
-
var
|
|
12362
|
+
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
12259
12363
|
var overlayStyle2 = {
|
|
12260
12364
|
display: "flex",
|
|
12261
12365
|
minWidth: "150px",
|
|
@@ -12274,12 +12378,12 @@ var overlayStyle2 = {
|
|
|
12274
12378
|
boxShadow: "0 1px 3px rgba(34, 25, 25, 0.4)"
|
|
12275
12379
|
};
|
|
12276
12380
|
function NodeDragOverlay(props) {
|
|
12277
|
-
return /* @__PURE__ */ (0,
|
|
12381
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { style: overlayStyle2, children: props.children() });
|
|
12278
12382
|
}
|
|
12279
12383
|
|
|
12280
12384
|
// src/content/node/NodeDropMarker.tsx
|
|
12281
12385
|
var import_react79 = require("react");
|
|
12282
|
-
var
|
|
12386
|
+
var import_jsx_runtime102 = require("react/jsx-runtime");
|
|
12283
12387
|
var placeholderStyle3 = {
|
|
12284
12388
|
position: "absolute",
|
|
12285
12389
|
top: "calc(-1 * var(--sl-spacing-small) / 2)",
|
|
@@ -12310,7 +12414,7 @@ function NodeDropMarker(props) {
|
|
|
12310
12414
|
}, 5);
|
|
12311
12415
|
}
|
|
12312
12416
|
}, [visible, top]);
|
|
12313
|
-
return /* @__PURE__ */ (0,
|
|
12417
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { style: { ...placeholderStyle3, width: props.width }, children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { ref: lineDivRef, style: lineStyle3 }) });
|
|
12314
12418
|
}
|
|
12315
12419
|
|
|
12316
12420
|
// src/content/node/NodeDraggableHandleSticky.tsx
|
|
@@ -12318,7 +12422,7 @@ var import_core8 = require("@dnd-kit/core");
|
|
|
12318
12422
|
var import_lexical79 = require("lexical");
|
|
12319
12423
|
var import_throttle3 = __toESM(require("lodash-es/throttle"));
|
|
12320
12424
|
var import_react80 = require("react");
|
|
12321
|
-
var
|
|
12425
|
+
var import_jsx_runtime103 = require("react/jsx-runtime");
|
|
12322
12426
|
var NodeDraggableHandleSticky = (0, import_react80.forwardRef)((props, ref) => {
|
|
12323
12427
|
const {
|
|
12324
12428
|
getRegisteredEditor,
|
|
@@ -12392,9 +12496,9 @@ var NodeDraggableHandleSticky = (0, import_react80.forwardRef)((props, ref) => {
|
|
|
12392
12496
|
isHandleVisible: () => !!nodeHandleSticky.current?.isVisible()
|
|
12393
12497
|
}));
|
|
12394
12498
|
if (!isAnchorElementReady || !anchorElementRef.current) {
|
|
12395
|
-
return /* @__PURE__ */ (0,
|
|
12499
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_jsx_runtime103.Fragment, {});
|
|
12396
12500
|
}
|
|
12397
|
-
return /* @__PURE__ */ (0,
|
|
12501
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(
|
|
12398
12502
|
import_core8.DndContext,
|
|
12399
12503
|
{
|
|
12400
12504
|
sensors,
|
|
@@ -12615,13 +12719,13 @@ var NodeDraggableHandleSticky = (0, import_react80.forwardRef)((props, ref) => {
|
|
|
12615
12719
|
unsetHandleDragged();
|
|
12616
12720
|
},
|
|
12617
12721
|
children: [
|
|
12618
|
-
/* @__PURE__ */ (0,
|
|
12722
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
12619
12723
|
StickyToPosition,
|
|
12620
12724
|
{
|
|
12621
12725
|
ref: nodeHandleSticky,
|
|
12622
12726
|
container: anchorElementRef.current,
|
|
12623
12727
|
children: (data, _position) => {
|
|
12624
|
-
return /* @__PURE__ */ (0,
|
|
12728
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(
|
|
12625
12729
|
"div",
|
|
12626
12730
|
{
|
|
12627
12731
|
style: {
|
|
@@ -12633,21 +12737,21 @@ var NodeDraggableHandleSticky = (0, import_react80.forwardRef)((props, ref) => {
|
|
|
12633
12737
|
gap: "6px"
|
|
12634
12738
|
},
|
|
12635
12739
|
children: [
|
|
12636
|
-
/* @__PURE__ */ (0,
|
|
12637
|
-
/* @__PURE__ */ (0,
|
|
12740
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(AddMenuHandle, { hoveredNode: data.hoveredNode }),
|
|
12741
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(DragHandle, { hoveredNode: data.hoveredNode })
|
|
12638
12742
|
]
|
|
12639
12743
|
}
|
|
12640
12744
|
);
|
|
12641
12745
|
}
|
|
12642
12746
|
}
|
|
12643
12747
|
),
|
|
12644
|
-
/* @__PURE__ */ (0,
|
|
12748
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
12645
12749
|
StickyToPosition,
|
|
12646
12750
|
{
|
|
12647
12751
|
ref: dropMarkerSticky,
|
|
12648
12752
|
container: anchorElementRef.current,
|
|
12649
12753
|
children: (_data, position, isVisible) => {
|
|
12650
|
-
return /* @__PURE__ */ (0,
|
|
12754
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
12651
12755
|
NodeDropMarker,
|
|
12652
12756
|
{
|
|
12653
12757
|
top: `${position.top}px`,
|
|
@@ -12658,8 +12762,8 @@ var NodeDraggableHandleSticky = (0, import_react80.forwardRef)((props, ref) => {
|
|
|
12658
12762
|
}
|
|
12659
12763
|
}
|
|
12660
12764
|
),
|
|
12661
|
-
/* @__PURE__ */ (0,
|
|
12662
|
-
return /* @__PURE__ */ (0,
|
|
12765
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_core8.DragOverlay, { dropAnimation: null, children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(NodeDragOverlay, { children: () => {
|
|
12766
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { children: "Move Block" });
|
|
12663
12767
|
} }) })
|
|
12664
12768
|
]
|
|
12665
12769
|
}
|
|
@@ -12667,7 +12771,7 @@ var NodeDraggableHandleSticky = (0, import_react80.forwardRef)((props, ref) => {
|
|
|
12667
12771
|
});
|
|
12668
12772
|
|
|
12669
12773
|
// src/content/node/NodeProvider.tsx
|
|
12670
|
-
var
|
|
12774
|
+
var import_jsx_runtime104 = require("react/jsx-runtime");
|
|
12671
12775
|
var NodeProviderContext = import_react81.default.createContext(null);
|
|
12672
12776
|
function NodeProvider(props) {
|
|
12673
12777
|
const { children } = props;
|
|
@@ -12746,7 +12850,7 @@ function NodeProvider(props) {
|
|
|
12746
12850
|
}
|
|
12747
12851
|
};
|
|
12748
12852
|
}, []);
|
|
12749
|
-
return /* @__PURE__ */ (0,
|
|
12853
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(
|
|
12750
12854
|
NodeProviderContext.Provider,
|
|
12751
12855
|
{
|
|
12752
12856
|
value: {
|
|
@@ -12769,7 +12873,7 @@ function NodeProvider(props) {
|
|
|
12769
12873
|
},
|
|
12770
12874
|
children: [
|
|
12771
12875
|
children,
|
|
12772
|
-
/* @__PURE__ */ (0,
|
|
12876
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(NodeDraggableHandleSticky, { ref: nodeDraggableHandleRef })
|
|
12773
12877
|
]
|
|
12774
12878
|
}
|
|
12775
12879
|
);
|
|
@@ -12788,7 +12892,7 @@ var import_table14 = require("@lexical/table");
|
|
|
12788
12892
|
var import_utils21 = require("@lexical/utils");
|
|
12789
12893
|
var import_lexical80 = require("lexical");
|
|
12790
12894
|
var import_react82 = require("react");
|
|
12791
|
-
var
|
|
12895
|
+
var import_jsx_runtime105 = require("react/jsx-runtime");
|
|
12792
12896
|
function AutoBottomParagraphPlugin() {
|
|
12793
12897
|
const [editor] = (0, import_LexicalComposerContext55.useLexicalComposerContext)();
|
|
12794
12898
|
const listener = (nodeMutations) => {
|
|
@@ -12830,7 +12934,7 @@ function AutoBottomParagraphPlugin() {
|
|
|
12830
12934
|
)
|
|
12831
12935
|
);
|
|
12832
12936
|
}, [editor]);
|
|
12833
|
-
return /* @__PURE__ */ (0,
|
|
12937
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_jsx_runtime105.Fragment, {});
|
|
12834
12938
|
}
|
|
12835
12939
|
|
|
12836
12940
|
// src/plugins/AutoFocusPlugin/AutoFocusPlugin.tsx
|
|
@@ -13698,7 +13802,7 @@ function MarkdownPlugin() {
|
|
|
13698
13802
|
// src/plugins/NodeMousePlugin/NodeMouseAnchorPlugin.tsx
|
|
13699
13803
|
var import_LexicalComposerContext59 = require("@lexical/react/LexicalComposerContext");
|
|
13700
13804
|
var import_react86 = require("react");
|
|
13701
|
-
var
|
|
13805
|
+
var import_jsx_runtime106 = require("react/jsx-runtime");
|
|
13702
13806
|
function NodeMouseAnchorPlugin() {
|
|
13703
13807
|
const [editor] = (0, import_LexicalComposerContext59.useLexicalComposerContext)();
|
|
13704
13808
|
const { setAnchorElement, hideHandles } = useNode();
|
|
@@ -13748,7 +13852,7 @@ function NodeMouseAnchorPlugin() {
|
|
|
13748
13852
|
removeRootListener();
|
|
13749
13853
|
};
|
|
13750
13854
|
}, [editor]);
|
|
13751
|
-
return /* @__PURE__ */ (0,
|
|
13855
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_jsx_runtime106.Fragment, {});
|
|
13752
13856
|
}
|
|
13753
13857
|
|
|
13754
13858
|
// src/plugins/NodeMousePlugin/NodeMousePlugin.tsx
|
|
@@ -13777,7 +13881,7 @@ function getNodePosition2(element, parent) {
|
|
|
13777
13881
|
}
|
|
13778
13882
|
|
|
13779
13883
|
// src/plugins/NodeMousePlugin/NodeMousePlugin.tsx
|
|
13780
|
-
var
|
|
13884
|
+
var import_jsx_runtime107 = require("react/jsx-runtime");
|
|
13781
13885
|
function NodeMousePlugin() {
|
|
13782
13886
|
const [editor] = (0, import_LexicalComposerContext60.useLexicalComposerContext)();
|
|
13783
13887
|
const editorUniqueIdRef = (0, import_react87.useRef)((0, import_uniqueId2.default)("editor"));
|
|
@@ -14147,7 +14251,7 @@ function NodeMousePlugin() {
|
|
|
14147
14251
|
removeRegistration();
|
|
14148
14252
|
};
|
|
14149
14253
|
}, [editor]);
|
|
14150
|
-
return /* @__PURE__ */ (0,
|
|
14254
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_jsx_runtime107.Fragment, {});
|
|
14151
14255
|
}
|
|
14152
14256
|
|
|
14153
14257
|
// src/plugins/NodePastePlugin/NodePastePlugin.tsx
|
|
@@ -14202,7 +14306,7 @@ function regenerateIdsInQuestion(serializedNode) {
|
|
|
14202
14306
|
}
|
|
14203
14307
|
|
|
14204
14308
|
// src/plugins/NodePastePlugin/NodePastePlugin.tsx
|
|
14205
|
-
var
|
|
14309
|
+
var import_jsx_runtime108 = require("react/jsx-runtime");
|
|
14206
14310
|
function NodePastePlugin() {
|
|
14207
14311
|
const [editor] = (0, import_LexicalComposerContext61.useLexicalComposerContext)();
|
|
14208
14312
|
(0, import_react88.useEffect)(() => {
|
|
@@ -14284,13 +14388,13 @@ function NodePastePlugin() {
|
|
|
14284
14388
|
)
|
|
14285
14389
|
);
|
|
14286
14390
|
}, [editor]);
|
|
14287
|
-
return /* @__PURE__ */ (0,
|
|
14391
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_jsx_runtime108.Fragment, {});
|
|
14288
14392
|
}
|
|
14289
14393
|
|
|
14290
14394
|
// src/components/inputs/PopupToolbar.tsx
|
|
14291
|
-
var
|
|
14395
|
+
var import_clsx4 = __toESM(require("clsx"));
|
|
14292
14396
|
var import_react89 = require("react");
|
|
14293
|
-
var
|
|
14397
|
+
var import_jsx_runtime109 = require("react/jsx-runtime");
|
|
14294
14398
|
var PopupToolbar = (0, import_react89.forwardRef)((props, ref) => {
|
|
14295
14399
|
const { onEscape, menu, toolbar } = props;
|
|
14296
14400
|
const popupRef = (0, import_react89.useRef)(null);
|
|
@@ -14323,7 +14427,7 @@ var PopupToolbar = (0, import_react89.forwardRef)((props, ref) => {
|
|
|
14323
14427
|
menuItemAttributes.checked = menuItemSelected;
|
|
14324
14428
|
menuItemAttributes.type = "checkbox";
|
|
14325
14429
|
}
|
|
14326
|
-
let buttonElement = menuItem.subMenu ? /* @__PURE__ */ (0,
|
|
14430
|
+
let buttonElement = menuItem.subMenu ? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
14327
14431
|
DropdownButton,
|
|
14328
14432
|
{
|
|
14329
14433
|
size: "medium",
|
|
@@ -14333,13 +14437,13 @@ var PopupToolbar = (0, import_react89.forwardRef)((props, ref) => {
|
|
|
14333
14437
|
menu: menuItem.subMenu
|
|
14334
14438
|
},
|
|
14335
14439
|
`menuItem${menuItemId}`
|
|
14336
|
-
) : /* @__PURE__ */ (0,
|
|
14440
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(
|
|
14337
14441
|
"sl-button",
|
|
14338
14442
|
{
|
|
14339
14443
|
size: "medium",
|
|
14340
14444
|
...menuItemAttributes,
|
|
14341
14445
|
tabIndex: tabIndex++,
|
|
14342
|
-
class: (0,
|
|
14446
|
+
class: (0, import_clsx4.default)({ pressed: menuItemSelected }),
|
|
14343
14447
|
onClick: (e) => {
|
|
14344
14448
|
e.stopPropagation();
|
|
14345
14449
|
e.preventDefault();
|
|
@@ -14348,15 +14452,15 @@ var PopupToolbar = (0, import_react89.forwardRef)((props, ref) => {
|
|
|
14348
14452
|
}
|
|
14349
14453
|
},
|
|
14350
14454
|
children: [
|
|
14351
|
-
MenuItemIcon && /* @__PURE__ */ (0,
|
|
14455
|
+
MenuItemIcon && /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(Icon, { slot: "prefix", icon: MenuItemIcon }),
|
|
14352
14456
|
menuItemLabel,
|
|
14353
|
-
menuItemIsError && /* @__PURE__ */ (0,
|
|
14457
|
+
menuItemIsError && /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(DotBadge, { variant: "danger" })
|
|
14354
14458
|
]
|
|
14355
14459
|
},
|
|
14356
14460
|
`menuItem${menuItemId}`
|
|
14357
14461
|
);
|
|
14358
14462
|
if (tooltip && !menuItem.subMenu) {
|
|
14359
|
-
buttonElement = /* @__PURE__ */ (0,
|
|
14463
|
+
buttonElement = /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
14360
14464
|
"sl-tooltip",
|
|
14361
14465
|
{
|
|
14362
14466
|
content: tooltip,
|
|
@@ -14418,7 +14522,7 @@ var PopupToolbar = (0, import_react89.forwardRef)((props, ref) => {
|
|
|
14418
14522
|
};
|
|
14419
14523
|
}
|
|
14420
14524
|
}, [onEscape]);
|
|
14421
|
-
return /* @__PURE__ */ (0,
|
|
14525
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_jsx_runtime109.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
14422
14526
|
"sl-popup",
|
|
14423
14527
|
{
|
|
14424
14528
|
ref: popupRef,
|
|
@@ -14426,7 +14530,7 @@ var PopupToolbar = (0, import_react89.forwardRef)((props, ref) => {
|
|
|
14426
14530
|
shift: true,
|
|
14427
14531
|
"auto-size": "horizontal",
|
|
14428
14532
|
strategy: "fixed",
|
|
14429
|
-
children: toolbar || /* @__PURE__ */ (0,
|
|
14533
|
+
children: toolbar || /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("sl-button-group", { ref: toolbarRef, children: menuItems })
|
|
14430
14534
|
}
|
|
14431
14535
|
) });
|
|
14432
14536
|
});
|
|
@@ -14478,16 +14582,16 @@ var bgColorList = [
|
|
|
14478
14582
|
];
|
|
14479
14583
|
|
|
14480
14584
|
// src/components/feedback/ProgressBar.tsx
|
|
14481
|
-
var
|
|
14585
|
+
var import_jsx_runtime110 = require("react/jsx-runtime");
|
|
14482
14586
|
function ProgressBar() {
|
|
14483
|
-
return /* @__PURE__ */ (0,
|
|
14587
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("sl-progress-bar", { indeterminate: "indeterminate" });
|
|
14484
14588
|
}
|
|
14485
14589
|
|
|
14486
14590
|
// src/components/layouts/Stack.tsx
|
|
14487
|
-
var
|
|
14591
|
+
var import_jsx_runtime111 = require("react/jsx-runtime");
|
|
14488
14592
|
function Stack(props) {
|
|
14489
14593
|
const { id, style, className, slot, children } = props;
|
|
14490
|
-
return /* @__PURE__ */ (0,
|
|
14594
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
14491
14595
|
"div",
|
|
14492
14596
|
{
|
|
14493
14597
|
id,
|
|
@@ -14501,7 +14605,7 @@ function Stack(props) {
|
|
|
14501
14605
|
|
|
14502
14606
|
// src/components/dialogs/FormDialog.tsx
|
|
14503
14607
|
var import_react90 = require("react");
|
|
14504
|
-
var
|
|
14608
|
+
var import_jsx_runtime112 = require("react/jsx-runtime");
|
|
14505
14609
|
var FormDialog = (0, import_react90.forwardRef)((props, ref) => {
|
|
14506
14610
|
const {
|
|
14507
14611
|
id,
|
|
@@ -14629,13 +14733,13 @@ var FormDialog = (0, import_react90.forwardRef)((props, ref) => {
|
|
|
14629
14733
|
}
|
|
14630
14734
|
};
|
|
14631
14735
|
});
|
|
14632
|
-
return /* @__PURE__ */ (0,
|
|
14736
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("form", { id, method: "POST", onSubmit: handleSubmit, children: /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(
|
|
14633
14737
|
"sl-dialog",
|
|
14634
14738
|
{
|
|
14635
14739
|
class: `dialog_control ${className}`,
|
|
14636
14740
|
ref: dialogRef,
|
|
14637
14741
|
children: [
|
|
14638
|
-
/* @__PURE__ */ (0,
|
|
14742
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { slot: "label", children: headerControls && headerControls.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(
|
|
14639
14743
|
Stack,
|
|
14640
14744
|
{
|
|
14641
14745
|
className: "stack__gap-3 stack__row",
|
|
@@ -14646,29 +14750,29 @@ var FormDialog = (0, import_react90.forwardRef)((props, ref) => {
|
|
|
14646
14750
|
},
|
|
14647
14751
|
children: [
|
|
14648
14752
|
headerControls,
|
|
14649
|
-
/* @__PURE__ */ (0,
|
|
14753
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { style: { flexGrow: 2 }, children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("span", { className: "font-medium font-w-semibold", children: title }) })
|
|
14650
14754
|
]
|
|
14651
14755
|
}
|
|
14652
|
-
) : /* @__PURE__ */ (0,
|
|
14653
|
-
loading && /* @__PURE__ */ (0,
|
|
14654
|
-
/* @__PURE__ */ (0,
|
|
14655
|
-
/* @__PURE__ */ (0,
|
|
14756
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("span", { className: "font-medium font-w-semibold", children: title }) }),
|
|
14757
|
+
loading && /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(ProgressBar, {}),
|
|
14758
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("input", { type: "hidden", name: "formDialogId", value: id }),
|
|
14759
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("input", { type: "hidden", name: "action", value: actionName }),
|
|
14656
14760
|
children,
|
|
14657
|
-
/* @__PURE__ */ (0,
|
|
14761
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(
|
|
14658
14762
|
Stack,
|
|
14659
14763
|
{
|
|
14660
14764
|
slot: "footer",
|
|
14661
14765
|
className: "stack__row stack__gap-4",
|
|
14662
14766
|
style: { width: "100%", flexWrap: "nowrap" },
|
|
14663
14767
|
children: [
|
|
14664
|
-
extraControl && /* @__PURE__ */ (0,
|
|
14665
|
-
/* @__PURE__ */ (0,
|
|
14768
|
+
extraControl && /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { style: { flexGrow: 0 }, children: extraControl }),
|
|
14769
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(
|
|
14666
14770
|
Stack,
|
|
14667
14771
|
{
|
|
14668
14772
|
className: "stack__row stack__gap-4",
|
|
14669
14773
|
style: { flexGrow: 1, justifyContent: "end" },
|
|
14670
14774
|
children: [
|
|
14671
|
-
/* @__PURE__ */ (0,
|
|
14775
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
14672
14776
|
Button,
|
|
14673
14777
|
{
|
|
14674
14778
|
slot: "footer",
|
|
@@ -14680,7 +14784,7 @@ var FormDialog = (0, import_react90.forwardRef)((props, ref) => {
|
|
|
14680
14784
|
onClick: handleCancel
|
|
14681
14785
|
}
|
|
14682
14786
|
) }),
|
|
14683
|
-
/* @__PURE__ */ (0,
|
|
14787
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
14684
14788
|
Button,
|
|
14685
14789
|
{
|
|
14686
14790
|
slot: "footer",
|
|
@@ -14712,7 +14816,7 @@ var import_LexicalComposerContext62 = require("@lexical/react/LexicalComposerCon
|
|
|
14712
14816
|
var import_utils28 = require("@lexical/utils");
|
|
14713
14817
|
var import_lexical89 = require("lexical");
|
|
14714
14818
|
var import_react91 = require("react");
|
|
14715
|
-
var
|
|
14819
|
+
var import_jsx_runtime113 = require("react/jsx-runtime");
|
|
14716
14820
|
var SHOW_LINK_EDITOR_COMMAND = (0, import_lexical89.createCommand)("SHOW_LINK_EDITOR_COMMAND");
|
|
14717
14821
|
function LinkEditorPlugin() {
|
|
14718
14822
|
const [editor] = (0, import_LexicalComposerContext62.useLexicalComposerContext)();
|
|
@@ -14745,7 +14849,7 @@ function LinkEditorPlugin() {
|
|
|
14745
14849
|
)
|
|
14746
14850
|
);
|
|
14747
14851
|
}, [editor]);
|
|
14748
|
-
return /* @__PURE__ */ (0,
|
|
14852
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
14749
14853
|
FormDialog,
|
|
14750
14854
|
{
|
|
14751
14855
|
ref: formDialogRef,
|
|
@@ -14782,8 +14886,8 @@ function LinkEditorPlugin() {
|
|
|
14782
14886
|
onCancel: () => {
|
|
14783
14887
|
formDialogRef.current?.close();
|
|
14784
14888
|
},
|
|
14785
|
-
children: /* @__PURE__ */ (0,
|
|
14786
|
-
/* @__PURE__ */ (0,
|
|
14889
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("div", { style: { width: "450px" }, children: /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)(Stack, { className: "stack__column stack__gap-4", children: [
|
|
14890
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
14787
14891
|
TextInput,
|
|
14788
14892
|
{
|
|
14789
14893
|
ref: linkUrlInputRef,
|
|
@@ -14793,7 +14897,7 @@ function LinkEditorPlugin() {
|
|
|
14793
14897
|
defaultValue: ""
|
|
14794
14898
|
}
|
|
14795
14899
|
) }),
|
|
14796
|
-
/* @__PURE__ */ (0,
|
|
14900
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
14797
14901
|
Checkbox,
|
|
14798
14902
|
{
|
|
14799
14903
|
size: "small",
|
|
@@ -14812,7 +14916,7 @@ function LinkEditorPlugin() {
|
|
|
14812
14916
|
|
|
14813
14917
|
// src/components/inputs/PopupHighlight.tsx
|
|
14814
14918
|
var import_react92 = require("react");
|
|
14815
|
-
var
|
|
14919
|
+
var import_jsx_runtime114 = require("react/jsx-runtime");
|
|
14816
14920
|
var PopupHighlighter = (0, import_react92.forwardRef)((props, ref) => {
|
|
14817
14921
|
const { highlighterClassName } = props;
|
|
14818
14922
|
const popupRef = (0, import_react92.useRef)(null);
|
|
@@ -14847,7 +14951,7 @@ var PopupHighlighter = (0, import_react92.forwardRef)((props, ref) => {
|
|
|
14847
14951
|
}
|
|
14848
14952
|
}
|
|
14849
14953
|
}));
|
|
14850
|
-
return /* @__PURE__ */ (0,
|
|
14954
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("sl-popup", { ref: popupRef, placement: "top-start", strategy: "fixed", children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("div", { style: { position: "relative" }, children: highlighterClassName ? /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
14851
14955
|
"div",
|
|
14852
14956
|
{
|
|
14853
14957
|
className: highlighterClassName,
|
|
@@ -14856,7 +14960,7 @@ var PopupHighlighter = (0, import_react92.forwardRef)((props, ref) => {
|
|
|
14856
14960
|
"--variable-placeholder-height": `${popupRect?.height || 0}px`
|
|
14857
14961
|
}
|
|
14858
14962
|
}
|
|
14859
|
-
) : /* @__PURE__ */ (0,
|
|
14963
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
14860
14964
|
"div",
|
|
14861
14965
|
{
|
|
14862
14966
|
style: {
|
|
@@ -14875,7 +14979,7 @@ var PopupHighlighter = (0, import_react92.forwardRef)((props, ref) => {
|
|
|
14875
14979
|
|
|
14876
14980
|
// src/components/inputs/PopupMenu.tsx
|
|
14877
14981
|
var import_react93 = require("react");
|
|
14878
|
-
var
|
|
14982
|
+
var import_jsx_runtime115 = require("react/jsx-runtime");
|
|
14879
14983
|
var PopupMenu = (0, import_react93.forwardRef)(
|
|
14880
14984
|
(props, ref) => {
|
|
14881
14985
|
const {
|
|
@@ -14955,11 +15059,11 @@ var PopupMenu = (0, import_react93.forwardRef)(
|
|
|
14955
15059
|
} = menuItem;
|
|
14956
15060
|
if (menuItemDivider) {
|
|
14957
15061
|
resultList.push(
|
|
14958
|
-
/* @__PURE__ */ (0,
|
|
15062
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)("sl-divider", {}, `menuItem${menuItemId}`)
|
|
14959
15063
|
);
|
|
14960
15064
|
} else if (menuItemIsGroup) {
|
|
14961
15065
|
resultList.push(
|
|
14962
|
-
/* @__PURE__ */ (0,
|
|
15066
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)("sl-menu-label", { children: menuItemLabel }, `menuItem${menuItemId}`)
|
|
14963
15067
|
);
|
|
14964
15068
|
} else {
|
|
14965
15069
|
const menuItemAttributes = {};
|
|
@@ -14971,16 +15075,16 @@ var PopupMenu = (0, import_react93.forwardRef)(
|
|
|
14971
15075
|
menuItemAttributes.type = "checkbox";
|
|
14972
15076
|
}
|
|
14973
15077
|
resultList.push(
|
|
14974
|
-
/* @__PURE__ */ (0,
|
|
15078
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(
|
|
14975
15079
|
"sl-menu-item",
|
|
14976
15080
|
{
|
|
14977
15081
|
value: menuItemId,
|
|
14978
15082
|
class: menuItemClassName,
|
|
14979
15083
|
...menuItemAttributes,
|
|
14980
15084
|
children: [
|
|
14981
|
-
MenuItemIcon && /* @__PURE__ */ (0,
|
|
15085
|
+
MenuItemIcon && /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Icon, { slot: "prefix", icon: MenuItemIcon }),
|
|
14982
15086
|
menuItemLabel,
|
|
14983
|
-
menuItemIsError && /* @__PURE__ */ (0,
|
|
15087
|
+
menuItemIsError && /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(DotBadge, { variant: "danger" })
|
|
14984
15088
|
]
|
|
14985
15089
|
},
|
|
14986
15090
|
`menuItem${menuItemId}`
|
|
@@ -15003,7 +15107,7 @@ var PopupMenu = (0, import_react93.forwardRef)(
|
|
|
15003
15107
|
}
|
|
15004
15108
|
if (constMenu.length > 0) {
|
|
15005
15109
|
if (resultList.length > 0) {
|
|
15006
|
-
resultList.push(/* @__PURE__ */ (0,
|
|
15110
|
+
resultList.push(/* @__PURE__ */ (0, import_jsx_runtime115.jsx)("sl-divider", {}, "const-menu-divider"));
|
|
15007
15111
|
}
|
|
15008
15112
|
resultList = resultList.concat(createMenuList(constMenu));
|
|
15009
15113
|
}
|
|
@@ -15131,7 +15235,7 @@ var PopupMenu = (0, import_react93.forwardRef)(
|
|
|
15131
15235
|
};
|
|
15132
15236
|
}
|
|
15133
15237
|
}, [onEscape]);
|
|
15134
|
-
return /* @__PURE__ */ (0,
|
|
15238
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_jsx_runtime115.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
15135
15239
|
"sl-popup",
|
|
15136
15240
|
{
|
|
15137
15241
|
ref: popupRef,
|
|
@@ -15143,7 +15247,7 @@ var PopupMenu = (0, import_react93.forwardRef)(
|
|
|
15143
15247
|
strategy: "fixed",
|
|
15144
15248
|
"auto-size": "vertical",
|
|
15145
15249
|
"auto-size-padding": "10",
|
|
15146
|
-
children: /* @__PURE__ */ (0,
|
|
15250
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
15147
15251
|
"sl-menu",
|
|
15148
15252
|
{
|
|
15149
15253
|
ref: menuRef,
|
|
@@ -15305,7 +15409,7 @@ function visitVariableNodes(rootNode, cb) {
|
|
|
15305
15409
|
// src/plugins/VariablesPlugin/VariablesContext.tsx
|
|
15306
15410
|
var import_lexical92 = require("lexical");
|
|
15307
15411
|
var import_react95 = __toESM(require("react"));
|
|
15308
|
-
var
|
|
15412
|
+
var import_jsx_runtime116 = require("react/jsx-runtime");
|
|
15309
15413
|
var VariablesContext = import_react95.default.createContext(null);
|
|
15310
15414
|
function VariablesProvider(props) {
|
|
15311
15415
|
const { getEditor, getAllNestedEditors } = useBlockEditor();
|
|
@@ -15346,7 +15450,7 @@ function VariablesProvider(props) {
|
|
|
15346
15450
|
renameVariable(newName, oldName);
|
|
15347
15451
|
variablesSettings.onUpdated(newName, oldName);
|
|
15348
15452
|
};
|
|
15349
|
-
return /* @__PURE__ */ (0,
|
|
15453
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
15350
15454
|
VariablesContext.Provider,
|
|
15351
15455
|
{
|
|
15352
15456
|
value: {
|
|
@@ -15451,7 +15555,7 @@ var import_LexicalComposerContext63 = require("@lexical/react/LexicalComposerCon
|
|
|
15451
15555
|
var import_utils32 = require("@lexical/utils");
|
|
15452
15556
|
var import_lexical95 = require("lexical");
|
|
15453
15557
|
var import_react96 = require("react");
|
|
15454
|
-
var
|
|
15558
|
+
var import_jsx_runtime117 = require("react/jsx-runtime");
|
|
15455
15559
|
var CREATE_VARIABLE_FROM_SELECTION_COMMAND = (0, import_lexical95.createCommand)("CREATE_VARIABLE_FROM_SELECTION_COMMAND");
|
|
15456
15560
|
function TypeaheadVariablePlugin() {
|
|
15457
15561
|
const { variableList, onCreated } = useVariables();
|
|
@@ -15688,8 +15792,8 @@ function TypeaheadVariablePlugin() {
|
|
|
15688
15792
|
activeDecoratorRef.current !== JournalEntryQuestionNode
|
|
15689
15793
|
);
|
|
15690
15794
|
}, [variableList, activeDecoratorRef.current]);
|
|
15691
|
-
return /* @__PURE__ */ (0,
|
|
15692
|
-
/* @__PURE__ */ (0,
|
|
15795
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(import_jsx_runtime117.Fragment, { children: [
|
|
15796
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
15693
15797
|
PopupMenu,
|
|
15694
15798
|
{
|
|
15695
15799
|
ref: popupRef,
|
|
@@ -15697,7 +15801,7 @@ function TypeaheadVariablePlugin() {
|
|
|
15697
15801
|
menu
|
|
15698
15802
|
}
|
|
15699
15803
|
),
|
|
15700
|
-
/* @__PURE__ */ (0,
|
|
15804
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
15701
15805
|
PopupHighlighter,
|
|
15702
15806
|
{
|
|
15703
15807
|
highlighterClassName: "variable-placeholder",
|
|
@@ -15708,11 +15812,11 @@ function TypeaheadVariablePlugin() {
|
|
|
15708
15812
|
}
|
|
15709
15813
|
|
|
15710
15814
|
// src/utils/blocks.ts
|
|
15711
|
-
var
|
|
15815
|
+
var import_lucide_react23 = require("lucide-react");
|
|
15712
15816
|
var textAlignToIcon = {
|
|
15713
|
-
right:
|
|
15714
|
-
left:
|
|
15715
|
-
center:
|
|
15817
|
+
right: import_lucide_react23.AlignRight,
|
|
15818
|
+
left: import_lucide_react23.AlignLeft,
|
|
15819
|
+
center: import_lucide_react23.AlignCenter
|
|
15716
15820
|
};
|
|
15717
15821
|
|
|
15718
15822
|
// src/utils/getDOMRangeRect.ts
|
|
@@ -15802,9 +15906,9 @@ var import_table16 = require("@lexical/table");
|
|
|
15802
15906
|
var import_utils33 = require("@lexical/utils");
|
|
15803
15907
|
var import_lexical96 = require("lexical");
|
|
15804
15908
|
var import_debounce6 = __toESM(require("lodash-es/debounce"));
|
|
15805
|
-
var
|
|
15909
|
+
var import_lucide_react24 = require("lucide-react");
|
|
15806
15910
|
var import_react97 = require("react");
|
|
15807
|
-
var
|
|
15911
|
+
var import_jsx_runtime118 = require("react/jsx-runtime");
|
|
15808
15912
|
function TextToolbarPlugin() {
|
|
15809
15913
|
const { hasModule } = useBlockEditor();
|
|
15810
15914
|
const [editor] = (0, import_LexicalComposerContext64.useLexicalComposerContext)();
|
|
@@ -16246,7 +16350,7 @@ function TextToolbarPlugin() {
|
|
|
16246
16350
|
id: "bold",
|
|
16247
16351
|
label: "",
|
|
16248
16352
|
selected: toolbarState.isBold,
|
|
16249
|
-
Icon:
|
|
16353
|
+
Icon: import_lucide_react24.Bold,
|
|
16250
16354
|
tooltip: `Bold ${plt === "macOS" /* macOS */ ? "(\u2318B)" : "(Ctrl+B)"}`,
|
|
16251
16355
|
onClick: () => {
|
|
16252
16356
|
formatText("bold");
|
|
@@ -16256,7 +16360,7 @@ function TextToolbarPlugin() {
|
|
|
16256
16360
|
id: "italic",
|
|
16257
16361
|
label: "",
|
|
16258
16362
|
selected: toolbarState.isItalic,
|
|
16259
|
-
Icon:
|
|
16363
|
+
Icon: import_lucide_react24.Italic,
|
|
16260
16364
|
tooltip: `Italic ${plt === "macOS" /* macOS */ ? "(\u2318I)" : "(Ctrl+I)"}`,
|
|
16261
16365
|
onClick: () => {
|
|
16262
16366
|
formatText("italic");
|
|
@@ -16266,7 +16370,7 @@ function TextToolbarPlugin() {
|
|
|
16266
16370
|
id: "underline",
|
|
16267
16371
|
label: "",
|
|
16268
16372
|
selected: toolbarState.isUnderline,
|
|
16269
|
-
Icon:
|
|
16373
|
+
Icon: import_lucide_react24.Underline,
|
|
16270
16374
|
tooltip: `Underline ${plt === "macOS" /* macOS */ ? "(\u2318U)" : "(Ctrl+U)"}`,
|
|
16271
16375
|
onClick: () => {
|
|
16272
16376
|
formatText("underline");
|
|
@@ -16276,7 +16380,7 @@ function TextToolbarPlugin() {
|
|
|
16276
16380
|
id: "strikethrough",
|
|
16277
16381
|
label: "",
|
|
16278
16382
|
selected: toolbarState.isStrikethrough,
|
|
16279
|
-
Icon:
|
|
16383
|
+
Icon: import_lucide_react24.Strikethrough,
|
|
16280
16384
|
tooltip: `Strikethrough ${plt === "macOS" /* macOS */ ? "(\u2318\u21E7X)" : "(Ctrl+Alt+X)"}`,
|
|
16281
16385
|
onClick: () => {
|
|
16282
16386
|
formatText("strikethrough");
|
|
@@ -16289,7 +16393,7 @@ function TextToolbarPlugin() {
|
|
|
16289
16393
|
id: "subscript",
|
|
16290
16394
|
label: "",
|
|
16291
16395
|
selected: toolbarState.isSubscript,
|
|
16292
|
-
Icon:
|
|
16396
|
+
Icon: import_lucide_react24.Subscript,
|
|
16293
16397
|
tooltip: `Subscript ${plt === "macOS" /* macOS */ ? "(\u2318\u21E7-)" : "(Ctrl+Shift+`-`)"}`,
|
|
16294
16398
|
onClick: () => {
|
|
16295
16399
|
formatText("subscript");
|
|
@@ -16299,7 +16403,7 @@ function TextToolbarPlugin() {
|
|
|
16299
16403
|
id: "superscript",
|
|
16300
16404
|
label: "",
|
|
16301
16405
|
selected: toolbarState.isSuperscript,
|
|
16302
|
-
Icon:
|
|
16406
|
+
Icon: import_lucide_react24.Superscript,
|
|
16303
16407
|
tooltip: `Superscript ${plt === "macOS" /* macOS */ ? "(\u2318\u21E7=)" : "(Ctrl+Shift+`=`)"}`,
|
|
16304
16408
|
onClick: () => {
|
|
16305
16409
|
formatText("superscript");
|
|
@@ -16310,7 +16414,7 @@ function TextToolbarPlugin() {
|
|
|
16310
16414
|
resultList.push({
|
|
16311
16415
|
id: "link",
|
|
16312
16416
|
label: "",
|
|
16313
|
-
Icon:
|
|
16417
|
+
Icon: import_lucide_react24.Link2,
|
|
16314
16418
|
tooltip: `Link ${plt === "macOS" /* macOS */ ? "(\u2318K)" : "(Ctrl+K)"}`,
|
|
16315
16419
|
onClick: () => {
|
|
16316
16420
|
createLink();
|
|
@@ -16320,18 +16424,18 @@ function TextToolbarPlugin() {
|
|
|
16320
16424
|
resultList.push({
|
|
16321
16425
|
id: "styling",
|
|
16322
16426
|
label: "",
|
|
16323
|
-
Icon:
|
|
16427
|
+
Icon: import_lucide_react24.Brush,
|
|
16324
16428
|
tooltip: "Color",
|
|
16325
16429
|
subMenu: [
|
|
16326
16430
|
{
|
|
16327
16431
|
id: "color",
|
|
16328
16432
|
label: "Text Color",
|
|
16329
|
-
Icon:
|
|
16433
|
+
Icon: import_lucide_react24.TypeIcon,
|
|
16330
16434
|
subMenu: [
|
|
16331
16435
|
{
|
|
16332
16436
|
id: "color-default",
|
|
16333
16437
|
label: "Default",
|
|
16334
|
-
Icon:
|
|
16438
|
+
Icon: import_lucide_react24.Circle,
|
|
16335
16439
|
onClick: () => {
|
|
16336
16440
|
formatColor("default");
|
|
16337
16441
|
}
|
|
@@ -16340,7 +16444,7 @@ function TextToolbarPlugin() {
|
|
|
16340
16444
|
return {
|
|
16341
16445
|
id: `color-${simpleColor.label}`,
|
|
16342
16446
|
label: simpleColor.label,
|
|
16343
|
-
Icon:
|
|
16447
|
+
Icon: import_lucide_react24.Circle,
|
|
16344
16448
|
color: simpleColor.color,
|
|
16345
16449
|
onClick: () => {
|
|
16346
16450
|
formatColor(simpleColor.color);
|
|
@@ -16352,12 +16456,12 @@ function TextToolbarPlugin() {
|
|
|
16352
16456
|
{
|
|
16353
16457
|
id: "bg-color",
|
|
16354
16458
|
label: "Background Color",
|
|
16355
|
-
Icon:
|
|
16459
|
+
Icon: import_lucide_react24.Highlighter,
|
|
16356
16460
|
subMenu: [
|
|
16357
16461
|
{
|
|
16358
16462
|
id: "bg-color-default",
|
|
16359
16463
|
label: "Default",
|
|
16360
|
-
Icon:
|
|
16464
|
+
Icon: import_lucide_react24.Circle,
|
|
16361
16465
|
onClick: () => {
|
|
16362
16466
|
formatBackgroundColor("default", "default");
|
|
16363
16467
|
}
|
|
@@ -16366,7 +16470,7 @@ function TextToolbarPlugin() {
|
|
|
16366
16470
|
return {
|
|
16367
16471
|
id: `bg-color-${simpleColor.label}`,
|
|
16368
16472
|
label: simpleColor.label,
|
|
16369
|
-
Icon:
|
|
16473
|
+
Icon: import_lucide_react24.Circle,
|
|
16370
16474
|
color: bgColorList[index].color,
|
|
16371
16475
|
bgColor: simpleColor.color,
|
|
16372
16476
|
onClick: () => {
|
|
@@ -16387,7 +16491,7 @@ function TextToolbarPlugin() {
|
|
|
16387
16491
|
resultList.push({
|
|
16388
16492
|
id: "clear-styling",
|
|
16389
16493
|
label: "",
|
|
16390
|
-
Icon:
|
|
16494
|
+
Icon: import_lucide_react24.RemoveFormatting,
|
|
16391
16495
|
tooltip: `Clear Format ${plt === "macOS" /* macOS */ ? "(\u2318\\)" : "(Ctrl+\\)"}`,
|
|
16392
16496
|
onClick: clearFormatting
|
|
16393
16497
|
});
|
|
@@ -16397,7 +16501,7 @@ function TextToolbarPlugin() {
|
|
|
16397
16501
|
resultList.push({
|
|
16398
16502
|
id: "create-variable",
|
|
16399
16503
|
label: "",
|
|
16400
|
-
Icon:
|
|
16504
|
+
Icon: import_lucide_react24.Webhook,
|
|
16401
16505
|
tooltip: `Insert Variable ${plt === "macOS" /* macOS */ ? "(\u2318\u21E7C)" : "(Ctrl+Shift+C)"}`,
|
|
16402
16506
|
onClick: () => {
|
|
16403
16507
|
clearFormatting();
|
|
@@ -16413,12 +16517,12 @@ function TextToolbarPlugin() {
|
|
|
16413
16517
|
resultList.push({
|
|
16414
16518
|
id: "text-align",
|
|
16415
16519
|
label: "",
|
|
16416
|
-
Icon: textAlignToIcon[toolbarState.textAlign] ||
|
|
16520
|
+
Icon: textAlignToIcon[toolbarState.textAlign] || import_lucide_react24.AlignLeft,
|
|
16417
16521
|
tooltip: "Align Text",
|
|
16418
16522
|
subMenu: [
|
|
16419
16523
|
{
|
|
16420
16524
|
id: "text-left",
|
|
16421
|
-
Icon:
|
|
16525
|
+
Icon: import_lucide_react24.AlignLeft,
|
|
16422
16526
|
label: `Align Left ${plt === "macOS" /* macOS */ ? "(\u2318\u21E7L)" : "(Ctrl+Alt+L)"}`,
|
|
16423
16527
|
selected: toolbarState.textAlign === "left",
|
|
16424
16528
|
onClick: () => {
|
|
@@ -16428,7 +16532,7 @@ function TextToolbarPlugin() {
|
|
|
16428
16532
|
},
|
|
16429
16533
|
{
|
|
16430
16534
|
id: "text-center",
|
|
16431
|
-
Icon:
|
|
16535
|
+
Icon: import_lucide_react24.AlignCenter,
|
|
16432
16536
|
label: `Align Center ${plt === "macOS" /* macOS */ ? "(\u2318\u21E7E)" : "(Ctrl+Alt+E)"}`,
|
|
16433
16537
|
selected: toolbarState.textAlign === "center",
|
|
16434
16538
|
onClick: () => {
|
|
@@ -16438,7 +16542,7 @@ function TextToolbarPlugin() {
|
|
|
16438
16542
|
},
|
|
16439
16543
|
{
|
|
16440
16544
|
id: "text-right",
|
|
16441
|
-
Icon:
|
|
16545
|
+
Icon: import_lucide_react24.AlignRight,
|
|
16442
16546
|
label: `Align Right ${plt === "macOS" /* macOS */ ? "(\u2318\u21E7R)" : "(Ctrl+Alt+R)"}`,
|
|
16443
16547
|
selected: toolbarState.textAlign === "right",
|
|
16444
16548
|
onClick: () => {
|
|
@@ -16452,7 +16556,7 @@ function TextToolbarPlugin() {
|
|
|
16452
16556
|
resultList.push({
|
|
16453
16557
|
id: "create-variable",
|
|
16454
16558
|
label: "",
|
|
16455
|
-
Icon:
|
|
16559
|
+
Icon: import_lucide_react24.Webhook,
|
|
16456
16560
|
tooltip: `Insert Variable ${plt === "macOS" /* macOS */ ? "(\u2318\u21E7C)" : "(Ctrl+Shift+C)"}`,
|
|
16457
16561
|
onClick: () => {
|
|
16458
16562
|
clearFormatting();
|
|
@@ -16468,7 +16572,7 @@ function TextToolbarPlugin() {
|
|
|
16468
16572
|
resultList.push({
|
|
16469
16573
|
id: "create-space",
|
|
16470
16574
|
label: "",
|
|
16471
|
-
Icon:
|
|
16575
|
+
Icon: import_lucide_react24.RectangleHorizontal,
|
|
16472
16576
|
tooltip: `Insert Blank Space ${plt === "macOS" /* macOS */ ? "(\u2318\u21E7B)" : "(Ctrl+Shift+B)"}`,
|
|
16473
16577
|
onClick: () => {
|
|
16474
16578
|
clearFormatting();
|
|
@@ -16482,7 +16586,7 @@ function TextToolbarPlugin() {
|
|
|
16482
16586
|
resultList.push({
|
|
16483
16587
|
id: "create-space",
|
|
16484
16588
|
label: "",
|
|
16485
|
-
Icon:
|
|
16589
|
+
Icon: import_lucide_react24.RectangleHorizontal,
|
|
16486
16590
|
tooltip: `Insert Blank Space ${plt === "macOS" /* macOS */ ? "(\u2318\u21E7B)" : "(Ctrl+Shift+B)"}`,
|
|
16487
16591
|
onClick: () => {
|
|
16488
16592
|
clearFormatting();
|
|
@@ -16522,7 +16626,7 @@ function TextToolbarPlugin() {
|
|
|
16522
16626
|
resultList.push(
|
|
16523
16627
|
{
|
|
16524
16628
|
id: "text-left",
|
|
16525
|
-
Icon:
|
|
16629
|
+
Icon: import_lucide_react24.AlignLeft,
|
|
16526
16630
|
label: "",
|
|
16527
16631
|
tooltip: `Align Left ${plt === "macOS" /* macOS */ ? "(\u2318\u21E7L)" : "(Ctrl+Alt+L)"}`,
|
|
16528
16632
|
selected: toolbarState.textAlign === "left",
|
|
@@ -16533,7 +16637,7 @@ function TextToolbarPlugin() {
|
|
|
16533
16637
|
},
|
|
16534
16638
|
{
|
|
16535
16639
|
id: "text-center",
|
|
16536
|
-
Icon:
|
|
16640
|
+
Icon: import_lucide_react24.AlignCenter,
|
|
16537
16641
|
label: "",
|
|
16538
16642
|
tooltip: `Align Center ${plt === "macOS" /* macOS */ ? "(\u2318\u21E7E)" : "(Ctrl+Alt+E)"}`,
|
|
16539
16643
|
selected: toolbarState.textAlign === "center",
|
|
@@ -16544,7 +16648,7 @@ function TextToolbarPlugin() {
|
|
|
16544
16648
|
},
|
|
16545
16649
|
{
|
|
16546
16650
|
id: "text-right",
|
|
16547
|
-
Icon:
|
|
16651
|
+
Icon: import_lucide_react24.AlignRight,
|
|
16548
16652
|
label: "",
|
|
16549
16653
|
tooltip: `Align Right ${plt === "macOS" /* macOS */ ? "(\u2318\u21E7R)" : "(Ctrl+Alt+R)"}`,
|
|
16550
16654
|
selected: toolbarState.textAlign === "right",
|
|
@@ -16557,11 +16661,11 @@ function TextToolbarPlugin() {
|
|
|
16557
16661
|
}
|
|
16558
16662
|
return resultList;
|
|
16559
16663
|
}, [toolbarState, selectionType, activeEditorRef.current]);
|
|
16560
|
-
return /* @__PURE__ */ (0,
|
|
16664
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(PopupToolbar, { ref: popupToolbarRef, menu: menuItems });
|
|
16561
16665
|
}
|
|
16562
16666
|
|
|
16563
16667
|
// src/plugins/TypeaheadMenuPlugin/renderCalloutModuleMenu.tsx
|
|
16564
|
-
var
|
|
16668
|
+
var import_lucide_react25 = require("lucide-react");
|
|
16565
16669
|
function renderCalloutModuleMenu(popupRef, targetNodeKeyRef, activeEditorRef) {
|
|
16566
16670
|
return [
|
|
16567
16671
|
{
|
|
@@ -16580,7 +16684,7 @@ function renderCalloutModuleMenu(popupRef, targetNodeKeyRef, activeEditorRef) {
|
|
|
16580
16684
|
"tooltip",
|
|
16581
16685
|
"note"
|
|
16582
16686
|
],
|
|
16583
|
-
Icon:
|
|
16687
|
+
Icon: import_lucide_react25.MessageSquareQuote,
|
|
16584
16688
|
onClick: () => {
|
|
16585
16689
|
if (targetNodeKeyRef.current) {
|
|
16586
16690
|
activeEditorRef.current?.dispatchCommand(
|
|
@@ -16601,7 +16705,7 @@ function renderCalloutModuleMenu(popupRef, targetNodeKeyRef, activeEditorRef) {
|
|
|
16601
16705
|
var import_list14 = require("@lexical/list");
|
|
16602
16706
|
var import_rich_text11 = require("@lexical/rich-text");
|
|
16603
16707
|
var import_lexical97 = require("lexical");
|
|
16604
|
-
var
|
|
16708
|
+
var import_lucide_react26 = require("lucide-react");
|
|
16605
16709
|
function renderDefaultComponentsMenu(popupRef, targetNodeKeyRef, activeEditorRef) {
|
|
16606
16710
|
return [
|
|
16607
16711
|
{
|
|
@@ -16613,7 +16717,7 @@ function renderDefaultComponentsMenu(popupRef, targetNodeKeyRef, activeEditorRef
|
|
|
16613
16717
|
id: "heading-h1",
|
|
16614
16718
|
label: "Heading 1",
|
|
16615
16719
|
keywords: ["heading", "h1", "title"],
|
|
16616
|
-
Icon:
|
|
16720
|
+
Icon: import_lucide_react26.Heading1,
|
|
16617
16721
|
onClick: () => {
|
|
16618
16722
|
activeEditorRef.current?.update(() => {
|
|
16619
16723
|
if (targetNodeKeyRef.current) {
|
|
@@ -16634,7 +16738,7 @@ function renderDefaultComponentsMenu(popupRef, targetNodeKeyRef, activeEditorRef
|
|
|
16634
16738
|
id: "heading-h2",
|
|
16635
16739
|
label: "Heading 2",
|
|
16636
16740
|
keywords: ["heading", "h2", "title"],
|
|
16637
|
-
Icon:
|
|
16741
|
+
Icon: import_lucide_react26.Heading2,
|
|
16638
16742
|
onClick: () => {
|
|
16639
16743
|
activeEditorRef.current?.update(() => {
|
|
16640
16744
|
if (targetNodeKeyRef.current) {
|
|
@@ -16655,7 +16759,7 @@ function renderDefaultComponentsMenu(popupRef, targetNodeKeyRef, activeEditorRef
|
|
|
16655
16759
|
id: "heading-h3",
|
|
16656
16760
|
label: "Heading 3",
|
|
16657
16761
|
keywords: ["heading", "h3", "title"],
|
|
16658
|
-
Icon:
|
|
16762
|
+
Icon: import_lucide_react26.Heading3,
|
|
16659
16763
|
onClick: () => {
|
|
16660
16764
|
activeEditorRef.current?.update(() => {
|
|
16661
16765
|
if (targetNodeKeyRef.current) {
|
|
@@ -16687,7 +16791,7 @@ function renderDefaultComponentsMenu(popupRef, targetNodeKeyRef, activeEditorRef
|
|
|
16687
16791
|
"numbers",
|
|
16688
16792
|
"sequence"
|
|
16689
16793
|
],
|
|
16690
|
-
Icon:
|
|
16794
|
+
Icon: import_lucide_react26.ListOrdered,
|
|
16691
16795
|
onClick: () => {
|
|
16692
16796
|
activeEditorRef.current?.update(() => {
|
|
16693
16797
|
if (targetNodeKeyRef.current) {
|
|
@@ -16718,7 +16822,7 @@ function renderDefaultComponentsMenu(popupRef, targetNodeKeyRef, activeEditorRef
|
|
|
16718
16822
|
"bullets",
|
|
16719
16823
|
"points"
|
|
16720
16824
|
],
|
|
16721
|
-
Icon:
|
|
16825
|
+
Icon: import_lucide_react26.List,
|
|
16722
16826
|
onClick: () => {
|
|
16723
16827
|
activeEditorRef.current?.update(() => {
|
|
16724
16828
|
if (targetNodeKeyRef.current) {
|
|
@@ -16749,7 +16853,7 @@ function renderDefaultComponentsMenu(popupRef, targetNodeKeyRef, activeEditorRef
|
|
|
16749
16853
|
"hr",
|
|
16750
16854
|
"line"
|
|
16751
16855
|
],
|
|
16752
|
-
Icon:
|
|
16856
|
+
Icon: import_lucide_react26.SquareSplitVertical,
|
|
16753
16857
|
onClick: () => {
|
|
16754
16858
|
activeEditorRef.current?.update(() => {
|
|
16755
16859
|
if (targetNodeKeyRef.current) {
|
|
@@ -16772,14 +16876,14 @@ function renderDefaultComponentsMenu(popupRef, targetNodeKeyRef, activeEditorRef
|
|
|
16772
16876
|
}
|
|
16773
16877
|
|
|
16774
16878
|
// src/plugins/TypeaheadMenuPlugin/renderImageModuleMenu.tsx
|
|
16775
|
-
var
|
|
16879
|
+
var import_lucide_react27 = require("lucide-react");
|
|
16776
16880
|
function renderImageModuleMenu(popupRef, targetNodeKeyRef, activeEditorRef) {
|
|
16777
16881
|
return [
|
|
16778
16882
|
{
|
|
16779
16883
|
id: "image",
|
|
16780
16884
|
label: "Image",
|
|
16781
16885
|
keywords: ["image", "picture", "photo", "upload"],
|
|
16782
|
-
Icon:
|
|
16886
|
+
Icon: import_lucide_react27.ImageIcon,
|
|
16783
16887
|
onClick: () => {
|
|
16784
16888
|
if (targetNodeKeyRef.current) {
|
|
16785
16889
|
activeEditorRef.current?.dispatchCommand(
|
|
@@ -16796,7 +16900,7 @@ function renderImageModuleMenu(popupRef, targetNodeKeyRef, activeEditorRef) {
|
|
|
16796
16900
|
}
|
|
16797
16901
|
|
|
16798
16902
|
// src/plugins/TypeaheadMenuPlugin/renderQuestionsModuleMenu.tsx
|
|
16799
|
-
var
|
|
16903
|
+
var import_lucide_react28 = require("lucide-react");
|
|
16800
16904
|
function renderQuestionsModuleMenu(popupRef, targetNodeKeyRef, activeEditorRef) {
|
|
16801
16905
|
return [
|
|
16802
16906
|
{
|
|
@@ -16814,7 +16918,7 @@ function renderQuestionsModuleMenu(popupRef, targetNodeKeyRef, activeEditorRef)
|
|
|
16814
16918
|
"multiple response",
|
|
16815
16919
|
"question"
|
|
16816
16920
|
],
|
|
16817
|
-
Icon:
|
|
16921
|
+
Icon: import_lucide_react28.ListChecks,
|
|
16818
16922
|
onClick: () => {
|
|
16819
16923
|
if (targetNodeKeyRef.current) {
|
|
16820
16924
|
activeEditorRef.current?.dispatchCommand(
|
|
@@ -16833,7 +16937,7 @@ function renderQuestionsModuleMenu(popupRef, targetNodeKeyRef, activeEditorRef)
|
|
|
16833
16937
|
id: "multiple-choice",
|
|
16834
16938
|
label: "Multiple Choice",
|
|
16835
16939
|
keywords: ["multiple choice", "question"],
|
|
16836
|
-
Icon:
|
|
16940
|
+
Icon: import_lucide_react28.LayoutList,
|
|
16837
16941
|
onClick: () => {
|
|
16838
16942
|
if (targetNodeKeyRef.current) {
|
|
16839
16943
|
activeEditorRef.current?.dispatchCommand(
|
|
@@ -16852,7 +16956,7 @@ function renderQuestionsModuleMenu(popupRef, targetNodeKeyRef, activeEditorRef)
|
|
|
16852
16956
|
id: "short-answer-question",
|
|
16853
16957
|
label: "Short Answer",
|
|
16854
16958
|
keywords: ["short answer", "question"],
|
|
16855
|
-
Icon:
|
|
16959
|
+
Icon: import_lucide_react28.FileQuestion,
|
|
16856
16960
|
onClick: () => {
|
|
16857
16961
|
if (targetNodeKeyRef.current) {
|
|
16858
16962
|
activeEditorRef.current?.dispatchCommand(
|
|
@@ -16875,7 +16979,7 @@ function renderQuestionsModuleMenu(popupRef, targetNodeKeyRef, activeEditorRef)
|
|
|
16875
16979
|
"associate",
|
|
16876
16980
|
"question"
|
|
16877
16981
|
],
|
|
16878
|
-
Icon:
|
|
16982
|
+
Icon: import_lucide_react28.ArrowRightLeft,
|
|
16879
16983
|
onClick: () => {
|
|
16880
16984
|
if (targetNodeKeyRef.current) {
|
|
16881
16985
|
activeEditorRef.current?.dispatchCommand(
|
|
@@ -16898,7 +17002,7 @@ function renderQuestionsModuleMenu(popupRef, targetNodeKeyRef, activeEditorRef)
|
|
|
16898
17002
|
"complete sentence",
|
|
16899
17003
|
"question"
|
|
16900
17004
|
],
|
|
16901
|
-
Icon:
|
|
17005
|
+
Icon: import_lucide_react28.Space,
|
|
16902
17006
|
onClick: () => {
|
|
16903
17007
|
if (targetNodeKeyRef.current) {
|
|
16904
17008
|
activeEditorRef.current?.dispatchCommand(
|
|
@@ -16916,7 +17020,7 @@ function renderQuestionsModuleMenu(popupRef, targetNodeKeyRef, activeEditorRef)
|
|
|
16916
17020
|
id: "journal-entry-question",
|
|
16917
17021
|
label: "Journal Entry",
|
|
16918
17022
|
keywords: ["journal entry", "question", ""],
|
|
16919
|
-
Icon:
|
|
17023
|
+
Icon: import_lucide_react28.Calculator,
|
|
16920
17024
|
onClick: () => {
|
|
16921
17025
|
if (targetNodeKeyRef.current) {
|
|
16922
17026
|
activeEditorRef.current?.dispatchCommand(
|
|
@@ -16934,7 +17038,7 @@ function renderQuestionsModuleMenu(popupRef, targetNodeKeyRef, activeEditorRef)
|
|
|
16934
17038
|
}
|
|
16935
17039
|
|
|
16936
17040
|
// src/plugins/TypeaheadMenuPlugin/renderTableModuleMenu.tsx
|
|
16937
|
-
var
|
|
17041
|
+
var import_lucide_react29 = require("lucide-react");
|
|
16938
17042
|
function renderTableModuleMenu(popupRef, targetNodeKeyRef, activeEditorRef) {
|
|
16939
17043
|
return [
|
|
16940
17044
|
{
|
|
@@ -16953,7 +17057,7 @@ function renderTableModuleMenu(popupRef, targetNodeKeyRef, activeEditorRef) {
|
|
|
16953
17057
|
"data",
|
|
16954
17058
|
"spreadsheet"
|
|
16955
17059
|
],
|
|
16956
|
-
Icon:
|
|
17060
|
+
Icon: import_lucide_react29.Table2,
|
|
16957
17061
|
onClick: () => {
|
|
16958
17062
|
if (targetNodeKeyRef.current) {
|
|
16959
17063
|
activeEditorRef.current?.dispatchCommand(
|
|
@@ -17012,7 +17116,7 @@ var import_react99 = require("react");
|
|
|
17012
17116
|
// src/plugins/TypeaheadMenuPlugin/renderFillInTheBlankMenu.tsx
|
|
17013
17117
|
var import_list15 = require("@lexical/list");
|
|
17014
17118
|
var import_lexical98 = require("lexical");
|
|
17015
|
-
var
|
|
17119
|
+
var import_lucide_react30 = require("lucide-react");
|
|
17016
17120
|
function renderFillInTheBlankMenu(popupRef, targetNodeKeyRef, activeEditorRef) {
|
|
17017
17121
|
return [
|
|
17018
17122
|
{
|
|
@@ -17030,7 +17134,7 @@ function renderFillInTheBlankMenu(popupRef, targetNodeKeyRef, activeEditorRef) {
|
|
|
17030
17134
|
"numbers",
|
|
17031
17135
|
"sequence"
|
|
17032
17136
|
],
|
|
17033
|
-
Icon:
|
|
17137
|
+
Icon: import_lucide_react30.ListOrdered,
|
|
17034
17138
|
onClick: () => {
|
|
17035
17139
|
activeEditorRef.current?.update(() => {
|
|
17036
17140
|
if (targetNodeKeyRef.current) {
|
|
@@ -17061,7 +17165,7 @@ function renderFillInTheBlankMenu(popupRef, targetNodeKeyRef, activeEditorRef) {
|
|
|
17061
17165
|
"bullets",
|
|
17062
17166
|
"points"
|
|
17063
17167
|
],
|
|
17064
|
-
Icon:
|
|
17168
|
+
Icon: import_lucide_react30.List,
|
|
17065
17169
|
onClick: () => {
|
|
17066
17170
|
activeEditorRef.current?.update(() => {
|
|
17067
17171
|
if (targetNodeKeyRef.current) {
|
|
@@ -17098,7 +17202,7 @@ function renderFillInTheBlankMenu(popupRef, targetNodeKeyRef, activeEditorRef) {
|
|
|
17098
17202
|
"data",
|
|
17099
17203
|
"spreadsheet"
|
|
17100
17204
|
],
|
|
17101
|
-
Icon:
|
|
17205
|
+
Icon: import_lucide_react30.Table2,
|
|
17102
17206
|
onClick: () => {
|
|
17103
17207
|
if (targetNodeKeyRef.current) {
|
|
17104
17208
|
activeEditorRef.current?.dispatchCommand(
|
|
@@ -17116,7 +17220,7 @@ function renderFillInTheBlankMenu(popupRef, targetNodeKeyRef, activeEditorRef) {
|
|
|
17116
17220
|
}
|
|
17117
17221
|
|
|
17118
17222
|
// src/plugins/TypeaheadMenuPlugin/TypeaheadMenuPlugin.tsx
|
|
17119
|
-
var
|
|
17223
|
+
var import_jsx_runtime119 = require("react/jsx-runtime");
|
|
17120
17224
|
function TypeaheadMenuPlugin() {
|
|
17121
17225
|
const { hasModule, modulesNumber } = useBlockEditor();
|
|
17122
17226
|
const [editor] = (0, import_LexicalComposerContext65.useLexicalComposerContext)();
|
|
@@ -17399,7 +17503,7 @@ function TypeaheadMenuPlugin() {
|
|
|
17399
17503
|
}
|
|
17400
17504
|
return menuItems;
|
|
17401
17505
|
}, [editor, modulesNumber, activeDecorator]);
|
|
17402
|
-
return /* @__PURE__ */ (0,
|
|
17506
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
17403
17507
|
PopupMenu,
|
|
17404
17508
|
{
|
|
17405
17509
|
ref: popupRef,
|
|
@@ -18109,7 +18213,7 @@ var defaultThemeSettings = {
|
|
|
18109
18213
|
};
|
|
18110
18214
|
|
|
18111
18215
|
// src/theme/ThemeProvider.tsx
|
|
18112
|
-
var
|
|
18216
|
+
var import_jsx_runtime120 = require("react/jsx-runtime");
|
|
18113
18217
|
var ThemeContext = (0, import_react100.createContext)(
|
|
18114
18218
|
void 0
|
|
18115
18219
|
);
|
|
@@ -18142,7 +18246,7 @@ function ThemeProvider({
|
|
|
18142
18246
|
);
|
|
18143
18247
|
rootElementRef.current?.classList.add(`theme-${effectiveTheme}`);
|
|
18144
18248
|
}, [effectiveTheme]);
|
|
18145
|
-
return /* @__PURE__ */ (0,
|
|
18249
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(ThemeContext.Provider, { value: { theme, effectiveTheme }, children: /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(
|
|
18146
18250
|
"article",
|
|
18147
18251
|
{
|
|
18148
18252
|
ref: rootElementRef,
|
|
@@ -18159,7 +18263,7 @@ function ThemeProvider({
|
|
|
18159
18263
|
)
|
|
18160
18264
|
},
|
|
18161
18265
|
children: [
|
|
18162
|
-
/* @__PURE__ */ (0,
|
|
18266
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
18163
18267
|
"style",
|
|
18164
18268
|
{
|
|
18165
18269
|
dangerouslySetInnerHTML: {
|
|
@@ -18175,14 +18279,14 @@ function ThemeProvider({
|
|
|
18175
18279
|
|
|
18176
18280
|
// src/BlockEditor.tsx
|
|
18177
18281
|
var import_LexicalComposer = require("@lexical/react/LexicalComposer");
|
|
18178
|
-
var
|
|
18179
|
-
var
|
|
18282
|
+
var import_LexicalErrorBoundary10 = require("@lexical/react/LexicalErrorBoundary");
|
|
18283
|
+
var import_LexicalHistoryPlugin11 = require("@lexical/react/LexicalHistoryPlugin");
|
|
18180
18284
|
var import_LexicalListPlugin2 = require("@lexical/react/LexicalListPlugin");
|
|
18181
18285
|
var import_LexicalOnChangePlugin = require("@lexical/react/LexicalOnChangePlugin");
|
|
18182
|
-
var
|
|
18286
|
+
var import_LexicalRichTextPlugin8 = require("@lexical/react/LexicalRichTextPlugin");
|
|
18183
18287
|
var import_LexicalTabIndentationPlugin2 = require("@lexical/react/LexicalTabIndentationPlugin");
|
|
18184
18288
|
var import_react101 = __toESM(require("react"));
|
|
18185
|
-
var
|
|
18289
|
+
var import_jsx_runtime121 = require("react/jsx-runtime");
|
|
18186
18290
|
var TOGGLE_EDITING_MODE = "TOGGLE_EDITING_MODE";
|
|
18187
18291
|
var RESET_EDITING_MODE = "RESET_EDITING_MODE";
|
|
18188
18292
|
var BlockEditorContext = import_react101.default.createContext(null);
|
|
@@ -18296,7 +18400,7 @@ function BlockEditor(props) {
|
|
|
18296
18400
|
);
|
|
18297
18401
|
};
|
|
18298
18402
|
}, []);
|
|
18299
|
-
return /* @__PURE__ */ (0,
|
|
18403
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
18300
18404
|
BlockEditorContext.Provider,
|
|
18301
18405
|
{
|
|
18302
18406
|
value: {
|
|
@@ -18352,62 +18456,62 @@ function BlockEditor(props) {
|
|
|
18352
18456
|
},
|
|
18353
18457
|
drawer: drawerRef.current,
|
|
18354
18458
|
isBlockEditorReady,
|
|
18355
|
-
renderSettings: renderSettings ? renderSettings : () => /* @__PURE__ */ (0,
|
|
18459
|
+
renderSettings: renderSettings ? renderSettings : () => /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", {})
|
|
18356
18460
|
},
|
|
18357
|
-
children: /* @__PURE__ */ (0,
|
|
18358
|
-
/* @__PURE__ */ (0,
|
|
18461
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(ResizeObserver, { children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(ThemeProvider, { theme, themeSettings, children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(SharedHistoryContext, { children: /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(NodeProvider, { children: [
|
|
18462
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
18359
18463
|
"main",
|
|
18360
18464
|
{
|
|
18361
18465
|
className: `${settingsPanelSwitch === "on" ? "narrow" : ""}`,
|
|
18362
|
-
children: /* @__PURE__ */ (0,
|
|
18363
|
-
/* @__PURE__ */ (0,
|
|
18466
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(import_LexicalComposer.LexicalComposer, { initialConfig: { ...initialConfig }, children: [
|
|
18467
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
18364
18468
|
EditorRefPlugin,
|
|
18365
18469
|
{
|
|
18366
18470
|
onMountRef: (editor) => editorRef.current = editor
|
|
18367
18471
|
}
|
|
18368
18472
|
),
|
|
18369
|
-
/* @__PURE__ */ (0,
|
|
18370
|
-
/* @__PURE__ */ (0,
|
|
18371
|
-
/* @__PURE__ */ (0,
|
|
18372
|
-
|
|
18473
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(AutoFocusPlugin, {}),
|
|
18474
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(AutoBottomParagraphPlugin, {}),
|
|
18475
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
18476
|
+
import_LexicalHistoryPlugin11.HistoryPlugin,
|
|
18373
18477
|
{
|
|
18374
18478
|
externalHistoryState: historyState
|
|
18375
18479
|
}
|
|
18376
18480
|
),
|
|
18377
|
-
/* @__PURE__ */ (0,
|
|
18481
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
18378
18482
|
import_LexicalOnChangePlugin.OnChangePlugin,
|
|
18379
18483
|
{
|
|
18380
18484
|
onChange: handleChange,
|
|
18381
18485
|
ignoreSelectionChange: true
|
|
18382
18486
|
}
|
|
18383
18487
|
),
|
|
18384
|
-
/* @__PURE__ */ (0,
|
|
18385
|
-
/* @__PURE__ */ (0,
|
|
18386
|
-
|
|
18488
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(OnNestedChangePlugin, { onChange: handleChange }),
|
|
18489
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
18490
|
+
import_LexicalRichTextPlugin8.RichTextPlugin,
|
|
18387
18491
|
{
|
|
18388
|
-
contentEditable: /* @__PURE__ */ (0,
|
|
18492
|
+
contentEditable: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(ContentEditable, {}),
|
|
18389
18493
|
placeholder: null,
|
|
18390
|
-
ErrorBoundary:
|
|
18494
|
+
ErrorBoundary: import_LexicalErrorBoundary10.LexicalErrorBoundary
|
|
18391
18495
|
}
|
|
18392
18496
|
),
|
|
18393
|
-
/* @__PURE__ */ (0,
|
|
18394
|
-
/* @__PURE__ */ (0,
|
|
18395
|
-
/* @__PURE__ */ (0,
|
|
18396
|
-
/* @__PURE__ */ (0,
|
|
18497
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(NodePastePlugin, {}),
|
|
18498
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_LexicalListPlugin2.ListPlugin, {}),
|
|
18499
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(ListLevelLimitPlugin, {}),
|
|
18500
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_LexicalTabIndentationPlugin2.TabIndentationPlugin, {}),
|
|
18397
18501
|
children,
|
|
18398
|
-
/* @__PURE__ */ (0,
|
|
18399
|
-
/* @__PURE__ */ (0,
|
|
18400
|
-
/* @__PURE__ */ (0,
|
|
18401
|
-
/* @__PURE__ */ (0,
|
|
18402
|
-
/* @__PURE__ */ (0,
|
|
18403
|
-
/* @__PURE__ */ (0,
|
|
18404
|
-
/* @__PURE__ */ (0,
|
|
18405
|
-
/* @__PURE__ */ (0,
|
|
18406
|
-
/* @__PURE__ */ (0,
|
|
18502
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(TypeaheadMenuPlugin, {}),
|
|
18503
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(TypeaheadMenuAgentPlugin, {}),
|
|
18504
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(NodeMouseAnchorPlugin, {}),
|
|
18505
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(NodeMousePlugin, {}),
|
|
18506
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(TextToolbarPlugin, {}),
|
|
18507
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(TextToolbarAgentPlugin, {}),
|
|
18508
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(TypeaheadVariableAgentPlugin, {}),
|
|
18509
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(VariableComponentPlugin, {}),
|
|
18510
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(MarkdownPlugin, {})
|
|
18407
18511
|
] })
|
|
18408
18512
|
}
|
|
18409
18513
|
),
|
|
18410
|
-
/* @__PURE__ */ (0,
|
|
18514
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(Drawer, { ref: drawerRef })
|
|
18411
18515
|
] }) }) }) })
|
|
18412
18516
|
}
|
|
18413
18517
|
);
|
|
@@ -18423,30 +18527,30 @@ var useBlockEditor = () => {
|
|
|
18423
18527
|
};
|
|
18424
18528
|
|
|
18425
18529
|
// src/BlockEditorStyle.tsx
|
|
18426
|
-
var
|
|
18530
|
+
var import_jsx_runtime122 = require("react/jsx-runtime");
|
|
18427
18531
|
function BlockEditorStyle(props) {
|
|
18428
18532
|
const { children, theme, themeSettings } = props;
|
|
18429
|
-
return /* @__PURE__ */ (0,
|
|
18533
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(ThemeProvider, { theme, themeSettings, children });
|
|
18430
18534
|
}
|
|
18431
18535
|
|
|
18432
18536
|
// src/modules/Callout.tsx
|
|
18433
18537
|
var import_react102 = require("react");
|
|
18434
|
-
var
|
|
18538
|
+
var import_jsx_runtime123 = require("react/jsx-runtime");
|
|
18435
18539
|
function Callout() {
|
|
18436
18540
|
const { registerModule } = useBlockEditor();
|
|
18437
18541
|
(0, import_react102.useEffect)(() => {
|
|
18438
18542
|
registerModule("Callout");
|
|
18439
18543
|
}, [registerModule]);
|
|
18440
|
-
return /* @__PURE__ */ (0,
|
|
18544
|
+
return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(CalloutBoxPlugin, {});
|
|
18441
18545
|
}
|
|
18442
18546
|
|
|
18443
18547
|
// src/plugins/TreeViewPlugin/index.tsx
|
|
18444
18548
|
var import_LexicalComposerContext66 = require("@lexical/react/LexicalComposerContext");
|
|
18445
18549
|
var import_LexicalTreeView = require("@lexical/react/LexicalTreeView");
|
|
18446
|
-
var
|
|
18550
|
+
var import_jsx_runtime124 = require("react/jsx-runtime");
|
|
18447
18551
|
function TreeViewPlugin() {
|
|
18448
18552
|
const [editor] = (0, import_LexicalComposerContext66.useLexicalComposerContext)();
|
|
18449
|
-
return /* @__PURE__ */ (0,
|
|
18553
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
18450
18554
|
import_LexicalTreeView.TreeView,
|
|
18451
18555
|
{
|
|
18452
18556
|
viewClassName: "tree-view-output",
|
|
@@ -18462,25 +18566,25 @@ function TreeViewPlugin() {
|
|
|
18462
18566
|
|
|
18463
18567
|
// src/modules/Debug.tsx
|
|
18464
18568
|
var import_react103 = require("react");
|
|
18465
|
-
var
|
|
18569
|
+
var import_jsx_runtime125 = require("react/jsx-runtime");
|
|
18466
18570
|
function Debug() {
|
|
18467
18571
|
const { registerModule } = useBlockEditor();
|
|
18468
18572
|
(0, import_react103.useEffect)(() => {
|
|
18469
18573
|
registerModule("Debug");
|
|
18470
18574
|
}, [registerModule]);
|
|
18471
|
-
return /* @__PURE__ */ (0,
|
|
18575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(TreeViewPlugin, {});
|
|
18472
18576
|
}
|
|
18473
18577
|
|
|
18474
18578
|
// src/modules/Image.tsx
|
|
18475
18579
|
var import_react104 = require("react");
|
|
18476
|
-
var
|
|
18580
|
+
var import_jsx_runtime126 = require("react/jsx-runtime");
|
|
18477
18581
|
function Image(props) {
|
|
18478
18582
|
const { imageSettings } = props;
|
|
18479
18583
|
const { registerModule } = useBlockEditor();
|
|
18480
18584
|
(0, import_react104.useEffect)(() => {
|
|
18481
18585
|
registerModule("Image");
|
|
18482
18586
|
}, [registerModule]);
|
|
18483
|
-
return /* @__PURE__ */ (0,
|
|
18587
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_jsx_runtime126.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(ImagePlugin, { imageSettings }) });
|
|
18484
18588
|
}
|
|
18485
18589
|
|
|
18486
18590
|
// src/plugins/LinkToolbarPlugin/LinkToolbarPlugin.tsx
|
|
@@ -18489,9 +18593,9 @@ var import_LexicalComposerContext67 = require("@lexical/react/LexicalComposerCon
|
|
|
18489
18593
|
var import_utils35 = require("@lexical/utils");
|
|
18490
18594
|
var import_lexical100 = require("lexical");
|
|
18491
18595
|
var import_debounce7 = __toESM(require("lodash-es/debounce"));
|
|
18492
|
-
var
|
|
18596
|
+
var import_lucide_react31 = require("lucide-react");
|
|
18493
18597
|
var import_react105 = require("react");
|
|
18494
|
-
var
|
|
18598
|
+
var import_jsx_runtime127 = require("react/jsx-runtime");
|
|
18495
18599
|
function LinkToolbarPlugin() {
|
|
18496
18600
|
const [editor] = (0, import_LexicalComposerContext67.useLexicalComposerContext)();
|
|
18497
18601
|
const popupToolbarRef = (0, import_react105.useRef)(null);
|
|
@@ -18601,12 +18705,12 @@ function LinkToolbarPlugin() {
|
|
|
18601
18705
|
}, [editor]);
|
|
18602
18706
|
const linkUrl = linkNode?.linkUrl;
|
|
18603
18707
|
const linkTitle = linkNode?.linkUrl;
|
|
18604
|
-
return /* @__PURE__ */ (0,
|
|
18708
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
18605
18709
|
PopupToolbar,
|
|
18606
18710
|
{
|
|
18607
18711
|
ref: popupToolbarRef,
|
|
18608
18712
|
onEscape: handleClose,
|
|
18609
|
-
toolbar: /* @__PURE__ */ (0,
|
|
18713
|
+
toolbar: /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
|
|
18610
18714
|
"div",
|
|
18611
18715
|
{
|
|
18612
18716
|
style: {
|
|
@@ -18619,29 +18723,29 @@ function LinkToolbarPlugin() {
|
|
|
18619
18723
|
padding: "var(--sl-spacing-2x-small) var(--sl-spacing-x-small) var(--sl-spacing-2x-small) var(--sl-spacing-medium)"
|
|
18620
18724
|
},
|
|
18621
18725
|
children: [
|
|
18622
|
-
/* @__PURE__ */ (0,
|
|
18726
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("a", { href: linkUrl, target: linkNode?.linkTarget || "", children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
18623
18727
|
"sl-tooltip",
|
|
18624
18728
|
{
|
|
18625
18729
|
style: { "--show-delay": "1800" },
|
|
18626
18730
|
hoist: true,
|
|
18627
18731
|
content: linkUrl || "[Empty URL]",
|
|
18628
|
-
children: /* @__PURE__ */ (0,
|
|
18732
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("span", { className: "line-short-20", children: linkTitle })
|
|
18629
18733
|
}
|
|
18630
18734
|
) }) }),
|
|
18631
|
-
/* @__PURE__ */ (0,
|
|
18632
|
-
/* @__PURE__ */ (0,
|
|
18735
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(Stack, { className: "stack__row", children: [
|
|
18736
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
18633
18737
|
"sl-tooltip",
|
|
18634
18738
|
{
|
|
18635
18739
|
style: { "--show-delay": "1800" },
|
|
18636
18740
|
hoist: "hoist",
|
|
18637
18741
|
content: "Edit Link",
|
|
18638
|
-
children: /* @__PURE__ */ (0,
|
|
18742
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
18639
18743
|
Button,
|
|
18640
18744
|
{
|
|
18641
18745
|
size: "small",
|
|
18642
18746
|
variant: "text",
|
|
18643
18747
|
label: "",
|
|
18644
|
-
StartIcon:
|
|
18748
|
+
StartIcon: import_lucide_react31.Pencil,
|
|
18645
18749
|
onClick: () => {
|
|
18646
18750
|
if (activeEditorRef.current) {
|
|
18647
18751
|
activeEditorRef.current.update(() => {
|
|
@@ -18674,19 +18778,19 @@ function LinkToolbarPlugin() {
|
|
|
18674
18778
|
)
|
|
18675
18779
|
}
|
|
18676
18780
|
) }),
|
|
18677
|
-
/* @__PURE__ */ (0,
|
|
18781
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
18678
18782
|
"sl-tooltip",
|
|
18679
18783
|
{
|
|
18680
18784
|
style: { "--show-delay": "1800" },
|
|
18681
18785
|
hoist: "hoist",
|
|
18682
18786
|
content: "Remove Link",
|
|
18683
|
-
children: /* @__PURE__ */ (0,
|
|
18787
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
18684
18788
|
Button,
|
|
18685
18789
|
{
|
|
18686
18790
|
size: "small",
|
|
18687
18791
|
variant: "text",
|
|
18688
18792
|
label: "",
|
|
18689
|
-
StartIcon:
|
|
18793
|
+
StartIcon: import_lucide_react31.Trash2,
|
|
18690
18794
|
onClick: () => {
|
|
18691
18795
|
if (activeEditorRef.current) {
|
|
18692
18796
|
activeEditorRef.current.update(() => {
|
|
@@ -18715,19 +18819,19 @@ function LinkToolbarPlugin() {
|
|
|
18715
18819
|
)
|
|
18716
18820
|
}
|
|
18717
18821
|
) }),
|
|
18718
|
-
/* @__PURE__ */ (0,
|
|
18822
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
18719
18823
|
"sl-tooltip",
|
|
18720
18824
|
{
|
|
18721
18825
|
style: { "--show-delay": "1800" },
|
|
18722
18826
|
hoist: "hoist",
|
|
18723
18827
|
content: "Close",
|
|
18724
|
-
children: /* @__PURE__ */ (0,
|
|
18828
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
18725
18829
|
Button,
|
|
18726
18830
|
{
|
|
18727
18831
|
size: "small",
|
|
18728
18832
|
variant: "text",
|
|
18729
18833
|
label: "",
|
|
18730
|
-
StartIcon:
|
|
18834
|
+
StartIcon: import_lucide_react31.X,
|
|
18731
18835
|
onClick: handleClose
|
|
18732
18836
|
}
|
|
18733
18837
|
)
|
|
@@ -18744,15 +18848,15 @@ function LinkToolbarPlugin() {
|
|
|
18744
18848
|
|
|
18745
18849
|
// src/modules/Link.tsx
|
|
18746
18850
|
var import_react106 = require("react");
|
|
18747
|
-
var
|
|
18851
|
+
var import_jsx_runtime128 = require("react/jsx-runtime");
|
|
18748
18852
|
function Link() {
|
|
18749
18853
|
const { registerModule } = useBlockEditor();
|
|
18750
18854
|
(0, import_react106.useEffect)(() => {
|
|
18751
18855
|
registerModule("Link");
|
|
18752
18856
|
}, [registerModule]);
|
|
18753
|
-
return /* @__PURE__ */ (0,
|
|
18754
|
-
/* @__PURE__ */ (0,
|
|
18755
|
-
/* @__PURE__ */ (0,
|
|
18857
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(import_jsx_runtime128.Fragment, { children: [
|
|
18858
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(LinkEditorPlugin, {}),
|
|
18859
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(LinkToolbarPlugin, {})
|
|
18756
18860
|
] });
|
|
18757
18861
|
}
|
|
18758
18862
|
|
|
@@ -18761,7 +18865,7 @@ var import_LexicalComposerContext68 = require("@lexical/react/LexicalComposerCon
|
|
|
18761
18865
|
var import_utils36 = require("@lexical/utils");
|
|
18762
18866
|
var import_lexical101 = require("lexical");
|
|
18763
18867
|
var import_react107 = require("react");
|
|
18764
|
-
var
|
|
18868
|
+
var import_jsx_runtime129 = require("react/jsx-runtime");
|
|
18765
18869
|
var INSERT_ESSAY_QUESTION_COMMAND = (0, import_lexical101.createCommand)("INSERT_ESSAY_QUESTION_COMMAND");
|
|
18766
18870
|
function EssayQuestionPlugin() {
|
|
18767
18871
|
const [editor] = (0, import_LexicalComposerContext68.useLexicalComposerContext)();
|
|
@@ -18799,7 +18903,7 @@ function EssayQuestionPlugin() {
|
|
|
18799
18903
|
)
|
|
18800
18904
|
);
|
|
18801
18905
|
}, [editor]);
|
|
18802
|
-
return /* @__PURE__ */ (0,
|
|
18906
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_jsx_runtime129.Fragment, {});
|
|
18803
18907
|
}
|
|
18804
18908
|
|
|
18805
18909
|
// src/plugins/FinancialStatementQuestionPlugin/FinancialStatementQuestionSettings.tsx
|
|
@@ -18827,7 +18931,7 @@ function validatePointsInput6(input) {
|
|
|
18827
18931
|
}
|
|
18828
18932
|
|
|
18829
18933
|
// src/plugins/FinancialStatementQuestionPlugin/FinancialStatementQuestionSettings.tsx
|
|
18830
|
-
var
|
|
18934
|
+
var import_jsx_runtime130 = require("react/jsx-runtime");
|
|
18831
18935
|
function FinancialStatementQuestionSettings(props) {
|
|
18832
18936
|
const { nodeKey } = props;
|
|
18833
18937
|
const [editor] = (0, import_LexicalComposerContext69.useLexicalComposerContext)();
|
|
@@ -18846,7 +18950,7 @@ function FinancialStatementQuestionSettings(props) {
|
|
|
18846
18950
|
if (!foundNode) {
|
|
18847
18951
|
return null;
|
|
18848
18952
|
}
|
|
18849
|
-
return /* @__PURE__ */ (0,
|
|
18953
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
18850
18954
|
TextInput,
|
|
18851
18955
|
{
|
|
18852
18956
|
ref: pointsTextInputRef,
|
|
@@ -18880,7 +18984,7 @@ var import_LexicalComposerContext70 = require("@lexical/react/LexicalComposerCon
|
|
|
18880
18984
|
var import_utils37 = require("@lexical/utils");
|
|
18881
18985
|
var import_lexical103 = require("lexical");
|
|
18882
18986
|
var import_react109 = require("react");
|
|
18883
|
-
var
|
|
18987
|
+
var import_jsx_runtime131 = require("react/jsx-runtime");
|
|
18884
18988
|
var INSERT_FINANCIAL_STATEMENT_QUESTION_COMMAND = (0, import_lexical103.createCommand)("INSERT_FINANCIAL_STATEMENT_QUESTION_COMMAND");
|
|
18885
18989
|
function FinancialStatementQuestionPlugin() {
|
|
18886
18990
|
const {
|
|
@@ -18945,21 +19049,21 @@ function FinancialStatementQuestionPlugin() {
|
|
|
18945
19049
|
}
|
|
18946
19050
|
}
|
|
18947
19051
|
}, [isBlockEditorReady]);
|
|
18948
|
-
return /* @__PURE__ */ (0,
|
|
18949
|
-
drawer && /* @__PURE__ */ (0,
|
|
19052
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(import_jsx_runtime131.Fragment, { children: [
|
|
19053
|
+
drawer && /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
18950
19054
|
StickyToPosition,
|
|
18951
19055
|
{
|
|
18952
19056
|
ref: settingsPanelStickyRef,
|
|
18953
19057
|
container: drawer,
|
|
18954
19058
|
children: (data, position, isVisible) => {
|
|
18955
|
-
return /* @__PURE__ */ (0,
|
|
19059
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)("div", { style: { width: position.width }, children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
18956
19060
|
SettingsCard,
|
|
18957
19061
|
{
|
|
18958
19062
|
isVisible: !!isVisible,
|
|
18959
19063
|
container: drawer,
|
|
18960
19064
|
title: "Financial Statement Settings",
|
|
18961
19065
|
onClose: toggleSettingsPanelSwitch,
|
|
18962
|
-
children: isVisible && /* @__PURE__ */ (0,
|
|
19066
|
+
children: isVisible && /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
18963
19067
|
FinancialStatementQuestionSettings,
|
|
18964
19068
|
{
|
|
18965
19069
|
nodeKey: data.nodeKey
|
|
@@ -18971,32 +19075,32 @@ function FinancialStatementQuestionPlugin() {
|
|
|
18971
19075
|
}
|
|
18972
19076
|
}
|
|
18973
19077
|
),
|
|
18974
|
-
/* @__PURE__ */ (0,
|
|
19078
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(FillInTheBlankSpaceSettingsPlugin, {})
|
|
18975
19079
|
] });
|
|
18976
19080
|
}
|
|
18977
19081
|
|
|
18978
19082
|
// src/modules/Questions.tsx
|
|
18979
19083
|
var import_react110 = require("react");
|
|
18980
|
-
var
|
|
19084
|
+
var import_jsx_runtime132 = require("react/jsx-runtime");
|
|
18981
19085
|
function Questions() {
|
|
18982
19086
|
const { registerModule } = useBlockEditor();
|
|
18983
19087
|
(0, import_react110.useEffect)(() => {
|
|
18984
19088
|
registerModule("Questions");
|
|
18985
19089
|
}, [registerModule]);
|
|
18986
|
-
return /* @__PURE__ */ (0,
|
|
18987
|
-
/* @__PURE__ */ (0,
|
|
18988
|
-
/* @__PURE__ */ (0,
|
|
18989
|
-
/* @__PURE__ */ (0,
|
|
18990
|
-
/* @__PURE__ */ (0,
|
|
18991
|
-
/* @__PURE__ */ (0,
|
|
18992
|
-
/* @__PURE__ */ (0,
|
|
18993
|
-
/* @__PURE__ */ (0,
|
|
19090
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(import_jsx_runtime132.Fragment, { children: [
|
|
19091
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(MultipleOptionQuestionPlugin, {}),
|
|
19092
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(ShortAnswerQuestionPlugin, {}),
|
|
19093
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(MatchingQuestionPlugin, {}),
|
|
19094
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(FillInTheBlankQuestionPlugin, {}),
|
|
19095
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(JournalEntryQuestionPlugin, {}),
|
|
19096
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(FinancialStatementQuestionPlugin, {}),
|
|
19097
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(EssayQuestionPlugin, {})
|
|
18994
19098
|
] });
|
|
18995
19099
|
}
|
|
18996
19100
|
|
|
18997
19101
|
// src/modules/SettingsPanel.tsx
|
|
18998
19102
|
var import_react111 = require("react");
|
|
18999
|
-
var
|
|
19103
|
+
var import_jsx_runtime133 = require("react/jsx-runtime");
|
|
19000
19104
|
function SettingsPanel(props) {
|
|
19001
19105
|
const { defaultOpen = true } = props;
|
|
19002
19106
|
const { registerModule, openSettingsPanel } = useBlockEditor();
|
|
@@ -19008,7 +19112,7 @@ function SettingsPanel(props) {
|
|
|
19008
19112
|
}
|
|
19009
19113
|
}, 50);
|
|
19010
19114
|
}, [registerModule, defaultOpen, openSettingsPanel]);
|
|
19011
|
-
return /* @__PURE__ */ (0,
|
|
19115
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(SettingsPanelPlugin, {});
|
|
19012
19116
|
}
|
|
19013
19117
|
|
|
19014
19118
|
// src/plugins/VariablesPlugin/VariableSettingsPlugin.tsx
|
|
@@ -19017,9 +19121,9 @@ var import_react113 = require("react");
|
|
|
19017
19121
|
// src/plugins/VariablesPlugin/VariableSettings.tsx
|
|
19018
19122
|
var import_LexicalComposerContext71 = require("@lexical/react/LexicalComposerContext");
|
|
19019
19123
|
var import_lexical104 = require("lexical");
|
|
19020
|
-
var
|
|
19124
|
+
var import_lucide_react32 = require("lucide-react");
|
|
19021
19125
|
var import_react112 = require("react");
|
|
19022
|
-
var
|
|
19126
|
+
var import_jsx_runtime134 = require("react/jsx-runtime");
|
|
19023
19127
|
var controlGridStyle = {
|
|
19024
19128
|
width: "100%",
|
|
19025
19129
|
display: "flex",
|
|
@@ -19241,8 +19345,8 @@ function VariableSettings(props) {
|
|
|
19241
19345
|
if (!currentVariableNode) {
|
|
19242
19346
|
return null;
|
|
19243
19347
|
}
|
|
19244
|
-
return /* @__PURE__ */ (0,
|
|
19245
|
-
/* @__PURE__ */ (0,
|
|
19348
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)(import_jsx_runtime134.Fragment, { children: [
|
|
19349
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { style: formFieldStyle, children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
19246
19350
|
Button,
|
|
19247
19351
|
{
|
|
19248
19352
|
className: "button__fullwidth",
|
|
@@ -19261,10 +19365,10 @@ function VariableSettings(props) {
|
|
|
19261
19365
|
variant: "default"
|
|
19262
19366
|
}
|
|
19263
19367
|
) }),
|
|
19264
|
-
/* @__PURE__ */ (0,
|
|
19265
|
-
/* @__PURE__ */ (0,
|
|
19266
|
-
/* @__PURE__ */ (0,
|
|
19267
|
-
/* @__PURE__ */ (0,
|
|
19368
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("div", { style: formFieldStyle, children: [
|
|
19369
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { style: formFieldLabel, children: "Name" }),
|
|
19370
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("div", { style: controlGridStyle, children: [
|
|
19371
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { style: { flexGrow: 1 }, children: isSettingsEditingMode ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
19268
19372
|
"form",
|
|
19269
19373
|
{
|
|
19270
19374
|
onSubmit: (e) => {
|
|
@@ -19272,7 +19376,7 @@ function VariableSettings(props) {
|
|
|
19272
19376
|
e.preventDefault();
|
|
19273
19377
|
updateVariableName();
|
|
19274
19378
|
},
|
|
19275
|
-
children: /* @__PURE__ */ (0,
|
|
19379
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
19276
19380
|
TextInput,
|
|
19277
19381
|
{
|
|
19278
19382
|
ref: variableNameInputRef,
|
|
@@ -19284,7 +19388,7 @@ function VariableSettings(props) {
|
|
|
19284
19388
|
}
|
|
19285
19389
|
)
|
|
19286
19390
|
}
|
|
19287
|
-
) : /* @__PURE__ */ (0,
|
|
19391
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
19288
19392
|
DropdownButton,
|
|
19289
19393
|
{
|
|
19290
19394
|
className: "button__fullwidth button__left_aligned",
|
|
@@ -19297,18 +19401,18 @@ function VariableSettings(props) {
|
|
|
19297
19401
|
menu: variablesMenu
|
|
19298
19402
|
}
|
|
19299
19403
|
) }),
|
|
19300
|
-
/* @__PURE__ */ (0,
|
|
19404
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { style: { flexGrow: 0 }, children: isSettingsEditingMode ? /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
19301
19405
|
Button,
|
|
19302
19406
|
{
|
|
19303
|
-
StartIcon:
|
|
19407
|
+
StartIcon: import_lucide_react32.Save,
|
|
19304
19408
|
variant: "text",
|
|
19305
19409
|
size: "small",
|
|
19306
19410
|
onClick: updateVariableName
|
|
19307
19411
|
}
|
|
19308
|
-
) : /* @__PURE__ */ (0,
|
|
19412
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
19309
19413
|
Button,
|
|
19310
19414
|
{
|
|
19311
|
-
StartIcon:
|
|
19415
|
+
StartIcon: import_lucide_react32.Pencil,
|
|
19312
19416
|
variant: "text",
|
|
19313
19417
|
size: "small",
|
|
19314
19418
|
onClick: () => {
|
|
@@ -19318,9 +19422,9 @@ function VariableSettings(props) {
|
|
|
19318
19422
|
) })
|
|
19319
19423
|
] })
|
|
19320
19424
|
] }),
|
|
19321
|
-
/* @__PURE__ */ (0,
|
|
19322
|
-
/* @__PURE__ */ (0,
|
|
19323
|
-
/* @__PURE__ */ (0,
|
|
19425
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("div", { style: formFieldStyle, children: [
|
|
19426
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { style: formFieldLabel, children: "Type" }),
|
|
19427
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
19324
19428
|
DropdownButton,
|
|
19325
19429
|
{
|
|
19326
19430
|
className: "button__fullwidth button__left_aligned",
|
|
@@ -19334,9 +19438,9 @@ function VariableSettings(props) {
|
|
|
19334
19438
|
}
|
|
19335
19439
|
)
|
|
19336
19440
|
] }),
|
|
19337
|
-
currentVariableNode.getVariableFormat() && /* @__PURE__ */ (0,
|
|
19338
|
-
/* @__PURE__ */ (0,
|
|
19339
|
-
/* @__PURE__ */ (0,
|
|
19441
|
+
currentVariableNode.getVariableFormat() && /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("div", { style: formFieldStyle, children: [
|
|
19442
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { style: formFieldLabel, children: "Format" }),
|
|
19443
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
19340
19444
|
DropdownButton,
|
|
19341
19445
|
{
|
|
19342
19446
|
className: "button__fullwidth button__left_aligned",
|
|
@@ -19350,14 +19454,14 @@ function VariableSettings(props) {
|
|
|
19350
19454
|
}
|
|
19351
19455
|
)
|
|
19352
19456
|
] }),
|
|
19353
|
-
/* @__PURE__ */ (0,
|
|
19457
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { style: { width: "100%", display: "f" }, children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
19354
19458
|
Button,
|
|
19355
19459
|
{
|
|
19356
19460
|
size: "small",
|
|
19357
19461
|
variant: "danger",
|
|
19358
19462
|
className: "button__fullwidth",
|
|
19359
19463
|
label: "Delete",
|
|
19360
|
-
StartIcon:
|
|
19464
|
+
StartIcon: import_lucide_react32.Trash2,
|
|
19361
19465
|
onClick: () => {
|
|
19362
19466
|
let parentNodeKey;
|
|
19363
19467
|
activeEditorRef.current?.update(
|
|
@@ -19392,7 +19496,7 @@ function VariableSettings(props) {
|
|
|
19392
19496
|
}
|
|
19393
19497
|
|
|
19394
19498
|
// src/plugins/VariablesPlugin/VariableSettingsPlugin.tsx
|
|
19395
|
-
var
|
|
19499
|
+
var import_jsx_runtime135 = require("react/jsx-runtime");
|
|
19396
19500
|
function VariableSettingsPlugin() {
|
|
19397
19501
|
const {
|
|
19398
19502
|
registerSettingsPanel,
|
|
@@ -19411,20 +19515,20 @@ function VariableSettingsPlugin() {
|
|
|
19411
19515
|
}
|
|
19412
19516
|
}
|
|
19413
19517
|
}, [isBlockEditorReady]);
|
|
19414
|
-
return /* @__PURE__ */ (0,
|
|
19518
|
+
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_jsx_runtime135.Fragment, { children: drawer && /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
19415
19519
|
StickyToPosition,
|
|
19416
19520
|
{
|
|
19417
19521
|
ref: settingsPanelStickyRef,
|
|
19418
19522
|
container: drawer,
|
|
19419
19523
|
children: (data, position, isVisible) => {
|
|
19420
|
-
return /* @__PURE__ */ (0,
|
|
19524
|
+
return /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("div", { style: { width: position.width }, children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
19421
19525
|
SettingsCard,
|
|
19422
19526
|
{
|
|
19423
19527
|
isVisible: !!isVisible,
|
|
19424
19528
|
container: drawer,
|
|
19425
19529
|
title: "Variable Settings",
|
|
19426
19530
|
onClose: toggleSettingsPanelSwitch,
|
|
19427
|
-
children: /* @__PURE__ */ (0,
|
|
19531
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
19428
19532
|
VariableSettings,
|
|
19429
19533
|
{
|
|
19430
19534
|
nodeKey: data.nodeKey,
|
|
@@ -19444,9 +19548,9 @@ var import_LexicalComposerContext72 = require("@lexical/react/LexicalComposerCon
|
|
|
19444
19548
|
var import_utils39 = require("@lexical/utils");
|
|
19445
19549
|
var import_lexical105 = require("lexical");
|
|
19446
19550
|
var import_debounce8 = __toESM(require("lodash-es/debounce"));
|
|
19447
|
-
var
|
|
19551
|
+
var import_lucide_react33 = require("lucide-react");
|
|
19448
19552
|
var import_react114 = require("react");
|
|
19449
|
-
var
|
|
19553
|
+
var import_jsx_runtime136 = require("react/jsx-runtime");
|
|
19450
19554
|
function VariableToolbarPlugin() {
|
|
19451
19555
|
const [editor] = (0, import_LexicalComposerContext72.useLexicalComposerContext)();
|
|
19452
19556
|
const popupToolbarRef = (0, import_react114.useRef)(null);
|
|
@@ -19610,7 +19714,7 @@ function VariableToolbarPlugin() {
|
|
|
19610
19714
|
id: "bold",
|
|
19611
19715
|
label: "",
|
|
19612
19716
|
selected: toolbarState.isBold,
|
|
19613
|
-
Icon:
|
|
19717
|
+
Icon: import_lucide_react33.Bold,
|
|
19614
19718
|
tooltip: `Bold ${plt === "macOS" /* macOS */ ? "(\u2318B)" : "(Ctrl+B)"}`,
|
|
19615
19719
|
onClick: () => {
|
|
19616
19720
|
formatVariable("bold");
|
|
@@ -19620,7 +19724,7 @@ function VariableToolbarPlugin() {
|
|
|
19620
19724
|
id: "italic",
|
|
19621
19725
|
label: "",
|
|
19622
19726
|
selected: toolbarState.isItalic,
|
|
19623
|
-
Icon:
|
|
19727
|
+
Icon: import_lucide_react33.Italic,
|
|
19624
19728
|
tooltip: `Italic ${plt === "macOS" /* macOS */ ? "(\u2318I)" : "(Ctrl+I)"}`,
|
|
19625
19729
|
onClick: () => {
|
|
19626
19730
|
formatVariable("italic");
|
|
@@ -19630,7 +19734,7 @@ function VariableToolbarPlugin() {
|
|
|
19630
19734
|
id: "underline",
|
|
19631
19735
|
label: "",
|
|
19632
19736
|
selected: toolbarState.isUnderline,
|
|
19633
|
-
Icon:
|
|
19737
|
+
Icon: import_lucide_react33.Underline,
|
|
19634
19738
|
tooltip: `Underline ${plt === "macOS" /* macOS */ ? "(\u2318U)" : "(Ctrl+U)"}`,
|
|
19635
19739
|
onClick: () => {
|
|
19636
19740
|
formatVariable("underline");
|
|
@@ -19639,12 +19743,12 @@ function VariableToolbarPlugin() {
|
|
|
19639
19743
|
];
|
|
19640
19744
|
return resultList;
|
|
19641
19745
|
}, [toolbarState]);
|
|
19642
|
-
return /* @__PURE__ */ (0,
|
|
19746
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(PopupToolbar, { ref: popupToolbarRef, menu: menuItems });
|
|
19643
19747
|
}
|
|
19644
19748
|
|
|
19645
19749
|
// src/modules/Variables.tsx
|
|
19646
19750
|
var import_react115 = require("react");
|
|
19647
|
-
var
|
|
19751
|
+
var import_jsx_runtime137 = require("react/jsx-runtime");
|
|
19648
19752
|
function Variables(props) {
|
|
19649
19753
|
const { variablesSettings } = props;
|
|
19650
19754
|
const { registerModule, setEditingModeDataCallback } = useBlockEditor();
|
|
@@ -19658,11 +19762,11 @@ function Variables(props) {
|
|
|
19658
19762
|
};
|
|
19659
19763
|
});
|
|
19660
19764
|
}, [variablesSettings, setEditingModeDataCallback]);
|
|
19661
|
-
return /* @__PURE__ */ (0,
|
|
19662
|
-
/* @__PURE__ */ (0,
|
|
19663
|
-
/* @__PURE__ */ (0,
|
|
19664
|
-
/* @__PURE__ */ (0,
|
|
19665
|
-
/* @__PURE__ */ (0,
|
|
19765
|
+
return /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)(VariablesProvider, { variablesSettings, children: [
|
|
19766
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)(TypeaheadVariablePlugin, {}),
|
|
19767
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)(VariableSettingsPlugin, {}),
|
|
19768
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)(VariableToolbarPlugin, {}),
|
|
19769
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)(VariableToolbarAgentPlugin, {})
|
|
19666
19770
|
] });
|
|
19667
19771
|
}
|
|
19668
19772
|
// Annotate the CommonJS export names for ESM import in node:
|