@procore/text-editor 0.0.2 → 0.1.0

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 (34) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +1 -22
  3. package/codemod/__fixtures__/procore.config.ternary.js +18 -0
  4. package/codemod/__fixtures__/src/components/MultilineFormRichText.tsx +2 -1
  5. package/codemod/text-editor-migrate.js +313 -105
  6. package/codemod/text-editor-migrate.test.js +28 -0
  7. package/dist/TextEditor/TextEditor.d.ts +1 -1
  8. package/dist/TextEditor/TextEditor.js +81 -36
  9. package/dist/TextEditor/TextEditor.js.map +1 -1
  10. package/dist/TextEditor/TextEditor.styles.js +1 -1
  11. package/dist/TextEditor/TextEditor.types.d.ts +32 -31
  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/textEditorTheming/textEditorTheming.styles.js +2 -1
  18. package/dist/TextEditor/textEditorTheming/textEditorTheming.styles.js.map +1 -1
  19. package/dist/TextEditor/useTabAsNavigation.js +2 -1
  20. package/dist/TextEditor/useTabAsNavigation.js.map +1 -1
  21. package/dist/TextEditor/utils/config.js +5 -3
  22. package/dist/TextEditor/utils/config.js.map +1 -1
  23. package/dist/TextEditor/utils/index.d.ts +0 -1
  24. package/dist/TextEditor/utils/index.js +0 -1
  25. package/dist/TextEditor/utils/index.js.map +1 -1
  26. package/dist/TextEditorOutput/TextEditorOutput.styles.js +1 -1
  27. package/dist/_typedoc/TextEditor/TextEditor.types.json +51 -51
  28. package/dist/_typedoc/TextEditor/TextEditorProvider.types.json +2 -2
  29. package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +3 -3
  30. package/dist/_typedoc/deprecations.json +1 -1
  31. package/package.json +13 -16
  32. package/dist/TextEditor/utils/plugins.d.ts +0 -7
  33. package/dist/TextEditor/utils/plugins.js +0 -184
  34. package/dist/TextEditor/utils/plugins.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { Alignment, AutoLink, Bold, Clipboard, Essentials, FontBackgroundColor, FontColor, FontSize, GeneralHtmlSupport, Image, ImageInsert, ImageToolbar, Indent, IndentBlock, Italic, Link, List, ListProperties, Paragraph, Strikethrough, Table, TableCaption, TableCellProperties, TableColumnResize, TableProperties, TableToolbar, Underline } from 'ckeditor5';
1
+ import { Alignment, Autoformat, AutoLink, BlockQuote, Bold, Clipboard, CodeBlock, Essentials, FontBackgroundColor, FontColor, FontSize, GeneralHtmlSupport, Heading, HorizontalLine, Indent, IndentBlock, Italic, Link, List, ListProperties, Paragraph, RemoveFormat, SpecialCharacters, SpecialCharactersEssentials, Strikethrough, Subscript, Superscript, Table, TableCaption, TableCellProperties, TableColumnResize, TableProperties, TableToolbar, Underline } from 'ckeditor5';
2
2
  import { CK_EDITOR_LICENSE_KEY } from '../license_key';
3
3
  import { CutPlugin } from '../plugins/CutPlugin';
4
4
  import { IndentPaddingToMarginPlugin } from '../plugins/IndentPaddingToMarginPlugin';
