@procore/text-editor 0.0.1 → 0.0.3

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 (73) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/codemod/__fixtures__/hammer.config.mjs +7 -0
  3. package/codemod/__fixtures__/procore.config.js +7 -0
  4. package/codemod/__fixtures__/procore.config.ternary.js +18 -0
  5. package/codemod/text-editor-migrate.js +383 -3
  6. package/codemod/text-editor-migrate.test.js +86 -0
  7. package/dist/{src/TextEditor → TextEditor}/TextEditor.d.ts +1 -1
  8. package/dist/TextEditor/TextEditor.js +2 -12
  9. package/dist/TextEditor/TextEditor.js.map +1 -1
  10. package/dist/TextEditor/TextEditor.styles.js +1 -1
  11. package/dist/{src/TextEditor → TextEditor}/TextEditor.types.d.ts +0 -38
  12. package/dist/TextEditor/TextEditor.types.js.map +1 -1
  13. package/dist/TextEditor/TextEditorProvider.js +1 -1
  14. package/dist/TextEditor/TextEditorProvider.js.map +1 -1
  15. package/dist/TextEditor/plugins/TabSpacesPlugin/TabSpacesPlugin.js +2 -0
  16. package/dist/TextEditor/plugins/TabSpacesPlugin/TabSpacesPlugin.js.map +1 -1
  17. package/dist/TextEditor/useTabAsNavigation.js +2 -1
  18. package/dist/TextEditor/useTabAsNavigation.js.map +1 -1
  19. package/dist/TextEditor/utils/config.js +5 -2
  20. package/dist/TextEditor/utils/config.js.map +1 -1
  21. package/dist/TextEditorOutput/TextEditorOutput.styles.js +1 -1
  22. package/dist/_typedoc/TextEditor/TextEditor.types.json +16 -68
  23. package/dist/_typedoc/TextEditor/TextEditorProvider.types.json +2 -2
  24. package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +3 -3
  25. package/dist/_typedoc/deprecations.json +1 -1
  26. package/package.json +12 -16
  27. package/dist/codemod/__fixtures__/src/components/ComplexEditor.d.ts +0 -2
  28. package/dist/codemod/__fixtures__/src/components/FormWithRichText.d.ts +0 -2
  29. package/dist/codemod/__fixtures__/src/components/MultilineFormRichText.d.ts +0 -2
  30. package/dist/codemod/__fixtures__/src/components/NoTextEditor.d.ts +0 -2
  31. package/dist/codemod/__fixtures__/src/components/ReadOnlyRichText.d.ts +0 -2
  32. package/dist/codemod/__fixtures__/src/components/SimpleEditor.d.ts +0 -2
  33. package/dist/codemod/__fixtures__/src/components/TypeImportEditor.d.ts +0 -2
  34. /package/dist/{src/TextEditor → TextEditor}/EditorError.d.ts +0 -0
  35. /package/dist/{src/TextEditor → TextEditor}/StickyToolbar/index.d.ts +0 -0
  36. /package/dist/{src/TextEditor → TextEditor}/StickyToolbar/useStickyToolbar.d.ts +0 -0
  37. /package/dist/{src/TextEditor → TextEditor}/StickyToolbar/useStickyToolbar.types.d.ts +0 -0
  38. /package/dist/{src/TextEditor → TextEditor}/TextEditor.styles.d.ts +0 -0
  39. /package/dist/{src/TextEditor → TextEditor}/TextEditorProvider.d.ts +0 -0
  40. /package/dist/{src/TextEditor → TextEditor}/TextEditorProvider.types.d.ts +0 -0
  41. /package/dist/{src/TextEditor → TextEditor}/index.d.ts +0 -0
  42. /package/dist/{src/TextEditor → TextEditor}/license_key.d.ts +0 -0
  43. /package/dist/{src/TextEditor → TextEditor}/plugins/CutPlugin/CutCommand.d.ts +0 -0
  44. /package/dist/{src/TextEditor → TextEditor}/plugins/CutPlugin/CutPlugin.d.ts +0 -0
  45. /package/dist/{src/TextEditor → TextEditor}/plugins/CutPlugin/index.d.ts +0 -0
  46. /package/dist/{src/TextEditor → TextEditor}/plugins/IndentPaddingToMarginPlugin/IndentPaddingToMarginPlugin.d.ts +0 -0
  47. /package/dist/{src/TextEditor → TextEditor}/plugins/IndentPaddingToMarginPlugin/index.d.ts +0 -0
  48. /package/dist/{src/TextEditor → TextEditor}/plugins/PasteAsTextPlugin/PasteAsTextCommand.d.ts +0 -0
  49. /package/dist/{src/TextEditor → TextEditor}/plugins/PasteAsTextPlugin/PasteAsTextPlugin.d.ts +0 -0
  50. /package/dist/{src/TextEditor → TextEditor}/plugins/PasteAsTextPlugin/index.d.ts +0 -0
  51. /package/dist/{src/TextEditor → TextEditor}/plugins/PastePlugin/PasteCommand.d.ts +0 -0
  52. /package/dist/{src/TextEditor → TextEditor}/plugins/PastePlugin/PastePlugin.d.ts +0 -0
  53. /package/dist/{src/TextEditor → TextEditor}/plugins/PastePlugin/index.d.ts +0 -0
  54. /package/dist/{src/TextEditor → TextEditor}/plugins/TabSpacesPlugin/TabSpacesPlugin.d.ts +0 -0
  55. /package/dist/{src/TextEditor → TextEditor}/plugins/TabSpacesPlugin/index.d.ts +0 -0
  56. /package/dist/{src/TextEditor → TextEditor}/textEditorTheming/icons.d.ts +0 -0
  57. /package/dist/{src/TextEditor → TextEditor}/textEditorTheming/index.d.ts +0 -0
  58. /package/dist/{src/TextEditor → TextEditor}/textEditorTheming/textEditorTheming.styles.d.ts +0 -0
  59. /package/dist/{src/TextEditor → TextEditor}/useCKEditorCss.d.ts +0 -0
  60. /package/dist/{src/TextEditor → TextEditor}/useTabAsNavigation.d.ts +0 -0
  61. /package/dist/{src/TextEditor → TextEditor}/utils/config.d.ts +0 -0
  62. /package/dist/{src/TextEditor → TextEditor}/utils/index.d.ts +0 -0
  63. /package/dist/{src/TextEditor → TextEditor}/utils/locale.d.ts +0 -0
  64. /package/dist/{src/TextEditor → TextEditor}/utils/plugins.d.ts +0 -0
  65. /package/dist/{src/TextEditorOutput → TextEditorOutput}/TextEditorOutput.d.ts +0 -0
  66. /package/dist/{src/TextEditorOutput → TextEditorOutput}/TextEditorOutput.styles.d.ts +0 -0
  67. /package/dist/{src/TextEditorOutput → TextEditorOutput}/TextEditorOutput.types.d.ts +0 -0
  68. /package/dist/{src/TextEditorOutput → TextEditorOutput}/TextEditorOutput.utils.d.ts +0 -0
  69. /package/dist/{src/TextEditorOutput → TextEditorOutput}/index.d.ts +0 -0
  70. /package/dist/{src/_storyHelpers → _storyHelpers}/constants.d.ts +0 -0
  71. /package/dist/{src/_utils → _utils}/propsTypedoc.d.ts +0 -0
  72. /package/dist/{src/index.d.ts → index.d.ts} +0 -0
  73. /package/dist/{src/stories → stories}/util.d.ts +0 -0
