@frontpanel/vue 0.3.0 → 0.4.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/README.md +3 -1
- package/dist/FpButtonGroup.vue.d.ts +18 -0
- package/dist/FpMenu.vue.d.ts +51 -0
- package/dist/FpMenuItem.vue.d.ts +26 -0
- package/dist/FpMenuSeparator.vue.d.ts +3 -0
- package/dist/icons.d.ts +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.js +299 -149
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -67,12 +67,14 @@ const playing = ref(false)
|
|
|
67
67
|
| `FpDevice` | The device: a molded body in a liquid-chrome rim on a backdrop. `fit="width"` or `"contain"` draws it at a design `width` and scales it to the room it has; the default `fit="none"` leaves layout to your page |
|
|
68
68
|
| `FpWindow` | A matte module with a chrome title bar: `title`, `level`, `closable` (emits `close`), an `actions` slot, and `sheet` for a phone bottom sheet |
|
|
69
69
|
| `FpButton` | A brushed-chrome push button; `pressed` makes it a toggle |
|
|
70
|
+
| `FpButtonGroup` | Chrome buttons joined into one bezel, as a named group |
|
|
71
|
+
| `FpMenu`, `FpMenuItem`, `FpMenuSeparator` | A faceplate menu that drops from the button in its `trigger` slot; rows emit `select`, or are links with `as="a"` |
|
|
70
72
|
| `FpGelButton` | The glossy gel pill, for the panel's main action |
|
|
71
73
|
| `FpCap` | A molded-plastic cap in `white`, `blue`, `amber`, `graphite` or `berry`; `pressed` holds it down with a ring |
|
|
72
74
|
| `FpLcd`, `FpLcdLine` | LCD glass, and a line of text on it with optional unlit segments (`ghost`, `cells`) and a left-to-right `redraw` |
|
|
73
75
|
| `FpLed` | A `green`, `amber` or `red` LED; `lit`, and `blink` to confirm an action |
|
|
74
76
|
| `FpHousing`, `FpWell`, `FpSilk`, `FpScrew` | A dark housing for LEDs, a recessed well, a silkscreened label, a screw head |
|
|
75
|
-
| `FpIcon` | A
|
|
77
|
+
| `FpIcon` | A 21-glyph 16 px pixel icon set (`fpIconNames`) |
|
|
76
78
|
|
|
77
79
|
Element components take Reka's `as` and `asChild`.
|
|
78
80
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { PrimitiveProps } from 'reka-ui';
|
|
2
|
+
export interface FpButtonGroupProps extends PrimitiveProps {
|
|
3
|
+
}
|
|
4
|
+
declare var __VLS_7: {};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
default?: (props: typeof __VLS_7) => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_base: import("vue").DefineComponent<FpButtonGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<FpButtonGroupProps> & Readonly<{}>, {
|
|
9
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
10
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export interface FpMenuProps {
|
|
2
|
+
/** The side of the trigger the plate drops on. It flips to the other side when there is no room. */
|
|
3
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
4
|
+
/** How the plate lines up with the trigger along that side. */
|
|
5
|
+
align?: 'start' | 'center' | 'end';
|
|
6
|
+
/**
|
|
7
|
+
* Shuts out the rest of the page while the menu is open: pointer events and scrolling outside it
|
|
8
|
+
* are blocked, and assistive tech reads only the menu.
|
|
9
|
+
*/
|
|
10
|
+
modal?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Where the plate is mounted, a selector or an element. It takes the skin of the nearest
|
|
13
|
+
* `data-fp-skin` around the trigger with it; a custom skin set on another selector needs `to`
|
|
14
|
+
* inside that element.
|
|
15
|
+
*/
|
|
16
|
+
to?: string | HTMLElement;
|
|
17
|
+
}
|
|
18
|
+
type __VLS_Props = FpMenuProps;
|
|
19
|
+
type __VLS_Slots = {
|
|
20
|
+
/**
|
|
21
|
+
* The button that opens the menu, such as an `FpButton`. It gets `aria-haspopup` and
|
|
22
|
+
* `aria-expanded`, which hold a chrome button down while the menu is open.
|
|
23
|
+
*/
|
|
24
|
+
trigger?: (props: {
|
|
25
|
+
open: boolean;
|
|
26
|
+
}) => unknown;
|
|
27
|
+
/** The menu's rows: `FpMenuItem` and `FpMenuSeparator`. */
|
|
28
|
+
default?: () => unknown;
|
|
29
|
+
};
|
|
30
|
+
type __VLS_ModelProps = {
|
|
31
|
+
'open'?: boolean;
|
|
32
|
+
};
|
|
33
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
34
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
35
|
+
"update:open": (value: boolean) => any;
|
|
36
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
37
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
38
|
+
}>, {
|
|
39
|
+
side: "left" | "right" | "bottom" | "top";
|
|
40
|
+
align: "center" | "start" | "end";
|
|
41
|
+
modal: boolean;
|
|
42
|
+
to: string | HTMLElement;
|
|
43
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
44
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
45
|
+
declare const _default: typeof __VLS_export;
|
|
46
|
+
export default _default;
|
|
47
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
48
|
+
new (): {
|
|
49
|
+
$slots: S;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { PrimitiveProps } from 'reka-ui';
|
|
2
|
+
export interface FpMenuItemProps extends PrimitiveProps {
|
|
3
|
+
/** Greys the row out; it can't be chosen. */
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
/** The text type-ahead matches, when the row's own text is not what a user would type. */
|
|
6
|
+
textValue?: string;
|
|
7
|
+
}
|
|
8
|
+
declare var __VLS_9: {};
|
|
9
|
+
type __VLS_Slots = {} & {
|
|
10
|
+
default?: (props: typeof __VLS_9) => any;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_base: import("vue").DefineComponent<FpMenuItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
|
+
select: (event: Event) => any;
|
|
14
|
+
}, string, import("vue").PublicProps, Readonly<FpMenuItemProps> & Readonly<{
|
|
15
|
+
onSelect?: ((event: Event) => any) | undefined;
|
|
16
|
+
}>, {
|
|
17
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
18
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
23
|
+
new (): {
|
|
24
|
+
$slots: S;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -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;
|
package/dist/icons.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type FpIconName = 'add' | 'saved' | 'settings' | 'help' | 'home' | 'undo' | 'redo' | 'save' | 'copy' | 'trash' | 'close' | 'grip' | 'left' | 'right' | 'quick' | 'grid' | 'go' | 'play' | 'menu';
|
|
1
|
+
export type FpIconName = 'add' | 'saved' | 'settings' | 'help' | 'home' | 'undo' | 'redo' | 'save' | 'copy' | 'trash' | 'close' | 'grip' | 'left' | 'right' | 'down' | 'quick' | 'grid' | 'go' | 'play' | 'menu' | 'power';
|
|
2
2
|
/** One path per glyph: every horizontal run of lit pixels becomes a 1 px tall rectangle. */
|
|
3
3
|
export declare function toPath(rows: readonly string[]): string;
|
|
4
4
|
/** Every icon name, in the order the set lists them. */
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export type { FpDeviceFit } from './fit';
|
|
2
2
|
export { default as FpButton } from './FpButton.vue';
|
|
3
3
|
export type { FpButtonProps } from './FpButton.vue';
|
|
4
|
+
export { default as FpButtonGroup } from './FpButtonGroup.vue';
|
|
5
|
+
export type { FpButtonGroupProps } from './FpButtonGroup.vue';
|
|
4
6
|
export { default as FpCap } from './FpCap.vue';
|
|
5
7
|
export type { FpCapColor, FpCapProps } from './FpCap.vue';
|
|
6
8
|
export { default as FpDevice } from './FpDevice.vue';
|
|
@@ -19,6 +21,11 @@ export { default as FpLcdLine } from './FpLcdLine.vue';
|
|
|
19
21
|
export type { FpLcdLineProps } from './FpLcdLine.vue';
|
|
20
22
|
export { default as FpLed } from './FpLed.vue';
|
|
21
23
|
export type { FpLedColor, FpLedProps } from './FpLed.vue';
|
|
24
|
+
export { default as FpMenu } from './FpMenu.vue';
|
|
25
|
+
export type { FpMenuProps } from './FpMenu.vue';
|
|
26
|
+
export { default as FpMenuItem } from './FpMenuItem.vue';
|
|
27
|
+
export type { FpMenuItemProps } from './FpMenuItem.vue';
|
|
28
|
+
export { default as FpMenuSeparator } from './FpMenuSeparator.vue';
|
|
22
29
|
export { default as FpMeter } from './FpMeter.vue';
|
|
23
30
|
export type { FpMeterProps } from './FpMeter.vue';
|
|
24
31
|
export { default as FpReadout } from './FpReadout.vue';
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, defineComponent as c, mergeModels as l, mergeProps as u, normalizeClass as d, normalizeStyle as f,
|
|
2
|
-
import { Primitive as
|
|
1
|
+
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, defineComponent as c, mergeModels as l, mergeProps as u, normalizeClass as d, normalizeStyle as f, onMounted as p, openBlock as m, ref as h, renderList as g, renderSlot as _, resolveDynamicComponent as v, shallowRef as y, toDisplayString as b, unref as x, useAttrs as S, useId as C, useModel as w, useTemplateRef as T, warn as E, watch as D, withCtx as O } from "vue";
|
|
2
|
+
import { DropdownMenuContent as k, DropdownMenuItem as A, DropdownMenuPortal as j, DropdownMenuRoot as ee, DropdownMenuSeparator as M, DropdownMenuTrigger as N, Primitive as P, SliderRoot as F, SliderThumb as I, SliderTrack as te, SwitchRoot as ne, SwitchThumb as re } from "reka-ui";
|
|
3
3
|
//#endregion
|
|
4
4
|
//#region src/FpButton.vue
|
|
5
|
-
var
|
|
5
|
+
var L = /* @__PURE__ */ c({
|
|
6
6
|
__name: "FpButton",
|
|
7
7
|
props: {
|
|
8
8
|
pressed: {
|
|
@@ -14,14 +14,14 @@ var j = /* @__PURE__ */ c({
|
|
|
14
14
|
},
|
|
15
15
|
setup(e) {
|
|
16
16
|
let t = e;
|
|
17
|
-
return (e, r) => (
|
|
17
|
+
return (e, r) => (m(), n(x(P), {
|
|
18
18
|
as: t.as,
|
|
19
19
|
"as-child": t.asChild,
|
|
20
20
|
class: "fp-chrome-btn",
|
|
21
21
|
type: t.as === "button" && !t.asChild ? "button" : void 0,
|
|
22
22
|
"aria-pressed": t.pressed
|
|
23
23
|
}, {
|
|
24
|
-
default:
|
|
24
|
+
default: O(() => [_(e.$slots, "default")]),
|
|
25
25
|
_: 3
|
|
26
26
|
}, 8, [
|
|
27
27
|
"as",
|
|
@@ -30,7 +30,25 @@ var j = /* @__PURE__ */ c({
|
|
|
30
30
|
"aria-pressed"
|
|
31
31
|
]));
|
|
32
32
|
}
|
|
33
|
-
}),
|
|
33
|
+
}), ie = /* @__PURE__ */ c({
|
|
34
|
+
__name: "FpButtonGroup",
|
|
35
|
+
props: {
|
|
36
|
+
asChild: { type: Boolean },
|
|
37
|
+
as: { default: "div" }
|
|
38
|
+
},
|
|
39
|
+
setup(e) {
|
|
40
|
+
let t = e;
|
|
41
|
+
return (e, r) => (m(), n(x(P), {
|
|
42
|
+
as: t.as,
|
|
43
|
+
"as-child": t.asChild,
|
|
44
|
+
class: "fp-button-group",
|
|
45
|
+
role: "group"
|
|
46
|
+
}, {
|
|
47
|
+
default: O(() => [_(e.$slots, "default")]),
|
|
48
|
+
_: 3
|
|
49
|
+
}, 8, ["as", "as-child"]));
|
|
50
|
+
}
|
|
51
|
+
}), ae = /* @__PURE__ */ c({
|
|
34
52
|
__name: "FpCap",
|
|
35
53
|
props: {
|
|
36
54
|
color: { default: "white" },
|
|
@@ -49,14 +67,14 @@ var j = /* @__PURE__ */ c({
|
|
|
49
67
|
graphite: "fp-cap-graphite",
|
|
50
68
|
berry: "fp-cap-berry"
|
|
51
69
|
};
|
|
52
|
-
return (e, i) => (
|
|
70
|
+
return (e, i) => (m(), n(x(P), {
|
|
53
71
|
as: t.as,
|
|
54
72
|
"as-child": t.asChild,
|
|
55
73
|
class: d(["fp-cap", r[t.color]]),
|
|
56
74
|
type: t.as === "button" && !t.asChild ? "button" : void 0,
|
|
57
75
|
"aria-pressed": t.pressed
|
|
58
76
|
}, {
|
|
59
|
-
default:
|
|
77
|
+
default: O(() => [_(e.$slots, "default")]),
|
|
60
78
|
_: 3
|
|
61
79
|
}, 8, [
|
|
62
80
|
"as",
|
|
@@ -69,7 +87,7 @@ var j = /* @__PURE__ */ c({
|
|
|
69
87
|
});
|
|
70
88
|
//#endregion
|
|
71
89
|
//#region src/fit.ts
|
|
72
|
-
function
|
|
90
|
+
function oe(e, t, n, r) {
|
|
73
91
|
if (t.width <= 0 || n.width <= 0) return null;
|
|
74
92
|
let i = t.width / n.width;
|
|
75
93
|
if (e === "contain") {
|
|
@@ -80,7 +98,7 @@ function re(e, t, n, r) {
|
|
|
80
98
|
}
|
|
81
99
|
//#endregion
|
|
82
100
|
//#region src/FpDevice.vue?vue&type=script&setup=true&lang.ts
|
|
83
|
-
var
|
|
101
|
+
var R = { class: "fp-device-body" }, z = /* @__PURE__ */ c({
|
|
84
102
|
__name: "FpDevice",
|
|
85
103
|
props: {
|
|
86
104
|
backdrop: {
|
|
@@ -97,14 +115,14 @@ var M = { class: "fp-device-body" }, N = /* @__PURE__ */ c({
|
|
|
97
115
|
maxScale: { default: 1 }
|
|
98
116
|
},
|
|
99
117
|
setup(e) {
|
|
100
|
-
let n = e, r =
|
|
118
|
+
let n = e, r = T("stage"), o = T("device"), s = y({
|
|
101
119
|
width: 0,
|
|
102
120
|
height: 0
|
|
103
|
-
}), c =
|
|
121
|
+
}), c = y(0), l = t(() => n.fit === "none" ? !1 : n.width !== void 0 || (E(`FpDevice: fit="${n.fit}" needs a design width; the device is not scaled.`), !1)), u = t(() => n.height ?? c.value), p = t(() => !l.value || n.fit === "none" ? null : oe(n.fit, s.value, {
|
|
104
122
|
width: n.width,
|
|
105
123
|
height: u.value
|
|
106
124
|
}, n.maxScale));
|
|
107
|
-
function
|
|
125
|
+
function h() {
|
|
108
126
|
if (!r.value || !o.value) return;
|
|
109
127
|
let e = getComputedStyle(r.value), t = (e) => Number.parseFloat(e) || 0;
|
|
110
128
|
s.value = {
|
|
@@ -112,23 +130,23 @@ var M = { class: "fp-device-body" }, N = /* @__PURE__ */ c({
|
|
|
112
130
|
height: r.value.clientHeight - t(e.paddingTop) - t(e.paddingBottom)
|
|
113
131
|
}, c.value = o.value.offsetHeight;
|
|
114
132
|
}
|
|
115
|
-
|
|
133
|
+
D([
|
|
116
134
|
l,
|
|
117
135
|
r,
|
|
118
136
|
o
|
|
119
137
|
], ([e, t, n], r, i) => {
|
|
120
138
|
if (!e || !t || !n || typeof ResizeObserver > "u") return;
|
|
121
|
-
let a = new ResizeObserver(
|
|
139
|
+
let a = new ResizeObserver(h);
|
|
122
140
|
a.observe(t), a.observe(n), i(() => a.disconnect());
|
|
123
141
|
}, {
|
|
124
142
|
flush: "post",
|
|
125
143
|
immediate: !0
|
|
126
144
|
});
|
|
127
|
-
let
|
|
145
|
+
let g = t(() => l.value ? { contain: "inline-size" } : void 0), v = t(() => {
|
|
128
146
|
if (!l.value) return { display: "contents" };
|
|
129
|
-
if (
|
|
130
|
-
width: `${n.width *
|
|
131
|
-
height: `${u.value *
|
|
147
|
+
if (p.value !== null) return {
|
|
148
|
+
width: `${n.width * p.value}px`,
|
|
149
|
+
height: `${u.value * p.value}px`,
|
|
132
150
|
marginInline: "auto"
|
|
133
151
|
};
|
|
134
152
|
}), b = t(() => {
|
|
@@ -136,31 +154,31 @@ var M = { class: "fp-device-body" }, N = /* @__PURE__ */ c({
|
|
|
136
154
|
boxSizing: "border-box",
|
|
137
155
|
width: `${n.width}px`,
|
|
138
156
|
height: n.height === void 0 ? void 0 : `${n.height}px`,
|
|
139
|
-
scale:
|
|
157
|
+
scale: p.value ?? void 0,
|
|
140
158
|
transformOrigin: "0 0",
|
|
141
|
-
visibility:
|
|
159
|
+
visibility: p.value === null ? "hidden" : void 0
|
|
142
160
|
};
|
|
143
161
|
});
|
|
144
|
-
return (e, t) => (
|
|
162
|
+
return (e, t) => (m(), i("div", {
|
|
145
163
|
ref_key: "stage",
|
|
146
164
|
ref: r,
|
|
147
165
|
class: d({ "fp-device-backdrop": n.backdrop }),
|
|
148
|
-
style: f(
|
|
149
|
-
}, [a("div", { style: f(
|
|
166
|
+
style: f(g.value)
|
|
167
|
+
}, [a("div", { style: f(v.value) }, [n.rim ? (m(), i("div", {
|
|
150
168
|
key: 0,
|
|
151
169
|
ref_key: "device",
|
|
152
170
|
ref: o,
|
|
153
171
|
class: "fp-device-rim",
|
|
154
172
|
style: f(b.value)
|
|
155
|
-
}, [a("div",
|
|
173
|
+
}, [a("div", R, [_(e.$slots, "default")])], 4)) : (m(), i("div", {
|
|
156
174
|
key: 1,
|
|
157
175
|
ref_key: "device",
|
|
158
176
|
ref: o,
|
|
159
177
|
class: "fp-device-body",
|
|
160
178
|
style: f(b.value)
|
|
161
|
-
}, [
|
|
179
|
+
}, [_(e.$slots, "default")], 4))], 4)], 6));
|
|
162
180
|
}
|
|
163
|
-
}),
|
|
181
|
+
}), B = /* @__PURE__ */ c({
|
|
164
182
|
__name: "FpGelButton",
|
|
165
183
|
props: {
|
|
166
184
|
asChild: { type: Boolean },
|
|
@@ -168,13 +186,13 @@ var M = { class: "fp-device-body" }, N = /* @__PURE__ */ c({
|
|
|
168
186
|
},
|
|
169
187
|
setup(e) {
|
|
170
188
|
let t = e;
|
|
171
|
-
return (e, r) => (
|
|
189
|
+
return (e, r) => (m(), n(x(P), {
|
|
172
190
|
as: t.as,
|
|
173
191
|
"as-child": t.asChild,
|
|
174
192
|
class: "fp-gel",
|
|
175
193
|
type: t.as === "button" && !t.asChild ? "button" : void 0
|
|
176
194
|
}, {
|
|
177
|
-
default:
|
|
195
|
+
default: O(() => [_(e.$slots, "default")]),
|
|
178
196
|
_: 3
|
|
179
197
|
}, 8, [
|
|
180
198
|
"as",
|
|
@@ -182,7 +200,7 @@ var M = { class: "fp-device-body" }, N = /* @__PURE__ */ c({
|
|
|
182
200
|
"type"
|
|
183
201
|
]));
|
|
184
202
|
}
|
|
185
|
-
}),
|
|
203
|
+
}), V = /* @__PURE__ */ c({
|
|
186
204
|
__name: "FpHousing",
|
|
187
205
|
props: {
|
|
188
206
|
asChild: { type: Boolean },
|
|
@@ -190,16 +208,16 @@ var M = { class: "fp-device-body" }, N = /* @__PURE__ */ c({
|
|
|
190
208
|
},
|
|
191
209
|
setup(e) {
|
|
192
210
|
let t = e;
|
|
193
|
-
return (e, r) => (
|
|
211
|
+
return (e, r) => (m(), n(x(P), {
|
|
194
212
|
as: t.as,
|
|
195
213
|
"as-child": t.asChild,
|
|
196
214
|
class: "fp-housing"
|
|
197
215
|
}, {
|
|
198
|
-
default:
|
|
216
|
+
default: O(() => [_(e.$slots, "default")]),
|
|
199
217
|
_: 3
|
|
200
218
|
}, 8, ["as", "as-child"]));
|
|
201
219
|
}
|
|
202
|
-
}),
|
|
220
|
+
}), H = [
|
|
203
221
|
"................",
|
|
204
222
|
"................",
|
|
205
223
|
".....#..........",
|
|
@@ -216,7 +234,7 @@ var M = { class: "fp-device-body" }, N = /* @__PURE__ */ c({
|
|
|
216
234
|
"................",
|
|
217
235
|
"................",
|
|
218
236
|
"................"
|
|
219
|
-
],
|
|
237
|
+
], U = [
|
|
220
238
|
"................",
|
|
221
239
|
"................",
|
|
222
240
|
".........##.....",
|
|
@@ -233,7 +251,7 @@ var M = { class: "fp-device-body" }, N = /* @__PURE__ */ c({
|
|
|
233
251
|
".........##.....",
|
|
234
252
|
"................",
|
|
235
253
|
"................"
|
|
236
|
-
],
|
|
254
|
+
], W = (e) => e.map((e) => [...e].reverse().join("")), G = {
|
|
237
255
|
add: [
|
|
238
256
|
"................",
|
|
239
257
|
"................",
|
|
@@ -270,8 +288,26 @@ var M = { class: "fp-device-body" }, N = /* @__PURE__ */ c({
|
|
|
270
288
|
"................",
|
|
271
289
|
"................"
|
|
272
290
|
],
|
|
273
|
-
left:
|
|
274
|
-
right:
|
|
291
|
+
left: U,
|
|
292
|
+
right: W(U),
|
|
293
|
+
down: [
|
|
294
|
+
"................",
|
|
295
|
+
"................",
|
|
296
|
+
"................",
|
|
297
|
+
"................",
|
|
298
|
+
"................",
|
|
299
|
+
"..##........##..",
|
|
300
|
+
"..###......###..",
|
|
301
|
+
"...###....###...",
|
|
302
|
+
"....###..###....",
|
|
303
|
+
".....######.....",
|
|
304
|
+
"......####......",
|
|
305
|
+
".......##.......",
|
|
306
|
+
"................",
|
|
307
|
+
"................",
|
|
308
|
+
"................",
|
|
309
|
+
"................"
|
|
310
|
+
],
|
|
275
311
|
go: [
|
|
276
312
|
"................",
|
|
277
313
|
"................",
|
|
@@ -308,8 +344,8 @@ var M = { class: "fp-device-body" }, N = /* @__PURE__ */ c({
|
|
|
308
344
|
"................",
|
|
309
345
|
"................"
|
|
310
346
|
],
|
|
311
|
-
undo:
|
|
312
|
-
redo:
|
|
347
|
+
undo: H,
|
|
348
|
+
redo: W(H),
|
|
313
349
|
home: [
|
|
314
350
|
"................",
|
|
315
351
|
".......##.......",
|
|
@@ -507,9 +543,27 @@ var M = { class: "fp-device-body" }, N = /* @__PURE__ */ c({
|
|
|
507
543
|
"................",
|
|
508
544
|
"................",
|
|
509
545
|
"................"
|
|
546
|
+
],
|
|
547
|
+
power: [
|
|
548
|
+
"................",
|
|
549
|
+
"................",
|
|
550
|
+
".......##.......",
|
|
551
|
+
".......##.......",
|
|
552
|
+
"...##..##..##...",
|
|
553
|
+
"..###..##..###..",
|
|
554
|
+
"..##...##...##..",
|
|
555
|
+
"..##...##...##..",
|
|
556
|
+
"..##........##..",
|
|
557
|
+
"..##........##..",
|
|
558
|
+
"..###......###..",
|
|
559
|
+
"...###....###...",
|
|
560
|
+
"....########....",
|
|
561
|
+
".....######.....",
|
|
562
|
+
"................",
|
|
563
|
+
"................"
|
|
510
564
|
]
|
|
511
565
|
};
|
|
512
|
-
function
|
|
566
|
+
function K(e) {
|
|
513
567
|
let t = "";
|
|
514
568
|
return e.forEach((e, n) => {
|
|
515
569
|
let r = 0;
|
|
@@ -525,27 +579,27 @@ function z(e) {
|
|
|
525
579
|
}
|
|
526
580
|
}), t;
|
|
527
581
|
}
|
|
528
|
-
var
|
|
582
|
+
var q = Object.keys(G), se = Object.fromEntries(q.map((e) => [e, K(G[e])])), ce = [
|
|
529
583
|
"role",
|
|
530
584
|
"aria-label",
|
|
531
585
|
"aria-hidden"
|
|
532
|
-
],
|
|
586
|
+
], le = ["d"], J = /* @__PURE__ */ c({
|
|
533
587
|
__name: "FpIcon",
|
|
534
588
|
props: {
|
|
535
589
|
name: {},
|
|
536
590
|
label: {}
|
|
537
591
|
},
|
|
538
592
|
setup(e) {
|
|
539
|
-
let n = e, r = t(() =>
|
|
540
|
-
return (e, t) => (
|
|
593
|
+
let n = e, r = t(() => se[n.name]);
|
|
594
|
+
return (e, t) => (m(), i("svg", {
|
|
541
595
|
viewBox: "0 0 16 16",
|
|
542
596
|
class: "fp-icon",
|
|
543
597
|
role: n.label ? "img" : void 0,
|
|
544
598
|
"aria-label": n.label || void 0,
|
|
545
599
|
"aria-hidden": n.label ? void 0 : "true"
|
|
546
|
-
}, [a("path", { d: r.value }, null, 8,
|
|
600
|
+
}, [a("path", { d: r.value }, null, 8, le)], 8, ce));
|
|
547
601
|
}
|
|
548
|
-
}),
|
|
602
|
+
}), ue = [
|
|
549
603
|
"tabindex",
|
|
550
604
|
"aria-valuemin",
|
|
551
605
|
"aria-valuemax",
|
|
@@ -553,7 +607,7 @@ var B = Object.keys(R), V = Object.fromEntries(B.map((e) => [e, z(R[e])])), H =
|
|
|
553
607
|
"aria-valuetext",
|
|
554
608
|
"aria-labelledby",
|
|
555
609
|
"aria-disabled"
|
|
556
|
-
],
|
|
610
|
+
], de = ["id"], fe = 200, pe = .1, Y = 270, me = /* @__PURE__ */ c({
|
|
557
611
|
inheritAttrs: !1,
|
|
558
612
|
__name: "FpKnob",
|
|
559
613
|
props: /*@__PURE__*/ l({
|
|
@@ -569,34 +623,34 @@ var B = Object.keys(R), V = Object.fromEntries(B.map((e) => [e, z(R[e])])), H =
|
|
|
569
623
|
}),
|
|
570
624
|
emits: /*@__PURE__*/ l(["valueCommit"], ["update:modelValue"]),
|
|
571
625
|
setup(e, { emit: n }) {
|
|
572
|
-
let o = e, s = n, c =
|
|
626
|
+
let o = e, s = n, c = w(e, "modelValue"), l = S(), d = t(() => ({
|
|
573
627
|
class: l.class,
|
|
574
628
|
style: l.style
|
|
575
|
-
})),
|
|
629
|
+
})), p = t(() => {
|
|
576
630
|
let { class: e, style: t, ...n } = l;
|
|
577
631
|
return n;
|
|
578
|
-
}), h =
|
|
632
|
+
}), h = C(), g = t(() => (String(o.step).split(".")[1] ?? "").length);
|
|
579
633
|
function _(e) {
|
|
580
634
|
let t = Math.round((e - o.min) / o.step) * o.step + o.min, n = Math.min(o.max, Math.max(o.min, t));
|
|
581
635
|
return Number(n.toFixed(g.value));
|
|
582
636
|
}
|
|
583
|
-
let
|
|
584
|
-
let e = o.max - o.min, t = e > 0 ? (
|
|
637
|
+
let v = t(() => _(c.value)), y = t(() => {
|
|
638
|
+
let e = o.max - o.min, t = e > 0 ? (v.value - o.min) / e : 0;
|
|
585
639
|
return Math.round(t * Y - Y / 2);
|
|
586
640
|
});
|
|
587
641
|
function T(e) {
|
|
588
642
|
let t = _(e);
|
|
589
|
-
return t !==
|
|
643
|
+
return t !== v.value && (c.value = t, !0);
|
|
590
644
|
}
|
|
591
645
|
function E(e) {
|
|
592
646
|
if (o.disabled) return;
|
|
593
647
|
let t = o.step * 10, n = {
|
|
594
|
-
ArrowUp:
|
|
595
|
-
ArrowRight:
|
|
596
|
-
ArrowDown:
|
|
597
|
-
ArrowLeft:
|
|
598
|
-
PageUp:
|
|
599
|
-
PageDown:
|
|
648
|
+
ArrowUp: v.value + o.step,
|
|
649
|
+
ArrowRight: v.value + o.step,
|
|
650
|
+
ArrowDown: v.value - o.step,
|
|
651
|
+
ArrowLeft: v.value - o.step,
|
|
652
|
+
PageUp: v.value + t,
|
|
653
|
+
PageDown: v.value - t,
|
|
600
654
|
Home: o.min,
|
|
601
655
|
End: o.max
|
|
602
656
|
}[e.key];
|
|
@@ -612,13 +666,13 @@ var B = Object.keys(R), V = Object.fromEntries(B.map((e) => [e, z(R[e])])), H =
|
|
|
612
666
|
}), D = {
|
|
613
667
|
pointerId: e.pointerId,
|
|
614
668
|
y: e.clientY,
|
|
615
|
-
raw:
|
|
616
|
-
start:
|
|
669
|
+
raw: v.value,
|
|
670
|
+
start: v.value
|
|
617
671
|
};
|
|
618
672
|
}
|
|
619
673
|
function k(e) {
|
|
620
674
|
if (!D || e.pointerId !== D.pointerId) return;
|
|
621
|
-
let t = (o.max - o.min) /
|
|
675
|
+
let t = (o.max - o.min) / fe * (e.shiftKey ? pe : 1);
|
|
622
676
|
D.raw = Math.min(o.max, Math.max(o.min, D.raw + (D.y - e.clientY) * t)), D.y = e.clientY, T(D.raw);
|
|
623
677
|
}
|
|
624
678
|
function A(e) {
|
|
@@ -626,15 +680,15 @@ var B = Object.keys(R), V = Object.fromEntries(B.map((e) => [e, z(R[e])])), H =
|
|
|
626
680
|
let t = _(D.raw), n = t !== D.start;
|
|
627
681
|
D = void 0, n && s("valueCommit", t);
|
|
628
682
|
}
|
|
629
|
-
return (e, t) => (
|
|
683
|
+
return (e, t) => (m(), i("div", u({ class: "fp-unit" }, d.value), [a("div", u(p.value, {
|
|
630
684
|
class: "fp-knob",
|
|
631
685
|
role: "slider",
|
|
632
686
|
tabindex: o.disabled ? void 0 : 0,
|
|
633
687
|
"aria-valuemin": o.min,
|
|
634
688
|
"aria-valuemax": o.max,
|
|
635
|
-
"aria-valuenow":
|
|
636
|
-
"aria-valuetext": o.valueText?.(
|
|
637
|
-
"aria-labelledby": o.label ?
|
|
689
|
+
"aria-valuenow": v.value,
|
|
690
|
+
"aria-valuetext": o.valueText?.(v.value),
|
|
691
|
+
"aria-labelledby": o.label ? x(h) : void 0,
|
|
638
692
|
"aria-disabled": o.disabled || void 0,
|
|
639
693
|
onKeydown: E,
|
|
640
694
|
onPointerdown: O,
|
|
@@ -643,14 +697,14 @@ var B = Object.keys(R), V = Object.fromEntries(B.map((e) => [e, z(R[e])])), H =
|
|
|
643
697
|
onPointercancel: A
|
|
644
698
|
}), [a("span", {
|
|
645
699
|
class: "fp-knob-mark",
|
|
646
|
-
style: f({ rotate: `${
|
|
647
|
-
}, null, 4)], 16,
|
|
700
|
+
style: f({ rotate: `${y.value}deg` })
|
|
701
|
+
}, null, 4)], 16, ue), o.label ? (m(), i("span", {
|
|
648
702
|
key: 0,
|
|
649
|
-
id:
|
|
703
|
+
id: x(h),
|
|
650
704
|
class: "fp-silk"
|
|
651
|
-
},
|
|
705
|
+
}, b(o.label), 9, de)) : r("", !0)], 16));
|
|
652
706
|
}
|
|
653
|
-
}),
|
|
707
|
+
}), he = /* @__PURE__ */ c({
|
|
654
708
|
__name: "FpLcd",
|
|
655
709
|
props: {
|
|
656
710
|
asChild: { type: Boolean },
|
|
@@ -658,20 +712,20 @@ var B = Object.keys(R), V = Object.fromEntries(B.map((e) => [e, z(R[e])])), H =
|
|
|
658
712
|
},
|
|
659
713
|
setup(e) {
|
|
660
714
|
let t = e;
|
|
661
|
-
return (e, r) => (
|
|
715
|
+
return (e, r) => (m(), n(x(P), {
|
|
662
716
|
as: t.as,
|
|
663
717
|
"as-child": t.asChild,
|
|
664
718
|
class: "fp-lcd"
|
|
665
719
|
}, {
|
|
666
|
-
default:
|
|
720
|
+
default: O(() => [_(e.$slots, "default")]),
|
|
667
721
|
_: 3
|
|
668
722
|
}, 8, ["as", "as-child"]));
|
|
669
723
|
}
|
|
670
|
-
}),
|
|
724
|
+
}), ge = {
|
|
671
725
|
key: 0,
|
|
672
726
|
class: "fp-lcd-ghost",
|
|
673
727
|
"aria-hidden": "true"
|
|
674
|
-
},
|
|
728
|
+
}, _e = { key: 2 }, ve = /* @__PURE__ */ c({
|
|
675
729
|
__name: "FpLcdLine",
|
|
676
730
|
props: {
|
|
677
731
|
text: {},
|
|
@@ -683,15 +737,15 @@ var B = Object.keys(R), V = Object.fromEntries(B.map((e) => [e, z(R[e])])), H =
|
|
|
683
737
|
},
|
|
684
738
|
setup(e) {
|
|
685
739
|
let a = e, o = t(() => "8".repeat(a.cells ?? a.text.length));
|
|
686
|
-
return (e, t) => (
|
|
740
|
+
return (e, t) => (m(), n(x(P), {
|
|
687
741
|
as: a.as,
|
|
688
742
|
"as-child": a.asChild,
|
|
689
743
|
class: "fp-lcd-line"
|
|
690
744
|
}, {
|
|
691
|
-
default:
|
|
745
|
+
default: O(() => [a.ghost ? (m(), i("span", ge, b(o.value), 1)) : r("", !0), a.redraw ? (m(), i("span", {
|
|
692
746
|
key: a.text,
|
|
693
747
|
class: "fp-lcd-redraw"
|
|
694
|
-
},
|
|
748
|
+
}, b(a.text), 1)) : (m(), i("span", _e, b(a.text), 1))]),
|
|
695
749
|
_: 1
|
|
696
750
|
}, 8, ["as", "as-child"]));
|
|
697
751
|
}
|
|
@@ -699,11 +753,11 @@ var B = Object.keys(R), V = Object.fromEntries(B.map((e) => [e, z(R[e])])), H =
|
|
|
699
753
|
flat: "fp-lens-flat",
|
|
700
754
|
diffused: "fp-lens-diffused",
|
|
701
755
|
clear: "fp-lens-clear"
|
|
702
|
-
},
|
|
756
|
+
}, ye = [
|
|
703
757
|
"role",
|
|
704
758
|
"aria-label",
|
|
705
759
|
"aria-hidden"
|
|
706
|
-
],
|
|
760
|
+
], be = /* @__PURE__ */ c({
|
|
707
761
|
__name: "FpLed",
|
|
708
762
|
props: {
|
|
709
763
|
color: { default: "green" },
|
|
@@ -718,10 +772,10 @@ var B = Object.keys(R), V = Object.fromEntries(B.map((e) => [e, z(R[e])])), H =
|
|
|
718
772
|
amber: "fp-led-amber",
|
|
719
773
|
red: "fp-led-red"
|
|
720
774
|
};
|
|
721
|
-
return (e, r) => (
|
|
775
|
+
return (e, r) => (m(), i("span", {
|
|
722
776
|
class: d(["fp-led", [
|
|
723
777
|
n[t.color],
|
|
724
|
-
t.lens &&
|
|
778
|
+
t.lens && x(X)[t.lens],
|
|
725
779
|
{
|
|
726
780
|
"fp-led-lit": t.lit,
|
|
727
781
|
"fp-blink-twice": t.lit && t.blink
|
|
@@ -730,16 +784,112 @@ var B = Object.keys(R), V = Object.fromEntries(B.map((e) => [e, z(R[e])])), H =
|
|
|
730
784
|
role: t.label ? "img" : void 0,
|
|
731
785
|
"aria-label": t.label || void 0,
|
|
732
786
|
"aria-hidden": t.label ? void 0 : "true"
|
|
733
|
-
}, null, 10,
|
|
787
|
+
}, null, 10, ye));
|
|
734
788
|
}
|
|
735
|
-
}),
|
|
789
|
+
}), xe = /* @__PURE__ */ c({
|
|
790
|
+
inheritAttrs: !1,
|
|
791
|
+
__name: "FpMenu",
|
|
792
|
+
props: /*@__PURE__*/ l({
|
|
793
|
+
side: { default: "bottom" },
|
|
794
|
+
align: { default: "start" },
|
|
795
|
+
modal: {
|
|
796
|
+
type: Boolean,
|
|
797
|
+
default: !0
|
|
798
|
+
},
|
|
799
|
+
to: { default: "body" }
|
|
800
|
+
}, {
|
|
801
|
+
open: {
|
|
802
|
+
type: Boolean,
|
|
803
|
+
default: !1
|
|
804
|
+
},
|
|
805
|
+
openModifiers: {}
|
|
806
|
+
}),
|
|
807
|
+
emits: ["update:open"],
|
|
808
|
+
setup(e) {
|
|
809
|
+
let t = e, r = w(e, "open"), i = S(), a = h(), o = h();
|
|
810
|
+
function c() {
|
|
811
|
+
let e = a.value?.$el;
|
|
812
|
+
o.value = e instanceof Element ? e.closest("[data-fp-skin]")?.getAttribute("data-fp-skin") ?? void 0 : void 0;
|
|
813
|
+
}
|
|
814
|
+
return D(r, (e) => {
|
|
815
|
+
e && c();
|
|
816
|
+
}), p(() => {
|
|
817
|
+
r.value && c();
|
|
818
|
+
}), (e, c) => (m(), n(x(ee), {
|
|
819
|
+
open: r.value,
|
|
820
|
+
"onUpdate:open": c[0] ||= (e) => r.value = e,
|
|
821
|
+
modal: t.modal
|
|
822
|
+
}, {
|
|
823
|
+
default: O(() => [s(x(N), {
|
|
824
|
+
ref_key: "trigger",
|
|
825
|
+
ref: a,
|
|
826
|
+
"as-child": ""
|
|
827
|
+
}, {
|
|
828
|
+
default: O(() => [_(e.$slots, "trigger", { open: r.value })]),
|
|
829
|
+
_: 3
|
|
830
|
+
}, 512), s(x(j), { to: t.to }, {
|
|
831
|
+
default: O(() => [s(x(k), u(x(i), {
|
|
832
|
+
class: "fp-menu",
|
|
833
|
+
"data-fp-skin": o.value,
|
|
834
|
+
side: t.side,
|
|
835
|
+
align: t.align,
|
|
836
|
+
"side-offset": 4,
|
|
837
|
+
"collision-padding": 8,
|
|
838
|
+
style: { maxHeight: "var(--reka-dropdown-menu-content-available-height)" }
|
|
839
|
+
}), {
|
|
840
|
+
default: O(() => [_(e.$slots, "default")]),
|
|
841
|
+
_: 3
|
|
842
|
+
}, 16, [
|
|
843
|
+
"data-fp-skin",
|
|
844
|
+
"side",
|
|
845
|
+
"align"
|
|
846
|
+
])]),
|
|
847
|
+
_: 3
|
|
848
|
+
}, 8, ["to"])]),
|
|
849
|
+
_: 3
|
|
850
|
+
}, 8, ["open", "modal"]));
|
|
851
|
+
}
|
|
852
|
+
}), Se = /* @__PURE__ */ c({
|
|
853
|
+
__name: "FpMenuItem",
|
|
854
|
+
props: {
|
|
855
|
+
disabled: { type: Boolean },
|
|
856
|
+
textValue: {},
|
|
857
|
+
asChild: { type: Boolean },
|
|
858
|
+
as: { default: "div" }
|
|
859
|
+
},
|
|
860
|
+
emits: ["select"],
|
|
861
|
+
setup(e, { emit: t }) {
|
|
862
|
+
let r = e, i = t;
|
|
863
|
+
return (e, t) => (m(), n(x(A), {
|
|
864
|
+
as: r.as,
|
|
865
|
+
"as-child": r.asChild,
|
|
866
|
+
disabled: r.disabled,
|
|
867
|
+
"text-value": r.textValue,
|
|
868
|
+
class: "fp-menu-item",
|
|
869
|
+
onSelect: t[0] ||= (e) => i("select", e)
|
|
870
|
+
}, {
|
|
871
|
+
default: O(() => [_(e.$slots, "default")]),
|
|
872
|
+
_: 3
|
|
873
|
+
}, 8, [
|
|
874
|
+
"as",
|
|
875
|
+
"as-child",
|
|
876
|
+
"disabled",
|
|
877
|
+
"text-value"
|
|
878
|
+
]));
|
|
879
|
+
}
|
|
880
|
+
}), Ce = /* @__PURE__ */ c({
|
|
881
|
+
__name: "FpMenuSeparator",
|
|
882
|
+
setup(e) {
|
|
883
|
+
return (e, t) => (m(), n(x(M), { class: "fp-menu-separator" }));
|
|
884
|
+
}
|
|
885
|
+
}), we = [
|
|
736
886
|
"data-orientation",
|
|
737
887
|
"aria-valuemin",
|
|
738
888
|
"aria-valuemax",
|
|
739
889
|
"aria-valuenow",
|
|
740
890
|
"aria-valuetext",
|
|
741
891
|
"aria-labelledby"
|
|
742
|
-
],
|
|
892
|
+
], Te = ["id"], Ee = /* @__PURE__ */ c({
|
|
743
893
|
inheritAttrs: !1,
|
|
744
894
|
__name: "FpMeter",
|
|
745
895
|
props: {
|
|
@@ -755,44 +905,44 @@ var B = Object.keys(R), V = Object.fromEntries(B.map((e) => [e, z(R[e])])), H =
|
|
|
755
905
|
valueText: {}
|
|
756
906
|
},
|
|
757
907
|
setup(e) {
|
|
758
|
-
let n = e, o =
|
|
908
|
+
let n = e, o = S(), s = t(() => ({
|
|
759
909
|
class: o.class,
|
|
760
910
|
style: o.style
|
|
761
911
|
})), c = t(() => {
|
|
762
912
|
let { class: e, style: t, ...n } = o;
|
|
763
913
|
return n;
|
|
764
|
-
}), l =
|
|
914
|
+
}), l = C(), d = t(() => Math.min(n.max, Math.max(n.min, n.value)));
|
|
765
915
|
function f(e) {
|
|
766
916
|
let t = n.max - n.min;
|
|
767
917
|
return t > 0 ? Math.min(1, Math.max(0, (e - n.min) / t)) : 0;
|
|
768
918
|
}
|
|
769
|
-
function
|
|
919
|
+
function p(e, t) {
|
|
770
920
|
return t(f(e) * n.segments + 1e-9) / n.segments;
|
|
771
921
|
}
|
|
772
922
|
let h = t(() => {
|
|
773
923
|
let e = n.max - n.min;
|
|
774
924
|
return {
|
|
775
|
-
"--fp-meter-level": String(
|
|
925
|
+
"--fp-meter-level": String(p(d.value, Math.floor)),
|
|
776
926
|
"--fp-meter-segments": String(n.segments),
|
|
777
|
-
"--fp-meter-amber": String(
|
|
778
|
-
"--fp-meter-red": String(
|
|
927
|
+
"--fp-meter-amber": String(p(n.amberAt ?? n.min + e * .7, Math.round)),
|
|
928
|
+
"--fp-meter-red": String(p(n.redAt ?? n.min + e * .9, Math.round))
|
|
779
929
|
};
|
|
780
930
|
});
|
|
781
|
-
return (e, t) => (
|
|
782
|
-
class: ["fp-meter", n.lens &&
|
|
931
|
+
return (e, t) => (m(), i("div", u({ class: "fp-unit" }, s.value), [a("div", u(c.value, {
|
|
932
|
+
class: ["fp-meter", n.lens && x(X)[n.lens]],
|
|
783
933
|
role: "meter",
|
|
784
934
|
"data-orientation": n.orientation,
|
|
785
935
|
"aria-valuemin": n.min,
|
|
786
936
|
"aria-valuemax": n.max,
|
|
787
937
|
"aria-valuenow": d.value,
|
|
788
938
|
"aria-valuetext": n.valueText?.(d.value),
|
|
789
|
-
"aria-labelledby": n.label ?
|
|
939
|
+
"aria-labelledby": n.label ? x(l) : void 0,
|
|
790
940
|
style: h.value
|
|
791
|
-
}), null, 16,
|
|
941
|
+
}), null, 16, we), n.label ? (m(), i("span", {
|
|
792
942
|
key: 0,
|
|
793
|
-
id:
|
|
943
|
+
id: x(l),
|
|
794
944
|
class: "fp-silk"
|
|
795
|
-
},
|
|
945
|
+
}, b(n.label), 9, Te)) : r("", !0)], 16));
|
|
796
946
|
}
|
|
797
947
|
}), Z = {
|
|
798
948
|
0: "abcdef",
|
|
@@ -838,10 +988,10 @@ function Q(e) {
|
|
|
838
988
|
}
|
|
839
989
|
//#endregion
|
|
840
990
|
//#region src/FpReadout.vue?vue&type=script&setup=true&lang.ts
|
|
841
|
-
var
|
|
991
|
+
var De = { class: "fp-readout-text" }, Oe = ["data-colon"], ke = { class: "fp-readout-lit" }, Ae = ["data-segment"], je = {
|
|
842
992
|
key: 0,
|
|
843
993
|
"data-segment": "dp"
|
|
844
|
-
},
|
|
994
|
+
}, Me = /* @__PURE__ */ c({
|
|
845
995
|
__name: "FpReadout",
|
|
846
996
|
props: {
|
|
847
997
|
value: {},
|
|
@@ -876,25 +1026,25 @@ var he = { class: "fp-readout-text" }, ge = ["data-colon"], _e = { class: "fp-re
|
|
|
876
1026
|
dot: !1
|
|
877
1027
|
})), ...e];
|
|
878
1028
|
});
|
|
879
|
-
return (t, n) => (
|
|
1029
|
+
return (t, n) => (m(), i("span", { class: d(["fp-readout", [s[o.color], o.lens && x(X)[o.lens]]]) }, [a("span", De, b(o.valueText ? o.valueText(c.value) : c.value), 1), (m(!0), i(e, null, g(l.value, (t, o) => (m(), i("span", {
|
|
880
1030
|
key: o,
|
|
881
1031
|
class: "fp-readout-cell",
|
|
882
1032
|
"data-colon": t.colon ? "" : void 0,
|
|
883
1033
|
"aria-hidden": "true"
|
|
884
|
-
}, [a("span",
|
|
1034
|
+
}, [a("span", ke, [t.colon ? (m(), i(e, { key: 0 }, [n[0] ||= a("span", { "data-segment": "colon-upper" }, null, -1), n[1] ||= a("span", { "data-segment": "colon-lower" }, null, -1)], 64)) : (m(), i(e, { key: 1 }, [(m(!0), i(e, null, g(t.lit, (e) => (m(), i("span", {
|
|
885
1035
|
key: e,
|
|
886
1036
|
"data-segment": e
|
|
887
|
-
}, null, 8,
|
|
1037
|
+
}, null, 8, Ae))), 128)), t.dot ? (m(), i("span", je)) : r("", !0)], 64))])], 8, Oe))), 128))], 2));
|
|
888
1038
|
}
|
|
889
|
-
}),
|
|
1039
|
+
}), Ne = {
|
|
890
1040
|
class: "fp-screw",
|
|
891
1041
|
"aria-hidden": "true"
|
|
892
|
-
},
|
|
1042
|
+
}, Pe = /* @__PURE__ */ c({
|
|
893
1043
|
__name: "FpScrew",
|
|
894
1044
|
setup(e) {
|
|
895
|
-
return (e, t) => (
|
|
1045
|
+
return (e, t) => (m(), i("span", Ne));
|
|
896
1046
|
}
|
|
897
|
-
}),
|
|
1047
|
+
}), $ = /* @__PURE__ */ c({
|
|
898
1048
|
__name: "FpSilk",
|
|
899
1049
|
props: {
|
|
900
1050
|
asChild: { type: Boolean },
|
|
@@ -902,16 +1052,16 @@ var he = { class: "fp-readout-text" }, ge = ["data-colon"], _e = { class: "fp-re
|
|
|
902
1052
|
},
|
|
903
1053
|
setup(e) {
|
|
904
1054
|
let t = e;
|
|
905
|
-
return (e, r) => (
|
|
1055
|
+
return (e, r) => (m(), n(x(P), {
|
|
906
1056
|
as: t.as,
|
|
907
1057
|
"as-child": t.asChild,
|
|
908
1058
|
class: "fp-silk"
|
|
909
1059
|
}, {
|
|
910
|
-
default:
|
|
1060
|
+
default: O(() => [_(e.$slots, "default")]),
|
|
911
1061
|
_: 3
|
|
912
1062
|
}, 8, ["as", "as-child"]));
|
|
913
1063
|
}
|
|
914
|
-
}),
|
|
1064
|
+
}), Fe = ["id"], Ie = /* @__PURE__ */ c({
|
|
915
1065
|
inheritAttrs: !1,
|
|
916
1066
|
__name: "FpSlider",
|
|
917
1067
|
props: /*@__PURE__*/ l({
|
|
@@ -928,31 +1078,31 @@ var he = { class: "fp-readout-text" }, ge = ["data-colon"], _e = { class: "fp-re
|
|
|
928
1078
|
}),
|
|
929
1079
|
emits: /*@__PURE__*/ l(["valueCommit"], ["update:modelValue"]),
|
|
930
1080
|
setup(e, { emit: n }) {
|
|
931
|
-
let a = e, o = n, c =
|
|
1081
|
+
let a = e, o = n, c = w(e, "modelValue"), l = S(), d = t(() => ({
|
|
932
1082
|
class: l.class,
|
|
933
1083
|
style: l.style
|
|
934
1084
|
})), f = t(() => {
|
|
935
1085
|
let { class: e, style: t, ...n } = l;
|
|
936
1086
|
return n;
|
|
937
|
-
}),
|
|
1087
|
+
}), p = C(), h = t(() => [c.value]);
|
|
938
1088
|
function g(e) {
|
|
939
1089
|
e?.[0] !== void 0 && (c.value = e[0]);
|
|
940
1090
|
}
|
|
941
|
-
let _ =
|
|
942
|
-
function
|
|
1091
|
+
let _ = T("unit");
|
|
1092
|
+
function v(e) {
|
|
943
1093
|
a.disabled || e.button !== 0 || _.value?.querySelector("[role=\"slider\"]")?.focus({
|
|
944
1094
|
preventScroll: !0,
|
|
945
1095
|
focusVisible: !1
|
|
946
1096
|
});
|
|
947
1097
|
}
|
|
948
|
-
function
|
|
1098
|
+
function y(e) {
|
|
949
1099
|
e[0] !== void 0 && o("valueCommit", e[0]);
|
|
950
1100
|
}
|
|
951
|
-
return (e, t) => (
|
|
1101
|
+
return (e, t) => (m(), i("div", u({
|
|
952
1102
|
ref_key: "unit",
|
|
953
1103
|
ref: _,
|
|
954
1104
|
class: "fp-unit"
|
|
955
|
-
}, d.value, { onPointerdownCapture:
|
|
1105
|
+
}, d.value, { onPointerdownCapture: v }), [s(x(F), {
|
|
956
1106
|
class: "fp-fader",
|
|
957
1107
|
"model-value": h.value,
|
|
958
1108
|
min: a.min,
|
|
@@ -961,12 +1111,12 @@ var he = { class: "fp-readout-text" }, ge = ["data-colon"], _e = { class: "fp-re
|
|
|
961
1111
|
orientation: a.orientation,
|
|
962
1112
|
disabled: a.disabled,
|
|
963
1113
|
"onUpdate:modelValue": g,
|
|
964
|
-
onValueCommit:
|
|
1114
|
+
onValueCommit: y
|
|
965
1115
|
}, {
|
|
966
|
-
default:
|
|
1116
|
+
default: O(() => [s(x(te), { class: "fp-fader-slot" }), s(x(I), u(f.value, {
|
|
967
1117
|
class: "fp-fader-cap",
|
|
968
1118
|
"aria-valuetext": a.valueText?.(c.value),
|
|
969
|
-
"aria-labelledby": a.label ?
|
|
1119
|
+
"aria-labelledby": a.label ? x(p) : void 0,
|
|
970
1120
|
"aria-disabled": a.disabled || void 0
|
|
971
1121
|
}), null, 16, [
|
|
972
1122
|
"aria-valuetext",
|
|
@@ -981,13 +1131,13 @@ var he = { class: "fp-readout-text" }, ge = ["data-colon"], _e = { class: "fp-re
|
|
|
981
1131
|
"step",
|
|
982
1132
|
"orientation",
|
|
983
1133
|
"disabled"
|
|
984
|
-
]), a.label ? (
|
|
1134
|
+
]), a.label ? (m(), i("span", {
|
|
985
1135
|
key: 0,
|
|
986
|
-
id:
|
|
1136
|
+
id: x(p),
|
|
987
1137
|
class: "fp-silk"
|
|
988
|
-
},
|
|
1138
|
+
}, b(a.label), 9, Fe)) : r("", !0)], 16));
|
|
989
1139
|
}
|
|
990
|
-
}),
|
|
1140
|
+
}), Le = ["data-label-placement"], Re = ["id"], ze = /* @__PURE__ */ c({
|
|
991
1141
|
inheritAttrs: !1,
|
|
992
1142
|
__name: "FpSwitch",
|
|
993
1143
|
props: /*@__PURE__*/ l({
|
|
@@ -1009,26 +1159,26 @@ var he = { class: "fp-readout-text" }, ge = ["data-colon"], _e = { class: "fp-re
|
|
|
1009
1159
|
green: "fp-led-green",
|
|
1010
1160
|
amber: "fp-led-amber",
|
|
1011
1161
|
red: "fp-led-red"
|
|
1012
|
-
}, c =
|
|
1162
|
+
}, c = w(e, "modelValue"), l = C(), d = S(), f = t(() => ({
|
|
1013
1163
|
class: d.class,
|
|
1014
1164
|
style: d.style
|
|
1015
|
-
})),
|
|
1165
|
+
})), p = t(() => {
|
|
1016
1166
|
let { class: e, style: t, ...n } = d;
|
|
1017
1167
|
return n;
|
|
1018
1168
|
});
|
|
1019
|
-
return (e, t) => (
|
|
1169
|
+
return (e, t) => (m(), i("div", u({
|
|
1020
1170
|
class: "fp-unit",
|
|
1021
1171
|
"data-label-placement": n.labelPlacement
|
|
1022
|
-
}, f.value), [s(
|
|
1172
|
+
}, f.value), [s(x(ne), u(p.value, {
|
|
1023
1173
|
modelValue: c.value,
|
|
1024
1174
|
"onUpdate:modelValue": t[0] ||= (e) => c.value = e,
|
|
1025
1175
|
class: ["fp-switch", o[n.color]],
|
|
1026
1176
|
"data-orientation": n.orientation,
|
|
1027
1177
|
disabled: n.disabled,
|
|
1028
|
-
"aria-labelledby": n.label ?
|
|
1178
|
+
"aria-labelledby": n.label ? x(l) : void 0
|
|
1029
1179
|
}), {
|
|
1030
|
-
default:
|
|
1031
|
-
default:
|
|
1180
|
+
default: O(() => [s(x(re), { class: "fp-switch-rocker" }, {
|
|
1181
|
+
default: O(() => [...t[1] ||= [a("span", { class: "fp-switch-lamp" }, null, -1), a("span", { class: "fp-switch-face" }, null, -1)]]),
|
|
1032
1182
|
_: 1
|
|
1033
1183
|
})]),
|
|
1034
1184
|
_: 1
|
|
@@ -1038,13 +1188,13 @@ var he = { class: "fp-readout-text" }, ge = ["data-colon"], _e = { class: "fp-re
|
|
|
1038
1188
|
"data-orientation",
|
|
1039
1189
|
"disabled",
|
|
1040
1190
|
"aria-labelledby"
|
|
1041
|
-
]), n.label ? (
|
|
1191
|
+
]), n.label ? (m(), i("span", {
|
|
1042
1192
|
key: 0,
|
|
1043
|
-
id:
|
|
1193
|
+
id: x(l),
|
|
1044
1194
|
class: "fp-silk"
|
|
1045
|
-
},
|
|
1195
|
+
}, b(n.label), 9, Re)) : r("", !0)], 16, Le));
|
|
1046
1196
|
}
|
|
1047
|
-
}),
|
|
1197
|
+
}), Be = /* @__PURE__ */ c({
|
|
1048
1198
|
__name: "FpWell",
|
|
1049
1199
|
props: {
|
|
1050
1200
|
asChild: { type: Boolean },
|
|
@@ -1052,16 +1202,16 @@ var he = { class: "fp-readout-text" }, ge = ["data-colon"], _e = { class: "fp-re
|
|
|
1052
1202
|
},
|
|
1053
1203
|
setup(e) {
|
|
1054
1204
|
let t = e;
|
|
1055
|
-
return (e, r) => (
|
|
1205
|
+
return (e, r) => (m(), n(x(P), {
|
|
1056
1206
|
as: t.as,
|
|
1057
1207
|
"as-child": t.asChild,
|
|
1058
1208
|
class: "fp-well"
|
|
1059
1209
|
}, {
|
|
1060
|
-
default:
|
|
1210
|
+
default: O(() => [_(e.$slots, "default")]),
|
|
1061
1211
|
_: 3
|
|
1062
1212
|
}, 8, ["as", "as-child"]));
|
|
1063
1213
|
}
|
|
1064
|
-
}),
|
|
1214
|
+
}), Ve = { class: "fp-module-title" }, He = /* @__PURE__ */ c({
|
|
1065
1215
|
__name: "FpWindow",
|
|
1066
1216
|
props: {
|
|
1067
1217
|
as: { default: "section" },
|
|
@@ -1074,30 +1224,30 @@ var he = { class: "fp-readout-text" }, ge = ["data-colon"], _e = { class: "fp-re
|
|
|
1074
1224
|
},
|
|
1075
1225
|
emits: ["close"],
|
|
1076
1226
|
setup(e, { emit: t }) {
|
|
1077
|
-
let i = e, c = t, l =
|
|
1078
|
-
return (e, t) => (
|
|
1227
|
+
let i = e, c = t, l = C();
|
|
1228
|
+
return (e, t) => (m(), n(x(P), {
|
|
1079
1229
|
as: i.as,
|
|
1080
1230
|
class: d(["fp-window", [i.sheet ? "fp-sheet-panel" : "fp-module"]]),
|
|
1081
|
-
"aria-labelledby":
|
|
1231
|
+
"aria-labelledby": x(l)
|
|
1082
1232
|
}, {
|
|
1083
|
-
default:
|
|
1084
|
-
(
|
|
1085
|
-
id:
|
|
1233
|
+
default: O(() => [a("div", Ve, [
|
|
1234
|
+
(m(), n(v(`h${i.level}`), {
|
|
1235
|
+
id: x(l),
|
|
1086
1236
|
class: "fp-silk fp-window-title"
|
|
1087
1237
|
}, {
|
|
1088
|
-
default:
|
|
1238
|
+
default: O(() => [o(b(i.title), 1)]),
|
|
1089
1239
|
_: 1
|
|
1090
1240
|
}, 8, ["id"])),
|
|
1091
|
-
|
|
1092
|
-
i.closable ? (
|
|
1241
|
+
_(e.$slots, "actions"),
|
|
1242
|
+
i.closable ? (m(), n(L, {
|
|
1093
1243
|
key: 0,
|
|
1094
1244
|
"aria-label": i.closeLabel ?? `Close ${i.title}`,
|
|
1095
1245
|
onClick: t[0] ||= (e) => c("close")
|
|
1096
1246
|
}, {
|
|
1097
|
-
default:
|
|
1247
|
+
default: O(() => [s(J, { name: "close" })]),
|
|
1098
1248
|
_: 1
|
|
1099
1249
|
}, 8, ["aria-label"])) : r("", !0)
|
|
1100
|
-
]), a("div", { class: d(i.flush ? void 0 : "fp-window-body") }, [
|
|
1250
|
+
]), a("div", { class: d(i.flush ? void 0 : "fp-window-body") }, [_(e.$slots, "default")], 2)]),
|
|
1101
1251
|
_: 3
|
|
1102
1252
|
}, 8, [
|
|
1103
1253
|
"as",
|
|
@@ -1107,4 +1257,4 @@ var he = { class: "fp-readout-text" }, ge = ["data-colon"], _e = { class: "fp-re
|
|
|
1107
1257
|
}
|
|
1108
1258
|
});
|
|
1109
1259
|
//#endregion
|
|
1110
|
-
export {
|
|
1260
|
+
export { L as FpButton, ie as FpButtonGroup, ae as FpCap, z as FpDevice, B as FpGelButton, V as FpHousing, J as FpIcon, me as FpKnob, he as FpLcd, ve as FpLcdLine, be as FpLed, xe as FpMenu, Se as FpMenuItem, Ce as FpMenuSeparator, Ee as FpMeter, Me as FpReadout, Pe as FpScrew, $ as FpSilk, Ie as FpSlider, ze as FpSwitch, Be as FpWell, He as FpWindow, q as fpIconNames, Q as fpReadoutGlyph };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontpanel/vue",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.4.0",
|
|
5
5
|
"description": "Vue 3 components for the Frontpanel early-2000s hardware skin: a scale-to-fit device frame, windows, chrome and gel buttons, caps, LCDs and LEDs, built on Reka UI.",
|
|
6
6
|
"author": "Dulan Katukurundage",
|
|
7
7
|
"license": "MIT",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"reka-ui": "^2.11.0",
|
|
39
|
-
"@frontpanel/css": "^0.
|
|
39
|
+
"@frontpanel/css": "^0.4.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@tailwindcss/oxide": "^4.3.3",
|