@frontpanel/vue 0.2.0 → 0.3.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 CHANGED
@@ -72,7 +72,7 @@ const playing = ref(false)
72
72
  | `FpLcd`, `FpLcdLine` | LCD glass, and a line of text on it with optional unlit segments (`ghost`, `cells`) and a left-to-right `redraw` |
73
73
  | `FpLed` | A `green`, `amber` or `red` LED; `lit`, and `blink` to confirm an action |
74
74
  | `FpHousing`, `FpWell`, `FpSilk`, `FpScrew` | A dark housing for LEDs, a recessed well, a silkscreened label, a screw head |
75
- | `FpIcon` | An 18-glyph 16 px pixel icon set (`fpIconNames`) |
75
+ | `FpIcon` | A 19-glyph 16 px pixel icon set (`fpIconNames`) |
76
76
 
77
77
  Element components take Reka's `as` and `asChild`.
78
78
 
@@ -0,0 +1,28 @@
1
+ import type { FpLedColor } from './FpLed.vue';
2
+ export interface FpSwitchProps {
3
+ /** A silkscreen label, which also names the switch. Without one, give it an `aria-label`. */
4
+ label?: string;
5
+ /** Where the label sits: under the switch, or level with it and before it in the line. */
6
+ labelPlacement?: 'below' | 'start';
7
+ /** Standing up, I at the top; or on its side, I on the right. */
8
+ orientation?: 'vertical' | 'horizontal';
9
+ /** The colour its lamp lights in. */
10
+ color?: FpLedColor;
11
+ disabled?: boolean;
12
+ }
13
+ type __VLS_Props = FpSwitchProps;
14
+ type __VLS_ModelProps = {
15
+ modelValue?: boolean;
16
+ };
17
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
18
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
19
+ "update:modelValue": (value: boolean) => any;
20
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
21
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
22
+ }>, {
23
+ color: FpLedColor;
24
+ orientation: "vertical" | "horizontal";
25
+ labelPlacement: "start" | "below";
26
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
27
+ declare const _default: typeof __VLS_export;
28
+ 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' | 'menu';
1
+ export type FpIconName = 'add' | 'saved' | 'settings' | 'help' | 'home' | 'undo' | 'redo' | 'save' | 'copy' | 'trash' | 'close' | 'grip' | 'left' | 'right' | 'quick' | 'grid' | 'go' | 'play' | 'menu';
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
@@ -28,6 +28,8 @@ export { default as FpSilk } from './FpSilk.vue';
28
28
  export type { FpSilkProps } from './FpSilk.vue';
29
29
  export { default as FpSlider } from './FpSlider.vue';
30
30
  export type { FpSliderProps } from './FpSlider.vue';
31
+ export { default as FpSwitch } from './FpSwitch.vue';
32
+ export type { FpSwitchProps } from './FpSwitch.vue';
31
33
  export { default as FpWell } from './FpWell.vue';
32
34
  export type { FpWellProps } from './FpWell.vue';
33
35
  export { default as FpWindow } from './FpWindow.vue';
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
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, openBlock as p, renderList as m, renderSlot as h, resolveDynamicComponent as g, shallowRef as _, toDisplayString as v, unref as y, useAttrs as b, useId as x, useModel as S, useTemplateRef as C, warn as w, watch as T, withCtx as E } from "vue";
2
- import { Primitive as D, SliderRoot as O, SliderThumb as k, SliderTrack as A } from "reka-ui";
2
+ import { Primitive as D, SliderRoot as O, SliderThumb as k, SliderTrack as A, SwitchRoot as ee, SwitchThumb as te } from "reka-ui";
3
3
  //#endregion
4
4
  //#region src/FpButton.vue
5
5
  var j = /* @__PURE__ */ c({
@@ -30,7 +30,7 @@ var j = /* @__PURE__ */ c({
30
30
  "aria-pressed"
31
31
  ]));
32
32
  }
