orgnote-api 0.41.48 → 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 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 a CSS class to a line containing the target node.
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}
@@ -300,6 +300,8 @@ export declare const I18N: {
300
300
  OPEN_NOTE: DefaultCommands.OPEN_NOTE;
301
301
  SHOW_FILE_INFO: DefaultCommands.SHOW_FILE_INFO;
302
302
  OPEN_FILE_ACTIONS: DefaultCommands.OPEN_FILE_ACTIONS;
303
+ COPY_BUFFER_CONTENT: DefaultCommands.COPY_BUFFER_CONTENT;
304
+ CLEAR_NOTE: DefaultCommands.CLEAR_NOTE;
303
305
  TABS: DefaultCommands.TABS;
304
306
  SHOW_TAB_SWITCHER: DefaultCommands.SHOW_TAB_SWITCHER;
305
307
  CLOSE_TAB: DefaultCommands.CLOSE_TAB;
@@ -88,6 +88,8 @@ export declare enum DefaultCommands {
88
88
  OPEN_NOTE = "open note",
89
89
  SHOW_FILE_INFO = "show file info",
90
90
  OPEN_FILE_ACTIONS = "open file actions",
91
+ COPY_BUFFER_CONTENT = "copy buffer content",
92
+ CLEAR_NOTE = "clear note",
91
93
  TABS = "show tabs",
92
94
  SHOW_TAB_SWITCHER = "show tab switcher",
93
95
  CLOSE_TAB = "close tab",
@@ -104,6 +104,8 @@ export var DefaultCommands;
104
104
  DefaultCommands["OPEN_NOTE"] = "open note";
105
105
  DefaultCommands["SHOW_FILE_INFO"] = "show file info";
106
106
  DefaultCommands["OPEN_FILE_ACTIONS"] = "open file actions";
107
+ DefaultCommands["COPY_BUFFER_CONTENT"] = "copy buffer content";
108
+ DefaultCommands["CLEAR_NOTE"] = "clear note";
107
109
  // Windows & buffers
108
110
  DefaultCommands["TABS"] = "show tabs";
109
111
  DefaultCommands["SHOW_TAB_SWITCHER"] = "show tab switcher";
@@ -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 = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orgnote-api",
3
- "version": "0.41.48",
3
+ "version": "0.41.50",
4
4
  "description": "Official API for creating extensions for OrgNote app",
5
5
  "type": "module",
6
6
  "main": "./index.js",