orgnote-api 0.41.17 → 0.41.18

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.
@@ -165,6 +165,8 @@ export declare enum i18n {
165
165
  AUTH_REMOVE_ACCOUNT_DESCRIPTION = "permanently delete your account",
166
166
  AUTH_GROUP = "auth",
167
167
  TABS_COUNT = "tabsCount",
168
+ TODAY = "today",
169
+ YESTERDAY = "yesterday",
168
170
  TOC_NO_ACTIVE_DOCUMENT = "no active document",
169
171
  TOC_NO_HEADLINES_FOUND = "no headlines found",
170
172
  PICK_NOTE_TO_LINK = "pick note to link",
@@ -458,6 +460,8 @@ export declare const I18N: {
458
460
  AUTH_REMOVE_ACCOUNT_DESCRIPTION: i18n.AUTH_REMOVE_ACCOUNT_DESCRIPTION;
459
461
  AUTH_GROUP: i18n.AUTH_GROUP;
460
462
  TABS_COUNT: i18n.TABS_COUNT;
463
+ TODAY: i18n.TODAY;
464
+ YESTERDAY: i18n.YESTERDAY;
461
465
  TOC_NO_ACTIVE_DOCUMENT: i18n.TOC_NO_ACTIVE_DOCUMENT;
462
466
  TOC_NO_HEADLINES_FOUND: i18n.TOC_NO_HEADLINES_FOUND;
463
467
  PICK_NOTE_TO_LINK: i18n.PICK_NOTE_TO_LINK;
@@ -173,6 +173,8 @@ export var i18n;
173
173
  i18n["AUTH_GROUP"] = "auth";
174
174
  // Tabs
175
175
  i18n["TABS_COUNT"] = "tabsCount";
176
+ i18n["TODAY"] = "today";
177
+ i18n["YESTERDAY"] = "yesterday";
176
178
  // TOC
177
179
  i18n["TOC_NO_ACTIVE_DOCUMENT"] = "no active document";
178
180
  i18n["TOC_NO_HEADLINES_FOUND"] = "no headlines found";
@@ -1,5 +1,6 @@
1
1
  import { MaybeRefOrGetter } from 'vue';
2
2
  import type { CommandIcon } from './command.js';
3
+ import type { VueComponent } from './vue-component.js';
3
4
  export interface CompletionCandidate<T = unknown> {
4
5
  icon?: MaybeRefOrGetter<CommandIcon | undefined>;
5
6
  group?: MaybeRefOrGetter<string | undefined>;
@@ -13,13 +14,26 @@ export interface CompletionSearchResult<T = unknown> {
13
14
  result: CompletionCandidate<T>[];
14
15
  }
15
16
  export type CandidateGetterFn<T = unknown> = (filter: string, limit?: number, offset?: number) => CompletionSearchResult<T> | Promise<CompletionSearchResult<T>>;
17
+ export interface CompletionItemRendererProps<T = unknown> {
18
+ candidate: CompletionCandidate<T>;
19
+ index: number;
20
+ selected: boolean;
21
+ searchQuery: string;
22
+ onSelect: () => void;
23
+ }
24
+ export type CompletionItemRenderer<T = unknown> = VueComponent & {
25
+ new (): {
26
+ $props: CompletionItemRendererProps<T>;
27
+ };
28
+ };
16
29
  export interface CompletionConfig<T = unknown> {
17
30
  name?: string;
18
31
  searchAutocompletions?: string[];
19
32
  itemsGetter: CandidateGetterFn<T>;
20
33
  type?: 'input' | 'choice' | 'input-choice';
21
34
  placeholder?: string;
22
- itemHeight?: string;
35
+ itemHeight?: number;
36
+ itemRenderer?: CompletionItemRenderer<T>;
23
37
  searchText?: string;
24
38
  onClicked?: (candidate: CompletionCandidate<T>) => void;
25
39
  }
@@ -17,6 +17,7 @@ export declare const ORG_NOTE_CONFIG_SCHEMA: import("valibot").SchemaWithPipe<re
17
17
  readonly showGroup: import("valibot").BooleanSchema<undefined>;
18
18
  readonly defaultCompletionLimit: import("valibot").NumberSchema<undefined>;
19
19
  readonly fuseThreshold: import("valibot").OptionalSchema<import("valibot").NumberSchema<undefined>, undefined>;
20
+ readonly showDetails: import("valibot").OptionalSchema<import("valibot").BooleanSchema<undefined>, undefined>;
20
21
  }, undefined>;
21
22
  readonly system: import("valibot").ObjectSchema<{
22
23
  readonly language: import("valibot").StringSchema<undefined>;
@@ -19,6 +19,7 @@ export const ORG_NOTE_CONFIG_SCHEMA = pipe(objectWithRest({
19
19
  showGroup: boolean(),
20
20
  defaultCompletionLimit: number(),
21
21
  fuseThreshold: optional(number()),
22
+ showDetails: optional(boolean()),
22
23
  }),
23
24
  system: object({
24
25
  language: string(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orgnote-api",
3
- "version": "0.41.17",
3
+ "version": "0.41.18",
4
4
  "description": "Official API for creating extensions for OrgNote app",
5
5
  "type": "module",
6
6
  "main": "./index.js",