delta-comic-core 0.0.3 → 0.0.4

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.
@@ -4,44 +4,61 @@ declare const defaultConfig: {
4
4
  'app.easyTitle': boolean;
5
5
  };
6
6
  export type ConfigType = typeof defaultConfig;
7
- export declare const useConfig: () => import('pinia').Store<"config", Pick<{
8
- appConfig: {
9
- "core.recordHistory": boolean;
10
- "core.showAIProject": boolean;
11
- "core.darkMode": string;
12
- "core.easilyTitle": boolean;
7
+ export type ConfigDescription = Record<string, Required<Pick<UniFormDescription, 'defaultValue'>> & UniFormDescription>;
8
+ export declare class ConfigPointer<T extends ConfigDescription = ConfigDescription> {
9
+ pluginName: string;
10
+ config: T;
11
+ constructor(pluginName: string, config: T);
12
+ readonly key: symbol;
13
+ }
14
+ export declare const appConfig: ConfigPointer<{
15
+ recordHistory: {
16
+ type: "switch";
17
+ defaultValue: false;
18
+ info: string;
13
19
  };
20
+ showAIProject: {
21
+ type: "switch";
22
+ defaultValue: true;
23
+ info: string;
24
+ };
25
+ darkMode: {
26
+ type: "radio";
27
+ defaultValue: string;
28
+ info: string;
29
+ comp: "select";
30
+ selects: {
31
+ label: string;
32
+ value: string;
33
+ }[];
34
+ };
35
+ easilyTitle: {
36
+ type: "switch";
37
+ defaultValue: false;
38
+ info: string;
39
+ };
40
+ }>;
41
+ export declare const useConfig: import('pinia').StoreDefinition<"config", Pick<{
14
42
  isDark: import('vue').ComputedRef<boolean>;
15
- form: import('vue').ShallowReactive<Map<string, {
16
- form: Record<string, UniFormDescription>;
43
+ form: import('vue').ShallowReactive<Map<symbol, {
44
+ form: ConfigDescription;
17
45
  value: Ref<any>;
18
46
  }>>;
19
- $useCustomConfig: <T extends Record<string, Required<Pick<UniFormDescription, "defaultValue">> & UniFormDescription>, TPlugin extends string>(plugin: TPlugin, desc: T) => { [K in keyof T as `${TPlugin}.${Extract<K, string>}`]: UniFormResult<T[K]>; };
20
- }, "form" | "appConfig">, Pick<{
21
- appConfig: {
22
- "core.recordHistory": boolean;
23
- "core.showAIProject": boolean;
24
- "core.darkMode": string;
25
- "core.easilyTitle": boolean;
26
- };
47
+ $load: <T extends ConfigPointer>(pointer: T) => { [K in keyof T["config"]]: UniFormResult<T["config"][K]>; };
48
+ }, "form">, Pick<{
27
49
  isDark: import('vue').ComputedRef<boolean>;
28
- form: import('vue').ShallowReactive<Map<string, {
29
- form: Record<string, UniFormDescription>;
50
+ form: import('vue').ShallowReactive<Map<symbol, {
51
+ form: ConfigDescription;
30
52
  value: Ref<any>;
31
53
  }>>;
32
- $useCustomConfig: <T extends Record<string, Required<Pick<UniFormDescription, "defaultValue">> & UniFormDescription>, TPlugin extends string>(plugin: TPlugin, desc: T) => { [K in keyof T as `${TPlugin}.${Extract<K, string>}`]: UniFormResult<T[K]>; };
54
+ $load: <T extends ConfigPointer>(pointer: T) => { [K in keyof T["config"]]: UniFormResult<T["config"][K]>; };
33
55
  }, "isDark">, Pick<{
34
- appConfig: {
35
- "core.recordHistory": boolean;
36
- "core.showAIProject": boolean;
37
- "core.darkMode": string;
38
- "core.easilyTitle": boolean;
39
- };
40
56
  isDark: import('vue').ComputedRef<boolean>;
41
- form: import('vue').ShallowReactive<Map<string, {
42
- form: Record<string, UniFormDescription>;
57
+ form: import('vue').ShallowReactive<Map<symbol, {
58
+ form: ConfigDescription;
43
59
  value: Ref<any>;
44
60
  }>>;
45
- $useCustomConfig: <T extends Record<string, Required<Pick<UniFormDescription, "defaultValue">> & UniFormDescription>, TPlugin extends string>(plugin: TPlugin, desc: T) => { [K in keyof T as `${TPlugin}.${Extract<K, string>}`]: UniFormResult<T[K]>; };
46
- }, "$useCustomConfig">>;
61
+ $load: <T extends ConfigPointer>(pointer: T) => { [K in keyof T["config"]]: UniFormResult<T["config"][K]>; };
62
+ }, "$load">>;
63
+ export declare const resignerConfig: (pointer: ConfigPointer) => void;
47
64
  export {};
@@ -0,0 +1,24 @@
1
+ import { uni } from '../struct';
2
+ import { Component } from 'vue';
3
+ import { Utils } from '..';
4
+ interface DependDefineConstraint<_T> {
5
+ }
6
+ export type DependDefine<T> = symbol & DependDefineConstraint<T>;
7
+ export declare const declareDependType: <T>(name: string) => DependDefine<T>;
8
+ export declare const requireDepend: <T>(define: DependDefine<T>) => T;
9
+ export declare const _pluginExposes: Map<symbol, any>;
10
+ export declare const coreModule: DependDefine<{
11
+ layout: Record<string, uni.content.ViewLayoutComp>;
12
+ view: Record<string, uni.content.ViewComp>;
13
+ comp: {
14
+ Comment: Component<{
15
+ item: uni.item.Item;
16
+ comments: Utils.data.RStream<uni.comment.Comment>;
17
+ }>;
18
+ ItemCard: uni.content.ItemCardComp;
19
+ FavouriteSelect: Component<{
20
+ item: uni.item.Item;
21
+ }>;
22
+ };
23
+ }>;
24
+ export {};