@@ -57,8 +57,10 @@ export var getDefaultConfig = function getDefaultConfig() {
57
57
  licenseKey: CK_EDITOR_LICENSE_KEY,
58
58
  language: getValidEditorLocale(locale),
59
59
  translations: [getEditorTranslation(locale)],
60
- plugins: [Alignment, AutoLink, Bold, Clipboard, Essentials, FontBackgroundColor, FontColor, FontSize, GeneralHtmlSupport, Indent, IndentBlock, Italic, Link, List, ListProperties, Paragraph, Strikethrough, Table, TableCaption, TableCellProperties, TableColumnResize, TableProperties, TableToolbar, Underline, Image, ImageInsert, ImageToolbar, CutPlugin, PastePlugin, PasteAsTextPlugin, IndentPaddingToMarginPlugin, TabSpacesPlugin],
61
- toolbar: ['bold', 'italic', 'underline', 'strikethrough', '|', 'alignment:left', 'alignment:center', 'alignment:right', '|', 'bulletedList', 'numberedList', '|', 'outdent', 'indent', '|', 'cut', 'paste', 'pasteAsText', '|', 'fontSize', '|', 'fontColor', 'fontBackgroundColor', '|', 'undo', 'redo'],
60
+ plugins: [Alignment, AutoLink, Bold, Clipboard, Essentials, FontBackgroundColor, FontColor, FontSize, GeneralHtmlSupport, Indent, IndentBlock, Italic, Link, List, ListProperties, Paragraph, Strikethrough, Table, TableCaption, TableCellProperties, TableColumnResize, TableProperties, TableToolbar, Underline, CutPlugin, PastePlugin, PasteAsTextPlugin, IndentPaddingToMarginPlugin, BlockQuote, Heading, Autoformat, SpecialCharacters, SpecialCharactersEssentials, Subscript, Superscript, HorizontalLine, RemoveFormat, CodeBlock, TabSpacesPlugin // TODO - delete
61
+ ],
62
+
63
+ toolbar: ['AccessibilityHelp', '|', 'bold', 'italic', 'underline', 'strikethrough', '|', 'alignment:left', 'alignment:center', 'alignment:right', '|', 'bulletedList', 'numberedList', '|', 'outdent', 'indent', '|', 'cut', 'paste', 'pasteAsText', '|', 'fontSize', '|', 'fontColor', 'fontBackgroundColor', '|', 'insertTable', 'link', '|', 'blockquote', 'heading', '|', 'horizontalLine', 'removeFormat', 'specialCharacters', 'subscript', 'superscript', 'codeblock', '|', 'undo', 'redo'],
62
64
  fontSize: {
63
65
  options: [{
64
66
  title: '8pt',
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","names":["Alignment","AutoLink","Bold","Clipboard","Essentials","FontBackgroundColor","FontColor","FontSize","GeneralHtmlSupport","Image","ImageInsert","ImageToolbar","Indent","IndentBlock","Italic","Link","List","ListProperties","Paragraph","Strikethrough","Table","TableCaption","TableCellProperties","TableColumnResize","TableProperties","TableToolbar","Underline","CK_EDITOR_LICENSE_KEY","CutPlugin","IndentPaddingToMarginPlugin","PasteAsTextPlugin","PastePlugin","TabSpacesPlugin","getEditorTranslation","getValidEditorLocale","TEXT_COLOR_PALETTE","color","getDefaultConfig","locale","arguments","length","undefined","licenseKey","language","translations","plugins","toolbar","fontSize","options","title","model","supportAllValues","fontColor","colors","fontBackgroundColor","indentBlock","offset","unit","htmlSupport","allow","name","styles","list","properties","useAttribute","startIndex","reversed","image","insert","integrations","table","contentToolbar","tableProperties","borderColors","backgroundColors","tableCellProperties","addButtonDataAttributes","editor","applyAttributes","toolbarElement","ui","view","element","toolbarChildren","Array","from","querySelectorAll","moreDropdownButtons","allToolbarElements","concat","toolbarItems","config","get","elementIndex","forEach","itemName","classList","contains","setAttribute","observer","MutationObserver","observe","childList","subtree","on","disconnect"],"sources":["../../../src/TextEditor/utils/config.ts"],"sourcesContent":["import type { ClassicEditor, EditorConfig } from 'ckeditor5'\nimport {\n Alignment,\n AutoLink,\n Bold,\n Clipboard,\n Essentials,\n FontBackgroundColor,\n FontColor,\n FontSize,\n GeneralHtmlSupport,\n Image,\n ImageInsert,\n ImageToolbar,\n Indent,\n IndentBlock,\n Italic,\n Link,\n List,\n ListProperties,\n Paragraph,\n Strikethrough,\n Table,\n TableCaption,\n TableCellProperties,\n TableColumnResize,\n TableProperties,\n TableToolbar,\n Underline,\n} from 'ckeditor5'\n\nimport { CK_EDITOR_LICENSE_KEY } from '../license_key'\nimport { CutPlugin } from '../plugins/CutPlugin'\nimport { IndentPaddingToMarginPlugin } from '../plugins/IndentPaddingToMarginPlugin'\nimport { PasteAsTextPlugin } from '../plugins/PasteAsTextPlugin'\nimport { PastePlugin } from '../plugins/PastePlugin'\nimport { TabSpacesPlugin } from '../plugins/TabSpacesPlugin'\nimport { getEditorTranslation, getValidEditorLocale } from './locale'\n\nconst TEXT_COLOR_PALETTE = [\n { color: '#BFEDD2' },\n { color: '#FBEEB8' },\n { color: '#F8CAC6' },\n { color: '#ECCAFA' },\n { color: '#C2E0F4' },\n { color: '#2DC26B' },\n { color: '#F1C40F' },\n { color: '#E03E2D' },\n { color: '#B96AD9' },\n { color: '#3598DB' },\n { color: '#169179' },\n { color: '#E67E23' },\n { color: '#BA372A' },\n { color: '#843FA1' },\n { color: '#236FA1' },\n { color: '#ECF0F1' },\n { color: '#CED4D9' },\n { color: '#95A5A6' },\n { color: '#7E8C8D' },\n { color: '#34495E' },\n { color: '#000000' },\n { color: '#FFFFFF' },\n]\n\nexport const getDefaultConfig = (locale: string = 'en'): EditorConfig => ({\n licenseKey: CK_EDITOR_LICENSE_KEY,\n language: getValidEditorLocale(locale),\n translations: [getEditorTranslation(locale)],\n plugins: [\n Alignment,\n AutoLink,\n Bold,\n Clipboard,\n Essentials,\n FontBackgroundColor,\n FontColor,\n FontSize,\n GeneralHtmlSupport,\n Indent,\n IndentBlock,\n Italic,\n Link,\n List,\n ListProperties,\n Paragraph,\n Strikethrough,\n Table,\n TableCaption,\n TableCellProperties,\n TableColumnResize,\n TableProperties,\n TableToolbar,\n Underline,\n Image,\n ImageInsert,\n ImageToolbar,\n CutPlugin,\n PastePlugin,\n PasteAsTextPlugin,\n IndentPaddingToMarginPlugin,\n TabSpacesPlugin,\n ],\n toolbar: [\n 'bold',\n 'italic',\n 'underline',\n 'strikethrough',\n '|',\n 'alignment:left',\n 'alignment:center',\n 'alignment:right',\n '|',\n 'bulletedList',\n 'numberedList',\n '|',\n 'outdent',\n 'indent',\n '|',\n 'cut',\n 'paste',\n 'pasteAsText',\n '|',\n 'fontSize',\n '|',\n 'fontColor',\n 'fontBackgroundColor',\n '|',\n 'undo',\n 'redo',\n ],\n fontSize: {\n options: [\n { title: '8pt', model: '8px' },\n { title: '10pt', model: '10px' },\n { title: '12pt', model: '12px' },\n { title: '14pt', model: '14px' },\n { title: '18pt', model: '18px' },\n { title: '24pt', model: '24px' },\n { title: '36pt', model: '36px' },\n ],\n supportAllValues: true,\n },\n fontColor: {\n colors: TEXT_COLOR_PALETTE,\n },\n fontBackgroundColor: {\n colors: TEXT_COLOR_PALETTE,\n },\n indentBlock: {\n offset: 40,\n unit: 'px',\n },\n htmlSupport: {\n allow: [\n {\n name: 'p',\n styles: {\n 'margin-left': true,\n },\n },\n ],\n },\n list: {\n properties: {\n styles: {\n useAttribute: true,\n },\n startIndex: true,\n reversed: true,\n },\n },\n image: {\n insert: {\n integrations: ['insertImageViaUrl'],\n },\n toolbar: ['imageTextAlternative'],\n },\n table: {\n contentToolbar: [\n 'tableColumn',\n 'tableRow',\n 'mergeTableCells',\n 'tableProperties',\n 'tableCellProperties',\n ],\n tableProperties: {\n borderColors: TEXT_COLOR_PALETTE,\n backgroundColors: TEXT_COLOR_PALETTE,\n },\n tableCellProperties: {\n borderColors: TEXT_COLOR_PALETTE,\n backgroundColors: TEXT_COLOR_PALETTE,\n },\n },\n})\n\n// Add stable data attributes to toolbar buttons for the styling (or testing) purposes\nexport const addButtonDataAttributes = (editor: ClassicEditor) => {\n const applyAttributes = () => {\n const toolbarElement = editor.ui.view.toolbar.element\n if (!toolbarElement) {\n return\n }\n\n // Get buttons in the main toolbar\n const toolbarChildren = Array.from(\n toolbarElement.querySelectorAll('.ck-toolbar__items > *')\n )\n\n // Get buttons hidden in \"more\" dropdown\n const moreDropdownButtons = Array.from(\n toolbarElement.querySelectorAll('.ck-dropdown__panel .ck-list .ck-button')\n )\n\n const allToolbarElements = [...toolbarChildren, ...moreDropdownButtons]\n\n // Create mapping based on toolbar configuration order\n const toolbarItems = (editor.config.get('toolbar') || []) as string[]\n let elementIndex = 0\n\n toolbarItems.forEach((itemName) => {\n const element = allToolbarElements[elementIndex]\n if (\n itemName !== '|' &&\n element &&\n !element.classList.contains('ck-toolbar__separator')\n ) {\n // Use the toolbar item name as the stable identifier\n element.setAttribute('data-cke-command', itemName)\n }\n elementIndex++\n })\n }\n\n // Apply attributes initially\n applyAttributes()\n\n // Re-apply when dropdown menus are opened (buttons get created dynamically)\n const toolbarElement = editor.ui.view.toolbar.element\n if (toolbarElement) {\n const observer = new MutationObserver(() => {\n applyAttributes()\n })\n observer.observe(toolbarElement, {\n childList: true,\n subtree: true,\n })\n editor.on('destroy', () => {\n observer.disconnect()\n })\n }\n}\n"],"mappings":"AACA,SACEA,SAAS,EACT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EAEjB;EACA,IAAMC,cAAc,GAAGF,MAAM,CAACG,EAAE,CAACC,IAAI,CAACnC,OAAO,CAACoC,OAAO;EACrD,IAAIH,cAAc,EAAE;IAClB,IAAMoB,QAAQ,GAAG,IAAIC,gBAAgB,CAAC,YAAM;MAC1CtB,eAAe,CAAC,CAAC;IACnB,CAAC,CAAC;IACFqB,QAAQ,CAACE,OAAO,CAACtB,cAAc,EAAE;MAC/BuB,SAAS,EAAE,IAAI;MACfC,OAAO,EAAE;IACX,CAAC,CAAC;IACF1B,MAAM,CAAC2B,EAAE,CAAC,SAAS,EAAE,YAAM;MACzBL,QAAQ,CAACM,UAAU,CAAC,CAAC;IACvB,CAAC,CAAC;EACJ;AACF,CAAC"}
1
+ {"version":3,"file":"config.js","names":["Alignment","Autoformat","AutoLink","BlockQuote","Bold","Clipboard","CodeBlock","Essentials","FontBackgroundColor","FontColor","FontSize","GeneralHtmlSupport","Heading","HorizontalLine","Indent","IndentBlock","Italic","Link","List","ListProperties","Paragraph","RemoveFormat","SpecialCharacters","SpecialCharactersEssentials","Strikethrough","Subscript","Superscript","Table","TableCaption","TableCellProperties","TableColumnResize","TableProperties","TableToolbar","Underline","CK_EDITOR_LICENSE_KEY","CutPlugin","IndentPaddingToMarginPlugin","PasteAsTextPlugin","PastePlugin","TabSpacesPlugin","getEditorTranslation","getValidEditorLocale","TEXT_COLOR_PALETTE","color","getDefaultConfig","locale","arguments","length","undefined","licenseKey","language","translations","plugins","toolbar","fontSize","options","title","model","supportAllValues","fontColor","colors","fontBackgroundColor","indentBlock","offset","unit","htmlSupport","allow","name","styles","list","properties","useAttribute","startIndex","reversed","image","insert","integrations","table","contentToolbar","tableProperties","borderColors","backgroundColors","tableCellProperties","addButtonDataAttributes","editor","applyAttributes","toolbarElement","ui","view","element","toolbarChildren","Array","from","querySelectorAll","moreDropdownButtons","allToolbarElements","concat","toolbarItems","config","get","elementIndex","forEach","itemName","classList","contains","setAttribute","observer","MutationObserver","observe","childList","subtree","on","disconnect"],"sources":["../../../src/TextEditor/utils/config.ts"],"sourcesContent":["import type { ClassicEditor, EditorConfig } from 'ckeditor5'\nimport {\n Alignment,\n Autoformat,\n AutoLink,\n BlockQuote,\n Bold,\n Clipboard,\n CodeBlock,\n Essentials,\n FontBackgroundColor,\n FontColor,\n FontSize,\n GeneralHtmlSupport,\n Heading,\n HorizontalLine,\n Indent,\n IndentBlock,\n Italic,\n Link,\n List,\n ListProperties,\n Paragraph,\n RemoveFormat,\n SpecialCharacters,\n SpecialCharactersEssentials,\n Strikethrough,\n Subscript,\n Superscript,\n Table,\n TableCaption,\n TableCellProperties,\n TableColumnResize,\n TableProperties,\n TableToolbar,\n Underline,\n} from 'ckeditor5'\n\nimport { CK_EDITOR_LICENSE_KEY } from '../license_key'\nimport { CutPlugin } from '../plugins/CutPlugin'\nimport { IndentPaddingToMarginPlugin } from '../plugins/IndentPaddingToMarginPlugin'\nimport { PasteAsTextPlugin } from '../plugins/PasteAsTextPlugin'\nimport { PastePlugin } from '../plugins/PastePlugin'\nimport { TabSpacesPlugin } from '../plugins/TabSpacesPlugin'\nimport { getEditorTranslation, getValidEditorLocale } from './locale'\n\nconst TEXT_COLOR_PALETTE = [\n { color: '#BFEDD2' },\n { color: '#FBEEB8' },\n { color: '#F8CAC6' },\n { color: '#ECCAFA' },\n { color: '#C2E0F4' },\n { color: '#2DC26B' },\n { color: '#F1C40F' },\n { color: '#E03E2D' },\n { color: '#B96AD9' },\n { color: '#3598DB' },\n { color: '#169179' },\n { color: '#E67E23' },\n { color: '#BA372A' },\n { color: '#843FA1' },\n { color: '#236FA1' },\n { color: '#ECF0F1' },\n { color: '#CED4D9' },\n { color: '#95A5A6' },\n { color: '#7E8C8D' },\n { color: '#34495E' },\n { color: '#000000' },\n { color: '#FFFFFF' },\n]\n\nexport const getDefaultConfig = (locale: string = 'en'): EditorConfig => ({\n licenseKey: CK_EDITOR_LICENSE_KEY,\n language: getValidEditorLocale(locale),\n translations: [getEditorTranslation(locale)],\n plugins: [\n Alignment,\n AutoLink,\n Bold,\n Clipboard,\n Essentials,\n FontBackgroundColor,\n FontColor,\n FontSize,\n GeneralHtmlSupport,\n Indent,\n IndentBlock,\n Italic,\n Link,\n List,\n ListProperties,\n Paragraph,\n Strikethrough,\n Table,\n TableCaption,\n TableCellProperties,\n TableColumnResize,\n TableProperties,\n TableToolbar,\n Underline,\n CutPlugin,\n PastePlugin,\n PasteAsTextPlugin,\n IndentPaddingToMarginPlugin,\n BlockQuote,\n Heading,\n Autoformat,\n SpecialCharacters,\n SpecialCharactersEssentials,\n Subscript,\n Superscript,\n HorizontalLine,\n RemoveFormat,\n CodeBlock,\n TabSpacesPlugin, // TODO - delete\n ],\n toolbar: [\n 'AccessibilityHelp',\n '|',\n 'bold',\n 'italic',\n 'underline',\n 'strikethrough',\n '|',\n 'alignment:left',\n 'alignment:center',\n 'alignment:right',\n '|',\n 'bulletedList',\n 'numberedList',\n '|',\n 'outdent',\n 'indent',\n '|',\n 'cut',\n 'paste',\n 'pasteAsText',\n '|',\n 'fontSize',\n '|',\n 'fontColor',\n 'fontBackgroundColor',\n '|',\n 'insertTable',\n 'link',\n '|',\n 'blockquote',\n 'heading',\n '|',\n 'horizontalLine',\n 'removeFormat',\n 'specialCharacters',\n 'subscript',\n 'superscript',\n 'codeblock',\n '|',\n 'undo',\n 'redo',\n ],\n fontSize: {\n options: [\n { title: '8pt', model: '8px' },\n { title: '10pt', model: '10px' },\n { title: '12pt', model: '12px' },\n { title: '14pt', model: '14px' },\n { title: '18pt', model: '18px' },\n { title: '24pt', model: '24px' },\n { title: '36pt', model: '36px' },\n ],\n supportAllValues: true,\n },\n fontColor: {\n colors: TEXT_COLOR_PALETTE,\n },\n fontBackgroundColor: {\n colors: TEXT_COLOR_PALETTE,\n },\n indentBlock: {\n offset: 40,\n unit: 'px',\n },\n htmlSupport: {\n allow: [\n {\n name: 'p',\n styles: {\n 'margin-left': true,\n },\n },\n ],\n },\n list: {\n properties: {\n styles: {\n useAttribute: true,\n },\n startIndex: true,\n reversed: true,\n },\n },\n image: {\n insert: {\n integrations: ['insertImageViaUrl'],\n },\n toolbar: ['imageTextAlternative'],\n },\n table: {\n contentToolbar: [\n 'tableColumn',\n 'tableRow',\n 'mergeTableCells',\n 'tableProperties',\n 'tableCellProperties',\n ],\n tableProperties: {\n borderColors: TEXT_COLOR_PALETTE,\n backgroundColors: TEXT_COLOR_PALETTE,\n },\n tableCellProperties: {\n borderColors: TEXT_COLOR_PALETTE,\n backgroundColors: TEXT_COLOR_PALETTE,\n },\n },\n})\n\n// Add stable data attributes to toolbar buttons for the styling (or testing) purposes\nexport const addButtonDataAttributes = (editor: ClassicEditor) => {\n const applyAttributes = () => {\n const toolbarElement = editor.ui.view.toolbar.element\n if (!toolbarElement) {\n return\n }\n\n // Get buttons in the main toolbar\n const toolbarChildren = Array.from(\n toolbarElement.querySelectorAll('.ck-toolbar__items > *')\n )\n\n // Get buttons hidden in \"more\" dropdown\n const moreDropdownButtons = Array.from(\n toolbarElement.querySelectorAll('.ck-dropdown__panel .ck-list .ck-button')\n )\n\n const allToolbarElements = [...toolbarChildren, ...moreDropdownButtons]\n\n // Create mapping based on toolbar configuration order\n const toolbarItems = (editor.config.get('toolbar') || []) as string[]\n let elementIndex = 0\n\n toolbarItems.forEach((itemName) => {\n const element = allToolbarElements[elementIndex]\n if (\n itemName !== '|' &&\n element &&\n !element.classList.contains('ck-toolbar__separator')\n ) {\n // Use the toolbar item name as the stable identifier\n element.setAttribute('data-cke-command', itemName)\n }\n elementIndex++\n })\n }\n\n // Apply attributes initially\n applyAttributes()\n\n // Re-apply when dropdown menus are opened (buttons get created dynamically)\n const toolbarElement = editor.ui.view.toolbar.element\n if (toolbarElement) {\n const observer = new MutationObserver(() => {\n applyAttributes()\n })\n observer.observe(toolbarElement, {\n childList: true,\n subtree: true,\n })\n editor.on('destroy', () => {\n observer.disconnect()\n })\n }\n}\n"],"mappings":"AACA,SACEA,SAAS,EACTC,UAAU,EACVC,QAAQ,EACRC,UA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AO,CAAC,UAACC,QAAQ,EAAK;MACjC,IAAMb,OAAO,GAAGM,kBAAkB,CAACK,YAAY,CAAC;MAChD,IACEE,QAAQ,KAAK,GAAG,IAChBb,OAAO,IACP,CAACA,OAAO,CAACc,SAAS,CAACC,QAAQ,CAAC,uBAAuB,CAAC,EACpD;QACA;QACAf,OAAO,CAACgB,YAAY,CAAC,kBAAkB,EAAEH,QAAQ,CAAC;MACpD;MACAF,YAAY,EAAE;IAChB,CAAC,CAAC;EACJ,CAAC;;EAED;EACAf,eAAe,CAAC,CAAC;;EAEjB;EACA,IAAMC,cAAc,GAAGF,MAAM,CAACG,EAAE,CAACC,IAAI,CAACnC,OAAO,CAACoC,OAAO;EACrD,IAAIH,cAAc,EAAE;IAClB,IAAMoB,QAAQ,GAAG,IAAIC,gBAAgB,CAAC,YAAM;MAC1CtB,eAAe,CAAC,CAAC;IACnB,CAAC,CAAC;IACFqB,QAAQ,CAACE,OAAO,CAACtB,cAAc,EAAE;MAC/BuB,SAAS,EAAE,IAAI;MACfC,OAAO,EAAE;IACX,CAAC,CAAC;IACF1B,MAAM,CAAC2B,EAAE,CAAC,SAAS,EAAE,YAAM;MACzBL,QAAQ,CAACM,UAAU,CAAC,CAAC;IACvB,CAAC,CAAC;EACJ;AACF,CAAC"}
@@ -1,2 +1 @@
1
1
  export { addButtonDataAttributes, getDefaultConfig } from './config';
2
- export { addPluginsFromStringArray } from './plugins';
@@ -1,3 +1,2 @@
1
1
  export { addButtonDataAttributes, getDefaultConfig } from './config';
2
- export { addPluginsFromStringArray } from './plugins';
3
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["addButtonDataAttributes","getDefaultConfig","addPluginsFromStringArray"],"sources":["../../../src/TextEditor/utils/index.ts"],"sourcesContent":["export { addButtonDataAttributes, getDefaultConfig } from './config'\nexport { addPluginsFromStringArray } from './plugins'\n"],"mappings":"AAAA,SAASA,uBAAuB,EAAEC,gBAAgB,QAAQ,UAAU;AACpE,SAASC,yBAAyB,QAAQ,WAAW"}
1
+ {"version":3,"file":"index.js","names":["addButtonDataAttributes","getDefaultConfig"],"sources":["../../../src/TextEditor/utils/index.ts"],"sourcesContent":["export { addButtonDataAttributes, getDefaultConfig } from './config'\n"],"mappings":"AAAA,SAASA,uBAAuB,EAAEC,gBAAgB,QAAQ,UAAU"}
@@ -1,6 +1,6 @@
1
1
  import styled from 'styled-components';
2
2
  export var StyledEditor = /*#__PURE__*/styled.div.withConfig({
3
3
  displayName: "StyledEditor",
4
- componentId: "text-editor-0_0_2__sc-1oujb2g-0"
4
+ componentId: "text-editor-0_1_0__sc-1oujb2g-0"
5
5
  })([".ck-editor__top{height:0 !important;}.ck-content{border:none !important;padding:0 !important;p{margin:0;}table,img{margin-left:auto;margin-right:auto;}img{display:block;}table{border:1px double #b3b3b3;border-collapse:collapse;border-spacing:0;th{text-align:left;}& > thead,& > tbody{& > tr > td,& > tr > th{border:1px solid #bfbfbf;min-width:2em;padding:0.4em;}& > tr > th{background:rgba(0,0,0,0.05);font-weight:700;}}}}"]);
6
6
  //# sourceMappingURL=TextEditorOutput.styles.js.map
@@ -2,15 +2,35 @@
2
2
  "TextEditorProps": {
3
3
  "name": "TextEditorProps",
4
4
  "properties": [
5
+ {
6
+ "name": "aria-description",
7
+ "required": false,
8
+ "type": "<span class=\"tsd-signature-type\">string</span>",
9
+ "typeDetail": "<span class=\"tsd-signature-type\">string</span>",
10
+ "description": "Accessible description for the editor's editable area.\nThis text provides additional context to screen reader users. It will be\nannounced after the label when the user focuses the editor.",
11
+ "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Accessible description for the editor&#39;s editable area.\nThis text provides additional context to screen reader users. It will be\nannounced after the label when the user focuses the editor.</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.1.0</p>\n</dd></dl></div>",
12
+ "sourceFile": "TextEditor/TextEditor.types.ts",
13
+ "sourceUrl": "https://github.com/procore/core/blob/77cfaf0/packages/text-editor/src/TextEditor/TextEditor.types.ts#L60"
14
+ },
15
+ {
16
+ "name": "aria-label",
17
+ "required": false,
18
+ "type": "<span class=\"tsd-signature-type\">string</span>",
19
+ "typeDetail": "<span class=\"tsd-signature-type\">string</span>",
20
+ "description": "Accessible label for the editor's editable area. This text will be\nannounced by screen readers when the user focuses the editor. It should\nmatch or include the visible label associated with this editor field.\nIf not provided, screen readers will announce a generic \"Rich Text Editor\" message.",
21
+ "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Accessible label for the editor&#39;s editable area. This text will be\nannounced by screen readers when the user focuses the editor. It should\nmatch or include the visible label associated with this editor field.\nIf not provided, screen readers will announce a generic &quot;Rich Text Editor&quot; message.</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.1.0</p>\n</dd></dl></div>",
22
+ "sourceFile": "TextEditor/TextEditor.types.ts",
23
+ "sourceUrl": "https://github.com/procore/core/blob/77cfaf0/packages/text-editor/src/TextEditor/TextEditor.types.ts#L51"
24
+ },
5
25
  {
6
26
  "name": "disabled",
7
27
  "required": false,
8
28
  "type": "<span class=\"tsd-signature-type\">boolean</span>",
9
29
  "typeDetail": "<span class=\"tsd-signature-type\">boolean</span>",
10
30
  "description": "Indicates if the editor is disabled",
11
- "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Indicates if the editor is disabled</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>10.19.0</p>\n</dd></dl></div>",
31
+ "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Indicates if the editor is disabled</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.0.1</p>\n</dd></dl></div>",
12
32
  "sourceFile": "TextEditor/TextEditor.types.ts",
13
- "sourceUrl": "https://github.com/procore/core/blob/a0e44d5/packages/text-editor/src/TextEditor/TextEditor.types.ts#L34"
33
+ "sourceUrl": "https://github.com/procore/core/blob/77cfaf0/packages/text-editor/src/TextEditor/TextEditor.types.ts#L34"
14
34
  },
15
35
  {
16
36
  "name": "error",
@@ -18,9 +38,9 @@
18
38
  "type": "<span class=\"tsd-signature-type\">boolean</span>",
19
39
  "typeDetail": "<span class=\"tsd-signature-type\">boolean</span>",
20
40
  "description": "Indicates if the editor is in an error state",
21
- "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Indicates if the editor is in an error state</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>10.19.0</p>\n</dd></dl></div>",
41
+ "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Indicates if the editor is in an error state</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.0.1</p>\n</dd></dl></div>",
22
42
  "sourceFile": "TextEditor/TextEditor.types.ts",
23
- "sourceUrl": "https://github.com/procore/core/blob/a0e44d5/packages/text-editor/src/TextEditor/TextEditor.types.ts#L41"
43
+ "sourceUrl": "https://github.com/procore/core/blob/77cfaf0/packages/text-editor/src/TextEditor/TextEditor.types.ts#L41"
24
44
  },
25
45
  {
26
46
  "name": "id",
@@ -28,9 +48,9 @@
28
48
  "type": "<span class=\"tsd-signature-type\">string</span>",
29
49
  "typeDetail": "<span class=\"tsd-signature-type\">string</span>",
30
50
  "description": "Unique identifier for the editor",
31
- "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Unique identifier for the editor</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>10.19.0</p>\n</dd></dl></div>",
51
+ "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Unique identifier for the editor</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.0.1</p>\n</dd></dl></div>",
32
52
  "sourceFile": "TextEditor/TextEditor.types.ts",
33
- "sourceUrl": "https://github.com/procore/core/blob/a0e44d5/packages/text-editor/src/TextEditor/TextEditor.types.ts#L10"
53
+ "sourceUrl": "https://github.com/procore/core/blob/77cfaf0/packages/text-editor/src/TextEditor/TextEditor.types.ts#L10"
34
54
  },
35
55
  {
36
56
  "name": "initialValue",
@@ -38,31 +58,21 @@
38
58
  "type": "<span class=\"tsd-signature-type\">string</span>",
39
59
  "typeDetail": "<span class=\"tsd-signature-type\">string</span>",
40
60
  "description": "Initial value of the editor",
41
- "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Initial value of the editor</p>\n</div><dl class=\"tsd-comment-tags\"><dt>deprecated</dt><dd><p><code>initialValue</code> has been deprecated and will be removed in a future version.\nPlease use the <code>value</code> prop instead</p>\n</dd><dt>deprecatedsince</dt><dd><p>10.20.0</p>\n</dd><dt>since</dt><dd><p>10.19.0</p>\n</dd></dl></div>",
61
+ "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Initial value of the editor</p>\n</div><dl class=\"tsd-comment-tags\"><dt>deprecated</dt><dd><p><code>initialValue</code> has been deprecated and will be removed in a future version.\nPlease use the <code>value</code> prop instead</p>\n</dd><dt>deprecatedsince</dt><dd><p>0.0.1</p>\n</dd><dt>since</dt><dd><p>0.0.1</p>\n</dd></dl></div>",
42
62
  "deprecated": "`initialValue` has been deprecated and will be removed in a future version.\nPlease use the `value` prop instead",
43
- "deprecatedSince": "10.20.0",
63
+ "deprecatedSince": "0.0.1",
44
64
  "sourceFile": "TextEditor/TextEditor.types.ts",
45
- "sourceUrl": "https://github.com/procore/core/blob/a0e44d5/packages/text-editor/src/TextEditor/TextEditor.types.ts#L20"
65
+ "sourceUrl": "https://github.com/procore/core/blob/77cfaf0/packages/text-editor/src/TextEditor/TextEditor.types.ts#L20"
46
66
  },
47
67
  {
48
68
  "name": "locale",
49
69
  "required": false,
50
- "type": "<span class=\"tsd-signature-type\">Locale</span>",
51
- "typeDetail": "<span class=\"tsd-signature-type\">Locale</span>",
70
+ "type": "<span class=\"tsd-signature-type\">string</span>",
71
+ "typeDetail": "<span class=\"tsd-signature-type\">string</span>",
52
72
  "description": "Locale which will be used for localization. Can be passed directly or\nset by wrapping components in I18n provider.",
53
- "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Locale which will be used for localization. Can be passed directly or\nset by wrapping components in I18n provider.</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>10.19.0</p>\n</dd></dl></div>",
54
- "sourceFile": "TextEditor/TextEditor.types.ts",
55
- "sourceUrl": "https://github.com/procore/core/blob/a0e44d5/packages/text-editor/src/TextEditor/TextEditor.types.ts#L48"
56
- },
57
- {
58
- "name": "plugins",
59
- "required": false,
60
- "type": "<span class=\"tsd-signature-type\">string</span><span class=\"tsd-signature-symbol\">[]</span>",
61
- "typeDetail": "<span class=\"tsd-signature-type\">string</span><span class=\"tsd-signature-symbol\">[]</span>",
62
- "description": "Array of plugin names to add to the editor in addition to the defaults.\nThis provides backward compatibility with the deprecated TinyMCE version of the editor.\nSupports plugin names like 'link', 'image', 'table', etc.",
63
- "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Array of plugin names to add to the editor in addition to the defaults.\nThis provides backward compatibility with the deprecated TinyMCE version of the editor.\nSupports plugin names like &#39;link&#39;, &#39;image&#39;, &#39;table&#39;, etc.</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>12.26.0</p>\n</dd></dl></div>",
73
+ "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Locale which will be used for localization. Can be passed directly or\nset by wrapping components in I18n provider.</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.0.1</p>\n</dd></dl></div>",
64
74
  "sourceFile": "TextEditor/TextEditor.types.ts",
65
- "sourceUrl": "https://github.com/procore/core/blob/a0e44d5/packages/text-editor/src/TextEditor/TextEditor.types.ts#L57"
75
+ "sourceUrl": "https://github.com/procore/core/blob/77cfaf0/packages/text-editor/src/TextEditor/TextEditor.types.ts#L67"
66
76
  },
67
77
  {
68
78
  "name": "value",
@@ -70,19 +80,9 @@
70
80
  "type": "<span class=\"tsd-signature-type\">string</span>",
71
81
  "typeDetail": "<span class=\"tsd-signature-type\">string</span>",
72
82
  "description": "The current value of the editor",
73
- "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>The current value of the editor</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>10.19.0</p>\n</dd></dl></div>",
74
- "sourceFile": "TextEditor/TextEditor.types.ts",
75
- "sourceUrl": "https://github.com/procore/core/blob/a0e44d5/packages/text-editor/src/TextEditor/TextEditor.types.ts#L27"
76
- },
77
- {
78
- "name": "config",
79
- "required": false,
80
- "type": "Function",
81
- "typeDetail": "config<span class=\"tsd-signature-symbol\">(</span>defaultConfig<span class=\"tsd-signature-symbol\">: </span><span class=\"tsd-signature-type\">EditorConfig</span><span class=\"tsd-signature-symbol\">)</span><span class=\"tsd-signature-symbol\">: </span><span class=\"tsd-signature-type\">EditorConfig</span>",
82
- "description": "Configuration function for customizing the editor",
83
- "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Configuration function for customizing the editor</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>12.26.0</p>\n</dd></dl></div>",
83
+ "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>The current value of the editor</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.0.1</p>\n</dd></dl></div>",
84
84
  "sourceFile": "TextEditor/TextEditor.types.ts",
85
- "sourceUrl": "https://github.com/procore/core/blob/a0e44d5/packages/text-editor/src/TextEditor/TextEditor.types.ts#L66"
85
+ "sourceUrl": "https://github.com/procore/core/blob/77cfaf0/packages/text-editor/src/TextEditor/TextEditor.types.ts#L27"
86
86
  },
87
87
  {
88
88
  "name": "onAfterDestroy",
@@ -90,9 +90,9 @@
90
90
  "type": "Function",
91
91
  "typeDetail": "on<wbr/>After<wbr/>Destroy<span class=\"tsd-signature-symbol\">(</span><span class=\"tsd-signature-symbol\">)</span><span class=\"tsd-signature-symbol\">: </span><span class=\"tsd-signature-type\">void</span>",
92
92
  "description": "Callback fired after the editor instance is destroyed",
93
- "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Callback fired after the editor instance is destroyed</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>10.19.0</p>\n</dd></dl></div>",
93
+ "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Callback fired after the editor instance is destroyed</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.0.1</p>\n</dd></dl></div>",
94
94
  "sourceFile": "TextEditor/TextEditor.types.ts",
95
- "sourceUrl": "https://github.com/procore/core/blob/a0e44d5/packages/text-editor/src/TextEditor/TextEditor.types.ts#L116"
95
+ "sourceUrl": "https://github.com/procore/core/blob/77cfaf0/packages/text-editor/src/TextEditor/TextEditor.types.ts#L117"
96
96
  },
97
97
  {
98
98
  "name": "onBlur",
@@ -100,9 +100,9 @@
100
100
  "type": "Function",
101
101
  "typeDetail": "on<wbr/>Blur<span class=\"tsd-signature-symbol\">(</span>event<span class=\"tsd-signature-symbol\">: </span><span class=\"tsd-signature-type\">EventInfo</span><span class=\"tsd-signature-symbol\">&lt;</span><span class=\"tsd-signature-type\">string</span><span class=\"tsd-signature-symbol\">, </span><span class=\"tsd-signature-type\">unknown</span><span class=\"tsd-signature-symbol\">&gt;</span>, editor<span class=\"tsd-signature-symbol\">: </span><span class=\"tsd-signature-type\">ClassicEditor</span><span class=\"tsd-signature-symbol\">)</span><span class=\"tsd-signature-symbol\">: </span><span class=\"tsd-signature-type\">void</span>",
102
102
  "description": "Callback fired when the editor loses focus",
103
- "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Callback fired when the editor loses focus</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>10.19.0</p>\n</dd></dl></div>",
103
+ "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Callback fired when the editor loses focus</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.0.1</p>\n</dd></dl></div>",
104
104
  "sourceFile": "TextEditor/TextEditor.types.ts",
105
- "sourceUrl": "https://github.com/procore/core/blob/a0e44d5/packages/text-editor/src/TextEditor/TextEditor.types.ts#L89"
105
+ "sourceUrl": "https://github.com/procore/core/blob/77cfaf0/packages/text-editor/src/TextEditor/TextEditor.types.ts#L90"
106
106
  },
107
107
  {
108
108
  "name": "onChange",
@@ -110,9 +110,9 @@
110
110
  "type": "Function",
111
111
  "typeDetail": "on<wbr/>Change<span class=\"tsd-signature-symbol\">(</span>value<span class=\"tsd-signature-symbol\">: </span><span class=\"tsd-signature-type\">string</span>, isDirty<span class=\"tsd-signature-symbol\">?: </span><span class=\"tsd-signature-type\">boolean</span><span class=\"tsd-signature-symbol\">)</span><span class=\"tsd-signature-symbol\">: </span><span class=\"tsd-signature-type\">void</span>",
112
112
  "description": "Callback fired when the editor content changes",
113
- "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Callback fired when the editor content changes</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>10.19.0</p>\n</dd></dl></div>",
113
+ "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Callback fired when the editor content changes</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.0.1</p>\n</dd></dl></div>",
114
114
  "sourceFile": "TextEditor/TextEditor.types.ts",
115
- "sourceUrl": "https://github.com/procore/core/blob/a0e44d5/packages/text-editor/src/TextEditor/TextEditor.types.ts#L75"
115
+ "sourceUrl": "https://github.com/procore/core/blob/77cfaf0/packages/text-editor/src/TextEditor/TextEditor.types.ts#L76"
116
116
  },
117
117
  {
118
118
  "name": "onDirty",
@@ -120,9 +120,9 @@
120
120
  "type": "Function",
121
121
  "typeDetail": "on<wbr/>Dirty<span class=\"tsd-signature-symbol\">(</span><span class=\"tsd-signature-symbol\">)</span><span class=\"tsd-signature-symbol\">: </span><span class=\"tsd-signature-type\">void</span>",
122
122
  "description": "Callback fired when the editor becomes dirty (content differs from initial value)",
123
- "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Callback fired when the editor becomes dirty (content differs from initial value)</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>12.26.0</p>\n</dd></dl></div>",
123
+ "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Callback fired when the editor becomes dirty (content differs from initial value)</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.0.1</p>\n</dd></dl></div>",
124
124
  "sourceFile": "TextEditor/TextEditor.types.ts",
125
- "sourceUrl": "https://github.com/procore/core/blob/a0e44d5/packages/text-editor/src/TextEditor/TextEditor.types.ts#L123"
125
+ "sourceUrl": "https://github.com/procore/core/blob/77cfaf0/packages/text-editor/src/TextEditor/TextEditor.types.ts#L124"
126
126
  },
127
127
  {
128
128
  "name": "onError",
@@ -130,9 +130,9 @@
130
130
  "type": "Function",
131
131
  "typeDetail": "on<wbr/>Error<span class=\"tsd-signature-symbol\">(</span>error<span class=\"tsd-signature-symbol\">: </span><span class=\"tsd-signature-type\">Error</span>, details<span class=\"tsd-signature-symbol\">: </span><span class=\"tsd-signature-symbol\">{ </span>phase<span class=\"tsd-signature-symbol\">: </span><span class=\"tsd-signature-type\">&quot;initialization&quot;</span><span class=\"tsd-signature-symbol\"> | </span><span class=\"tsd-signature-type\">&quot;runtime&quot;</span><span class=\"tsd-signature-symbol\">; </span>willEditorRestart<span class=\"tsd-signature-symbol\">?: </span><span class=\"tsd-signature-type\">boolean</span><span class=\"tsd-signature-symbol\"> }</span><span class=\"tsd-signature-symbol\">)</span><span class=\"tsd-signature-symbol\">: </span><span class=\"tsd-signature-type\">void</span>",
132
132
  "description": "Callback fired when an error occurs in the editor",
133
- "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Callback fired when an error occurs in the editor</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>10.19.0</p>\n</dd></dl></div>",
133
+ "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Callback fired when an error occurs in the editor</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.0.1</p>\n</dd></dl></div>",
134
134
  "sourceFile": "TextEditor/TextEditor.types.ts",
135
- "sourceUrl": "https://github.com/procore/core/blob/a0e44d5/packages/text-editor/src/TextEditor/TextEditor.types.ts#L96"
135
+ "sourceUrl": "https://github.com/procore/core/blob/77cfaf0/packages/text-editor/src/TextEditor/TextEditor.types.ts#L97"
136
136
  },
137
137
  {
138
138
  "name": "onFocus",
@@ -140,9 +140,9 @@
140
140
  "type": "Function",
141
141
  "typeDetail": "on<wbr/>Focus<span class=\"tsd-signature-symbol\">(</span>event<span class=\"tsd-signature-symbol\">: </span><span class=\"tsd-signature-type\">EventInfo</span><span class=\"tsd-signature-symbol\">&lt;</span><span class=\"tsd-signature-type\">string</span><span class=\"tsd-signature-symbol\">, </span><span class=\"tsd-signature-type\">unknown</span><span class=\"tsd-signature-symbol\">&gt;</span>, editor<span class=\"tsd-signature-symbol\">: </span><span class=\"tsd-signature-type\">ClassicEditor</span><span class=\"tsd-signature-symbol\">)</span><span class=\"tsd-signature-symbol\">: </span><span class=\"tsd-signature-type\">void</span>",
142
142
  "description": "Callback fired when the editor gains focus",
143
- "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Callback fired when the editor gains focus</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>10.19.0</p>\n</dd></dl></div>",
143
+ "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Callback fired when the editor gains focus</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.0.1</p>\n</dd></dl></div>",
144
144
  "sourceFile": "TextEditor/TextEditor.types.ts",
145
- "sourceUrl": "https://github.com/procore/core/blob/a0e44d5/packages/text-editor/src/TextEditor/TextEditor.types.ts#L82"
145
+ "sourceUrl": "https://github.com/procore/core/blob/77cfaf0/packages/text-editor/src/TextEditor/TextEditor.types.ts#L83"
146
146
  },
147
147
  {
148
148
  "name": "onInit",
@@ -150,9 +150,9 @@
150
150
  "type": "Function",
151
151
  "typeDetail": "on<wbr/>Init<span class=\"tsd-signature-symbol\">(</span>editor<span class=\"tsd-signature-symbol\">: </span><span class=\"tsd-signature-type\">ClassicEditor</span><span class=\"tsd-signature-symbol\">)</span><span class=\"tsd-signature-symbol\">: </span><span class=\"tsd-signature-type\">void</span>",
152
152
  "description": "Callback fired when the editor is ready",
153
- "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Callback fired when the editor is ready</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>10.19.0</p>\n</dd></dl></div>",
153
+ "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Callback fired when the editor is ready</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.0.1</p>\n</dd></dl></div>",
154
154
  "sourceFile": "TextEditor/TextEditor.types.ts",
155
- "sourceUrl": "https://github.com/procore/core/blob/a0e44d5/packages/text-editor/src/TextEditor/TextEditor.types.ts#L109"
155
+ "sourceUrl": "https://github.com/procore/core/blob/77cfaf0/packages/text-editor/src/TextEditor/TextEditor.types.ts#L110"
156
156
  },
157
157
  {
158
158
  "name": "onKeyDown",
@@ -160,9 +160,9 @@
160
160
  "type": "Function",
161
161
  "typeDetail": "on<wbr/>Key<wbr/>Down<span class=\"tsd-signature-symbol\">(</span>event<span class=\"tsd-signature-symbol\">: </span><span class=\"tsd-signature-type\">KeyboardEvent</span>, editor<span class=\"tsd-signature-symbol\">: </span><span class=\"tsd-signature-type\">ClassicEditor</span><span class=\"tsd-signature-symbol\">)</span><span class=\"tsd-signature-symbol\">: </span><span class=\"tsd-signature-type\">void</span>",
162
162
  "description": "Callback fired when a key is pressed in the editor",
163
- "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Callback fired when a key is pressed in the editor</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>12.29.0</p>\n</dd></dl></div>",
163
+ "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Callback fired when a key is pressed in the editor</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.0.1</p>\n</dd></dl></div>",
164
164
  "sourceFile": "TextEditor/TextEditor.types.ts",
165
- "sourceUrl": "https://github.com/procore/core/blob/a0e44d5/packages/text-editor/src/TextEditor/TextEditor.types.ts#L132"
165
+ "sourceUrl": "https://github.com/procore/core/blob/77cfaf0/packages/text-editor/src/TextEditor/TextEditor.types.ts#L133"
166
166
  }
167
167
  ],
168
168
  "description": ""
@@ -10,7 +10,7 @@
10
10
  "description": "",
11
11
  "descriptionHtml": "",
12
12
  "sourceFile": "TextEditor/TextEditorProvider.types.ts",
13
- "sourceUrl": "https://github.com/procore/core/blob/a0e44d5/packages/text-editor/src/TextEditor/TextEditorProvider.types.ts#L9"
13
+ "sourceUrl": "https://github.com/procore/core/blob/77cfaf0/packages/text-editor/src/TextEditor/TextEditorProvider.types.ts#L9"
14
14
  },
15
15
  {
16
16
  "name": "features",
@@ -20,7 +20,7 @@
20
20
  "description": "- `stickyToolbar` - Have the editor toolbar stick to the top when content is longer than the page length.\n- `tabAsNavigation` - Have `Tab` key exit the editor. Support `Alt`/`Opt` + `Tab` as triple space indent.",
21
21
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<ul>\n<li><code>stickyToolbar</code> - Have the editor toolbar stick to the top when content is longer than the page length.</li>\n<li><code>tabAsNavigation</code> - Have <code>Tab</code> key exit the editor. Support <code>Alt</code>/<code>Opt</code> + <code>Tab</code> as triple space indent.</li>\n</ul>\n</div></div>",
22
22
  "sourceFile": "TextEditor/TextEditorProvider.types.ts",
23
- "sourceUrl": "https://github.com/procore/core/blob/a0e44d5/packages/text-editor/src/TextEditor/TextEditorProvider.types.ts#L14"
23
+ "sourceUrl": "https://github.com/procore/core/blob/77cfaf0/packages/text-editor/src/TextEditor/TextEditorProvider.types.ts#L14"
24
24
  }
25
25
  ],
26
26
  "description": ""
@@ -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/a0e44d5/packages/text-editor/src/TextEditorOutput/TextEditorOutput.types.ts#L14"
13
+ "sourceUrl": "https://github.com/procore/core/blob/77cfaf0/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/a0e44d5/packages/text-editor/src/TextEditorOutput/TextEditorOutput.types.ts#L21"
23
+ "sourceUrl": "https://github.com/procore/core/blob/77cfaf0/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/a0e44d5/packages/text-editor/src/TextEditorOutput/TextEditorOutput.types.ts#L7"
33
+ "sourceUrl": "https://github.com/procore/core/blob/77cfaf0/packages/text-editor/src/TextEditorOutput/TextEditorOutput.types.ts#L7"
34
34
  }
35
35
  ],