@@ -10,7 +10,7 @@
10
10
  "description": "Additional classNames",
11
11
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Additional classNames</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>10.24.0</p>\n</dd></dl></div>",
12
12
  "sourceFile": "TextEditorOutput/TextEditorOutput.types.ts",
13
- "sourceUrl": "https://github.com/procore/core/blob/d7acf0a/packages/text-editor/src/TextEditorOutput/TextEditorOutput.types.ts#L14"
13
+ "sourceUrl": "https://github.com/procore/core/blob/672f459/packages/text-editor/src/TextEditorOutput/TextEditorOutput.types.ts#L14"
14
14
  },
15
15
  {
16
16
  "name": "style",
@@ -20,7 +20,7 @@
20
20
  "description": "Additional CSS styles",
21
21
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Additional CSS styles</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>10.24.0</p>\n</dd></dl></div>",
22
22
  "sourceFile": "TextEditorOutput/TextEditorOutput.types.ts",
23
- "sourceUrl": "https://github.com/procore/core/blob/d7acf0a/packages/text-editor/src/TextEditorOutput/TextEditorOutput.types.ts#L21"
23
+ "sourceUrl": "https://github.com/procore/core/blob/672f459/packages/text-editor/src/TextEditorOutput/TextEditorOutput.types.ts#L21"
24
24
  },
