vim-web 1.0.0-alpha.1 → 1.0.0-alpha.2
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/dist/style.css +18 -0
- package/dist/vim-web.iife.js +82 -25
- package/dist/vim-web.iife.js.map +1 -1
- package/dist/vim-web.js +82 -25
- package/dist/vim-web.js.map +1 -1
- package/package.json +1 -1
package/dist/style.css
CHANGED
|
@@ -706,6 +706,9 @@ video:where(.vim-component,.vim-component *) {
|
|
|
706
706
|
.vc-bottom-0 {
|
|
707
707
|
bottom: 0px;
|
|
708
708
|
}
|
|
709
|
+
.vc-bottom-full {
|
|
710
|
+
bottom: 100%;
|
|
711
|
+
}
|
|
709
712
|
.vc-left-0 {
|
|
710
713
|
left: 0px;
|
|
711
714
|
}
|
|
@@ -840,6 +843,9 @@ video:where(.vim-component,.vim-component *) {
|
|
|
840
843
|
.vc-block {
|
|
841
844
|
display: block;
|
|
842
845
|
}
|
|
846
|
+
.vc-inline-block {
|
|
847
|
+
display: inline-block;
|
|
848
|
+
}
|
|
843
849
|
.vc-inline {
|
|
844
850
|
display: inline;
|
|
845
851
|
}
|
|
@@ -855,6 +861,9 @@ video:where(.vim-component,.vim-component *) {
|
|
|
855
861
|
.vc-h-2 {
|
|
856
862
|
height: 0.5rem;
|
|
857
863
|
}
|
|
864
|
+
.vc-h-3 {
|
|
865
|
+
height: 0.75rem;
|
|
866
|
+
}
|
|
858
867
|
.vc-h-4 {
|
|
859
868
|
height: 1rem;
|
|
860
869
|
}
|
|
@@ -915,6 +924,9 @@ video:where(.vim-component,.vim-component *) {
|
|
|
915
924
|
.vc-min-w-0 {
|
|
916
925
|
min-width: 0px;
|
|
917
926
|
}
|
|
927
|
+
.vc-min-w-full {
|
|
928
|
+
min-width: 100%;
|
|
929
|
+
}
|
|
918
930
|
.\!vc-max-w-xs {
|
|
919
931
|
max-width: 20rem !important;
|
|
920
932
|
}
|
|
@@ -985,6 +997,9 @@ video:where(.vim-component,.vim-component *) {
|
|
|
985
997
|
.vc-justify-evenly {
|
|
986
998
|
justify-content: space-evenly;
|
|
987
999
|
}
|
|
1000
|
+
.vc-gap-1 {
|
|
1001
|
+
gap: 0.25rem;
|
|
1002
|
+
}
|
|
988
1003
|
.vc-gap-2 {
|
|
989
1004
|
gap: 0.5rem;
|
|
990
1005
|
}
|
|
@@ -1183,6 +1198,9 @@ video:where(.vim-component,.vim-component *) {
|
|
|
1183
1198
|
.vc-pr-2 {
|
|
1184
1199
|
padding-right: 0.5rem;
|
|
1185
1200
|
}
|
|
1201
|
+
.vc-text-left {
|
|
1202
|
+
text-align: left;
|
|
1203
|
+
}
|
|
1186
1204
|
.vc-text-center {
|
|
1187
1205
|
text-align: center;
|
|
1188
1206
|
}
|
package/dist/vim-web.iife.js
CHANGED
|
@@ -86178,7 +86178,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
86178
86178
|
"a",
|
|
86179
86179
|
{
|
|
86180
86180
|
className: "vc-text-primary vc-underline vc-font-bold",
|
|
86181
|
-
href: "https://docs.vimaec.com/docs/vim-
|
|
86181
|
+
href: "https://docs.vimaec.com/docs/vim-flex/vim-ultra",
|
|
86182
86182
|
target: "_blank",
|
|
86183
86183
|
rel: "noopener noreferrer",
|
|
86184
86184
|
children: "VIM Ultra"
|
|
@@ -86564,19 +86564,48 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
86564
86564
|
}
|
|
86565
86565
|
function GenericSelectField(props) {
|
|
86566
86566
|
const refresher = useRefresher();
|
|
86567
|
-
|
|
86568
|
-
|
|
86569
|
-
|
|
86570
|
-
|
|
86571
|
-
|
|
86572
|
-
|
|
86573
|
-
|
|
86574
|
-
|
|
86567
|
+
const [open, setOpen] = React2.useState(false);
|
|
86568
|
+
const ref = React2.useRef(null);
|
|
86569
|
+
React2.useEffect(() => {
|
|
86570
|
+
if (!open) return;
|
|
86571
|
+
const onPointerDown = (e) => {
|
|
86572
|
+
if (ref.current && !ref.current.contains(e.target)) {
|
|
86573
|
+
setOpen(false);
|
|
86574
|
+
}
|
|
86575
|
+
};
|
|
86576
|
+
document.addEventListener("pointerdown", onPointerDown);
|
|
86577
|
+
return () => document.removeEventListener("pointerdown", onPointerDown);
|
|
86578
|
+
}, [open]);
|
|
86579
|
+
const current = props.field.options.find((o) => o.value === props.field.state.get());
|
|
86580
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ref, className: "vc-relative vc-w-full", children: [
|
|
86581
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
86582
|
+
"button",
|
|
86583
|
+
{
|
|
86584
|
+
type: "button",
|
|
86585
|
+
disabled: props.disabled ?? false,
|
|
86586
|
+
onClick: () => setOpen((o) => !o),
|
|
86587
|
+
className: "vc-border vc-border-gray-300 vc-py-1 vc-w-full vc-px-1 vc-text-left vc-bg-white vc-cursor-pointer vc-flex vc-items-center vc-justify-between",
|
|
86588
|
+
children: [
|
|
86589
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: (current == null ? void 0 : current.label) ?? "" }),
|
|
86590
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className: "vc-w-3 vc-h-3 vc-ml-1 vc-shrink-0", viewBox: "0 0 12 12", fill: "currentColor", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M2 4l4 4 4-4", stroke: "currentColor", strokeWidth: "2", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
86591
|
+
]
|
|
86592
|
+
}
|
|
86593
|
+
),
|
|
86594
|
+
open && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vc-absolute vc-left-0 vc-right-0 vc-bottom-full vc-z-50 vc-border vc-border-gray-300 vc-bg-white vc-shadow-lg", children: props.field.options.map((opt) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
86595
|
+
"div",
|
|
86596
|
+
{
|
|
86597
|
+
className: `vc-px-1 vc-py-1 vc-cursor-pointer hover:vc-bg-gray-100 ${opt.value === props.field.state.get() ? "vc-bg-gray-100" : ""}`,
|
|
86598
|
+
onPointerDown: (e) => {
|
|
86599
|
+
e.stopPropagation();
|
|
86600
|
+
props.field.state.set(opt.value);
|
|
86601
|
+
refresher.refresh();
|
|
86602
|
+
setOpen(false);
|
|
86603
|
+
},
|
|
86604
|
+
children: opt.label
|
|
86575
86605
|
},
|
|
86576
|
-
|
|
86577
|
-
|
|
86578
|
-
|
|
86579
|
-
);
|
|
86606
|
+
opt.value
|
|
86607
|
+
)) })
|
|
86608
|
+
] });
|
|
86580
86609
|
}
|
|
86581
86610
|
function useCustomizer(baseEntries, ref) {
|
|
86582
86611
|
const customization = React2.useRef();
|
|
@@ -87240,20 +87269,48 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
87240
87269
|
}
|
|
87241
87270
|
function renderSettingsSelect(settings2, item) {
|
|
87242
87271
|
const value = item.getter(settings2.value);
|
|
87243
|
-
const
|
|
87244
|
-
|
|
87245
|
-
|
|
87272
|
+
const [open, setOpen] = React2.useState(false);
|
|
87273
|
+
const ref = React2.useRef(null);
|
|
87274
|
+
React2.useEffect(() => {
|
|
87275
|
+
if (!open) return;
|
|
87276
|
+
const onPointerDown = (e) => {
|
|
87277
|
+
if (ref.current && !ref.current.contains(e.target)) {
|
|
87278
|
+
setOpen(false);
|
|
87279
|
+
}
|
|
87280
|
+
};
|
|
87281
|
+
document.addEventListener("pointerdown", onPointerDown);
|
|
87282
|
+
return () => document.removeEventListener("pointerdown", onPointerDown);
|
|
87283
|
+
}, [open]);
|
|
87284
|
+
const current = item.options.find((o) => o.value === value);
|
|
87246
87285
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: "vc-m-1 vc-block vc-select-none vc-items-center vc-py-1 vc-text-gray-warm", children: [
|
|
87247
87286
|
item.label,
|
|
87248
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
87249
|
-
|
|
87250
|
-
|
|
87251
|
-
|
|
87252
|
-
|
|
87253
|
-
|
|
87254
|
-
|
|
87255
|
-
|
|
87256
|
-
|
|
87287
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ref, className: "vc-relative vc-inline-block vc-ml-2", children: [
|
|
87288
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
87289
|
+
"button",
|
|
87290
|
+
{
|
|
87291
|
+
type: "button",
|
|
87292
|
+
onClick: () => setOpen((o) => !o),
|
|
87293
|
+
className: "vc-rounded vc-border vc-border-gray-medium vc-bg-white vc-px-1 vc-py-0.5 vc-text-sm vc-cursor-pointer vc-text-left vc-inline-flex vc-items-center vc-gap-1",
|
|
87294
|
+
children: [
|
|
87295
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: (current == null ? void 0 : current.label) ?? "" }),
|
|
87296
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("svg", { className: "vc-w-3 vc-h-3 vc-shrink-0", viewBox: "0 0 12 12", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M2 4l4 4 4-4", stroke: "currentColor", strokeWidth: "2", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
87297
|
+
]
|
|
87298
|
+
}
|
|
87299
|
+
),
|
|
87300
|
+
open && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "vc-absolute vc-left-0 vc-bottom-full vc-z-50 vc-min-w-full vc-rounded vc-border vc-border-gray-medium vc-bg-white vc-shadow-lg vc-text-sm", children: item.options.map((opt) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
87301
|
+
"div",
|
|
87302
|
+
{
|
|
87303
|
+
className: `vc-px-2 vc-py-1 vc-cursor-pointer hover:vc-bg-gray-100 vc-whitespace-nowrap ${opt.value === value ? "vc-bg-gray-100" : ""}`,
|
|
87304
|
+
onPointerDown: (e) => {
|
|
87305
|
+
e.stopPropagation();
|
|
87306
|
+
settings2.update((s) => item.setter(s, opt.value));
|
|
87307
|
+
setOpen(false);
|
|
87308
|
+
},
|
|
87309
|
+
children: opt.label
|
|
87310
|
+
},
|
|
87311
|
+
opt.value
|
|
87312
|
+
)) })
|
|
87313
|
+
] })
|
|
87257
87314
|
] });
|
|
87258
87315
|
}
|
|
87259
87316
|
function renderSettingsSubtitle(item) {
|