@dextinity/admin-rte 2.0.0-canary-20260729062014

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (201) hide show
  1. package/LICENSE +24 -0
  2. package/lib/core/BlockElement.d.ts +29 -0
  3. package/lib/core/BlockElement.d.ts.map +1 -0
  4. package/lib/core/BlockElement.js +43 -0
  5. package/lib/core/Controls/BlockTypesControls.d.ts +16 -0
  6. package/lib/core/Controls/BlockTypesControls.d.ts.map +1 -0
  7. package/lib/core/Controls/BlockTypesControls.js +91 -0
  8. package/lib/core/Controls/ControlButton.d.ts +28 -0
  9. package/lib/core/Controls/ControlButton.d.ts.map +1 -0
  10. package/lib/core/Controls/ControlButton.js +62 -0
  11. package/lib/core/Controls/Controls.d.ts +3 -0
  12. package/lib/core/Controls/Controls.d.ts.map +1 -0
  13. package/lib/core/Controls/Controls.js +30 -0
  14. package/lib/core/Controls/CustomControls.d.ts +3 -0
  15. package/lib/core/Controls/CustomControls.d.ts.map +1 -0
  16. package/lib/core/Controls/CustomControls.js +20 -0
  17. package/lib/core/Controls/FeaturesButtonGroup.d.ts +30 -0
  18. package/lib/core/Controls/FeaturesButtonGroup.d.ts.map +1 -0
  19. package/lib/core/Controls/FeaturesButtonGroup.js +147 -0
  20. package/lib/core/Controls/HistoryContols.d.ts +3 -0
  21. package/lib/core/Controls/HistoryContols.d.ts.map +1 -0
  22. package/lib/core/Controls/HistoryContols.js +24 -0
  23. package/lib/core/Controls/InlineStyleTypeControls.d.ts +3 -0
  24. package/lib/core/Controls/InlineStyleTypeControls.d.ts.map +1 -0
  25. package/lib/core/Controls/InlineStyleTypeControls.js +29 -0
  26. package/lib/core/Controls/LinkControls.d.ts +26 -0
  27. package/lib/core/Controls/LinkControls.d.ts.map +1 -0
  28. package/lib/core/Controls/LinkControls.js +54 -0
  29. package/lib/core/Controls/ListsControls.d.ts +3 -0
  30. package/lib/core/Controls/ListsControls.d.ts.map +1 -0
  31. package/lib/core/Controls/ListsControls.js +30 -0
  32. package/lib/core/Controls/ListsIndentControls.d.ts +3 -0
  33. package/lib/core/Controls/ListsIndentControls.d.ts.map +1 -0
  34. package/lib/core/Controls/ListsIndentControls.js +27 -0
  35. package/lib/core/Controls/SpecialCharactersControls.d.ts +4 -0
  36. package/lib/core/Controls/SpecialCharactersControls.d.ts.map +1 -0
  37. package/lib/core/Controls/SpecialCharactersControls.js +20 -0
  38. package/lib/core/Controls/Toolbar/Toolbar.d.ts +28 -0
  39. package/lib/core/Controls/Toolbar/Toolbar.d.ts.map +1 -0
  40. package/lib/core/Controls/Toolbar/Toolbar.js +41 -0
  41. package/lib/core/Controls/Toolbar/Toolbar.styles.d.ts +14 -0
  42. package/lib/core/Controls/Toolbar/Toolbar.styles.d.ts.map +1 -0
  43. package/lib/core/Controls/Toolbar/Toolbar.styles.js +21 -0
  44. package/lib/core/Controls/TranslationControls.d.ts +4 -0
  45. package/lib/core/Controls/TranslationControls.d.ts.map +1 -0
  46. package/lib/core/Controls/TranslationControls.js +20 -0
  47. package/lib/core/Controls/useBlockTypes.d.ts +23 -0
  48. package/lib/core/Controls/useBlockTypes.d.ts.map +1 -0
  49. package/lib/core/Controls/useBlockTypes.js +116 -0
  50. package/lib/core/Controls/useHistory.d.ts +13 -0
  51. package/lib/core/Controls/useHistory.d.ts.map +1 -0
  52. package/lib/core/Controls/useHistory.js +63 -0
  53. package/lib/core/Controls/useInlineStyleType.d.ts +16 -0
  54. package/lib/core/Controls/useInlineStyleType.d.ts.map +1 -0
  55. package/lib/core/Controls/useInlineStyleType.js +148 -0
  56. package/lib/core/Controls/useListIndent.d.ts +14 -0
  57. package/lib/core/Controls/useListIndent.d.ts.map +1 -0
  58. package/lib/core/Controls/useListIndent.js +114 -0
  59. package/lib/core/Rte.d.ts +72 -0
  60. package/lib/core/Rte.d.ts.map +1 -0
  61. package/lib/core/Rte.js +256 -0
  62. package/lib/core/RteReadOnly.d.ts +19 -0
  63. package/lib/core/RteReadOnly.d.ts.map +1 -0
  64. package/lib/core/RteReadOnly.js +62 -0
  65. package/lib/core/defaultBlocktypeMap.d.ts +6 -0
  66. package/lib/core/defaultBlocktypeMap.d.ts.map +1 -0
  67. package/lib/core/defaultBlocktypeMap.js +235 -0
  68. package/lib/core/extension/Link/Decorator.d.ts +5 -0
  69. package/lib/core/extension/Link/Decorator.d.ts.map +1 -0
  70. package/lib/core/extension/Link/Decorator.js +13 -0
  71. package/lib/core/extension/Link/EditorComponent.d.ts +12 -0
  72. package/lib/core/extension/Link/EditorComponent.d.ts.map +1 -0
  73. package/lib/core/extension/Link/EditorComponent.js +14 -0
  74. package/lib/core/extension/Link/ToolbarButton.d.ts +3 -0
  75. package/lib/core/extension/Link/ToolbarButton.d.ts.map +1 -0
  76. package/lib/core/extension/Link/ToolbarButton.js +162 -0
  77. package/lib/core/extension/LinksRemove/ToolbarButton.d.ts +3 -0
  78. package/lib/core/extension/LinksRemove/ToolbarButton.d.ts.map +1 -0
  79. package/lib/core/extension/LinksRemove/ToolbarButton.js +20 -0
  80. package/lib/core/extension/NonBreakingSpace/Decorator.d.ts +4 -0
  81. package/lib/core/extension/NonBreakingSpace/Decorator.d.ts.map +1 -0
  82. package/lib/core/extension/NonBreakingSpace/Decorator.js +17 -0
  83. package/lib/core/extension/NonBreakingSpace/EditorComponent.d.ts +9 -0
  84. package/lib/core/extension/NonBreakingSpace/EditorComponent.d.ts.map +1 -0
  85. package/lib/core/extension/NonBreakingSpace/EditorComponent.js +37 -0
  86. package/lib/core/extension/NonBreakingSpace/ToolbarButton.d.ts +4 -0
  87. package/lib/core/extension/NonBreakingSpace/ToolbarButton.d.ts.map +1 -0
  88. package/lib/core/extension/NonBreakingSpace/ToolbarButton.js +42 -0
  89. package/lib/core/extension/SoftHyphen/Decorator.d.ts +4 -0
  90. package/lib/core/extension/SoftHyphen/Decorator.d.ts.map +1 -0
  91. package/lib/core/extension/SoftHyphen/Decorator.js +17 -0
  92. package/lib/core/extension/SoftHyphen/EditorComponent.d.ts +9 -0
  93. package/lib/core/extension/SoftHyphen/EditorComponent.d.ts.map +1 -0
  94. package/lib/core/extension/SoftHyphen/EditorComponent.js +24 -0
  95. package/lib/core/extension/SoftHyphen/ToolbarButton.d.ts +3 -0
  96. package/lib/core/extension/SoftHyphen/ToolbarButton.d.ts.map +1 -0
  97. package/lib/core/extension/SoftHyphen/ToolbarButton.js +35 -0
  98. package/lib/core/filterEditor/composeFilterEditorFns.d.ts +4 -0
  99. package/lib/core/filterEditor/composeFilterEditorFns.d.ts.map +1 -0
  100. package/lib/core/filterEditor/composeFilterEditorFns.js +8 -0
  101. package/lib/core/filterEditor/default.d.ts +4 -0
  102. package/lib/core/filterEditor/default.d.ts.map +1 -0
  103. package/lib/core/filterEditor/default.js +16 -0
  104. package/lib/core/filterEditor/manageStandardBlockType.d.ts +4 -0
  105. package/lib/core/filterEditor/manageStandardBlockType.d.ts.map +1 -0
  106. package/lib/core/filterEditor/manageStandardBlockType.js +16 -0
  107. package/lib/core/filterEditor/removeBlocksExceedingBlockLimit.d.ts +4 -0
  108. package/lib/core/filterEditor/removeBlocksExceedingBlockLimit.d.ts.map +1 -0
  109. package/lib/core/filterEditor/removeBlocksExceedingBlockLimit.js +22 -0
  110. package/lib/core/filterEditor/removeUnsupportedBlockTypes.d.ts +4 -0
  111. package/lib/core/filterEditor/removeUnsupportedBlockTypes.d.ts.map +1 -0
  112. package/lib/core/filterEditor/removeUnsupportedBlockTypes.js +35 -0
  113. package/lib/core/filterEditor/removeUnsupportedEntities.d.ts +4 -0
  114. package/lib/core/filterEditor/removeUnsupportedEntities.d.ts.map +1 -0
  115. package/lib/core/filterEditor/removeUnsupportedEntities.js +18 -0
  116. package/lib/core/filterEditor/removeUnsupportedInlineStyles.d.ts +4 -0
  117. package/lib/core/filterEditor/removeUnsupportedInlineStyles.d.ts.map +1 -0
  118. package/lib/core/filterEditor/removeUnsupportedInlineStyles.js +26 -0
  119. package/lib/core/filterEditor/removeUnsupportedListLevels.d.ts +4 -0
  120. package/lib/core/filterEditor/removeUnsupportedListLevels.d.ts.map +1 -0
  121. package/lib/core/filterEditor/removeUnsupportedListLevels.js +16 -0
  122. package/lib/core/filterEditor/utils/changeBlockType.d.ts +9 -0
  123. package/lib/core/filterEditor/utils/changeBlockType.d.ts.map +1 -0
  124. package/lib/core/filterEditor/utils/changeBlockType.js +37 -0
  125. package/lib/core/filterEditor/utils/manipulateEntityData.d.ts +6 -0
  126. package/lib/core/filterEditor/utils/manipulateEntityData.d.ts.map +1 -0
  127. package/lib/core/filterEditor/utils/manipulateEntityData.js +43 -0
  128. package/lib/core/filterEditor/utils/removeEntities.d.ts +6 -0
  129. package/lib/core/filterEditor/utils/removeEntities.d.ts.map +1 -0
  130. package/lib/core/filterEditor/utils/removeEntities.js +34 -0
  131. package/lib/core/filterEditor/utils/removeInlineStyles.d.ts +5 -0
  132. package/lib/core/filterEditor/utils/removeInlineStyles.d.ts.map +1 -0
  133. package/lib/core/filterEditor/utils/removeInlineStyles.js +28 -0
  134. package/lib/core/makeRteApi.d.ts +26 -0
  135. package/lib/core/makeRteApi.d.ts.map +1 -0
  136. package/lib/core/makeRteApi.js +86 -0
  137. package/lib/core/translation/EditorStateTranslationDialog.d.ts +11 -0
  138. package/lib/core/translation/EditorStateTranslationDialog.d.ts.map +1 -0
  139. package/lib/core/translation/EditorStateTranslationDialog.js +32 -0
  140. package/lib/core/translation/ToolbarButton.d.ts +4 -0
  141. package/lib/core/translation/ToolbarButton.d.ts.map +1 -0
  142. package/lib/core/translation/ToolbarButton.js +98 -0
  143. package/lib/core/translation/htmlToState.d.ts +9 -0
  144. package/lib/core/translation/htmlToState.d.ts.map +1 -0
  145. package/lib/core/translation/htmlToState.js +53 -0
  146. package/lib/core/translation/htmlToState.spec.d.ts +2 -0
  147. package/lib/core/translation/htmlToState.spec.d.ts.map +1 -0
  148. package/lib/core/translation/stateToHtml.d.ts +13 -0
  149. package/lib/core/translation/stateToHtml.d.ts.map +1 -0
  150. package/lib/core/translation/stateToHtml.js +60 -0
  151. package/lib/core/translation/stateToHtml.spec.d.ts +2 -0
  152. package/lib/core/translation/stateToHtml.spec.d.ts.map +1 -0
  153. package/lib/core/types.d.ts +64 -0
  154. package/lib/core/types.d.ts.map +1 -0
  155. package/lib/core/types.js +1 -0
  156. package/lib/core/utils/createBlockRenderMap.d.ts +6 -0
  157. package/lib/core/utils/createBlockRenderMap.d.ts.map +1 -0
  158. package/lib/core/utils/createBlockRenderMap.js +22 -0
  159. package/lib/core/utils/findEntityDataInCurrentSelection.d.ts +3 -0
  160. package/lib/core/utils/findEntityDataInCurrentSelection.d.ts.map +1 -0
  161. package/lib/core/utils/findEntityDataInCurrentSelection.js +12 -0
  162. package/lib/core/utils/findEntityInCurrentSelection.d.ts +8 -0
  163. package/lib/core/utils/findEntityInCurrentSelection.d.ts.map +1 -0
  164. package/lib/core/utils/findEntityInCurrentSelection.js +81 -0
  165. package/lib/core/utils/findTextInCurrentSelection.d.ts +3 -0
  166. package/lib/core/utils/findTextInCurrentSelection.d.ts.map +1 -0
  167. package/lib/core/utils/findTextInCurrentSelection.js +16 -0
  168. package/lib/core/utils/getCurrentBlock.d.ts +3 -0
  169. package/lib/core/utils/getCurrentBlock.d.ts.map +1 -0
  170. package/lib/core/utils/getCurrentBlock.js +7 -0
  171. package/lib/core/utils/getRteTheme.d.ts +19 -0
  172. package/lib/core/utils/getRteTheme.d.ts.map +1 -0
  173. package/lib/core/utils/getRteTheme.js +18 -0
  174. package/lib/core/utils/pasteAndFilterText.d.ts +5 -0
  175. package/lib/core/utils/pasteAndFilterText.d.ts.map +1 -0
  176. package/lib/core/utils/pasteAndFilterText.js +17 -0
  177. package/lib/core/utils/rangesIntersect.d.ts +6 -0
  178. package/lib/core/utils/rangesIntersect.d.ts.map +1 -0
  179. package/lib/core/utils/rangesIntersect.js +22 -0
  180. package/lib/core/utils/selectionIsInOneBlock.d.ts +3 -0
  181. package/lib/core/utils/selectionIsInOneBlock.d.ts.map +1 -0
  182. package/lib/core/utils/selectionIsInOneBlock.js +6 -0
  183. package/lib/field/createFinalFormRte.d.ts +22 -0
  184. package/lib/field/createFinalFormRte.d.ts.map +1 -0
  185. package/lib/field/createFinalFormRte.js +84 -0
  186. package/lib/field/createRteField.d.ts +13 -0
  187. package/lib/field/createRteField.d.ts.map +1 -0
  188. package/lib/field/createRteField.js +44 -0
  189. package/lib/index.d.ts +31 -0
  190. package/lib/index.d.ts.map +1 -0
  191. package/lib/index.js +29 -0
  192. package/lib/useDebounce.d.ts +2 -0
  193. package/lib/useDebounce.d.ts.map +1 -0
  194. package/lib/useDebounce.js +32 -0
  195. package/lib/usePrevious.d.ts +4 -0
  196. package/lib/usePrevious.d.ts.map +1 -0
  197. package/lib/usePrevious.js +20 -0
  198. package/lib/utils/requiredValidator.d.ts +4 -0
  199. package/lib/utils/requiredValidator.d.ts.map +1 -0
  200. package/lib/utils/requiredValidator.js +16 -0
  201. package/package.json +93 -0
