orgnote-api 0.41.49 → 0.41.50
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/api.d.ts +1 -1
- package/models/widget.d.ts +2 -0
- package/package.json +1 -1
package/api.d.ts
CHANGED
|
@@ -37,7 +37,7 @@ type WithNodeType<T> = {
|
|
|
37
37
|
* Use {@link WidgetType} to choose the variant:
|
|
38
38
|
* - `Inline` — decorates a single inline node (mark, replace, or widget decoration).
|
|
39
39
|
* - `Multiline` — replaces an entire block node with a custom view.
|
|
40
|
-
* - `LineClass` — attaches
|
|
40
|
+
* - `LineClass` — attaches CSS classes and DOM attributes to a line containing the target node.
|
|
41
41
|
*
|
|
42
42
|
* @see {@link InlineEmbeddedWidget}
|
|
43
43
|
* @see {@link MultilineEmbeddedWidget}
|
package/models/widget.d.ts
CHANGED
|
@@ -50,9 +50,11 @@ export interface InlineEmbeddedWidget extends CommonEmbeddedWidget {
|
|
|
50
50
|
export type InlineEmbeddedWidgets = {
|
|
51
51
|
[key in NodeType]?: InlineEmbeddedWidget[];
|
|
52
52
|
};
|
|
53
|
+
export type LineAttributes = Record<string, string>;
|
|
53
54
|
export interface OrgLineClass {
|
|
54
55
|
id: string;
|
|
55
56
|
class: string | ((orgNode: OrgNode) => string);
|
|
57
|
+
attributes?: LineAttributes | ((orgNode: OrgNode) => LineAttributes | undefined);
|
|
56
58
|
priority?: number;
|
|
57
59
|
}
|
|
58
60
|
export type OrgLineClasses = {
|