@procore/text-editor 1.0.0 → 1.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.
- package/.jest/ckeditorMock.js +2 -0
- package/.jest/ckeditorUtilsMock.js +14 -0
- package/CHANGELOG.md +30 -0
- package/dist/DebouncedTextEditor/DebouncedTextEditor.js +1 -1
- package/dist/DebouncedTextEditor/DebouncedTextEditor.js.map +1 -1
- package/dist/DebouncedTextEditor/index.js.map +1 -1
- package/dist/TextEditor/CKTextEditor.js +15 -9
- package/dist/TextEditor/CKTextEditor.js.map +1 -1
- package/dist/TextEditor/EditorError.js.map +1 -1
- package/dist/TextEditor/Providers/FeatureFlagProvider.js.map +1 -1
- package/dist/TextEditor/StickyToolbar/index.js.map +1 -1
- package/dist/TextEditor/StickyToolbar/useStickyToolbar.js.map +1 -1
- package/dist/TextEditor/StickyToolbar/useStickyToolbar.types.js.map +1 -1
- package/dist/TextEditor/TextEditor.js.map +1 -1
- package/dist/TextEditor/TextEditor.styles.d.ts +7 -8
- package/dist/TextEditor/TextEditor.styles.js +5 -5
- package/dist/TextEditor/TextEditor.styles.js.map +1 -1
- package/dist/TextEditor/TextEditor.types.d.ts +1 -1
- package/dist/TextEditor/TextEditor.types.js.map +1 -1
- package/dist/TextEditor/TextEditorI18nProvider.js.map +1 -1
- package/dist/TextEditor/TextEditorProvider.js.map +1 -1
- package/dist/TextEditor/TextEditorProvider.types.d.ts +1 -1
- package/dist/TextEditor/TextEditorProvider.types.js.map +1 -1
- package/dist/TextEditor/TinyMCETextEditor.js.map +1 -1
- package/dist/TextEditor/index.d.ts +1 -1
- package/dist/TextEditor/index.js +0 -1
- package/dist/TextEditor/index.js.map +1 -1
- package/dist/TextEditor/license_key.js.map +1 -1
- package/dist/TextEditor/plugins/CutPlugin/CutCommand.js +21 -29
- package/dist/TextEditor/plugins/CutPlugin/CutCommand.js.map +1 -1
- package/dist/TextEditor/plugins/CutPlugin/CutPlugin.js +2 -2
- package/dist/TextEditor/plugins/CutPlugin/CutPlugin.js.map +1 -1
- package/dist/TextEditor/plugins/CutPlugin/index.js.map +1 -1
- package/dist/TextEditor/plugins/IndentPaddingToMarginPlugin/IndentPaddingToMarginPlugin.js.map +1 -1
- package/dist/TextEditor/plugins/IndentPaddingToMarginPlugin/index.js.map +1 -1
- package/dist/TextEditor/plugins/NormalizeTableWidthPlugin/NormalizeTableWidthPlugin.js.map +1 -1
- package/dist/TextEditor/plugins/NormalizeTableWidthPlugin/index.js.map +1 -1
- package/dist/TextEditor/plugins/PasteAsTextPlugin/PasteAsTextCommand.js +20 -28
- package/dist/TextEditor/plugins/PasteAsTextPlugin/PasteAsTextCommand.js.map +1 -1
- package/dist/TextEditor/plugins/PasteAsTextPlugin/PasteAsTextPlugin.js +2 -2
- package/dist/TextEditor/plugins/PasteAsTextPlugin/PasteAsTextPlugin.js.map +1 -1
- package/dist/TextEditor/plugins/PasteAsTextPlugin/index.js.map +1 -1
- package/dist/TextEditor/plugins/PastePlugin/PasteCommand.js +54 -62
- package/dist/TextEditor/plugins/PastePlugin/PasteCommand.js.map +1 -1
- package/dist/TextEditor/plugins/PastePlugin/PastePlugin.js +2 -2
- package/dist/TextEditor/plugins/PastePlugin/PastePlugin.js.map +1 -1
- package/dist/TextEditor/plugins/PastePlugin/index.js.map +1 -1
- package/dist/TextEditor/plugins/ProcoreImageUploadPlugin/ProcoreImageUploadPlugin.d.ts +1 -1
- package/dist/TextEditor/plugins/ProcoreImageUploadPlugin/ProcoreImageUploadPlugin.js +50 -59
- package/dist/TextEditor/plugins/ProcoreImageUploadPlugin/ProcoreImageUploadPlugin.js.map +1 -1
- package/dist/TextEditor/plugins/ProcoreImageUploadPlugin/index.js.map +1 -1
- package/dist/TextEditor/plugins/TabSpacesPlugin/TabSpacesPlugin.js.map +1 -1
- package/dist/TextEditor/plugins/TabSpacesPlugin/index.js.map +1 -1
- package/dist/TextEditor/textEditorTheming/icons.js.map +1 -1
- package/dist/TextEditor/textEditorTheming/index.js.map +1 -1
- package/dist/TextEditor/textEditorTheming/textEditorTheming.styles.d.ts +0 -1
- package/dist/TextEditor/textEditorTheming/textEditorTheming.styles.js.map +1 -1
- package/dist/TextEditor/useCKEditorCss.js.map +1 -1
- package/dist/TextEditor/useCKEditorFocusScope.js.map +1 -1
- package/dist/TextEditor/useTabAsNavigation.js.map +1 -1
- package/dist/TextEditor/utils/config.js +29 -4
- package/dist/TextEditor/utils/config.js.map +1 -1
- package/dist/TextEditor/utils/imageAttributes.js.map +1 -1
- package/dist/TextEditor/utils/imageUrls.js.map +1 -1
- package/dist/TextEditor/utils/index.js.map +1 -1
- package/dist/TextEditor/utils/locale.js +12 -1
- package/dist/TextEditor/utils/locale.js.map +1 -1
- package/dist/TextEditor/utils/richTextEditorHandlers.d.ts +2 -2
- package/dist/TextEditor/utils/richTextEditorHandlers.js +62 -81
- package/dist/TextEditor/utils/richTextEditorHandlers.js.map +1 -1
- package/dist/TextEditorOutput/TextEditorOutput.js.map +1 -1
- package/dist/TextEditorOutput/TextEditorOutput.styles.d.ts +0 -1
- package/dist/TextEditorOutput/TextEditorOutput.styles.js +2 -2
- package/dist/TextEditorOutput/TextEditorOutput.styles.js.map +1 -1
- package/dist/TextEditorOutput/TextEditorOutput.types.d.ts +0 -1
- package/dist/TextEditorOutput/TextEditorOutput.types.js.map +1 -1
- package/dist/TextEditorOutput/TextEditorOutput.utils.js +12 -4
- package/dist/TextEditorOutput/TextEditorOutput.utils.js.map +1 -1
- package/dist/TextEditorOutput/index.js.map +1 -1
- package/dist/_storyHelpers/constants.js.map +1 -1
- package/dist/_typedoc/TextEditor/TextEditor.types.json +153 -153
- package/dist/_typedoc/TextEditor/TextEditorProvider.types.json +4 -4
- package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +9 -9
- package/dist/_utils/propsTypedoc.d.ts +3 -3
- package/dist/_utils/propsTypedoc.js +1 -3
- package/dist/_utils/propsTypedoc.js.map +1 -1
- package/dist/ckeditor5-premium-features.d.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/locales/de-DE.json +17 -0
- package/dist/locales/en-AU.json +17 -0
- package/dist/locales/en-CA.json +17 -0
- package/dist/locales/en-GB.json +17 -0
- package/dist/locales/es-ES.json +17 -0
- package/dist/locales/es.json +17 -0
- package/dist/locales/fr-CA.json +17 -0
- package/dist/locales/fr-FR.json +17 -0
- package/dist/locales/is-IS.json +17 -0
- package/dist/locales/it-IT.json +17 -0
- package/dist/locales/ja-JP.json +17 -0
- package/dist/locales/nb-NO.json +17 -0
- package/dist/locales/pl-PL.json +17 -0
- package/dist/locales/pt-BR.json +17 -0
- package/dist/locales/pt-PT.json +17 -0
- package/dist/locales/th-TH.json +17 -0
- package/dist/locales/zh-SG.json +17 -0
- package/dist/locales/zh-TW.json +17 -0
- package/dist/stories/util.js.map +1 -1
- package/dist/utils/debounce.js +1 -1
- package/dist/utils/debounce.js.map +1 -1
- package/jestConfig.js +0 -2
- package/package.json +44 -42
- package/.jest/translationMock.js +0 -12
|
@@ -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-
|
|
5
|
-
})([".ck-editor__top{height:0 !important;}.ck-content{border:none !important;padding:0 !important;--ck-content-font-family:Inter,'Noto Sans JP','Noto Sans KR','Noto Sans SC','Noto Sans TC',sans-serif;--ck-content-font-size:14px;--ck-content-word-break:break-word;--ck-content-overflow-wrap:break-word;--ck-content-line-height:1.4;p{margin:0;}img{margin-left:auto;margin-right:auto;max-width:100%;height:auto;}figure.table{display:table;margin-top:0.9em;margin-bottom:0.9em;}figure.table table,table{width:100%;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;}}}}"]);
|
|
4
|
+
componentId: "text-editor-1_1_0__sc-1oujb2g-0"
|
|
5
|
+
})([".ck-editor__top{height:0 !important;}.ck-content{border:none !important;padding:0 !important;overflow-x:auto;--ck-content-font-family:Inter,'Noto Sans JP','Noto Sans KR','Noto Sans SC','Noto Sans TC',sans-serif;--ck-content-font-size:14px;--ck-content-word-break:break-word;--ck-content-overflow-wrap:break-word;--ck-content-line-height:1.4;p{margin:0;}img{margin-left:auto;margin-right:auto;max-width:100%;height:auto;}figure.table{display:table;margin-top:0.9em;margin-bottom:0.9em;}figure.table table,table{width:100%;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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextEditorOutput.styles.js","names":["styled","StyledEditor","div","withConfig","displayName","componentId"],"sources":["../../src/TextEditorOutput/TextEditorOutput.styles.ts"],"sourcesContent":["import styled from 'styled-components'\n\nexport const StyledEditor = styled.div`\n .ck-editor__top {\n height: 0 !important;\n }\n\n .ck-content {\n border: none !important;\n padding: 0 !important;\n --ck-content-font-family: Inter, 'Noto Sans JP', 'Noto Sans KR',\n 'Noto Sans SC', 'Noto Sans TC', sans-serif;\n --ck-content-font-size: 14px;\n --ck-content-word-break: break-word;\n --ck-content-overflow-wrap: break-word;\n --ck-content-line-height: 1.4;\n\n p {\n margin: 0;\n }\n\n img {\n margin-left: auto;\n margin-right: auto;\n max-width: 100%;\n height: auto;\n }\n\n figure.table {\n display: table;\n margin-top: 0.9em;\n margin-bottom: 0.9em;\n }\n\n figure.table table,\n table {\n width: 100%;\n border: 1px double #b3b3b3;\n border-collapse: collapse;\n border-spacing: 0;\n\n th {\n text-align: left;\n }\n\n & > thead,\n & > tbody {\n & > tr > td,\n & > tr > th {\n border: 1px solid #bfbfbf;\n min-width: 2em;\n padding: 0.4em;\n }\n\n & > tr > th {\n background: rgba(0, 0, 0, 0.05);\n font-weight: 700;\n }\n }\n }\n }\n`\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,mBAAmB;AAEtC,OAAO,IAAMC,YAAY,gBAAGD,MAAM,CAACE,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"TextEditorOutput.styles.js","names":["styled","StyledEditor","div","withConfig","displayName","componentId"],"sources":["../../src/TextEditorOutput/TextEditorOutput.styles.ts"],"sourcesContent":["import styled from 'styled-components'\n\nexport const StyledEditor = styled.div`\n .ck-editor__top {\n height: 0 !important;\n }\n\n .ck-content {\n border: none !important;\n padding: 0 !important;\n overflow-x: auto;\n --ck-content-font-family: Inter, 'Noto Sans JP', 'Noto Sans KR',\n 'Noto Sans SC', 'Noto Sans TC', sans-serif;\n --ck-content-font-size: 14px;\n --ck-content-word-break: break-word;\n --ck-content-overflow-wrap: break-word;\n --ck-content-line-height: 1.4;\n\n p {\n margin: 0;\n }\n\n img {\n margin-left: auto;\n margin-right: auto;\n max-width: 100%;\n height: auto;\n }\n\n figure.table {\n display: table;\n margin-top: 0.9em;\n margin-bottom: 0.9em;\n }\n\n figure.table table,\n table {\n width: 100%;\n border: 1px double #b3b3b3;\n border-collapse: collapse;\n border-spacing: 0;\n\n th {\n text-align: left;\n }\n\n & > thead,\n & > tbody {\n & > tr > td,\n & > tr > th {\n border: 1px solid #bfbfbf;\n min-width: 2em;\n padding: 0.4em;\n }\n\n & > tr > th {\n background: rgba(0, 0, 0, 0.05);\n font-weight: 700;\n }\n }\n }\n }\n`\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,mBAAmB;AAEtC,OAAO,IAAMC,YAAY,gBAAGD,MAAM,CAACE,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,uwBA4DrC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextEditorOutput.types.js","names":[],"sources":["../../src/TextEditorOutput/TextEditorOutput.types.ts"],"sourcesContent":["export interface TextEditorOutputProps {\n /**\n * Formatted text from `TextEditor`\n *\n * @since 10.24.0\n */\n value?: string\n\n /**\n * Additional classNames\n *\n * @since 10.24.0\n */\n className?: string\n\n /**\n * Additional CSS styles\n *\n * @since 10.24.0\n */\n style?: React.CSSProperties\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"TextEditorOutput.types.js","names":[],"sources":["../../src/TextEditorOutput/TextEditorOutput.types.ts"],"sourcesContent":["export interface TextEditorOutputProps {\n /**\n * Formatted text from `TextEditor`\n *\n * @since 10.24.0\n */\n value?: string\n\n /**\n * Additional classNames\n *\n * @since 10.24.0\n */\n className?: string\n\n /**\n * Additional CSS styles\n *\n * @since 10.24.0\n */\n style?: React.CSSProperties\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -19,7 +19,10 @@ import sanitizeHtml from 'sanitize-html';
|
|
|
19
19
|
import { RICH_TEXT_EDITOR_FILE_ID_ATTRIBUTE } from '../TextEditor/utils/imageAttributes';
|
|
20
20
|
import { canonicalizeTextEditorImageUrl } from '../TextEditor/utils/imageUrls';
|
|
21
21
|
export { isAllowedTextEditorImageUrl } from '../TextEditor/utils/imageUrls';
|
|
22
|
-
var CKEDITOR_IMAGE_CLASSES = new Set(['image', 'image-inline', 'image_resized', 'image-style-align-left', 'image-style-align-right', 'image-style-block-align-left', 'image-style-block-align-right', 'image-style-side'
|
|
22
|
+
var CKEDITOR_IMAGE_CLASSES = new Set(['image', 'image-inline', 'image_resized', 'image-style-align-left', 'image-style-align-right', 'image-style-block-align-left', 'image-style-block-align-right', 'image-style-side',
|
|
23
|
+
// Keep as-is: the figure transform runs on ALL figures, and this is the
|
|
24
|
+
// table-figure marker (`<figure class="table">`). We can't filter it out
|
|
25
|
+
'table']);
|
|
23
26
|
var IMAGE_TAGS = new Set(['figure', 'figcaption', 'picture', 'source', 'img']);
|
|
24
27
|
var sanitizeSrcset = function sanitizeSrcset(srcset) {
|
|
25
28
|
var candidates = srcset.split(',').map(function (candidate) {
|
|
@@ -32,7 +35,7 @@ var sanitizeSrcset = function sanitizeSrcset(srcset) {
|
|
|
32
35
|
var _candidate$split = candidate.split(/\s+/),
|
|
33
36
|
_candidate$split2 = _toArray(_candidate$split),
|
|
34
37
|
url = _candidate$split2[0],
|
|
35
|
-
descriptors = _candidate$split2.slice(1);
|
|
38
|
+
descriptors = _arrayLikeToArray(_candidate$split2).slice(1);
|
|
36
39
|
var canonicalUrl = canonicalizeTextEditorImageUrl(url);
|
|
37
40
|
if (!canonicalUrl || descriptors.some(function (descriptor) {
|
|
38
41
|
return !/^(?:\d+w|\d+(?:\.\d+)?x)$/.test(descriptor);
|
|
@@ -46,9 +49,13 @@ var sanitizeSrcset = function sanitizeSrcset(srcset) {
|
|
|
46
49
|
}
|
|
47
50
|
return sanitizedCandidates.join(', ');
|
|
48
51
|
};
|
|
52
|
+
|
|
53
|
+
// Keep it as-is — we can't filter it out or the output loses the table's
|
|
54
|
+
// alignment and always falls back to the default (centered).
|
|
55
|
+
var TABLE_ALIGNMENT_CLASS = /^table-style-(block-)?align-(left|center|right)$/;
|
|
49
56
|
var sanitizeImageClass = function sanitizeImageClass(className) {
|
|
50
57
|
var allowedClasses = className === null || className === void 0 ? void 0 : className.split(/\s+/).filter(function (name) {
|
|
51
|
-
return CKEDITOR_IMAGE_CLASSES.has(name);
|
|
58
|
+
return CKEDITOR_IMAGE_CLASSES.has(name) || TABLE_ALIGNMENT_CLASS.test(name);
|
|
52
59
|
});
|
|
53
60
|
return allowedClasses !== null && allowedClasses !== void 0 && allowedClasses.length ? allowedClasses.join(' ') : undefined;
|
|
54
61
|
};
|
|
@@ -186,7 +193,8 @@ export var sanitizeTextEditorHtml = function sanitizeTextEditorHtml(html) {
|
|
|
186
193
|
'list-style-type': [/.*/],
|
|
187
194
|
'vertical-align': [/.*/],
|
|
188
195
|
'white-space': [/.*/],
|
|
189
|
-
'aspect-ratio': [/^\d+(?:\.\d+)?(?:\s*\/\s*\d+(?:\.\d+)?)?$/]
|
|
196
|
+
'aspect-ratio': [/^\d+(?:\.\d+)?(?:\s*\/\s*\d+(?:\.\d+)?)?$/],
|
|
197
|
+
"float": [/^(?:left|right|none)$/]
|
|
190
198
|
}
|
|
191
199
|
},
|
|
192
200
|
allowedSchemes: ['http', 'https', 'mailto', 'tel'],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextEditorOutput.utils.js","names":["sanitizeHtml","RICH_TEXT_EDITOR_FILE_ID_ATTRIBUTE","canonicalizeTextEditorImageUrl","isAllowedTextEditorImageUrl","CKEDITOR_IMAGE_CLASSES","Set","IMAGE_TAGS","sanitizeSrcset","srcset","candidates","split","map","candidate","trim","filter","Boolean","length","undefined","sanitizedCandidates","_candidate$split","_candidate$split2","_toArray","url","descriptors","slice","canonicalUrl","some","descriptor","test","concat","_toConsumableArray","join","includes","sanitizeImageClass","className","allowedClasses","name","has","sanitizeImageSizes","sizes","sanitizeProstoreFileId","id","SAFE_IMAGE_STYLE_PROPERTIES","filterImageStyle","style","safeDeclarations","declaration","_property$trim$toLowe","_declaration$split","_declaration$split2","_slicedToArray","property","toLowerCase","setOrDeleteAttribute","attributes","value","sanitizeImageTagAttributes","tagName","onclick","onload","sanitizeClassAttribute","sanitizeUrlAttribute","sanitize","sanitizeImageUrlAttributes","sanitizeProstoreFileIdAttribute","addLazyImageLoadingAttributes","src","loading","decoding","transformImageTag","attribs","sanitizedAttributes","_objectSpread","sanitizeTextEditorHtml","html","allowedTags","allowedAttributes","a","figure","picture","source","img","table","col","td","th","allowedStyles","color","width","height","margin","padding","border","allowedSchemes","allowedSchemesByTag","transformTags","figcaption","exclusiveFilter","frame","tag","allowedIframeHostnames"],"sources":["../../src/TextEditorOutput/TextEditorOutput.utils.ts"],"sourcesContent":["import sanitizeHtml from 'sanitize-html'\n\nimport { RICH_TEXT_EDITOR_FILE_ID_ATTRIBUTE } from '../TextEditor/utils/imageAttributes'\nimport { canonicalizeTextEditorImageUrl } from '../TextEditor/utils/imageUrls'\n\nexport { isAllowedTextEditorImageUrl } from '../TextEditor/utils/imageUrls'\n\ntype Attributes = Record<string, string>\n\nconst CKEDITOR_IMAGE_CLASSES = new Set([\n 'image',\n 'image-inline',\n 'image_resized',\n 'image-style-align-left',\n 'image-style-align-right',\n 'image-style-block-align-left',\n 'image-style-block-align-right',\n 'image-style-side',\n])\n\nconst IMAGE_TAGS = new Set(['figure', 'figcaption', 'picture', 'source', 'img'])\n\nconst sanitizeSrcset = (srcset: string) => {\n const candidates = srcset\n .split(',')\n .map((candidate) => candidate.trim())\n .filter(Boolean)\n\n if (candidates.length === 0) {\n return undefined\n }\n\n const sanitizedCandidates = candidates.map((candidate) => {\n const [url, ...descriptors] = candidate.split(/\\s+/)\n const canonicalUrl = canonicalizeTextEditorImageUrl(url)\n\n if (\n !canonicalUrl ||\n descriptors.some(\n (descriptor) => !/^(?:\\d+w|\\d+(?:\\.\\d+)?x)$/.test(descriptor)\n )\n ) {\n return undefined\n }\n\n return [canonicalUrl, ...descriptors].join(' ')\n })\n\n if (sanitizedCandidates.includes(undefined)) {\n return undefined\n }\n\n return sanitizedCandidates.join(', ')\n}\n\nconst sanitizeImageClass = (className?: string) => {\n const allowedClasses = className\n ?.split(/\\s+/)\n .filter((name) => CKEDITOR_IMAGE_CLASSES.has(name))\n\n return allowedClasses?.length ? allowedClasses.join(' ') : undefined\n}\n\nconst sanitizeImageSizes = (sizes?: string) => {\n if (!sizes || /url\\(|javascript:|data:/i.test(sizes)) {\n return undefined\n }\n\n return /^[\\w\\s().,:+\\-/%]+$/.test(sizes) ? sizes : undefined\n}\n\nconst sanitizeProstoreFileId = (id?: string) =>\n id && /^[\\w-]+$/.test(id) ? id : undefined\n\n// ImageResize writes inline `width: X%` (and occasionally `height`) on the\n// containing <figure>/<img>. Keep only those declarations so resized images\n// render at the user's chosen size, `allowedStyles` further validates the values.\nconst SAFE_IMAGE_STYLE_PROPERTIES = new Set(['width', 'height', 'aspect-ratio'])\n\nconst filterImageStyle = (style?: string) => {\n if (!style) {\n return undefined\n }\n\n const safeDeclarations = style\n .split(';')\n .map((declaration) => declaration.trim())\n .filter(Boolean)\n .filter((declaration) => {\n const [property] = declaration.split(':', 1)\n return SAFE_IMAGE_STYLE_PROPERTIES.has(\n property?.trim().toLowerCase() ?? ''\n )\n })\n\n return safeDeclarations.length ? `${safeDeclarations.join('; ')};` : undefined\n}\n\nconst setOrDeleteAttribute = (\n attributes: Attributes,\n name: string,\n value?: string\n) => {\n if (value) {\n attributes[name] = value\n } else {\n delete attributes[name]\n }\n}\n\nconst sanitizeImageTagAttributes = (\n tagName: string,\n attributes: Attributes\n) => {\n if (!IMAGE_TAGS.has(tagName)) {\n return\n }\n\n setOrDeleteAttribute(attributes, 'style', filterImageStyle(attributes.style))\n delete attributes.onclick\n delete attributes.onload\n}\n\nconst sanitizeClassAttribute = (attributes: Attributes) => {\n setOrDeleteAttribute(\n attributes,\n 'class',\n sanitizeImageClass(attributes.class)\n )\n}\n\nconst sanitizeUrlAttribute = (\n attributes: Attributes,\n name: string,\n sanitize: (value: string) => string | undefined\n) => {\n if (attributes[name]) {\n setOrDeleteAttribute(attributes, name, sanitize(attributes[name]))\n }\n}\n\nconst sanitizeImageUrlAttributes = (attributes: Attributes) => {\n sanitizeUrlAttribute(attributes, 'src', canonicalizeTextEditorImageUrl)\n sanitizeUrlAttribute(attributes, 'srcset', sanitizeSrcset)\n sanitizeUrlAttribute(attributes, 'sizes', sanitizeImageSizes)\n}\n\nconst sanitizeProstoreFileIdAttribute = (attributes: Attributes) => {\n setOrDeleteAttribute(\n attributes,\n RICH_TEXT_EDITOR_FILE_ID_ATTRIBUTE,\n sanitizeProstoreFileId(attributes[RICH_TEXT_EDITOR_FILE_ID_ATTRIBUTE])\n )\n}\n\nconst addLazyImageLoadingAttributes = (\n tagName: string,\n attributes: Attributes\n) => {\n if (tagName === 'img' && attributes.src) {\n attributes.loading = 'lazy'\n attributes.decoding = 'async'\n }\n}\n\nconst transformImageTag = (tagName: string, attribs: Attributes) => {\n const sanitizedAttributes: Attributes = { ...attribs }\n\n sanitizeImageTagAttributes(tagName, sanitizedAttributes)\n sanitizeClassAttribute(sanitizedAttributes)\n sanitizeImageUrlAttributes(sanitizedAttributes)\n sanitizeProstoreFileIdAttribute(sanitizedAttributes)\n addLazyImageLoadingAttributes(tagName, sanitizedAttributes)\n\n return {\n tagName,\n attribs: sanitizedAttributes,\n }\n}\n\nexport const sanitizeTextEditorHtml = (html: string) => {\n if (!html) {\n return ''\n }\n\n return sanitizeHtml(html, {\n allowedTags: [\n 'p',\n 'br',\n 'strong',\n 'b',\n 'em',\n 'i',\n 'u',\n 's',\n 'span',\n 'div',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'ul',\n 'ol',\n 'li',\n 'a',\n 'figure',\n 'figcaption',\n 'table',\n 'colgroup',\n 'col',\n 'thead',\n 'tbody',\n 'tr',\n 'td',\n 'th',\n 'blockquote',\n 'pre',\n 'code',\n 'hr',\n 'img',\n 'picture',\n 'source',\n 'sub',\n 'sup',\n ],\n allowedAttributes: {\n '*': ['style', 'class'],\n a: ['href', 'title', 'target', 'rel'],\n figure: ['class', RICH_TEXT_EDITOR_FILE_ID_ATTRIBUTE],\n picture: ['class', RICH_TEXT_EDITOR_FILE_ID_ATTRIBUTE],\n source: ['srcset', 'sizes', 'type', 'media'],\n img: [\n 'src',\n 'srcset',\n 'sizes',\n 'alt',\n 'title',\n 'width',\n 'height',\n 'loading',\n 'decoding',\n 'class',\n RICH_TEXT_EDITOR_FILE_ID_ATTRIBUTE,\n ],\n table: ['border', 'cellpadding', 'cellspacing'],\n col: ['span'],\n td: ['colspan', 'rowspan'],\n th: ['colspan', 'rowspan', 'scope'],\n },\n allowedStyles: {\n '*': {\n color: [\n /^#[0-9a-fA-F]{3,6}$/,\n /^rgb\\(\\s*\\d+\\s*,\\s*\\d+\\s*,\\s*\\d+\\s*\\)$/,\n /^rgba\\(\\s*\\d+\\s*,\\s*\\d+\\s*,\\s*\\d+\\s*,\\s*[\\d.]+\\s*\\)$/,\n ],\n 'background-color': [\n /^#[0-9a-fA-F]{3,6}$/,\n /^rgb\\(\\s*\\d+\\s*,\\s*\\d+\\s*,\\s*\\d+\\s*\\)$/,\n /^rgba\\(\\s*\\d+\\s*,\\s*\\d+\\s*,\\s*\\d+\\s*,\\s*[\\d.]+\\s*\\)$/,\n ],\n 'font-size': [/^\\d+(?:px|pt|em|rem|%)$/],\n 'font-weight': [/^(?:normal|bold|bolder|lighter|\\d{1,3})$/],\n 'font-style': [/^(?:normal|italic|oblique)$/],\n 'font-family': [/.*/],\n 'text-decoration': [/^(?:none|underline|line-through|overline)$/],\n 'text-align': [/^(?:left|right|center|justify)$/],\n 'line-height': [/^\\d+(?:\\.\\d+)?(?:px|pt|em|rem|%)?$/],\n width: [/^\\d+(?:\\.\\d+)?(?:px|pt|em|rem|%)$/],\n 'min-width': [/^\\d+(?:\\.\\d+)?(?:px|pt|em|rem|%)$/],\n 'max-width': [/^\\d+(?:\\.\\d+)?(?:px|pt|em|rem|%)$/],\n height: [/^\\d+(?:\\.\\d+)?(?:px|pt|em|rem|%)$/],\n 'min-height': [/^\\d+(?:\\.\\d+)?(?:px|pt|em|rem|%)$/],\n 'max-height': [/^\\d+(?:\\.\\d+)?(?:px|pt|em|rem|%)$/],\n margin: [/^\\d+(?:px|pt|em|rem|%)?(?:\\s+\\d+(?:px|pt|em|rem|%)?)*$/],\n 'margin-top': [/^\\d+(?:px|pt|em|rem|%)?$/],\n 'margin-bottom': [/^\\d+(?:px|pt|em|rem|%)?$/],\n 'margin-left': [/^\\d+(?:px|pt|em|rem|%)?$/],\n 'margin-right': [/^\\d+(?:px|pt|em|rem|%)?$/],\n padding: [/^\\d+(?:px|pt|em|rem|%)?(?:\\s+\\d+(?:px|pt|em|rem|%)?)*$/],\n 'padding-top': [/^\\d+(?:px|pt|em|rem|%)?$/],\n 'padding-bottom': [/^\\d+(?:px|pt|em|rem|%)?$/],\n 'padding-left': [/^\\d+(?:px|pt|em|rem|%)?$/],\n 'padding-right': [/^\\d+(?:px|pt|em|rem|%)?$/],\n border: [/.*/],\n 'border-top': [/.*/],\n 'border-bottom': [/.*/],\n 'border-left': [/.*/],\n 'border-right': [/.*/],\n 'border-color': [\n /^#[0-9a-fA-F]{3,6}$/,\n /^rgb\\(\\s*\\d+\\s*,\\s*\\d+\\s*,\\s*\\d+\\s*\\)$/,\n /^rgba\\(\\s*\\d+\\s*,\\s*\\d+\\s*,\\s*\\d+\\s*,\\s*[\\d.]+\\s*\\)$/,\n ],\n 'border-width': [/^\\d+(?:px|pt|em|rem)?$/],\n 'border-style': [/^(?:none|solid|dashed|dotted|double)$/],\n 'list-style-type': [/.*/],\n 'vertical-align': [/.*/],\n 'white-space': [/.*/],\n 'aspect-ratio': [/^\\d+(?:\\.\\d+)?(?:\\s*\\/\\s*\\d+(?:\\.\\d+)?)?$/],\n },\n },\n allowedSchemes: ['http', 'https', 'mailto', 'tel'],\n allowedSchemesByTag: {\n img: ['http', 'https'],\n source: ['http', 'https'],\n },\n transformTags: {\n figure: transformImageTag,\n figcaption: transformImageTag,\n picture: transformImageTag,\n source: transformImageTag,\n img: transformImageTag,\n },\n exclusiveFilter: (frame) =>\n (frame.tag === 'img' && !frame.attribs.src) ||\n (frame.tag === 'source' && !frame.attribs.srcset),\n allowedIframeHostnames: [],\n })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,OAAOA,YAAY,MAAM,eAAe;AAExC,SAASC,kCAAkC,QAAQ,qCAAqC;AACxF,SAASC,8BAA8B,QAAQ,+BAA+B;AAE9E,SAASC,2BAA2B,QAAQ,+BAA+B;AAI3E,IAAMC,sBAAsB,GAAG,IAAIC,GAAG,CAAC,CACrC,OAAO,EACP,cAAc,EACd,eAAe,EACf,wBAAwB,EACxB,yB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C;AACJ,CAAC"}
|
|
1
|
+
{"version":3,"file":"TextEditorOutput.utils.js","names":["sanitizeHtml","RICH_TEXT_EDITOR_FILE_ID_ATTRIBUTE","canonicalizeTextEditorImageUrl","isAllowedTextEditorImageUrl","CKEDITOR_IMAGE_CLASSES","Set","IMAGE_TAGS","sanitizeSrcset","srcset","candidates","split","map","candidate","trim","filter","Boolean","length","undefined","sanitizedCandidates","_candidate$split","_candidate$split2","_toArray","url","descriptors","_arrayLikeToArray","slice","canonicalUrl","some","descriptor","test","concat","_toConsumableArray","join","includes","TABLE_ALIGNMENT_CLASS","sanitizeImageClass","className","allowedClasses","name","has","sanitizeImageSizes","sizes","sanitizeProstoreFileId","id","SAFE_IMAGE_STYLE_PROPERTIES","filterImageStyle","style","safeDeclarations","declaration","_property$trim$toLowe","_declaration$split","_declaration$split2","_slicedToArray","property","toLowerCase","setOrDeleteAttribute","attributes","value","sanitizeImageTagAttributes","tagName","onclick","onload","sanitizeClassAttribute","sanitizeUrlAttribute","sanitize","sanitizeImageUrlAttributes","sanitizeProstoreFileIdAttribute","addLazyImageLoadingAttributes","src","loading","decoding","transformImageTag","attribs","sanitizedAttributes","_objectSpread","sanitizeTextEditorHtml","html","allowedTags","allowedAttributes","a","figure","picture","source","img","table","col","td","th","allowedStyles","color","width","height","margin","padding","border","allowedSchemes","allowedSchemesByTag","transformTags","figcaption","exclusiveFilter","frame","tag","allowedIframeHostnames"],"sources":["../../src/TextEditorOutput/TextEditorOutput.utils.ts"],"sourcesContent":["import sanitizeHtml from 'sanitize-html'\n\nimport { RICH_TEXT_EDITOR_FILE_ID_ATTRIBUTE } from '../TextEditor/utils/imageAttributes'\nimport { canonicalizeTextEditorImageUrl } from '../TextEditor/utils/imageUrls'\n\nexport { isAllowedTextEditorImageUrl } from '../TextEditor/utils/imageUrls'\n\ntype Attributes = Record<string, string>\n\nconst CKEDITOR_IMAGE_CLASSES = new Set([\n 'image',\n 'image-inline',\n 'image_resized',\n 'image-style-align-left',\n 'image-style-align-right',\n 'image-style-block-align-left',\n 'image-style-block-align-right',\n 'image-style-side',\n // Keep as-is: the figure transform runs on ALL figures, and this is the\n // table-figure marker (`<figure class=\"table\">`). We can't filter it out\n 'table',\n])\n\nconst IMAGE_TAGS = new Set(['figure', 'figcaption', 'picture', 'source', 'img'])\n\nconst sanitizeSrcset = (srcset: string) => {\n const candidates = srcset\n .split(',')\n .map((candidate) => candidate.trim())\n .filter(Boolean)\n\n if (candidates.length === 0) {\n return undefined\n }\n\n const sanitizedCandidates = candidates.map((candidate) => {\n const [url, ...descriptors] = candidate.split(/\\s+/)\n const canonicalUrl = canonicalizeTextEditorImageUrl(url)\n\n if (\n !canonicalUrl ||\n descriptors.some(\n (descriptor) => !/^(?:\\d+w|\\d+(?:\\.\\d+)?x)$/.test(descriptor)\n )\n ) {\n return undefined\n }\n\n return [canonicalUrl, ...descriptors].join(' ')\n })\n\n if (sanitizedCandidates.includes(undefined)) {\n return undefined\n }\n\n return sanitizedCandidates.join(', ')\n}\n\n// Keep it as-is — we can't filter it out or the output loses the table's\n// alignment and always falls back to the default (centered).\nconst TABLE_ALIGNMENT_CLASS = /^table-style-(block-)?align-(left|center|right)$/\n\nconst sanitizeImageClass = (className?: string) => {\n const allowedClasses = className\n ?.split(/\\s+/)\n .filter(\n (name) =>\n CKEDITOR_IMAGE_CLASSES.has(name) || TABLE_ALIGNMENT_CLASS.test(name)\n )\n\n return allowedClasses?.length ? allowedClasses.join(' ') : undefined\n}\n\nconst sanitizeImageSizes = (sizes?: string) => {\n if (!sizes || /url\\(|javascript:|data:/i.test(sizes)) {\n return undefined\n }\n\n return /^[\\w\\s().,:+\\-/%]+$/.test(sizes) ? sizes : undefined\n}\n\nconst sanitizeProstoreFileId = (id?: string) =>\n id && /^[\\w-]+$/.test(id) ? id : undefined\n\n// ImageResize writes inline `width: X%` (and occasionally `height`) on the\n// containing <figure>/<img>. Keep only those declarations so resized images\n// render at the user's chosen size, `allowedStyles` further validates the values.\nconst SAFE_IMAGE_STYLE_PROPERTIES = new Set(['width', 'height', 'aspect-ratio'])\n\nconst filterImageStyle = (style?: string) => {\n if (!style) {\n return undefined\n }\n\n const safeDeclarations = style\n .split(';')\n .map((declaration) => declaration.trim())\n .filter(Boolean)\n .filter((declaration) => {\n const [property] = declaration.split(':', 1)\n return SAFE_IMAGE_STYLE_PROPERTIES.has(\n property?.trim().toLowerCase() ?? ''\n )\n })\n\n return safeDeclarations.length ? `${safeDeclarations.join('; ')};` : undefined\n}\n\nconst setOrDeleteAttribute = (\n attributes: Attributes,\n name: string,\n value?: string\n) => {\n if (value) {\n attributes[name] = value\n } else {\n delete attributes[name]\n }\n}\n\nconst sanitizeImageTagAttributes = (\n tagName: string,\n attributes: Attributes\n) => {\n if (!IMAGE_TAGS.has(tagName)) {\n return\n }\n\n setOrDeleteAttribute(attributes, 'style', filterImageStyle(attributes.style))\n delete attributes.onclick\n delete attributes.onload\n}\n\nconst sanitizeClassAttribute = (attributes: Attributes) => {\n setOrDeleteAttribute(\n attributes,\n 'class',\n sanitizeImageClass(attributes.class)\n )\n}\n\nconst sanitizeUrlAttribute = (\n attributes: Attributes,\n name: string,\n sanitize: (value: string) => string | undefined\n) => {\n if (attributes[name]) {\n setOrDeleteAttribute(attributes, name, sanitize(attributes[name]))\n }\n}\n\nconst sanitizeImageUrlAttributes = (attributes: Attributes) => {\n sanitizeUrlAttribute(attributes, 'src', canonicalizeTextEditorImageUrl)\n sanitizeUrlAttribute(attributes, 'srcset', sanitizeSrcset)\n sanitizeUrlAttribute(attributes, 'sizes', sanitizeImageSizes)\n}\n\nconst sanitizeProstoreFileIdAttribute = (attributes: Attributes) => {\n setOrDeleteAttribute(\n attributes,\n RICH_TEXT_EDITOR_FILE_ID_ATTRIBUTE,\n sanitizeProstoreFileId(attributes[RICH_TEXT_EDITOR_FILE_ID_ATTRIBUTE])\n )\n}\n\nconst addLazyImageLoadingAttributes = (\n tagName: string,\n attributes: Attributes\n) => {\n if (tagName === 'img' && attributes.src) {\n attributes.loading = 'lazy'\n attributes.decoding = 'async'\n }\n}\n\nconst transformImageTag = (tagName: string, attribs: Attributes) => {\n const sanitizedAttributes: Attributes = { ...attribs }\n\n sanitizeImageTagAttributes(tagName, sanitizedAttributes)\n sanitizeClassAttribute(sanitizedAttributes)\n sanitizeImageUrlAttributes(sanitizedAttributes)\n sanitizeProstoreFileIdAttribute(sanitizedAttributes)\n addLazyImageLoadingAttributes(tagName, sanitizedAttributes)\n\n return {\n tagName,\n attribs: sanitizedAttributes,\n }\n}\n\nexport const sanitizeTextEditorHtml = (html: string) => {\n if (!html) {\n return ''\n }\n\n return sanitizeHtml(html, {\n allowedTags: [\n 'p',\n 'br',\n 'strong',\n 'b',\n 'em',\n 'i',\n 'u',\n 's',\n 'span',\n 'div',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'ul',\n 'ol',\n 'li',\n 'a',\n 'figure',\n 'figcaption',\n 'table',\n 'colgroup',\n 'col',\n 'thead',\n 'tbody',\n 'tr',\n 'td',\n 'th',\n 'blockquote',\n 'pre',\n 'code',\n 'hr',\n 'img',\n 'picture',\n 'source',\n 'sub',\n 'sup',\n ],\n allowedAttributes: {\n '*': ['style', 'class'],\n a: ['href', 'title', 'target', 'rel'],\n figure: ['class', RICH_TEXT_EDITOR_FILE_ID_ATTRIBUTE],\n picture: ['class', RICH_TEXT_EDITOR_FILE_ID_ATTRIBUTE],\n source: ['srcset', 'sizes', 'type', 'media'],\n img: [\n 'src',\n 'srcset',\n 'sizes',\n 'alt',\n 'title',\n 'width',\n 'height',\n 'loading',\n 'decoding',\n 'class',\n RICH_TEXT_EDITOR_FILE_ID_ATTRIBUTE,\n ],\n table: ['border', 'cellpadding', 'cellspacing'],\n col: ['span'],\n td: ['colspan', 'rowspan'],\n th: ['colspan', 'rowspan', 'scope'],\n },\n allowedStyles: {\n '*': {\n color: [\n /^#[0-9a-fA-F]{3,6}$/,\n /^rgb\\(\\s*\\d+\\s*,\\s*\\d+\\s*,\\s*\\d+\\s*\\)$/,\n /^rgba\\(\\s*\\d+\\s*,\\s*\\d+\\s*,\\s*\\d+\\s*,\\s*[\\d.]+\\s*\\)$/,\n ],\n 'background-color': [\n /^#[0-9a-fA-F]{3,6}$/,\n /^rgb\\(\\s*\\d+\\s*,\\s*\\d+\\s*,\\s*\\d+\\s*\\)$/,\n /^rgba\\(\\s*\\d+\\s*,\\s*\\d+\\s*,\\s*\\d+\\s*,\\s*[\\d.]+\\s*\\)$/,\n ],\n 'font-size': [/^\\d+(?:px|pt|em|rem|%)$/],\n 'font-weight': [/^(?:normal|bold|bolder|lighter|\\d{1,3})$/],\n 'font-style': [/^(?:normal|italic|oblique)$/],\n 'font-family': [/.*/],\n 'text-decoration': [/^(?:none|underline|line-through|overline)$/],\n 'text-align': [/^(?:left|right|center|justify)$/],\n 'line-height': [/^\\d+(?:\\.\\d+)?(?:px|pt|em|rem|%)?$/],\n width: [/^\\d+(?:\\.\\d+)?(?:px|pt|em|rem|%)$/],\n 'min-width': [/^\\d+(?:\\.\\d+)?(?:px|pt|em|rem|%)$/],\n 'max-width': [/^\\d+(?:\\.\\d+)?(?:px|pt|em|rem|%)$/],\n height: [/^\\d+(?:\\.\\d+)?(?:px|pt|em|rem|%)$/],\n 'min-height': [/^\\d+(?:\\.\\d+)?(?:px|pt|em|rem|%)$/],\n 'max-height': [/^\\d+(?:\\.\\d+)?(?:px|pt|em|rem|%)$/],\n margin: [/^\\d+(?:px|pt|em|rem|%)?(?:\\s+\\d+(?:px|pt|em|rem|%)?)*$/],\n 'margin-top': [/^\\d+(?:px|pt|em|rem|%)?$/],\n 'margin-bottom': [/^\\d+(?:px|pt|em|rem|%)?$/],\n 'margin-left': [/^\\d+(?:px|pt|em|rem|%)?$/],\n 'margin-right': [/^\\d+(?:px|pt|em|rem|%)?$/],\n padding: [/^\\d+(?:px|pt|em|rem|%)?(?:\\s+\\d+(?:px|pt|em|rem|%)?)*$/],\n 'padding-top': [/^\\d+(?:px|pt|em|rem|%)?$/],\n 'padding-bottom': [/^\\d+(?:px|pt|em|rem|%)?$/],\n 'padding-left': [/^\\d+(?:px|pt|em|rem|%)?$/],\n 'padding-right': [/^\\d+(?:px|pt|em|rem|%)?$/],\n border: [/.*/],\n 'border-top': [/.*/],\n 'border-bottom': [/.*/],\n 'border-left': [/.*/],\n 'border-right': [/.*/],\n 'border-color': [\n /^#[0-9a-fA-F]{3,6}$/,\n /^rgb\\(\\s*\\d+\\s*,\\s*\\d+\\s*,\\s*\\d+\\s*\\)$/,\n /^rgba\\(\\s*\\d+\\s*,\\s*\\d+\\s*,\\s*\\d+\\s*,\\s*[\\d.]+\\s*\\)$/,\n ],\n 'border-width': [/^\\d+(?:px|pt|em|rem)?$/],\n 'border-style': [/^(?:none|solid|dashed|dotted|double)$/],\n 'list-style-type': [/.*/],\n 'vertical-align': [/.*/],\n 'white-space': [/.*/],\n 'aspect-ratio': [/^\\d+(?:\\.\\d+)?(?:\\s*\\/\\s*\\d+(?:\\.\\d+)?)?$/],\n float: [/^(?:left|right|none)$/],\n },\n },\n allowedSchemes: ['http', 'https', 'mailto', 'tel'],\n allowedSchemesByTag: {\n img: ['http', 'https'],\n source: ['http', 'https'],\n },\n transformTags: {\n figure: transformImageTag,\n figcaption: transformImageTag,\n picture: transformImageTag,\n source: transformImageTag,\n img: transformImageTag,\n },\n exclusiveFilter: (frame) =>\n (frame.tag === 'img' && !frame.attribs.src) ||\n (frame.tag === 'source' && !frame.attribs.srcset),\n allowedIframeHostnames: [],\n })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,OAAOA,YAAY,MAAM,eAAe;AAExC,SAASC,kCAAkC,QAAQ,qCAAqC;AACxF,SAASC,8BAA8B,QAAQ,+BAA+B;AAE9E,SAASC,2BAA2B,QAAQ,+BAA+B;AAI3E,IAAMC,sBAAsB,GAAG,IAAIC,GAAG,CAAC,CACrC,OAAO,EACP,cAAc,EACd,eAAe,EACf,wBAAwB,EACxB,yBAAyB,EACzB,8BAA8B,EAC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AG,IACzCgC,KAAK,CAACC,GAAG,KAAK,QAAQ,IAAI,CAACD,KAAK,CAAC5B,OAAO,CAAChE,MAAO;IAAA;IACnD8F,sBAAsB,EAAE;EAC1B,CAAC,CAAC;AACJ,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["TextEditorOutput"],"sources":["../../src/TextEditorOutput/index.ts"],"sourcesContent":["export { TextEditorOutput } from './TextEditorOutput'\nexport type { TextEditorOutputProps } from './TextEditorOutput.types'\n"],"mappings":"AAAA,SAASA,gBAAgB,QAAQ,oBAAoB"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["TextEditorOutput"],"sources":["../../src/TextEditorOutput/index.ts"],"sourcesContent":["export { TextEditorOutput } from './TextEditorOutput'\nexport type { TextEditorOutputProps } from './TextEditorOutput.types'\n"],"mappings":"AAAA,SAASA,gBAAgB,QAAQ,oBAAoB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","names":["exampleText","none","short_ipsum","short_sentence","long_ipsum","longest_ipsum","long_ipsum_one_line","formatted_content","Ipsum","lengthOrOptions","recursiveGrow","length","lettercase","trailingPeriod","longString","lastChar","includes","slice","replace","s","toUpperCase","arguments","undefined","out"],"sources":["../../src/_storyHelpers/constants.ts"],"sourcesContent":["export const exampleText = {\n default: 'Click me!',\n none: '',\n short_ipsum: 'Lorum',\n short_sentence: 'Did you think you have mastery over fire? Incredible!',\n long_ipsum: `Lorem ip sum dolor sit amet, consectetur adipiscing elit,\n ed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n Scelerisque eleifend donec pretium vulputate sapien nec sagittis.\n Ultricies tristique nulla aliquet enim tortor at auctor urna nunc.\n Vitae turpis massa sed elementum tempus egestas.\n Nunc consequat interdum varius sit amet`,\n longest_ipsum: `Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod\n tempor incididunt ut labore et dolore magna aliqua. Ac tortor dignissim\n convallis aenean et. Facilisis volutpat est velit egestas dui id. In\n nulla posuere sollicitudin aliquam ultrices. Lorem mollis aliquam ut\n porttitor. Convallis aenean et tortor at risus viverra adipiscing at.\n Euismod nisi porta lorem mollis aliquam ut porttitor. Hac habitasse\n platea dictumst vestibulum rhoncus est pellentesque elit ullamcorper.\n Viverra tellus in hac habitasse platea dictumst. Scelerisque viverra lawn\n gnome in aliquam sem fringilla ut morbi tincidunt. Ullamcorper morbi tincidunt\n ornare massa eget. Gravida cum sociis natoque penatibus. Leo vel fringilla est\n ullamcorper eget nulla. Vitae proin sagittis nisl rhoncus mattis rhoncus urna.\n Mauris commodo quis imperdiet massa tincidunt nunc pulvinar sapien et. Id aliquet\n lectus proin nibh troll condimentum id venenatis.`,\n long_ipsum_one_line: `Lorem ip sum dolor sit amet, consectetur adipiscing elit, ed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Scelerisque eleifend donec pretium vulputate sapien nec sagittis. Ultricies tristique nulla aliquet enim tortor at auctor urna nunc. Vitae turpis massa sed elementum tempus egestas. Nunc consequat interdum varius sit amet`,\n formatted_content: `\n <p><strong>Bold text</strong> and <em>italic text</em></p>\n <ul>\n <li>List item 1</li>\n <li>List item 2</li>\n </ul>\n <p style=\"text-align: center;\">Centered text</p>\n `,\n}\n\nexport function Ipsum(\n lengthOrOptions:\n | number\n | {\n length: number\n lettercase?: 'sentence' | 'title'\n trailingPeriod?: boolean\n }\n) {\n if (typeof lengthOrOptions === 'number') {\n return recursiveGrow(lengthOrOptions)\n }\n const { length, lettercase, trailingPeriod } = lengthOrOptions\n let longString = recursiveGrow(length)\n const lastChar = longString[longString.length - 1]\n if (!trailingPeriod && ['.', ','].includes(lastChar)) {\n longString = longString.slice(0, -1)\n }\n if (lettercase === 'title') {\n longString = longString.replace(/\\b\\w/g, (s) => s.toUpperCase())\n }\n return longString\n}\n\n/**\n * Creates a sentence case sentence.\n * @returns string\n */\nconst recursiveGrow = (length = 1, out = exampleText.longest_ipsum): string => {\n if (!length) {\n return ''\n }\n if (out.length < length) {\n return recursiveGrow(length, out + exampleText.longest_ipsum)\n }\n if (out.length >= length) {\n return out.slice(0, length - 1) + '.'\n }\n return 'Lorem ipsum grow failed.'\n}\n"],"mappings":"AAAA,OAAO,IAAMA,WAAW,GAAG;EACzB,WAAS,WAAW;EACpBC,IAAI,EAAE,EAAE;EACRC,WAAW,EAAE,OAAO;EACpBC,cAAc,EAAE,uDAAuD;EACvEC,UAAU,sXAKgC;EAC1CC,aAAa,o+BAYuC;EACpDC,mBAAmB,6VAA6V;EAChXC,iBAAiB;AAQnB,CAAC;AAED,OAAO,SAASC,KAAKA,CACnBC,eAMK,EACL;EACA,IAAI,OAAOA,eAAe,KAAK,QAAQ,EAAE;IACvC,OAAOC,cAAa,CAACD,eAAe,CAAC;EACvC;EACA,IAAQE,MAAM,GAAiCF,eAAe,CAAtDE,MAAM;IAAEC,UAAU,GAAqBH,eAAe,CAA9CG,UAAU;IAAEC,cAAc,GAAKJ,eAAe,CAAlCI,cAAc;EAC1C,IAAIC,UAAU,GAAGJ,cAAa,CAACC,MAAM,CAAC;EACtC,IAAMI,QAAQ,GAAGD,UAAU,CAACA,UAAU,CAACH,MAAM,GAAG,CAAC,CAAC;EAClD,IAAI,CAACE,cAAc,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAACG,QAAQ,CAACD,QAAQ,CAAC,EAAE;IACpDD,UAAU,GAAGA,UAAU,CAACG,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;EACtC;EACA,IAAIL,UAAU,KAAK,OAAO,EAAE;IAC1BE,UAAU,GAAGA,UAAU,CAACI,OAAO,CAAC,OAAO,EAAE,UAACC,CAAC;MAAA,OAAKA,CAAC,CAACC,WAAW,CAAC,CAAC;IAAA,EAAC;EAClE;EACA,OAAON,UAAU;AACnB;;AAEA;AACA;AACA;AACA;AACA,IAAMJ,cAAa,GAAG,SAAhBA,aAAaA,CAAA,EAA4D;EAAA,IAAxDC,MAAM,GAAAU,SAAA,CAAAV,MAAA,QAAAU,SAAA,QAAAC,SAAA,GAAAD,SAAA,MAAG,CAAC;EAAA,IAAEE,GAAG,GAAAF,SAAA,CAAAV,MAAA,QAAAU,SAAA,QAAAC,SAAA,GAAAD,SAAA,MAAGrB,WAAW,CAACK,aAAa;EAChE,IAAI,CAACM,MAAM,EAAE;IACX,OAAO,EAAE;EACX;EACA,IAAIY,GAAG,CAACZ,MAAM,GAAGA,MAAM,EAAE;IACvB,OAAOD,cAAa,CAACC,MAAM,EAAEY,GAAG,GAAGvB,WAAW,CAACK,aAAa,CAAC;EAC/D;EACA,IAAIkB,GAAG,CAACZ,MAAM,IAAIA,MAAM,EAAE;IACxB,OAAOY,GAAG,CAACN,KAAK,CAAC,CAAC,EAAEN,MAAM,GAAG,CAAC,CAAC,GAAG,GAAG;EACvC;EACA,OAAO,0BAA0B;AACnC,CAAC"}
|
|
1
|
+
{"version":3,"file":"constants.js","names":["exampleText","none","short_ipsum","short_sentence","long_ipsum","longest_ipsum","long_ipsum_one_line","formatted_content","Ipsum","lengthOrOptions","recursiveGrow","length","lettercase","trailingPeriod","longString","lastChar","includes","slice","replace","s","toUpperCase","arguments","undefined","out"],"sources":["../../src/_storyHelpers/constants.ts"],"sourcesContent":["export const exampleText = {\n default: 'Click me!',\n none: '',\n short_ipsum: 'Lorum',\n short_sentence: 'Did you think you have mastery over fire? Incredible!',\n long_ipsum: `Lorem ip sum dolor sit amet, consectetur adipiscing elit,\n ed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n Scelerisque eleifend donec pretium vulputate sapien nec sagittis.\n Ultricies tristique nulla aliquet enim tortor at auctor urna nunc.\n Vitae turpis massa sed elementum tempus egestas.\n Nunc consequat interdum varius sit amet`,\n longest_ipsum: `Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod\n tempor incididunt ut labore et dolore magna aliqua. Ac tortor dignissim\n convallis aenean et. Facilisis volutpat est velit egestas dui id. In\n nulla posuere sollicitudin aliquam ultrices. Lorem mollis aliquam ut\n porttitor. Convallis aenean et tortor at risus viverra adipiscing at.\n Euismod nisi porta lorem mollis aliquam ut porttitor. Hac habitasse\n platea dictumst vestibulum rhoncus est pellentesque elit ullamcorper.\n Viverra tellus in hac habitasse platea dictumst. Scelerisque viverra lawn\n gnome in aliquam sem fringilla ut morbi tincidunt. Ullamcorper morbi tincidunt\n ornare massa eget. Gravida cum sociis natoque penatibus. Leo vel fringilla est\n ullamcorper eget nulla. Vitae proin sagittis nisl rhoncus mattis rhoncus urna.\n Mauris commodo quis imperdiet massa tincidunt nunc pulvinar sapien et. Id aliquet\n lectus proin nibh troll condimentum id venenatis.`,\n long_ipsum_one_line: `Lorem ip sum dolor sit amet, consectetur adipiscing elit, ed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Scelerisque eleifend donec pretium vulputate sapien nec sagittis. Ultricies tristique nulla aliquet enim tortor at auctor urna nunc. Vitae turpis massa sed elementum tempus egestas. Nunc consequat interdum varius sit amet`,\n formatted_content: `\n <p><strong>Bold text</strong> and <em>italic text</em></p>\n <ul>\n <li>List item 1</li>\n <li>List item 2</li>\n </ul>\n <p style=\"text-align: center;\">Centered text</p>\n `,\n}\n\nexport function Ipsum(\n lengthOrOptions:\n | number\n | {\n length: number\n lettercase?: 'sentence' | 'title'\n trailingPeriod?: boolean\n }\n) {\n if (typeof lengthOrOptions === 'number') {\n return recursiveGrow(lengthOrOptions)\n }\n const { length, lettercase, trailingPeriod } = lengthOrOptions\n let longString = recursiveGrow(length)\n const lastChar = longString[longString.length - 1]\n if (!trailingPeriod && ['.', ','].includes(lastChar)) {\n longString = longString.slice(0, -1)\n }\n if (lettercase === 'title') {\n longString = longString.replace(/\\b\\w/g, (s) => s.toUpperCase())\n }\n return longString\n}\n\n/**\n * Creates a sentence case sentence.\n * @returns string\n */\nconst recursiveGrow = (length = 1, out = exampleText.longest_ipsum): string => {\n if (!length) {\n return ''\n }\n if (out.length < length) {\n return recursiveGrow(length, out + exampleText.longest_ipsum)\n }\n if (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