33
- }), M = /* @__PURE__ */ c({
33
+ }), ne = /* @__PURE__ */ c({
34
34
  __name: "FpCap",
35
35
  props: {
36
36
  color: { default: "white" },
@@ -69,7 +69,7 @@ var j = /* @__PURE__ */ c({
69
69
  });
70
70
  //#endregion
71
71
  //#region src/fit.ts
72
- function ee(e, t, n, r) {
72
+ function re(e, t, n, r) {
73
73
  if (t.width <= 0 || n.width <= 0) return null;
74
74
  let i = t.width / n.width;
75
75
  if (e === "contain") {
@@ -80,7 +80,7 @@ function ee(e, t, n, r) {
80
80
  }
81
81
  //#endregion
82
82
  //#region src/FpDevice.vue?vue&type=script&setup=true&lang.ts
83
- var te = { class: "fp-device-body" }, ne = /* @__PURE__ */ c({
83
+ var M = { class: "fp-device-body" }, N = /* @__PURE__ */ c({
84
84
  __name: "FpDevice",
85
85
  props: {
86
86
  backdrop: {
@@ -100,7 +100,7 @@ var te = { class: "fp-device-body" }, ne = /* @__PURE__ */ c({
100
100
  let n = e, r = C("stage"), o = C("device"), s = _({
101
101
  width: 0,
102
102
  height: 0
103
- }), c = _(0), l = t(() => n.fit === "none" ? !1 : n.width !== void 0 || (w(`FpDevice: fit="${n.fit}" needs a design width; the device is not scaled.`), !1)), u = t(() => n.height ?? c.value), m = t(() => !l.value || n.fit === "none" ? null : ee(n.fit, s.value, {
103
+ }), c = _(0), l = t(() => n.fit === "none" ? !1 : n.width !== void 0 || (w(`FpDevice: fit="${n.fit}" needs a design width; the device is not scaled.`), !1)), u = t(() => n.height ?? c.value), m = t(() => !l.value || n.fit === "none" ? null : re(n.fit, s.value, {
104
104
  width: n.width,
105
105
  height: u.value
106
106
  }, n.maxScale));
@@ -152,7 +152,7 @@ var te = { class: "fp-device-body" }, ne = /* @__PURE__ */ c({
152
152
  ref: o,
153
153
  class: "fp-device-rim",
154
154
  style: f(b.value)
155
- }, [a("div", te, [h(e.$slots, "default")])], 4)) : (p(), i("div", {
155
+ }, [a("div", M, [h(e.$slots, "default")])], 4)) : (p(), i("div", {
156
156
  key: 1,
157
157
  ref_key: "device",
158
158
  ref: o,
@@ -160,7 +160,7 @@ var te = { class: "fp-device-body" }, ne = /* @__PURE__ */ c({
160
160
  style: f(b.value)
161
161
  }, [h(e.$slots, "default")], 4))], 4)], 6));
162
162
  }
163
- }), re = /* @__PURE__ */ c({
163
+ }), P = /* @__PURE__ */ c({
164
164
  __name: "FpGelButton",
165
165
  props: {
166
166
  asChild: { type: Boolean },
@@ -182,7 +182,7 @@ var te = { class: "fp-device-body" }, ne = /* @__PURE__ */ c({
182
182
  "type"
183
183
  ]));
184
184
  }
185
- }), N = /* @__PURE__ */ c({
185
+ }), ie = /* @__PURE__ */ c({
186
186
  __name: "FpHousing",
187
187
  props: {
188
188
  asChild: { type: Boolean },
@@ -199,7 +199,7 @@ var te = { class: "fp-device-body" }, ne = /* @__PURE__ */ c({
199
199
  _: 3
200
200
  }, 8, ["as", "as-child"]));
201
201
  }
202
- }), P = [
202
+ }), F = [
203
203
  "................",
204
204
  "................",
205
205
  ".....#..........",
@@ -216,7 +216,7 @@ var te = { class: "fp-device-body" }, ne = /* @__PURE__ */ c({
216
216
  "................",
217
217
  "................",
218
218
  "................"
219
- ], F = [
219
+ ], I = [
220
220
  "................",
221
221
  "................",
222
222
  ".........##.....",
@@ -233,7 +233,7 @@ var te = { class: "fp-device-body" }, ne = /* @__PURE__ */ c({
233
233
  ".........##.....",
234
234
  "................",
235
235
  "................"
236
- ], I = (e) => e.map((e) => [...e].reverse().join("")), L = {
236
+ ], L = (e) => e.map((e) => [...e].reverse().join("")), R = {
237
237
  add: [
238
238
  "................",
239
239
  "................",
@@ -270,8 +270,8 @@ var te = { class: "fp-device-body" }, ne = /* @__PURE__ */ c({
270
270
  "................",
271
271
  "................"
272
272
  ],
273
- left: F,
274
- right: I(F),
273
+ left: I,
274
+ right: L(I),
275
275
  go: [
276
276
  "................",
277
277
  "................",
@@ -290,8 +290,26 @@ var te = { class: "fp-device-body" }, ne = /* @__PURE__ */ c({
290
290
  "................",
291
291
  "................"
292
292
  ],
293
- undo: P,
294
- redo: I(P),
293
+ play: [
294
+ "................",
295
+ "................",
296
+ "....#...........",
297
+ "....###.........",
298
+ "....####........",
299
+ "....######......",
300
+ "....#######.....",
301
+ "....#########...",
302
+ "....#########...",
303
+ "....#######.....",
304
+ "....######......",
305
+ "....####........",
306
+ "....###.........",
307
+ "....#...........",
308
+ "................",
309
+ "................"
310
+ ],
311
+ undo: F,
312
+ redo: L(F),
295
313
  home: [
296
314
  "................",
297
315
  ".......##.......",
@@ -491,7 +509,7 @@ var te = { class: "fp-device-body" }, ne = /* @__PURE__ */ c({
491
509
  "................"
492
510
  ]
493
511
  };
494
- function ie(e) {
512
+ function z(e) {
495
513
  let t = "";
496
514
  return e.forEach((e, n) => {
497
515
  let r = 0;
@@ -507,27 +525,27 @@ function ie(e) {
507
525
  }
508
526
  }), t;
509
527
  }
510
- var R = Object.keys(L), z = Object.fromEntries(R.map((e) => [e, ie(L[e])])), B = [
528
+ var B = Object.keys(R), V = Object.fromEntries(B.map((e) => [e, z(R[e])])), H = [
511
529
  "role",
512
530
  "aria-label",
513
531
  "aria-hidden"
514
- ], V = ["d"], H = /* @__PURE__ */ c({
532
+ ], U = ["d"], W = /* @__PURE__ */ c({
515
533
  __name: "FpIcon",
516
534
  props: {
517
535
  name: {},
518
536
  label: {}
519
537
  },
520
538
  setup(e) {
521
- let n = e, r = t(() => z[n.name]);
539
+ let n = e, r = t(() => V[n.name]);
522
540
  return (e, t) => (p(), i("svg", {
523
541
  viewBox: "0 0 16 16",
524
542
  class: "fp-icon",
525
543
  role: n.label ? "img" : void 0,
526
544
  "aria-label": n.label || void 0,
527
545
  "aria-hidden": n.label ? void 0 : "true"
528
- }, [a("path", { d: r.value }, null, 8, V)], 8, B));
546
+ }, [a("path", { d: r.value }, null, 8, U)], 8, H));
529
547
  }
530
- }), U = [
548
+ }), G = [
531
549
  "tabindex",
532
550
  "aria-valuemin",
533
551
  "aria-valuemax",
@@ -535,7 +553,7 @@ var R = Object.keys(L), z = Object.fromEntries(R.map((e) => [e, ie(L[e])])), B =
535
553
  "aria-valuetext",
536
554
  "aria-labelledby",
537
555
  "aria-disabled"
538
- ], W = ["id"], G = 200, K = .1, q = 270, J = /* @__PURE__ */ c({
556
+ ], K = ["id"], q = 200, J = .1, Y = 270, ae = /* @__PURE__ */ c({
539
557
  inheritAttrs: !1,
540
558
  __name: "FpKnob",
541
559
  props: /*@__PURE__*/ l({
@@ -564,7 +582,7 @@ var R = Object.keys(L), z = Object.fromEntries(R.map((e) => [e, ie(L[e])])), B =
564
582
  }
565
583
  let C = t(() => _(c.value)), w = t(() => {
566
584
  let e = o.max - o.min, t = e > 0 ? (C.value - o.min) / e : 0;
567
- return Math.round(t * q - q / 2);
585
+ return Math.round(t * Y - Y / 2);
568
586
  });
569
587
  function T(e) {
570
588
  let t = _(e);
@@ -600,7 +618,7 @@ var R = Object.keys(L), z = Object.fromEntries(R.map((e) => [e, ie(L[e])])), B =
600
618
  }
601
619
  function k(e) {
602
620
  if (!D || e.pointerId !== D.pointerId) return;
603
- let t = (o.max - o.min) / G * (e.shiftKey ? K : 1);
621
+ let t = (o.max - o.min) / q * (e.shiftKey ? J : 1);
604
622
  D.raw = Math.min(o.max, Math.max(o.min, D.raw + (D.y - e.clientY) * t)), D.y = e.clientY, T(D.raw);
605
623
  }
606
624
  function A(e) {
@@ -626,13 +644,13 @@ var R = Object.keys(L), z = Object.fromEntries(R.map((e) => [e, ie(L[e])])), B =
626
644
  }), [a("span", {
627
645
  class: "fp-knob-mark",
628
646
  style: f({ rotate: `${w.value}deg` })
629
- }, null, 4)], 16, U), o.label ? (p(), i("span", {
647
+ }, null, 4)], 16, G), o.label ? (p(), i("span", {
630
648
  key: 0,
631
649
  id: y(h),
632
650
  class: "fp-silk"
633
- }, v(o.label), 9, W)) : r("", !0)], 16));
651
+ }, v(o.label), 9, K)) : r("", !0)], 16));
634
652
  }
635
- }), Y = /* @__PURE__ */ c({
653
+ }), oe = /* @__PURE__ */ c({
636
654
  __name: "FpLcd",
637
655
  props: {
638
656
  asChild: { type: Boolean },
@@ -649,11 +667,11 @@ var R = Object.keys(L), z = Object.fromEntries(R.map((e) => [e, ie(L[e])])), B =
649
667
  _: 3
650
668
  }, 8, ["as", "as-child"]));
651
669
  }
652
- }), ae = {
670
+ }), se = {
653
671
  key: 0,
654
672
  class: "fp-lcd-ghost",
655
673
  "aria-hidden": "true"
656
- }, oe = { key: 2 }, se = /* @__PURE__ */ c({
674
+ }, ce = { key: 2 }, le = /* @__PURE__ */ c({
657
675
  __name: "FpLcdLine",
658
676
  props: {
659
677
  text: {},
@@ -670,10 +688,10 @@ var R = Object.keys(L), z = Object.fromEntries(R.map((e) => [e, ie(L[e])])), B =
670
688
  "as-child": a.asChild,
671
689
  class: "fp-lcd-line"
672
690
  }, {
673
- default: E(() => [a.ghost ? (p(), i("span", ae, v(o.value), 1)) : r("", !0), a.redraw ? (p(), i("span", {
691
+ default: E(() => [a.ghost ? (p(), i("span", se, v(o.value), 1)) : r("", !0), a.redraw ? (p(), i("span", {
674
692
  key: a.text,
675
693
  class: "fp-lcd-redraw"
676
- }, v(a.text), 1)) : (p(), i("span", oe, v(a.text), 1))]),
694
+ }, v(a.text), 1)) : (p(), i("span", ce, v(a.text), 1))]),
677
695
  _: 1
678
696
  }, 8, ["as", "as-child"]));
679
697
  }