package/package.json ADDED
@@ -0,0 +1,93 @@
1
+ {
2
+ "name": "@dextinity/admin-rte",
3
+ "version": "2.0.0-canary-20260729062014",
4
+ "description": "Comet Admin Rich Text Editor component",
5
+ "repository": {
6
+ "directory": "packages/admin/admin-rte",
7
+ "type": "git",
8
+ "url": "https://github.com/vivid-planet/comet"
9
+ },
10
+ "license": "BSD-2-Clause",
11
+ "sideEffects": [
12
+ "./lib/core/Rte.js",
13
+ "./lib/core/RteReadOnly.js"
14
+ ],
15
+ "type": "module",
16
+ "exports": {
17
+ ".": {
18
+ "import": "./lib/index.js",
19
+ "types": "./lib/index.d.ts"
20
+ }
21
+ },
22
+ "files": [
23
+ "lib"
24
+ ],
25
+ "dependencies": {
26
+ "detect-browser": "^5.3.0",
27
+ "draft-js-export-html": "^1.4.1",
28
+ "draft-js-import-html": "^1.4.1",
29
+ "draftjs-conductor": "^3.0.0",
30
+ "immutable": "~3.8.2",
31
+ "@dextinity/admin": "2.0.0-canary-20260729062014",
32
+ "@dextinity/admin-icons": "2.0.0-canary-20260729062014"
33
+ },
34
+ "devDependencies": {
35
+ "@babel/cli": "^7.29.7",
36
+ "@babel/core": "^7.29.7",
37
+ "@mui/material": "^7.3.11",
38
+ "@types/draft-js": "^0.11.20",
39
+ "@types/react": "^19.2.15",
40
+ "@types/react-dom": "^19.2.3",
41
+ "draft-js": "^0.11.7",
42
+ "eslint": "^9.39.4",
43
+ "final-form": "^4.20.10",
44
+ "jsdom": "^28.1.0",
45
+ "npm-run-all2": "^8.0.4",
46
+ "prettier": "^3.6.2",
47
+ "react": "^19.2.6",
48
+ "react-dom": "^19.2.6",
49
+ "react-final-form": "^6.5.9",
50
+ "react-intl": "^7.1.11",
51
+ "rimraf": "^6.1.2",
52
+ "typescript": "^5.9.3",
53
+ "vitest": "^4.1.8",
54
+ "@dextinity/admin-babel-preset": "2.0.0-canary-20260729062014",
55
+ "@dextinity/eslint-config": "2.0.0-canary-20260729062014"
56
+ },
57
+ "peerDependencies": {
58
+ "@mui/material": "^7.0.0",
59
+ "draft-js": "^0.11.4",
60
+ "final-form": "^4.16.1",
61
+ "react": "^17.0.0 || ^18.0.0 || ^19.0.0",
62
+ "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0",
63
+ "react-final-form": "^6.3.1",
64
+ "react-intl": "^5.0.0 || ^6.0.0 || ^7.0.0"
65
+ },
66
+ "engines": {
67
+ "node": ">=22.0.0"
68
+ },
69
+ "publishConfig": {
70
+ "access": "public",
71
+ "registry": "https://registry.npmjs.org"
72
+ },
73
+ "scripts": {
74
+ "build": "pnpm run clean && run-p build:babel build:types",
75
+ "build:babel": "pnpm exec babel ./src -x \".ts,.tsx\" -d lib",
76
+ "build:types": "tsc --project ./tsconfig.json --emitDeclarationOnly",
77
+ "clean": "rimraf lib",
78
+ "lint": "run-p lint:prettier lint:eslint lint:tsc",
79
+ "lint:ci": "pnpm run lint",
80
+ "lint:eslint": "eslint --max-warnings 0 src/ '**/*.json' --no-warn-ignored",
81
+ "lint:fix": "run-p lint:fix:eslint lint:fix:prettier",
82
+ "lint:fix:eslint": "pnpm run lint:eslint --fix",
83
+ "lint:fix:prettier": "pnpm run lint:prettier --write",
84
+ "lint:prettier": "pnpm exec prettier --check '*.{ts,js,json,md,yml,yaml}'",
85
+ "lint:tsc": "tsc --noEmit",
86
+ "start": "run-p start:babel start:types",
87
+ "start:babel": "pnpm exec babel ./src -x \".ts,.tsx\" -d lib -w",
88
+ "start:types": "tsc --project ./tsconfig.json --emitDeclarationOnly --watch --preserveWatchOutput",
89
+ "test": "pnpm run test:unit",
90
+ "test:unit": "vitest --run",
91
+ "test:watch": "vitest --watch"
92
+ }
93
+ }