tinymce-solid 0.0.9 → 0.0.10

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/README.md CHANGED
@@ -5,11 +5,11 @@
5
5
  [![Coverage Status](https://coveralls.io/repos/github/thednp/tinymce-solid/badge.svg)](https://coveralls.io/github/thednp/tinymce-solid)
6
6
  [![ci](https://github.com/thednp/tinymce-solid/actions/workflows/ci.yml/badge.svg)](https://github.com/thednp/tinymce-solid/actions/workflows/ci.yml)
7
7
  [![Npm Version](https://img.shields.io/npm/v/tinymce-solid)](https://www.npmjs.com/package/tinymce-solid)
8
- [![solid-js version](https://img.shields.io/badge/solid--js-1.9.3-brightgreen)](https://solidjs.com/)
9
- [![tinymce version](https://img.shields.io/badge/tinymce-7.5.1-brightgreen)](https://www.tiny.cloud/)
10
- [![typescript version](https://img.shields.io/badge/typescript-5.7.2-brightgreen)](https://www.typescriptlang.org/)
11
- [![vitest version](https://img.shields.io/badge/vitest-2.1.5-brightgreen)](https://vitest.dev/)
12
- [![vite version](https://img.shields.io/badge/vite-5.4.11-brightgreen)](https://github.com/vitejs)
8
+ [![solid-js version](https://img.shields.io/badge/solid--js-1.9.7-brightgreen)](https://solidjs.com/)
9
+ [![tinymce version](https://img.shields.io/badge/tinymce-7.9.1-brightgreen)](https://www.tiny.cloud/)
10
+ [![typescript version](https://img.shields.io/badge/typescript-5.8.3-brightgreen)](https://www.typescriptlang.org/)
11
+ [![vitest version](https://img.shields.io/badge/vitest-3.1.4-brightgreen)](https://vitest.dev/)
12
+ [![vite version](https://img.shields.io/badge/vite-6.3.5-brightgreen)](https://github.com/vitejs)
13
13
 
14
14
  ## About
15
15
 
package/dist/dev.js CHANGED
@@ -952,7 +952,10 @@ var normalizePluginArray = (plugins) => {
952
952
  if (typeof plugins === "undefined" || plugins === "") {
953
953
  return [];
954
954
  }
955
- return Array.isArray(plugins) ? plugins : plugins.split(" ");
955
+ return Array.isArray(plugins) ? (
956
+ /* istanbul ignore next */
957
+ plugins
958
+ ) : plugins.split(" ");
956
959
  };
957
960
  var mergePlugins = (initPlugins, inputPlugins) => normalizePluginArray(initPlugins).concat(normalizePluginArray(inputPlugins));
958
961
  var isBeforeInputEventAvailable = () => globalThis.InputEvent && typeof InputEvent.prototype.getTargetRanges === "function";
@@ -1378,33 +1381,36 @@ var Editor = (props) => {
1378
1381
  handleBeforeInput(evt);
1379
1382
  }
1380
1383
  };
1381
- return createComponent(Dynamic, mergeProps(props, {
1382
- get component() {
1383
- return memo(() => !!props.inline)() ? tagName() : "textarea";
1384
- },
1385
- get id() {
1386
- return id();
1387
- },
1388
- get ["data-testid"]() {
1389
- return props.testid;
1390
- },
1391
- get tabIndex() {
1392
- return props.tabIndex;
1393
- },
1394
- ref(r$) {
1395
- var _ref$ = props.elementRef;
1396
- typeof _ref$ === "function" ? _ref$(r$) : props.elementRef = r$;
1397
- },
1398
- get ["data-disabled"]() {
1399
- return disabled();
1400
- },
1401
- get ["data-skin"]() {
1402
- return skin();
1403
- },
1404
- get ["data-css"]() {
1405
- return contentCss();
1406
- }
1407
- }));
1384
+ return (
1385
+ /* istanbul ignore next @preserve */
1386
+ createComponent(Dynamic, mergeProps(props, {
1387
+ get component() {
1388
+ return memo(() => !!props.inline)() ? tagName() : "textarea";
1389
+ },
1390
+ get id() {
1391
+ return id();
1392
+ },
1393
+ get ["data-testid"]() {
1394
+ return props.testid;
1395
+ },
1396
+ get tabIndex() {
1397
+ return props.tabIndex;
1398
+ },
1399
+ ref(r$) {
1400
+ var _ref$ = props.elementRef;
1401
+ typeof _ref$ === "function" ? _ref$(r$) : props.elementRef = r$;
1402
+ },
1403
+ get ["data-disabled"]() {
1404
+ return disabled();
1405
+ },
1406
+ get ["data-skin"]() {
1407
+ return skin();
1408
+ },
1409
+ get ["data-css"]() {
1410
+ return contentCss();
1411
+ }
1412
+ }))
1413
+ );
1408
1414
  };
1409
1415
 
1410
1416
  // src/index.tsx
package/dist/dev.jsx CHANGED
@@ -966,7 +966,10 @@ var normalizePluginArray = (plugins) => {
966
966
  if (typeof plugins === "undefined" || plugins === "") {
967
967
  return [];
968
968
  }
969
- return Array.isArray(plugins) ? plugins : plugins.split(" ");
969
+ return Array.isArray(plugins) ? (
970
+ /* istanbul ignore next */
971
+ plugins
972
+ ) : plugins.split(" ");
970
973
  };
971
974
  var mergePlugins = (initPlugins, inputPlugins) => normalizePluginArray(initPlugins).concat(normalizePluginArray(inputPlugins));
972
975
  var isBeforeInputEventAvailable = () => globalThis.InputEvent && typeof InputEvent.prototype.getTargetRanges === "function";
@@ -1400,17 +1403,20 @@ var Editor = (props) => {
1400
1403
  handleBeforeInput(evt);
1401
1404
  }
1402
1405
  };
1403
- return <Dynamic
1404
- {...props}
1405
- component={props.inline ? tagName() : "textarea"}
1406
- id={id()}
1407
- data-testid={props.testid}
1408
- tabIndex={props.tabIndex}
1409
- ref={props.elementRef}
1410
- data-disabled={disabled()}
1411
- data-skin={skin()}
1412
- data-css={contentCss()}
1413
- />;
1406
+ return (
1407
+ /* istanbul ignore next @preserve */
1408
+ <Dynamic
1409
+ {...props}
1410
+ component={props.inline ? tagName() : "textarea"}
1411
+ id={id()}
1412
+ data-testid={props.testid}
1413
+ tabIndex={props.tabIndex}
1414
+ ref={props.elementRef}
1415
+ data-disabled={disabled()}
1416
+ data-skin={skin()}
1417
+ data-css={contentCss()}
1418
+ />
1419
+ );
1414
1420
  };
1415
1421
 
1416
1422
  // src/index.tsx
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as solid_js from 'solid-js';
2
2
  import * as PropTypes from 'prop-types';
3
- import { EditorEvent, Editor as Editor$1, Events, TinyMCE } from 'tinymce';
3
+ import { Events, EditorEvent, Editor as Editor$1, TinyMCE } from 'tinymce';
4
4
 
5
5
  type EventHandler<A> = (a: EditorEvent<A>, editor: Editor$1) => unknown;
6
6
  type EEventHandler<K extends keyof Events.EditorEventMap> = EventHandler<Events.EditorEventMap[K]>;
package/dist/index.js CHANGED
@@ -256,7 +256,10 @@ var normalizePluginArray = (plugins) => {
256
256
  if (typeof plugins === "undefined" || plugins === "") {
257
257
  return [];
258
258
  }
259
- return Array.isArray(plugins) ? plugins : plugins.split(" ");
259
+ return Array.isArray(plugins) ? (
260
+ /* istanbul ignore next */
261
+ plugins
262
+ ) : plugins.split(" ");
260
263
  };
261
264
  var mergePlugins = (initPlugins, inputPlugins) => normalizePluginArray(initPlugins).concat(normalizePluginArray(inputPlugins));
262
265
  var isBeforeInputEventAvailable = () => globalThis.InputEvent && typeof InputEvent.prototype.getTargetRanges === "function";
@@ -682,33 +685,36 @@ var Editor = (props) => {
682
685
  handleBeforeInput(evt);
683
686
  }
684
687
  };
685
- return createComponent(Dynamic, mergeProps(props, {
686
- get component() {
687
- return memo(() => !!props.inline)() ? tagName() : "textarea";
688
- },
689
- get id() {
690
- return id();
691
- },
692
- get ["data-testid"]() {
693
- return props.testid;
694
- },
695
- get tabIndex() {
696
- return props.tabIndex;
697
- },
698
- ref(r$) {
699
- var _ref$ = props.elementRef;
700
- typeof _ref$ === "function" ? _ref$(r$) : props.elementRef = r$;
701
- },
702
- get ["data-disabled"]() {
703
- return disabled();
704
- },
705
- get ["data-skin"]() {
706
- return skin();
707
- },
708
- get ["data-css"]() {
709
- return contentCss();
710
- }
711
- }));
688
+ return (
689
+ /* istanbul ignore next @preserve */
690
+ createComponent(Dynamic, mergeProps(props, {
691
+ get component() {
692
+ return memo(() => !!props.inline)() ? tagName() : "textarea";
693
+ },
694
+ get id() {
695
+ return id();
696
+ },
697
+ get ["data-testid"]() {
698
+ return props.testid;
699
+ },
700
+ get tabIndex() {
701
+ return props.tabIndex;
702
+ },
703
+ ref(r$) {
704
+ var _ref$ = props.elementRef;
705
+ typeof _ref$ === "function" ? _ref$(r$) : props.elementRef = r$;
706
+ },
707
+ get ["data-disabled"]() {
708
+ return disabled();
709
+ },
710
+ get ["data-skin"]() {
711
+ return skin();
712
+ },
713
+ get ["data-css"]() {
714
+ return contentCss();
715
+ }
716
+ }))
717
+ );
712
718
  };
713
719
 
714
720
  // src/index.tsx
package/dist/index.jsx CHANGED
@@ -268,7 +268,10 @@ var normalizePluginArray = (plugins) => {
268
268
  if (typeof plugins === "undefined" || plugins === "") {
269
269
  return [];
270
270
  }
271
- return Array.isArray(plugins) ? plugins : plugins.split(" ");
271
+ return Array.isArray(plugins) ? (
272
+ /* istanbul ignore next */
273
+ plugins
274
+ ) : plugins.split(" ");
272
275
  };
273
276
  var mergePlugins = (initPlugins, inputPlugins) => normalizePluginArray(initPlugins).concat(normalizePluginArray(inputPlugins));
274
277
  var isBeforeInputEventAvailable = () => globalThis.InputEvent && typeof InputEvent.prototype.getTargetRanges === "function";
@@ -702,17 +705,20 @@ var Editor = (props) => {
702
705
  handleBeforeInput(evt);
703
706
  }
704
707
  };
705
- return <Dynamic
706
- {...props}
707
- component={props.inline ? tagName() : "textarea"}
708
- id={id()}
709
- data-testid={props.testid}
710
- tabIndex={props.tabIndex}
711
- ref={props.elementRef}
712
- data-disabled={disabled()}
713
- data-skin={skin()}
714
- data-css={contentCss()}
715
- />;
708
+ return (
709
+ /* istanbul ignore next @preserve */
710
+ <Dynamic
711
+ {...props}
712
+ component={props.inline ? tagName() : "textarea"}
713
+ id={id()}
714
+ data-testid={props.testid}
715
+ tabIndex={props.tabIndex}
716
+ ref={props.elementRef}
717
+ data-disabled={disabled()}
718
+ data-skin={skin()}
719
+ data-css={contentCss()}
720
+ />
721
+ );
716
722
  };
717
723
 
718
724
  // src/index.tsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tinymce-solid",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
4
4
  "description": "📝 TinyMCE Component for SolidJS",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -20,35 +20,35 @@
20
20
  "registry": "https://registry.npmjs.org/"
21
21
  },
22
22
  "dependencies": {
23
- "solid-js": "^1.9.3",
24
- "tinymce": "^7.5.1"
23
+ "solid-js": "^1.9.7",
24
+ "tinymce": "^7.9.1"
25
25
  },
26
26
  "devDependencies": {
27
- "@kobalte/core": "^0.13.7",
27
+ "@kobalte/core": "^0.13.9",
28
28
  "@kobalte/utils": "^0.9.1",
29
29
  "@testing-library/jest-dom": "^6.6.3",
30
- "@types/node": "^20.17.7",
31
- "@types/prop-types": "^15.7.13",
32
- "@vitest/browser": "^2.1.5",
33
- "@vitest/coverage-istanbul": "^2.1.5",
34
- "@vitest/ui": "^2.1.5",
35
- "autoprefixer": "^10.4.20",
36
- "class-variance-authority": "^0.7.0",
30
+ "@types/node": "^22.15.24",
31
+ "@types/prop-types": "^15.7.14",
32
+ "@vitest/browser": "^3.1.4",
33
+ "@vitest/coverage-istanbul": "^3.1.4",
34
+ "@vitest/ui": "^3.1.4",
35
+ "autoprefixer": "^10.4.21",
36
+ "class-variance-authority": "^0.7.1",
37
37
  "clsx": "^2.1.1",
38
- "jsdom": "^25.0.1",
39
- "playwright": "^1.49.0",
40
- "postcss": "^8.4.49",
38
+ "jsdom": "^26.1.0",
39
+ "playwright": "^1.52.0",
40
+ "postcss": "^8.5.3",
41
41
  "prop-types": "^15.8.1",
42
- "tailwind-merge": "^2.5.4",
43
- "tailwindcss": "^3.4.15",
44
- "tailwindcss-animate": "^1.0.7",
45
- "tsup": "^8.3.5",
42
+ "tailwind-merge": "^3.3.0",
43
+ "tailwindcss": "3.4.17",
44
+ "tailwindcss-animate": "1.0.7",
45
+ "tsup": "^8.5.0",
46
46
  "tsup-preset-solid": "^2.2.0",
47
- "typescript": "^5.7.2",
48
- "vite": "^5.4.11",
49
- "vite-plugin-compression2": "^1.3.1",
50
- "vite-plugin-solid": "^2.10.2",
51
- "vitest": "^2.1.5"
47
+ "typescript": "^5.8.3",
48
+ "vite": "^6.3.5",
49
+ "vite-plugin-compression2": "^1.4.0",
50
+ "vite-plugin-solid": "^2.11.6",
51
+ "vitest": "^3.1.4"
52
52
  },
53
53
  "engines": {
54
54
  "node": ">=18"
@@ -76,15 +76,15 @@
76
76
  "typesVersions": {},
77
77
  "scripts": {
78
78
  "pre-test": "pnpm clean-coverage",
79
- "test": "pnpm pre-test && vitest --config vitest.config.mts",
80
- "test-ui": "pnpm pre-test && vitest --config vitest.config-ui.mts",
79
+ "test": "pnpm pre-test && vitest --config vitest.config.ts",
80
+ "test-ui": "pnpm pre-test && vitest --config vitest.config-ui.ts",
81
81
  "clean-coverage": "rm -rf coverage .nyc_output",
82
82
  "format": "deno fmt src",
83
83
  "build": "tsup",
84
84
  "build:all": "pnpm build && pnpm build:docs",
85
85
  "dev": "vite serve demo",
86
- "build:docs": "vite build demo --config demo/vite.config.docs.mts",
87
- "copy:tiny": "cp -a './node_modules/.pnpm/tinymce@7.5.1/node_modules/tinymce' './demo/public'",
86
+ "build:docs": "vite build demo --config demo/vite.config.docs.ts",
87
+ "copy:tiny": "cp -a './node_modules/.pnpm/tinymce@7.9.0/node_modules/tinymce' './demo/public'",
88
88
  "serve:docs": "vite serve docs --port 3000",
89
89
  "badges": "npx -p dependency-version-badge update-badge solid-js tinymce typescript vitest vite",
90
90
  "lint": "pnpm lint:types && pnpm lint:code",
@@ -0,0 +1,33 @@
1
+ import { defineConfig } from "vitest/config";
2
+ import solid from "vite-plugin-solid";
3
+ import path from "node:path";
4
+
5
+ export default defineConfig({
6
+ plugins: [solid()],
7
+ resolve: {
8
+ conditions: ["development", "browser"],
9
+ alias: {
10
+ "~": path.resolve(__dirname, "src"),
11
+ "@": path.resolve(__dirname),
12
+ },
13
+ },
14
+ publicDir: path.resolve(__dirname, "demo/public"),
15
+ test: {
16
+ globals: true,
17
+ coverage: {
18
+ provider: "istanbul",
19
+ reporter: ["html", "text", "lcov"],
20
+ enabled: true,
21
+ include: ["src/**/*.{ts,tsx}"],
22
+ },
23
+ browser: {
24
+ provider: 'preview', // or 'webdriverio'
25
+ enabled: true,
26
+ headless: false,
27
+ instances: [
28
+ { browser: 'chromium' }
29
+ ]
30
+ // enableUI: true
31
+ },
32
+ },
33
+ });
@@ -0,0 +1,32 @@
1
+ import { defineConfig } from "vitest/config";
2
+ import solid from "vite-plugin-solid";
3
+ import path from "node:path";
4
+
5
+ export default defineConfig({
6
+ plugins: [solid()],
7
+ resolve: {
8
+ conditions: ["development", "browser"],
9
+ alias: {
10
+ "~": path.resolve(__dirname, "src"),
11
+ "@": path.resolve(__dirname),
12
+ },
13
+ },
14
+ publicDir: path.resolve(__dirname, "demo/public"),
15
+ test: {
16
+ globals: true,
17
+ coverage: {
18
+ provider: "istanbul",
19
+ reporter: ["html", "text", "lcov"],
20
+ enabled: true,
21
+ include: ["src/**/*.{ts,tsx}"],
22
+ },
23
+ browser: {
24
+ provider: 'playwright', // or 'webdriverio'
25
+ enabled: true,
26
+ headless: true,
27
+ instances: [
28
+ { browser: 'chromium' }
29
+ ]
30
+ },
31
+ },
32
+ });