@@ -681,11 +699,11 @@ var R = Object.keys(L), z = Object.fromEntries(R.map((e) => [e, ie(L[e])])), B =
681
699
  flat: "fp-lens-flat",
682
700
  diffused: "fp-lens-diffused",
683
701
  clear: "fp-lens-clear"
684
- }, ce = [
702
+ }, ue = [
685
703
  "role",
686
704
  "aria-label",
687
705
  "aria-hidden"
688
- ], le = /* @__PURE__ */ c({
706
+ ], de = /* @__PURE__ */ c({
689
707
  __name: "FpLed",
690
708
  props: {
691
709
  color: { default: "green" },
@@ -712,16 +730,16 @@ var R = Object.keys(L), z = Object.fromEntries(R.map((e) => [e, ie(L[e])])), B =
712
730
  role: t.label ? "img" : void 0,
713
731
  "aria-label": t.label || void 0,
714
732
  "aria-hidden": t.label ? void 0 : "true"
715
- }, null, 10, ce));
733
+ }, null, 10, ue));
716
734
  }
717
- }), ue = [
735
+ }), fe = [
718
736
  "data-orientation",
719
737
  "aria-valuemin",
720
738
  "aria-valuemax",
721
739
  "aria-valuenow",
722
740
  "aria-valuetext",
723
741
  "aria-labelledby"
724
- ], de = ["id"], fe = /* @__PURE__ */ c({
742
+ ], pe = ["id"], me = /* @__PURE__ */ c({
725
743
  inheritAttrs: !1,
726
744
  __name: "FpMeter",
727
745
  props: {
@@ -770,11 +788,11 @@ var R = Object.keys(L), z = Object.fromEntries(R.map((e) => [e, ie(L[e])])), B =
770
788
  "aria-valuetext": n.valueText?.(d.value),
771
789
  "aria-labelledby": n.label ? y(l) : void 0,
772
790
  style: h.value
773
- }), null, 16, ue), n.label ? (p(), i("span", {
791
+ }), null, 16, fe), n.label ? (p(), i("span", {
774
792
  key: 0,
775
793
  id: y(l),
776
794
  class: "fp-silk"
777
- }, v(n.label), 9, de)) : r("", !0)], 16));
795
+ }, v(n.label), 9, pe)) : r("", !0)], 16));
778
796
  }