25
25
  {
26
26
  "name": "value",
@@ -30,7 +30,7 @@
30
30
  "description": "Formatted text from `TextEditor`",
31
31
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Formatted text from <code>TextEditor</code></p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>10.24.0</p>\n</dd></dl></div>",
32
32
  "sourceFile": "TextEditorOutput/TextEditorOutput.types.ts",
33
- "sourceUrl": "https://github.com/procore/core/blob/d7acf0a/packages/text-editor/src/TextEditorOutput/TextEditorOutput.types.ts#L7"
33
+ "sourceUrl": "https://github.com/procore/core/blob/672f459/packages/text-editor/src/TextEditorOutput/TextEditorOutput.types.ts#L7"
34
34
  }
35
35
  ],
36
36
  "description": ""
@@ -1 +1 @@
1
- [{"interface":"TextEditorProps","property":"init","deprecatedSince":"","message":"`init` has been deprecated and will be removed in a future version. TinyMCE support has been removed.","deprecationKind":"prop"},{"interface":"TextEditorProps","property":"initialValue","deprecatedSince":"10.20.0","message":"`initialValue` has been deprecated and will be removed in a future version.\nPlease use the `value` prop instead","deprecationKind":"prop"},{"interface":"TextEditorProps","property":"tinyMCE","deprecatedSince":"","message":"This property will be removed in a future version. TinyMCE support has been removed.","deprecationKind":"prop"}]
1
+ [{"interface":"TextEditorProps","property":"initialValue","deprecatedSince":"10.20.0","message":"`initialValue` has been deprecated and will be removed in a future version.\nPlease use the `value` prop instead","deprecationKind":"prop"}]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@procore/text-editor",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "Rich text editor component based on CKEditor 5",
5
5
  "author": "Procore Technologies",
6
6
  "homepage": "https://github.com/procore/core/tree/main/packages/text-editor",
@@ -29,9 +29,9 @@
29
29
  "exports": {
30
30
  ".": "./dist/index.js",
31
31
  "./jestConfig": {
32
- "import": "./jestConfig.js",
32
+ "types": "./jestConfig.d.ts",
33
33
  "require": "./jestConfig.js",
34
- "types": "./jestConfig.d.ts"
34
+ "import": "./jestConfig.js"
35
35
  },
36
36
  "./dist/_typedoc/*.json": "./dist/_typedoc/*.json",
37
37
  "./dist/_typedoc/**/*.json": "./dist/_typedoc/**/*.json"
@@ -62,12 +62,12 @@
62
62
  "lint:types": "tsc -p tsconfig.prod.json --noEmit",
63
63
  "lint:types:watch": "tsc -p . --noEmit --watch",
64
64
  "storybook": "storybook dev -p 6008",
65
- "test": "TZ=America/Los_Angeles jest --silent --runInBand --logHeapUsage",
65
+ "test": "TZ=America/Los_Angeles jest --runInBand --logHeapUsage",
66
66
  "test:update": "TZ=America/Los_Angeles jest --runInBand -u",
67
67
  "test:watch": "yarn run test --watch"
68
68
  },
