@pc-nexus/models 0.8.0-next.6 → 0.8.0-next.8
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.
|
@@ -52,6 +52,11 @@ var WorkitemTypeGroup;
|
|
|
52
52
|
WorkitemTypeGroup[WorkitemTypeGroup["Plan"] = 5] = "Plan";
|
|
53
53
|
})(WorkitemTypeGroup || (WorkitemTypeGroup = {}));
|
|
54
54
|
|
|
55
|
+
const NX_BUTTON_TYPE = ["primary", "info", "danger", "warning", "success"];
|
|
56
|
+
const NX_BUTTON_SIZE = ["xs", "sm", "md", "default", "lg"];
|
|
57
|
+
const NX_BUTTON_GROUP_SIZE = ["xs", "sm", "md", "lg"];
|
|
58
|
+
const NX_BUTTON_GROUP_TYPE = ["primary", "outline-default", "outline-primary"];
|
|
59
|
+
|
|
55
60
|
const NX_HEADING_AS = ["h1", "h2", "h3", "h4", "h5", "h6"];
|
|
56
61
|
|
|
57
62
|
const NX_TEXT_AS = ["em", "p", "span", "strong", "strike"];
|
|
@@ -66,5 +71,5 @@ const NX_TEXT_WEIGHT = ["bold", "medium", "regular", "semibold"];
|
|
|
66
71
|
* Generated bundle index. Do not edit.
|
|
67
72
|
*/
|
|
68
73
|
|
|
69
|
-
export { HOST_DISPATCH_NATIVE_UI_EVENT, HistoryAction, NEXUS_CONFIG_READY_EVENT, NEXUS_CONTENT_CHANGE_EVENT, NEXUS_CONTENT_UPDATE_EVENT, NEXUS_EXTENSION_DATA_CONFIG_CHANGED, NX_HEADING_AS, NX_TEXT_ALIGN, NX_TEXT_AS, NX_TEXT_WEIGHT, NavigationTarget, NexusAppEnvironment, NotifyType, SUPPORTED_LOCALE_CODES, WorkitemTypeGroup };
|
|
74
|
+
export { HOST_DISPATCH_NATIVE_UI_EVENT, HistoryAction, NEXUS_CONFIG_READY_EVENT, NEXUS_CONTENT_CHANGE_EVENT, NEXUS_CONTENT_UPDATE_EVENT, NEXUS_EXTENSION_DATA_CONFIG_CHANGED, NX_BUTTON_GROUP_SIZE, NX_BUTTON_GROUP_TYPE, NX_BUTTON_SIZE, NX_BUTTON_TYPE, NX_HEADING_AS, NX_TEXT_ALIGN, NX_TEXT_AS, NX_TEXT_WEIGHT, NavigationTarget, NexusAppEnvironment, NotifyType, SUPPORTED_LOCALE_CODES, WorkitemTypeGroup };
|
|
70
75
|
//# sourceMappingURL=pc-nexus-models.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pc-nexus-models.mjs","sources":["../../../../web/models/src/environment.ts","../../../../web/models/src/events.ts","../../../../web/models/src/locale.ts","../../../../web/models/src/navigation.ts","../../../../web/models/src/notify.ts","../../../../web/models/src/richtext.ts","../../../../web/models/src/v-dom.ts","../../../../web/models/src/view.ts","../../../../web/models/src/workitem.ts","../../../../web/models/src/components/heading.ts","../../../../web/models/src/components/text.ts","../../../../web/models/src/public-api.ts","../../../../web/models/src/pc-nexus-models.ts"],"sourcesContent":["export enum NexusAppEnvironment {\n Development = \"development\",\n Production = \"production\",\n}\n","export const NEXUS_EXTENSION_DATA_CONFIG_CHANGED = \"NEXUS_EXTENSION_DATA_CONFIG_CHANGED\";\n\nexport interface Subscription {\n unsubscribe: () => void;\n}\n","export const SUPPORTED_LOCALE_CODES = [\"zh-CN\", \"en-US\"] as const;\n\nexport type SupportedLocaleCode = (typeof SUPPORTED_LOCALE_CODES)[number];\n\nexport interface Translator {\n translate: (key: string, params?: Record<string, any>) => TranslationsResourceContent | string;\n}\nexport interface GetTranslationsResult {\n locale: SupportedLocaleCode;\n translations: TranslationsResourceContent | null;\n}\n\nexport interface TranslationsResourceContent {\n [key: string]: string | TranslationsResourceContent;\n}\n","export enum NavigationTarget {\n Workitem = \"workitem\",\n Testcase = \"testcase\",\n Page = \"page\",\n Idea = \"idea\",\n Ticket = \"ticket\",\n Project = \"project\",\n Library = \"library\",\n Space = \"space\",\n Product = \"product\",\n}\n\ninterface NavigationTargetParams {\n target: NavigationTarget;\n id: string;\n}\n\nexport type NavigationLocation = NavigationTargetParams;\n","export enum NotifyType {\n Success = \"success\",\n Error = \"error\",\n Warning = \"warning\",\n Info = \"info\",\n}\n\nexport interface NotifyOptions {\n type: NotifyType;\n title?: string;\n description?: string;\n detail?: string | NotifyDetail;\n actions?: NotifyAction[];\n isAutoClose?: boolean;\n}\n\nexport interface NotifyRef {\n readonly close: () => void;\n}\n\nexport interface NotifyDetail {\n link?: string;\n content?: string;\n}\n\nexport interface NotifyAction {\n text: string;\n icon?: string;\n onClick: (event?: Event) => void;\n}\n","export const NEXUS_CONTENT_UPDATE_EVENT = \"nexus:content:update\";\nexport const NEXUS_CONTENT_CHANGE_EVENT = \"nexus:content:change\";\nexport const NEXUS_CONFIG_READY_EVENT = \"nexus:config:ready\";\n\nexport interface RichtextText {\n text: string;\n [key: string]: unknown;\n}\n\nexport interface RichtextElement {\n type: string;\n children: (RichtextDescendant | RichtextText)[];\n [key: string]: unknown;\n}\n\nexport type RichtextDescendant = RichtextElement;\nexport type RichtextContent = RichtextDescendant[];\n\nexport interface RichtextRendererRef {\n readonly iframe: HTMLIFrameElement;\n readonly update: (content: RichtextContent) => void;\n}\n\nexport interface RichtextEditorRef extends RichtextRendererRef {\n readonly destroy: () => void;\n}\n\nexport interface RichtextRendererOptions {\n content?: RichtextContent;\n}\n\nexport interface RichtextEditorOptions extends RichtextRendererOptions {\n onContentChange?: (content: RichtextContent) => void;\n}\n\nexport interface RichtextBridgeMessage {\n type: string;\n content?: any;\n timestamp?: number;\n source?: string;\n readonly?: boolean;\n}\n","export interface VirtualNodeSnapshot {\n kind: string;\n id: number;\n tagName?: string;\n namespace?: string | null;\n value?: string;\n attributes?: Record<string, string>;\n classes?: string[];\n styles?: Record<string, VirtualStyle>;\n properties?: Record<string, unknown>;\n listeners?: VirtualListener[];\n children?: VirtualNodeSnapshot[];\n /**\n * Host 侧投影复用:父组件含 ng-content 时预创建的 DOM 节点(元素宿主或文本)。\n */\n hostNode?: Node;\n}\n\nexport interface SupportedFrontendFramework {\n name: \"react\" | \"angular\";\n version: string;\n}\n\nexport interface ReconcilePayload {\n version: number;\n snapshot: VirtualNodeSnapshot;\n}\n\nexport interface VirtualStyle {\n value: string;\n flags?: number;\n}\n\nexport interface VirtualListener {\n name: string;\n id: string;\n options?: unknown;\n}\n\nexport interface DispatchEventPayload {\n id: string;\n name: string;\n nodeId: number;\n /** 组件 output 等场景下的回调参数(如 Switch 的 checked 值) */\n detail?: unknown;\n}\n\n/** Host → Child:派发虚拟 DOM 节点事件 */\nexport const HOST_DISPATCH_NATIVE_UI_EVENT = \"hostDispatchToNativeUiEvent\";\n","export enum HistoryAction {\n Pop = \"POP\",\n Push = \"PUSH\",\n Replace = \"REPLACE\",\n}\n\nexport interface HistoryPath {\n pathname: string;\n search: string;\n hash: string;\n}\n\nexport type HistoryTo = string | Partial<HistoryPath>;\n\nexport type HistoryState = unknown;\n\nexport interface HistoryLocation extends HistoryPath {\n state: HistoryState;\n}\n\nexport interface HistoryUpdate {\n action: HistoryAction;\n location: HistoryLocation;\n}\n\nexport interface HistoryListener {\n (update: HistoryUpdate): void;\n}\n\nexport type UnlistenCallback = () => void;\n\nexport interface NexusHistory {\n action: HistoryAction;\n location: HistoryLocation;\n push(to: HistoryTo, state?: HistoryState): void;\n replace(to: HistoryTo, state?: HistoryState): void;\n go(delta: number): void;\n back(): void;\n forward(): void;\n listen(listener: HistoryListener): Promise<UnlistenCallback>;\n}\n","export enum WorkitemTypeGroup {\n Requirement = 1,\n Task = 2,\n Bug = 3,\n Issue = 4,\n Plan = 5,\n}\n\nexport interface Workitem {\n id: string;\n short_id: string;\n identifier: string;\n title: string;\n type_group?: WorkitemTypeGroup;\n type_id?: string;\n}\n\nexport interface WorkitemOpenCreateOptions {\n defaultValues?: {\n title?: string;\n project_id?: string;\n description?: string;\n };\n onSuccess?: (payload: Workitem) => void;\n}\n","export const NX_HEADING_AS = [\"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\"] as const;\n\nexport type NxHeadingAs = (typeof NX_HEADING_AS)[number];\n\nexport interface NxHeadingInputs {\n as?: NxHeadingAs;\n}\n","export const NX_TEXT_AS = [\"em\", \"p\", \"span\", \"strong\", \"strike\"] as const;\n\nexport type NxTextAs = (typeof NX_TEXT_AS)[number];\n\nexport const NX_TEXT_ALIGN = [\"center\", \"start\", \"end\"] as const;\n\nexport type NxTextAlign = (typeof NX_TEXT_ALIGN)[number];\n\nexport const NX_TEXT_WEIGHT = [\"bold\", \"medium\", \"regular\", \"semibold\"] as const;\n\nexport type NxTextWeight = (typeof NX_TEXT_WEIGHT)[number];\n\nexport interface NxTextInputs {\n as?: NxTextAs;\n align?: NxTextAlign;\n weight?: NxTextWeight;\n}\n","/*\n * Public API Surface of models\n */\n\nexport * from \"./api\";\nexport * from \"./baseline\";\nexport * from \"./condition\";\nexport * from \"./context\";\nexport * from \"./dialog\";\nexport * from \"./environment\";\nexport * from \"./events\";\nexport * from \"./extension\";\nexport * from \"./idea\";\nexport * from \"./invoke\";\nexport * from \"./locale\";\nexport * from \"./navigation\";\nexport * from \"./notify\";\nexport * from \"./page\";\nexport * from \"./processor\";\nexport * from \"./remote\";\nexport * from \"./richtext\";\nexport * from \"./store\";\nexport * from \"./testcase\";\nexport * from \"./ticket\";\nexport * from \"./user\";\nexport * from \"./v-dom\";\nexport * from \"./view\";\nexport * from \"./viewport\";\nexport * from \"./workitem\";\nexport * from \"./components\";\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"IAAY;AAAZ,CAAA,UAAY,mBAAmB,EAAA;AAC3B,IAAA,mBAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAC3B,IAAA,mBAAA,CAAA,YAAA,CAAA,GAAA,YAAyB;AAC7B,CAAC,EAHW,mBAAmB,KAAnB,mBAAmB,GAAA,EAAA,CAAA,CAAA;;ACAxB,MAAM,mCAAmC,GAAG;;MCAtC,sBAAsB,GAAG,CAAC,OAAO,EAAE,OAAO;;ICA3C;AAA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AA;AACzB,IAAA,iBAAA,CAAA,iBAAA,CAAA,aAAA,CAAA,GAAA,CAAA,CAAA,GAAA,aAAe;AACf,IAAA,iBAAA,CAAA,iBAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAQ;AACR,IAAA,iBAAA,CAAA,iBAAA,CAAA,KAAA,CAAA,GAAA,CAAA,CAAA,GAAA,KAAO;AACP,IAAA,iBAAA,CAAA,iBAAA,CAAA,OAAA,CAAA,GAAA,CAAA,CAAA,GAAA,OAAS;AACT,IAAA,iBAAA,CAAA,iBAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAQ;AACZ,CAAC,EANW,iBAAiB,KAAjB,iBAAiB,GAAA,EAAA,CAAA,CAAA;;ACAtB,MAAM,aAAa,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;;ACAzD,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ;AAIzD,MAAM,aAAa,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK;AAI/C,MAAM,cAAc,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU;;ACRtE;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"pc-nexus-models.mjs","sources":["../../../../web/models/src/environment.ts","../../../../web/models/src/events.ts","../../../../web/models/src/locale.ts","../../../../web/models/src/navigation.ts","../../../../web/models/src/notify.ts","../../../../web/models/src/richtext.ts","../../../../web/models/src/v-dom.ts","../../../../web/models/src/view.ts","../../../../web/models/src/workitem.ts","../../../../web/models/src/components/button.ts","../../../../web/models/src/components/heading.ts","../../../../web/models/src/components/text.ts","../../../../web/models/src/public-api.ts","../../../../web/models/src/pc-nexus-models.ts"],"sourcesContent":["export enum NexusAppEnvironment {\n Development = \"development\",\n Production = \"production\",\n}\n","export const NEXUS_EXTENSION_DATA_CONFIG_CHANGED = \"NEXUS_EXTENSION_DATA_CONFIG_CHANGED\";\n\nexport interface Subscription {\n unsubscribe: () => void;\n}\n","export const SUPPORTED_LOCALE_CODES = [\"zh-CN\", \"en-US\"] as const;\n\nexport type SupportedLocaleCode = (typeof SUPPORTED_LOCALE_CODES)[number];\n\nexport interface Translator {\n translate: (key: string, params?: Record<string, any>) => TranslationsResourceContent | string;\n}\nexport interface GetTranslationsResult {\n locale: SupportedLocaleCode;\n translations: TranslationsResourceContent | null;\n}\n\nexport interface TranslationsResourceContent {\n [key: string]: string | TranslationsResourceContent;\n}\n","export enum NavigationTarget {\n Workitem = \"workitem\",\n Testcase = \"testcase\",\n Page = \"page\",\n Idea = \"idea\",\n Ticket = \"ticket\",\n Project = \"project\",\n Library = \"library\",\n Space = \"space\",\n Product = \"product\",\n}\n\ninterface NavigationTargetParams {\n target: NavigationTarget;\n id: string;\n}\n\nexport type NavigationLocation = NavigationTargetParams;\n","export enum NotifyType {\n Success = \"success\",\n Error = \"error\",\n Warning = \"warning\",\n Info = \"info\",\n}\n\nexport interface NotifyOptions {\n type: NotifyType;\n title?: string;\n description?: string;\n detail?: string | NotifyDetail;\n actions?: NotifyAction[];\n isAutoClose?: boolean;\n}\n\nexport interface NotifyRef {\n readonly close: () => void;\n}\n\nexport interface NotifyDetail {\n link?: string;\n content?: string;\n}\n\nexport interface NotifyAction {\n text: string;\n icon?: string;\n onClick: (event?: Event) => void;\n}\n","export const NEXUS_CONTENT_UPDATE_EVENT = \"nexus:content:update\";\nexport const NEXUS_CONTENT_CHANGE_EVENT = \"nexus:content:change\";\nexport const NEXUS_CONFIG_READY_EVENT = \"nexus:config:ready\";\n\nexport interface RichtextText {\n text: string;\n [key: string]: unknown;\n}\n\nexport interface RichtextElement {\n type: string;\n children: (RichtextDescendant | RichtextText)[];\n [key: string]: unknown;\n}\n\nexport type RichtextDescendant = RichtextElement;\nexport type RichtextContent = RichtextDescendant[];\n\nexport interface RichtextRendererRef {\n readonly iframe: HTMLIFrameElement;\n readonly update: (content: RichtextContent) => void;\n}\n\nexport interface RichtextEditorRef extends RichtextRendererRef {\n readonly destroy: () => void;\n}\n\nexport interface RichtextRendererOptions {\n content?: RichtextContent;\n}\n\nexport interface RichtextEditorOptions extends RichtextRendererOptions {\n onContentChange?: (content: RichtextContent) => void;\n}\n\nexport interface RichtextBridgeMessage {\n type: string;\n content?: any;\n timestamp?: number;\n source?: string;\n readonly?: boolean;\n}\n","export interface VirtualNodeSnapshot {\n kind: string;\n id: number;\n tagName?: string;\n namespace?: string | null;\n value?: string;\n attributes?: Record<string, string>;\n classes?: string[];\n styles?: Record<string, VirtualStyle>;\n properties?: Record<string, unknown>;\n listeners?: VirtualListener[];\n children?: VirtualNodeSnapshot[];\n /**\n * Host 侧投影复用:父组件含 ng-content 时预创建的 DOM 节点(元素宿主或文本)。\n */\n hostNode?: Node;\n}\n\nexport interface SupportedFrontendFramework {\n name: \"react\" | \"angular\";\n version: string;\n}\n\nexport interface ReconcilePayload {\n version: number;\n snapshot: VirtualNodeSnapshot;\n}\n\nexport interface VirtualStyle {\n value: string;\n flags?: number;\n}\n\nexport interface VirtualListener {\n name: string;\n id: string;\n options?: unknown;\n}\n\nexport interface DispatchEventPayload {\n id: string;\n name: string;\n nodeId: number;\n /** 组件 output / 表单 valueChange 等场景下的回调参数 */\n detail?: unknown;\n}\n\n/** Host → Child:派发虚拟 DOM 节点事件 */\nexport const HOST_DISPATCH_NATIVE_UI_EVENT = \"hostDispatchToNativeUiEvent\";\n","export enum HistoryAction {\n Pop = \"POP\",\n Push = \"PUSH\",\n Replace = \"REPLACE\",\n}\n\nexport interface HistoryPath {\n pathname: string;\n search: string;\n hash: string;\n}\n\nexport type HistoryTo = string | Partial<HistoryPath>;\n\nexport type HistoryState = unknown;\n\nexport interface HistoryLocation extends HistoryPath {\n state: HistoryState;\n}\n\nexport interface HistoryUpdate {\n action: HistoryAction;\n location: HistoryLocation;\n}\n\nexport interface HistoryListener {\n (update: HistoryUpdate): void;\n}\n\nexport type UnlistenCallback = () => void;\n\nexport interface NexusHistory {\n action: HistoryAction;\n location: HistoryLocation;\n push(to: HistoryTo, state?: HistoryState): void;\n replace(to: HistoryTo, state?: HistoryState): void;\n go(delta: number): void;\n back(): void;\n forward(): void;\n listen(listener: HistoryListener): Promise<UnlistenCallback>;\n}\n","export enum WorkitemTypeGroup {\n Requirement = 1,\n Task = 2,\n Bug = 3,\n Issue = 4,\n Plan = 5,\n}\n\nexport interface Workitem {\n id: string;\n short_id: string;\n identifier: string;\n title: string;\n type_group?: WorkitemTypeGroup;\n type_id?: string;\n}\n\nexport interface WorkitemOpenCreateOptions {\n defaultValues?: {\n title?: string;\n project_id?: string;\n description?: string;\n };\n onSuccess?: (payload: Workitem) => void;\n}\n","export const NX_BUTTON_TYPE = [\"primary\", \"info\", \"danger\", \"warning\", \"success\"] as const;\n\nexport type NxButtonType = (typeof NX_BUTTON_TYPE)[number];\n\nexport const NX_BUTTON_SIZE = [\"xs\", \"sm\", \"md\", \"default\", \"lg\"] as const;\n\nexport type NxButtonSize = (typeof NX_BUTTON_SIZE)[number];\n\nexport interface NxButtonInputs {\n type?: NxButtonType;\n size?: NxButtonSize;\n icon?: string;\n block?: boolean;\n}\n\nexport const NX_BUTTON_GROUP_SIZE = [\"xs\", \"sm\", \"md\", \"lg\"] as const;\n\nexport type NxButtonGroupSize = (typeof NX_BUTTON_GROUP_SIZE)[number];\n\nexport const NX_BUTTON_GROUP_TYPE = [\"primary\", \"outline-default\", \"outline-primary\"] as const;\n\nexport type NxButtonGroupType = (typeof NX_BUTTON_GROUP_TYPE)[number];\n\nexport interface NxButtonGroupInputs {\n size?: NxButtonGroupSize;\n type?: NxButtonGroupType;\n}\n","export const NX_HEADING_AS = [\"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\"] as const;\n\nexport type NxHeadingAs = (typeof NX_HEADING_AS)[number];\n\nexport interface NxHeadingInputs {\n as?: NxHeadingAs;\n}\n","export const NX_TEXT_AS = [\"em\", \"p\", \"span\", \"strong\", \"strike\"] as const;\n\nexport type NxTextAs = (typeof NX_TEXT_AS)[number];\n\nexport const NX_TEXT_ALIGN = [\"center\", \"start\", \"end\"] as const;\n\nexport type NxTextAlign = (typeof NX_TEXT_ALIGN)[number];\n\nexport const NX_TEXT_WEIGHT = [\"bold\", \"medium\", \"regular\", \"semibold\"] as const;\n\nexport type NxTextWeight = (typeof NX_TEXT_WEIGHT)[number];\n\nexport interface NxTextInputs {\n as?: NxTextAs;\n align?: NxTextAlign;\n weight?: NxTextWeight;\n}\n","/*\n * Public API Surface of models\n */\n\nexport * from \"./api\";\nexport * from \"./baseline\";\nexport * from \"./condition\";\nexport * from \"./context\";\nexport * from \"./dialog\";\nexport * from \"./environment\";\nexport * from \"./events\";\nexport * from \"./extension\";\nexport * from \"./idea\";\nexport * from \"./invoke\";\nexport * from \"./locale\";\nexport * from \"./navigation\";\nexport * from \"./notify\";\nexport * from \"./page\";\nexport * from \"./processor\";\nexport * from \"./remote\";\nexport * from \"./richtext\";\nexport * from \"./store\";\nexport * from \"./testcase\";\nexport * from \"./ticket\";\nexport * from \"./user\";\nexport * from \"./v-dom\";\nexport * from \"./view\";\nexport * from \"./viewport\";\nexport * from \"./workitem\";\nexport * from \"./components\";\nexport * from \"./realtime\";\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"IAAY;AAAZ,CAAA,UAAY,mBAAmB,EAAA;AAC3B,IAAA,mBAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAC3B,IAAA,mBAAA,CAAA,YAAA,CAAA,GAAA,YAAyB;AAC7B,CAAC,EAHW,mBAAmB,KAAnB,mBAAmB,GAAA,EAAA,CAAA,CAAA;;ACAxB,MAAM,mCAAmC,GAAG;;MCAtC,sBAAsB,GAAG,CAAC,OAAO,EAAE,OAAO;;ICA3C;AAAZ,CAAA,UAAY,gBAAgB,EAAA;AACxB,IAAA,gBAAA,CAAA,UAAA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
|
+
native_resources?: string[];
|
|
114
114
|
resource_upload_id: string;
|
|
115
115
|
title: string;
|
|
116
116
|
icon?: string;
|
|
@@ -135,6 +135,7 @@ interface NexusAppExtension<T extends ExtensionProperties = ExtensionProperties>
|
|
|
135
135
|
installation_id: string;
|
|
136
136
|
properties: T;
|
|
137
137
|
egress?: EgressItem[];
|
|
138
|
+
fetch_client_addresses?: string[];
|
|
138
139
|
resource_ports?: Record<string, number>;
|
|
139
140
|
}
|
|
140
141
|
|
|
@@ -420,7 +421,7 @@ interface DispatchEventPayload {
|
|
|
420
421
|
id: string;
|
|
421
422
|
name: string;
|
|
422
423
|
nodeId: number;
|
|
423
|
-
/** 组件 output
|
|
424
|
+
/** 组件 output / 表单 valueChange 等场景下的回调参数 */
|
|
424
425
|
detail?: unknown;
|
|
425
426
|
}
|
|
426
427
|
/** Host → Child:派发虚拟 DOM 节点事件 */
|
|
@@ -484,6 +485,25 @@ interface WorkitemOpenCreateOptions {
|
|
|
484
485
|
onSuccess?: (payload: Workitem) => void;
|
|
485
486
|
}
|
|
486
487
|
|
|
488
|
+
declare const NX_BUTTON_TYPE: readonly ["primary", "info", "danger", "warning", "success"];
|
|
489
|
+
type NxButtonType = (typeof NX_BUTTON_TYPE)[number];
|
|
490
|
+
declare const NX_BUTTON_SIZE: readonly ["xs", "sm", "md", "default", "lg"];
|
|
491
|
+
type NxButtonSize = (typeof NX_BUTTON_SIZE)[number];
|
|
492
|
+
interface NxButtonInputs {
|
|
493
|
+
type?: NxButtonType;
|
|
494
|
+
size?: NxButtonSize;
|
|
495
|
+
icon?: string;
|
|
496
|
+
block?: boolean;
|
|
497
|
+
}
|
|
498
|
+
declare const NX_BUTTON_GROUP_SIZE: readonly ["xs", "sm", "md", "lg"];
|
|
499
|
+
type NxButtonGroupSize = (typeof NX_BUTTON_GROUP_SIZE)[number];
|
|
500
|
+
declare const NX_BUTTON_GROUP_TYPE: readonly ["primary", "outline-default", "outline-primary"];
|
|
501
|
+
type NxButtonGroupType = (typeof NX_BUTTON_GROUP_TYPE)[number];
|
|
502
|
+
interface NxButtonGroupInputs {
|
|
503
|
+
size?: NxButtonGroupSize;
|
|
504
|
+
type?: NxButtonGroupType;
|
|
505
|
+
}
|
|
506
|
+
|
|
487
507
|
declare const NX_HEADING_AS: readonly ["h1", "h2", "h3", "h4", "h5", "h6"];
|
|
488
508
|
type NxHeadingAs = (typeof NX_HEADING_AS)[number];
|
|
489
509
|
interface NxHeadingInputs {
|
|
@@ -502,5 +522,28 @@ interface NxTextInputs {
|
|
|
502
522
|
weight?: NxTextWeight;
|
|
503
523
|
}
|
|
504
524
|
|
|
505
|
-
|
|
506
|
-
|
|
525
|
+
interface RealtimeOptions {
|
|
526
|
+
scope?: RealtimeScope;
|
|
527
|
+
token?: string;
|
|
528
|
+
context?: RealtimeContext;
|
|
529
|
+
}
|
|
530
|
+
type RealtimePublishOptions = RealtimeOptions;
|
|
531
|
+
type RealtimeSubscribeOptions = RealtimeOptions;
|
|
532
|
+
type RealtimeScope = "self" | "global" | "token" | "context";
|
|
533
|
+
interface RealtimePublishResult {
|
|
534
|
+
message_id: string;
|
|
535
|
+
}
|
|
536
|
+
type RealtimeContext = "project" | "workitem" | "sprint" | "product" | "idea" | "ticket" | "space" | "page" | "library" | "testcase" | "testplan" | "baseline" | "release" | "plan" | "widget" | "dashboard" | "entry";
|
|
537
|
+
interface RealtimeSubscribeParams<TPayload> {
|
|
538
|
+
channel: string;
|
|
539
|
+
callback: (payload?: TPayload) => Promise<void> | void;
|
|
540
|
+
options?: RealtimeSubscribeOptions;
|
|
541
|
+
}
|
|
542
|
+
interface RealtimePublishParams<TPayload> {
|
|
543
|
+
channel: string;
|
|
544
|
+
payload: TPayload;
|
|
545
|
+
options?: RealtimePublishOptions;
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
export { HOST_DISPATCH_NATIVE_UI_EVENT, HistoryAction, NEXUS_CONFIG_READY_EVENT, NEXUS_CONTENT_CHANGE_EVENT, NEXUS_CONTENT_UPDATE_EVENT, NEXUS_EXTENSION_DATA_CONFIG_CHANGED, NX_BUTTON_GROUP_SIZE, NX_BUTTON_GROUP_TYPE, NX_BUTTON_SIZE, NX_BUTTON_TYPE, NX_HEADING_AS, NX_TEXT_ALIGN, NX_TEXT_AS, NX_TEXT_WEIGHT, NavigationTarget, NexusAppEnvironment, NotifyType, SUPPORTED_LOCALE_CODES, WorkitemTypeGroup };
|
|
549
|
+
export type { ApiInvokeOptions, Baseline, ConditionPrimitive, ConditionValue, Conditions, DialogConfirmOptions, DialogOpenOptions, DialogRef, DispatchEventPayload, DownloadResult, EgressItem, ExtensionData, ExtensionProperties, GetMetadataResult, GetTranslationsResult, HistoryListener, HistoryLocation, HistoryPath, HistoryState, HistoryTo, HistoryUpdate, Idea, IdeaOpenCreateOptions, InvokeFunctionParams, InvokeResponseData, MultipleUserOpenPopoverOptions, NavigationLocation, NexusAppContext, NexusAppExtension, NexusHistory, NotifyAction, NotifyDetail, NotifyOptions, NotifyRef, NxButtonGroupInputs, NxButtonGroupSize, NxButtonGroupType, NxButtonInputs, NxButtonSize, NxButtonType, NxHeadingAs, NxHeadingInputs, NxTextAlign, NxTextAs, NxTextInputs, NxTextWeight, Page, PageOpenCreateOptions, ProcessOptions, ProcessRef, RealtimeContext, RealtimePublishOptions, RealtimePublishParams, RealtimePublishResult, RealtimeScope, RealtimeSubscribeOptions, RealtimeSubscribeParams, ReconcilePayload, RemoteInvokeOptions, RemoteRequestBody, RemoteRequestOptions, RemoteRequestPayload, RemoteRequestResponseData, RemoteRequestSerializedInit, RemoteSerializedBlob, RemoteSerializedFormDataEntry, RichtextBridgeMessage, RichtextContent, RichtextDescendant, RichtextEditorOptions, RichtextEditorRef, RichtextElement, RichtextRendererOptions, RichtextRendererRef, RichtextText, SingleUserOpenPopoverOptions, Subscription, SupportedFrontendFramework, SupportedLocaleCode, Testcase, TestcaseOpenCreateOptions, Ticket, TicketOpenCreateOptions, TranslationsResourceContent, Translator, UnlistenCallback, UploadResult, UserInfo, UserOpenDialogOptions, UserOpenDialogRef, UserOpenPopoverOptions, UserOpenPopoverRef, Viewport, ViewportSize, VirtualListener, VirtualNodeSnapshot, VirtualStyle, Workitem, WorkitemOpenCreateOptions };
|