779
797
  }), Z = {
780
798
  0: "abcdef",
@@ -820,10 +838,10 @@ function Q(e) {
820
838
  }
821
839
  //#endregion
822
840
  //#region src/FpReadout.vue?vue&type=script&setup=true&lang.ts
823
- var pe = { class: "fp-readout-text" }, me = ["data-colon"], he = { class: "fp-readout-lit" }, ge = ["data-segment"], _e = {
841
+ var he = { class: "fp-readout-text" }, ge = ["data-colon"], _e = { class: "fp-readout-lit" }, ve = ["data-segment"], ye = {
824
842
  key: 0,
825
843
  "data-segment": "dp"
826
- }, ve = /* @__PURE__ */ c({
844
+ }, be = /* @__PURE__ */ c({
827
845
  __name: "FpReadout",
828
846
  props: {
829
847
  value: {},
@@ -858,25 +876,25 @@ var pe = { class: "fp-readout-text" }, me = ["data-colon"], he = { class: "fp-re
858
876
  dot: !1
859
877
  })), ...e];
860
878
  });
861
- return (t, n) => (p(), i("span", { class: d(["fp-readout", [s[o.color], o.lens && y(X)[o.lens]]]) }, [a("span", pe, v(o.valueText ? o.valueText(c.value) : c.value), 1), (p(!0), i(e, null, m(l.value, (t, o) => (p(), i("span", {
879
+ return (t, n) => (p(), i("span", { class: d(["fp-readout", [s[o.color], o.lens && y(X)[o.lens]]]) }, [a("span", he, v(o.valueText ? o.valueText(c.value) : c.value), 1), (p(!0), i(e, null, m(l.value, (t, o) => (p(), i("span", {
862
880
  key: o,
863
881
  class: "fp-readout-cell",
864
882
  "data-colon": t.colon ? "" : void 0,
865
883
  "aria-hidden": "true"
866
- }, [a("span", he, [t.colon ? (p(), 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)) : (p(), i(e, { key: 1 }, [(p(!0), i(e, null, m(t.lit, (e) => (p(), i("span", {
884
+ }, [a("span", _e, [t.colon ? (p(), 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)) : (p(), i(e, { key: 1 }, [(p(!0), i(e, null, m(t.lit, (e) => (p(), i("span", {
867
885
  key: e,
868
886
  "data-segment": e
869
- }, null, 8, ge))), 128)), t.dot ? (p(), i("span", _e)) : r("", !0)], 64))])], 8, me))), 128))], 2));
887
+ }, null, 8, ve))), 128)), t.dot ? (p(), i("span", ye)) : r("", !0)], 64))])], 8, ge))), 128))], 2));
870
888
  }
