@openpen/module-api 1.3.0 → 1.5.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 +32 -0
- package/README.md +7 -1
- package/dist/host/tools.d.ts +9 -0
- package/dist/host/types.d.ts +7 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/types/contributions.d.ts +7 -5
- package/dist/types/control-bar-layout.d.ts +19 -148
- package/dist/types/module.d.ts +7 -1
- package/dist/types/tool.d.ts +14 -3
- package/dist/uikit/components/AppButtonDropdown.vue.d.ts +1 -1
- package/dist/uikit/components/AppPopoverPanel.vue.d.ts +28 -0
- package/dist/uikit/components/AppPopoverRow.vue.d.ts +26 -0
- package/dist/uikit/components/AppSegmented.vue.d.ts +6 -1
- package/dist/uikit/components/AppSelect.vue.d.ts +7 -0
- package/dist/uikit/components/AppSlider.vue.d.ts +14 -0
- package/dist/uikit/components/AppSwatchPicker.vue.d.ts +37 -0
- package/dist/uikit/components/AppToggleButton.vue.d.ts +28 -0
- package/dist/uikit/index.d.ts +9 -3
- package/dist/uikit/index.js +327 -104
- package/dist/uikit/index.js.map +1 -1
- package/dist/uikit/module-api.css +287 -86
- package/dist/uikit/primitives.d.ts +4 -2
- package/dist/uikit/tokens.css +7 -6
- package/dist/use-module-context.d.ts +1 -2
- package/package.json +4 -4
|
@@ -2,13 +2,18 @@ interface Option {
|
|
|
2
2
|
value: string;
|
|
3
3
|
label: string;
|
|
4
4
|
icon?: string;
|
|
5
|
+
/** Show only the icon; `label` becomes the accessible name and the tooltip. */
|
|
6
|
+
iconOnly?: boolean;
|
|
7
|
+
/** Tooltip text; defaults to `label` for icon-only options. */
|
|
8
|
+
tooltip?: string;
|
|
5
9
|
testid?: string;
|
|
6
10
|
}
|
|
7
11
|
type __VLS_Props = {
|
|
8
12
|
modelValue: string;
|
|
9
13
|
options: Option[];
|
|
10
|
-
/** When true, all options are non-interactive and visually dimmed. */
|
|
11
14
|
disabled?: boolean;
|
|
15
|
+
/** Accessible name of the whole group (e.g. "Head style"). */
|
|
16
|
+
ariaLabel?: string;
|
|
12
17
|
};
|
|
13
18
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
19
|
"update:modelValue": (value: string) => any;
|
|
@@ -14,6 +14,12 @@ export interface AppSelectProps {
|
|
|
14
14
|
placeholder: string;
|
|
15
15
|
/** Whether the select is disabled. */
|
|
16
16
|
disabled?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Accessible name of the trigger button. Pass it whenever the select has no
|
|
19
|
+
* visible label of its own; otherwise a screen reader announces only the
|
|
20
|
+
* current value.
|
|
21
|
+
*/
|
|
22
|
+
ariaLabel?: string;
|
|
17
23
|
}
|
|
18
24
|
declare const __VLS_export: import("vue").DefineComponent<AppSelectProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
25
|
"update:modelValue": (value: string) => any;
|
|
@@ -21,6 +27,7 @@ declare const __VLS_export: import("vue").DefineComponent<AppSelectProps, {}, {}
|
|
|
21
27
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
22
28
|
}>, {
|
|
23
29
|
disabled: boolean;
|
|
30
|
+
ariaLabel: string;
|
|
24
31
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
25
32
|
declare const _default: typeof __VLS_export;
|
|
26
33
|
export default _default;
|
|
@@ -5,6 +5,11 @@ type __VLS_Props = {
|
|
|
5
5
|
step?: number;
|
|
6
6
|
/** Container width (e.g. '100%', '72px'). In vertical mode this sets the height. */
|
|
7
7
|
width?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Accessible name announced by screen readers when the thumb is focused.
|
|
10
|
+
* Pass it whenever the slider has no visible label of its own.
|
|
11
|
+
*/
|
|
12
|
+
ariaLabel?: string;
|
|
8
13
|
orientation?: 'horizontal' | 'vertical';
|
|
9
14
|
trackHeight?: string;
|
|
10
15
|
trackRadius?: string;
|
|
@@ -21,6 +26,13 @@ type __VLS_Props = {
|
|
|
21
26
|
* startEdge/endEdge on SliderRange — no manual value transformation needed.
|
|
22
27
|
*/
|
|
23
28
|
inverted?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Text for the value bubble (e.g. "4px"). When set, a small bubble with this
|
|
31
|
+
* text appears above the thumb while the slider is being dragged and hides on
|
|
32
|
+
* release; it is also exposed to assistive technology as `aria-valuetext`.
|
|
33
|
+
* Horizontal sliders only. Leave unset for no bubble.
|
|
34
|
+
*/
|
|
35
|
+
valueLabel?: string;
|
|
24
36
|
};
|
|
25
37
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
26
38
|
"update:modelValue": (value: number) => any;
|
|
@@ -31,6 +43,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
31
43
|
min: number;
|
|
32
44
|
max: number;
|
|
33
45
|
step: number;
|
|
46
|
+
ariaLabel: string;
|
|
34
47
|
orientation: "horizontal" | "vertical";
|
|
35
48
|
trackHeight: string;
|
|
36
49
|
trackRadius: string;
|
|
@@ -38,6 +51,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
38
51
|
thumbHeight: string;
|
|
39
52
|
thumbRadius: string;
|
|
40
53
|
inverted: boolean;
|
|
54
|
+
valueLabel: string;
|
|
41
55
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
42
56
|
declare const _default: typeof __VLS_export;
|
|
43
57
|
export default _default;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export interface SwatchColor {
|
|
2
|
+
/** CSS colour value, e.g. `#818CF8`. Compared case-insensitively with `modelValue`. */
|
|
3
|
+
value: string;
|
|
4
|
+
/** Accessible name announced for the swatch (for example `Indigo`). */
|
|
5
|
+
label: string;
|
|
6
|
+
/** Optional `data-testid` for the swatch button. */
|
|
7
|
+
testid?: string;
|
|
8
|
+
}
|
|
9
|
+
type __VLS_Props = {
|
|
10
|
+
/** Currently selected colour value (use `v-model`). */
|
|
11
|
+
modelValue: string;
|
|
12
|
+
colors: SwatchColor[];
|
|
13
|
+
/** Accessible name of the whole group. */
|
|
14
|
+
ariaLabel: string;
|
|
15
|
+
shape?: 'circular' | 'rounded' | 'square';
|
|
16
|
+
size?: 'small' | 'medium' | 'large';
|
|
17
|
+
/** Gap between swatches: `small` 6px, `medium` 8px. */
|
|
18
|
+
spacing?: 'small' | 'medium';
|
|
19
|
+
/** Swatch background override, for example a gradient. Defaults to the colour value. */
|
|
20
|
+
background?: (color: SwatchColor) => string;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
testid?: string;
|
|
23
|
+
};
|
|
24
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
25
|
+
"update:modelValue": (value: string) => any;
|
|
26
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
27
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
28
|
+
}>, {
|
|
29
|
+
disabled: boolean;
|
|
30
|
+
testid: string;
|
|
31
|
+
shape: "square" | "rounded" | "circular";
|
|
32
|
+
size: "small" | "medium" | "large";
|
|
33
|
+
spacing: "small" | "medium";
|
|
34
|
+
background: (color: SwatchColor) => string;
|
|
35
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
36
|
+
declare const _default: typeof __VLS_export;
|
|
37
|
+
export default _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** Pressed state (use `v-model`). */
|
|
3
|
+
modelValue: boolean;
|
|
4
|
+
/** Accessible name. Required because the content is often a single glyph or icon. */
|
|
5
|
+
ariaLabel: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
testid?: string;
|
|
8
|
+
};
|
|
9
|
+
declare var __VLS_9: {};
|
|
10
|
+
type __VLS_Slots = {} & {
|
|
11
|
+
default?: (props: typeof __VLS_9) => any;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
|
+
"update:modelValue": (value: boolean) => any;
|
|
15
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
16
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
17
|
+
}>, {
|
|
18
|
+
disabled: boolean;
|
|
19
|
+
testid: string;
|
|
20
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
25
|
+
new (): {
|
|
26
|
+
$slots: S;
|
|
27
|
+
};
|
|
28
|
+
};
|
package/dist/uikit/index.d.ts
CHANGED
|
@@ -12,17 +12,23 @@
|
|
|
12
12
|
* Note: you must manually handle modal-manager, animating guard,
|
|
13
13
|
* passthrough, and teleport target when walking this layer.
|
|
14
14
|
*
|
|
15
|
-
* Layer 3 —
|
|
16
|
-
* Plugin
|
|
17
|
-
*
|
|
15
|
+
* Layer 3 — Custom Components (5% fully custom)
|
|
16
|
+
* Plugin builds its own components on top of the Layer 2 primitives and the
|
|
17
|
+
* --openpen-* design tokens. Plugins MUST NOT install or import reka-ui
|
|
18
|
+
* directly; headless primitives come only from this entry point.
|
|
18
19
|
*
|
|
19
20
|
* See docs/uikit/index.md for the full trade-off description.
|
|
20
21
|
*/
|
|
21
22
|
export { default as AppPopover } from './components/AppPopover.vue';
|
|
22
23
|
export type { AppPopoverProps, Placement } from './components/AppPopover.vue';
|
|
24
|
+
export { default as AppPopoverPanel } from './components/AppPopoverPanel.vue';
|
|
25
|
+
export { default as AppPopoverRow } from './components/AppPopoverRow.vue';
|
|
23
26
|
export { default as AppSlider } from './components/AppSlider.vue';
|
|
24
27
|
export { default as AppToggle } from './components/AppToggle.vue';
|
|
25
28
|
export { default as AppSegmented } from './components/AppSegmented.vue';
|
|
29
|
+
export { default as AppSwatchPicker } from './components/AppSwatchPicker.vue';
|
|
30
|
+
export type { SwatchColor } from './components/AppSwatchPicker.vue';
|
|
31
|
+
export { default as AppToggleButton } from './components/AppToggleButton.vue';
|
|
26
32
|
export { default as AppDialog } from './components/AppDialog.vue';
|
|
27
33
|
export type { AppDialogProps } from './components/AppDialog.vue';
|
|
28
34
|
export { useDialog } from './composables/useDialog';
|