@rufous/ui 0.1.93 → 0.1.95
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/main.cjs +36 -30
- package/dist/main.css +213 -0
- package/dist/main.d.cts +7 -1
- package/dist/main.d.ts +7 -1
- package/dist/main.js +35 -30
- package/package.json +1 -1
package/dist/main.cjs
CHANGED
|
@@ -28732,6 +28732,7 @@ __export(main_exports, {
|
|
|
28732
28732
|
RufousBirdIcon: () => rufousBirdIcon_default,
|
|
28733
28733
|
RufousLauncherIcon: () => rufousLauncherBird_default,
|
|
28734
28734
|
RufousLogoLoader: () => RufousLogoLoader,
|
|
28735
|
+
RufousTextContent: () => RufousTextContent,
|
|
28735
28736
|
RufousTextEditor: () => RufousTextEditor,
|
|
28736
28737
|
RufousThemeProvider: () => RufousThemeProvider,
|
|
28737
28738
|
Select: () => Select,
|
|
@@ -49677,26 +49678,29 @@ function createSpellCheckPlugin() {
|
|
|
49677
49678
|
let debounceTimer = null;
|
|
49678
49679
|
let viewRef = null;
|
|
49679
49680
|
const runCheck = (view) => {
|
|
49680
|
-
|
|
49681
|
-
|
|
49682
|
-
const
|
|
49683
|
-
|
|
49684
|
-
|
|
49685
|
-
|
|
49681
|
+
try {
|
|
49682
|
+
if (!typo || !view?.dom?.isConnected || !view.state) return;
|
|
49683
|
+
const { doc: doc3 } = view.state;
|
|
49684
|
+
if (!doc3 || doc3.content.size <= 4) {
|
|
49685
|
+
const tr2 = view.state.tr.setMeta(spellCheckPluginKey, { decorations: DecorationSet.empty });
|
|
49686
|
+
tr2.setMeta("addToHistory", false);
|
|
49687
|
+
view.dispatch(tr2);
|
|
49688
|
+
return;
|
|
49689
|
+
}
|
|
49690
|
+
const misspelled = findMisspelled(doc3);
|
|
49691
|
+
const decos = misspelled.map(
|
|
49692
|
+
({ from, to, word }) => Decoration.inline(from, to, {
|
|
49693
|
+
class: "rf-spell-error",
|
|
49694
|
+
nodeName: "span",
|
|
49695
|
+
"data-spell-word": word
|
|
49696
|
+
})
|
|
49697
|
+
);
|
|
49698
|
+
const decorationSet = DecorationSet.create(doc3, decos);
|
|
49699
|
+
const tr = view.state.tr.setMeta(spellCheckPluginKey, { decorations: decorationSet });
|
|
49700
|
+
tr.setMeta("addToHistory", false);
|
|
49701
|
+
view.dispatch(tr);
|
|
49702
|
+
} catch {
|
|
49686
49703
|
}
|
|
49687
|
-
const { doc: doc3 } = view.state;
|
|
49688
|
-
const misspelled = findMisspelled(doc3);
|
|
49689
|
-
const decos = misspelled.map(
|
|
49690
|
-
({ from, to, word }) => Decoration.inline(from, to, {
|
|
49691
|
-
class: "rf-spell-error",
|
|
49692
|
-
nodeName: "span",
|
|
49693
|
-
"data-spell-word": word
|
|
49694
|
-
})
|
|
49695
|
-
);
|
|
49696
|
-
const decorationSet = DecorationSet.create(doc3, decos);
|
|
49697
|
-
const tr = view.state.tr.setMeta(spellCheckPluginKey, { decorations: decorationSet });
|
|
49698
|
-
tr.setMeta("addToHistory", false);
|
|
49699
|
-
view.dispatch(tr);
|
|
49700
49704
|
};
|
|
49701
49705
|
const scheduleCheck = (view) => {
|
|
49702
49706
|
if (debounceTimer) clearTimeout(debounceTimer);
|
|
@@ -49708,23 +49712,16 @@ function createSpellCheckPlugin() {
|
|
|
49708
49712
|
init() {
|
|
49709
49713
|
return DecorationSet.empty;
|
|
49710
49714
|
},
|
|
49711
|
-
apply(tr,
|
|
49715
|
+
apply(tr, _oldDecos) {
|
|
49712
49716
|
const meta = tr.getMeta(spellCheckPluginKey);
|
|
49713
49717
|
if (meta?.decorations) return meta.decorations;
|
|
49714
|
-
if (tr.docChanged)
|
|
49715
|
-
|
|
49716
|
-
try {
|
|
49717
|
-
return oldDecos.map(tr.mapping, tr.doc);
|
|
49718
|
-
} catch {
|
|
49719
|
-
return DecorationSet.empty;
|
|
49720
|
-
}
|
|
49721
|
-
}
|
|
49722
|
-
return oldDecos;
|
|
49718
|
+
if (tr.docChanged) return DecorationSet.empty;
|
|
49719
|
+
return _oldDecos;
|
|
49723
49720
|
}
|
|
49724
49721
|
},
|
|
49725
49722
|
props: {
|
|
49726
49723
|
decorations(state) {
|
|
49727
|
-
return spellCheckPluginKey.getState(state);
|
|
49724
|
+
return spellCheckPluginKey.getState(state) || DecorationSet.empty;
|
|
49728
49725
|
}
|
|
49729
49726
|
},
|
|
49730
49727
|
view(editorView) {
|
|
@@ -50258,6 +50255,14 @@ var RufousTextEditor = ({
|
|
|
50258
50255
|
}
|
|
50259
50256
|
), "No follow"))), /* @__PURE__ */ import_react60.default.createElement("div", { className: "link-modal-footer" }, /* @__PURE__ */ import_react60.default.createElement("button", { className: "link-modal-btn-unlink", onClick: handleLinkRemove }, "Unlink"), /* @__PURE__ */ import_react60.default.createElement("button", { className: "link-modal-btn-apply", onClick: handleLinkSubmit }, "Update"))))));
|
|
50260
50257
|
};
|
|
50258
|
+
var RufousTextContent = ({ content, className, style }) => /* @__PURE__ */ import_react60.default.createElement(
|
|
50259
|
+
"div",
|
|
50260
|
+
{
|
|
50261
|
+
className: `rf-rte-content ${className || ""}`,
|
|
50262
|
+
style,
|
|
50263
|
+
dangerouslySetInnerHTML: { __html: content }
|
|
50264
|
+
}
|
|
50265
|
+
);
|
|
50261
50266
|
// Annotate the CommonJS export names for ESM import in node:
|
|
50262
50267
|
0 && (module.exports = {
|
|
50263
50268
|
APP_THEMES,
|
|
@@ -50357,6 +50362,7 @@ var RufousTextEditor = ({
|
|
|
50357
50362
|
RufousBirdIcon,
|
|
50358
50363
|
RufousLauncherIcon,
|
|
50359
50364
|
RufousLogoLoader,
|
|
50365
|
+
RufousTextContent,
|
|
50360
50366
|
RufousTextEditor,
|
|
50361
50367
|
RufousThemeProvider,
|
|
50362
50368
|
Select,
|
package/dist/main.css
CHANGED
|
@@ -16289,6 +16289,219 @@ svg.jodit-icon {
|
|
|
16289
16289
|
background: #f3f4f6;
|
|
16290
16290
|
color: #374151;
|
|
16291
16291
|
}
|
|
16292
|
+
.rf-rte-content {
|
|
16293
|
+
font-size: 16px;
|
|
16294
|
+
line-height: 1.75;
|
|
16295
|
+
color: #1e293b;
|
|
16296
|
+
text-align: left;
|
|
16297
|
+
word-wrap: break-word;
|
|
16298
|
+
overflow-wrap: break-word;
|
|
16299
|
+
}
|
|
16300
|
+
.rf-rte-content h1 {
|
|
16301
|
+
font-size: 2em;
|
|
16302
|
+
font-weight: 700;
|
|
16303
|
+
margin: 1em 0 0.4em;
|
|
16304
|
+
line-height: 1.2;
|
|
16305
|
+
}
|
|
16306
|
+
.rf-rte-content h2 {
|
|
16307
|
+
font-size: 1.5em;
|
|
16308
|
+
font-weight: 600;
|
|
16309
|
+
margin: 0.8em 0 0.4em;
|
|
16310
|
+
line-height: 1.3;
|
|
16311
|
+
}
|
|
16312
|
+
.rf-rte-content h3 {
|
|
16313
|
+
font-size: 1.25em;
|
|
16314
|
+
font-weight: 600;
|
|
16315
|
+
margin: 0.6em 0 0.3em;
|
|
16316
|
+
line-height: 1.4;
|
|
16317
|
+
}
|
|
16318
|
+
.rf-rte-content h4 {
|
|
16319
|
+
font-size: 1.1em;
|
|
16320
|
+
font-weight: 600;
|
|
16321
|
+
margin: 0.5em 0 0.25em;
|
|
16322
|
+
}
|
|
16323
|
+
.rf-rte-content h5 {
|
|
16324
|
+
font-size: 1em;
|
|
16325
|
+
font-weight: 600;
|
|
16326
|
+
margin: 0.5em 0 0.25em;
|
|
16327
|
+
}
|
|
16328
|
+
.rf-rte-content h6 {
|
|
16329
|
+
font-size: 0.9em;
|
|
16330
|
+
font-weight: 600;
|
|
16331
|
+
margin: 0.5em 0 0.25em;
|
|
16332
|
+
text-transform: uppercase;
|
|
16333
|
+
letter-spacing: 0.05em;
|
|
16334
|
+
}
|
|
16335
|
+
.rf-rte-content p {
|
|
16336
|
+
margin: 0.5em 0;
|
|
16337
|
+
}
|
|
16338
|
+
.rf-rte-content ul,
|
|
16339
|
+
.rf-rte-content ol {
|
|
16340
|
+
padding-left: 24px;
|
|
16341
|
+
margin: 0.5em 0;
|
|
16342
|
+
}
|
|
16343
|
+
.rf-rte-content li {
|
|
16344
|
+
margin: 0.25em 0;
|
|
16345
|
+
}
|
|
16346
|
+
.rf-rte-content ul[data-type=taskList] {
|
|
16347
|
+
list-style: none;
|
|
16348
|
+
padding-left: 8px;
|
|
16349
|
+
}
|
|
16350
|
+
.rf-rte-content ul[data-type=taskList] li {
|
|
16351
|
+
display: flex;
|
|
16352
|
+
align-items: flex-start;
|
|
16353
|
+
gap: 8px;
|
|
16354
|
+
margin: 8px 0;
|
|
16355
|
+
list-style: none;
|
|
16356
|
+
}
|
|
16357
|
+
.rf-rte-content ul[data-type=taskList] li::before {
|
|
16358
|
+
content: "";
|
|
16359
|
+
flex-shrink: 0;
|
|
16360
|
+
display: inline-block;
|
|
16361
|
+
width: 18px;
|
|
16362
|
+
height: 18px;
|
|
16363
|
+
margin-top: 4px;
|
|
16364
|
+
border-radius: 3px;
|
|
16365
|
+
border: 2px solid #dc2626;
|
|
16366
|
+
background-repeat: no-repeat;
|
|
16367
|
+
background-position: center;
|
|
16368
|
+
background-size: contain;
|
|
16369
|
+
background-image: url(https://storage.googleapis.com/rufous-com-bucket-1/static/images/todo-blank.svg);
|
|
16370
|
+
}
|
|
16371
|
+
.rf-rte-content ul[data-type=taskList] li[data-status=todo]::before {
|
|
16372
|
+
border-color: #dc2626;
|
|
16373
|
+
background-image: url(https://storage.googleapis.com/rufous-com-bucket-1/static/images/todo-blank.svg);
|
|
16374
|
+
}
|
|
16375
|
+
.rf-rte-content ul[data-type=taskList] li[data-status=working]::before {
|
|
16376
|
+
border-color: #2563eb;
|
|
16377
|
+
background-image: url(https://storage.googleapis.com/rufous-com-bucket-1/static/images/working.svg);
|
|
16378
|
+
}
|
|
16379
|
+
.rf-rte-content ul[data-type=taskList] li[data-status=blocked]::before {
|
|
16380
|
+
border-color: #1f2937;
|
|
16381
|
+
background-image: url(https://storage.googleapis.com/rufous-com-bucket-1/static/images/blocked.svg);
|
|
16382
|
+
}
|
|
16383
|
+
.rf-rte-content ul[data-type=taskList] li[data-status=resolved]::before {
|
|
16384
|
+
border-color: #16a34a;
|
|
16385
|
+
background-image: url(https://storage.googleapis.com/rufous-com-bucket-1/static/images/closed.svg);
|
|
16386
|
+
}
|
|
16387
|
+
.rf-rte-content ul[data-type=taskList] li[data-status=resolved] > p {
|
|
16388
|
+
text-decoration: line-through;
|
|
16389
|
+
color: #9ca3af;
|
|
16390
|
+
}
|
|
16391
|
+
.rf-rte-content ul[data-type=taskList] li > label {
|
|
16392
|
+
display: none;
|
|
16393
|
+
}
|
|
16394
|
+
.rf-rte-content ul[data-type=taskList] li > input[type=checkbox] {
|
|
16395
|
+
display: none;
|
|
16396
|
+
}
|
|
16397
|
+
.rf-rte-content blockquote {
|
|
16398
|
+
border-left: 3px solid #6366f1;
|
|
16399
|
+
margin: 0.8em 0;
|
|
16400
|
+
padding: 0.4em 0 0.4em 16px;
|
|
16401
|
+
color: #4b5563;
|
|
16402
|
+
background: #f9fafb;
|
|
16403
|
+
border-radius: 0 4px 4px 0;
|
|
16404
|
+
}
|
|
16405
|
+
.rf-rte-content code {
|
|
16406
|
+
background: #f3f4f6;
|
|
16407
|
+
border-radius: 4px;
|
|
16408
|
+
padding: 2px 6px;
|
|
16409
|
+
font-size: 0.9em;
|
|
16410
|
+
color: #e11d48;
|
|
16411
|
+
font-family:
|
|
16412
|
+
"Fira Code",
|
|
16413
|
+
"Consolas",
|
|
16414
|
+
monospace;
|
|
16415
|
+
}
|
|
16416
|
+
.rf-rte-content pre {
|
|
16417
|
+
background: #1e1e2e;
|
|
16418
|
+
color: #cdd6f4;
|
|
16419
|
+
border-radius: 8px;
|
|
16420
|
+
padding: 16px;
|
|
16421
|
+
margin: 0.8em 0;
|
|
16422
|
+
overflow-x: auto;
|
|
16423
|
+
}
|
|
16424
|
+
.rf-rte-content pre code {
|
|
16425
|
+
background: none;
|
|
16426
|
+
color: inherit;
|
|
16427
|
+
padding: 0;
|
|
16428
|
+
font-size: 0.9em;
|
|
16429
|
+
}
|
|
16430
|
+
.rf-rte-content hr {
|
|
16431
|
+
border: none;
|
|
16432
|
+
border-top: 2px solid #e5e7eb;
|
|
16433
|
+
margin: 1.5em 0;
|
|
16434
|
+
}
|
|
16435
|
+
.rf-rte-content strong {
|
|
16436
|
+
font-weight: 700;
|
|
16437
|
+
}
|
|
16438
|
+
.rf-rte-content em {
|
|
16439
|
+
font-style: italic;
|
|
16440
|
+
}
|
|
16441
|
+
.rf-rte-content s {
|
|
16442
|
+
text-decoration: line-through;
|
|
16443
|
+
color: #9ca3af;
|
|
16444
|
+
}
|
|
16445
|
+
.rf-rte-content u {
|
|
16446
|
+
text-decoration: underline;
|
|
16447
|
+
}
|
|
16448
|
+
.rf-rte-content mark {
|
|
16449
|
+
border-radius: 2px;
|
|
16450
|
+
padding: 1px 2px;
|
|
16451
|
+
}
|
|
16452
|
+
.rf-rte-content table {
|
|
16453
|
+
border-collapse: collapse;
|
|
16454
|
+
width: 100%;
|
|
16455
|
+
margin: 0.8em 0;
|
|
16456
|
+
overflow: hidden;
|
|
16457
|
+
border-radius: 4px;
|
|
16458
|
+
}
|
|
16459
|
+
.rf-rte-content table td,
|
|
16460
|
+
.rf-rte-content table th {
|
|
16461
|
+
border: 1px solid #d1d5db;
|
|
16462
|
+
padding: 8px 12px;
|
|
16463
|
+
min-width: 80px;
|
|
16464
|
+
vertical-align: top;
|
|
16465
|
+
}
|
|
16466
|
+
.rf-rte-content table th {
|
|
16467
|
+
background: #f3f4f6;
|
|
16468
|
+
font-weight: 600;
|
|
16469
|
+
text-align: left;
|
|
16470
|
+
}
|
|
16471
|
+
.rf-rte-content img {
|
|
16472
|
+
max-width: 100%;
|
|
16473
|
+
height: auto;
|
|
16474
|
+
border-radius: 8px;
|
|
16475
|
+
margin: 0.8em 0;
|
|
16476
|
+
}
|
|
16477
|
+
.rf-rte-content video {
|
|
16478
|
+
max-width: 100%;
|
|
16479
|
+
}
|
|
16480
|
+
.rf-rte-content div[data-youtube-video] {
|
|
16481
|
+
margin: 0.8em 0;
|
|
16482
|
+
}
|
|
16483
|
+
.rf-rte-content div[data-youtube-video] iframe {
|
|
16484
|
+
border-radius: 8px;
|
|
16485
|
+
max-width: 100%;
|
|
16486
|
+
}
|
|
16487
|
+
.rf-rte-content .editor-link {
|
|
16488
|
+
color: #6366f1;
|
|
16489
|
+
text-decoration: underline;
|
|
16490
|
+
text-underline-offset: 2px;
|
|
16491
|
+
cursor: pointer;
|
|
16492
|
+
}
|
|
16493
|
+
.rf-rte-content .editor-link:hover {
|
|
16494
|
+
color: #4f46e5;
|
|
16495
|
+
}
|
|
16496
|
+
.rf-rte-content .mention {
|
|
16497
|
+
background: #fef2f2;
|
|
16498
|
+
color: #991b1b;
|
|
16499
|
+
border-radius: 4px;
|
|
16500
|
+
padding: 1px 4px;
|
|
16501
|
+
font-weight: 600;
|
|
16502
|
+
font-size: 0.95em;
|
|
16503
|
+
white-space: nowrap;
|
|
16504
|
+
}
|
|
16292
16505
|
/*! Bundled license information:
|
|
16293
16506
|
|
|
16294
16507
|
jodit/es5/jodit.min.css:
|
package/dist/main.d.cts
CHANGED
|
@@ -1699,6 +1699,12 @@ interface RufousTextEditorProps {
|
|
|
1699
1699
|
style?: React__default.CSSProperties;
|
|
1700
1700
|
}
|
|
1701
1701
|
declare const RufousTextEditor: React__default.FC<RufousTextEditorProps>;
|
|
1702
|
+
interface RufousTextContentProps {
|
|
1703
|
+
content: string;
|
|
1704
|
+
className?: string;
|
|
1705
|
+
style?: React__default.CSSProperties;
|
|
1706
|
+
}
|
|
1707
|
+
declare const RufousTextContent: React__default.FC<RufousTextContentProps>;
|
|
1702
1708
|
|
|
1703
1709
|
interface MentionItemData {
|
|
1704
1710
|
id: string;
|
|
@@ -1706,4 +1712,4 @@ interface MentionItemData {
|
|
|
1706
1712
|
avatar?: string;
|
|
1707
1713
|
}
|
|
1708
1714
|
|
|
1709
|
-
export { APP_THEMES, Accordion, AccordionDetails, type AccordionDetailsProps, type AccordionProps, AccordionSummary, type AccordionSummaryProps, type Action, ActivateUserIcon, AddButton, AddressLookup, ArchivedIcon, AssignGroupIcon, Autocomplete, type AutocompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, BaseDialog, Box, type BoxProps, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, CameraIcon, CancelButton, Card, CardActions, type CardActionsProps, CardContent, type CardContentProps, CardHeader, type CardHeaderProps, CardMedia, type CardMediaProps, type CardProps, Checkbox, type CheckboxProps, Chip, type ChipProps, CircularProgress, CircularProgressIcon, type CircularProgressIconProps, CloseIcon, Collapse, type CollapseProps, type Column, CopyIcon, DataGrid, type DataGridProps, DateField, type DateFieldProps, type DateFormatString, DateRangeField, type DateRangeFieldProps, type DateRangeValue, DifficultyAllIcon, DifficultyEasyIcon, DifficultyHardIcon, DifficultyMediumIcon, Divider, type DividerProps, DollarIcon, DownloadIcon, DownloadPdfIcon, Drawer, type DrawerProps, EditChatIcon, EditIcon, EngagementIcon, Fade, type FadeProps, FunctionIcon, Grid, type GridProps, Grow, type GrowProps, HelpOutlinedIcon, HierarchyIcon, IconButton, type IconButtonProps, ImageField, type ImageFieldProps, InactiveGroupIcon, IndustryIcon, InvoiceIcon, Link, type LinkProps, List, ListItem, ListItemButton, type ListItemButtonProps, ListItemIcon, type ListItemIconProps, type ListItemProps, ListItemText, type ListItemTextProps, type ListProps, ListSubheader, type ListSubheaderProps, LocationPinIcon, LogsIcon, type MentionItem, Menu, MenuDivider, MenuItem, type MenuItemProps, MenuList, type MenuListProps, type MenuProps, MinExperienceIcon, NineDotMenuIcon, NotificationIcon, Paper, type PaperProps, PhoneField, type PhoneFieldProps, Popover, type PopoverProps, Popper, type PopperProps, ProjectIcon, QualificationsIcon, QuestionStatusAllIcon, QuestionStatusPrivateIcon, QuestionStatusPublicIcon, QuestionTypeAllIcon, QuestionTypeCodingIcon, QuestionTypeDescriptiveIcon, QuestionTypeMultipleIcon, QuestionTypeSingleIcon, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Rating, type RatingProps, RefreshIcon, ResendInviteIcon, RichTextEditor, type RichTextEditorProps, RolesIcon, RufousAiIcon, RufousBirdIcon, RufousLauncherIcon, RufousLogoLoader, type RufousLogoLoaderProps, RufousTextEditor, type MentionItemData as RufousTextEditorMentionItem, type RufousTextEditorProps, RufousThemeProvider, Select, type SelectProps, SidebarIcon, Skeleton, type SkeletonProps, Slide, type SlideProps, Slider, type SliderProps, Snackbar, type SnackbarProps, SoftSkillsIcon, type SortDirection, Stack, type StackProps, StandardButton, Step, StepButton, type StepButtonProps, StepContent, type StepContentProps, StepLabel, type StepLabelProps, type StepProps, Stepper, type StepperProps, SubmitButton, SubscribeIcon, SuspendUserIcon, Switch, type SwitchProps, type SxProp, Tab, TabPanel, type TabPanelProps, type TabProps, Tabs, type TabsProps, TechnicalSkillsIcon, TextField, type TextFieldProps, TickIcon, TimerIcon, ToggleButton, ToggleButtonGroup, type ToggleButtonGroupProps, type ToggleButtonProps, Tooltip, type TooltipProps, TrashIcon, Typography, type TypographyProps, UnArchivedIcon, UnsubscribeIcon, UploadIcon, UserAssignIcon, ViewIcon, WorkItemIcon, Zoom, type ZoomProps, useRufousTheme };
|
|
1715
|
+
export { APP_THEMES, Accordion, AccordionDetails, type AccordionDetailsProps, type AccordionProps, AccordionSummary, type AccordionSummaryProps, type Action, ActivateUserIcon, AddButton, AddressLookup, ArchivedIcon, AssignGroupIcon, Autocomplete, type AutocompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, BaseDialog, Box, type BoxProps, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, CameraIcon, CancelButton, Card, CardActions, type CardActionsProps, CardContent, type CardContentProps, CardHeader, type CardHeaderProps, CardMedia, type CardMediaProps, type CardProps, Checkbox, type CheckboxProps, Chip, type ChipProps, CircularProgress, CircularProgressIcon, type CircularProgressIconProps, CloseIcon, Collapse, type CollapseProps, type Column, CopyIcon, DataGrid, type DataGridProps, DateField, type DateFieldProps, type DateFormatString, DateRangeField, type DateRangeFieldProps, type DateRangeValue, DifficultyAllIcon, DifficultyEasyIcon, DifficultyHardIcon, DifficultyMediumIcon, Divider, type DividerProps, DollarIcon, DownloadIcon, DownloadPdfIcon, Drawer, type DrawerProps, EditChatIcon, EditIcon, EngagementIcon, Fade, type FadeProps, FunctionIcon, Grid, type GridProps, Grow, type GrowProps, HelpOutlinedIcon, HierarchyIcon, IconButton, type IconButtonProps, ImageField, type ImageFieldProps, InactiveGroupIcon, IndustryIcon, InvoiceIcon, Link, type LinkProps, List, ListItem, ListItemButton, type ListItemButtonProps, ListItemIcon, type ListItemIconProps, type ListItemProps, ListItemText, type ListItemTextProps, type ListProps, ListSubheader, type ListSubheaderProps, LocationPinIcon, LogsIcon, type MentionItem, Menu, MenuDivider, MenuItem, type MenuItemProps, MenuList, type MenuListProps, type MenuProps, MinExperienceIcon, NineDotMenuIcon, NotificationIcon, Paper, type PaperProps, PhoneField, type PhoneFieldProps, Popover, type PopoverProps, Popper, type PopperProps, ProjectIcon, QualificationsIcon, QuestionStatusAllIcon, QuestionStatusPrivateIcon, QuestionStatusPublicIcon, QuestionTypeAllIcon, QuestionTypeCodingIcon, QuestionTypeDescriptiveIcon, QuestionTypeMultipleIcon, QuestionTypeSingleIcon, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Rating, type RatingProps, RefreshIcon, ResendInviteIcon, RichTextEditor, type RichTextEditorProps, RolesIcon, RufousAiIcon, RufousBirdIcon, RufousLauncherIcon, RufousLogoLoader, type RufousLogoLoaderProps, RufousTextContent, type RufousTextContentProps, RufousTextEditor, type MentionItemData as RufousTextEditorMentionItem, type RufousTextEditorProps, RufousThemeProvider, Select, type SelectProps, SidebarIcon, Skeleton, type SkeletonProps, Slide, type SlideProps, Slider, type SliderProps, Snackbar, type SnackbarProps, SoftSkillsIcon, type SortDirection, Stack, type StackProps, StandardButton, Step, StepButton, type StepButtonProps, StepContent, type StepContentProps, StepLabel, type StepLabelProps, type StepProps, Stepper, type StepperProps, SubmitButton, SubscribeIcon, SuspendUserIcon, Switch, type SwitchProps, type SxProp, Tab, TabPanel, type TabPanelProps, type TabProps, Tabs, type TabsProps, TechnicalSkillsIcon, TextField, type TextFieldProps, TickIcon, TimerIcon, ToggleButton, ToggleButtonGroup, type ToggleButtonGroupProps, type ToggleButtonProps, Tooltip, type TooltipProps, TrashIcon, Typography, type TypographyProps, UnArchivedIcon, UnsubscribeIcon, UploadIcon, UserAssignIcon, ViewIcon, WorkItemIcon, Zoom, type ZoomProps, useRufousTheme };
|
package/dist/main.d.ts
CHANGED
|
@@ -1699,6 +1699,12 @@ interface RufousTextEditorProps {
|
|
|
1699
1699
|
style?: React__default.CSSProperties;
|
|
1700
1700
|
}
|
|
1701
1701
|
declare const RufousTextEditor: React__default.FC<RufousTextEditorProps>;
|
|
1702
|
+
interface RufousTextContentProps {
|
|
1703
|
+
content: string;
|
|
1704
|
+
className?: string;
|
|
1705
|
+
style?: React__default.CSSProperties;
|
|
1706
|
+
}
|
|
1707
|
+
declare const RufousTextContent: React__default.FC<RufousTextContentProps>;
|
|
1702
1708
|
|
|
1703
1709
|
interface MentionItemData {
|
|
1704
1710
|
id: string;
|
|
@@ -1706,4 +1712,4 @@ interface MentionItemData {
|
|
|
1706
1712
|
avatar?: string;
|
|
1707
1713
|
}
|
|
1708
1714
|
|
|
1709
|
-
export { APP_THEMES, Accordion, AccordionDetails, type AccordionDetailsProps, type AccordionProps, AccordionSummary, type AccordionSummaryProps, type Action, ActivateUserIcon, AddButton, AddressLookup, ArchivedIcon, AssignGroupIcon, Autocomplete, type AutocompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, BaseDialog, Box, type BoxProps, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, CameraIcon, CancelButton, Card, CardActions, type CardActionsProps, CardContent, type CardContentProps, CardHeader, type CardHeaderProps, CardMedia, type CardMediaProps, type CardProps, Checkbox, type CheckboxProps, Chip, type ChipProps, CircularProgress, CircularProgressIcon, type CircularProgressIconProps, CloseIcon, Collapse, type CollapseProps, type Column, CopyIcon, DataGrid, type DataGridProps, DateField, type DateFieldProps, type DateFormatString, DateRangeField, type DateRangeFieldProps, type DateRangeValue, DifficultyAllIcon, DifficultyEasyIcon, DifficultyHardIcon, DifficultyMediumIcon, Divider, type DividerProps, DollarIcon, DownloadIcon, DownloadPdfIcon, Drawer, type DrawerProps, EditChatIcon, EditIcon, EngagementIcon, Fade, type FadeProps, FunctionIcon, Grid, type GridProps, Grow, type GrowProps, HelpOutlinedIcon, HierarchyIcon, IconButton, type IconButtonProps, ImageField, type ImageFieldProps, InactiveGroupIcon, IndustryIcon, InvoiceIcon, Link, type LinkProps, List, ListItem, ListItemButton, type ListItemButtonProps, ListItemIcon, type ListItemIconProps, type ListItemProps, ListItemText, type ListItemTextProps, type ListProps, ListSubheader, type ListSubheaderProps, LocationPinIcon, LogsIcon, type MentionItem, Menu, MenuDivider, MenuItem, type MenuItemProps, MenuList, type MenuListProps, type MenuProps, MinExperienceIcon, NineDotMenuIcon, NotificationIcon, Paper, type PaperProps, PhoneField, type PhoneFieldProps, Popover, type PopoverProps, Popper, type PopperProps, ProjectIcon, QualificationsIcon, QuestionStatusAllIcon, QuestionStatusPrivateIcon, QuestionStatusPublicIcon, QuestionTypeAllIcon, QuestionTypeCodingIcon, QuestionTypeDescriptiveIcon, QuestionTypeMultipleIcon, QuestionTypeSingleIcon, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Rating, type RatingProps, RefreshIcon, ResendInviteIcon, RichTextEditor, type RichTextEditorProps, RolesIcon, RufousAiIcon, RufousBirdIcon, RufousLauncherIcon, RufousLogoLoader, type RufousLogoLoaderProps, RufousTextEditor, type MentionItemData as RufousTextEditorMentionItem, type RufousTextEditorProps, RufousThemeProvider, Select, type SelectProps, SidebarIcon, Skeleton, type SkeletonProps, Slide, type SlideProps, Slider, type SliderProps, Snackbar, type SnackbarProps, SoftSkillsIcon, type SortDirection, Stack, type StackProps, StandardButton, Step, StepButton, type StepButtonProps, StepContent, type StepContentProps, StepLabel, type StepLabelProps, type StepProps, Stepper, type StepperProps, SubmitButton, SubscribeIcon, SuspendUserIcon, Switch, type SwitchProps, type SxProp, Tab, TabPanel, type TabPanelProps, type TabProps, Tabs, type TabsProps, TechnicalSkillsIcon, TextField, type TextFieldProps, TickIcon, TimerIcon, ToggleButton, ToggleButtonGroup, type ToggleButtonGroupProps, type ToggleButtonProps, Tooltip, type TooltipProps, TrashIcon, Typography, type TypographyProps, UnArchivedIcon, UnsubscribeIcon, UploadIcon, UserAssignIcon, ViewIcon, WorkItemIcon, Zoom, type ZoomProps, useRufousTheme };
|
|
1715
|
+
export { APP_THEMES, Accordion, AccordionDetails, type AccordionDetailsProps, type AccordionProps, AccordionSummary, type AccordionSummaryProps, type Action, ActivateUserIcon, AddButton, AddressLookup, ArchivedIcon, AssignGroupIcon, Autocomplete, type AutocompleteProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, BaseDialog, Box, type BoxProps, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, CameraIcon, CancelButton, Card, CardActions, type CardActionsProps, CardContent, type CardContentProps, CardHeader, type CardHeaderProps, CardMedia, type CardMediaProps, type CardProps, Checkbox, type CheckboxProps, Chip, type ChipProps, CircularProgress, CircularProgressIcon, type CircularProgressIconProps, CloseIcon, Collapse, type CollapseProps, type Column, CopyIcon, DataGrid, type DataGridProps, DateField, type DateFieldProps, type DateFormatString, DateRangeField, type DateRangeFieldProps, type DateRangeValue, DifficultyAllIcon, DifficultyEasyIcon, DifficultyHardIcon, DifficultyMediumIcon, Divider, type DividerProps, DollarIcon, DownloadIcon, DownloadPdfIcon, Drawer, type DrawerProps, EditChatIcon, EditIcon, EngagementIcon, Fade, type FadeProps, FunctionIcon, Grid, type GridProps, Grow, type GrowProps, HelpOutlinedIcon, HierarchyIcon, IconButton, type IconButtonProps, ImageField, type ImageFieldProps, InactiveGroupIcon, IndustryIcon, InvoiceIcon, Link, type LinkProps, List, ListItem, ListItemButton, type ListItemButtonProps, ListItemIcon, type ListItemIconProps, type ListItemProps, ListItemText, type ListItemTextProps, type ListProps, ListSubheader, type ListSubheaderProps, LocationPinIcon, LogsIcon, type MentionItem, Menu, MenuDivider, MenuItem, type MenuItemProps, MenuList, type MenuListProps, type MenuProps, MinExperienceIcon, NineDotMenuIcon, NotificationIcon, Paper, type PaperProps, PhoneField, type PhoneFieldProps, Popover, type PopoverProps, Popper, type PopperProps, ProjectIcon, QualificationsIcon, QuestionStatusAllIcon, QuestionStatusPrivateIcon, QuestionStatusPublicIcon, QuestionTypeAllIcon, QuestionTypeCodingIcon, QuestionTypeDescriptiveIcon, QuestionTypeMultipleIcon, QuestionTypeSingleIcon, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Rating, type RatingProps, RefreshIcon, ResendInviteIcon, RichTextEditor, type RichTextEditorProps, RolesIcon, RufousAiIcon, RufousBirdIcon, RufousLauncherIcon, RufousLogoLoader, type RufousLogoLoaderProps, RufousTextContent, type RufousTextContentProps, RufousTextEditor, type MentionItemData as RufousTextEditorMentionItem, type RufousTextEditorProps, RufousThemeProvider, Select, type SelectProps, SidebarIcon, Skeleton, type SkeletonProps, Slide, type SlideProps, Slider, type SliderProps, Snackbar, type SnackbarProps, SoftSkillsIcon, type SortDirection, Stack, type StackProps, StandardButton, Step, StepButton, type StepButtonProps, StepContent, type StepContentProps, StepLabel, type StepLabelProps, type StepProps, Stepper, type StepperProps, SubmitButton, SubscribeIcon, SuspendUserIcon, Switch, type SwitchProps, type SxProp, Tab, TabPanel, type TabPanelProps, type TabProps, Tabs, type TabsProps, TechnicalSkillsIcon, TextField, type TextFieldProps, TickIcon, TimerIcon, ToggleButton, ToggleButtonGroup, type ToggleButtonGroupProps, type ToggleButtonProps, Tooltip, type TooltipProps, TrashIcon, Typography, type TypographyProps, UnArchivedIcon, UnsubscribeIcon, UploadIcon, UserAssignIcon, ViewIcon, WorkItemIcon, Zoom, type ZoomProps, useRufousTheme };
|
package/dist/main.js
CHANGED
|
@@ -21008,26 +21008,29 @@ function createSpellCheckPlugin() {
|
|
|
21008
21008
|
let debounceTimer = null;
|
|
21009
21009
|
let viewRef = null;
|
|
21010
21010
|
const runCheck = (view) => {
|
|
21011
|
-
|
|
21012
|
-
|
|
21013
|
-
const
|
|
21014
|
-
|
|
21015
|
-
|
|
21016
|
-
|
|
21011
|
+
try {
|
|
21012
|
+
if (!typo || !view?.dom?.isConnected || !view.state) return;
|
|
21013
|
+
const { doc: doc3 } = view.state;
|
|
21014
|
+
if (!doc3 || doc3.content.size <= 4) {
|
|
21015
|
+
const tr2 = view.state.tr.setMeta(spellCheckPluginKey, { decorations: DecorationSet.empty });
|
|
21016
|
+
tr2.setMeta("addToHistory", false);
|
|
21017
|
+
view.dispatch(tr2);
|
|
21018
|
+
return;
|
|
21019
|
+
}
|
|
21020
|
+
const misspelled = findMisspelled(doc3);
|
|
21021
|
+
const decos = misspelled.map(
|
|
21022
|
+
({ from, to, word }) => Decoration.inline(from, to, {
|
|
21023
|
+
class: "rf-spell-error",
|
|
21024
|
+
nodeName: "span",
|
|
21025
|
+
"data-spell-word": word
|
|
21026
|
+
})
|
|
21027
|
+
);
|
|
21028
|
+
const decorationSet = DecorationSet.create(doc3, decos);
|
|
21029
|
+
const tr = view.state.tr.setMeta(spellCheckPluginKey, { decorations: decorationSet });
|
|
21030
|
+
tr.setMeta("addToHistory", false);
|
|
21031
|
+
view.dispatch(tr);
|
|
21032
|
+
} catch {
|
|
21017
21033
|
}
|
|
21018
|
-
const { doc: doc3 } = view.state;
|
|
21019
|
-
const misspelled = findMisspelled(doc3);
|
|
21020
|
-
const decos = misspelled.map(
|
|
21021
|
-
({ from, to, word }) => Decoration.inline(from, to, {
|
|
21022
|
-
class: "rf-spell-error",
|
|
21023
|
-
nodeName: "span",
|
|
21024
|
-
"data-spell-word": word
|
|
21025
|
-
})
|
|
21026
|
-
);
|
|
21027
|
-
const decorationSet = DecorationSet.create(doc3, decos);
|
|
21028
|
-
const tr = view.state.tr.setMeta(spellCheckPluginKey, { decorations: decorationSet });
|
|
21029
|
-
tr.setMeta("addToHistory", false);
|
|
21030
|
-
view.dispatch(tr);
|
|
21031
21034
|
};
|
|
21032
21035
|
const scheduleCheck = (view) => {
|
|
21033
21036
|
if (debounceTimer) clearTimeout(debounceTimer);
|
|
@@ -21039,23 +21042,16 @@ function createSpellCheckPlugin() {
|
|
|
21039
21042
|
init() {
|
|
21040
21043
|
return DecorationSet.empty;
|
|
21041
21044
|
},
|
|
21042
|
-
apply(tr,
|
|
21045
|
+
apply(tr, _oldDecos) {
|
|
21043
21046
|
const meta = tr.getMeta(spellCheckPluginKey);
|
|
21044
21047
|
if (meta?.decorations) return meta.decorations;
|
|
21045
|
-
if (tr.docChanged)
|
|
21046
|
-
|
|
21047
|
-
try {
|
|
21048
|
-
return oldDecos.map(tr.mapping, tr.doc);
|
|
21049
|
-
} catch {
|
|
21050
|
-
return DecorationSet.empty;
|
|
21051
|
-
}
|
|
21052
|
-
}
|
|
21053
|
-
return oldDecos;
|
|
21048
|
+
if (tr.docChanged) return DecorationSet.empty;
|
|
21049
|
+
return _oldDecos;
|
|
21054
21050
|
}
|
|
21055
21051
|
},
|
|
21056
21052
|
props: {
|
|
21057
21053
|
decorations(state) {
|
|
21058
|
-
return spellCheckPluginKey.getState(state);
|
|
21054
|
+
return spellCheckPluginKey.getState(state) || DecorationSet.empty;
|
|
21059
21055
|
}
|
|
21060
21056
|
},
|
|
21061
21057
|
view(editorView) {
|
|
@@ -21589,6 +21585,14 @@ var RufousTextEditor = ({
|
|
|
21589
21585
|
}
|
|
21590
21586
|
), "No follow"))), /* @__PURE__ */ React117.createElement("div", { className: "link-modal-footer" }, /* @__PURE__ */ React117.createElement("button", { className: "link-modal-btn-unlink", onClick: handleLinkRemove }, "Unlink"), /* @__PURE__ */ React117.createElement("button", { className: "link-modal-btn-apply", onClick: handleLinkSubmit }, "Update"))))));
|
|
21591
21587
|
};
|
|
21588
|
+
var RufousTextContent = ({ content, className, style }) => /* @__PURE__ */ React117.createElement(
|
|
21589
|
+
"div",
|
|
21590
|
+
{
|
|
21591
|
+
className: `rf-rte-content ${className || ""}`,
|
|
21592
|
+
style,
|
|
21593
|
+
dangerouslySetInnerHTML: { __html: content }
|
|
21594
|
+
}
|
|
21595
|
+
);
|
|
21592
21596
|
export {
|
|
21593
21597
|
APP_THEMES,
|
|
21594
21598
|
Accordion,
|
|
@@ -21687,6 +21691,7 @@ export {
|
|
|
21687
21691
|
rufousBirdIcon_default as RufousBirdIcon,
|
|
21688
21692
|
rufousLauncherBird_default as RufousLauncherIcon,
|
|
21689
21693
|
RufousLogoLoader,
|
|
21694
|
+
RufousTextContent,
|
|
21690
21695
|
RufousTextEditor,
|
|
21691
21696
|
RufousThemeProvider,
|
|
21692
21697
|
Select,
|