@yaakapp/api 0.6.4 → 0.6.6
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/README.md +1 -1
- package/lib/bindings/gen_events.d.ts +66 -1
- package/lib/plugins/ThemePlugin.d.ts +2 -7
- package/lib/plugins/index.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -462,6 +462,10 @@ export type GetTemplateFunctionsResponse = {
|
|
|
462
462
|
functions: Array<TemplateFunction>;
|
|
463
463
|
pluginRefId: string;
|
|
464
464
|
};
|
|
465
|
+
export type GetThemesRequest = Record<string, never>;
|
|
466
|
+
export type GetThemesResponse = {
|
|
467
|
+
themes: Array<Theme>;
|
|
468
|
+
};
|
|
465
469
|
export type HttpAuthenticationAction = {
|
|
466
470
|
label: string;
|
|
467
471
|
icon?: Icon;
|
|
@@ -505,7 +509,7 @@ export type InternalEventPayload = {
|
|
|
505
509
|
"type": "reload_request";
|
|
506
510
|
} & EmptyPayload | {
|
|
507
511
|
"type": "reload_response";
|
|
508
|
-
} &
|
|
512
|
+
} & BootResponse | {
|
|
509
513
|
"type": "terminate_request";
|
|
510
514
|
} | {
|
|
511
515
|
"type": "terminate_response";
|
|
@@ -612,6 +616,10 @@ export type InternalEventPayload = {
|
|
|
612
616
|
} & FindHttpResponsesRequest | {
|
|
613
617
|
"type": "find_http_responses_response";
|
|
614
618
|
} & FindHttpResponsesResponse | {
|
|
619
|
+
"type": "get_themes_request";
|
|
620
|
+
} & GetThemesRequest | {
|
|
621
|
+
"type": "get_themes_response";
|
|
622
|
+
} & GetThemesResponse | {
|
|
615
623
|
"type": "empty_response";
|
|
616
624
|
} & EmptyPayload | {
|
|
617
625
|
"type": "error_response";
|
|
@@ -706,6 +714,63 @@ export type TemplateRenderRequest = {
|
|
|
706
714
|
export type TemplateRenderResponse = {
|
|
707
715
|
data: JsonValue;
|
|
708
716
|
};
|
|
717
|
+
export type Theme = {
|
|
718
|
+
/**
|
|
719
|
+
* How the theme is identified. This should never be changed
|
|
720
|
+
*/
|
|
721
|
+
id: string;
|
|
722
|
+
/**
|
|
723
|
+
* The friendly name of the theme to be displayed to the user
|
|
724
|
+
*/
|
|
725
|
+
label: string;
|
|
726
|
+
/**
|
|
727
|
+
* Whether the theme will be used for dark or light appearance
|
|
728
|
+
*/
|
|
729
|
+
dark: boolean;
|
|
730
|
+
/**
|
|
731
|
+
* The default top-level colors for the theme
|
|
732
|
+
*/
|
|
733
|
+
base: ThemeComponentColors;
|
|
734
|
+
/**
|
|
735
|
+
* Optionally override theme for individual UI components for more control
|
|
736
|
+
*/
|
|
737
|
+
components?: ThemeComponents;
|
|
738
|
+
};
|
|
739
|
+
export type ThemeComponentColors = {
|
|
740
|
+
surface?: string;
|
|
741
|
+
surfaceHighlight?: string;
|
|
742
|
+
surfaceActive?: string;
|
|
743
|
+
text?: string;
|
|
744
|
+
textSubtle?: string;
|
|
745
|
+
textSubtlest?: string;
|
|
746
|
+
border?: string;
|
|
747
|
+
borderSubtle?: string;
|
|
748
|
+
borderFocus?: string;
|
|
749
|
+
shadow?: string;
|
|
750
|
+
backdrop?: string;
|
|
751
|
+
selection?: string;
|
|
752
|
+
primary?: string;
|
|
753
|
+
secondary?: string;
|
|
754
|
+
info?: string;
|
|
755
|
+
success?: string;
|
|
756
|
+
notice?: string;
|
|
757
|
+
warning?: string;
|
|
758
|
+
danger?: string;
|
|
759
|
+
};
|
|
760
|
+
export type ThemeComponents = {
|
|
761
|
+
dialog?: ThemeComponentColors;
|
|
762
|
+
menu?: ThemeComponentColors;
|
|
763
|
+
toast?: ThemeComponentColors;
|
|
764
|
+
sidebar?: ThemeComponentColors;
|
|
765
|
+
responsePane?: ThemeComponentColors;
|
|
766
|
+
appHeader?: ThemeComponentColors;
|
|
767
|
+
button?: ThemeComponentColors;
|
|
768
|
+
banner?: ThemeComponentColors;
|
|
769
|
+
templateTag?: ThemeComponentColors;
|
|
770
|
+
urlBar?: ThemeComponentColors;
|
|
771
|
+
editor?: ThemeComponentColors;
|
|
772
|
+
input?: ThemeComponentColors;
|
|
773
|
+
};
|
|
709
774
|
export type WindowNavigateEvent = {
|
|
710
775
|
url: string;
|
|
711
776
|
};
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export type ThemePlugin = {
|
|
4
|
-
name: string;
|
|
5
|
-
description?: string;
|
|
6
|
-
getTheme(ctx: Context, fileContents: string): Promise<Index>;
|
|
7
|
-
};
|
|
1
|
+
import { Theme } from '../bindings/gen_events';
|
|
2
|
+
export type ThemePlugin = Theme;
|
package/lib/plugins/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export type { Context } from './Context';
|
|
|
10
10
|
*/
|
|
11
11
|
export type PluginDefinition = {
|
|
12
12
|
importer?: ImporterPlugin;
|
|
13
|
-
|
|
13
|
+
themes?: ThemePlugin[];
|
|
14
14
|
filter?: FilterPlugin;
|
|
15
15
|
authentication?: AuthenticationPlugin;
|
|
16
16
|
httpRequestActions?: HttpRequestActionPlugin[];
|