@comet/admin-rte 8.9.1-canary-20251203060756 → 8.10.0-canary-20251203081652

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.
@@ -14,15 +14,15 @@ var Root = exports.Root = (0, _admin.createComponentSlot)("div")({
14
14
  componentName: "RteToolbar",
15
15
  slotName: "root"
16
16
  })(function (_ref) {
17
- var _getRteTheme$colors, _theme$components, _getRteTheme$colors2, _theme$components2;
17
+ var _getRteTheme$colors, _theme$components;
18
18
  var theme = _ref.theme;
19
- return (0, _styles.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: sticky;\n top: 0;\n z-index: 2;\n display: flex;\n flex-wrap: wrap;\n border-top: 1px solid ", ";\n background-color: ", ";\n padding-left: 6px;\n padding-right: 6px;\n overflow: hidden;\n "])), (_getRteTheme$colors = (0, _getRteTheme["default"])((_theme$components = theme.components) === null || _theme$components === void 0 || (_theme$components = _theme$components.CometAdminRte) === null || _theme$components === void 0 ? void 0 : _theme$components.defaultProps).colors) === null || _getRteTheme$colors === void 0 ? void 0 : _getRteTheme$colors.border, (_getRteTheme$colors2 = (0, _getRteTheme["default"])((_theme$components2 = theme.components) === null || _theme$components2 === void 0 || (_theme$components2 = _theme$components2.CometAdminRte) === null || _theme$components2 === void 0 ? void 0 : _theme$components2.defaultProps).colors) === null || _getRteTheme$colors2 === void 0 ? void 0 : _getRteTheme$colors2.toolbarBackground);
19
+ return (0, _styles.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: sticky;\n top: 0;\n z-index: 2;\n display: flex;\n flex-wrap: wrap;\n border-top: 1px solid var(--comet-admin-rte-outer-border-color);\n background-color: ", ";\n padding-left: 6px;\n padding-right: 6px;\n overflow: hidden;\n "])), (_getRteTheme$colors = (0, _getRteTheme["default"])((_theme$components = theme.components) === null || _theme$components === void 0 || (_theme$components = _theme$components.CometAdminRte) === null || _theme$components === void 0 ? void 0 : _theme$components.defaultProps).colors) === null || _getRteTheme$colors === void 0 ? void 0 : _getRteTheme$colors.toolbarBackground);
20
20
  });
21
21
  var Slot = exports.Slot = (0, _admin.createComponentSlot)("div")({
22
22
  componentName: "RteToolbar",
23
23
  slotName: "slot"
24
24
  })(function (_ref2) {
25
- var _getRteTheme$colors3, _theme$components3;
25
+ var _getRteTheme$colors2, _theme$components2;
26
26
  var theme = _ref2.theme;
27
- return (0, _styles.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: relative;\n flex-shrink: 0;\n flex-grow: 0;\n height: 34px;\n box-sizing: border-box;\n padding-top: 5px;\n padding-bottom: 5px;\n padding-right: 6px;\n margin-right: 5px;\n\n &::before,\n &::after {\n content: \"\";\n position: absolute;\n background-color: ", ";\n }\n\n &::before {\n bottom: 0;\n height: 1px;\n left: -100vw;\n right: -100vw;\n }\n\n &::after {\n top: 8px;\n right: 0;\n bottom: 8px;\n width: 1px;\n }\n\n &:last-child {\n margin-right: 0;\n }\n\n &:last-child::after {\n display: none;\n }\n "])), (_getRteTheme$colors3 = (0, _getRteTheme["default"])((_theme$components3 = theme.components) === null || _theme$components3 === void 0 || (_theme$components3 = _theme$components3.CometAdminRte) === null || _theme$components3 === void 0 ? void 0 : _theme$components3.defaultProps).colors) === null || _getRteTheme$colors3 === void 0 ? void 0 : _getRteTheme$colors3.border);
27
+ return (0, _styles.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: relative;\n flex-shrink: 0;\n flex-grow: 0;\n height: 34px;\n box-sizing: border-box;\n padding-top: 5px;\n padding-bottom: 5px;\n padding-right: 6px;\n margin-right: 5px;\n\n &::before,\n &::after {\n content: \"\";\n position: absolute;\n background-color: ", ";\n }\n\n &::before {\n bottom: 0;\n height: 1px;\n left: -100vw;\n right: -100vw;\n }\n\n &::after {\n top: 8px;\n right: 0;\n bottom: 8px;\n width: 1px;\n }\n\n &:last-child {\n margin-right: 0;\n }\n\n &:last-child::after {\n display: none;\n }\n "])), (_getRteTheme$colors2 = (0, _getRteTheme["default"])((_theme$components2 = theme.components) === null || _theme$components2 === void 0 || (_theme$components2 = _theme$components2.CometAdminRte) === null || _theme$components2 === void 0 ? void 0 : _theme$components2.defaultProps).colors) === null || _getRteTheme$colors2 === void 0 ? void 0 : _getRteTheme$colors2.border);
28
28
  });
