@openpen/module-api 1.1.0 → 1.2.0
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/CHANGELOG.md +43 -0
- package/dist/_chunks/AppButtonDropdown.vue_vue_type_style_index_0_lang-DBVFUpxc.js +245 -0
- package/dist/_chunks/AppButtonDropdown.vue_vue_type_style_index_0_lang-DBVFUpxc.js.map +1 -0
- package/dist/_chunks/inject-keys-CRXCpN-M.js +196 -0
- package/dist/_chunks/inject-keys-CRXCpN-M.js.map +1 -0
- package/dist/_chunks/module-context-registry-Cn1IWYu9.js +16 -0
- package/dist/_chunks/module-context-registry-Cn1IWYu9.js.map +1 -0
- package/dist/_chunks/passthrough-DKU7JYuQ.js +6 -0
- package/dist/_chunks/passthrough-DKU7JYuQ.js.map +1 -0
- package/dist/cursors.d.ts +83 -0
- package/dist/define-module.d.ts +17 -0
- package/dist/host/color-utils.d.ts +11 -0
- package/{src/host/event-bus.ts → dist/host/event-bus.d.ts} +7 -5
- package/dist/host/host-commands.d.ts +1 -0
- package/dist/host/index.d.ts +24 -0
- package/dist/host/index.js +49 -0
- package/dist/host/index.js.map +1 -0
- package/{src/host/module-context-registry.ts → dist/host/module-context-registry.d.ts} +5 -19
- package/dist/host/passthrough.d.ts +2 -0
- package/dist/host/popup-anchor.d.ts +3 -0
- package/dist/host/registry.d.ts +39 -0
- package/dist/host/registry.js +37 -0
- package/dist/host/registry.js.map +1 -0
- package/dist/host/slot-entries.d.ts +2 -0
- package/dist/host/stroke-store.d.ts +5 -0
- package/dist/host/stroke-style.d.ts +3 -0
- package/dist/host/types.d.ts +164 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.js +349 -0
- package/dist/index.js.map +1 -0
- package/{src/inject-keys.ts → dist/inject-keys.d.ts} +37 -66
- package/{src/locale.ts → dist/locale.d.ts} +3 -22
- package/dist/slots.d.ts +57 -0
- package/dist/types/contributions.d.ts +288 -0
- package/dist/types/control-bar-layout.d.ts +227 -0
- package/dist/types/module.d.ts +208 -0
- package/{src/types/notification.ts → dist/types/notification.d.ts} +12 -14
- package/dist/types/tool.d.ts +77 -0
- package/dist/uikit/components/AppBanner.vue.d.ts +34 -0
- package/dist/uikit/components/AppButton.vue.d.ts +30 -0
- package/dist/uikit/components/AppButtonDropdown.vue.d.ts +52 -0
- package/dist/uikit/components/AppDialog.vue.d.ts +53 -0
- package/dist/uikit/components/AppPopover.vue.d.ts +43 -0
- package/dist/uikit/components/AppSegmented.vue.d.ts +19 -0
- package/dist/uikit/components/AppSelect.vue.d.ts +26 -0
- package/dist/uikit/components/AppSlider.vue.d.ts +43 -0
- package/dist/uikit/components/AppTabs.vue.d.ts +35 -0
- package/dist/uikit/components/AppToggle.vue.d.ts +13 -0
- package/dist/uikit/components/AppTooltip.vue.d.ts +27 -0
- package/dist/uikit/components/DialogHost.vue.d.ts +3 -0
- package/{src/uikit/composables/dialog-internal-keys.ts → dist/uikit/composables/dialog-internal-keys.d.ts} +3 -5
- package/dist/uikit/composables/useDialog.d.ts +399 -0
- package/dist/uikit/composables/useDialogPluginComponent.d.ts +9 -0
- package/dist/uikit/index.d.ts +42 -0
- package/dist/uikit/index.js +884 -0
- package/dist/uikit/index.js.map +1 -0
- package/{src/uikit/internal.ts → dist/uikit/internal.d.ts} +1 -1
- package/dist/uikit/internal.js +157 -0
- package/dist/uikit/internal.js.map +1 -0
- package/dist/uikit/module-api.css +851 -0
- package/dist/uikit/primitives.d.ts +42 -0
- package/{src/use-module-context.ts → dist/use-module-context.d.ts} +2 -15
- package/{src/validation.ts → dist/validation.d.ts} +2 -6
- package/package.json +26 -12
- package/packages/module-api/CHANGELOG.md +0 -27
- package/src/cursors.ts +0 -369
- package/src/define-module.ts +0 -55
- package/src/host/color-utils.ts +0 -18
- package/src/host/host-commands.ts +0 -9
- package/src/host/index.ts +0 -53
- package/src/host/passthrough.ts +0 -10
- package/src/host/popup-anchor.ts +0 -14
- package/src/host/slot-entries.ts +0 -9
- package/src/host/stroke-store.ts +0 -20
- package/src/host/stroke-style.ts +0 -15
- package/src/index.ts +0 -131
- package/src/slots.ts +0 -135
- package/src/types/contributions.ts +0 -333
- package/src/types/control-bar-layout.ts +0 -174
- package/src/types/module.ts +0 -225
- package/src/types/tool.ts +0 -82
- package/src/uikit/components/.gitkeep +0 -0
- package/src/uikit/components/AppBanner.vue +0 -131
- package/src/uikit/components/AppButton.vue +0 -135
- package/src/uikit/components/AppDialog.vue +0 -393
- package/src/uikit/components/AppPopover.vue +0 -268
- package/src/uikit/components/AppSegmented.vue +0 -128
- package/src/uikit/components/AppSelect.vue +0 -235
- package/src/uikit/components/AppSlider.vue +0 -204
- package/src/uikit/components/AppTabs.vue +0 -163
- package/src/uikit/components/AppToggle.vue +0 -96
- package/src/uikit/components/AppTooltip.vue +0 -118
- package/src/uikit/components/DialogHost.vue +0 -272
- package/src/uikit/composables/useDialog.ts +0 -141
- package/src/uikit/composables/useDialogPluginComponent.ts +0 -27
- package/src/uikit/index.ts +0 -79
- package/src/uikit/primitives.ts +0 -150
- /package/{src → dist}/uikit/tokens.css +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
modelValue: boolean;
|
|
3
|
+
ariaLabel?: string;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
"update:modelValue": (value: boolean) => any;
|
|
7
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
8
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
9
|
+
}>, {
|
|
10
|
+
ariaLabel: string;
|
|
11
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** Preferred side for tooltip content relative to the trigger. */
|
|
2
|
+
export type TooltipSide = 'top' | 'bottom' | 'left' | 'right';
|
|
3
|
+
export interface AppTooltipProps {
|
|
4
|
+
/** Tooltip text content. */
|
|
5
|
+
content: string;
|
|
6
|
+
/** Preferred placement side relative to the trigger. Default 'top'. */
|
|
7
|
+
side?: TooltipSide;
|
|
8
|
+
/** Delay before tooltip appears on hover, in ms. Default 200. */
|
|
9
|
+
delay?: number;
|
|
10
|
+
}
|
|
11
|
+
export interface AppTooltipSlots {
|
|
12
|
+
/** Trigger element. Any element that receives hover events. */
|
|
13
|
+
default: () => unknown;
|
|
14
|
+
}
|
|
15
|
+
type __VLS_Slots = AppTooltipSlots;
|
|
16
|
+
declare const __VLS_base: import("vue").DefineComponent<AppTooltipProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AppTooltipProps> & Readonly<{}>, {
|
|
17
|
+
side: TooltipSide;
|
|
18
|
+
delay: number;
|
|
19
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
22
|
+
export default _default;
|
|
23
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
24
|
+
new (): {
|
|
25
|
+
$slots: S;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -5,13 +5,11 @@
|
|
|
5
5
|
* never see or depend on these keys; they exist only so DialogHost can
|
|
6
6
|
* provide the handle that useDialogPluginComponent() reads.
|
|
7
7
|
*/
|
|
8
|
-
import type { InjectionKey } from 'vue'
|
|
9
|
-
import type { DialogPluginComponentHandle } from './useDialogPluginComponent'
|
|
10
|
-
|
|
8
|
+
import type { InjectionKey } from 'vue';
|
|
9
|
+
import type { DialogPluginComponentHandle } from './useDialogPluginComponent';
|
|
11
10
|
/**
|
|
12
11
|
* Injection key that DialogHost provides to custom dialog components.
|
|
13
12
|
* Components rendered via useDialog().custom() use useDialogPluginComponent()
|
|
14
13
|
* which injects this key to get ok/cancel/dismiss callbacks.
|
|
15
14
|
*/
|
|
16
|
-
export const DIALOG_PLUGIN_HANDLE_KEY: InjectionKey<DialogPluginComponentHandle<unknown
|
|
17
|
-
Symbol('openpen:dialog-plugin-handle')
|
|
15
|
+
export declare const DIALOG_PLUGIN_HANDLE_KEY: InjectionKey<DialogPluginComponentHandle<unknown>>;
|
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useDialog — imperative dialog API for OpenPen modules.
|
|
3
|
+
*
|
|
4
|
+
* Returns a DialogApi with confirm/alert/prompt/custom methods that each
|
|
5
|
+
* return a Promise. At most one imperative dialog is open at a time; extra
|
|
6
|
+
* calls are queued and executed sequentially.
|
|
7
|
+
*
|
|
8
|
+
* The active request is stored in a module-scoped reactive store. DialogHost
|
|
9
|
+
* (mounted by the host at bootstrap) reads this store and renders the dialog.
|
|
10
|
+
*
|
|
11
|
+
* Usage:
|
|
12
|
+
* const dialog = useDialog()
|
|
13
|
+
* const ok = await dialog.confirm({ title: 'Delete?', message: '...' })
|
|
14
|
+
*/
|
|
15
|
+
import type { Component } from 'vue';
|
|
16
|
+
interface BaseDialogOptions {
|
|
17
|
+
title: string;
|
|
18
|
+
persistent?: boolean;
|
|
19
|
+
danger?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface DialogConfirmOptions extends BaseDialogOptions {
|
|
22
|
+
message: string;
|
|
23
|
+
okLabel?: string;
|
|
24
|
+
cancelLabel?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface DialogAlertOptions extends BaseDialogOptions {
|
|
27
|
+
message: string;
|
|
28
|
+
okLabel?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface DialogPromptOptions extends BaseDialogOptions {
|
|
31
|
+
message: string;
|
|
32
|
+
defaultValue?: string;
|
|
33
|
+
placeholder?: string;
|
|
34
|
+
okLabel?: string;
|
|
35
|
+
cancelLabel?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface DialogCustomOptions<T = unknown> extends BaseDialogOptions {
|
|
38
|
+
component: Component;
|
|
39
|
+
componentProps?: Record<string, unknown>;
|
|
40
|
+
/** Phantom type field for TypeScript to infer the resolution payload type. */
|
|
41
|
+
__payloadType?: T;
|
|
42
|
+
}
|
|
43
|
+
type DialogRequest = {
|
|
44
|
+
kind: 'confirm';
|
|
45
|
+
opts: DialogConfirmOptions;
|
|
46
|
+
resolve: (v: boolean) => void;
|
|
47
|
+
} | {
|
|
48
|
+
kind: 'alert';
|
|
49
|
+
opts: DialogAlertOptions;
|
|
50
|
+
resolve: () => void;
|
|
51
|
+
} | {
|
|
52
|
+
kind: 'prompt';
|
|
53
|
+
opts: DialogPromptOptions;
|
|
54
|
+
resolve: (v: string | null) => void;
|
|
55
|
+
} | {
|
|
56
|
+
kind: 'custom';
|
|
57
|
+
opts: DialogCustomOptions<unknown>;
|
|
58
|
+
resolve: (v: unknown) => void;
|
|
59
|
+
};
|
|
60
|
+
export declare const _activeRequest: import("vue").Ref<{
|
|
61
|
+
kind: "confirm";
|
|
62
|
+
opts: {
|
|
63
|
+
message: string;
|
|
64
|
+
okLabel?: string | undefined;
|
|
65
|
+
cancelLabel?: string | undefined;
|
|
66
|
+
title: string;
|
|
67
|
+
persistent?: boolean | undefined;
|
|
68
|
+
danger?: boolean | undefined;
|
|
69
|
+
};
|
|
70
|
+
resolve: (v: boolean) => void;
|
|
71
|
+
} | {
|
|
72
|
+
kind: "alert";
|
|
73
|
+
opts: {
|
|
74
|
+
message: string;
|
|
75
|
+
okLabel?: string | undefined;
|
|
76
|
+
title: string;
|
|
77
|
+
persistent?: boolean | undefined;
|
|
78
|
+
danger?: boolean | undefined;
|
|
79
|
+
};
|
|
80
|
+
resolve: () => void;
|
|
81
|
+
} | {
|
|
82
|
+
kind: "prompt";
|
|
83
|
+
opts: {
|
|
84
|
+
message: string;
|
|
85
|
+
defaultValue?: string | undefined;
|
|
86
|
+
placeholder?: string | undefined;
|
|
87
|
+
okLabel?: string | undefined;
|
|
88
|
+
cancelLabel?: string | undefined;
|
|
89
|
+
title: string;
|
|
90
|
+
persistent?: boolean | undefined;
|
|
91
|
+
danger?: boolean | undefined;
|
|
92
|
+
};
|
|
93
|
+
resolve: (v: string | null) => void;
|
|
94
|
+
} | {
|
|
95
|
+
kind: "custom";
|
|
96
|
+
opts: {
|
|
97
|
+
component: import("vue").FunctionalComponent<any, {}, any, {}> | {
|
|
98
|
+
new (...args: any[]): any;
|
|
99
|
+
__isFragment?: never;
|
|
100
|
+
__isTeleport?: never;
|
|
101
|
+
__isSuspense?: never;
|
|
102
|
+
} | {
|
|
103
|
+
[x: string]: any;
|
|
104
|
+
setup?: ((this: void, props: import("@vue/shared").LooseRequired<any>, ctx: {
|
|
105
|
+
attrs: import("vue").Attrs;
|
|
106
|
+
slots: Readonly<{
|
|
107
|
+
[name: string]: import("vue").Slot<any> | undefined;
|
|
108
|
+
}>;
|
|
109
|
+
emit: ((event: unknown, ...args: any[]) => void) | ((event: string, ...args: any[]) => void);
|
|
110
|
+
expose: <Exposed extends Record<string, any> = Record<string, any>>(exposed?: Exposed) => void;
|
|
111
|
+
}) => any) | undefined;
|
|
112
|
+
name?: string | undefined;
|
|
113
|
+
template?: string | object | undefined;
|
|
114
|
+
render?: Function | undefined;
|
|
115
|
+
components?: Record<string, Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>> | undefined;
|
|
116
|
+
directives?: Record<string, import("vue").Directive<any, any, string, any>> | undefined;
|
|
117
|
+
inheritAttrs?: boolean | undefined;
|
|
118
|
+
emits?: any;
|
|
119
|
+
slots?: {} | undefined;
|
|
120
|
+
expose?: string[] | undefined;
|
|
121
|
+
serverPrefetch?: (() => void | Promise<any>) | undefined;
|
|
122
|
+
compilerOptions?: {
|
|
123
|
+
isCustomElement?: ((tag: string) => boolean) | undefined;
|
|
124
|
+
whitespace?: "preserve" | "condense" | undefined;
|
|
125
|
+
comments?: boolean | undefined;
|
|
126
|
+
delimiters?: [string, string] | undefined;
|
|
127
|
+
} | undefined;
|
|
128
|
+
call?: ((this: unknown, ...args: unknown[]) => never) | undefined;
|
|
129
|
+
__isFragment?: never | undefined;
|
|
130
|
+
__isTeleport?: never | undefined;
|
|
131
|
+
__isSuspense?: never | undefined;
|
|
132
|
+
__defaults?: {} | undefined;
|
|
133
|
+
compatConfig?: {
|
|
134
|
+
GLOBAL_MOUNT?: boolean | "suppress-warning" | undefined;
|
|
135
|
+
GLOBAL_MOUNT_CONTAINER?: boolean | "suppress-warning" | undefined;
|
|
136
|
+
GLOBAL_EXTEND?: boolean | "suppress-warning" | undefined;
|
|
137
|
+
GLOBAL_PROTOTYPE?: boolean | "suppress-warning" | undefined;
|
|
138
|
+
GLOBAL_SET?: boolean | "suppress-warning" | undefined;
|
|
139
|
+
GLOBAL_DELETE?: boolean | "suppress-warning" | undefined;
|
|
140
|
+
GLOBAL_OBSERVABLE?: boolean | "suppress-warning" | undefined;
|
|
141
|
+
GLOBAL_PRIVATE_UTIL?: boolean | "suppress-warning" | undefined;
|
|
142
|
+
CONFIG_SILENT?: boolean | "suppress-warning" | undefined;
|
|
143
|
+
CONFIG_DEVTOOLS?: boolean | "suppress-warning" | undefined;
|
|
144
|
+
CONFIG_KEY_CODES?: boolean | "suppress-warning" | undefined;
|
|
145
|
+
CONFIG_PRODUCTION_TIP?: boolean | "suppress-warning" | undefined;
|
|
146
|
+
CONFIG_IGNORED_ELEMENTS?: boolean | "suppress-warning" | undefined;
|
|
147
|
+
CONFIG_WHITESPACE?: boolean | "suppress-warning" | undefined;
|
|
148
|
+
CONFIG_OPTION_MERGE_STRATS?: boolean | "suppress-warning" | undefined;
|
|
149
|
+
INSTANCE_SET?: boolean | "suppress-warning" | undefined;
|
|
150
|
+
INSTANCE_DELETE?: boolean | "suppress-warning" | undefined;
|
|
151
|
+
INSTANCE_DESTROY?: boolean | "suppress-warning" | undefined;
|
|
152
|
+
INSTANCE_EVENT_EMITTER?: boolean | "suppress-warning" | undefined;
|
|
153
|
+
INSTANCE_EVENT_HOOKS?: boolean | "suppress-warning" | undefined;
|
|
154
|
+
INSTANCE_CHILDREN?: boolean | "suppress-warning" | undefined;
|
|
155
|
+
INSTANCE_LISTENERS?: boolean | "suppress-warning" | undefined;
|
|
156
|
+
INSTANCE_SCOPED_SLOTS?: boolean | "suppress-warning" | undefined;
|
|
157
|
+
INSTANCE_ATTRS_CLASS_STYLE?: boolean | "suppress-warning" | undefined;
|
|
158
|
+
OPTIONS_DATA_FN?: boolean | "suppress-warning" | undefined;
|
|
159
|
+
OPTIONS_DATA_MERGE?: boolean | "suppress-warning" | undefined;
|
|
160
|
+
OPTIONS_BEFORE_DESTROY?: boolean | "suppress-warning" | undefined;
|
|
161
|
+
OPTIONS_DESTROYED?: boolean | "suppress-warning" | undefined;
|
|
162
|
+
WATCH_ARRAY?: boolean | "suppress-warning" | undefined;
|
|
163
|
+
PROPS_DEFAULT_THIS?: boolean | "suppress-warning" | undefined;
|
|
164
|
+
V_ON_KEYCODE_MODIFIER?: boolean | "suppress-warning" | undefined;
|
|
165
|
+
CUSTOM_DIR?: boolean | "suppress-warning" | undefined;
|
|
166
|
+
ATTR_FALSE_VALUE?: boolean | "suppress-warning" | undefined;
|
|
167
|
+
ATTR_ENUMERATED_COERCION?: boolean | "suppress-warning" | undefined;
|
|
168
|
+
TRANSITION_CLASSES?: boolean | "suppress-warning" | undefined;
|
|
169
|
+
TRANSITION_GROUP_ROOT?: boolean | "suppress-warning" | undefined;
|
|
170
|
+
COMPONENT_ASYNC?: boolean | "suppress-warning" | undefined;
|
|
171
|
+
COMPONENT_FUNCTIONAL?: boolean | "suppress-warning" | undefined;
|
|
172
|
+
COMPONENT_V_MODEL?: boolean | "suppress-warning" | undefined;
|
|
173
|
+
RENDER_FUNCTION?: boolean | "suppress-warning" | undefined;
|
|
174
|
+
FILTERS?: boolean | "suppress-warning" | undefined;
|
|
175
|
+
PRIVATE_APIS?: boolean | "suppress-warning" | undefined;
|
|
176
|
+
MODE?: 2 | 3 | ((comp: Component | null) => 2 | 3) | undefined;
|
|
177
|
+
} | undefined;
|
|
178
|
+
data?: ((this: any, vm: any) => any) | undefined;
|
|
179
|
+
computed?: import("vue").ComputedOptions | undefined;
|
|
180
|
+
methods?: import("vue").MethodOptions | undefined;
|
|
181
|
+
watch?: {
|
|
182
|
+
[x: string]: (string | import("vue").WatchCallback | ({
|
|
183
|
+
handler: import("vue").WatchCallback | string;
|
|
184
|
+
} & import("vue").WatchOptions<boolean>)) | (string | import("vue").WatchCallback | ({
|
|
185
|
+
handler: import("vue").WatchCallback | string;
|
|
186
|
+
} & import("vue").WatchOptions<boolean>))[];
|
|
187
|
+
} | undefined;
|
|
188
|
+
provide?: import("vue").ComponentProvideOptions | undefined;
|
|
189
|
+
inject?: {} | string[] | undefined;
|
|
190
|
+
filters?: Record<string, Function> | undefined;
|
|
191
|
+
mixins?: any[] | undefined;
|
|
192
|
+
extends?: any;
|
|
193
|
+
beforeCreate?: (() => any) | undefined;
|
|
194
|
+
created?: (() => any) | undefined;
|
|
195
|
+
beforeMount?: (() => any) | undefined;
|
|
196
|
+
mounted?: (() => any) | undefined;
|
|
197
|
+
beforeUpdate?: (() => any) | undefined;
|
|
198
|
+
updated?: (() => any) | undefined;
|
|
199
|
+
activated?: (() => any) | undefined;
|
|
200
|
+
deactivated?: (() => any) | undefined;
|
|
201
|
+
beforeDestroy?: (() => any) | undefined;
|
|
202
|
+
beforeUnmount?: (() => any) | undefined;
|
|
203
|
+
destroyed?: (() => any) | undefined;
|
|
204
|
+
unmounted?: (() => any) | undefined;
|
|
205
|
+
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | undefined;
|
|
206
|
+
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | undefined;
|
|
207
|
+
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | undefined;
|
|
208
|
+
delimiters?: [string, string] | undefined;
|
|
209
|
+
__differentiator?: string | number | symbol | undefined;
|
|
210
|
+
__isBuiltIn?: boolean | undefined;
|
|
211
|
+
__file?: string | undefined;
|
|
212
|
+
__name?: string | undefined;
|
|
213
|
+
};
|
|
214
|
+
componentProps?: Record<string, unknown>
|
|
215
|
+
/** Phantom type field for TypeScript to infer the resolution payload type. */
|
|
216
|
+
| undefined;
|
|
217
|
+
__payloadType?: unknown;
|
|
218
|
+
title: string;
|
|
219
|
+
persistent?: boolean | undefined;
|
|
220
|
+
danger?: boolean | undefined;
|
|
221
|
+
};
|
|
222
|
+
resolve: (v: unknown) => void;
|
|
223
|
+
} | null, DialogRequest | {
|
|
224
|
+
kind: "confirm";
|
|
225
|
+
opts: {
|
|
226
|
+
message: string;
|
|
227
|
+
okLabel?: string | undefined;
|
|
228
|
+
cancelLabel?: string | undefined;
|
|
229
|
+
title: string;
|
|
230
|
+
persistent?: boolean | undefined;
|
|
231
|
+
danger?: boolean | undefined;
|
|
232
|
+
};
|
|
233
|
+
resolve: (v: boolean) => void;
|
|
234
|
+
} | {
|
|
235
|
+
kind: "alert";
|
|
236
|
+
opts: {
|
|
237
|
+
message: string;
|
|
238
|
+
okLabel?: string | undefined;
|
|
239
|
+
title: string;
|
|
240
|
+
persistent?: boolean | undefined;
|
|
241
|
+
danger?: boolean | undefined;
|
|
242
|
+
};
|
|
243
|
+
resolve: () => void;
|
|
244
|
+
} | {
|
|
245
|
+
kind: "prompt";
|
|
246
|
+
opts: {
|
|
247
|
+
message: string;
|
|
248
|
+
defaultValue?: string | undefined;
|
|
249
|
+
placeholder?: string | undefined;
|
|
250
|
+
okLabel?: string | undefined;
|
|
251
|
+
cancelLabel?: string | undefined;
|
|
252
|
+
title: string;
|
|
253
|
+
persistent?: boolean | undefined;
|
|
254
|
+
danger?: boolean | undefined;
|
|
255
|
+
};
|
|
256
|
+
resolve: (v: string | null) => void;
|
|
257
|
+
} | {
|
|
258
|
+
kind: "custom";
|
|
259
|
+
opts: {
|
|
260
|
+
component: import("vue").FunctionalComponent<any, {}, any, {}> | {
|
|
261
|
+
new (...args: any[]): any;
|
|
262
|
+
__isFragment?: never;
|
|
263
|
+
__isTeleport?: never;
|
|
264
|
+
__isSuspense?: never;
|
|
265
|
+
} | {
|
|
266
|
+
[x: string]: any;
|
|
267
|
+
setup?: ((this: void, props: import("@vue/shared").LooseRequired<any>, ctx: {
|
|
268
|
+
attrs: import("vue").Attrs;
|
|
269
|
+
slots: Readonly<{
|
|
270
|
+
[name: string]: import("vue").Slot<any> | undefined;
|
|
271
|
+
}>;
|
|
272
|
+
emit: ((event: unknown, ...args: any[]) => void) | ((event: string, ...args: any[]) => void);
|
|
273
|
+
expose: <Exposed extends Record<string, any> = Record<string, any>>(exposed?: Exposed) => void;
|
|
274
|
+
}) => any) | undefined;
|
|
275
|
+
name?: string | undefined;
|
|
276
|
+
template?: string | object | undefined;
|
|
277
|
+
render?: Function | undefined;
|
|
278
|
+
components?: Record<string, Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>> | undefined;
|
|
279
|
+
directives?: Record<string, import("vue").Directive<any, any, string, any>> | undefined;
|
|
280
|
+
inheritAttrs?: boolean | undefined;
|
|
281
|
+
emits?: any;
|
|
282
|
+
slots?: {} | undefined;
|
|
283
|
+
expose?: string[] | undefined;
|
|
284
|
+
serverPrefetch?: (() => void | Promise<any>) | undefined;
|
|
285
|
+
compilerOptions?: {
|
|
286
|
+
isCustomElement?: ((tag: string) => boolean) | undefined;
|
|
287
|
+
whitespace?: "preserve" | "condense" | undefined;
|
|
288
|
+
comments?: boolean | undefined;
|
|
289
|
+
delimiters?: [string, string] | undefined;
|
|
290
|
+
} | undefined;
|
|
291
|
+
call?: ((this: unknown, ...args: unknown[]) => never) | undefined;
|
|
292
|
+
__isFragment?: never | undefined;
|
|
293
|
+
__isTeleport?: never | undefined;
|
|
294
|
+
__isSuspense?: never | undefined;
|
|
295
|
+
__defaults?: {} | undefined;
|
|
296
|
+
compatConfig?: {
|
|
297
|
+
GLOBAL_MOUNT?: boolean | "suppress-warning" | undefined;
|
|
298
|
+
GLOBAL_MOUNT_CONTAINER?: boolean | "suppress-warning" | undefined;
|
|
299
|
+
GLOBAL_EXTEND?: boolean | "suppress-warning" | undefined;
|
|
300
|
+
GLOBAL_PROTOTYPE?: boolean | "suppress-warning" | undefined;
|
|
301
|
+
GLOBAL_SET?: boolean | "suppress-warning" | undefined;
|
|
302
|
+
GLOBAL_DELETE?: boolean | "suppress-warning" | undefined;
|
|
303
|
+
GLOBAL_OBSERVABLE?: boolean | "suppress-warning" | undefined;
|
|
304
|
+
GLOBAL_PRIVATE_UTIL?: boolean | "suppress-warning" | undefined;
|
|
305
|
+
CONFIG_SILENT?: boolean | "suppress-warning" | undefined;
|
|
306
|
+
CONFIG_DEVTOOLS?: boolean | "suppress-warning" | undefined;
|
|
307
|
+
CONFIG_KEY_CODES?: boolean | "suppress-warning" | undefined;
|
|
308
|
+
CONFIG_PRODUCTION_TIP?: boolean | "suppress-warning" | undefined;
|
|
309
|
+
CONFIG_IGNORED_ELEMENTS?: boolean | "suppress-warning" | undefined;
|
|
310
|
+
CONFIG_WHITESPACE?: boolean | "suppress-warning" | undefined;
|
|
311
|
+
CONFIG_OPTION_MERGE_STRATS?: boolean | "suppress-warning" | undefined;
|
|
312
|
+
INSTANCE_SET?: boolean | "suppress-warning" | undefined;
|
|
313
|
+
INSTANCE_DELETE?: boolean | "suppress-warning" | undefined;
|
|
314
|
+
INSTANCE_DESTROY?: boolean | "suppress-warning" | undefined;
|
|
315
|
+
INSTANCE_EVENT_EMITTER?: boolean | "suppress-warning" | undefined;
|
|
316
|
+
INSTANCE_EVENT_HOOKS?: boolean | "suppress-warning" | undefined;
|
|
317
|
+
INSTANCE_CHILDREN?: boolean | "suppress-warning" | undefined;
|
|
318
|
+
INSTANCE_LISTENERS?: boolean | "suppress-warning" | undefined;
|
|
319
|
+
INSTANCE_SCOPED_SLOTS?: boolean | "suppress-warning" | undefined;
|
|
320
|
+
INSTANCE_ATTRS_CLASS_STYLE?: boolean | "suppress-warning" | undefined;
|
|
321
|
+
OPTIONS_DATA_FN?: boolean | "suppress-warning" | undefined;
|
|
322
|
+
OPTIONS_DATA_MERGE?: boolean | "suppress-warning" | undefined;
|
|
323
|
+
OPTIONS_BEFORE_DESTROY?: boolean | "suppress-warning" | undefined;
|
|
324
|
+
OPTIONS_DESTROYED?: boolean | "suppress-warning" | undefined;
|
|
325
|
+
WATCH_ARRAY?: boolean | "suppress-warning" | undefined;
|
|
326
|
+
PROPS_DEFAULT_THIS?: boolean | "suppress-warning" | undefined;
|
|
327
|
+
V_ON_KEYCODE_MODIFIER?: boolean | "suppress-warning" | undefined;
|
|
328
|
+
CUSTOM_DIR?: boolean | "suppress-warning" | undefined;
|
|
329
|
+
ATTR_FALSE_VALUE?: boolean | "suppress-warning" | undefined;
|
|
330
|
+
ATTR_ENUMERATED_COERCION?: boolean | "suppress-warning" | undefined;
|
|
331
|
+
TRANSITION_CLASSES?: boolean | "suppress-warning" | undefined;
|
|
332
|
+
TRANSITION_GROUP_ROOT?: boolean | "suppress-warning" | undefined;
|
|
333
|
+
COMPONENT_ASYNC?: boolean | "suppress-warning" | undefined;
|
|
334
|
+
COMPONENT_FUNCTIONAL?: boolean | "suppress-warning" | undefined;
|
|
335
|
+
COMPONENT_V_MODEL?: boolean | "suppress-warning" | undefined;
|
|
336
|
+
RENDER_FUNCTION?: boolean | "suppress-warning" | undefined;
|
|
337
|
+
FILTERS?: boolean | "suppress-warning" | undefined;
|
|
338
|
+
PRIVATE_APIS?: boolean | "suppress-warning" | undefined;
|
|
339
|
+
MODE?: 2 | 3 | ((comp: Component | null) => 2 | 3) | undefined;
|
|
340
|
+
} | undefined;
|
|
341
|
+
data?: ((this: any, vm: any) => any) | undefined;
|
|
342
|
+
computed?: import("vue").ComputedOptions | undefined;
|
|
343
|
+
methods?: import("vue").MethodOptions | undefined;
|
|
344
|
+
watch?: {
|
|
345
|
+
[x: string]: (string | import("vue").WatchCallback | ({
|
|
346
|
+
handler: import("vue").WatchCallback | string;
|
|
347
|
+
} & import("vue").WatchOptions<boolean>)) | (string | import("vue").WatchCallback | ({
|
|
348
|
+
handler: import("vue").WatchCallback | string;
|
|
349
|
+
} & import("vue").WatchOptions<boolean>))[];
|
|
350
|
+
} | undefined;
|
|
351
|
+
provide?: import("vue").ComponentProvideOptions | undefined;
|
|
352
|
+
inject?: {} | string[] | undefined;
|
|
353
|
+
filters?: Record<string, Function> | undefined;
|
|
354
|
+
mixins?: any[] | undefined;
|
|
355
|
+
extends?: any;
|
|
356
|
+
beforeCreate?: (() => any) | undefined;
|
|
357
|
+
created?: (() => any) | undefined;
|
|
358
|
+
beforeMount?: (() => any) | undefined;
|
|
359
|
+
mounted?: (() => any) | undefined;
|
|
360
|
+
beforeUpdate?: (() => any) | undefined;
|
|
361
|
+
updated?: (() => any) | undefined;
|
|
362
|
+
activated?: (() => any) | undefined;
|
|
363
|
+
deactivated?: (() => any) | undefined;
|
|
364
|
+
beforeDestroy?: (() => any) | undefined;
|
|
365
|
+
beforeUnmount?: (() => any) | undefined;
|
|
366
|
+
destroyed?: (() => any) | undefined;
|
|
367
|
+
unmounted?: (() => any) | undefined;
|
|
368
|
+
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | undefined;
|
|
369
|
+
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | undefined;
|
|
370
|
+
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | undefined;
|
|
371
|
+
delimiters?: [string, string] | undefined;
|
|
372
|
+
__differentiator?: string | number | symbol | undefined;
|
|
373
|
+
__isBuiltIn?: boolean | undefined;
|
|
374
|
+
__file?: string | undefined;
|
|
375
|
+
__name?: string | undefined;
|
|
376
|
+
};
|
|
377
|
+
componentProps?: Record<string, unknown>
|
|
378
|
+
/** Phantom type field for TypeScript to infer the resolution payload type. */
|
|
379
|
+
| undefined;
|
|
380
|
+
__payloadType?: unknown;
|
|
381
|
+
title: string;
|
|
382
|
+
persistent?: boolean | undefined;
|
|
383
|
+
danger?: boolean | undefined;
|
|
384
|
+
};
|
|
385
|
+
resolve: (v: unknown) => void;
|
|
386
|
+
} | null>;
|
|
387
|
+
/**
|
|
388
|
+
* Called by DialogHost when the dialog is resolved (ok/cancel/dismiss).
|
|
389
|
+
* Advances the queue if there are pending requests.
|
|
390
|
+
*/
|
|
391
|
+
export declare function _resolveActive(): void;
|
|
392
|
+
export interface DialogApi {
|
|
393
|
+
confirm(opts: DialogConfirmOptions): Promise<boolean>;
|
|
394
|
+
alert(opts: DialogAlertOptions): Promise<void>;
|
|
395
|
+
prompt(opts: DialogPromptOptions): Promise<string | null>;
|
|
396
|
+
custom<T = unknown>(opts: DialogCustomOptions<T>): Promise<T | null>;
|
|
397
|
+
}
|
|
398
|
+
export declare function useDialog(): DialogApi;
|
|
399
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface DialogPluginComponentHandle<T = unknown> {
|
|
2
|
+
/** Resolve with a payload value and close the dialog. */
|
|
3
|
+
ok(payload?: T): void;
|
|
4
|
+
/** Resolve with null and close the dialog. */
|
|
5
|
+
cancel(): void;
|
|
6
|
+
/** Alias for cancel() — resolves with null. */
|
|
7
|
+
dismiss(): void;
|
|
8
|
+
}
|
|
9
|
+
export declare function useDialogPluginComponent<T = unknown>(): DialogPluginComponentHandle<T>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @openpen/module-api/uikit — Three-layer API surface
|
|
3
|
+
*
|
|
4
|
+
* Layer 1 — High-level Wrappers (80% case)
|
|
5
|
+
* OpenPen-opinionated components with preset styles + auto-injected host
|
|
6
|
+
* context. Plugin authors should start here: no knowledge of inject keys
|
|
7
|
+
* or Reka UI primitives required.
|
|
8
|
+
*
|
|
9
|
+
* Layer 2 — Primitive Re-exports (20% advanced)
|
|
10
|
+
* Raw Reka UI headless components. Use when you need full control over
|
|
11
|
+
* markup / styling but still want a11y / focus / keyboard nav behaviour.
|
|
12
|
+
* Note: you must manually handle modal-manager, animating guard,
|
|
13
|
+
* passthrough, and teleport target when walking this layer.
|
|
14
|
+
*
|
|
15
|
+
* Layer 3 — Escape Hatch (5% fully custom)
|
|
16
|
+
* Plugin installs reka-ui (or any library) directly in its own package.json.
|
|
17
|
+
* UIKit MUST NOT block this. Not handled here — plugin author's choice.
|
|
18
|
+
*
|
|
19
|
+
* See docs/uikit/index.md for the full trade-off description.
|
|
20
|
+
*/
|
|
21
|
+
export { default as AppPopover } from './components/AppPopover.vue';
|
|
22
|
+
export type { AppPopoverProps, Placement } from './components/AppPopover.vue';
|
|
23
|
+
export { default as AppSlider } from './components/AppSlider.vue';
|
|
24
|
+
export { default as AppToggle } from './components/AppToggle.vue';
|
|
25
|
+
export { default as AppSegmented } from './components/AppSegmented.vue';
|
|
26
|
+
export { default as AppDialog } from './components/AppDialog.vue';
|
|
27
|
+
export type { AppDialogProps } from './components/AppDialog.vue';
|
|
28
|
+
export { useDialog } from './composables/useDialog';
|
|
29
|
+
export type { DialogConfirmOptions, DialogAlertOptions, DialogPromptOptions, DialogCustomOptions, } from './composables/useDialog';
|
|
30
|
+
export { useDialogPluginComponent } from './composables/useDialogPluginComponent';
|
|
31
|
+
export { _activeRequest, _resolveActive } from './composables/useDialog';
|
|
32
|
+
export { default as AppSelect } from './components/AppSelect.vue';
|
|
33
|
+
export type { AppSelectProps, SelectOption } from './components/AppSelect.vue';
|
|
34
|
+
export { default as AppTooltip } from './components/AppTooltip.vue';
|
|
35
|
+
export type { AppTooltipProps, TooltipSide } from './components/AppTooltip.vue';
|
|
36
|
+
export { default as AppTabs } from './components/AppTabs.vue';
|
|
37
|
+
export type { AppTabsProps, AppTabItem } from './components/AppTabs.vue';
|
|
38
|
+
export { default as AppBanner } from './components/AppBanner.vue';
|
|
39
|
+
export type { BannerVariant } from './components/AppBanner.vue';
|
|
40
|
+
export { default as AppButton } from './components/AppButton.vue';
|
|
41
|
+
export { default as AppButtonDropdown } from './components/AppButtonDropdown.vue';
|
|
42
|
+
export * from './primitives';
|