@tinymce/tinymce-webcomponent 2.3.2 → 2.4.0-feature.20260407061521424.sha0e528d5

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/CHANGELOG.md CHANGED
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## Unreleased
8
8
 
9
+ ### Changed
10
+
11
+ - Moved `@tinymce/miniature` to devDependency. #INT-3358
12
+
9
13
  ## 2.3.2 - 2025-12-18
10
14
 
11
15
  ### Fixed
@@ -25,7 +29,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
25
29
  ## 2.2.0 - 2025-05-29
26
30
 
27
31
  ### Added
28
- - New `readonly` attribute that can be used to toggle the editor's `readonly` mode. #TINY-11911
32
+ - New `disabled` attribute that can be used to toggle the editor's `disabled` option. #TINY-11911
29
33
 
30
34
  ## 2.1.0 - 2024-01-08
31
35
 
@@ -85,49 +85,6 @@
85
85
  };
86
86
  const ScriptLoader = CreateScriptLoader();
87
87
 
88
- const toInt = str => parseInt(str, 10);
89
- const cmp = (a, b) => {
90
- const delta = a - b;
91
- if (delta === 0) {
92
- return 0;
93
- }
94
- return delta > 0 ? 1 : -1;
95
- };
96
- const nu = (major, minor, patch) => ({
97
- major,
98
- minor,
99
- patch
100
- });
101
- const parse = versionString => {
102
- const parts = /([0-9]+)\.([0-9]+)\.([0-9]+)(?:(\-.+)?)/.exec(versionString);
103
- return parts ? nu(toInt(parts[1]), toInt(parts[2]), toInt(parts[3])) : nu(0, 0, 0);
104
- };
105
- const compare = (version1, version2) => {
106
- const cmp1 = cmp(version1.major, version2.major);
107
- if (cmp1 !== 0) {
108
- return cmp1;
109
- }
110
- const cmp2 = cmp(version1.minor, version2.minor);
111
- if (cmp2 !== 0) {
112
- return cmp2;
113
- }
114
- const cmp3 = cmp(version1.patch, version2.patch);
115
- if (cmp3 !== 0) {
116
- return cmp3;
117
- }
118
- return 0;
119
- };
120
-
121
- const createSemVer = tinymce => {
122
- const semver = [
123
- tinymce.majorVersion,
124
- tinymce.minorVersion
125
- ].join('.');
126
- return semver.split('.').slice(0, 3).join('.');
127
- };
128
- const getVersion = tinymce => parse(createSemVer(tinymce));
129
- const isLessThan = (tinymce, version) => !tinymce ? false : compare(getVersion(tinymce), parse(version)) === -1;
130
-
131
88
  var Status;
132
89
  (function (Status) {
133
90
  Status[Status['Raw'] = 0] = 'Raw';
@@ -185,7 +142,10 @@
185
142
  promotion: parseBooleanOrString
186
143
  };
187
144
  const configRenames = {};
188
- const isDisabledOptionSupported = tinymce => !isLessThan(tinymce, '7.6.0');
145
+ const isDisabledOptionSupported = editor => {
146
+ var _a;
147
+ return !!editor && typeof ((_a = editor.options) === null || _a === void 0 ? void 0 : _a.set) === 'function' && editor.options.isRegistered('disabled');
148
+ };
189
149
  class TinyMceEditor extends HTMLElement {
190
150
  static get formAssociated() {
191
151
  return true;
@@ -508,10 +468,7 @@
508
468
  return this._editor ? this._editor.options.get('disabled') : this.hasAttribute('disabled');
509
469
  }
510
470
  set disabled(value) {
511
- var _a;
512
- const tinymce = (_a = this._getTinymce) === null || _a === void 0 ? void 0 : _a.call(this);
513
- const isVersionNewer = tinymce ? isDisabledOptionSupported(tinymce) : true;
514
- if (this._editor && this._status === Status.Ready && isVersionNewer) {
471
+ if (this._editor && this._status === Status.Ready && isDisabledOptionSupported(this._editor)) {
515
472
  this._editor.options.set('disabled', value);
516
473
  }
517
474
  if (value && !this.hasAttribute('disabled')) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "description": "Official TinyMCE Web Component",
3
- "version": "2.3.2",
3
+ "version": "2.4.0-feature.20260407061521424.sha0e528d5",
4
4
  "name": "@tinymce/tinymce-webcomponent",
5
5
  "repository": {
6
6
  "url": "https://github.com/tinymce/tinymce-webcomponent"
@@ -13,10 +13,10 @@
13
13
  ],
14
14
  "main": "dist/tinymce-webcomponent.js",
15
15
  "scripts": {
16
- "test": "bedrock-auto -b chrome-headless -d src/test/ts",
16
+ "test": "bedrock-auto -b chrome-headless -f src/test/ts/browser/LoadTest.ts",
17
17
  "build": "tsc -p ./tsconfig.json && rollup -c rollup.config.js",
18
18
  "lint": "yarn eslint src/**/*.ts",
19
- "serve": "yarn ts-node -r esm src/demo/ts/Server.ts"
19
+ "serve": "yarn tsx src/demo/ts/Server.ts"
20
20
  },
21
21
  "keywords": [
22
22
  "TinyMCE",
@@ -26,15 +26,14 @@
26
26
  "license": "MIT",
27
27
  "devDependencies": {
28
28
  "@ephox/agar": "^8.0.1",
29
- "@ephox/bedrock-client": "^15.0.0",
30
- "@ephox/bedrock-server": "^15.0.0",
29
+ "@ephox/bedrock-client": "^16.0.0",
30
+ "@ephox/bedrock-server": "^16.2.0",
31
31
  "@ephox/katamari": "^9.1.5",
32
32
  "@ephox/sugar": "^9.2.1",
33
33
  "@ephox/swag": "^4.6.0",
34
34
  "@tinymce/beehive-flow": "^0.19.0",
35
35
  "@tinymce/eslint-plugin": "^3.0.0",
36
- "@types/esm": "^3.2.0",
37
- "@types/express": "^5.0.0",
36
+ "@tinymce/miniature": "^6.0.0",
38
37
  "@types/node": "^24.5.2",
39
38
  "@typescript-eslint/eslint-plugin": "^8.44.0",
40
39
  "@typescript-eslint/parser": "^8.44.0",
@@ -42,16 +41,14 @@
42
41
  "eslint-config-eslint": "^13.0.0",
43
42
  "eslint-plugin-import": "^2.27.5",
44
43
  "eslint-plugin-prefer-arrow": "^1.2.3",
45
- "esm": "^3.2.25",
46
- "express": "^5.1.0",
44
+ "express": "^5.2.1",
47
45
  "rollup": "^4.24.0",
48
- "tinymce": "^8.0.0",
49
- "ts-loader": "^9.4.2",
50
- "ts-node": "^10.9.1",
46
+ "tinymce": "^8.4.0",
47
+ "tinymce-7.5.0": "npm:tinymce@7.5.0",
48
+ "tinymce-8": "npm:tinymce@8",
49
+ "tsx": "^4.21.0",
51
50
  "typescript": "~5.9.2",
52
51
  "webpack": "^5.75.0"
53
52
  },
54
- "dependencies": {
55
- "@tinymce/miniature": "^6.0.0"
56
- }
53
+ "dependencies": {}
57
54
  }