36
36
  "description": ""
@@ -1 +1 @@
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"}]
1
+ [{"interface":"TextEditorProps","property":"initialValue","deprecatedSince":"0.0.1","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.2",
3
+ "version": "0.1.0",
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"
@@ -55,6 +55,8 @@
55
55
  "build:esm": "BUNDLING=true babel src --out-dir dist --extensions '.ts,.tsx,.js,.snap' -s --copy-files --no-copy-ignored",
56
56
  "build:typedoc": "ts-node typedoc.ts",
57
57
  "build:types": "tsc --declaration --emitDeclarationOnly -p tsconfig.prod.json",
58
+ "chromatic": "dotenvx run -- chromatic",
59
+ "chromatic:ci": "chromatic --ci --storybook-build-dir ./storybook-static --project-token=${CHROMATIC_TEXT_EDITOR_TOKEN} --exit-once-uploaded --only-changed --skip=\"dependabot*\"",
58
60
  "clean": "rimraf dist",
59
61
  "dev": "NODE_ENV=development yarn run dev:ts",
60
62
  "dev:ts": "tsc -p tsconfig.prod.json --watch",
@@ -62,12 +64,12 @@
62
64
  "lint:types": "tsc -p tsconfig.prod.json --noEmit",
63
65
  "lint:types:watch": "tsc -p . --noEmit --watch",
64
66
  "storybook": "storybook dev -p 6008",
65
- "test": "TZ=America/Los_Angeles jest --silent --runInBand --logHeapUsage",
67
+ "test": "TZ=America/Los_Angeles jest --runInBand --logHeapUsage",
66
68
  "test:update": "TZ=America/Los_Angeles jest --runInBand -u",
67
69
  "test:watch": "yarn run test --watch"
68
70
  },
69
71
  "peerDependencies": {
70
- "@procore/core-react": "^12.32.0",
72
+ "@procore/core-react": "^12.38.0",
71
73
  "@procore/globalization-toolkit": ">= 3 < 4",
72
74
  "ckeditor5": "^46.0.1",
73
75
  "react": ">=16.8.0 < 19",
@@ -77,7 +79,7 @@
77
79
  "dependencies": {
78
80
  "@ckeditor/ckeditor5-react": "^11.0.0",
79
81
  "@procore/core-i18n-js": "^10.30.0",
80
- "@procore/core-icons": "^12.11.0",
82
+ "@procore/core-icons": "^12.12.0",
81
83
  "@react-aria/focus": "3.16.2",
82
84
  "@react-aria/utils": "3.23.2",
83
85
  "sanitize-html": "^2.17.0"
@@ -91,17 +93,11 @@
91
93
  "@babel/preset-react": "7.18.6",
92
94
  "@babel/preset-typescript": "7.18.6",
93
95
  "@babel/register": "7.18.9",
94
- "@ckeditor/ckeditor5-dev-utils": "^43.1.0",
95
- "@ckeditor/ckeditor5-dev-webpack-plugin": "^31.1.13",
96
- "@procore/core-react": "^12.32.0",
96
+ "@procore/core-react": "^12.38.0",
97
97
  "@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",
98
+ "@storybook/addon-webpack5-compiler-swc": "^4.0.2",
101
99
  "@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",
100
+ "@storybook/react-webpack5": "^9.1.16",
105
101
  "@storybook/testing-library": "^0.2.2",
106
102
  "@testing-library/dom": "8.20.0",
107
103
  "@testing-library/jest-dom": "5.16.4",
@@ -126,6 +122,7 @@
126
122
  "eslint-config-prettier": "8.6.0",
127
123
  "eslint-config-react-app": "^7.0.1",
128
124
  "eslint-plugin-react-hooks": "4.6.0",
125
+ "eslint-plugin-storybook": "^9.1.16",
129
126
  "fs-extra": "11.1.1",
130
127
  "glob": "8.1.0",
131
128
  "jest": "29.4.1",
@@ -134,7 +131,7 @@
134
131
  "react": "18.3.1",
135
132
  "react-dom": "18.3.1",
136
133
  "rimraf": "^6.0.1",
137
- "storybook": "^7.5.3",
134
+ "storybook": "^9.1.17",
138
135
  "style-loader": "^4.0.0",
139
136
  "styled-components": "6.1.18",
140
137
  "ts-jest": "^29.0.5",
@@ -1,7 +0,0 @@
1
- import type { EditorConfig, Plugin } from 'ckeditor5';
2
- /** Gets CKEditor plugin objects from TinyMCE string plugin names */
3
- export declare const getPluginsFromStringArray: (pluginNames?: string[]) => (typeof Plugin)[];
4
- /** Gets toolbar items that should be added for the given string plugin names. */
5
- export declare const getToolbarItemsFromStringArray: (pluginNames?: string[]) => string[];
6
- /** Enhances an editor config by adding plugins and toolbar items from TinyMCE string array */
7
- export declare const addPluginsFromStringArray: (config: EditorConfig, pluginNames?: string[]) => EditorConfig;