@dotcms/uve 0.0.1-beta.24 → 0.0.1-beta.26

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/index.cjs.js CHANGED
@@ -1,14 +1,15 @@
1
1
  'use strict';
2
2
 
3
- var internal = require('./index.cjs2.js');
4
- require('./types.cjs.js');
3
+ var _public = require('./public.cjs.js');
4
+ require('@dotcms/types');
5
+ require('@dotcms/types/internal');
5
6
 
6
7
 
7
8
 
8
- exports.createUVESubscription = internal.createUVESubscription;
9
- exports.editContentlet = internal.editContentlet;
10
- exports.getUVEState = internal.getUVEState;
11
- exports.initInlineEditing = internal.initInlineEditing;
12
- exports.initUVE = internal.initUVE;
13
- exports.reorderMenu = internal.reorderMenu;
14
- exports.sendMessageToUVE = internal.sendMessageToUVE;
9
+ exports.createUVESubscription = _public.createUVESubscription;
10
+ exports.editContentlet = _public.editContentlet;
11
+ exports.getUVEState = _public.getUVEState;
12
+ exports.initInlineEditing = _public.initInlineEditing;
13
+ exports.initUVE = _public.initUVE;
14
+ exports.reorderMenu = _public.reorderMenu;
15
+ exports.sendMessageToUVE = _public.sendMessageToUVE;
package/index.esm.js CHANGED
@@ -1,2 +1,3 @@
1
- export { u as createUVESubscription, w as editContentlet, t as getUVEState, y as initInlineEditing, z as initUVE, x as reorderMenu, v as sendMessageToUVE } from './index.esm2.js';
2
- import './types.esm.js';
1
+ export { c as createUVESubscription, e as editContentlet, g as getUVEState, i as initInlineEditing, a as initUVE, r as reorderMenu, s as sendMessageToUVE } from './public.esm.js';
2
+ import '@dotcms/types';
3
+ import '@dotcms/types/internal';
package/internal.cjs.js CHANGED
@@ -1,39 +1,103 @@
1
1
  'use strict';
2
2
 
3
- var internal = require('./index.cjs2.js');
4
- require('./types.cjs.js');
3
+ var _public = require('./public.cjs.js');
4
+ require('@dotcms/types');
5
+ require('@dotcms/types/internal');
5
6
 
7
+ /**
8
+ * TinyMCE default config across all versions
9
+ *
10
+ * @internal
11
+ */
12
+ const __DEFAULT_TINYMCE_CONFIG__ = {
13
+ menubar: false,
14
+ inline: true,
15
+ valid_styles: {
16
+ '*': 'font-size,font-family,color,text-decoration,text-align'
17
+ },
18
+ powerpaste_word_import: 'clean',
19
+ powerpaste_html_import: 'clean',
20
+ suffix: '.min' // Suffix to use when loading resources
21
+ };
22
+ /**
23
+ * TinyMCE config to use per mode
24
+ *
25
+ * @internal
26
+ */
27
+ const __BASE_TINYMCE_CONFIG_WITH_NO_DEFAULT__ = {
28
+ full: {
29
+ plugins: 'link lists autolink charmap',
30
+ toolbar: ['styleselect undo redo | bold italic underline | forecolor backcolor | alignleft aligncenter alignright alignfull | numlist bullist outdent indent | hr charmap removeformat | link'],
31
+ style_formats: [{
32
+ title: 'Paragraph',
33
+ format: 'p'
34
+ }, {
35
+ title: 'Header 1',
36
+ format: 'h1'
37
+ }, {
38
+ title: 'Header 2',
39
+ format: 'h2'
40
+ }, {
41
+ title: 'Header 3',
42
+ format: 'h3'
43
+ }, {
44
+ title: 'Header 4',
45
+ format: 'h4'
46
+ }, {
47
+ title: 'Header 5',
48
+ format: 'h5'
49
+ }, {
50
+ title: 'Header 6',
51
+ format: 'h6'
52
+ }, {
53
+ title: 'Pre',
54
+ format: 'pre'
55
+ }, {
56
+ title: 'Code',
57
+ format: 'code'
58
+ }]
59
+ },
60
+ plain: {
61
+ plugins: '',
62
+ toolbar: ''
63
+ },
64
+ minimal: {
65
+ plugins: 'link autolink',
66
+ toolbar: 'bold italic underline | link',
67
+ valid_elements: 'strong,em,span[style],a[href]'
68
+ }
69
+ };
70
+ /**
71
+ * TinyMCE path
72
+ *
73
+ * @internal
74
+ */
75
+ const __TINYMCE_PATH_ON_DOTCMS__ = '/ext/tinymcev7/tinymce.min.js';
6
76
 
