@rufous/ui 0.1.93 → 0.1.94
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 +45 -22
- package/dist/main.css +172 -0
- package/dist/main.d.cts +7 -1
- package/dist/main.d.ts +7 -1
- package/dist/main.js +44 -22
- 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);
|
|
@@ -49712,9 +49716,12 @@ function createSpellCheckPlugin() {
|
|
|
49712
49716
|
const meta = tr.getMeta(spellCheckPluginKey);
|
|
49713
49717
|
if (meta?.decorations) return meta.decorations;
|
|
49714
49718
|
if (tr.docChanged) {
|
|
49715
|
-
if (newState.doc.content.size <=
|
|
49719
|
+
if (newState.doc.content.size <= 4) return DecorationSet.empty;
|
|
49720
|
+
if (oldDecos === DecorationSet.empty) return DecorationSet.empty;
|
|
49716
49721
|
try {
|
|
49717
|
-
|
|
49722
|
+
const mapped = oldDecos.map(tr.mapping, tr.doc);
|
|
49723
|
+
if (!mapped || typeof mapped.find !== "function") return DecorationSet.empty;
|
|
49724
|
+
return mapped;
|
|
49718
49725
|
} catch {
|
|
49719
49726
|
return DecorationSet.empty;
|
|
49720
49727
|
}
|
|
@@ -49724,7 +49731,14 @@ function createSpellCheckPlugin() {
|
|
|
49724
49731
|
},
|
|
49725
49732
|
props: {
|
|
49726
49733
|
decorations(state) {
|
|
49727
|
-
|
|
49734
|
+
try {
|
|
49735
|
+
const decos = spellCheckPluginKey.getState(state);
|
|
49736
|
+
if (!decos || decos === DecorationSet.empty) return DecorationSet.empty;
|
|
49737
|
+
decos.find();
|
|
49738
|
+
return decos;
|
|
49739
|
+
} catch {
|
|
49740
|
+
return DecorationSet.empty;
|
|
49741
|
+
}
|
|
49728
49742
|
}
|
|
49729
49743
|
},
|
|
49730
49744
|
view(editorView) {
|
|
@@ -50258,6 +50272,14 @@ var RufousTextEditor = ({
|
|
|
50258
50272
|
}
|
|
50259
50273
|
), "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
50274
|
};
|
|
50275
|
+
var RufousTextContent = ({ content, className, style }) => /* @__PURE__ */ import_react60.default.createElement(
|
|
50276
|
+
"div",
|
|
50277
|
+
{
|
|
50278
|
+
className: `rf-rte-content ${className || ""}`,
|
|
50279
|
+
style,
|
|
50280
|
+
dangerouslySetInnerHTML: { __html: content }
|
|
50281
|
+
}
|
|
50282
|
+
);
|
|
50261
50283
|
// Annotate the CommonJS export names for ESM import in node:
|
|
50262
50284
|
0 && (module.exports = {
|
|
50263
50285
|
APP_THEMES,
|
|
@@ -50357,6 +50379,7 @@ var RufousTextEditor = ({
|
|
|
50357
50379
|
RufousBirdIcon,
|
|
50358
50380
|
RufousLauncherIcon,
|
|
50359
50381
|
RufousLogoLoader,
|
|
50382
|
+
RufousTextContent,
|
|
50360
50383
|
RufousTextEditor,
|
|
50361
50384
|
RufousThemeProvider,
|
|
50362
50385
|
Select,
|
package/dist/main.css
CHANGED
|
@@ -16289,6 +16289,178 @@ 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: 24px;
|
|
16349
|
+
}
|
|
16350
|
+
.rf-rte-content ul[data-type=taskList] li {
|
|
16351
|
+
display: flex;
|
|
16352
|
+
align-items: flex-start;
|
|
16353
|
+
gap: 8px;
|
|
16354
|
+
margin: 4px 0;
|
|
16355
|
+
}
|
|
16356
|
+
.rf-rte-content blockquote {
|
|
16357
|
+
border-left: 3px solid #6366f1;
|
|
16358
|
+
margin: 0.8em 0;
|
|
16359
|
+
padding: 0.4em 0 0.4em 16px;
|
|
16360
|
+
color: #4b5563;
|
|
16361
|
+
background: #f9fafb;
|
|
16362
|
+
border-radius: 0 4px 4px 0;
|
|
16363
|
+
}
|
|
16364
|
+
.rf-rte-content code {
|
|
16365
|
+
background: #f3f4f6;
|
|
16366
|
+
border-radius: 4px;
|
|
16367
|
+
padding: 2px 6px;
|
|
16368
|
+
font-size: 0.9em;
|
|
16369
|
+
color: #e11d48;
|
|
16370
|
+
font-family:
|
|
16371
|
+
"Fira Code",
|
|
16372
|
+
"Consolas",
|
|
16373
|
+
monospace;
|
|
16374
|
+
}
|
|
16375
|
+
.rf-rte-content pre {
|
|
16376
|
+
background: #1e1e2e;
|
|
16377
|
+
color: #cdd6f4;
|
|
16378
|
+
border-radius: 8px;
|
|
16379
|
+
padding: 16px;
|
|
16380
|
+
margin: 0.8em 0;
|
|
16381
|
+
overflow-x: auto;
|
|
16382
|
+
}
|
|
16383
|
+
.rf-rte-content pre code {
|
|
16384
|
+
background: none;
|
|
16385
|
+
color: inherit;
|
|
16386
|
+
padding: 0;
|
|
16387
|
+
font-size: 0.9em;
|
|
16388
|
+
}
|
|
16389
|
+
.rf-rte-content hr {
|
|
16390
|
+
border: none;
|
|
16391
|
+
border-top: 2px solid #e5e7eb;
|
|
16392
|
+
margin: 1.5em 0;
|
|
16393
|
+
}
|
|
16394
|
+
.rf-rte-content strong {
|
|
16395
|
+
font-weight: 700;
|
|
16396
|
+
}
|
|
16397
|
+
.rf-rte-content em {
|
|
16398
|
+
font-style: italic;
|
|
16399
|
+
}
|
|
16400
|
+
.rf-rte-content s {
|
|
16401
|
+
text-decoration: line-through;
|
|
16402
|
+
color: #9ca3af;
|
|
16403
|
+
}
|
|
16404
|
+
.rf-rte-content u {
|
|
16405
|
+
text-decoration: underline;
|
|
16406
|
+
}
|
|
16407
|
+
.rf-rte-content mark {
|
|
16408
|
+
border-radius: 2px;
|
|
16409
|
+
padding: 1px 2px;
|
|
16410
|
+
}
|
|
16411
|
+
.rf-rte-content table {
|
|
16412
|
+
border-collapse: collapse;
|
|
16413
|
+
width: 100%;
|
|
16414
|
+
margin: 0.8em 0;
|
|
16415
|
+
overflow: hidden;
|
|
16416
|
+
border-radius: 4px;
|
|
16417
|
+
}
|
|
16418
|
+
.rf-rte-content table td,
|
|
16419
|
+
.rf-rte-content table th {
|
|
16420
|
+
border: 1px solid #d1d5db;
|
|
16421
|
+
padding: 8px 12px;
|
|
16422
|
+
min-width: 80px;
|
|
16423
|
+
vertical-align: top;
|
|
16424
|
+
}
|
|
16425
|
+
.rf-rte-content table th {
|
|
16426
|
+
background: #f3f4f6;
|
|
16427
|
+
font-weight: 600;
|
|
16428
|
+
text-align: left;
|
|
16429
|
+
}
|
|
16430
|
+
.rf-rte-content img {
|
|
16431
|
+
max-width: 100%;
|
|
16432
|
+
height: auto;
|
|
16433
|
+
border-radius: 8px;
|
|
16434
|
+
margin: 0.8em 0;
|
|
16435
|
+
}
|
|
16436
|
+
.rf-rte-content video {
|
|
16437
|
+
max-width: 100%;
|
|
16438
|
+
}
|
|
16439
|
+
.rf-rte-content div[data-youtube-video] {
|
|
16440
|
+
margin: 0.8em 0;
|
|
16441
|
+
}
|
|
16442
|
+
.rf-rte-content div[data-youtube-video] iframe {
|
|
16443
|
+
border-radius: 8px;
|
|
16444
|
+
max-width: 100%;
|
|
16445
|
+
}
|
|
16446
|
+
.rf-rte-content .editor-link {
|
|
16447
|
+
color: #6366f1;
|
|
16448
|
+
text-decoration: underline;
|
|
16449
|
+
text-underline-offset: 2px;
|
|
16450
|
+
cursor: pointer;
|
|
16451
|
+
}
|
|
16452
|
+
.rf-rte-content .editor-link:hover {
|
|
16453
|
+
color: #4f46e5;
|
|
16454
|
+
}
|
|
16455
|
+
.rf-rte-content .mention {
|
|
16456
|
+
background: #fef2f2;
|
|
16457
|
+
color: #991b1b;
|
|
16458
|
+
border-radius: 4px;
|
|
16459
|
+
padding: 1px 4px;
|
|
16460
|
+
font-weight: 600;
|
|
16461
|
+
font-size: 0.95em;
|
|
16462
|
+
white-space: nowrap;
|
|
16463
|
+
}
|
|
16292
16464
|
/*! Bundled license information:
|
|
16293
16465
|
|
|
16294
16466
|
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);
|
|
@@ -21043,9 +21046,12 @@ function createSpellCheckPlugin() {
|
|
|
21043
21046
|
const meta = tr.getMeta(spellCheckPluginKey);
|
|
21044
21047
|
if (meta?.decorations) return meta.decorations;
|
|
21045
21048
|
if (tr.docChanged) {
|
|
21046
|
-
if (newState.doc.content.size <=
|
|
21049
|
+
if (newState.doc.content.size <= 4) return DecorationSet.empty;
|
|
21050
|
+
if (oldDecos === DecorationSet.empty) return DecorationSet.empty;
|
|
21047
21051
|
try {
|
|
21048
|
-
|
|
21052
|
+
const mapped = oldDecos.map(tr.mapping, tr.doc);
|
|
21053
|
+
if (!mapped || typeof mapped.find !== "function") return DecorationSet.empty;
|
|
21054
|
+
return mapped;
|
|
21049
21055
|
} catch {
|
|
21050
21056
|
return DecorationSet.empty;
|
|
21051
21057
|
}
|
|
@@ -21055,7 +21061,14 @@ function createSpellCheckPlugin() {
|
|
|
21055
21061
|
},
|
|
21056
21062
|
props: {
|
|
21057
21063
|
decorations(state) {
|
|
21058
|
-
|
|
21064
|
+
try {
|
|
21065
|
+
const decos = spellCheckPluginKey.getState(state);
|
|
21066
|
+
if (!decos || decos === DecorationSet.empty) return DecorationSet.empty;
|
|
21067
|
+
decos.find();
|
|
21068
|
+
return decos;
|
|
21069
|
+
} catch {
|
|
21070
|
+
return DecorationSet.empty;
|
|
21071
|
+
}
|
|
21059
21072
|
}
|
|
21060
21073
|
},
|
|
21061
21074
|
view(editorView) {
|
|
@@ -21589,6 +21602,14 @@ var RufousTextEditor = ({
|
|
|
21589
21602
|
}
|
|
21590
21603
|
), "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
21604
|
};
|
|
21605
|
+
var RufousTextContent = ({ content, className, style }) => /* @__PURE__ */ React117.createElement(
|
|
21606
|
+
"div",
|
|
21607
|
+
{
|
|
21608
|
+
className: `rf-rte-content ${className || ""}`,
|
|
21609
|
+
style,
|
|
21610
|
+
dangerouslySetInnerHTML: { __html: content }
|
|
21611
|
+
}
|
|
21612
|
+
);
|
|
21592
21613
|
export {
|
|
21593
21614
|
APP_THEMES,
|
|
21594
21615
|
Accordion,
|
|
@@ -21687,6 +21708,7 @@ export {
|
|
|
21687
21708
|
rufousBirdIcon_default as RufousBirdIcon,
|
|
21688
21709
|
rufousLauncherBird_default as RufousLauncherIcon,
|
|
21689
21710
|
RufousLogoLoader,
|
|
21711
|
+
RufousTextContent,
|
|
21690
21712
|
RufousTextEditor,
|
|
21691
21713
|
RufousThemeProvider,
|
|
21692
21714
|
Select,
|