871
889
  }), $ = {
872
890
  class: "fp-screw",
873
891
  "aria-hidden": "true"
874
- }, ye = /* @__PURE__ */ c({
892
+ }, xe = /* @__PURE__ */ c({
875
893
  __name: "FpScrew",
876
894
  setup(e) {
877
895
  return (e, t) => (p(), i("span", $));
878
896
  }
879
- }), be = /* @__PURE__ */ c({
897
+ }), Se = /* @__PURE__ */ c({
880
898
  __name: "FpSilk",
881
899
  props: {
882
900
  asChild: { type: Boolean },
@@ -893,7 +911,7 @@ var pe = { class: "fp-readout-text" }, me = ["data-colon"], he = { class: "fp-re
893
911
  _: 3
894
912
  }, 8, ["as", "as-child"]));
895
913
  }
896
- }), xe = ["id"], Se = /* @__PURE__ */ c({
914
+ }), Ce = ["id"], we = /* @__PURE__ */ c({
897
915
  inheritAttrs: !1,
898
916
  __name: "FpSlider",
899
917
  props: /*@__PURE__*/ l({
@@ -967,9 +985,66 @@ var pe = { class: "fp-readout-text" }, me = ["data-colon"], he = { class: "fp-re
967
985
  key: 0,
968
986
  id: y(m),
969
987
  class: "fp-silk"
970
- }, v(a.label), 9, xe)) : r("", !0)], 16));
988
+ }, v(a.label), 9, Ce)) : r("", !0)], 16));
989
+ }
990
+ }), Te = ["data-label-placement"], Ee = ["id"], De = /* @__PURE__ */ c({
991
+ inheritAttrs: !1,
992
+ __name: "FpSwitch",
993
+ props: /*@__PURE__*/ l({
994
+ label: {},
995
+ labelPlacement: { default: "below" },
996
+ orientation: { default: "vertical" },
997
+ color: { default: "red" },
998
+ disabled: { type: Boolean }
999
+ }, {
1000
+ modelValue: {
1001
+ type: Boolean,
1002
+ default: !1
1003
+ },
1004
+ modelModifiers: {}
1005
+ }),
1006
+ emits: ["update:modelValue"],
1007
+ setup(e) {
1008
+ let n = e, o = {
1009
+ green: "fp-led-green",
1010
+ amber: "fp-led-amber",
1011
+ red: "fp-led-red"
1012
+ }, c = S(e, "modelValue"), l = x(), d = b(), f = t(() => ({
1013
+ class: d.class,
1014
+ style: d.style
1015
+ })), m = t(() => {
1016
+ let { class: e, style: t, ...n } = d;
1017
+ return n;
1018
+ });
1019
+ return (e, t) => (p(), i("div", u({
1020
+ class: "fp-unit",
1021
+ "data-label-placement": n.labelPlacement
1022
+ }, f.value), [s(y(ee), u(m.value, {
1023
+ modelValue: c.value,
1024
+ "onUpdate:modelValue": t[0] ||= (e) => c.value = e,
1025
+ class: ["fp-switch", o[n.color]],
1026
+ "data-orientation": n.orientation,
1027
+ disabled: n.disabled,
1028
+ "aria-labelledby": n.label ? y(l) : void 0
1029
+ }), {
1030
+ default: E(() => [s(y(te), { class: "fp-switch-rocker" }, {
1031
+ default: E(() => [...t[1] ||= [a("span", { class: "fp-switch-lamp" }, null, -1), a("span", { class: "fp-switch-face" }, null, -1)]]),
1032
+ _: 1
1033
+ })]),
1034
+ _: 1
1035
+ }, 16, [
1036
+ "modelValue",
1037
+ "class",
1038
+ "data-orientation",
1039
+ "disabled",
1040
+ "aria-labelledby"
1041
+ ]), n.label ? (p(), i("span", {
1042
+ key: 0,
1043
+ id: y(l),
1044
+ class: "fp-silk"
1045
+ }, v(n.label), 9, Ee)) : r("", !0)], 16, Te));
971
1046
  }
972
- }), Ce = /* @__PURE__ */ c({
1047
+ }), Oe = /* @__PURE__ */ c({
973
1048
  __name: "FpWell",
974
1049
  props: {
975
1050
  asChild: { type: Boolean },
@@ -986,7 +1061,7 @@ var pe = { class: "fp-readout-text" }, me = ["data-colon"], he = { class: "fp-re
986
1061
  _: 3
987
1062
  }, 8, ["as", "as-child"]));
988
1063
  }
