@erudit-js/prose 4.1.0 → 4.1.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.
@@ -9,5 +9,6 @@ export interface LinkData {
9
9
  }
10
10
  export type LinkToProp = string | GlobalContentTypeguard | AnyUnique;
11
11
  export declare function handleLinkTag(element: EruditRawElement<typeof depSchema | typeof dependencySchema | typeof refSchema | typeof referenceSchema>, tagName: string, props: {
12
- to: LinkToProp;
12
+ to?: LinkToProp;
13
+ on?: LinkToProp;
13
14
  }, children: NormalizedChildren): void;
@@ -8,5 +8,5 @@ export function handleLinkTag(element, tagName, props, children) {
8
8
  throw new ProseError(`<${tagName}> label cannot be empty!`);
9
9
  }
10
10
  element.data = { label };
11
- element.storageKey = createLinkStorageKey(props.to);
11
+ element.storageKey = createLinkStorageKey(props.to ?? props.on);
12
12
  }
@@ -25,7 +25,7 @@ export declare const Dep: import("@jsprose/core").Tag<"Dep", {
25
25
  Storage: import("../storage.js").ContentItemLinkStorage | import("../storage.js").UniqueLinkStorage | import("../storage.js").ErrorLinkStorage;
26
26
  Children: undefined;
27
27
  }, {
28
- to: Exclude<LinkToProp, string>;
28
+ on: Exclude<LinkToProp, string>;
29
29
  } & TagChildren & NoSnippet & NoToc>;
30
30
  export declare const Dependency: import("@jsprose/core").Tag<"Dependency", {
31
31
  name: "dependencyBlock";
@@ -35,7 +35,7 @@ export declare const Dependency: import("@jsprose/core").Tag<"Dependency", {
35
35
  Storage: import("../storage.js").ContentItemLinkStorage | import("../storage.js").UniqueLinkStorage | import("../storage.js").ErrorLinkStorage;
36
36
  Children: undefined;
37
37
  }, {
38
- to: Exclude<LinkToProp, string>;
38
+ on: Exclude<LinkToProp, string>;
39
39
  } & TagChildren & NoSnippet & NoToc>;
40
40
  export declare const depRegistryItem: import("@jsprose/core").RegistryItem<{
41
41
  name: "dependencyInliner";
@@ -53,7 +53,7 @@ export declare const depRegistryItem: import("@jsprose/core").RegistryItem<{
53
53
  Storage: import("../storage.js").ContentItemLinkStorage | import("../storage.js").UniqueLinkStorage | import("../storage.js").ErrorLinkStorage;
54
54
  Children: undefined;
55
55
  }, {
56
- to: Exclude<LinkToProp, string>;
56
+ on: Exclude<LinkToProp, string>;
57
57
  } & TagChildren & NoSnippet & NoToc>;
58
58
  }, undefined>;
59
59
  export declare const dependencyRegistryItem: import("@jsprose/core").RegistryItem<{
@@ -72,7 +72,7 @@ export declare const dependencyRegistryItem: import("@jsprose/core").RegistryIte
72
72
  Storage: import("../storage.js").ContentItemLinkStorage | import("../storage.js").UniqueLinkStorage | import("../storage.js").ErrorLinkStorage;
73
73
  Children: undefined;
74
74
  }, {
75
- to: Exclude<LinkToProp, string>;
75
+ on: Exclude<LinkToProp, string>;
76
76
  } & TagChildren & NoSnippet & NoToc>;
77
77
  }, undefined>;
78
78
  declare const _default: [{
@@ -92,7 +92,7 @@ declare const _default: [{
92
92
  Storage: import("../storage.js").ContentItemLinkStorage | import("../storage.js").UniqueLinkStorage | import("../storage.js").ErrorLinkStorage;
93
93
  Children: undefined;
94
94
  }, {
95
- to: Exclude<LinkToProp, string>;
95
+ on: Exclude<LinkToProp, string>;
96
96
  } & TagChildren & NoSnippet & NoToc>;
97
97
  }, undefined>;
98
98
  }, {
@@ -112,7 +112,7 @@ declare const _default: [{
112
112
  Storage: import("../storage.js").ContentItemLinkStorage | import("../storage.js").UniqueLinkStorage | import("../storage.js").ErrorLinkStorage;
113
113
  Children: undefined;
114
114
  }, {
115
- to: Exclude<LinkToProp, string>;
115
+ on: Exclude<LinkToProp, string>;
116
116
  } & TagChildren & NoSnippet & NoToc>;
117
117
  }, undefined>;
118
118
  }];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@erudit-js/prose",
4
- "version": "4.1.0",
4
+ "version": "4.1.1",
5
5
  "description": "📝 JSX prose subsystem for Erudit sites",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
@@ -32,7 +32,7 @@
32
32
  "prepack": "bun run build"
33
33
  },
34
34
  "dependencies": {
35
- "@erudit-js/core": "4.1.0",
35
+ "@erudit-js/core": "4.1.1",
36
36
  "@floating-ui/vue": "^1.1.10",
37
37
  "@jsprose/core": "^1.0.0",
38
38
  "image-size": "^2.0.2",