orgnote-api 0.41.8 → 0.41.10

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.
@@ -136,6 +136,7 @@ export declare enum i18n {
136
136
  CONFIRM_CLEAR_LOGS = "confirm clear logs",
137
137
  SYSTEM_INFO = "system info",
138
138
  FONTS = "fonts",
139
+ NOTIFICATIONS = "notifications",
139
140
  FILE_DELETED_EXTERNALLY = "file was deleted externally",
140
141
  BUFFER_READONLY = "buffer is read-only",
141
142
  IMAGE_LOAD_FAILED = "failed to load image",
@@ -408,6 +409,7 @@ export declare const I18N: {
408
409
  CONFIRM_CLEAR_LOGS: i18n.CONFIRM_CLEAR_LOGS;
409
410
  SYSTEM_INFO: i18n.SYSTEM_INFO;
410
411
  FONTS: i18n.FONTS;
412
+ NOTIFICATIONS: i18n.NOTIFICATIONS;
411
413
  FILE_DELETED_EXTERNALLY: i18n.FILE_DELETED_EXTERNALLY;
412
414
  BUFFER_READONLY: i18n.BUFFER_READONLY;
413
415
  IMAGE_LOAD_FAILED: i18n.IMAGE_LOAD_FAILED;
@@ -139,6 +139,7 @@ export var i18n;
139
139
  i18n["CONFIRM_CLEAR_LOGS"] = "confirm clear logs";
140
140
  i18n["SYSTEM_INFO"] = "system info";
141
141
  i18n["FONTS"] = "fonts";
142
+ i18n["NOTIFICATIONS"] = "notifications";
142
143
  // Buffer
143
144
  i18n["FILE_DELETED_EXTERNALLY"] = "file was deleted externally";
144
145
  i18n["BUFFER_READONLY"] = "buffer is read-only";
package/models/log.d.ts CHANGED
@@ -1,4 +1,6 @@
1
- export type LogLevel = 'error' | 'warn' | 'info' | 'debug' | 'trace';
1
+ import { type InferOutput } from 'valibot';
2
+ export declare const LOG_LEVEL_SCHEMA: import("valibot").UnionSchema<[import("valibot").LiteralSchema<"error", undefined>, import("valibot").LiteralSchema<"warn", undefined>, import("valibot").LiteralSchema<"info", undefined>, import("valibot").LiteralSchema<"debug", undefined>, import("valibot").LiteralSchema<"trace", undefined>], undefined>;
3
+ export type LogLevel = InferOutput<typeof LOG_LEVEL_SCHEMA>;
2
4
  export interface LogRecord {
3
5
  id?: number;
4
6
  ts: Date;
package/models/log.js CHANGED
@@ -1 +1,8 @@
1
- export {};
1
+ import { union, literal } from 'valibot';
2
+ export const LOG_LEVEL_SCHEMA = union([
3
+ literal('error'),
4
+ literal('warn'),
5
+ literal('info'),
6
+ literal('debug'),
7
+ literal('trace'),
8
+ ]);
@@ -30,6 +30,7 @@ export declare const ORG_NOTE_CONFIG_SCHEMA: import("valibot").SchemaWithPipe<re
30
30
  readonly lightThemeName: import("valibot").OptionalSchema<import("valibot").UnionSchema<[import("valibot").StringSchema<undefined>, import("valibot").LiteralSchema<any, undefined>], undefined>, undefined>;
31
31
  readonly enableAnimations: import("valibot").BooleanSchema<undefined>;
32
32
  readonly notificationTimeout: import("valibot").OptionalSchema<import("valibot").NumberSchema<undefined>, undefined>;
33
+ readonly minNotificationLevel: import("valibot").OptionalSchema<import("valibot").UnionSchema<[import("valibot").LiteralSchema<"error", undefined>, import("valibot").LiteralSchema<"warn", undefined>, import("valibot").LiteralSchema<"info", undefined>, import("valibot").LiteralSchema<"debug", undefined>, import("valibot").LiteralSchema<"trace", undefined>], undefined>, undefined>;
33
34
  readonly persistantPanes: import("valibot").OptionalSchema<import("valibot").BooleanSchema<undefined>, undefined>;
34
35
  readonly persistantPanesSaveDelay: import("valibot").NumberSchema<undefined>;
35
36
  readonly dropZoneEdgeRatio: import("valibot").NumberSchema<undefined>;
@@ -1,5 +1,6 @@
1
1
  import { object, boolean, number, string, union, optional, array, literal, pipe, unknown, objectWithRest, } from 'valibot';
2
2
  import { OrgNoteEncryptionSchema } from "./encryption.js";
3
+ import { LOG_LEVEL_SCHEMA } from "./log.js";
3
4
  export const ORG_NOTE_CONFIG_SCHEMA = pipe(objectWithRest({
4
5
  editor: object({
5
6
  showSpecialSymbols: boolean(),
@@ -31,6 +32,7 @@ export const ORG_NOTE_CONFIG_SCHEMA = pipe(objectWithRest({
31
32
  lightThemeName: optional(union([string(), literal(null)])),
32
33
  enableAnimations: boolean(),
33
34
  notificationTimeout: optional(number()),
35
+ minNotificationLevel: optional(LOG_LEVEL_SCHEMA),
34
36
  persistantPanes: optional(boolean()),
35
37
  persistantPanesSaveDelay: number(),
36
38
  dropZoneEdgeRatio: number(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orgnote-api",
3
- "version": "0.41.8",
3
+ "version": "0.41.10",
4
4
  "description": "Official API for creating extensions for OrgNote app",
5
5
  "type": "module",
6
6
  "main": "./index.js",