@lotte-innovate/ui-component-test 0.2.7 → 0.2.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (161) hide show
  1. package/README.md +53 -0
  2. package/dist/lib/components/Editor/index.d.ts +1 -1
  3. package/dist/lib/components/Editor/index.js +1 -1
  4. package/dist/lib/components/Editor/index.mjs +1 -1
  5. package/dist/lib/constants.d.ts +0 -647
  6. package/dist/lib/constants.js +0 -895
  7. package/dist/lib/constants.mjs.map +1 -1
  8. package/dist/lib/index.d.ts +0 -1
  9. package/dist/lib/index.js +0 -1
  10. package/dist/lib/index.mjs +1 -1
  11. package/dist/lib/tsconfig.tsbuildinfo +1 -1
  12. package/dist/tailwind.config.js +0 -42
  13. package/dist/tsconfig.tsbuildinfo +1 -1
  14. package/package.json +5 -11
  15. package/post-tinymce.js +18 -0
  16. package/dist/lib/color/alpha.d.ts +0 -784
  17. package/dist/lib/color/alpha.js +0 -784
  18. package/dist/lib/color/constants.d.ts +0 -15
  19. package/dist/lib/color/constants.js +0 -265
  20. package/dist/lib/color/dark.d.ts +0 -392
  21. package/dist/lib/color/dark.js +0 -392
  22. package/dist/lib/color/krdsColors.d.ts +0 -309
  23. package/dist/lib/color/krdsColors.js +0 -309
  24. package/dist/lib/color/light.d.ts +0 -392
  25. package/dist/lib/color/light.js +0 -393
  26. package/dist/lib/theme/ThemeProvider.d.ts +0 -16
  27. package/dist/lib/theme/ThemeProvider.js +0 -29
  28. package/dist/lib/theme/ThemeProvider.mjs +0 -3
  29. package/dist/lib/theme/ThemeProvider.mjs.map +0 -1
  30. package/dist/lib/theme/index.d.ts +0 -2
  31. package/dist/lib/theme/index.js +0 -2
  32. package/dist/lib/types.d.ts +0 -90
  33. package/dist/lib/types.js +0 -1
  34. package/public/tinymce/CHANGELOG.md +0 -3453
  35. package/public/tinymce/README.md +0 -73
  36. package/public/tinymce/bower.json +0 -27
  37. package/public/tinymce/composer.json +0 -52
  38. package/public/tinymce/icons/default/icons.js +0 -194
  39. package/public/tinymce/icons/default/icons.min.js +0 -1
  40. package/public/tinymce/icons/default/icons.mjs +0 -2
  41. package/public/tinymce/icons/default/icons.mjs.map +0 -1
  42. package/public/tinymce/icons/default/index.d.ts +0 -1
  43. package/public/tinymce/icons/default/index.js +0 -7
  44. package/public/tinymce/icons/default/index.mjs +0 -2
  45. package/public/tinymce/icons/default/index.mjs.map +0 -1
  46. package/public/tinymce/license.txt +0 -21
  47. package/public/tinymce/models/dom/index.d.ts +0 -1
  48. package/public/tinymce/models/dom/index.js +0 -7
  49. package/public/tinymce/models/dom/index.mjs +0 -2
  50. package/public/tinymce/models/dom/index.mjs.map +0 -1
  51. package/public/tinymce/models/dom/model.js +0 -8040
  52. package/public/tinymce/models/dom/model.min.js +0 -4
  53. package/public/tinymce/models/dom/model.mjs +0 -2
  54. package/public/tinymce/models/dom/model.mjs.map +0 -1
  55. package/public/tinymce/package.json +0 -32
  56. package/public/tinymce/plugins/advlist/index.d.ts +0 -1
  57. package/public/tinymce/plugins/advlist/index.js +0 -7
  58. package/public/tinymce/plugins/advlist/index.mjs +0 -2
  59. package/public/tinymce/plugins/advlist/index.mjs.map +0 -1
  60. package/public/tinymce/plugins/advlist/plugin.js +0 -259
  61. package/public/tinymce/plugins/advlist/plugin.min.js +0 -4
  62. package/public/tinymce/plugins/advlist/plugin.mjs +0 -2
  63. package/public/tinymce/plugins/advlist/plugin.mjs.map +0 -1
  64. package/public/tinymce/plugins/autolink/index.js +0 -7
  65. package/public/tinymce/plugins/autolink/plugin.js +0 -228
  66. package/public/tinymce/plugins/autolink/plugin.min.js +0 -4
  67. package/public/tinymce/plugins/code/index.d.ts +0 -1
  68. package/public/tinymce/plugins/code/index.js +0 -7
  69. package/public/tinymce/plugins/code/index.mjs +0 -2
  70. package/public/tinymce/plugins/code/index.mjs.map +0 -1
  71. package/public/tinymce/plugins/code/plugin.js +0 -85
  72. package/public/tinymce/plugins/code/plugin.min.js +0 -4
  73. package/public/tinymce/plugins/code/plugin.mjs +0 -2
  74. package/public/tinymce/plugins/code/plugin.mjs.map +0 -1
  75. package/public/tinymce/plugins/codesample/index.d.ts +0 -1
  76. package/public/tinymce/plugins/codesample/index.js +0 -7
  77. package/public/tinymce/plugins/codesample/index.mjs +0 -2
  78. package/public/tinymce/plugins/codesample/index.mjs.map +0 -1
  79. package/public/tinymce/plugins/codesample/plugin.d.ts +0 -45
  80. package/public/tinymce/plugins/codesample/plugin.js +0 -2463
  81. package/public/tinymce/plugins/codesample/plugin.min.js +0 -4
  82. package/public/tinymce/plugins/codesample/plugin.mjs +0 -2
  83. package/public/tinymce/plugins/codesample/plugin.mjs.map +0 -1
  84. package/public/tinymce/plugins/image/index.d.ts +0 -1
  85. package/public/tinymce/plugins/image/index.js +0 -7
  86. package/public/tinymce/plugins/image/index.mjs +0 -2
  87. package/public/tinymce/plugins/image/index.mjs.map +0 -1
  88. package/public/tinymce/plugins/image/plugin.js +0 -1505
  89. package/public/tinymce/plugins/image/plugin.min.js +0 -4
  90. package/public/tinymce/plugins/image/plugin.mjs +0 -2
  91. package/public/tinymce/plugins/image/plugin.mjs.map +0 -1
  92. package/public/tinymce/plugins/link/index.d.ts +0 -1
  93. package/public/tinymce/plugins/link/index.js +0 -7
  94. package/public/tinymce/plugins/link/index.mjs +0 -2
  95. package/public/tinymce/plugins/link/index.mjs.map +0 -1
  96. package/public/tinymce/plugins/link/plugin.js +0 -1242
  97. package/public/tinymce/plugins/link/plugin.min.js +0 -4
  98. package/public/tinymce/plugins/link/plugin.mjs +0 -2
  99. package/public/tinymce/plugins/link/plugin.mjs.map +0 -1
  100. package/public/tinymce/plugins/lists/index.d.ts +0 -1
  101. package/public/tinymce/plugins/lists/index.js +0 -7
  102. package/public/tinymce/plugins/lists/index.mjs +0 -2
  103. package/public/tinymce/plugins/lists/index.mjs.map +0 -1
  104. package/public/tinymce/plugins/lists/plugin.js +0 -2172
  105. package/public/tinymce/plugins/lists/plugin.min.js +0 -4
  106. package/public/tinymce/plugins/lists/plugin.mjs +0 -2
  107. package/public/tinymce/plugins/lists/plugin.mjs.map +0 -1
  108. package/public/tinymce/plugins/table/index.d.ts +0 -1
  109. package/public/tinymce/plugins/table/index.js +0 -7
  110. package/public/tinymce/plugins/table/index.mjs +0 -2
  111. package/public/tinymce/plugins/table/index.mjs.map +0 -1
  112. package/public/tinymce/plugins/table/plugin.js +0 -3462
  113. package/public/tinymce/plugins/table/plugin.min.js +0 -4
  114. package/public/tinymce/plugins/table/plugin.mjs +0 -2
  115. package/public/tinymce/plugins/table/plugin.mjs.map +0 -1
  116. package/public/tinymce/skins/content/default/content.css +0 -61
  117. package/public/tinymce/skins/content/default/content.js +0 -2
  118. package/public/tinymce/skins/content/default/content.min.css +0 -1
  119. package/public/tinymce/skins/content/default/content.mjs +0 -2
  120. package/public/tinymce/skins/content/default/content.mjs.map +0 -1
  121. package/public/tinymce/skins/ui/oxide/content.css +0 -785
  122. package/public/tinymce/skins/ui/oxide/content.inline.css +0 -779
  123. package/public/tinymce/skins/ui/oxide/content.inline.js +0 -2
  124. package/public/tinymce/skins/ui/oxide/content.inline.min.css +0 -1
  125. package/public/tinymce/skins/ui/oxide/content.js +0 -2
  126. package/public/tinymce/skins/ui/oxide/content.min.css +0 -1
  127. package/public/tinymce/skins/ui/oxide/content.mjs +0 -2
  128. package/public/tinymce/skins/ui/oxide/content.mjs.map +0 -1
  129. package/public/tinymce/skins/ui/oxide/skin.css +0 -3763
  130. package/public/tinymce/skins/ui/oxide/skin.js +0 -2
  131. package/public/tinymce/skins/ui/oxide/skin.min.css +0 -1
  132. package/public/tinymce/skins/ui/oxide/skin.mjs +0 -2
  133. package/public/tinymce/skins/ui/oxide/skin.mjs.map +0 -1
  134. package/public/tinymce/skins/ui/oxide/skin.shadowdom.css +0 -30
  135. package/public/tinymce/skins/ui/oxide/skin.shadowdom.js +0 -2
  136. package/public/tinymce/skins/ui/oxide/skin.shadowdom.min.css +0 -1
  137. package/public/tinymce/skins/ui/oxide-dark/content.css +0 -766
  138. package/public/tinymce/skins/ui/oxide-dark/content.inline.css +0 -779
  139. package/public/tinymce/skins/ui/oxide-dark/content.inline.js +0 -2
  140. package/public/tinymce/skins/ui/oxide-dark/content.inline.min.css +0 -1
  141. package/public/tinymce/skins/ui/oxide-dark/content.js +0 -2
  142. package/public/tinymce/skins/ui/oxide-dark/content.min.css +0 -1
  143. package/public/tinymce/skins/ui/oxide-dark/skin.css +0 -3766
  144. package/public/tinymce/skins/ui/oxide-dark/skin.js +0 -2
  145. package/public/tinymce/skins/ui/oxide-dark/skin.min.css +0 -1
  146. package/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +0 -30
  147. package/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.js +0 -2
  148. package/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +0 -1
  149. package/public/tinymce/themes/silver/index.d.ts +0 -1
  150. package/public/tinymce/themes/silver/index.js +0 -7
  151. package/public/tinymce/themes/silver/index.mjs +0 -2
  152. package/public/tinymce/themes/silver/index.mjs.map +0 -1
  153. package/public/tinymce/themes/silver/theme.js +0 -30775
  154. package/public/tinymce/themes/silver/theme.min.js +0 -384
  155. package/public/tinymce/themes/silver/theme.mjs +0 -2
  156. package/public/tinymce/themes/silver/theme.mjs.map +0 -1
  157. package/public/tinymce/tinymce.d.ts +0 -3238
  158. package/public/tinymce/tinymce.js +0 -31779
  159. package/public/tinymce/tinymce.min.js +0 -384
  160. package/public/tinymce/tinymce.mjs +0 -2
  161. package/public/tinymce/tinymce.mjs.map +0 -1