package/lib/core/Rte.d.ts CHANGED
@@ -2,8 +2,9 @@ import "draft-js/dist/Draft.css";
2
2
  import { type ThemedComponentBaseProps } from "@comet/admin";
3
3
  import { type ComponentsOverrides, type Theme } from "@mui/material";
4
4
  import { type DraftBlockType, type EditorProps as DraftJsEditorProps, type EditorState } from "draft-js";
5
- import { type CSSProperties, type ForwardRefExoticComponent, type PropsWithoutRef, type RefAttributes } from "react";
5
+ import { type ForwardRefExoticComponent, type PropsWithoutRef, type RefAttributes } from "react";
6
6
  import { type CustomInlineStyles, type IBlocktypeMap, type ICustomBlockTypeMap_Deprecated, type ToolbarButtonComponent } from "./types";
7
+ import { type RteThemeColors } from "./utils/getRteTheme";
7
8
  export type SupportedThings = "bold" | "italic" | "underline" | "strikethrough" | "sub" | "sup" | "header-one" | "header-two" | "header-three" | "header-four" | "header-five" | "header-six" | "ordered-list" | "unordered-list" | "blockquote" | "history" | "link" | "links-remove" | "non-breaking-space" | "soft-hyphen";
8
9
  export interface IRteOptions {
9
10
  supports: SupportedThings[];
@@ -35,15 +36,7 @@ export interface RteProps extends ThemedComponentBaseProps<{
35
36
  options?: IOptions;
36
37
  disabled?: boolean;
37
38
  minHeight?: number;
38
- colors?: {
39
- border?: CSSProperties["color"];
40
- toolbarBackground?: CSSProperties["color"];
41
- buttonIcon?: CSSProperties["color"];
42
- buttonIconDisabled?: CSSProperties["color"];
43
- buttonBackgroundHover?: CSSProperties["color"];
44
- buttonBorderHover?: CSSProperties["color"];
45
- buttonBorderDisabled?: CSSProperties["color"];
46
- };
39
+ colors?: Partial<RteThemeColors>;
47
40
  }
48
41
  export declare const defaultOptions: IRteOptions;
49
42
  export interface IRteRef {
@@ -1 +1 @@
1
-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HANGED
@@ -246,9 +246,9 @@ var Root = (0, _admin.createComponentSlot)("div")({
246
246
  return [ownerState.disabled && "disabled"];
247
247
  }
248
248
  })(function (_ref3) {
249
- var _theme$components;
249
+ var _theme$components, _theme$components2, _theme$components3;
250
250
  var theme = _ref3.theme;
251
- return (0, _material.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n border-top-width: 0;\n background-color: #fff;\n "])), (0, _getRteTheme["default"])((_theme$components = theme.components) === null || _theme$components === void 0 || (_theme$components = _theme$components.CometAdminRte) === null || _theme$components === void 0 ? void 0 : _theme$components.defaultProps).colors.border);
251
+ return (0, _material.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n --comet-admin-rte-outer-border-color: ", ";\n border: 1px solid var(--comet-admin-rte-outer-border-color);\n border-top-width: 0; // To prevent the top border from being hidden, when to toolbar is sticky, the top border must be handled by the Toolbar itself\n background-color: #fff;\n border-radius: 2px;\n\n &:hover {\n --comet-admin-rte-outer-border-color: ", ";\n }\n\n &:focus-within {\n --comet-admin-rte-outer-border-color: ", ";\n }\n "])), (0, _getRteTheme["default"])((_theme$components = theme.components) === null || _theme$components === void 0 || (_theme$components = _theme$components.CometAdminRte) === null || _theme$components === void 0 ? void 0 : _theme$components.defaultProps).colors.border, (0, _getRteTheme["default"])((_theme$components2 = theme.components) === null || _theme$components2 === void 0 || (_theme$components2 = _theme$components2.CometAdminRte) === null || _theme$components2 === void 0 ? void 0 : _theme$components2.defaultProps).colors.outerBorderOnHover, (0, _getRteTheme["default"])((_theme$components3 = theme.components) === null || _theme$components3 === void 0 || (_theme$components3 = _theme$components3.CometAdminRte) === null || _theme$components3 === void 0 ? void 0 : _theme$components3.defaultProps).colors.outerBorderOnFocus);
252
252
  });
253
253
  var Editor = (0, _admin.createComponentSlot)("div")({
254
254
  componentName: "Rte",
@@ -1,15 +1,18 @@
1
1
  import { type CSSProperties } from "react";
2
2
  import { type RteProps } from "../Rte";
3
+ export type RteThemeColors = {
4
+ border: CSSProperties["color"];
5
+ outerBorderOnHover: CSSProperties["color"];
6
+ outerBorderOnFocus: CSSProperties["color"];
7
+ toolbarBackground: CSSProperties["color"];
8
+ buttonIcon: CSSProperties["color"];
9
+ buttonIconDisabled: CSSProperties["color"];
10
+ buttonBackgroundHover: CSSProperties["color"];
11
+ buttonBorderHover: CSSProperties["color"];
12
+ buttonBorderDisabled: CSSProperties["color"];
13
+ };
3
14
  interface RteTheme {
4
- colors: {
5
- border: CSSProperties["color"];
6
- toolbarBackground: CSSProperties["color"];
7
- buttonIcon: CSSProperties["color"];
8
- buttonIconDisabled: CSSProperties["color"];
9
- buttonBackgroundHover: CSSProperties["color"];
10
- buttonBorderHover: CSSProperties["color"];
11
- buttonBorderDisabled: CSSProperties["color"];
12
- };
15
+ colors: RteThemeColors;
13
16
  }
14
17
  declare const _default: (themeProps: Partial<RteProps> | undefined) => RteTheme;
15
18
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"getRteTheme.d.ts","sourceRoot":"","sources":["../../../src/core/utils/getRteTheme.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAEvC,UAAU,QAAQ;IACd,MAAM,EAAE;QACJ,MAAM,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;QAC/B,iBAAiB,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;QAC1C,UAAU,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;QACnC,kBAAkB,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;QAC3C,qBAAqB,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;QAC9C,iBAAiB,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;QAC1C,oBAAoB,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;KAChD,CAAC;CACL;yBAEe,YAAY,OAAO,CAAC,QAAQ,CAAC,GAAG,SAAS,KAAG,QAAQ;AAApE,wBAYE"}
1
+ {"version":3,"file":"getRteTheme.d.ts","sourceRoot":"","sources":["../../../src/core/utils/getRteTheme.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAEvC,MAAM,MAAM,cAAc,GAAG;IACzB,MAAM,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC/B,kBAAkB,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC3C,kBAAkB,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC3C,iBAAiB,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC1C,UAAU,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IACnC,kBAAkB,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC3C,qBAAqB,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC9C,iBAAiB,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC1C,oBAAoB,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;CAChD,CAAC;AAEF,UAAU,QAAQ;IACd,MAAM,EAAE,cAAc,CAAC;CAC1B;yBAEe,YAAY,OAAO,CAAC,QAAQ,CAAC,GAAG,SAAS,KAAG,QAAQ;AAApE,wBAcE"}
@@ -4,18 +4,21 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports["default"] = void 0;
7
+ var _admin = require("@comet/admin");
7
8
  var _colors = require("@mui/material/colors");
8
9
  var _default = exports["default"] = function _default(themeProps) {
9
- var _themeProps$colors, _themeProps$colors2, _themeProps$colors3, _themeProps$colors4, _themeProps$colors5, _themeProps$colors6, _themeProps$colors7;
10
+ var _themeProps$colors, _themeProps$colors2, _themeProps$colors3, _themeProps$colors4, _themeProps$colors5, _themeProps$colors6, _themeProps$colors7, _themeProps$colors8, _themeProps$colors9;
10
11
  return {
11
12
  colors: {
12
- border: themeProps !== null && themeProps !== void 0 && (_themeProps$colors = themeProps.colors) !== null && _themeProps$colors !== void 0 && _themeProps$colors.border ? themeProps.colors.border : _colors.grey[400],
13
- toolbarBackground: themeProps !== null && themeProps !== void 0 && (_themeProps$colors2 = themeProps.colors) !== null && _themeProps$colors2 !== void 0 && _themeProps$colors2.toolbarBackground ? themeProps.colors.toolbarBackground : _colors.grey[100],
14
- buttonIcon: themeProps !== null && themeProps !== void 0 && (_themeProps$colors3 = themeProps.colors) !== null && _themeProps$colors3 !== void 0 && _themeProps$colors3.buttonIcon ? themeProps.colors.buttonIcon : _colors.grey[600],
15
- buttonIconDisabled: themeProps !== null && themeProps !== void 0 && (_themeProps$colors4 = themeProps.colors) !== null && _themeProps$colors4 !== void 0 && _themeProps$colors4.buttonIconDisabled ? themeProps.colors.buttonIconDisabled : _colors.grey[300],
16
- buttonBackgroundHover: themeProps !== null && themeProps !== void 0 && (_themeProps$colors5 = themeProps.colors) !== null && _themeProps$colors5 !== void 0 && _themeProps$colors5.buttonBackgroundHover ? themeProps.colors.buttonBackgroundHover : _colors.grey[200],
17
- buttonBorderHover: themeProps !== null && themeProps !== void 0 && (_themeProps$colors6 = themeProps.colors) !== null && _themeProps$colors6 !== void 0 && _themeProps$colors6.buttonBorderHover ? themeProps.colors.buttonBorderHover : _colors.grey[400],
18
- buttonBorderDisabled: themeProps !== null && themeProps !== void 0 && (_themeProps$colors7 = themeProps.colors) !== null && _themeProps$colors7 !== void 0 && _themeProps$colors7.buttonBorderDisabled ? themeProps.colors.buttonBorderDisabled : _colors.grey[100]
13
+ border: themeProps !== null && themeProps !== void 0 && (_themeProps$colors = themeProps.colors) !== null && _themeProps$colors !== void 0 && _themeProps$colors.border ? themeProps.colors.border : _admin.greyPalette[100],
14
+ outerBorderOnHover: themeProps !== null && themeProps !== void 0 && (_themeProps$colors2 = themeProps.colors) !== null && _themeProps$colors2 !== void 0 && _themeProps$colors2.outerBorderOnHover ? themeProps.colors.outerBorderOnHover : _admin.greyPalette[200],
15
+ outerBorderOnFocus: themeProps !== null && themeProps !== void 0 && (_themeProps$colors3 = themeProps.colors) !== null && _themeProps$colors3 !== void 0 && _themeProps$colors3.outerBorderOnFocus ? themeProps.colors.outerBorderOnFocus : _admin.primaryPalette.main,
16
+ toolbarBackground: themeProps !== null && themeProps !== void 0 && (_themeProps$colors4 = themeProps.colors) !== null && _themeProps$colors4 !== void 0 && _themeProps$colors4.toolbarBackground ? themeProps.colors.toolbarBackground : _colors.grey[100],
17
+ buttonIcon: themeProps !== null && themeProps !== void 0 && (_themeProps$colors5 = themeProps.colors) !== null && _themeProps$colors5 !== void 0 && _themeProps$colors5.buttonIcon ? themeProps.colors.buttonIcon : _colors.grey[600],
18
+ buttonIconDisabled: themeProps !== null && themeProps !== void 0 && (_themeProps$colors6 = themeProps.colors) !== null && _themeProps$colors6 !== void 0 && _themeProps$colors6.buttonIconDisabled ? themeProps.colors.buttonIconDisabled : _colors.grey[300],
19
+ buttonBackgroundHover: themeProps !== null && themeProps !== void 0 && (_themeProps$colors7 = themeProps.colors) !== null && _themeProps$colors7 !== void 0 && _themeProps$colors7.buttonBackgroundHover ? themeProps.colors.buttonBackgroundHover : _colors.grey[200],
20
+ buttonBorderHover: themeProps !== null && themeProps !== void 0 && (_themeProps$colors8 = themeProps.colors) !== null && _themeProps$colors8 !== void 0 && _themeProps$colors8.buttonBorderHover ? themeProps.colors.buttonBorderHover : _colors.grey[400],
21
+ buttonBorderDisabled: themeProps !== null && themeProps !== void 0 && (_themeProps$colors9 = themeProps.colors) !== null && _themeProps$colors9 !== void 0 && _themeProps$colors9.buttonBorderDisabled ? themeProps.colors.buttonBorderDisabled : _colors.grey[100]
19
22
  }
20
23
  };
21
24
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comet/admin-rte",
3
- "version": "8.9.1-canary-20251203060756",
3
+ "version": "8.10.0-canary-20251203081652",
4
4
  "description": "Comet Admin Rich Text Editor component",
5
5
  "repository": {
6
6
  "directory": "packages/admin/admin-rte",
@@ -20,8 +20,8 @@
20
20
  "draft-js-import-html": "^1.4.1",
21
21
  "draftjs-conductor": "^3.0.0",
22
22
  "immutable": "~3.8.2",
23
- "@comet/admin": "8.9.1-canary-20251203060756",
24
- "@comet/admin-icons": "8.9.1-canary-20251203060756"
23
+ "@comet/admin": "8.10.0-canary-20251203081652",
24
+ "@comet/admin-icons": "8.10.0-canary-20251203081652"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@babel/cli": "^7.28.0",
@@ -45,8 +45,8 @@
45
45
  "rimraf": "^6.0.1",
46
46
  "ts-jest": "^29.4.0",
47
47
  "typescript": "5.9.3",
48
- "@comet/admin-babel-preset": "8.9.1-canary-20251203060756",
49
- "@comet/eslint-config": "8.9.1-canary-20251203060756"
48
+ "@comet/admin-babel-preset": "8.10.0-canary-20251203081652",
49
+ "@comet/eslint-config": "8.10.0-canary-20251203081652"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "@mui/material": "^7.0.0",