@fibery/prosemirror-schema 5.0.0 → 6.0.1

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.
@@ -1,6 +1,6 @@
1
1
  //#region src/marks/linked-highlight.ts
2
2
  const hyphenatePascal = (str) => str.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/([A-Z]{2})[a-z]/, "$1-").toLowerCase();
3
- const createMark = (markType, sharedColorGenerator) => {
3
+ const createMark = (markType, backgroundProperty, sharedColorGenerator) => {
4
4
  const markTag = `span.${markType}`;
5
5
  const markClassName = `${markType}`;
6
6
  const preserveBool = (attr) => attr === "true" ? true : attr === "false" ? false : attr;
@@ -27,7 +27,7 @@ const createMark = (markType, sharedColorGenerator) => {
27
27
  const color = sharedColorGenerator ? sharedColorGenerator.generate(attrs) : "#EEEEEE";
28
28
  return [markTag, {
29
29
  class: markClassName,
30
- style: color ? `--${markType}-background-color:${color}` : ``,
30
+ style: color ? `${backgroundProperty}:${color}` : ``,
31
31
  "data-id": id,
32
32
  ...Object.fromEntries(Object.keys(meta).filter((key) => meta[key] !== false).map((key) => [`data-${hyphenatePascal(key)}`, JSON.stringify(meta[key])]))
33
33
  }];
@@ -35,10 +35,10 @@ const createMark = (markType, sharedColorGenerator) => {
35
35
  };
36
36
  };
37
37
  const makeLinkedHighlight = ({ sharedColorGenerator }) => {
38
- return createMark("linkedhighlight", sharedColorGenerator);
38
+ return createMark("linkedhighlight", "--dynamic-bg-linked-highlight", sharedColorGenerator);
39
39
  };
40
40
  const makeLinkedHighlightEntity = ({ sharedColorGenerator }) => {
41
- return createMark("linkedhighlightentity", sharedColorGenerator);
41
+ return createMark("linkedhighlightentity", "--dynamic-bg-linked-highlight-entity", sharedColorGenerator);
42
42
  };
43
43
  //#endregion
44
44
  export { makeLinkedHighlight, makeLinkedHighlightEntity };
@@ -29,7 +29,7 @@ export declare const file: {
29
29
  inline: true;
30
30
  group: string;
31
31
  selectable: false;
32
- draggable: false;
32
+ draggable: true;
33
33
  leafText: (node: import("prosemirror-model").Node) => any;
34
34
  parseDOM: {
35
35
  tag: string;
package/lib/nodes/file.js CHANGED
@@ -21,7 +21,7 @@ const file = {
21
21
  inline: true,
22
22
  group: "inline",
23
23
  selectable: false,
24
- draggable: false,
24
+ draggable: true,
25
25
  leafText: (node) => node.attrs.title,
26
26
  parseDOM: [{
27
27
  tag: "span[data-file-href]",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fibery/prosemirror-schema",
3
- "version": "5.0.0",
3
+ "version": "6.0.1",
4
4
  "description": "Fibery prosemirror schema",
5
5
  "license": "UNLICENSED",
6
6
  "files": [