@modusoperandi/licit-vignette 1.1.3 → 1.1.4

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/CreateCommand.js CHANGED
@@ -31,6 +31,9 @@ export function createCommand(execute) {
31
31
  executeCustom(_state, tr) {
32
32
  return tr;
33
33
  }
34
+ executeCustomStyleForTable(_state, tr) {
35
+ return tr;
36
+ }
34
37
  }
35
38
  return new CustomCommand();
36
39
  }
@@ -16,4 +16,5 @@ export declare class VignetteCommand extends UICommand {
16
16
  renderLabel(): any;
17
17
  isActive(): boolean;
18
18
  executeCustom(_state: EditorState, tr: Transform): Transform;
19
+ executeCustomStyleForTable(_state: EditorState, tr: Transform): Transform;
19
20
  }
@@ -90,4 +90,7 @@ export class VignetteCommand extends UICommand {
90
90
  executeCustom(_state, tr) {
91
91
  return tr;
92
92
  }
93
+ executeCustomStyleForTable(_state, tr) {
94
+ return tr;
95
+ }
93
96
  }
@@ -3,6 +3,7 @@ import { TABLE, VIGNETTE } from './Constants';
3
3
  export const VignetteTableNodeSpec = (nodespec) => ({
4
4
  ...nodespec,
5
5
  attrs: {
6
+ ...nodespec.attrs,
6
7
  marginLeft: { default: null },
7
8
  vignette: { default: false },
8
9
  },
@@ -28,8 +29,8 @@ export const VignetteTableNodeSpec = (nodespec) => ({
28
29
  // `TableNodeView`. This method is only called when user selects a
29
30
  // table node and copies it, which triggers the "serialize to HTML" flow
30
31
  // that calles this method.
31
- const { marginLeft, vignette } = node.attrs;
32
- const domAttrs = { vignette };
32
+ const { marginLeft } = node.attrs;
33
+ const domAttrs = { ...node.attrs };
33
34
  let style = 'border: none';
34
35
  if (marginLeft) {
35
36
  style += `margin-left: ${marginLeft}px`;
@@ -54,7 +55,7 @@ export const VignetteTableCellNodeSpec = (nodespec) => ({
54
55
  ],
55
56
  toDOM(node) {
56
57
  const base = nodespec.toDOM(node);
57
- const borderColor = node.attrs.borderColor || '#36598d';
58
+ const borderColor = node.attrs.borderColor ?? '#36598d';
58
59
  if (node.attrs.vignette &&
59
60
  Array.isArray(base) &&
60
61
  1 < base.length &&
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modusoperandi/licit-vignette",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "subversion": "1",
@@ -10,7 +10,7 @@
10
10
  "style": "styles.css",
11
11
  "repository": {
12
12
  "type": "git",
13
- "url": "git+https://github.com/MO-Movia/licit-plugin-contrib-vignette"
13
+ "url": "https://github.com/MO-Movia/licit-plugin-contrib-vignette"
14
14
  },
15
15
  "scripts": {
16
16
  "clean": "rm -rf dist/ bin/ && rm -f modusoperandi-licit-vignette-*.*.*.tgz",
@@ -21,57 +21,53 @@
21
21
  "test:coverage": "jest --coverage",
22
22
  "test": "jest --coverage",
23
23
  "debug": "node --debug-brk --inspect ./node_modules/.bin/jest -i",
24
- "ci:bom": "cyclonedx-npm --ignore-npm-errors --short-PURLs --output-format XML --output-file dist/bom.xml",
25
- "ci:build": "tsc --build && copyfiles --up 1 \"src/**/*.css\" dist && copyfiles package.json LICENSE dist",
24
+ "ci:bom": "npx @cyclonedx/cyclonedx-npm --ignore-npm-errors --short-PURLs --output-format XML --output-file dist/bom.xml",
25
+ "ci:build": "tsc --build && copyfiles --up 1 \"src/**/*.css\" dist && copyfiles package.json LICENSE dist",
26
26
  "verify": "npm run lint -- --fix && npm run ci:build && npm run test:coverage && echo 'All Tests Passed!'"
27
27
  },
28
28
  "peerDependencies": {
29
29
  "@modusoperandi/licit-ui-commands": "^1.0.8"
30
30
  },
31
31
  "dependencies": {
32
- "@modusoperandi/color-picker": "^1.0.4"
32
+ "@modusoperandi/color-picker": "^1.0.7"
33
33
  },
34
34
  "devDependencies": {
35
- "@cyclonedx/cyclonedx-npm": "^4.0.0",
36
- "@testing-library/dom": "^10.0.0",
37
- "@testing-library/jest-dom": "^6.4.1",
38
- "@testing-library/react": "^16.0.0",
39
- "@testing-library/user-event": "^14.4.3",
35
+ "@testing-library/dom": "^10.4.1",
36
+ "@testing-library/jest-dom": "^6.9.1",
37
+ "@testing-library/react": "^16.3.1",
38
+ "@testing-library/user-event": "^14.6.1",
40
39
  "@types/jest": "^30.0.0",
41
- "@types/node": "^24.0.1",
42
- "@types/react": "^19.0.3",
43
- "@typescript-eslint/eslint-plugin": "^8.0.0",
44
- "@typescript-eslint/parser": "^8.0.0",
45
- "ajv": "^8.12.0",
40
+ "@types/node": "^25.0.3",
41
+ "@types/react": "^19.2.7",
42
+ "@typescript-eslint/eslint-plugin": "^8.51.0",
43
+ "@typescript-eslint/parser": "^8.51.0",
44
+ "ajv": "^8.17.1",
46
45
  "copyfiles": "^2.4.1",
47
- "eslint": "^8.0.0",
48
- "eslint-config-prettier": "^10.0.2",
49
- "eslint-plugin-import": "^2.26.0",
50
- "eslint-plugin-jest": "^29.0.1",
51
- "eslint-plugin-prettier": "^5.1.3",
52
- "eslint-plugin-react": "^7.31.10",
53
- "husky": "^9.0.10",
46
+ "eslint": "^8.57.1",
47
+ "eslint-config-prettier": "^10.1.8",
48
+ "eslint-plugin-import": "^2.32.0",
49
+ "eslint-plugin-jest": "^29.12.0",
50
+ "eslint-plugin-prettier": "^5.5.4",
51
+ "eslint-plugin-react": "^7.37.5",
52
+ "husky": "^9.1.7",
54
53
  "identity-obj-proxy": "^3.0.0",
55
- "jest": "^30.0.2",
56
- "jest-environment-jsdom": "^30.0.2",
54
+ "jest": "^30.2.0",
55
+ "jest-environment-jsdom": "^30.2.0",
57
56
  "jest-json": "^2.0.0",
58
57
  "jest-junit": "^16.0.0",
59
- "jest-prosemirror": "^3.0.0",
58
+ "jest-prosemirror": "^3.0.1",
60
59
  "jest-sonar-reporter": "^2.0.0",
61
- "lint-staged": "^16.0.0",
62
- "prettier": "^3.2.0",
63
- "react-test-renderer": "^18.2.0",
60
+ "lint-staged": "^16.2.7",
61
+ "prettier": "^3.7.4",
62
+ "react-test-renderer": "^18.3.1",
64
63
  "resize-observer-polyfill": "^1.5.1",
65
- "stylelint": "^16.2.0",
66
- "stylelint-config-standard": "^38.0.0",
67
- "stylelint-prettier": "^5.0.0",
68
- "ts-jest": "^29.0.3",
69
- "ts-node": "^10.9.1",
70
- "typescript": "5.8.3",
71
- "url": "^0.11.0"
72
- },
73
- "overrides": {
74
- "libxmljs2": "^1.0.0"
64
+ "stylelint": "^16.26.1",
65
+ "stylelint-config-standard": "^39.0.1",
66
+ "stylelint-prettier": "^5.0.3",
67
+ "ts-jest": "^29.4.6",
68
+ "ts-node": "^10.9.2",
69
+ "typescript": "5.9.3",
70
+ "url": "^0.11.4"
75
71
  },
76
72
  "importSort": {
77
73
  ".js": {
@@ -1 +1 @@
1
- {"root":["../src/Constants.ts","../src/CreateCommand.ts","../src/TableBackgroundColorCommand.ts","../src/TableBorderColorCommand.ts","../src/VignetteCommand.ts","../src/VignetteMenuPlugin.ts","../src/VignetteNodeSpec.ts","../src/VignettePlugin.ts","../src/VignettePlugins.ts","../src/index.ts","../src/ui/TableColorCommand.tsx"],"version":"5.8.3"}
1
+ {"root":["../src/Constants.ts","../src/CreateCommand.ts","../src/TableBackgroundColorCommand.ts","../src/TableBorderColorCommand.ts","../src/VignetteCommand.ts","../src/VignetteMenuPlugin.ts","../src/VignetteNodeSpec.ts","../src/VignettePlugin.ts","../src/VignettePlugins.ts","../src/index.ts","../src/ui/TableColorCommand.tsx"],"version":"5.9.3"}
@@ -17,4 +17,5 @@ export declare class TableColorCommand extends UICommand {
17
17
  renderLabel(): any;
18
18
  isActive(): boolean;
19
19
  executeCustom(_state: EditorState, tr: Transform): Transform;
20
+ executeCustomStyleForTable(_state: EditorState, tr: Transform): Transform;
20
21
  }
@@ -68,4 +68,7 @@ export class TableColorCommand extends UICommand {
68
68
  executeCustom(_state, tr) {
69
69
  return tr;
70
70
  }
71
+ executeCustomStyleForTable(_state, tr) {
72
+ return tr;
73
+ }
71
74
  }