@@ -1,32 +0,0 @@
1
- {
2
- "name": "tinymce",
3
- "version": "6.8.5",
4
- "repository": {
5
- "type": "git",
6
- "url": "https://github.com/tinymce/tinymce.git",
7
- "directory": "modules/tinymce"
8
- },
9
- "description": "Web based JavaScript HTML WYSIWYG editor control.",
10
- "author": "Ephox Corporation DBA Tiny Technologies, Inc",
11
- "main": "tinymce.js",
12
- "types": "tinymce.d.ts",
13
- "license": "MIT",
14
- "keywords": [
15
- "wysiwyg",
16
- "tinymce",
17
- "richtext",
18
- "javascript",
19
- "html",
20
- "text",
21
- "rich editor",
22
- "rich text editor",
23
- "rte",
24
- "rich text",
25
- "contenteditable",
26
- "editing"
27
- ],
28
- "homepage": "https://www.tiny.cloud/",
29
- "bugs": {
30
- "url": "https://github.com/tinymce/tinymce/issues"
31
- }
32
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,7 +0,0 @@
1
- // Exports the "advlist" plugin for usage with module loaders
2
- // Usage:
3
- // CommonJS:
4
- // require('tinymce/plugins/advlist')
5
- // ES2015:
6
- // import 'tinymce/plugins/advlist'
7
- require('./plugin.js');
@@ -1,2 +0,0 @@
1
- import{__exports as r}from"../../../../_virtual/index6.mjs";import{__require as e}from"./plugin.mjs";var i;function o(){return i||(i=1,e()),r}export{o as __require};
2
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../../../public/tinymce/plugins/advlist/index.js"],"sourcesContent":["// Exports the \"advlist\" plugin for usage with module loaders\n// Usage:\n// CommonJS:\n// require('tinymce/plugins/advlist')\n// ES2015:\n// import 'tinymce/plugins/advlist'\nrequire('./plugin.js');"],"names":["require$$0"],"mappings":"uIAMsBA"}
@@ -1,259 +0,0 @@
1
- /**
2
- * TinyMCE version 6.8.5 (TBD)
3
- */
4
-
5
- (function () {
6
- 'use strict';
7
-
8
- var global$1 = tinymce.util.Tools.resolve('tinymce.PluginManager');
9
-
10
- const applyListFormat = (editor, listName, styleValue) => {
11
- const cmd = listName === 'UL' ? 'InsertUnorderedList' : 'InsertOrderedList';
12
- editor.execCommand(cmd, false, styleValue === false ? null : { 'list-style-type': styleValue });
13
- };
14
-
15
- const register$2 = editor => {
16
- editor.addCommand('ApplyUnorderedListStyle', (ui, value) => {
17
- applyListFormat(editor, 'UL', value['list-style-type']);
18
- });
19
- editor.addCommand('ApplyOrderedListStyle', (ui, value) => {
20
- applyListFormat(editor, 'OL', value['list-style-type']);
21
- });
22
- };
23
-
24
- const option = name => editor => editor.options.get(name);
25
- const register$1 = editor => {
26
- const registerOption = editor.options.register;
27
- registerOption('advlist_number_styles', {
28
- processor: 'string[]',
29
- default: 'default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman'.split(',')
30
- });
31
- registerOption('advlist_bullet_styles', {
32
- processor: 'string[]',
33
- default: 'default,circle,square'.split(',')
34
- });
35
- };
36
- const getNumberStyles = option('advlist_number_styles');
37
- const getBulletStyles = option('advlist_bullet_styles');
38
-
39
- const isNullable = a => a === null || a === undefined;
40
- const isNonNullable = a => !isNullable(a);
41
-
42
- var global = tinymce.util.Tools.resolve('tinymce.util.Tools');
43
-
44
- class Optional {
45
- constructor(tag, value) {
46
- this.tag = tag;
47
- this.value = value;
48
- }
49
- static some(value) {
50
- return new Optional(true, value);
51
- }
52
- static none() {
53
- return Optional.singletonNone;
54
- }
55
- fold(onNone, onSome) {
56
- if (this.tag) {
57
- return onSome(this.value);
58
- } else {
59
- return onNone();
60
- }
61
- }
62
- isSome() {
63
- return this.tag;
64
- }
65
- isNone() {
66
- return !this.tag;
67
- }
68
- map(mapper) {
69
- if (this.tag) {
70
- return Optional.some(mapper(this.value));
71
- } else {
72
- return Optional.none();
73
- }
74
- }
75
- bind(binder) {
76
- if (this.tag) {
77
- return binder(this.value);
78
- } else {
79
- return Optional.none();
80
- }
81
- }
82
- exists(predicate) {
83
- return this.tag && predicate(this.value);
84
- }
85
- forall(predicate) {
86
- return !this.tag || predicate(this.value);
87
- }
88
- filter(predicate) {
89
- if (!this.tag || predicate(this.value)) {
90
- return this;
91
- } else {
92
- return Optional.none();
93
- }
94
- }
95
- getOr(replacement) {
96
- return this.tag ? this.value : replacement;
97
- }
98
- or(replacement) {
99
- return this.tag ? this : replacement;
100
- }
101
- getOrThunk(thunk) {
102
- return this.tag ? this.value : thunk();
103
- }
104
- orThunk(thunk) {
105
- return this.tag ? this : thunk();
106
- }
107
- getOrDie(message) {
108
- if (!this.tag) {
109
- throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None');
110
- } else {
111
- return this.value;
112
- }
113
- }
114
- static from(value) {
115
- return isNonNullable(value) ? Optional.some(value) : Optional.none();
116
- }
117
- getOrNull() {
118
- return this.tag ? this.value : null;
119
- }
120
- getOrUndefined() {
121
- return this.value;
122
- }
123
- each(worker) {
124
- if (this.tag) {
125
- worker(this.value);
126
- }
127
- }
128
- toArray() {
129
- return this.tag ? [this.value] : [];
130
- }
131
- toString() {
132
- return this.tag ? `some(${ this.value })` : 'none()';
133
- }
134
- }
135
- Optional.singletonNone = new Optional(false);
136
-
137
- const findUntil = (xs, pred, until) => {
138
- for (let i = 0, len = xs.length; i < len; i++) {
139
- const x = xs[i];
140
- if (pred(x, i)) {
141
- return Optional.some(x);
142
- } else if (until(x, i)) {
143
- break;
144
- }
145
- }
146
- return Optional.none();
147
- };
148
-
149
- const isCustomList = list => /\btox\-/.test(list.className);
150
- const isChildOfBody = (editor, elm) => {
151
- return editor.dom.isChildOf(elm, editor.getBody());
152
- };
153
- const matchNodeNames = regex => node => isNonNullable(node) && regex.test(node.nodeName);
154
- const isListNode = matchNodeNames(/^(OL|UL|DL)$/);
155
- const isTableCellNode = matchNodeNames(/^(TH|TD)$/);
156
- const inList = (editor, parents, nodeName) => findUntil(parents, parent => isListNode(parent) && !isCustomList(parent), isTableCellNode).exists(list => list.nodeName === nodeName && isChildOfBody(editor, list));
157
- const getSelectedStyleType = editor => {
158
- const listElm = editor.dom.getParent(editor.selection.getNode(), 'ol,ul');
159
- const style = editor.dom.getStyle(listElm, 'listStyleType');
160
- return Optional.from(style);
161
- };
162
- const isWithinNonEditable = (editor, element) => element !== null && !editor.dom.isEditable(element);
163
- const isWithinNonEditableList = (editor, element) => {
164
- const parentList = editor.dom.getParent(element, 'ol,ul,dl');
165
- return isWithinNonEditable(editor, parentList) && editor.selection.isEditable();
166
- };
167
- const setNodeChangeHandler = (editor, nodeChangeHandler) => {
168
- const initialNode = editor.selection.getNode();
169
- nodeChangeHandler({
170
- parents: editor.dom.getParents(initialNode),
171
- element: initialNode
172
- });
173
- editor.on('NodeChange', nodeChangeHandler);
174
- return () => editor.off('NodeChange', nodeChangeHandler);
175
- };
176
-
177
- const styleValueToText = styleValue => {
178
- return styleValue.replace(/\-/g, ' ').replace(/\b\w/g, chr => {
179
- return chr.toUpperCase();
180
- });
181
- };
182
- const normalizeStyleValue = styleValue => isNullable(styleValue) || styleValue === 'default' ? '' : styleValue;
183
- const makeSetupHandler = (editor, nodeName) => api => {
184
- const updateButtonState = (editor, parents) => {
185
- const element = editor.selection.getStart(true);
186
- api.setActive(inList(editor, parents, nodeName));
187
- api.setEnabled(!isWithinNonEditableList(editor, element) && editor.selection.isEditable());
188
- };
189
- const nodeChangeHandler = e => updateButtonState(editor, e.parents);
190
- return setNodeChangeHandler(editor, nodeChangeHandler);
191
- };
192
- const addSplitButton = (editor, id, tooltip, cmd, nodeName, styles) => {
193
- editor.ui.registry.addSplitButton(id, {
194
- tooltip,
195
- icon: nodeName === 'OL' ? 'ordered-list' : 'unordered-list',
196
- presets: 'listpreview',
197
- columns: 3,
198
- fetch: callback => {
199
- const items = global.map(styles, styleValue => {
200
- const iconStyle = nodeName === 'OL' ? 'num' : 'bull';
201
- const iconName = styleValue === 'disc' || styleValue === 'decimal' ? 'default' : styleValue;
202
- const itemValue = normalizeStyleValue(styleValue);
203
- const displayText = styleValueToText(styleValue);
204
- return {
205
- type: 'choiceitem',
206
- value: itemValue,
207
- icon: 'list-' + iconStyle + '-' + iconName,
208
- text: displayText
209
- };
210
- });
211
- callback(items);
212
- },
213
- onAction: () => editor.execCommand(cmd),
214
- onItemAction: (_splitButtonApi, value) => {
215
- applyListFormat(editor, nodeName, value);
216
- },
217
- select: value => {
218
- const listStyleType = getSelectedStyleType(editor);
219
- return listStyleType.map(listStyle => value === listStyle).getOr(false);
220
- },
221
- onSetup: makeSetupHandler(editor, nodeName)
222
- });
223
- };
224
- const addButton = (editor, id, tooltip, cmd, nodeName, styleValue) => {
225
- editor.ui.registry.addToggleButton(id, {
226
- active: false,
227
- tooltip,
228
- icon: nodeName === 'OL' ? 'ordered-list' : 'unordered-list',
229
- onSetup: makeSetupHandler(editor, nodeName),
230
- onAction: () => editor.queryCommandState(cmd) || styleValue === '' ? editor.execCommand(cmd) : applyListFormat(editor, nodeName, styleValue)
231
- });
232
- };
233
- const addControl = (editor, id, tooltip, cmd, nodeName, styles) => {
234
- if (styles.length > 1) {
235
- addSplitButton(editor, id, tooltip, cmd, nodeName, styles);
236
- } else {
237
- addButton(editor, id, tooltip, cmd, nodeName, normalizeStyleValue(styles[0]));
238
- }
239
- };
240
- const register = editor => {
241
- addControl(editor, 'numlist', 'Numbered list', 'InsertOrderedList', 'OL', getNumberStyles(editor));
242
- addControl(editor, 'bullist', 'Bullet list', 'InsertUnorderedList', 'UL', getBulletStyles(editor));
243
- };
244
-
245
- var Plugin = () => {
246
- global$1.add('advlist', editor => {
247
- if (editor.hasPlugin('lists')) {
248
- register$1(editor);
249
- register(editor);
250
- register$2(editor);
251
- } else {
252
- console.error('Please use the Lists plugin together with the Advanced List plugin.');
253
- }
254
- });
255
- };
256
-
257
- Plugin();
258
-
259
- })();
@@ -1,4 +0,0 @@
1
- /**
2
- * TinyMCE version 6.8.5 (TBD)
3
- */
4
- !function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=(t,e,s)=>{const r="UL"===e?"InsertUnorderedList":"InsertOrderedList";t.execCommand(r,!1,!1===s?null:{"list-style-type":s})},s=t=>e=>e.options.get(t),r=s("advlist_number_styles"),n=s("advlist_bullet_styles"),i=t=>null==t,l=t=>!i(t);var o=tinymce.util.Tools.resolve("tinymce.util.Tools");class a{constructor(t,e){this.tag=t,this.value=e}static some(t){return new a(!0,t)}static none(){return a.singletonNone}fold(t,e){return this.tag?e(this.value):t()}isSome(){return this.tag}isNone(){return!this.tag}map(t){return this.tag?a.some(t(this.value)):a.none()}bind(t){return this.tag?t(this.value):a.none()}exists(t){return this.tag&&t(this.value)}forall(t){return!this.tag||t(this.value)}filter(t){return!this.tag||t(this.value)?this:a.none()}getOr(t){return this.tag?this.value:t}or(t){return this.tag?this:t}getOrThunk(t){return this.tag?this.value:t()}orThunk(t){return this.tag?this:t()}getOrDie(t){if(this.tag)return this.value;throw new Error(null!=t?t:"Called getOrDie on None")}static from(t){return l(t)?a.some(t):a.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(t){this.tag&&t(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}a.singletonNone=new a(!1);const u=t=>e=>l(e)&&t.test(e.nodeName),d=u(/^(OL|UL|DL)$/),g=u(/^(TH|TD)$/),c=t=>i(t)||"default"===t?"":t,h=(t,e)=>s=>((t,e)=>{const s=t.selection.getNode();return e({parents:t.dom.getParents(s),element:s}),t.on("NodeChange",e),()=>t.off("NodeChange",e)})(t,(r=>((t,r)=>{const n=t.selection.getStart(!0);s.setActive(((t,e,s)=>((t,e,s)=>{for(let e=0,n=t.length;e<n;e++){const n=t[e];if(d(r=n)&&!/\btox\-/.test(r.className))return a.some(n);if(s(n,e))break}var r;return a.none()})(e,0,g).exists((e=>e.nodeName===s&&((t,e)=>t.dom.isChildOf(e,t.getBody()))(t,e))))(t,r,e)),s.setEnabled(!((t,e)=>{const s=t.dom.getParent(e,"ol,ul,dl");return((t,e)=>null!==e&&!t.dom.isEditable(e))(t,s)&&t.selection.isEditable()})(t,n)&&t.selection.isEditable())})(t,r.parents))),m=(t,s,r,n,i,l)=>{l.length>1?((t,s,r,n,i,l)=>{t.ui.registry.addSplitButton(s,{tooltip:r,icon:"OL"===i?"ordered-list":"unordered-list",presets:"listpreview",columns:3,fetch:t=>{t(o.map(l,(t=>{const e="OL"===i?"num":"bull",s="disc"===t||"decimal"===t?"default":t,r=c(t),n=(t=>t.replace(/\-/g," ").replace(/\b\w/g,(t=>t.toUpperCase())))(t);return{type:"choiceitem",value:r,icon:"list-"+e+"-"+s,text:n}})))},onAction:()=>t.execCommand(n),onItemAction:(s,r)=>{e(t,i,r)},select:e=>{const s=(t=>{const e=t.dom.getParent(t.selection.getNode(),"ol,ul"),s=t.dom.getStyle(e,"listStyleType");return a.from(s)})(t);return s.map((t=>e===t)).getOr(!1)},onSetup:h(t,i)})})(t,s,r,n,i,l):((t,s,r,n,i,l)=>{t.ui.registry.addToggleButton(s,{active:!1,tooltip:r,icon:"OL"===i?"ordered-list":"unordered-list",onSetup:h(t,i),onAction:()=>t.queryCommandState(n)||""===l?t.execCommand(n):e(t,i,l)})})(t,s,r,n,i,c(l[0]))};t.add("advlist",(t=>{t.hasPlugin("lists")?((t=>{const e=t.options.register;e("advlist_number_styles",{processor:"string[]",default:"default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman".split(",")}),e("advlist_bullet_styles",{processor:"string[]",default:"default,circle,square".split(",")})})(t),(t=>{m(t,"numlist","Numbered list","InsertOrderedList","OL",r(t)),m(t,"bullist","Bullet list","InsertUnorderedList","UL",n(t))})(t),(t=>{t.addCommand("ApplyUnorderedListStyle",((s,r)=>{e(t,"UL",r["list-style-type"])})),t.addCommand("ApplyOrderedListStyle",((s,r)=>{e(t,"OL",r["list-style-type"])}))})(t)):console.error("Please use the Lists plugin together with the Advanced List plugin.")}))}();
@@ -1,2 +0,0 @@
1
- import{__exports as t}from"../../../../_virtual/plugin.mjs";var e;function s(){return e||(e=1,function(){var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=(t,e,s)=>{const r="UL"===e?"InsertUnorderedList":"InsertOrderedList";t.execCommand(r,!1,!1===s?null:{"list-style-type":s})},s=t=>e=>e.options.get(t),r=s("advlist_number_styles"),n=s("advlist_bullet_styles"),i=t=>null==t,l=t=>!i(t);var o=tinymce.util.Tools.resolve("tinymce.util.Tools");class a{constructor(t,e){this.tag=t,this.value=e}static some(t){return new a(!0,t)}static none(){return a.singletonNone}fold(t,e){return this.tag?e(this.value):t()}isSome(){return this.tag}isNone(){return!this.tag}map(t){return this.tag?a.some(t(this.value)):a.none()}bind(t){return this.tag?t(this.value):a.none()}exists(t){return this.tag&&t(this.value)}forall(t){return!this.tag||t(this.value)}filter(t){return!this.tag||t(this.value)?this:a.none()}getOr(t){return this.tag?this.value:t}or(t){return this.tag?this:t}getOrThunk(t){return this.tag?this.value:t()}orThunk(t){return this.tag?this:t()}getOrDie(t){if(this.tag)return this.value;throw new Error(null!=t?t:"Called getOrDie on None")}static from(t){return l(t)?a.some(t):a.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(t){this.tag&&t(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}a.singletonNone=new a(!1);const u=t=>e=>l(e)&&t.test(e.nodeName),d=u(/^(OL|UL|DL)$/),g=u(/^(TH|TD)$/),c=(t,e,s)=>((t,e,s)=>{for(let r=0,n=t.length;r<n;r++){const n=t[r];if(e(n,r))return a.some(n);if(s(n,r))break}return a.none()})(e,(t=>d(t)&&!/\btox\-/.test(t.className)),g).exists((e=>e.nodeName===s&&((t,e)=>t.dom.isChildOf(e,t.getBody()))(t,e))),h=t=>i(t)||"default"===t?"":t,m=(t,e)=>s=>((t,e)=>{const s=t.selection.getNode();return e({parents:t.dom.getParents(s),element:s}),t.on("NodeChange",e),()=>t.off("NodeChange",e)})(t,(r=>((t,r)=>{const n=t.selection.getStart(!0);s.setActive(c(t,r,e)),s.setEnabled(!((t,e)=>{const s=t.dom.getParent(e,"ol,ul,dl");return((t,e)=>null!==e&&!t.dom.isEditable(e))(t,s)&&t.selection.isEditable()})(t,n)&&t.selection.isEditable())})(t,r.parents))),p=(t,s,r,n,i,l)=>{t.ui.registry.addSplitButton(s,{tooltip:r,icon:"OL"===i?"ordered-list":"unordered-list",presets:"listpreview",columns:3,fetch:t=>{t(o.map(l,(t=>{const e="OL"===i?"num":"bull",s="disc"===t||"decimal"===t?"default":t,r=h(t),n=(t=>t.replace(/\-/g," ").replace(/\b\w/g,(t=>t.toUpperCase())))(t);return{type:"choiceitem",value:r,icon:"list-"+e+"-"+s,text:n}})))},onAction:()=>t.execCommand(n),onItemAction:(s,r)=>{e(t,i,r)},select:e=>{const s=(t=>{const e=t.dom.getParent(t.selection.getNode(),"ol,ul"),s=t.dom.getStyle(e,"listStyleType");return a.from(s)})(t);return s.map((t=>e===t)).getOr(!1)},onSetup:m(t,i)})},v=(t,s,r,n,i,l)=>{l.length>1?p(t,s,r,n,i,l):((t,s,r,n,i,l)=>{t.ui.registry.addToggleButton(s,{active:!1,tooltip:r,icon:"OL"===i?"ordered-list":"unordered-list",onSetup:m(t,i),onAction:()=>t.queryCommandState(n)||""===l?t.execCommand(n):e(t,i,l)})})(t,s,r,n,i,h(l[0]))};t.add("advlist",(t=>{t.hasPlugin("lists")?((t=>{const e=t.options.register;e("advlist_number_styles",{processor:"string[]",default:"default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman".split(",")}),e("advlist_bullet_styles",{processor:"string[]",default:"default,circle,square".split(",")})})(t),(t=>{v(t,"numlist","Numbered list","InsertOrderedList","OL",r(t)),v(t,"bullist","Bullet list","InsertUnorderedList","UL",n(t))})(t),(t=>{t.addCommand("ApplyUnorderedListStyle",((s,r)=>{e(t,"UL",r["list-style-type"])})),t.addCommand("ApplyOrderedListStyle",((s,r)=>{e(t,"OL",r["list-style-type"])}))})(t)):console.error("Please use the Lists plugin together with the Advanced List plugin.")}))}()),t}export{s as __require};
2
- //# sourceMappingURL=plugin.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin.mjs","sources":["../../../../../../public/tinymce/plugins/advlist/plugin.js"],"sourcesContent":["/**\n * TinyMCE version 6.8.5 (TBD)\n */\n\n(function () {\n 'use strict';\n\n var global$1 = tinymce.util.Tools.resolve('tinymce.PluginManager');\n\n const applyListFormat = (editor, listName, styleValue) => {\n const cmd = listName === 'UL' ? 'InsertUnorderedList' : 'InsertOrderedList';\n editor.execCommand(cmd, false, styleValue === false ? null : { 'list-style-type': styleValue });\n };\n\n const register$2 = editor => {\n editor.addCommand('ApplyUnorderedListStyle', (ui, value) => {\n applyListFormat(editor, 'UL', value['list-style-type']);\n });\n editor.addCommand('ApplyOrderedListStyle', (ui, value) => {\n applyListFormat(editor, 'OL', value['list-style-type']);\n });\n };\n\n const option = name => editor => editor.options.get(name);\n const register$1 = editor => {\n const registerOption = editor.options.register;\n registerOption('advlist_number_styles', {\n processor: 'string[]',\n default: 'default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman'.split(',')\n });\n registerOption('advlist_bullet_styles', {\n processor: 'string[]',\n default: 'default,circle,square'.split(',')\n });\n };\n const getNumberStyles = option('advlist_number_styles');\n const getBulletStyles = option('advlist_bullet_styles');\n\n const isNullable = a => a === null || a === undefined;\n const isNonNullable = a => !isNullable(a);\n\n var global = tinymce.util.Tools.resolve('tinymce.util.Tools');\n\n class Optional {\n constructor(tag, value) {\n this.tag = tag;\n this.value = value;\n }\n static some(value) {\n return new Optional(true, value);\n }\n static none() {\n return Optional.singletonNone;\n }\n fold(onNone, onSome) {\n if (this.tag) {\n return onSome(this.value);\n } else {\n return onNone();\n }\n }\n isSome() {\n return this.tag;\n }\n isNone() {\n return !this.tag;\n }\n map(mapper) {\n if (this.tag) {\n return Optional.some(mapper(this.value));\n } else {\n return Optional.none();\n }\n }\n bind(binder) {\n if (this.tag) {\n return binder(this.value);\n } else {\n return Optional.none();\n }\n }\n exists(predicate) {\n return this.tag && predicate(this.value);\n }\n forall(predicate) {\n return !this.tag || predicate(this.value);\n }\n filter(predicate) {\n if (!this.tag || predicate(this.value)) {\n return this;\n } else {\n return Optional.none();\n }\n }\n getOr(replacement) {\n return this.tag ? this.value : replacement;\n }\n or(replacement) {\n return this.tag ? this : replacement;\n }\n getOrThunk(thunk) {\n return this.tag ? this.value : thunk();\n }\n orThunk(thunk) {\n return this.tag ? this : thunk();\n }\n getOrDie(message) {\n if (!this.tag) {\n throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None');\n } else {\n return this.value;\n }\n }\n static from(value) {\n return isNonNullable(value) ? Optional.some(value) : Optional.none();\n }\n getOrNull() {\n return this.tag ? this.value : null;\n }\n getOrUndefined() {\n return this.value;\n }\n each(worker) {\n if (this.tag) {\n worker(this.value);\n }\n }\n toArray() {\n return this.tag ? [this.value] : [];\n }\n toString() {\n return this.tag ? `some(${ this.value })` : 'none()';\n }\n }\n Optional.singletonNone = new Optional(false);\n\n const findUntil = (xs, pred, until) => {\n for (let i = 0, len = xs.length; i < len; i++) {\n const x = xs[i];\n if (pred(x, i)) {\n return Optional.some(x);\n } else if (until(x, i)) {\n break;\n }\n }\n return Optional.none();\n };\n\n const isCustomList = list => /\\btox\\-/.test(list.className);\n const isChildOfBody = (editor, elm) => {\n return editor.dom.isChildOf(elm, editor.getBody());\n };\n const matchNodeNames = regex => node => isNonNullable(node) && regex.test(node.nodeName);\n const isListNode = matchNodeNames(/^(OL|UL|DL)$/);\n const isTableCellNode = matchNodeNames(/^(TH|TD)$/);\n const inList = (editor, parents, nodeName) => findUntil(parents, parent => isListNode(parent) && !isCustomList(parent), isTableCellNode).exists(list => list.nodeName === nodeName && isChildOfBody(editor, list));\n const getSelectedStyleType = editor => {\n const listElm = editor.dom.getParent(editor.selection.getNode(), 'ol,ul');\n const style = editor.dom.getStyle(listElm, 'listStyleType');\n return Optional.from(style);\n };\n const isWithinNonEditable = (editor, element) => element !== null && !editor.dom.isEditable(element);\n const isWithinNonEditableList = (editor, element) => {\n const parentList = editor.dom.getParent(element, 'ol,ul,dl');\n return isWithinNonEditable(editor, parentList) && editor.selection.isEditable();\n };\n const setNodeChangeHandler = (editor, nodeChangeHandler) => {\n const initialNode = editor.selection.getNode();\n nodeChangeHandler({\n parents: editor.dom.getParents(initialNode),\n element: initialNode\n });\n editor.on('NodeChange', nodeChangeHandler);\n return () => editor.off('NodeChange', nodeChangeHandler);\n };\n\n const styleValueToText = styleValue => {\n return styleValue.replace(/\\-/g, ' ').replace(/\\b\\w/g, chr => {\n return chr.toUpperCase();\n });\n };\n const normalizeStyleValue = styleValue => isNullable(styleValue) || styleValue === 'default' ? '' : styleValue;\n const makeSetupHandler = (editor, nodeName) => api => {\n const updateButtonState = (editor, parents) => {\n const element = editor.selection.getStart(true);\n api.setActive(inList(editor, parents, nodeName));\n api.setEnabled(!isWithinNonEditableList(editor, element) && editor.selection.isEditable());\n };\n const nodeChangeHandler = e => updateButtonState(editor, e.parents);\n return setNodeChangeHandler(editor, nodeChangeHandler);\n };\n const addSplitButton = (editor, id, tooltip, cmd, nodeName, styles) => {\n editor.ui.registry.addSplitButton(id, {\n tooltip,\n icon: nodeName === 'OL' ? 'ordered-list' : 'unordered-list',\n presets: 'listpreview',\n columns: 3,\n fetch: callback => {\n const items = global.map(styles, styleValue => {\n const iconStyle = nodeName === 'OL' ? 'num' : 'bull';\n const iconName = styleValue === 'disc' || styleValue === 'decimal' ? 'default' : styleValue;\n const itemValue = normalizeStyleValue(styleValue);\n const displayText = styleValueToText(styleValue);\n return {\n type: 'choiceitem',\n value: itemValue,\n icon: 'list-' + iconStyle + '-' + iconName,\n text: displayText\n };\n });\n callback(items);\n },\n onAction: () => editor.execCommand(cmd),\n onItemAction: (_splitButtonApi, value) => {\n applyListFormat(editor, nodeName, value);\n },\n select: value => {\n const listStyleType = getSelectedStyleType(editor);\n return listStyleType.map(listStyle => value === listStyle).getOr(false);\n },\n onSetup: makeSetupHandler(editor, nodeName)\n });\n };\n const addButton = (editor, id, tooltip, cmd, nodeName, styleValue) => {\n editor.ui.registry.addToggleButton(id, {\n active: false,\n tooltip,\n icon: nodeName === 'OL' ? 'ordered-list' : 'unordered-list',\n onSetup: makeSetupHandler(editor, nodeName),\n onAction: () => editor.queryCommandState(cmd) || styleValue === '' ? editor.execCommand(cmd) : applyListFormat(editor, nodeName, styleValue)\n });\n };\n const addControl = (editor, id, tooltip, cmd, nodeName, styles) => {\n if (styles.length > 1) {\n addSplitButton(editor, id, tooltip, cmd, nodeName, styles);\n } else {\n addButton(editor, id, tooltip, cmd, nodeName, normalizeStyleValue(styles[0]));\n }\n };\n const register = editor => {\n addControl(editor, 'numlist', 'Numbered list', 'InsertOrderedList', 'OL', getNumberStyles(editor));\n addControl(editor, 'bullist', 'Bullet list', 'InsertUnorderedList', 'UL', getBulletStyles(editor));\n };\n\n var Plugin = () => {\n global$1.add('advlist', editor => {\n if (editor.hasPlugin('lists')) {\n register$1(editor);\n register(editor);\n register$2(editor);\n } else {\n console.error('Please use the Lists plugin together with the Advanced List plugin.');\n }\n });\n };\n\n Plugin();\n\n})();\n"],"names":["global$1","tinymce","util","Tools","resolve","applyListFormat","editor","listName","styleValue","cmd","execCommand","option","name","options","get","getNumberStyles","getBulletStyles","isNullable","a","isNonNullable","global","Optional","constructor","tag","value","this","some","none","singletonNone","fold","onNone","onSome","isSome","isNone","map","mapper","bind","binder","exists","predicate","forall","filter","getOr","replacement","or","getOrThunk","thunk","orThunk","getOrDie","message","Error","from","getOrNull","getOrUndefined","each","worker","toArray","toString","matchNodeNames","regex","node","test","nodeName","isListNode","isTableCellNode","inList","parents","xs","pred","until","i","len","length","x","findUntil","parent","className","list","elm","dom","isChildOf","getBody","isChildOfBody","normalizeStyleValue","makeSetupHandler","api","nodeChangeHandler","initialNode","selection","getNode","getParents","element","on","off","setNodeChangeHandler","e","getStart","setActive","setEnabled","parentList","getParent","isEditable","isWithinNonEditable","isWithinNonEditableList","updateButtonState","addSplitButton","id","tooltip","styles","ui","registry","icon","presets","columns","fetch","callback","iconStyle","iconName","itemValue","displayText","replace","chr","toUpperCase","styleValueToText","type","text","onAction","onItemAction","_splitButtonApi","select","listStyleType","listElm","style","getStyle","getSelectedStyleType","listStyle","onSetup","addControl","addToggleButton","active","queryCommandState","addButton","add","hasPlugin","registerOption","register","processor","default","split","register$1","addCommand","register$2","console","error"],"mappings":"8FAIA,WAGI,IAAIA,EAAWC,QAAQC,KAAKC,MAAMC,QAAQ,yBAE1C,MAAMC,EAAkB,CAACC,EAAQC,EAAUC,KACzC,MAAMC,EAAmB,OAAbF,EAAoB,sBAAwB,oBACxDD,EAAOI,YAAYD,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AwBC,MAAM,MACvC,EAsNEC,CAAW/I,GARAA,KACfmI,EAAWnI,EAAQ,UAAW,gBAAiB,oBAAqB,KAAMS,EAAgBT,IAC1FmI,EAAWnI,EAAQ,UAAW,cAAe,sBAAuB,KAAMU,EAAgBV,GAAQ,EAO9F2I,CAAS3I,GA1OIA,KACjBA,EAAOgJ,WAAW,2BAA2B,CAACzC,EAAIrF,KAChDnB,EAAgBC,EAAQ,KAAMkB,EAAM,mBAAmB,IAEzDlB,EAAOgJ,WAAW,yBAAyB,CAACzC,EAAIrF,KAC9CnB,EAAgBC,EAAQ,KAAMkB,EAAM,mBAAmB,GACvD,EAqOE+H,CAAWjJ,IAEXkJ,QAAQC,MAAM,sEACxB,GAMC,CA9PD"}
@@ -1,7 +0,0 @@
1
- // Exports the "autolink" plugin for usage with module loaders
2
- // Usage:
3
- // CommonJS:
4
- // require('tinymce/plugins/autolink')
5
- // ES2015:
6
- // import 'tinymce/plugins/autolink'
7
- require('./plugin.js');
@@ -1,228 +0,0 @@
1
- /**
2
- * TinyMCE version 6.8.5 (TBD)
3
- */
4
-
5
- (function () {
6
- 'use strict';
7
-
8
- var global$1 = tinymce.util.Tools.resolve('tinymce.PluginManager');
9
-
10
- const link = () => /(?:[A-Za-z][A-Za-z\d.+-]{0,14}:\/\/(?:[-.~*+=!&;:'%@?^${}(),\w]+@)?|www\.|[-;:&=+$,.\w]+@)[A-Za-z\d-]+(?:\.[A-Za-z\d-]+)*(?::\d+)?(?:\/(?:[-.~*+=!;:'%@$(),\/\w]*[-~*+=%@$()\/\w])?)?(?:\?(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?(?:#(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?/g;
11
-
12
- const option = name => editor => editor.options.get(name);
13
- const register = editor => {
14
- const registerOption = editor.options.register;
15
- registerOption('autolink_pattern', {
16
- processor: 'regexp',
17
- default: new RegExp('^' + link().source + '$', 'i')
18
- });
19
- registerOption('link_default_target', { processor: 'string' });
20
- registerOption('link_default_protocol', {
21
- processor: 'string',
22
- default: 'https'
23
- });
24
- };
25
- const getAutoLinkPattern = option('autolink_pattern');
26
- const getDefaultLinkTarget = option('link_default_target');
27
- const getDefaultLinkProtocol = option('link_default_protocol');
28
- const allowUnsafeLinkTarget = option('allow_unsafe_link_target');
29
-
30
- const hasProto = (v, constructor, predicate) => {
31
- var _a;
32
- if (predicate(v, constructor.prototype)) {
33
- return true;
34
- } else {
35
- return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name;
36
- }
37
- };
38
- const typeOf = x => {
39
- const t = typeof x;
40
- if (x === null) {
41
- return 'null';
42
- } else if (t === 'object' && Array.isArray(x)) {
43
- return 'array';
44
- } else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) {
45
- return 'string';
46
- } else {
47
- return t;
48
- }
49
- };
50
- const isType = type => value => typeOf(value) === type;
51
- const eq = t => a => t === a;
52
- const isString = isType('string');
53
- const isUndefined = eq(undefined);
54
- const isNullable = a => a === null || a === undefined;
55
- const isNonNullable = a => !isNullable(a);
56
-
57
- const not = f => t => !f(t);
58
-
59
- const hasOwnProperty = Object.hasOwnProperty;
60
- const has = (obj, key) => hasOwnProperty.call(obj, key);
61
-
62
- const checkRange = (str, substr, start) => substr === '' || str.length >= substr.length && str.substr(start, start + substr.length) === substr;
63
- const contains = (str, substr, start = 0, end) => {
64
- const idx = str.indexOf(substr, start);
65
- if (idx !== -1) {
66
- return isUndefined(end) ? true : idx + substr.length <= end;
67
- } else {
68
- return false;
69
- }
70
- };
71
- const startsWith = (str, prefix) => {
72
- return checkRange(str, prefix, 0);
73
- };
74
-
75
- const zeroWidth = '\uFEFF';
76
- const isZwsp = char => char === zeroWidth;
77
- const removeZwsp = s => s.replace(/\uFEFF/g, '');
78
-
79
- var global = tinymce.util.Tools.resolve('tinymce.dom.TextSeeker');
80
-
81
- const isTextNode = node => node.nodeType === 3;
82
- const isElement = node => node.nodeType === 1;
83
- const isBracketOrSpace = char => /^[(\[{ \u00a0]$/.test(char);
84
- const hasProtocol = url => /^([A-Za-z][A-Za-z\d.+-]*:\/\/)|mailto:/.test(url);
85
- const isPunctuation = char => /[?!,.;:]/.test(char);
86
- const findChar = (text, index, predicate) => {
87
- for (let i = index - 1; i >= 0; i--) {
88
- const char = text.charAt(i);
89
- if (!isZwsp(char) && predicate(char)) {
90
- return i;
91
- }
92
- }
93
- return -1;
94
- };
95
- const freefallRtl = (container, offset) => {
96
- let tempNode = container;
97
- let tempOffset = offset;
98
- while (isElement(tempNode) && tempNode.childNodes[tempOffset]) {
99
- tempNode = tempNode.childNodes[tempOffset];
100
- tempOffset = isTextNode(tempNode) ? tempNode.data.length : tempNode.childNodes.length;
101
- }
102
- return {
103
- container: tempNode,
104
- offset: tempOffset
105
- };
106
- };
107
-
108
- const parseCurrentLine = (editor, offset) => {
109
- var _a;
110
- const voidElements = editor.schema.getVoidElements();
111
- const autoLinkPattern = getAutoLinkPattern(editor);
112
- const {dom, selection} = editor;
113
- if (dom.getParent(selection.getNode(), 'a[href]') !== null) {
114
- return null;
115
- }
116
- const rng = selection.getRng();
117
- const textSeeker = global(dom, node => {
118
- return dom.isBlock(node) || has(voidElements, node.nodeName.toLowerCase()) || dom.getContentEditable(node) === 'false';
119
- });
120
- const {
121
- container: endContainer,
122
- offset: endOffset
123
- } = freefallRtl(rng.endContainer, rng.endOffset);
124
- const root = (_a = dom.getParent(endContainer, dom.isBlock)) !== null && _a !== void 0 ? _a : dom.getRoot();
125
- const endSpot = textSeeker.backwards(endContainer, endOffset + offset, (node, offset) => {
126
- const text = node.data;
127
- const idx = findChar(text, offset, not(isBracketOrSpace));
128
- return idx === -1 || isPunctuation(text[idx]) ? idx : idx + 1;
129
- }, root);
130
- if (!endSpot) {
131
- return null;
132
- }
133
- let lastTextNode = endSpot.container;
134
- const startSpot = textSeeker.backwards(endSpot.container, endSpot.offset, (node, offset) => {
135
- lastTextNode = node;
136
- const idx = findChar(node.data, offset, isBracketOrSpace);
137
- return idx === -1 ? idx : idx + 1;
138
- }, root);
139
- const newRng = dom.createRng();
140
- if (!startSpot) {
141
- newRng.setStart(lastTextNode, 0);
142
- } else {
143
- newRng.setStart(startSpot.container, startSpot.offset);
144
- }
145
- newRng.setEnd(endSpot.container, endSpot.offset);
146
- const rngText = removeZwsp(newRng.toString());
147
- const matches = rngText.match(autoLinkPattern);
148
- if (matches) {
149
- let url = matches[0];
150
- if (startsWith(url, 'www.')) {
151
- const protocol = getDefaultLinkProtocol(editor);
152
- url = protocol + '://' + url;
153
- } else if (contains(url, '@') && !hasProtocol(url)) {
154
- url = 'mailto:' + url;
155
- }
156
- return {
157
- rng: newRng,
158
- url
159
- };
160
- } else {
161
- return null;
162
- }
163
- };
164
- const convertToLink = (editor, result) => {
165
- const {dom, selection} = editor;
166
- const {rng, url} = result;
167
- const bookmark = selection.getBookmark();
168
- selection.setRng(rng);
169
- const command = 'createlink';
170
- const args = {
171
- command,
172
- ui: false,
173
- value: url
174
- };
175
- const beforeExecEvent = editor.dispatch('BeforeExecCommand', args);
176
- if (!beforeExecEvent.isDefaultPrevented()) {
177
- editor.getDoc().execCommand(command, false, url);
178
- editor.dispatch('ExecCommand', args);
179
- const defaultLinkTarget = getDefaultLinkTarget(editor);
180
- if (isString(defaultLinkTarget)) {
181
- const anchor = selection.getNode();
182
- dom.setAttrib(anchor, 'target', defaultLinkTarget);
183
- if (defaultLinkTarget === '_blank' && !allowUnsafeLinkTarget(editor)) {
184
- dom.setAttrib(anchor, 'rel', 'noopener');
185
- }
186
- }
187
- }
188
- selection.moveToBookmark(bookmark);
189
- editor.nodeChanged();
190
- };
191
- const handleSpacebar = editor => {
192
- const result = parseCurrentLine(editor, -1);
193
- if (isNonNullable(result)) {
194
- convertToLink(editor, result);
195
- }
196
- };
197
- const handleBracket = handleSpacebar;
198
- const handleEnter = editor => {
199
- const result = parseCurrentLine(editor, 0);
200
- if (isNonNullable(result)) {
201
- convertToLink(editor, result);
202
- }
203
- };
204
- const setup = editor => {
205
- editor.on('keydown', e => {
206
- if (e.keyCode === 13 && !e.isDefaultPrevented()) {
207
- handleEnter(editor);
208
- }
209
- });
210
- editor.on('keyup', e => {
211
- if (e.keyCode === 32) {
212
- handleSpacebar(editor);
213
- } else if (e.keyCode === 48 && e.shiftKey || e.keyCode === 221) {
214
- handleBracket(editor);
215
- }
216
- });
217
- };
218
-
219
- var Plugin = () => {
220
- global$1.add('autolink', editor => {
221
- register(editor);
222
- setup(editor);
223
- });
224
- };
225
-
226
- Plugin();
227
-
228
- })();
@@ -1,4 +0,0 @@
1
- /**
2
- * TinyMCE version 6.8.5 (TBD)
3
- */
4
- !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>t.options.get(e),n=t("autolink_pattern"),o=t("link_default_target"),r=t("link_default_protocol"),a=t("allow_unsafe_link_target"),s=("string",e=>"string"===(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(n=o=e,(r=String).prototype.isPrototypeOf(n)||(null===(a=o.constructor)||void 0===a?void 0:a.name)===r.name)?"string":t;var n,o,r,a})(e));const l=(void 0,e=>undefined===e);const i=e=>!(e=>null==e)(e),c=Object.hasOwnProperty,d=e=>"\ufeff"===e;var u=tinymce.util.Tools.resolve("tinymce.dom.TextSeeker");const f=e=>/^[(\[{ \u00a0]$/.test(e),g=(e,t,n)=>{for(let o=t-1;o>=0;o--){const t=e.charAt(o);if(!d(t)&&n(t))return o}return-1},m=(e,t)=>{var o;const a=e.schema.getVoidElements(),s=n(e),{dom:i,selection:d}=e;if(null!==i.getParent(d.getNode(),"a[href]"))return null;const m=d.getRng(),k=u(i,(e=>{return i.isBlock(e)||(t=a,n=e.nodeName.toLowerCase(),c.call(t,n))||"false"===i.getContentEditable(e);var t,n})),{container:p,offset:y}=((e,t)=>{let n=e,o=t;for(;1===n.nodeType&&n.childNodes[o];)n=n.childNodes[o],o=3===n.nodeType?n.data.length:n.childNodes.length;return{container:n,offset:o}})(m.endContainer,m.endOffset),w=null!==(o=i.getParent(p,i.isBlock))&&void 0!==o?o:i.getRoot(),h=k.backwards(p,y+t,((e,t)=>{const n=e.data,o=g(n,t,(r=f,e=>!r(e)));var r,a;return-1===o||(a=n[o],/[?!,.;:]/.test(a))?o:o+1}),w);if(!h)return null;let v=h.container;const _=k.backwards(h.container,h.offset,((e,t)=>{v=e;const n=g(e.data,t,f);return-1===n?n:n+1}),w),A=i.createRng();_?A.setStart(_.container,_.offset):A.setStart(v,0),A.setEnd(h.container,h.offset);const C=A.toString().replace(/\uFEFF/g,"").match(s);if(C){let t=C[0];return $="www.",(b=t).length>=4&&b.substr(0,4)===$?t=r(e)+"://"+t:((e,t,n=0,o)=>{const r=e.indexOf(t,n);return-1!==r&&(!!l(o)||r+t.length<=o)})(t,"@")&&!(e=>/^([A-Za-z][A-Za-z\d.+-]*:\/\/)|mailto:/.test(e))(t)&&(t="mailto:"+t),{rng:A,url:t}}var b,$;return null},k=(e,t)=>{const{dom:n,selection:r}=e,{rng:l,url:i}=t,c=r.getBookmark();r.setRng(l);const d="createlink",u={command:d,ui:!1,value:i};if(!e.dispatch("BeforeExecCommand",u).isDefaultPrevented()){e.getDoc().execCommand(d,!1,i),e.dispatch("ExecCommand",u);const t=o(e);if(s(t)){const o=r.getNode();n.setAttrib(o,"target",t),"_blank"!==t||a(e)||n.setAttrib(o,"rel","noopener")}}r.moveToBookmark(c),e.nodeChanged()},p=e=>{const t=m(e,-1);i(t)&&k(e,t)},y=p;e.add("autolink",(e=>{(e=>{const t=e.options.register;t("autolink_pattern",{processor:"regexp",default:new RegExp("^"+/(?:[A-Za-z][A-Za-z\d.+-]{0,14}:\/\/(?:[-.~*+=!&;:'%@?^${}(),\w]+@)?|www\.|[-;:&=+$,.\w]+@)[A-Za-z\d-]+(?:\.[A-Za-z\d-]+)*(?::\d+)?(?:\/(?:[-.~*+=!;:'%@$(),\/\w]*[-~*+=%@$()\/\w])?)?(?:\?(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?(?:#(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?/g.source+"$","i")}),t("link_default_target",{processor:"string"}),t("link_default_protocol",{processor:"string",default:"https"})})(e),(e=>{e.on("keydown",(t=>{13!==t.keyCode||t.isDefaultPrevented()||(e=>{const t=m(e,0);i(t)&&k(e,t)})(e)})),e.on("keyup",(t=>{32===t.keyCode?p(e):(48===t.keyCode&&t.shiftKey||221===t.keyCode)&&y(e)}))})(e)}))}();
@@ -1 +0,0 @@
1
- export {};
@@ -1,7 +0,0 @@
1
- // Exports the "code" plugin for usage with module loaders
2
- // Usage:
3
- // CommonJS:
4
- // require('tinymce/plugins/code')
5
- // ES2015:
6
- // import 'tinymce/plugins/code'
7
- require('./plugin.js');
@@ -1,2 +0,0 @@
1
- import{__exports as r}from"../../../../_virtual/index16.mjs";import{__require as e}from"./plugin.mjs";var i;function o(){return i||(i=1,e()),r}export{o as __require};
2
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../../../public/tinymce/plugins/code/index.js"],"sourcesContent":["// Exports the \"code\" plugin for usage with module loaders\n// Usage:\n// CommonJS:\n// require('tinymce/plugins/code')\n// ES2015:\n// import 'tinymce/plugins/code'\nrequire('./plugin.js');"],"names":["require$$0"],"mappings":"wIAMsBA"}