69
69
  "peerDependencies": {
70
- "@procore/core-react": "^12.31.0",
70
+ "@procore/core-react": "^12.33.0",
71
71
  "@procore/globalization-toolkit": ">= 3 < 4",
72
72
  "ckeditor5": "^46.0.1",
73
73
  "react": ">=16.8.0 < 19",
@@ -76,8 +76,8 @@
76
76
  },
77
77
  "dependencies": {
78
78
  "@ckeditor/ckeditor5-react": "^11.0.0",
79
- "@procore/core-i18n-js": "^10.29.3",
80
- "@procore/core-icons": "^12.10.1",
79
+ "@procore/core-i18n-js": "^10.30.0",
80
+ "@procore/core-icons": "^12.11.0",
81
81
  "@react-aria/focus": "3.16.2",
82
82
  "@react-aria/utils": "3.23.2",
83
83
  "sanitize-html": "^2.17.0"
@@ -91,17 +91,12 @@
91
91
  "@babel/preset-react": "7.18.6",
92
92
  "@babel/preset-typescript": "7.18.6",
93
93
  "@babel/register": "7.18.9",
94
- "@ckeditor/ckeditor5-dev-utils": "^43.1.0",
95
94
  "@ckeditor/ckeditor5-dev-webpack-plugin": "^31.1.13",
96
- "@procore/core-react": "^12.31.0",
95
+ "@procore/core-react": "^12.33.0",
97
96
  "@procore/globalization-toolkit": "3.0.0",
98
- "@procore/storybook-addon": "^4.0.0",
99
- "@storybook/addon-docs": "^7.5.3",
100
- "@storybook/addon-interactions": "^7.5.3",
97
+ "@storybook/addon-webpack5-compiler-swc": "^4.0.2",
101
98
  "@storybook/jest": "^0.2.3",
102
- "@storybook/manager-api": "^7.5.3",
103
- "@storybook/react": "^7.5.3",
104
- "@storybook/react-webpack5": "^7.5.3",
99
+ "@storybook/react-webpack5": "^9.1.16",
105
100
  "@storybook/testing-library": "^0.2.2",
106
101
  "@testing-library/dom": "8.20.0",
107
102
  "@testing-library/jest-dom": "5.16.4",
@@ -126,6 +121,7 @@
126
121
  "eslint-config-prettier": "8.6.0",
127
122
  "eslint-config-react-app": "^7.0.1",
128
123
  "eslint-plugin-react-hooks": "4.6.0",
124
+ "eslint-plugin-storybook": "^9.1.16",
129
125
  "fs-extra": "11.1.1",
130
126
  "glob": "8.1.0",
131
127
  "jest": "29.4.1",
@@ -134,7 +130,7 @@
134
130
  "react": "18.3.1",
135
131
  "react-dom": "18.3.1",
136
132
  "rimraf": "^6.0.1",
137
- "storybook": "^7.5.3",
133
+ "storybook": "^9.1.16",
138
134
  "style-loader": "^4.0.0",
139
135
  "styled-components": "6.1.18",
140
136
  "ts-jest": "^29.0.5",
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export declare const ComplexEditor: () => React.JSX.Element;
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export declare const FormWithRichText: () => React.JSX.Element;
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export declare const MultilineFormRichText: () => React.JSX.Element;
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export declare const NoTextEditor: () => React.JSX.Element;
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export declare const ReadOnlyRichText: () => React.JSX.Element;
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export declare const SimpleEditor: () => React.JSX.Element;
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export declare const TypeImportEditor: React.FC;
File without changes
File without changes
File without changes
File without changes