989
- }), we = { class: "fp-module-title" }, Te = /* @__PURE__ */ c({
1064
+ }), ke = { class: "fp-module-title" }, Ae = /* @__PURE__ */ c({
990
1065
  __name: "FpWindow",
991
1066
  props: {
992
1067
  as: { default: "section" },
@@ -1005,7 +1080,7 @@ var pe = { class: "fp-readout-text" }, me = ["data-colon"], he = { class: "fp-re
1005
1080
  class: d(["fp-window", [i.sheet ? "fp-sheet-panel" : "fp-module"]]),
1006
1081
  "aria-labelledby": y(l)
1007
1082
  }, {
1008
- default: E(() => [a("div", we, [
1083
+ default: E(() => [a("div", ke, [
1009
1084
  (p(), n(g(`h${i.level}`), {
1010
1085
  id: y(l),
1011
1086
  class: "fp-silk fp-window-title"
@@ -1019,7 +1094,7 @@ var pe = { class: "fp-readout-text" }, me = ["data-colon"], he = { class: "fp-re
1019
1094
  "aria-label": i.closeLabel ?? `Close ${i.title}`,
1020
1095
  onClick: t[0] ||= (e) => c("close")
1021
1096
  }, {
1022
- default: E(() => [s(H, { name: "close" })]),
1097
+ default: E(() => [s(W, { name: "close" })]),
1023
1098
  _: 1
1024
1099
  }, 8, ["aria-label"])) : r("", !0)
1025
1100
  ]), a("div", { class: d(i.flush ? void 0 : "fp-window-body") }, [h(e.$slots, "default")], 2)]),
@@ -1032,4 +1107,4 @@ var pe = { class: "fp-readout-text" }, me = ["data-colon"], he = { class: "fp-re
1032
1107
  }
1033
1108
  });
1034
1109
  //#endregion
1035
- export { j as FpButton, M as FpCap, ne as FpDevice, re as FpGelButton, N as FpHousing, H as FpIcon, J as FpKnob, Y as FpLcd, se as FpLcdLine, le as FpLed, fe as FpMeter, ve as FpReadout, ye as FpScrew, be as FpSilk, Se as FpSlider, Ce as FpWell, Te as FpWindow, R as fpIconNames, Q as fpReadoutGlyph };
1110
+ export { j as FpButton, ne as FpCap, N as FpDevice, P as FpGelButton, ie as FpHousing, W as FpIcon, ae as FpKnob, oe as FpLcd, le as FpLcdLine, de as FpLed, me as FpMeter, be as FpReadout, xe as FpScrew, Se as FpSilk, we as FpSlider, De as FpSwitch, Oe as FpWell, Ae as FpWindow, B 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.2.0",
4
+ "version": "0.3.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.2.0"
39
+ "@frontpanel/css": "^0.3.0"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@tailwindcss/oxide": "^4.3.3",