7
-
8
- Object.defineProperty(exports, "Blocks", {
9
- enumerable: true,
10
- get: function () { return internal.Blocks; }
11
- });
12
- exports.CUSTOM_NO_COMPONENT = internal.CUSTOM_NO_COMPONENT;
13
- exports.DEVELOPMENT_MODE = internal.DEVELOPMENT_MODE;
14
- exports.EMPTY_CONTAINER_STYLE_ANGULAR = internal.EMPTY_CONTAINER_STYLE_ANGULAR;
15
- exports.EMPTY_CONTAINER_STYLE_REACT = internal.EMPTY_CONTAINER_STYLE_REACT;
16
- exports.END_CLASS = internal.END_CLASS;
17
- exports.PRODUCTION_MODE = internal.PRODUCTION_MODE;
18
- exports.START_CLASS = internal.START_CLASS;
19
- Object.defineProperty(exports, "__DOTCMS_UVE_EVENT__", {
20
- enumerable: true,
21
- get: function () { return internal.__DOTCMS_UVE_EVENT__; }
22
- });
23
- exports.__UVE_EVENTS__ = internal.__UVE_EVENTS__;
24
- exports.__UVE_EVENT_ERROR_FALLBACK__ = internal.__UVE_EVENT_ERROR_FALLBACK__;
25
- exports.combineClasses = internal.combineClasses;
26
- exports.computeScrollIsInBottom = internal.computeScrollIsInBottom;
27
- exports.findDotCMSElement = internal.findDotCMSElement;
28
- exports.findDotCMSVTLData = internal.findDotCMSVTLData;
29
- exports.getClosestDotCMSContainerData = internal.getClosestDotCMSContainerData;
30
- exports.getColumnPositionClasses = internal.getColumnPositionClasses;
31
- exports.getContainersData = internal.getContainersData;
32
- exports.getContentletsInContainer = internal.getContentletsInContainer;
33
- exports.getDotCMSContainerData = internal.getDotCMSContainerData;
34
- exports.getDotCMSContentletsBound = internal.getDotCMSContentletsBound;
35
- exports.getDotCMSPageBounds = internal.getDotCMSPageBounds;
36
- exports.getDotContainerAttributes = internal.getDotContainerAttributes;
37
- exports.getDotContentletAttributes = internal.getDotContentletAttributes;
38
- exports.isValidBlocks = internal.isValidBlocks;
39
- exports.setBounds = internal.setBounds;
77
+ exports.CUSTOM_NO_COMPONENT = _public.CUSTOM_NO_COMPONENT;
78
+ exports.DEVELOPMENT_MODE = _public.DEVELOPMENT_MODE;
79
+ exports.EMPTY_CONTAINER_STYLE_ANGULAR = _public.EMPTY_CONTAINER_STYLE_ANGULAR;
80
+ exports.EMPTY_CONTAINER_STYLE_REACT = _public.EMPTY_CONTAINER_STYLE_REACT;
81
+ exports.END_CLASS = _public.END_CLASS;
82
+ exports.PRODUCTION_MODE = _public.PRODUCTION_MODE;
83
+ exports.START_CLASS = _public.START_CLASS;
84
+ exports.__UVE_EVENTS__ = _public.__UVE_EVENTS__;
85
+ exports.__UVE_EVENT_ERROR_FALLBACK__ = _public.__UVE_EVENT_ERROR_FALLBACK__;
86
+ exports.combineClasses = _public.combineClasses;
87
+ exports.computeScrollIsInBottom = _public.computeScrollIsInBottom;
88
+ exports.findDotCMSElement = _public.findDotCMSElement;
89
+ exports.findDotCMSVTLData = _public.findDotCMSVTLData;
90
+ exports.getClosestDotCMSContainerData = _public.getClosestDotCMSContainerData;
91
+ exports.getColumnPositionClasses = _public.getColumnPositionClasses;
92
+ exports.getContainersData = _public.getContainersData;
93
+ exports.getContentletsInContainer = _public.getContentletsInContainer;
94
+ exports.getDotCMSContainerData = _public.getDotCMSContainerData;
95
+ exports.getDotCMSContentletsBound = _public.getDotCMSContentletsBound;
96
+ exports.getDotCMSPageBounds = _public.getDotCMSPageBounds;
97
+ exports.getDotContainerAttributes = _public.getDotContainerAttributes;
98
+ exports.getDotContentletAttributes = _public.getDotContentletAttributes;
99
+ exports.isValidBlocks = _public.isValidBlocks;
100
+ exports.setBounds = _public.setBounds;
101
+ exports.__BASE_TINYMCE_CONFIG_WITH_NO_DEFAULT__ = __BASE_TINYMCE_CONFIG_WITH_NO_DEFAULT__;
102
+ exports.__DEFAULT_TINYMCE_CONFIG__ = __DEFAULT_TINYMCE_CONFIG__;
103
+ exports.__TINYMCE_PATH_ON_DOTCMS__ = __TINYMCE_PATH_ON_DOTCMS__;
package/internal.esm.js CHANGED
@@ -1,2 +1,75 @@
1
- export { B as Blocks, C as CUSTOM_NO_COMPONENT, D as DEVELOPMENT_MODE, c as EMPTY_CONTAINER_STYLE_ANGULAR, b as EMPTY_CONTAINER_STYLE_REACT, E as END_CLASS, P as PRODUCTION_MODE, S as START_CLASS, d as __DOTCMS_UVE_EVENT__, _ as __UVE_EVENTS__, a as __UVE_EVENT_ERROR_FALLBACK__, l as combineClasses, k as computeScrollIsInBottom, i as findDotCMSElement, j as findDotCMSVTLData, h as getClosestDotCMSContainerData, m as getColumnPositionClasses, o as getContainersData, p as getContentletsInContainer, f as getDotCMSContainerData, e as getDotCMSContentletsBound, g as getDotCMSPageBounds, q as getDotContainerAttributes, n as getDotContentletAttributes, r as isValidBlocks, s as setBounds } from './index.esm2.js';
2
- import './types.esm.js';
1
+ export { C as CUSTOM_NO_COMPONENT, D as DEVELOPMENT_MODE, f as EMPTY_CONTAINER_STYLE_ANGULAR, d as EMPTY_CONTAINER_STYLE_REACT, E as END_CLASS, P as PRODUCTION_MODE, S as START_CLASS, _ as __UVE_EVENTS__, b as __UVE_EVENT_ERROR_FALLBACK__, p as combineClasses, o as computeScrollIsInBottom, m as findDotCMSElement, n as findDotCMSVTLData, l as getClosestDotCMSContainerData, q as getColumnPositionClasses, u as getContainersData, v as getContentletsInContainer, k as getDotCMSContainerData, j as getDotCMSContentletsBound, h as getDotCMSPageBounds, w as getDotContainerAttributes, t as getDotContentletAttributes, y as isValidBlocks, x as setBounds } from './public.esm.js';
2
+ import '@dotcms/types';
3
+ import '@dotcms/types/internal';
4
+
5
+ /**
6
+ * TinyMCE default config across all versions
7
+ *
8
+ * @internal
9
+ */
10
+ const __DEFAULT_TINYMCE_CONFIG__ = {
11
+ menubar: false,
12
+ inline: true,
13
+ valid_styles: {
14
+ '*': 'font-size,font-family,color,text-decoration,text-align'
15
+ },
16
+ powerpaste_word_import: 'clean',
17
+ powerpaste_html_import: 'clean',
18
+ suffix: '.min' // Suffix to use when loading resources
19
+ };
20
+ /**
21
+ * TinyMCE config to use per mode
22
+ *
23
+ * @internal
24
+ */
25
+ const __BASE_TINYMCE_CONFIG_WITH_NO_DEFAULT__ = {
26
+ full: {
27
+ plugins: 'link lists autolink charmap',
28
+ toolbar: ['styleselect undo redo | bold italic underline | forecolor backcolor | alignleft aligncenter alignright alignfull | numlist bullist outdent indent | hr charmap removeformat | link'],
29
+ style_formats: [{
30
+ title: 'Paragraph',
31
+ format: 'p'
32
+ }, {
33
+ title: 'Header 1',
34
+ format: 'h1'
35
+ }, {
36
+ title: 'Header 2',
37
+ format: 'h2'
38
+ }, {
39
+ title: 'Header 3',
40
+ format: 'h3'
41
+ }, {
42
+ title: 'Header 4',
43
+ format: 'h4'
44
+ }, {
45
+ title: 'Header 5',
46
+ format: 'h5'
47
+ }, {
48
+ title: 'Header 6',
49
+ format: 'h6'
50
+ }, {
51
+ title: 'Pre',
52
+ format: 'pre'
53
+ }, {
54
+ title: 'Code',
55
+ format: 'code'
56
+ }]
57
+ },
58
+ plain: {
59
+ plugins: '',
60
+ toolbar: ''
61
+ },
62
+ minimal: {
63
+ plugins: 'link autolink',
64
+ toolbar: 'bold italic underline | link',
65
+ valid_elements: 'strong,em,span[style],a[href]'
66
+ }
67
+ };
68
+ /**
69
+ * TinyMCE path
70
+ *
71
+ * @internal
72
+ */
73
+ const __TINYMCE_PATH_ON_DOTCMS__ = '/ext/tinymcev7/tinymce.min.js';
74
+
75
+ export { __BASE_TINYMCE_CONFIG_WITH_NO_DEFAULT__, __DEFAULT_TINYMCE_CONFIG__, __TINYMCE_PATH_ON_DOTCMS__ };
package/package.json CHANGED
@@ -1,11 +1,14 @@
1
1
  {
2
2
  "name": "@dotcms/uve",
3
- "version": "0.0.1-beta.24",
3
+ "version": "0.0.1-beta.26",
4
4
  "description": "Official JavaScript library for interacting with Universal Visual Editor (UVE)",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/dotCMS/core.git#main"
8
8
  },
9
+ "devDependencies": {
10
+ "@dotcms/types": "next"
11
+ },
9
12
  "keywords": [
10
13
  "dotCMS",
11
14
  "CMS",
@@ -21,12 +24,6 @@
21
24
  "import": "./index.cjs.mjs",
22
25
  "default": "./index.cjs.js"
23
26
  },
24
- "./types": {
25
- "module": "./types.esm.js",
26
- "types": "./types.esm.d.ts",
27
- "import": "./types.cjs.mjs",
28
- "default": "./types.cjs.js"
29
- },
30
27
  "./internal": {
31
28
  "module": "./internal.esm.js",
32
29
  "types": "./internal.esm.d.ts",
@@ -39,9 +36,6 @@
39
36
  ".": [
40
37
  "./src/index.d.ts"
41
38
  ],
42
- "types": [
43
- "./src/types.d.ts"
44
- ],
45
39
  "internal": [
46
40
  "./src/internal.d.ts"
47
41
  ]