@vizejs/fresco 0.719.0 → 0.720.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/dist/{accessibility-DwzT925M.d.mts → accessibility-D7iuITvU.d.mts} +4 -3
- package/dist/{accessibility-DwzT925M.d.mts.map → accessibility-D7iuITvU.d.mts.map} +1 -1
- package/dist/{app-_QmZ-PoH.d.mts → app-CJh9qfJI.d.mts} +3 -3
- package/dist/{app-_QmZ-PoH.d.mts.map → app-CJh9qfJI.d.mts.map} +1 -1
- package/dist/{app-C_wFlWSV.mjs → app-CjfLCWic.mjs} +110 -16
- package/dist/app-CjfLCWic.mjs.map +1 -0
- package/dist/components/index.d.mts +2 -2
- package/dist/components/index.mjs +2 -2
- package/dist/{components-DzkL-yHj.mjs → components-DgDohiXo.mjs} +348 -79
- package/dist/components-DgDohiXo.mjs.map +1 -0
- package/dist/composables/index.d.mts +1 -1
- package/dist/composables/index.mjs +3 -3
- package/dist/{composables-BJeirPSH.mjs → composables-BxxLIBdJ.mjs} +3 -3
- package/dist/{composables-BJeirPSH.mjs.map → composables-BxxLIBdJ.mjs.map} +1 -1
- package/dist/{index-Ddp2Txtm.d.mts → index-BOV-0YqV.d.mts} +2 -2
- package/dist/{index-Ddp2Txtm.d.mts.map → index-BOV-0YqV.d.mts.map} +1 -1
- package/dist/{index-BCxB_ZLV.d.mts → index-DAhTRsXN.d.mts} +174 -119
- package/dist/index-DAhTRsXN.d.mts.map +1 -0
- package/dist/index.d.mts +6 -6
- package/dist/index.mjs +5 -5
- package/dist/{protocol-DavoeNLn.d.mts → protocol-C1DHP36Z.d.mts} +5 -2
- package/dist/protocol-C1DHP36Z.d.mts.map +1 -0
- package/dist/testing/index.d.mts +4 -2
- package/dist/testing/index.d.mts.map +1 -1
- package/dist/testing/index.mjs +2 -1
- package/dist/testing/index.mjs.map +1 -1
- package/dist/{useBoxMetrics-lF5Myjc7.mjs → useBoxMetrics-BMD1acRU.mjs} +2 -2
- package/dist/{useBoxMetrics-lF5Myjc7.mjs.map → useBoxMetrics-BMD1acRU.mjs.map} +1 -1
- package/package.json +2 -2
- package/dist/app-C_wFlWSV.mjs.map +0 -1
- package/dist/components-DzkL-yHj.mjs.map +0 -1
- package/dist/index-BCxB_ZLV.d.mts.map +0 -1
- package/dist/protocol-DavoeNLn.d.mts.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as useFocusManager, O as provideFocusScope, k as useFocus, m as getLastRenderLayout } from "./app-
|
|
2
|
-
import { a as useInput, c as useIsScreenReaderEnabled, i as useMouse, n as createVirtualViewport, t as useBoxMetrics } from "./useBoxMetrics-
|
|
1
|
+
import { A as useFocusManager, O as provideFocusScope, k as useFocus, m as getLastRenderLayout } from "./app-CjfLCWic.mjs";
|
|
2
|
+
import { a as useInput, c as useIsScreenReaderEnabled, i as useMouse, n as createVirtualViewport, t as useBoxMetrics } from "./useBoxMetrics-BMD1acRU.mjs";
|
|
3
3
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, h, mergeProps, nextTick, normalizeStyle, onMounted, onUnmounted, openBlock, ref, renderList, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, unref, useSlots, useTemplateRef, watch, withCtx } from "vue";
|
|
4
4
|
//#region src/components/Box.ts
|
|
5
5
|
/**
|
|
@@ -56,6 +56,7 @@ const Box = defineComponent({
|
|
|
56
56
|
overflow: String,
|
|
57
57
|
overflowX: String,
|
|
58
58
|
overflowY: String,
|
|
59
|
+
focusId: String,
|
|
59
60
|
border: String,
|
|
60
61
|
borderStyle: String,
|
|
61
62
|
borderTop: Boolean,
|
|
@@ -145,7 +146,8 @@ const Box = defineComponent({
|
|
|
145
146
|
"aria-label": props.ariaLabel,
|
|
146
147
|
"aria-hidden": props.ariaHidden,
|
|
147
148
|
"aria-role": props.ariaRole,
|
|
148
|
-
"aria-state": props.ariaState
|
|
149
|
+
"aria-state": props.ariaState,
|
|
150
|
+
focusId: props.focusId
|
|
149
151
|
}, children);
|
|
150
152
|
};
|
|
151
153
|
}
|
|
@@ -166,11 +168,11 @@ var FrescoSpacer_default = /* @__PURE__ */ defineComponent({
|
|
|
166
168
|
});
|
|
167
169
|
//#endregion
|
|
168
170
|
//#region src/components/FrescoDivider.vue?vue&type=script&setup=true&lang.ts
|
|
169
|
-
const _hoisted_1$
|
|
170
|
-
const _hoisted_2$
|
|
171
|
-
const _hoisted_3$
|
|
172
|
-
const _hoisted_4$
|
|
173
|
-
const _hoisted_5$
|
|
171
|
+
const _hoisted_1$10 = ["fg"];
|
|
172
|
+
const _hoisted_2$7 = ["fg"];
|
|
173
|
+
const _hoisted_3$6 = ["fg"];
|
|
174
|
+
const _hoisted_4$2 = ["fg"];
|
|
175
|
+
const _hoisted_5$1 = ["fg"];
|
|
174
176
|
//#endregion
|
|
175
177
|
//#region src/components/FrescoDivider.vue
|
|
176
178
|
var FrescoDivider_default = /* @__PURE__ */ defineComponent({
|
|
@@ -211,20 +213,20 @@ var FrescoDivider_default = /* @__PURE__ */ defineComponent({
|
|
|
211
213
|
return __props.direction === "vertical" ? (openBlock(), createElementBlock("text", {
|
|
212
214
|
key: 0,
|
|
213
215
|
fg: __props.fg
|
|
214
|
-
}, toDisplayString(dividerChar.value), 9, _hoisted_1$
|
|
216
|
+
}, toDisplayString(dividerChar.value), 9, _hoisted_1$10)) : __props.title ? (openBlock(), createElementBlock("div", {
|
|
215
217
|
key: 1,
|
|
216
218
|
style: titleRowStyle
|
|
217
219
|
}, [
|
|
218
|
-
createElementVNode("text", { fg: __props.fg }, toDisplayString(dividerChar.value.repeat(3)), 9, _hoisted_2$
|
|
220
|
+
createElementVNode("text", { fg: __props.fg }, toDisplayString(dividerChar.value.repeat(3)), 9, _hoisted_2$7),
|
|
219
221
|
createElementVNode("text", {
|
|
220
222
|
fg: __props.titleFg ?? __props.fg,
|
|
221
223
|
bold: true
|
|
222
|
-
}, toDisplayString(titleLabel.value), 9, _hoisted_3$
|
|
223
|
-
createElementVNode("text", { fg: __props.fg }, toDisplayString(dividerChar.value.repeat(3)), 9, _hoisted_4$
|
|
224
|
+
}, toDisplayString(titleLabel.value), 9, _hoisted_3$6),
|
|
225
|
+
createElementVNode("text", { fg: __props.fg }, toDisplayString(dividerChar.value.repeat(3)), 9, _hoisted_4$2)
|
|
224
226
|
])) : (openBlock(), createElementBlock("text", {
|
|
225
227
|
key: 2,
|
|
226
228
|
fg: __props.fg
|
|
227
|
-
}, toDisplayString(dividerChar.value.repeat(40)), 9, _hoisted_5$
|
|
229
|
+
}, toDisplayString(dividerChar.value.repeat(40)), 9, _hoisted_5$1));
|
|
228
230
|
};
|
|
229
231
|
}
|
|
230
232
|
});
|
|
@@ -417,17 +419,17 @@ const Grid = defineComponent({
|
|
|
417
419
|
});
|
|
418
420
|
//#endregion
|
|
419
421
|
//#region src/components/FrescoCard.vue?vue&type=script&setup=true&lang.ts
|
|
420
|
-
const _hoisted_1$
|
|
422
|
+
const _hoisted_1$9 = [
|
|
421
423
|
"border",
|
|
422
424
|
"fg",
|
|
423
425
|
"bg"
|
|
424
426
|
];
|
|
425
|
-
const _hoisted_2$
|
|
426
|
-
const _hoisted_3$
|
|
427
|
+
const _hoisted_2$6 = ["fg"];
|
|
428
|
+
const _hoisted_3$5 = {
|
|
427
429
|
key: 1,
|
|
428
430
|
dim: true
|
|
429
431
|
};
|
|
430
|
-
const _hoisted_4$
|
|
432
|
+
const _hoisted_4$1 = { dim: true };
|
|
431
433
|
//#endregion
|
|
432
434
|
//#region src/components/FrescoCard.vue
|
|
433
435
|
var FrescoCard_default = /* @__PURE__ */ defineComponent({
|
|
@@ -499,13 +501,13 @@ var FrescoCard_default = /* @__PURE__ */ defineComponent({
|
|
|
499
501
|
key: 0,
|
|
500
502
|
fg: __props.titleFg,
|
|
501
503
|
bold: true
|
|
502
|
-
}, toDisplayString(__props.title), 9, _hoisted_2$
|
|
504
|
+
}, toDisplayString(__props.title), 9, _hoisted_2$6)) : createCommentVNode("v-if", true), __props.subtitle ? (openBlock(), createElementBlock("text", _hoisted_3$5, toDisplayString(subtitleLabel.value), 1)) : createCommentVNode("v-if", true)])) : createCommentVNode("v-if", true),
|
|
503
505
|
createElementVNode("div", { style: contentStyle }, [renderSlot(_ctx.$slots, "default")]),
|
|
504
506
|
hasFooter.value ? (openBlock(), createElementBlock("div", {
|
|
505
507
|
key: 1,
|
|
506
508
|
style: footerStyle
|
|
507
|
-
}, [renderSlot(_ctx.$slots, "footer", {}, () => [createElementVNode("text", _hoisted_4$
|
|
508
|
-
], 12, _hoisted_1$
|
|
509
|
+
}, [renderSlot(_ctx.$slots, "footer", {}, () => [createElementVNode("text", _hoisted_4$1, toDisplayString(__props.footer), 1)])])) : createCommentVNode("v-if", true)
|
|
510
|
+
], 12, _hoisted_1$9);
|
|
509
511
|
};
|
|
510
512
|
}
|
|
511
513
|
});
|
|
@@ -1020,7 +1022,7 @@ var ScrollBox_default = /* @__PURE__ */ defineComponent({
|
|
|
1020
1022
|
});
|
|
1021
1023
|
//#endregion
|
|
1022
1024
|
//#region src/components/FrescoNewline.vue?vue&type=script&setup=true&lang.ts
|
|
1023
|
-
const _hoisted_1$
|
|
1025
|
+
const _hoisted_1$8 = ["text"];
|
|
1024
1026
|
//#endregion
|
|
1025
1027
|
//#region src/components/FrescoNewline.vue
|
|
1026
1028
|
var FrescoNewline_default = /* @__PURE__ */ defineComponent({
|
|
@@ -1034,7 +1036,7 @@ var FrescoNewline_default = /* @__PURE__ */ defineComponent({
|
|
|
1034
1036
|
setup(__props) {
|
|
1035
1037
|
const content = computed(() => "\n".repeat(Math.max(0, __props.count)));
|
|
1036
1038
|
return (_ctx, _cache) => {
|
|
1037
|
-
return openBlock(), createElementBlock("text", { text: content.value }, null, 8, _hoisted_1$
|
|
1039
|
+
return openBlock(), createElementBlock("text", { text: content.value }, null, 8, _hoisted_1$8);
|
|
1038
1040
|
};
|
|
1039
1041
|
}
|
|
1040
1042
|
});
|
|
@@ -1085,7 +1087,7 @@ var FrescoStatic_default = /* @__PURE__ */ defineComponent({
|
|
|
1085
1087
|
});
|
|
1086
1088
|
//#endregion
|
|
1087
1089
|
//#region src/components/FrescoTransform.vue?vue&type=script&setup=true&lang.ts
|
|
1088
|
-
const _hoisted_1$
|
|
1090
|
+
const _hoisted_1$7 = ["text", "aria-label"];
|
|
1089
1091
|
//#endregion
|
|
1090
1092
|
//#region src/components/FrescoTransform.vue
|
|
1091
1093
|
var FrescoTransform_default = /* @__PURE__ */ defineComponent({
|
|
@@ -1113,7 +1115,7 @@ var FrescoTransform_default = /* @__PURE__ */ defineComponent({
|
|
|
1113
1115
|
return openBlock(), createElementBlock("text", {
|
|
1114
1116
|
text: content.value,
|
|
1115
1117
|
"aria-label": __props.accessibilityLabel
|
|
1116
|
-
}, null, 8, _hoisted_1$
|
|
1118
|
+
}, null, 8, _hoisted_1$7);
|
|
1117
1119
|
};
|
|
1118
1120
|
}
|
|
1119
1121
|
});
|
|
@@ -1846,7 +1848,7 @@ function renderMarkdown(source, options = {}, renderer = defaultMarkdownRenderer
|
|
|
1846
1848
|
}
|
|
1847
1849
|
//#endregion
|
|
1848
1850
|
//#region src/components/FrescoMarkdown.vue?vue&type=script&setup=true&lang.ts
|
|
1849
|
-
const _hoisted_1$
|
|
1851
|
+
const _hoisted_1$6 = [
|
|
1850
1852
|
"text",
|
|
1851
1853
|
"fg",
|
|
1852
1854
|
"bold",
|
|
@@ -1914,7 +1916,7 @@ var FrescoMarkdown_default = /* @__PURE__ */ defineComponent({
|
|
|
1914
1916
|
italic: span.italic,
|
|
1915
1917
|
underline: span.underline,
|
|
1916
1918
|
dim: span.dim
|
|
1917
|
-
}, null, 8, _hoisted_1$
|
|
1919
|
+
}, null, 8, _hoisted_1$6);
|
|
1918
1920
|
}), 128))]);
|
|
1919
1921
|
}), 128))]);
|
|
1920
1922
|
};
|
|
@@ -2452,8 +2454,8 @@ const Diff = defineComponent({
|
|
|
2452
2454
|
});
|
|
2453
2455
|
//#endregion
|
|
2454
2456
|
//#region src/components/FrescoLink.vue?vue&type=script&setup=true&lang.ts
|
|
2455
|
-
const _hoisted_1$
|
|
2456
|
-
const _hoisted_2$
|
|
2457
|
+
const _hoisted_1$5 = ["fg", "underline"];
|
|
2458
|
+
const _hoisted_2$5 = {
|
|
2457
2459
|
key: 0,
|
|
2458
2460
|
dim: true
|
|
2459
2461
|
};
|
|
@@ -2493,7 +2495,7 @@ var FrescoLink_default = /* @__PURE__ */ defineComponent({
|
|
|
2493
2495
|
return openBlock(), createElementBlock("div", { style: rowStyle }, [createElementVNode("text", {
|
|
2494
2496
|
fg: __props.fg,
|
|
2495
2497
|
underline: __props.underline
|
|
2496
|
-
}, toDisplayString(__props.text), 9, _hoisted_1$
|
|
2498
|
+
}, toDisplayString(__props.text), 9, _hoisted_1$5), __props.showUrl && __props.url ? (openBlock(), createElementBlock("text", _hoisted_2$5, " (" + toDisplayString(__props.url) + ")", 1)) : createCommentVNode("v-if", true)]);
|
|
2497
2499
|
};
|
|
2498
2500
|
}
|
|
2499
2501
|
});
|
|
@@ -3353,6 +3355,7 @@ const Select = defineComponent({
|
|
|
3353
3355
|
type: String,
|
|
3354
3356
|
default: "Select an option"
|
|
3355
3357
|
},
|
|
3358
|
+
maxHeight: Number,
|
|
3356
3359
|
focused: {
|
|
3357
3360
|
type: Boolean,
|
|
3358
3361
|
default: false
|
|
@@ -3375,8 +3378,13 @@ const Select = defineComponent({
|
|
|
3375
3378
|
},
|
|
3376
3379
|
emits: ["update:modelValue", "select"],
|
|
3377
3380
|
setup(props, { emit }) {
|
|
3381
|
+
const scrollOffset = ref(0);
|
|
3378
3382
|
const highlightedIndex = ref(-1);
|
|
3379
3383
|
const typeahead = createTypeaheadBuffer();
|
|
3384
|
+
const viewportSize = computed(() => {
|
|
3385
|
+
if (props.maxHeight === void 0 || !Number.isFinite(props.maxHeight)) return void 0;
|
|
3386
|
+
return props.maxHeight > 0 ? Math.max(1, Math.floor(props.maxHeight)) : void 0;
|
|
3387
|
+
});
|
|
3380
3388
|
watch(() => props.modelValue, (value) => {
|
|
3381
3389
|
const selectedIndex = props.options.findIndex((option) => option.value === value && !option.disabled);
|
|
3382
3390
|
highlightedIndex.value = selectedIndex >= 0 ? selectedIndex : firstEnabledIndex(props.options);
|
|
@@ -3384,6 +3392,13 @@ const Select = defineComponent({
|
|
|
3384
3392
|
watch(() => props.options, (options) => {
|
|
3385
3393
|
if (highlightedIndex.value < 0 || highlightedIndex.value >= options.length || options[highlightedIndex.value]?.disabled) highlightedIndex.value = firstEnabledIndex(options);
|
|
3386
3394
|
}, { deep: true });
|
|
3395
|
+
watch([
|
|
3396
|
+
highlightedIndex,
|
|
3397
|
+
viewportSize,
|
|
3398
|
+
() => props.options.length
|
|
3399
|
+
], ([index, windowSize]) => {
|
|
3400
|
+
scrollOffset.value = visibleCollectionOffset(index, scrollOffset.value, windowSize, props.options.length);
|
|
3401
|
+
}, { immediate: true });
|
|
3387
3402
|
const activate = () => {
|
|
3388
3403
|
const option = props.options[highlightedIndex.value];
|
|
3389
3404
|
if (!option || option.disabled) return;
|
|
@@ -3405,20 +3420,49 @@ const Select = defineComponent({
|
|
|
3405
3420
|
},
|
|
3406
3421
|
onSubmit: activate
|
|
3407
3422
|
});
|
|
3423
|
+
const visibleOptions = computed(() => {
|
|
3424
|
+
const windowSize = viewportSize.value;
|
|
3425
|
+
const start = windowSize === void 0 ? 0 : scrollOffset.value;
|
|
3426
|
+
const end = windowSize === void 0 ? props.options.length : start + windowSize;
|
|
3427
|
+
return props.options.slice(start, end).map((option, visibleIndex) => ({
|
|
3428
|
+
option,
|
|
3429
|
+
index: start + visibleIndex
|
|
3430
|
+
}));
|
|
3431
|
+
});
|
|
3432
|
+
const scrollIndicator = computed(() => {
|
|
3433
|
+
const windowSize = viewportSize.value;
|
|
3434
|
+
if (windowSize === void 0 || props.options.length <= windowSize) return {
|
|
3435
|
+
showUp: false,
|
|
3436
|
+
showDown: false
|
|
3437
|
+
};
|
|
3438
|
+
return {
|
|
3439
|
+
showUp: scrollOffset.value > 0,
|
|
3440
|
+
showDown: scrollOffset.value + windowSize < props.options.length
|
|
3441
|
+
};
|
|
3442
|
+
});
|
|
3408
3443
|
return () => {
|
|
3409
|
-
const children =
|
|
3444
|
+
const children = [];
|
|
3445
|
+
if (scrollIndicator.value.showUp) children.push(h("text", {
|
|
3446
|
+
key: "scroll-up",
|
|
3447
|
+
dim: true
|
|
3448
|
+
}, " ..."));
|
|
3449
|
+
for (const { option, index } of visibleOptions.value) {
|
|
3410
3450
|
const isHighlighted = index === highlightedIndex.value;
|
|
3411
3451
|
const isSelected = option.value === props.modelValue;
|
|
3412
3452
|
const indicator = isHighlighted ? props.indicator : props.indicatorEmpty;
|
|
3413
|
-
|
|
3453
|
+
children.push(h("box", {
|
|
3414
3454
|
key: option.value,
|
|
3415
3455
|
style: { flex_direction: "row" }
|
|
3416
3456
|
}, [h("text", {
|
|
3417
3457
|
fg: isHighlighted ? props.selectedFg : props.fg,
|
|
3418
3458
|
bg: isHighlighted ? props.selectedBg : props.bg,
|
|
3419
3459
|
dim: option.disabled
|
|
3420
|
-
}, `${indicator}${option.label}${isSelected ? " (selected)" : ""}`)]);
|
|
3421
|
-
}
|
|
3460
|
+
}, `${indicator}${option.label}${isSelected ? " (selected)" : ""}`)]));
|
|
3461
|
+
}
|
|
3462
|
+
if (scrollIndicator.value.showDown) children.push(h("text", {
|
|
3463
|
+
key: "scroll-down",
|
|
3464
|
+
dim: true
|
|
3465
|
+
}, " ..."));
|
|
3422
3466
|
return h("box", {
|
|
3423
3467
|
style: { flex_direction: "column" },
|
|
3424
3468
|
fg: props.fg,
|
|
@@ -4410,9 +4454,9 @@ const avatarStatusIcons = {
|
|
|
4410
4454
|
};
|
|
4411
4455
|
//#endregion
|
|
4412
4456
|
//#region src/components/FrescoAlert.vue?vue&type=script&setup=true&lang.ts
|
|
4413
|
-
const _hoisted_1$
|
|
4414
|
-
const _hoisted_2$
|
|
4415
|
-
const _hoisted_3$
|
|
4457
|
+
const _hoisted_1$4 = ["border", "fg"];
|
|
4458
|
+
const _hoisted_2$4 = ["fg"];
|
|
4459
|
+
const _hoisted_3$4 = ["fg"];
|
|
4416
4460
|
//#endregion
|
|
4417
4461
|
//#region src/components/FrescoAlert.vue
|
|
4418
4462
|
var FrescoAlert_default = /* @__PURE__ */ defineComponent({
|
|
@@ -4461,18 +4505,18 @@ var FrescoAlert_default = /* @__PURE__ */ defineComponent({
|
|
|
4461
4505
|
}, [createElementVNode("div", { style: headerStyle }, [__props.showIcon ? (openBlock(), createElementBlock("text", {
|
|
4462
4506
|
key: 0,
|
|
4463
4507
|
fg: config.value.fg
|
|
4464
|
-
}, toDisplayString(iconLabel.value), 9, _hoisted_2$
|
|
4508
|
+
}, toDisplayString(iconLabel.value), 9, _hoisted_2$4)) : createCommentVNode("v-if", true), createElementVNode("text", {
|
|
4465
4509
|
fg: config.value.fg,
|
|
4466
4510
|
bold: true
|
|
4467
|
-
}, toDisplayString(heading.value), 9, _hoisted_3$
|
|
4511
|
+
}, toDisplayString(heading.value), 9, _hoisted_3$4)]), createElementVNode("text", { style: messageStyle }, toDisplayString(__props.message), 1)], 8, _hoisted_1$4);
|
|
4468
4512
|
};
|
|
4469
4513
|
}
|
|
4470
4514
|
});
|
|
4471
4515
|
//#endregion
|
|
4472
4516
|
//#region src/components/FrescoBadge.vue?vue&type=script&setup=true&lang.ts
|
|
4473
|
-
const _hoisted_1$
|
|
4474
|
-
const _hoisted_2$
|
|
4475
|
-
const _hoisted_3$
|
|
4517
|
+
const _hoisted_1$3 = ["fg", "bg"];
|
|
4518
|
+
const _hoisted_2$3 = ["fg", "bg"];
|
|
4519
|
+
const _hoisted_3$3 = ["fg", "bg"];
|
|
4476
4520
|
//#endregion
|
|
4477
4521
|
//#region src/components/FrescoBadge.vue
|
|
4478
4522
|
var FrescoBadge_default = /* @__PURE__ */ defineComponent({
|
|
@@ -4520,12 +4564,12 @@ var FrescoBadge_default = /* @__PURE__ */ defineComponent({
|
|
|
4520
4564
|
}, [createElementVNode("text", {
|
|
4521
4565
|
fg: foreground.value,
|
|
4522
4566
|
bg: background.value
|
|
4523
|
-
}, toDisplayString(__props.label), 9, _hoisted_2$
|
|
4567
|
+
}, toDisplayString(__props.label), 9, _hoisted_2$3)], 8, _hoisted_1$3)) : (openBlock(), createElementBlock("text", {
|
|
4524
4568
|
key: 1,
|
|
4525
4569
|
fg: foreground.value,
|
|
4526
4570
|
bg: background.value,
|
|
4527
4571
|
bold: true
|
|
4528
|
-
}, "[" + toDisplayString(__props.label) + "]", 9, _hoisted_3$
|
|
4572
|
+
}, "[" + toDisplayString(__props.label) + "]", 9, _hoisted_3$3));
|
|
4529
4573
|
};
|
|
4530
4574
|
}
|
|
4531
4575
|
});
|
|
@@ -4648,17 +4692,6 @@ const Timer = defineComponent({
|
|
|
4648
4692
|
}
|
|
4649
4693
|
});
|
|
4650
4694
|
//#endregion
|
|
4651
|
-
//#region src/components/FrescoTooltip.vue?vue&type=script&setup=true&lang.ts
|
|
4652
|
-
const _hoisted_1$3 = { key: 0 };
|
|
4653
|
-
const _hoisted_2$3 = [
|
|
4654
|
-
"border",
|
|
4655
|
-
"bg",
|
|
4656
|
-
"fg"
|
|
4657
|
-
];
|
|
4658
|
-
const _hoisted_3$3 = ["fg", "bg"];
|
|
4659
|
-
const _hoisted_4$1 = { key: 1 };
|
|
4660
|
-
const _hoisted_5$1 = { key: 1 };
|
|
4661
|
-
//#endregion
|
|
4662
4695
|
//#region src/components/FrescoTooltip.vue
|
|
4663
4696
|
var FrescoTooltip_default = /* @__PURE__ */ defineComponent({
|
|
4664
4697
|
name: "FrescoTooltip",
|
|
@@ -4678,6 +4711,11 @@ var FrescoTooltip_default = /* @__PURE__ */ defineComponent({
|
|
|
4678
4711
|
required: false,
|
|
4679
4712
|
default: "top"
|
|
4680
4713
|
},
|
|
4714
|
+
offset: {
|
|
4715
|
+
type: Number,
|
|
4716
|
+
required: false,
|
|
4717
|
+
default: 0
|
|
4718
|
+
},
|
|
4681
4719
|
border: {
|
|
4682
4720
|
type: String,
|
|
4683
4721
|
required: false,
|
|
@@ -4695,29 +4733,70 @@ var FrescoTooltip_default = /* @__PURE__ */ defineComponent({
|
|
|
4695
4733
|
}
|
|
4696
4734
|
},
|
|
4697
4735
|
setup(__props) {
|
|
4698
|
-
const
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4736
|
+
const panelPosition = computed(() => {
|
|
4737
|
+
const gap = Number.isFinite(__props.offset) ? Math.max(0, __props.offset) : 0;
|
|
4738
|
+
switch (__props.position) {
|
|
4739
|
+
case "bottom": return {
|
|
4740
|
+
top: "100%",
|
|
4741
|
+
marginTop: gap
|
|
4742
|
+
};
|
|
4743
|
+
case "right": return {
|
|
4744
|
+
left: "100%",
|
|
4745
|
+
marginLeft: gap
|
|
4746
|
+
};
|
|
4747
|
+
case "left": return {
|
|
4748
|
+
right: "100%",
|
|
4749
|
+
marginRight: gap
|
|
4750
|
+
};
|
|
4751
|
+
default: return {
|
|
4752
|
+
bottom: "100%",
|
|
4753
|
+
marginBottom: gap
|
|
4754
|
+
};
|
|
4755
|
+
}
|
|
4756
|
+
});
|
|
4704
4757
|
return (_ctx, _cache) => {
|
|
4705
|
-
return
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
|
|
4709
|
-
|
|
4710
|
-
|
|
4758
|
+
return openBlock(), createBlock(unref(Box), { position: "relative" }, {
|
|
4759
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default"), __props.visible ? (openBlock(), createBlock(unref(Box), {
|
|
4760
|
+
key: 0,
|
|
4761
|
+
position: "absolute",
|
|
4762
|
+
top: panelPosition.value.top,
|
|
4763
|
+
right: panelPosition.value.right,
|
|
4764
|
+
bottom: panelPosition.value.bottom,
|
|
4765
|
+
left: panelPosition.value.left,
|
|
4766
|
+
"margin-top": panelPosition.value.marginTop,
|
|
4767
|
+
"margin-right": panelPosition.value.marginRight,
|
|
4768
|
+
"margin-bottom": panelPosition.value.marginBottom,
|
|
4769
|
+
"margin-left": panelPosition.value.marginLeft,
|
|
4711
4770
|
border: __props.border === "none" ? void 0 : __props.border,
|
|
4712
4771
|
bg: __props.bg,
|
|
4713
4772
|
fg: __props.fg,
|
|
4714
|
-
|
|
4715
|
-
},
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4773
|
+
"padding-x": 1
|
|
4774
|
+
}, {
|
|
4775
|
+
default: withCtx(() => [createVNode(unref(Text), {
|
|
4776
|
+
content: __props.text,
|
|
4777
|
+
fg: __props.fg,
|
|
4778
|
+
bg: __props.bg
|
|
4779
|
+
}, null, 8, [
|
|
4780
|
+
"content",
|
|
4781
|
+
"fg",
|
|
4782
|
+
"bg"
|
|
4783
|
+
])]),
|
|
4784
|
+
_: 1
|
|
4785
|
+
}, 8, [
|
|
4786
|
+
"top",
|
|
4787
|
+
"right",
|
|
4788
|
+
"bottom",
|
|
4789
|
+
"left",
|
|
4790
|
+
"margin-top",
|
|
4791
|
+
"margin-right",
|
|
4792
|
+
"margin-bottom",
|
|
4793
|
+
"margin-left",
|
|
4794
|
+
"border",
|
|
4795
|
+
"bg",
|
|
4796
|
+
"fg"
|
|
4797
|
+
])) : createCommentVNode("v-if", true)]),
|
|
4798
|
+
_: 3
|
|
4799
|
+
});
|
|
4721
4800
|
};
|
|
4722
4801
|
}
|
|
4723
4802
|
});
|
|
@@ -5794,13 +5873,14 @@ var FrescoModal_default = /* @__PURE__ */ defineComponent({
|
|
|
5794
5873
|
watch(isVisible, (next, previous) => {
|
|
5795
5874
|
if (next && !previous) wasFocusedBeforeOpen.value = manager.activeId.value;
|
|
5796
5875
|
}, { flush: "sync" });
|
|
5797
|
-
|
|
5876
|
+
const modalFocus = useFocus({
|
|
5798
5877
|
id: __props.focusId,
|
|
5799
5878
|
isActive: isVisible,
|
|
5800
5879
|
autoFocus: true,
|
|
5801
5880
|
delegateFocusTo: computed(() => __props.initialFocusId),
|
|
5802
5881
|
trapFocus: trapsFocus
|
|
5803
|
-
})
|
|
5882
|
+
});
|
|
5883
|
+
provideFocusScope(modalFocus.id);
|
|
5804
5884
|
function focusInitialTarget() {
|
|
5805
5885
|
if (!__props.visible || !__props.initialFocusId || !manager.focusableIds.value.includes(__props.initialFocusId)) return;
|
|
5806
5886
|
manager.focus(__props.initialFocusId);
|
|
@@ -5834,7 +5914,8 @@ var FrescoModal_default = /* @__PURE__ */ defineComponent({
|
|
|
5834
5914
|
"justify-content": "center",
|
|
5835
5915
|
"align-items": "center",
|
|
5836
5916
|
width: "100%",
|
|
5837
|
-
height: "100%"
|
|
5917
|
+
height: "100%",
|
|
5918
|
+
"focus-id": unref(modalFocus).id
|
|
5838
5919
|
}, accessibilityProps.value), {
|
|
5839
5920
|
default: withCtx(() => [__props.visible ? (openBlock(), createBlock(unref(Box), {
|
|
5840
5921
|
key: 0,
|
|
@@ -5870,7 +5951,195 @@ var FrescoModal_default = /* @__PURE__ */ defineComponent({
|
|
|
5870
5951
|
"bg"
|
|
5871
5952
|
])) : createCommentVNode("v-if", true)]),
|
|
5872
5953
|
_: 3
|
|
5873
|
-
}, 16, ["display"]);
|
|
5954
|
+
}, 16, ["display", "focus-id"]);
|
|
5955
|
+
};
|
|
5956
|
+
}
|
|
5957
|
+
});
|
|
5958
|
+
//#endregion
|
|
5959
|
+
//#region src/components/FrescoPopover.vue
|
|
5960
|
+
var FrescoPopover_default = /* @__PURE__ */ defineComponent({
|
|
5961
|
+
name: "FrescoPopover",
|
|
5962
|
+
__name: "FrescoPopover",
|
|
5963
|
+
props: {
|
|
5964
|
+
open: {
|
|
5965
|
+
type: Boolean,
|
|
5966
|
+
required: false,
|
|
5967
|
+
default: false
|
|
5968
|
+
},
|
|
5969
|
+
placement: {
|
|
5970
|
+
type: String,
|
|
5971
|
+
required: false,
|
|
5972
|
+
default: "bottom"
|
|
5973
|
+
},
|
|
5974
|
+
offset: {
|
|
5975
|
+
type: Number,
|
|
5976
|
+
required: false,
|
|
5977
|
+
default: 0
|
|
5978
|
+
},
|
|
5979
|
+
width: {
|
|
5980
|
+
type: [Number, String],
|
|
5981
|
+
required: false
|
|
5982
|
+
},
|
|
5983
|
+
height: {
|
|
5984
|
+
type: [Number, String],
|
|
5985
|
+
required: false
|
|
5986
|
+
},
|
|
5987
|
+
border: {
|
|
5988
|
+
type: String,
|
|
5989
|
+
required: false,
|
|
5990
|
+
default: "rounded"
|
|
5991
|
+
},
|
|
5992
|
+
fg: {
|
|
5993
|
+
type: String,
|
|
5994
|
+
required: false
|
|
5995
|
+
},
|
|
5996
|
+
bg: {
|
|
5997
|
+
type: String,
|
|
5998
|
+
required: false
|
|
5999
|
+
},
|
|
6000
|
+
focusId: {
|
|
6001
|
+
type: String,
|
|
6002
|
+
required: false,
|
|
6003
|
+
default: `popover-${Math.random().toString(36).slice(2)}`
|
|
6004
|
+
},
|
|
6005
|
+
initialFocusId: {
|
|
6006
|
+
type: String,
|
|
6007
|
+
required: false
|
|
6008
|
+
},
|
|
6009
|
+
trapFocus: {
|
|
6010
|
+
type: Boolean,
|
|
6011
|
+
required: false,
|
|
6012
|
+
default: true
|
|
6013
|
+
},
|
|
6014
|
+
restoreFocus: {
|
|
6015
|
+
type: Boolean,
|
|
6016
|
+
required: false,
|
|
6017
|
+
default: true
|
|
6018
|
+
},
|
|
6019
|
+
closeOnEscape: {
|
|
6020
|
+
type: Boolean,
|
|
6021
|
+
required: false,
|
|
6022
|
+
default: true
|
|
6023
|
+
},
|
|
6024
|
+
accessibilityRole: {
|
|
6025
|
+
type: String,
|
|
6026
|
+
required: false,
|
|
6027
|
+
default: "dialog"
|
|
6028
|
+
},
|
|
6029
|
+
accessibilityLabel: {
|
|
6030
|
+
type: String,
|
|
6031
|
+
required: false,
|
|
6032
|
+
default: "Popover"
|
|
6033
|
+
}
|
|
6034
|
+
},
|
|
6035
|
+
emits: ["close"],
|
|
6036
|
+
setup(__props, { emit: __emit }) {
|
|
6037
|
+
const emit = __emit;
|
|
6038
|
+
const manager = useFocusManager();
|
|
6039
|
+
const wasFocusedBeforeOpen = ref();
|
|
6040
|
+
const isOpen = computed(() => __props.open);
|
|
6041
|
+
const trapsFocus = computed(() => __props.open && __props.trapFocus);
|
|
6042
|
+
if (__props.open) wasFocusedBeforeOpen.value = manager.activeId.value;
|
|
6043
|
+
watch(isOpen, (next, previous) => {
|
|
6044
|
+
if (next && !previous) wasFocusedBeforeOpen.value = manager.activeId.value;
|
|
6045
|
+
}, { flush: "sync" });
|
|
6046
|
+
const popoverFocus = useFocus({
|
|
6047
|
+
id: __props.focusId,
|
|
6048
|
+
isActive: isOpen,
|
|
6049
|
+
autoFocus: true,
|
|
6050
|
+
delegateFocusTo: computed(() => __props.initialFocusId),
|
|
6051
|
+
trapFocus: trapsFocus
|
|
6052
|
+
});
|
|
6053
|
+
provideFocusScope(popoverFocus.id);
|
|
6054
|
+
function focusInitialTarget() {
|
|
6055
|
+
if (!__props.open || !__props.initialFocusId || !manager.focusableIds.value.includes(__props.initialFocusId)) return;
|
|
6056
|
+
manager.focus(__props.initialFocusId);
|
|
6057
|
+
}
|
|
6058
|
+
watch([isOpen, manager.focusableIds], () => {
|
|
6059
|
+
nextTick(focusInitialTarget);
|
|
6060
|
+
}, {
|
|
6061
|
+
deep: true,
|
|
6062
|
+
flush: "post"
|
|
6063
|
+
});
|
|
6064
|
+
watch(isOpen, (next, previous) => {
|
|
6065
|
+
if (next || !previous || !__props.restoreFocus) return;
|
|
6066
|
+
const target = wasFocusedBeforeOpen.value;
|
|
6067
|
+
if (target && manager.focusableIds.value.includes(target)) manager.focus(target);
|
|
6068
|
+
wasFocusedBeforeOpen.value = void 0;
|
|
6069
|
+
}, { flush: "post" });
|
|
6070
|
+
onMounted(() => void nextTick(focusInitialTarget));
|
|
6071
|
+
useInput({
|
|
6072
|
+
isActive: computed(() => __props.open && __props.closeOnEscape),
|
|
6073
|
+
onEscape: () => emit("close")
|
|
6074
|
+
});
|
|
6075
|
+
function panelPosition(selected) {
|
|
6076
|
+
const gap = Number.isFinite(__props.offset) ? Math.max(0, __props.offset) : 0;
|
|
6077
|
+
switch (selected) {
|
|
6078
|
+
case "top": return {
|
|
6079
|
+
bottom: "100%",
|
|
6080
|
+
marginBottom: gap
|
|
6081
|
+
};
|
|
6082
|
+
case "right": return {
|
|
6083
|
+
left: "100%",
|
|
6084
|
+
marginLeft: gap
|
|
6085
|
+
};
|
|
6086
|
+
case "left": return {
|
|
6087
|
+
right: "100%",
|
|
6088
|
+
marginRight: gap
|
|
6089
|
+
};
|
|
6090
|
+
default: return {
|
|
6091
|
+
top: "100%",
|
|
6092
|
+
marginTop: gap
|
|
6093
|
+
};
|
|
6094
|
+
}
|
|
6095
|
+
}
|
|
6096
|
+
const position = computed(() => panelPosition(__props.placement));
|
|
6097
|
+
const accessibilityProps = computed(() => ({
|
|
6098
|
+
ariaRole: __props.accessibilityRole,
|
|
6099
|
+
ariaLabel: __props.accessibilityLabel,
|
|
6100
|
+
ariaState: { expanded: __props.open }
|
|
6101
|
+
}));
|
|
6102
|
+
return (_ctx, _cache) => {
|
|
6103
|
+
return openBlock(), createBlock(unref(Box), { position: "relative" }, {
|
|
6104
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "anchor"), __props.open ? (openBlock(), createBlock(unref(Box), mergeProps({
|
|
6105
|
+
key: 0,
|
|
6106
|
+
position: "absolute",
|
|
6107
|
+
top: position.value.top,
|
|
6108
|
+
right: position.value.right,
|
|
6109
|
+
bottom: position.value.bottom,
|
|
6110
|
+
left: position.value.left,
|
|
6111
|
+
"margin-top": position.value.marginTop,
|
|
6112
|
+
"margin-right": position.value.marginRight,
|
|
6113
|
+
"margin-bottom": position.value.marginBottom,
|
|
6114
|
+
"margin-left": position.value.marginLeft,
|
|
6115
|
+
width: __props.width,
|
|
6116
|
+
height: __props.height,
|
|
6117
|
+
border: __props.border === "none" ? void 0 : __props.border,
|
|
6118
|
+
fg: __props.fg,
|
|
6119
|
+
bg: __props.bg,
|
|
6120
|
+
padding: 1,
|
|
6121
|
+
"focus-id": unref(popoverFocus).id
|
|
6122
|
+
}, accessibilityProps.value), {
|
|
6123
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
6124
|
+
_: 3
|
|
6125
|
+
}, 16, [
|
|
6126
|
+
"top",
|
|
6127
|
+
"right",
|
|
6128
|
+
"bottom",
|
|
6129
|
+
"left",
|
|
6130
|
+
"margin-top",
|
|
6131
|
+
"margin-right",
|
|
6132
|
+
"margin-bottom",
|
|
6133
|
+
"margin-left",
|
|
6134
|
+
"width",
|
|
6135
|
+
"height",
|
|
6136
|
+
"border",
|
|
6137
|
+
"fg",
|
|
6138
|
+
"bg",
|
|
6139
|
+
"focus-id"
|
|
6140
|
+
])) : createCommentVNode("v-if", true)]),
|
|
6141
|
+
_: 3
|
|
6142
|
+
});
|
|
5874
6143
|
};
|
|
5875
6144
|
}
|
|
5876
6145
|
});
|
|
@@ -6160,6 +6429,6 @@ var FrescoAvatar_default = /* @__PURE__ */ defineComponent({
|
|
|
6160
6429
|
}
|
|
6161
6430
|
});
|
|
6162
6431
|
//#endregion
|
|
6163
|
-
export {
|
|
6432
|
+
export { FrescoFrameBuffer_default as A, FrescoNewline_default as B, RadioGroup as C, TextInput as D, TextArea as E, Code as F, Grid as G, ScrollBar_default as H, createCodeBuffer as I, FrescoStack_default as J, FrescoVStack_default as K, LineNumber as L, defaultMarkdownRenderer as M, parseMarkdown as N, FrescoLink_default as O, renderMarkdown as P, FrescoTransform_default as R, Confirm as S, Select as T, Text as U, ScrollBox_default as V, FrescoCard_default as W, FrescoSpacer_default as X, FrescoDivider_default as Y, Box as Z, FrescoAlert_default as _, FrescoPopover_default as a, Form as b, FrescoBreadcrumb_default as c, Tree as d, Table as f, FrescoBadge_default as g, Timer as h, StatusBar as i, FrescoMarkdown_default as j, Diff as k, Tabs as l, FrescoTooltip_default as m, KeyHint as n, FrescoModal_default as o, List as p, FrescoHStack_default as q, FrescoHeader_default as r, Stepper as s, FrescoAvatar_default as t, Menu as u, ProgressBar as v, Checkbox as w, FrescoSlider_default as x, FrescoSpinner_default as y, FrescoStatic_default as z };
|
|
6164
6433
|
|
|
6165
|
-
//# sourceMappingURL=components-
|
|
6434
|
+
//# sourceMappingURL=components-DgDohiXo.mjs.map
|