@morscherlab/mint-sdk 1.4.13 → 1.5.0-beta.10
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/{AlertBox-CexONPhA.js → AlertBox-Cai0w7gF.js} +3 -3
- package/dist/{AlertBox-CexONPhA.js.map → AlertBox-Cai0w7gF.js.map} +1 -1
- package/dist/{AppSidebar-CIBehlYL.js → AppSidebar-C-Vq5x4I.js} +354 -93
- package/dist/AppSidebar-C-Vq5x4I.js.map +1 -0
- package/dist/{ConfirmDialog-CjWoxAD1.js → ConfirmDialog-BjFsOpBe.js} +3 -3
- package/dist/ConfirmDialog-BjFsOpBe.js.map +1 -0
- package/dist/{ExperimentPopover-CzV1--OY.js → ExperimentPopover-DYy_s0kI.js} +25 -37
- package/dist/ExperimentPopover-DYy_s0kI.js.map +1 -0
- package/dist/{ExperimentSelectorModal-CUkKmgfr.js → ExperimentSelectorModal-Bfh5bdkv.js} +5 -5
- package/dist/{ExperimentSelectorModal-CUkKmgfr.js.map → ExperimentSelectorModal-Bfh5bdkv.js.map} +1 -1
- package/dist/{SegmentedControl-C-sckoJZ.js → SegmentedControl-B8KgyOjd.js} +2 -2
- package/dist/{SegmentedControl-C-sckoJZ.js.map → SegmentedControl-B8KgyOjd.js.map} +1 -1
- package/dist/{SettingsModal-jW7Z4i_1.js → SettingsModal-DwfrD1ER.js} +7 -7
- package/dist/{SettingsModal-jW7Z4i_1.js.map → SettingsModal-DwfrD1ER.js.map} +1 -1
- package/dist/__tests__/components/AppTopBarCompact.test.d.ts +1 -0
- package/dist/__tests__/components/AppTopBarCompactReset.test.d.ts +1 -0
- package/dist/__tests__/components/AutoGroupModal.experimentLoad.test.d.ts +1 -0
- package/dist/components/AppTopBar.compact.d.ts +5 -0
- package/dist/components/AppTopBar.vue.d.ts +17 -17
- package/dist/components/FormBuilder.vue.d.ts +1 -1
- package/dist/components/PluginIcon.vue.d.ts +2 -2
- package/dist/components/PluginWorkspaceView.vue.d.ts +4 -0
- package/dist/components/SettingsModal.vue.d.ts +1 -1
- package/dist/components/internal/AppTopBarPageSelectorInternal.vue.d.ts +2 -2
- package/dist/components/internal/FormSchemaInternal.vue.d.ts +9 -9
- package/dist/components/internal/FormSectionRenderer.vue.d.ts +4 -4
- package/dist/components/internal/LucideIconInternal.vue.d.ts +17 -0
- package/dist/composables/appLayoutSidebar.d.ts +9 -0
- package/dist/composables/useVersionedSave.d.ts +5 -2
- package/dist/{controlSchemaModel-C_XqpkgE.js → controlSchemaModel-BtFNZj8t.js} +2 -2
- package/dist/{controlSchemaModel-C_XqpkgE.js.map → controlSchemaModel-BtFNZj8t.js.map} +1 -1
- package/dist/{data-8G-U6Pb0.js → data-CJztFns8.js} +31 -15
- package/dist/{data-8G-U6Pb0.js.map → data-CJztFns8.js.map} +1 -1
- package/dist/data.js +8 -8
- package/dist/{experimentStatus-DCn2QKG7.js → experimentStatus-Deokk7Br.js} +2 -2
- package/dist/{experimentStatus-DCn2QKG7.js.map → experimentStatus-Deokk7Br.js.map} +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +15 -20
- package/dist/index.js.map +1 -1
- package/dist/{install-CM33AZhf.js → install-Bk02tJ5M.js} +14 -15
- package/dist/{install-CM33AZhf.js.map → install-Bk02tJ5M.js.map} +1 -1
- package/dist/install.js +1 -1
- package/dist/{lab-CPJ7n7e5.js → lab-BYhb_cJI.js} +22 -14
- package/dist/lab-BYhb_cJI.js.map +1 -0
- package/dist/lab.js +4 -4
- package/dist/{records-BAymyHAn.js → records-GtiVMlTQ.js} +198 -62
- package/dist/records-GtiVMlTQ.js.map +1 -0
- package/dist/{runtime-PntKXQ7K.js → runtime-aZPUPxoB.js} +29 -12
- package/dist/runtime-aZPUPxoB.js.map +1 -0
- package/dist/runtime.js +6 -6
- package/dist/{shell-B-woqThX.js → shell-Bk9mD4Lc.js} +5 -5
- package/dist/{shell-B-woqThX.js.map → shell-Bk9mD4Lc.js.map} +1 -1
- package/dist/shell.js +5 -5
- package/dist/styles.css +139 -15
- package/dist/types/components.d.ts +22 -2
- package/dist/types/generated-ui.d.ts +2 -0
- package/dist/types/index.d.ts +2 -2
- package/dist/types/instrument.d.ts +0 -17
- package/dist/{useDropdownState-uFIz6Yv8.js → useDropdownState-CcBzUYZ6.js} +14 -5
- package/dist/useDropdownState-CcBzUYZ6.js.map +1 -0
- package/dist/{useExperimentSamples-DEDAKa2E.js → useExperimentSamples-CpNXvpUn.js} +3 -3
- package/dist/{useExperimentSamples-DEDAKa2E.js.map → useExperimentSamples-CpNXvpUn.js.map} +1 -1
- package/dist/{useListReorder-W1bzK_bo.js → useListReorder-Bp4EAI2w.js} +3 -3
- package/dist/{useListReorder-W1bzK_bo.js.map → useListReorder-Bp4EAI2w.js.map} +1 -1
- package/dist/{useRackEditor-BWOnob3i.js → useRackEditor-i2bdPUFf.js} +8 -8
- package/dist/{useRackEditor-BWOnob3i.js.map → useRackEditor-i2bdPUFf.js.map} +1 -1
- package/dist/{useRealtime-B0u_FvEH.js → useRealtime-BLQEjbuq.js} +3 -3
- package/dist/{useRealtime-B0u_FvEH.js.map → useRealtime-BLQEjbuq.js.map} +1 -1
- package/dist/useRequest-CXyPw3eh.js +76 -0
- package/dist/useRequest-CXyPw3eh.js.map +1 -0
- package/dist/utils/deprecation.d.ts +2 -0
- package/dist/utils/lucideIcon.d.ts +4 -0
- package/package.json +1 -1
- package/src/__tests__/components/AppTopBar.test.ts +102 -20
- package/src/__tests__/components/AppTopBarCompact.test.ts +65 -0
- package/src/__tests__/components/AppTopBarCompactReset.test.ts +24 -0
- package/src/__tests__/components/AutoGroupModal.experimentLoad.test.ts +58 -0
- package/src/__tests__/components/BaseModal.test.ts +33 -2
- package/src/__tests__/components/ConfirmDialog.test.ts +2 -2
- package/src/__tests__/components/ExperimentPopover.test.ts +32 -0
- package/src/__tests__/components/PluginWorkspaceView.test.ts +1 -1
- package/src/__tests__/components/deprecationTags.test.ts +4 -18
- package/src/__tests__/composables/useJobCenter.test.ts +35 -0
- package/src/__tests__/composables/useVersionedSave.test.ts +71 -6
- package/src/__tests__/docs/frontendDocsCatalog.test.ts +3 -3
- package/src/__tests__/styles/menusShellRefresh.test.ts +5 -0
- package/src/components/AppLayout.story.vue +5 -5
- package/src/components/AppLayout.vue +13 -1
- package/src/components/AppSidebar.vue +2 -2
- package/src/components/AppTopBar.compact.ts +60 -0
- package/src/components/AppTopBar.story.vue +39 -14
- package/src/components/AppTopBar.vue +222 -89
- package/src/components/BaseModal.vue +16 -5
- package/src/components/CollapsibleCard.vue +1 -1
- package/src/components/ConfirmDialog.vue +1 -1
- package/src/components/ExperimentPopover.story.vue +2 -2
- package/src/components/ExperimentPopover.vue +6 -22
- package/src/components/GeneratedPluginView.vue +0 -1
- package/src/components/PluginIcon.story.vue +2 -2
- package/src/components/PluginIcon.vue +2 -2
- package/src/components/PluginWorkspaceView.vue +8 -0
- package/src/components/internal/AppTopBarPageSelectorInternal.vue +12 -0
- package/src/components/internal/AutoGroupModalInternal.vue +14 -3
- package/src/components/internal/LucideIconInternal.vue +23 -0
- package/src/composables/appLayoutSidebar.ts +11 -0
- package/src/composables/index.ts +1 -2
- package/src/composables/useJobCenter.ts +21 -1
- package/src/composables/usePluginWorkspace.ts +1 -1
- package/src/composables/useVersionedSave.ts +32 -7
- package/src/index.ts +0 -3
- package/src/styles/components/app-layout.css +5 -0
- package/src/styles/components/app-top-bar.css +128 -8
- package/src/styles/components/plugin-icon.css +1 -1
- package/src/styles/variables.css +2 -2
- package/src/types/components.ts +23 -2
- package/src/types/generated-ui.ts +2 -0
- package/src/types/index.ts +1 -1
- package/src/types/instrument.ts +0 -18
- package/src/utils/deprecation.ts +8 -0
- package/src/utils/lucideIcon.ts +25 -0
- package/src/utils/lucideIconIndex.d.ts +2 -0
- package/dist/AppSidebar-CIBehlYL.js.map +0 -1
- package/dist/ConfirmDialog-CjWoxAD1.js.map +0 -1
- package/dist/ExperimentPopover-CzV1--OY.js.map +0 -1
- package/dist/deprecatedRootExports.d.ts +0 -191
- package/dist/lab-CPJ7n7e5.js.map +0 -1
- package/dist/records-BAymyHAn.js.map +0 -1
- package/dist/runtime-PntKXQ7K.js.map +0 -1
- package/dist/useDropdownState-uFIz6Yv8.js.map +0 -1
- package/dist/useRequest-D9-3BS-3.js +0 -215
- package/dist/useRequest-D9-3BS-3.js.map +0 -1
- package/src/deprecatedRootExports.ts +0 -226
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as BaseButton_default, i as useEventListener, t as useDropdownState } from "./useDropdownState-
|
|
1
|
+
import { a as BaseButton_default, i as useEventListener, t as useDropdownState } from "./useDropdownState-CcBzUYZ6.js";
|
|
2
2
|
import { n as integrationHost, u as useSettingsStore } from "./experiment-DyO54FQB.js";
|
|
3
|
-
import {
|
|
4
|
-
import { F as applySpecDefaults, M as usePlatform, _ as getTypeDefault, a as StepWizard_default, c as normalizeControls, d as numericValue, g as getFieldRegistryEntry, l as normalizeOption, o as defaultValueForControl, p as orderedUnique, u as humanize } from "./useListReorder-
|
|
5
|
-
import { Fragment, Teleport, Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineAsyncComponent, defineComponent, guardReactiveProps, inject, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onBeforeUnmount, onMounted, onScopeDispose, openBlock, provide, reactive, readonly, ref, renderList, renderSlot, resolveComponent, resolveDynamicComponent, shallowRef, toDisplayString, toRaw, toValue, unref, useId, useSlots, useTemplateRef, vShow, watch, withCtx, withDirectives, withModifiers } from "vue";
|
|
6
|
-
import { Check, CircleAlert, CircleCheck, CircleHelp, CircleX, ListChecks, LoaderCircle, Moon, Play, Sun, X } from "lucide-vue-next";
|
|
3
|
+
import { B as BaseCheckbox_default, D as useMenuKeyboard, L as FormField_default, T as ActionMenu_default, _ as APP_EXPERIMENT_KEY, t as isRecord } from "./records-GtiVMlTQ.js";
|
|
4
|
+
import { F as applySpecDefaults, M as usePlatform, _ as getTypeDefault, a as StepWizard_default, c as normalizeControls, d as numericValue, g as getFieldRegistryEntry, l as normalizeOption, o as defaultValueForControl, p as orderedUnique, u as humanize } from "./useListReorder-Bp4EAI2w.js";
|
|
5
|
+
import { Fragment, Teleport, Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineAsyncComponent, defineComponent, guardReactiveProps, inject, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onBeforeUnmount, onMounted, onScopeDispose, openBlock, provide, reactive, readonly, ref, renderList, renderSlot, resolveComponent, resolveDynamicComponent, shallowRef, toDisplayString, toRaw, toValue, unref, useId, useSlots, useTemplateRef, vShow, watch, watchEffect, withCtx, withDirectives, withModifiers } from "vue";
|
|
6
|
+
import { Check, CircleAlert, CircleCheck, CircleHelp, CircleX, Ellipsis, ListChecks, LoaderCircle, Menu, Moon, Play, Sun, X } from "lucide-vue-next";
|
|
7
7
|
import { autoUpdate, computePosition, flip, offset, shift } from "@floating-ui/dom";
|
|
8
8
|
//#region src/composables/useTheme.ts
|
|
9
9
|
/** Reads and toggles the active theme (light/dark/system) with reactivity to OS preference changes. */
|
|
@@ -81,11 +81,11 @@ var _hoisted_11$6 = {
|
|
|
81
81
|
};
|
|
82
82
|
var _hoisted_12$5 = ["d"];
|
|
83
83
|
var _hoisted_13$5 = ["d"];
|
|
84
|
-
var _hoisted_14$
|
|
84
|
+
var _hoisted_14$4 = {
|
|
85
85
|
key: 1,
|
|
86
86
|
class: "mint-collapsible-card__action-text-icon"
|
|
87
87
|
};
|
|
88
|
-
var _hoisted_15$
|
|
88
|
+
var _hoisted_15$4 = [
|
|
89
89
|
"disabled",
|
|
90
90
|
"aria-label",
|
|
91
91
|
"aria-expanded"
|
|
@@ -100,7 +100,7 @@ var CollapsibleCard_default = /* @__PURE__ */ defineComponent({
|
|
|
100
100
|
title: {},
|
|
101
101
|
subtitle: {},
|
|
102
102
|
badge: { default: void 0 },
|
|
103
|
-
badgeTone: { default: "
|
|
103
|
+
badgeTone: { default: "primary" },
|
|
104
104
|
defaultOpen: {
|
|
105
105
|
type: Boolean,
|
|
106
106
|
default: false
|
|
@@ -216,7 +216,7 @@ var CollapsibleCard_default = /* @__PURE__ */ defineComponent({
|
|
|
216
216
|
}), 128)) : (openBlock(), createElementBlock("path", {
|
|
217
217
|
key: 1,
|
|
218
218
|
d: action.icon
|
|
219
|
-
}, null, 8, _hoisted_13$5))])) : action.icon ? (openBlock(), createElementBlock("span", _hoisted_14$
|
|
219
|
+
}, null, 8, _hoisted_13$5))])) : action.icon ? (openBlock(), createElementBlock("span", _hoisted_14$4, toDisplayString(action.icon), 1)) : createCommentVNode("", true)], 14, _hoisted_10$6);
|
|
220
220
|
}), 128)),
|
|
221
221
|
__props.showToggle ? (openBlock(), createElementBlock("div", {
|
|
222
222
|
key: 1,
|
|
@@ -245,7 +245,7 @@ var CollapsibleCard_default = /* @__PURE__ */ defineComponent({
|
|
|
245
245
|
"stroke-linejoin": "round",
|
|
246
246
|
viewBox: "0 0 24 24",
|
|
247
247
|
"aria-hidden": "true"
|
|
248
|
-
}, [..._cache[2] || (_cache[2] = [createElementVNode("path", { d: "m6 9 6 6 6-6" }, null, -1)])], 2))], 8, _hoisted_15$
|
|
248
|
+
}, [..._cache[2] || (_cache[2] = [createElementVNode("path", { d: "m6 9 6 6 6-6" }, null, -1)])], 2))], 8, _hoisted_15$4)
|
|
249
249
|
])]), createVNode(Transition, { name: "collapse" }, {
|
|
250
250
|
default: withCtx(() => [withDirectives(createElementVNode("div", _hoisted_16$3, [createElementVNode("div", _hoisted_17$2, [renderSlot(_ctx.$slots, "default")])], 512), [[vShow, isOpen.value]])]),
|
|
251
251
|
_: 3
|
|
@@ -763,7 +763,6 @@ function usePluginWorkspace(options) {
|
|
|
763
763
|
const { props, slots, emit } = options;
|
|
764
764
|
const sidebarSpec = computed(() => props.spec?.sidebar ?? {});
|
|
765
765
|
const topBarSpec = computed(() => props.spec?.topBar === false ? false : applySpecDefaults({
|
|
766
|
-
themeToggle: true,
|
|
767
766
|
settings: {},
|
|
768
767
|
standaloneLabel: false
|
|
769
768
|
}, props.spec?.topBar));
|
|
@@ -855,6 +854,18 @@ function usePluginWorkspace(options) {
|
|
|
855
854
|
};
|
|
856
855
|
}
|
|
857
856
|
//#endregion
|
|
857
|
+
//#region src/utils/deprecation.ts
|
|
858
|
+
var warned = /* @__PURE__ */ new Set();
|
|
859
|
+
/** Warn once per page load that a deprecated SDK option or slot is in use. */
|
|
860
|
+
function warnDeprecatedOnce(key, message) {
|
|
861
|
+
if (warned.has(key)) return;
|
|
862
|
+
warned.add(key);
|
|
863
|
+
console.warn(`[mint-sdk] ${message}`);
|
|
864
|
+
}
|
|
865
|
+
//#endregion
|
|
866
|
+
//#region src/composables/appLayoutSidebar.ts
|
|
867
|
+
var APP_LAYOUT_SIDEBAR_KEY = Symbol("mint-app-layout-sidebar");
|
|
868
|
+
//#endregion
|
|
858
869
|
//#region src/components/AppLayout.vue?vue&type=script&setup=true&lang.ts
|
|
859
870
|
var _hoisted_1$11 = {
|
|
860
871
|
key: 0,
|
|
@@ -937,6 +948,7 @@ var AppLayout_default = /* @__PURE__ */ defineComponent({
|
|
|
937
948
|
*/
|
|
938
949
|
const props = __props;
|
|
939
950
|
const emit = __emit;
|
|
951
|
+
const slots = useSlots();
|
|
940
952
|
const internalSidebarOpen = ref(props.defaultSidebarOpen);
|
|
941
953
|
const sidebarOpenModel = computed({
|
|
942
954
|
get: () => props.sidebarOpen ?? internalSidebarOpen.value,
|
|
@@ -958,6 +970,12 @@ var AppLayout_default = /* @__PURE__ */ defineComponent({
|
|
|
958
970
|
function toggleSidebar() {
|
|
959
971
|
sidebarOpenModel.value = !sidebarOpenModel.value;
|
|
960
972
|
}
|
|
973
|
+
if (props.responsiveSidebar && slots.sidebar) provide(APP_LAYOUT_SIDEBAR_KEY, {
|
|
974
|
+
open: computed(() => sidebarOpenModel.value),
|
|
975
|
+
toggle: toggleSidebar,
|
|
976
|
+
openLabel: computed(() => props.sidebarToggleLabel),
|
|
977
|
+
closeLabel: computed(() => props.sidebarCloseLabel)
|
|
978
|
+
});
|
|
961
979
|
function closeSidebar() {
|
|
962
980
|
sidebarOpenModel.value = false;
|
|
963
981
|
}
|
|
@@ -987,6 +1005,51 @@ var AppLayout_default = /* @__PURE__ */ defineComponent({
|
|
|
987
1005
|
}
|
|
988
1006
|
});
|
|
989
1007
|
//#endregion
|
|
1008
|
+
//#region src/utils/lucideIcon.ts
|
|
1009
|
+
/** A Lucide icon name in kebab case, such as `activity` or `flask-conical`. */
|
|
1010
|
+
var LUCIDE_NAME = /^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/;
|
|
1011
|
+
function isLucideIconName(value) {
|
|
1012
|
+
return !!value && LUCIDE_NAME.test(value);
|
|
1013
|
+
}
|
|
1014
|
+
function pascalCase(name) {
|
|
1015
|
+
return name.replace(/(^|-)([a-z0-9])/g, (_, __, char) => char.toUpperCase());
|
|
1016
|
+
}
|
|
1017
|
+
var iconSet;
|
|
1018
|
+
/** The Lucide component for `name`, or undefined when Lucide has no such icon. */
|
|
1019
|
+
async function loadLucideIcon(name) {
|
|
1020
|
+
iconSet ??= import("lucide-vue-next/dist/esm/icons/index.js");
|
|
1021
|
+
return (await iconSet)[pascalCase(name)];
|
|
1022
|
+
}
|
|
1023
|
+
//#endregion
|
|
1024
|
+
//#region src/components/internal/LucideIconInternal.vue
|
|
1025
|
+
var LucideIconInternal_default = /* @__PURE__ */ defineComponent({
|
|
1026
|
+
__name: "LucideIconInternal",
|
|
1027
|
+
props: {
|
|
1028
|
+
name: {},
|
|
1029
|
+
size: {}
|
|
1030
|
+
},
|
|
1031
|
+
setup(__props) {
|
|
1032
|
+
/** Internal: renders a Lucide icon by name; shows `fallback` until it loads or when the name is unknown. */
|
|
1033
|
+
const props = __props;
|
|
1034
|
+
const icon = shallowRef();
|
|
1035
|
+
watchEffect(async (onCleanup) => {
|
|
1036
|
+
let stale = false;
|
|
1037
|
+
onCleanup(() => {
|
|
1038
|
+
stale = true;
|
|
1039
|
+
});
|
|
1040
|
+
const loaded = await loadLucideIcon(props.name);
|
|
1041
|
+
if (!stale) icon.value = loaded;
|
|
1042
|
+
});
|
|
1043
|
+
return (_ctx, _cache) => {
|
|
1044
|
+
return icon.value ? (openBlock(), createBlock(resolveDynamicComponent(icon.value), {
|
|
1045
|
+
key: 0,
|
|
1046
|
+
size: __props.size ?? 14,
|
|
1047
|
+
"aria-hidden": "true"
|
|
1048
|
+
}, null, 8, ["size"])) : renderSlot(_ctx.$slots, "fallback", {}, void 0, void 0, 1);
|
|
1049
|
+
};
|
|
1050
|
+
}
|
|
1051
|
+
});
|
|
1052
|
+
//#endregion
|
|
990
1053
|
//#region src/utils/items.ts
|
|
991
1054
|
function normalizeItemInput(item) {
|
|
992
1055
|
if (typeof item === "object") return item;
|
|
@@ -1381,31 +1444,33 @@ var _hoisted_1$8 = {
|
|
|
1381
1444
|
};
|
|
1382
1445
|
var _hoisted_2$6 = { class: "mint-page-selector__plugin" };
|
|
1383
1446
|
var _hoisted_3$6 = ["aria-expanded"];
|
|
1384
|
-
var _hoisted_4$6 = {
|
|
1385
|
-
|
|
1447
|
+
var _hoisted_4$6 = { class: "mint-page-selector__icon-fallback" };
|
|
1448
|
+
var _hoisted_5$6 = {
|
|
1449
|
+
key: 2,
|
|
1386
1450
|
class: "mint-page-selector__icon-fallback"
|
|
1387
1451
|
};
|
|
1388
|
-
var
|
|
1389
|
-
var
|
|
1452
|
+
var _hoisted_6$5 = { class: "mint-page-selector__label" };
|
|
1453
|
+
var _hoisted_7$5 = {
|
|
1390
1454
|
class: "mint-page-selector__chevron-wrap",
|
|
1391
1455
|
"aria-hidden": "true"
|
|
1392
1456
|
};
|
|
1393
|
-
var
|
|
1394
|
-
var
|
|
1457
|
+
var _hoisted_8$5 = ["aria-label"];
|
|
1458
|
+
var _hoisted_9$5 = {
|
|
1395
1459
|
class: "mint-page-selector__menu-title",
|
|
1396
1460
|
"aria-hidden": "true"
|
|
1397
1461
|
};
|
|
1398
|
-
var
|
|
1399
|
-
|
|
1462
|
+
var _hoisted_10$5 = { class: "mint-page-selector__icon-fallback" };
|
|
1463
|
+
var _hoisted_11$5 = {
|
|
1464
|
+
key: 2,
|
|
1400
1465
|
class: "mint-page-selector__icon-fallback"
|
|
1401
1466
|
};
|
|
1402
|
-
var
|
|
1403
|
-
var
|
|
1404
|
-
var
|
|
1467
|
+
var _hoisted_12$4 = { class: "mint-page-selector__item-text" };
|
|
1468
|
+
var _hoisted_13$4 = { class: "mint-page-selector__item-label" };
|
|
1469
|
+
var _hoisted_14$3 = {
|
|
1405
1470
|
key: 0,
|
|
1406
1471
|
class: "mint-page-selector__item-hint"
|
|
1407
1472
|
};
|
|
1408
|
-
var
|
|
1473
|
+
var _hoisted_15$3 = {
|
|
1409
1474
|
key: 0,
|
|
1410
1475
|
class: "mint-page-selector__item-key",
|
|
1411
1476
|
"aria-hidden": "true"
|
|
@@ -1510,9 +1575,15 @@ var AppTopBarPageSelectorInternal_default = /* @__PURE__ */ defineComponent({
|
|
|
1510
1575
|
icon: current.value.icon,
|
|
1511
1576
|
size: "sm",
|
|
1512
1577
|
variant: "solid"
|
|
1513
|
-
}, null, 8, ["icon"])) : (
|
|
1514
|
-
|
|
1515
|
-
|
|
1578
|
+
}, null, 8, ["icon"])) : unref(isLucideIconName)(current.value.icon) ? (openBlock(), createBlock(LucideIconInternal_default, {
|
|
1579
|
+
key: 1,
|
|
1580
|
+
name: current.value.icon
|
|
1581
|
+
}, {
|
|
1582
|
+
fallback: withCtx(() => [createElementVNode("span", _hoisted_4$6, toDisplayString(current.value.label.charAt(0)), 1)]),
|
|
1583
|
+
_: 1
|
|
1584
|
+
}, 8, ["name"])) : (openBlock(), createElementBlock("span", _hoisted_5$6, toDisplayString(current.value.label.charAt(0)), 1))])], 2)) : createCommentVNode("", true),
|
|
1585
|
+
createElementVNode("span", _hoisted_6$5, toDisplayString(current.value?.label ?? __props.placeholder), 1),
|
|
1586
|
+
createElementVNode("span", _hoisted_7$5, [(openBlock(), createElementBlock("svg", {
|
|
1516
1587
|
class: normalizeClass(["mint-page-selector__chevron", { "mint-page-selector__chevron--open": unref(isOpen) }]),
|
|
1517
1588
|
viewBox: "0 0 24 24",
|
|
1518
1589
|
fill: "none",
|
|
@@ -1528,7 +1599,7 @@ var AppTopBarPageSelectorInternal_default = /* @__PURE__ */ defineComponent({
|
|
|
1528
1599
|
role: "menu",
|
|
1529
1600
|
"aria-label": menuTitle.value,
|
|
1530
1601
|
onKeydown: handleMenuKeydown
|
|
1531
|
-
}, [createElementVNode("div",
|
|
1602
|
+
}, [createElementVNode("div", _hoisted_9$5, toDisplayString(menuTitle.value), 1), (openBlock(true), createElementBlock(Fragment, null, renderList(normalizedPages.value, (page, index) => {
|
|
1532
1603
|
return openBlock(), createBlock(ActionItemInternal_default, {
|
|
1533
1604
|
key: page.id,
|
|
1534
1605
|
href: page.href,
|
|
@@ -1551,9 +1622,15 @@ var AppTopBarPageSelectorInternal_default = /* @__PURE__ */ defineComponent({
|
|
|
1551
1622
|
icon: page.icon,
|
|
1552
1623
|
size: "sm",
|
|
1553
1624
|
variant: "solid"
|
|
1554
|
-
}, null, 8, ["icon"])) : (
|
|
1555
|
-
|
|
1556
|
-
|
|
1625
|
+
}, null, 8, ["icon"])) : unref(isLucideIconName)(page.icon) ? (openBlock(), createBlock(LucideIconInternal_default, {
|
|
1626
|
+
key: 1,
|
|
1627
|
+
name: page.icon
|
|
1628
|
+
}, {
|
|
1629
|
+
fallback: withCtx(() => [createElementVNode("span", _hoisted_10$5, toDisplayString(page.label.charAt(0)), 1)]),
|
|
1630
|
+
_: 2
|
|
1631
|
+
}, 1032, ["name"])) : (openBlock(), createElementBlock("span", _hoisted_11$5, toDisplayString(page.label.charAt(0)), 1))])], 2),
|
|
1632
|
+
createElementVNode("span", _hoisted_12$4, [createElementVNode("span", _hoisted_13$4, toDisplayString(page.label), 1), page.hint ? (openBlock(), createElementBlock("span", _hoisted_14$3, toDisplayString(page.hint), 1)) : createCommentVNode("", true)]),
|
|
1633
|
+
index < 9 ? (openBlock(), createElementBlock("span", _hoisted_15$3, toDisplayString(index + 1), 1)) : createCommentVNode("", true)
|
|
1557
1634
|
]),
|
|
1558
1635
|
_: 2
|
|
1559
1636
|
}, 1032, [
|
|
@@ -1565,7 +1642,7 @@ var AppTopBarPageSelectorInternal_default = /* @__PURE__ */ defineComponent({
|
|
|
1565
1642
|
"aria-keyshortcuts",
|
|
1566
1643
|
"onClick"
|
|
1567
1644
|
]);
|
|
1568
|
-
}), 128))], 40,
|
|
1645
|
+
}), 128))], 40, _hoisted_8$5)) : createCommentVNode("", true)], 4)], 512);
|
|
1569
1646
|
};
|
|
1570
1647
|
}
|
|
1571
1648
|
});
|
|
@@ -2654,9 +2731,53 @@ function trackTopBarForToasts(el) {
|
|
|
2654
2731
|
};
|
|
2655
2732
|
}
|
|
2656
2733
|
//#endregion
|
|
2734
|
+
//#region src/components/AppTopBar.compact.ts
|
|
2735
|
+
var CHIP_MIN_PX = 192;
|
|
2736
|
+
var LABELS = ".mint-experiment-popover__save-label, .mint-topbar__job-label";
|
|
2737
|
+
/** Identity text that truncates when the left side is squeezed. */
|
|
2738
|
+
var IDENTITY_TEXT = ".mint-page-selector__plugin, .mint-page-selector__label, .mint-topbar__plugin-name, .mint-topbar-title, .mint-topbar__title-only";
|
|
2739
|
+
function overflows(el) {
|
|
2740
|
+
return !!el && el.scrollWidth > el.clientWidth + 1;
|
|
2741
|
+
}
|
|
2742
|
+
function trackTopBarCompact(header, compact) {
|
|
2743
|
+
if (typeof ResizeObserver === "undefined") return {
|
|
2744
|
+
reset: () => {},
|
|
2745
|
+
stop: () => {}
|
|
2746
|
+
};
|
|
2747
|
+
let expandAt = 0;
|
|
2748
|
+
function check() {
|
|
2749
|
+
const width = header.clientWidth;
|
|
2750
|
+
if (compact.value) {
|
|
2751
|
+
if (width >= expandAt) compact.value = false;
|
|
2752
|
+
return;
|
|
2753
|
+
}
|
|
2754
|
+
const chip = header.querySelector(".mint-experiment-popover__trigger");
|
|
2755
|
+
if (!(chip && chip.getBoundingClientRect().width < CHIP_MIN_PX && overflows(chip.querySelector(".mint-experiment-popover__trigger-text")) || [...header.querySelectorAll(IDENTITY_TEXT)].some(overflows) || overflows(header.querySelector(".mint-topbar__center")) || overflows(header.querySelector(".mint-topbar__context")))) return;
|
|
2756
|
+
const labelsWidth = [...header.querySelectorAll(LABELS)].reduce((sum, el) => sum + el.getBoundingClientRect().width, 0);
|
|
2757
|
+
if (labelsWidth === 0) return;
|
|
2758
|
+
expandAt = width + labelsWidth;
|
|
2759
|
+
compact.value = true;
|
|
2760
|
+
}
|
|
2761
|
+
const observer = new ResizeObserver(check);
|
|
2762
|
+
function observe() {
|
|
2763
|
+
observer.disconnect();
|
|
2764
|
+
observer.observe(header);
|
|
2765
|
+
for (const el of header.querySelectorAll(".mint-topbar__center, .mint-topbar__context")) observer.observe(el);
|
|
2766
|
+
}
|
|
2767
|
+
observe();
|
|
2768
|
+
return {
|
|
2769
|
+
reset: () => {
|
|
2770
|
+
compact.value = false;
|
|
2771
|
+
expandAt = 0;
|
|
2772
|
+
requestAnimationFrame(observe);
|
|
2773
|
+
},
|
|
2774
|
+
stop: () => observer.disconnect()
|
|
2775
|
+
};
|
|
2776
|
+
}
|
|
2777
|
+
//#endregion
|
|
2657
2778
|
//#region src/components/AppTopBar.vue?vue&type=script&setup=true&lang.ts
|
|
2658
|
-
var _hoisted_1$4 = { class: "mint-
|
|
2659
|
-
var _hoisted_2$2 =
|
|
2779
|
+
var _hoisted_1$4 = { class: "mint-topbar__start" };
|
|
2780
|
+
var _hoisted_2$2 = ["aria-label", "aria-expanded"];
|
|
2660
2781
|
var _hoisted_3$2 = { class: "mint-topbar__brand" };
|
|
2661
2782
|
var _hoisted_4$2 = ["href"];
|
|
2662
2783
|
var _hoisted_5$2 = {
|
|
@@ -2684,7 +2805,7 @@ var _hoisted_10$1 = {
|
|
|
2684
2805
|
class: "mint-topbar__logo"
|
|
2685
2806
|
};
|
|
2686
2807
|
var _hoisted_11$1 = {
|
|
2687
|
-
key:
|
|
2808
|
+
key: 1,
|
|
2688
2809
|
class: "mint-topbar__plugin-identity"
|
|
2689
2810
|
};
|
|
2690
2811
|
var _hoisted_12$1 = { class: "mint-topbar__plugin-name" };
|
|
@@ -2693,13 +2814,13 @@ var _hoisted_13$1 = {
|
|
|
2693
2814
|
class: "mint-topbar__plugin-subtitle"
|
|
2694
2815
|
};
|
|
2695
2816
|
var _hoisted_14$1 = {
|
|
2696
|
-
key:
|
|
2817
|
+
key: 4,
|
|
2697
2818
|
class: "mint-topbar-title-group"
|
|
2698
2819
|
};
|
|
2699
2820
|
var _hoisted_15$1 = { class: "mint-topbar-title" };
|
|
2700
2821
|
var _hoisted_16$1 = { class: "mint-topbar-subtitle" };
|
|
2701
2822
|
var _hoisted_17$1 = {
|
|
2702
|
-
key:
|
|
2823
|
+
key: 5,
|
|
2703
2824
|
class: "mint-topbar__title-only"
|
|
2704
2825
|
};
|
|
2705
2826
|
var _hoisted_18$1 = {
|
|
@@ -2710,33 +2831,56 @@ var _hoisted_18$1 = {
|
|
|
2710
2831
|
var _hoisted_19$1 = { class: "mint-topbar__right" };
|
|
2711
2832
|
var _hoisted_20$1 = {
|
|
2712
2833
|
key: 0,
|
|
2713
|
-
class: "mint-
|
|
2834
|
+
class: "mint-topbar__context"
|
|
2714
2835
|
};
|
|
2715
2836
|
var _hoisted_21$1 = {
|
|
2837
|
+
key: 0,
|
|
2838
|
+
class: "mint-topbar__standalone-badge"
|
|
2839
|
+
};
|
|
2840
|
+
var _hoisted_22$1 = {
|
|
2716
2841
|
class: "mint-topbar__job-status",
|
|
2717
2842
|
"aria-live": "polite"
|
|
2718
2843
|
};
|
|
2719
|
-
var
|
|
2844
|
+
var _hoisted_23$1 = [
|
|
2720
2845
|
"title",
|
|
2721
2846
|
"aria-label",
|
|
2722
2847
|
"aria-expanded",
|
|
2723
2848
|
"aria-controls"
|
|
2724
2849
|
];
|
|
2725
|
-
var
|
|
2850
|
+
var _hoisted_24$1 = {
|
|
2726
2851
|
key: 0,
|
|
2727
2852
|
class: "mint-topbar__job-bar",
|
|
2728
2853
|
"aria-hidden": "true"
|
|
2729
2854
|
};
|
|
2730
|
-
var
|
|
2855
|
+
var _hoisted_25$1 = [
|
|
2731
2856
|
"aria-label",
|
|
2732
2857
|
"aria-expanded",
|
|
2733
2858
|
"aria-controls"
|
|
2734
2859
|
];
|
|
2735
|
-
var
|
|
2860
|
+
var _hoisted_26$1 = {
|
|
2736
2861
|
key: 0,
|
|
2737
2862
|
class: "mint-topbar__job-count",
|
|
2738
2863
|
"aria-hidden": "true"
|
|
2739
2864
|
};
|
|
2865
|
+
var _hoisted_27$1 = [
|
|
2866
|
+
"aria-label",
|
|
2867
|
+
"title",
|
|
2868
|
+
"disabled",
|
|
2869
|
+
"aria-busy",
|
|
2870
|
+
"data-action",
|
|
2871
|
+
"onClick"
|
|
2872
|
+
];
|
|
2873
|
+
var _hoisted_28$1 = [
|
|
2874
|
+
"aria-expanded",
|
|
2875
|
+
"onClick",
|
|
2876
|
+
"onKeydown"
|
|
2877
|
+
];
|
|
2878
|
+
var _hoisted_29$1 = {
|
|
2879
|
+
key: 4,
|
|
2880
|
+
class: "mint-topbar__legacy-actions"
|
|
2881
|
+
};
|
|
2882
|
+
var _hoisted_30$1 = { class: "mint-topbar__tail" };
|
|
2883
|
+
var MAX_VISIBLE_ACTIONS = 2;
|
|
2740
2884
|
//#endregion
|
|
2741
2885
|
//#region src/components/AppTopBar.vue
|
|
2742
2886
|
var AppTopBar_default = /* @__PURE__ */ defineComponent({
|
|
@@ -2769,29 +2913,50 @@ var AppTopBar_default = /* @__PURE__ */ defineComponent({
|
|
|
2769
2913
|
* Full application top bar with brand logo, static plugin identity, page selector, centered pill nav, experiment popover, and an account slot.
|
|
2770
2914
|
*
|
|
2771
2915
|
* The `#icon` slot applies in standalone mode only; integrated branding comes from `Metadata.icon`.
|
|
2916
|
+
*
|
|
2917
|
+
* The order is fixed: identity or page selector, pills, the context group (standalone badge, run slot,
|
|
2918
|
+
* onboarding, `spec.actions`), then the tail: theme toggle, settings, `#account`. Below 1024px of bar
|
|
2919
|
+
* width the pills and the context group move to a second row. Inside a responsive AppLayout the bar
|
|
2920
|
+
* holds the sidebar drawer button.
|
|
2772
2921
|
*/
|
|
2773
2922
|
const props = __props;
|
|
2774
2923
|
const config = computed(() => applySpecDefaults({
|
|
2775
2924
|
variant: "card",
|
|
2776
2925
|
homePath: "/",
|
|
2777
2926
|
logo: true,
|
|
2778
|
-
themeToggle: false,
|
|
2779
|
-
settings: false,
|
|
2780
2927
|
standaloneLabel: "Standalone"
|
|
2781
2928
|
}, props.spec));
|
|
2782
|
-
const settingsConfig = computed(() => toValue(config.value.settings) ||
|
|
2783
|
-
|
|
2784
|
-
const
|
|
2785
|
-
const
|
|
2786
|
-
const
|
|
2929
|
+
const settingsConfig = computed(() => toValue(config.value.settings) || {});
|
|
2930
|
+
/** Plugin buttons: two show, the rest fold into the More menu. */
|
|
2931
|
+
const visibleActions = computed(() => (config.value.actions ?? []).slice(0, MAX_VISIBLE_ACTIONS));
|
|
2932
|
+
const overflowActions = computed(() => (config.value.actions ?? []).slice(MAX_VISIBLE_ACTIONS));
|
|
2933
|
+
const overflowMenuItems = computed(() => overflowActions.value.map(({ id, label, disabled, loading }) => ({
|
|
2934
|
+
id,
|
|
2935
|
+
label,
|
|
2936
|
+
disabled: disabled || loading
|
|
2937
|
+
})));
|
|
2938
|
+
function selectOverflowAction(item) {
|
|
2939
|
+
overflowActions.value.find((action) => action.id === item.id)?.onSelect();
|
|
2940
|
+
}
|
|
2941
|
+
const drawer = inject(APP_LAYOUT_SIDEBAR_KEY, null);
|
|
2942
|
+
const SettingsModal = defineAsyncComponent(() => import("./SettingsModal-DwfrD1ER.js").then((n) => n.n));
|
|
2943
|
+
const ExperimentPopover = defineAsyncComponent(() => import("./ExperimentPopover-DYy_s0kI.js").then((n) => n.n));
|
|
2944
|
+
const ExperimentSelectorModal = defineAsyncComponent(() => import("./ExperimentSelectorModal-Bfh5bdkv.js").then((n) => n.n));
|
|
2787
2945
|
const emit = __emit;
|
|
2788
2946
|
const settingsOpen = ref(false);
|
|
2789
2947
|
const headerEl = ref(null);
|
|
2790
2948
|
let untrackToastOffset;
|
|
2949
|
+
const compact = ref(false);
|
|
2950
|
+
let compactTracker;
|
|
2791
2951
|
onMounted(() => {
|
|
2792
|
-
if (headerEl.value)
|
|
2952
|
+
if (!headerEl.value) return;
|
|
2953
|
+
untrackToastOffset = trackTopBarForToasts(headerEl.value);
|
|
2954
|
+
compactTracker = trackTopBarCompact(headerEl.value, compact);
|
|
2955
|
+
});
|
|
2956
|
+
onBeforeUnmount(() => {
|
|
2957
|
+
untrackToastOffset?.();
|
|
2958
|
+
compactTracker?.stop();
|
|
2793
2959
|
});
|
|
2794
|
-
onBeforeUnmount(() => untrackToastOffset?.());
|
|
2795
2960
|
const { integrated: isIntegrated, plugin } = usePlatform();
|
|
2796
2961
|
const isStandalone = computed(() => !isIntegrated.value);
|
|
2797
2962
|
const appExperiment = inject(APP_EXPERIMENT_KEY, null);
|
|
@@ -2829,6 +2994,14 @@ var AppTopBar_default = /* @__PURE__ */ defineComponent({
|
|
|
2829
2994
|
cancelled: CircleX
|
|
2830
2995
|
};
|
|
2831
2996
|
const slots = useSlots();
|
|
2997
|
+
if (props.spec.themeToggle !== void 0) warnDeprecatedOnce("topbar.themeToggle", "AppTopBar spec.themeToggle is ignored: the theme toggle always shows. Remove it; it is removed in 2.0.");
|
|
2998
|
+
for (const name of [
|
|
2999
|
+
"nav",
|
|
3000
|
+
"center",
|
|
3001
|
+
"actions",
|
|
3002
|
+
"page-selector-icon",
|
|
3003
|
+
"page-selector-item-icon"
|
|
3004
|
+
]) if (slots[name]) warnDeprecatedOnce(`topbar.slot.${name}`, name.startsWith("page-selector") ? `AppTopBar #${name} is deprecated: give the page an icon (a Lucide name). It is removed in 2.0.` : `AppTopBar #${name} is deprecated${name === "actions" ? ": use spec.actions" : ""}. It is removed in 2.0.`);
|
|
2832
3005
|
const pluginIcon = computed(() => plugin.value?.icon || (slots.logo ? void 0 : pluginIdentity.icon));
|
|
2833
3006
|
const seeded = computed(() => isStandalone.value && !props.title && !props.subtitle);
|
|
2834
3007
|
const titleText = computed(() => props.title || (seeded.value ? pluginIdentity.name : void 0));
|
|
@@ -2847,6 +3020,17 @@ var AppTopBar_default = /* @__PURE__ */ defineComponent({
|
|
|
2847
3020
|
const pageSelectorPluginName = computed(() => isIntegrated.value ? plugin.value?.display_name || plugin.value?.name : props.title || pluginIdentity.name);
|
|
2848
3021
|
const identitySubtitle = computed(() => plugin.value?.subtitle || plugin.value?.description);
|
|
2849
3022
|
const hasPillNav = computed(() => !!config.value.pills?.length);
|
|
3023
|
+
const showStandaloneBadge = computed(() => config.value.standaloneLabel !== false && isStandalone.value);
|
|
3024
|
+
const showRunSlot = computed(() => showExperiment.value || props.job !== void 0 || runSlotJoined.value);
|
|
3025
|
+
/** The context group: standalone badge, run slot, onboarding and plugin buttons. Below 1024px it is row 2. */
|
|
3026
|
+
watch([
|
|
3027
|
+
() => config.value.actions?.map((action) => action.label).join(),
|
|
3028
|
+
() => props.job === void 0,
|
|
3029
|
+
() => props.job === null,
|
|
3030
|
+
showExperiment,
|
|
3031
|
+
() => config.value.pills?.length
|
|
3032
|
+
], () => compactTracker?.reset());
|
|
3033
|
+
const hasContext = computed(() => showStandaloneBadge.value || showRunSlot.value || !!config.value.actions?.length || !!slots.actions || !!onboarding?.enabled.value);
|
|
2850
3034
|
const hasTitleGroup = computed(() => !hasPageSelector.value && !identityName.value && !!titleText.value && !!subtitleText.value);
|
|
2851
3035
|
const hasTitleOnly = computed(() => !hasPageSelector.value && !identityName.value && !hasTitleGroup.value && !!titleText.value);
|
|
2852
3036
|
const normalizedPageSelector = computed(() => props.pageSelector?.map(normalizeItemInput) ?? []);
|
|
@@ -2862,9 +3046,24 @@ var AppTopBar_default = /* @__PURE__ */ defineComponent({
|
|
|
2862
3046
|
createElementVNode("header", {
|
|
2863
3047
|
ref_key: "headerEl",
|
|
2864
3048
|
ref: headerEl,
|
|
2865
|
-
class: normalizeClass([
|
|
2866
|
-
|
|
2867
|
-
|
|
3049
|
+
class: normalizeClass([
|
|
3050
|
+
"mint-topbar",
|
|
3051
|
+
`mint-topbar--${config.value.variant}`,
|
|
3052
|
+
{ "mint-topbar--compact": compact.value }
|
|
3053
|
+
])
|
|
3054
|
+
}, [createElementVNode("div", { class: normalizeClass(["mint-topbar__container", { "mint-topbar__container--stackable": hasPillNav.value || _ctx.$slots.center || hasContext.value }]) }, [
|
|
3055
|
+
createElementVNode("div", _hoisted_1$4, [
|
|
3056
|
+
unref(drawer) ? (openBlock(), createElementBlock("button", {
|
|
3057
|
+
key: 0,
|
|
3058
|
+
type: "button",
|
|
3059
|
+
class: "mint-topbar__icon-btn mint-topbar__sidebar-toggle",
|
|
3060
|
+
"aria-label": unref(drawer).open.value ? unref(drawer).closeLabel.value : unref(drawer).openLabel.value,
|
|
3061
|
+
"aria-expanded": unref(drawer).open.value,
|
|
3062
|
+
onClick: _cache[0] || (_cache[0] = ($event) => unref(drawer).toggle())
|
|
3063
|
+
}, [(openBlock(), createBlock(resolveDynamicComponent(unref(drawer).open.value ? unref(X) : unref(Menu)), {
|
|
3064
|
+
class: "mint-topbar__icon-btn-icon",
|
|
3065
|
+
"aria-hidden": "true"
|
|
3066
|
+
}))], 8, _hoisted_2$2)) : createCommentVNode("", true),
|
|
2868
3067
|
createElementVNode("div", _hoisted_3$2, [config.value.homePath && (config.value.homePath.startsWith("http") || config.value.homePath.startsWith("/")) ? (openBlock(), createElementBlock("a", {
|
|
2869
3068
|
key: 0,
|
|
2870
3069
|
href: config.value.homePath,
|
|
@@ -2881,7 +3080,7 @@ var AppTopBar_default = /* @__PURE__ */ defineComponent({
|
|
|
2881
3080
|
icon: pluginIcon.value,
|
|
2882
3081
|
size: "topbar",
|
|
2883
3082
|
variant: "solid"
|
|
2884
|
-
}, null, 8, ["icon"])) : renderSlot(_ctx.$slots, "logo", {}, () => [config.value.logo ? (openBlock(), createElementBlock("div", _hoisted_6$1, [..._cache[
|
|
3083
|
+
}, null, 8, ["icon"])) : renderSlot(_ctx.$slots, "logo", {}, () => [config.value.logo ? (openBlock(), createElementBlock("div", _hoisted_6$1, [..._cache[12] || (_cache[12] = [createElementVNode("div", { class: "mint-topbar__logo-icon" }, [createElementVNode("span", { class: "mint-topbar__logo-text" }, "M")], -1)])])) : createCommentVNode("", true)], void 0, 1)], void 0, 1)])) : createCommentVNode("", true)], 8, _hoisted_4$2)) : config.value.homePath ? (openBlock(), createBlock(_component_router_link, {
|
|
2885
3084
|
key: 1,
|
|
2886
3085
|
to: config.value.homePath,
|
|
2887
3086
|
class: "mint-topbar-home-link"
|
|
@@ -2898,7 +3097,7 @@ var AppTopBar_default = /* @__PURE__ */ defineComponent({
|
|
|
2898
3097
|
icon: pluginIcon.value,
|
|
2899
3098
|
size: "topbar",
|
|
2900
3099
|
variant: "solid"
|
|
2901
|
-
}, null, 8, ["icon"])) : renderSlot(_ctx.$slots, "logo", {}, () => [config.value.logo ? (openBlock(), createElementBlock("div", _hoisted_8$1, [..._cache[
|
|
3100
|
+
}, null, 8, ["icon"])) : renderSlot(_ctx.$slots, "logo", {}, () => [config.value.logo ? (openBlock(), createElementBlock("div", _hoisted_8$1, [..._cache[13] || (_cache[13] = [createElementVNode("div", { class: "mint-topbar__logo-icon" }, [createElementVNode("span", { class: "mint-topbar__logo-text" }, "M")], -1)])])) : createCommentVNode("", true)], void 0, 1)], void 0, 1)])) : createCommentVNode("", true)]),
|
|
2902
3101
|
_: 3
|
|
2903
3102
|
}, 8, ["to"])) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [unref(isIntegrated) || _ctx.$slots.icon || _ctx.$slots.logo || pluginIcon.value || config.value.logo ? (openBlock(), createElementBlock("span", _hoisted_9$1, [unref(isIntegrated) ? (openBlock(), createBlock(PluginIcon_default, {
|
|
2904
3103
|
key: 0,
|
|
@@ -2912,21 +3111,21 @@ var AppTopBar_default = /* @__PURE__ */ defineComponent({
|
|
|
2912
3111
|
icon: pluginIcon.value,
|
|
2913
3112
|
size: "topbar",
|
|
2914
3113
|
variant: "solid"
|
|
2915
|
-
}, null, 8, ["icon"])) : renderSlot(_ctx.$slots, "logo", {}, () => [config.value.logo ? (openBlock(), createElementBlock("div", _hoisted_10$1, [..._cache[
|
|
3114
|
+
}, null, 8, ["icon"])) : renderSlot(_ctx.$slots, "logo", {}, () => [config.value.logo ? (openBlock(), createElementBlock("div", _hoisted_10$1, [..._cache[14] || (_cache[14] = [createElementVNode("div", { class: "mint-topbar__logo-icon" }, [createElementVNode("span", { class: "mint-topbar__logo-text" }, "M")], -1)])])) : createCommentVNode("", true)], void 0, 1)], void 0, 1)])) : createCommentVNode("", true)], 64))]),
|
|
2916
3115
|
identityName.value ? (openBlock(), createElementBlock("span", _hoisted_11$1, [createElementVNode("span", _hoisted_12$1, toDisplayString(identityName.value), 1), identitySubtitle.value ? (openBlock(), createElementBlock("span", _hoisted_13$1, toDisplayString(identitySubtitle.value), 1)) : createCommentVNode("", true)])) : createCommentVNode("", true),
|
|
2917
3116
|
hasPlatformPageSelector.value ? (openBlock(), createElementBlock("span", {
|
|
2918
|
-
key:
|
|
3117
|
+
key: 2,
|
|
2919
3118
|
ref_key: "platformPageSelectorEl",
|
|
2920
3119
|
ref: platformPageSelectorEl,
|
|
2921
3120
|
class: "mint-topbar__platform-page-selector",
|
|
2922
3121
|
"data-onboarding": "topbar-page-selector"
|
|
2923
3122
|
}, null, 512)) : hasPropPageSelector.value ? (openBlock(), createBlock(AppTopBarPageSelectorInternal_default, {
|
|
2924
|
-
key:
|
|
3123
|
+
key: 3,
|
|
2925
3124
|
"data-onboarding": "topbar-page-selector",
|
|
2926
3125
|
pages: normalizedPageSelector.value,
|
|
2927
3126
|
"current-page-id": __props.currentPageSelectorId,
|
|
2928
3127
|
"plugin-name": pageSelectorPluginName.value,
|
|
2929
|
-
onSelect: _cache[
|
|
3128
|
+
onSelect: _cache[1] || (_cache[1] = ($event) => emit("page-selector-select", $event))
|
|
2930
3129
|
}, createSlots({ _: 2 }, [_ctx.$slots["page-selector-icon"] ? {
|
|
2931
3130
|
name: "icon",
|
|
2932
3131
|
fn: withCtx((slotProps) => [renderSlot(_ctx.$slots, "page-selector-icon", normalizeProps(guardReactiveProps(slotProps)))]),
|
|
@@ -2948,11 +3147,11 @@ var AppTopBar_default = /* @__PURE__ */ defineComponent({
|
|
|
2948
3147
|
items: normalizedPillNav.value,
|
|
2949
3148
|
"current-item-id": __props.pill,
|
|
2950
3149
|
onSelect: handlePillSelect,
|
|
2951
|
-
onOptionSelect: _cache[
|
|
3150
|
+
onOptionSelect: _cache[2] || (_cache[2] = (option, item) => emit("pill-option-select", option, item))
|
|
2952
3151
|
}, null, 8, ["items", "current-item-id"])) : createCommentVNode("", true)])])) : createCommentVNode("", true),
|
|
2953
|
-
createElementVNode("div", _hoisted_19$1, [
|
|
2954
|
-
|
|
2955
|
-
|
|
3152
|
+
createElementVNode("div", _hoisted_19$1, [hasContext.value ? (openBlock(), createElementBlock("div", _hoisted_20$1, [
|
|
3153
|
+
showStandaloneBadge.value ? (openBlock(), createElementBlock("span", _hoisted_21$1, toDisplayString(config.value.standaloneLabel), 1)) : createCommentVNode("", true),
|
|
3154
|
+
showRunSlot.value ? (openBlock(), createElementBlock("div", {
|
|
2956
3155
|
key: 1,
|
|
2957
3156
|
class: normalizeClass(["mint-topbar__run-slot", { "mint-topbar__run-slot--joined": runSlotJoined.value }]),
|
|
2958
3157
|
"data-onboarding": "topbar-run"
|
|
@@ -2961,11 +3160,11 @@ var AppTopBar_default = /* @__PURE__ */ defineComponent({
|
|
|
2961
3160
|
...unref(appExperiment).popover.value,
|
|
2962
3161
|
showSave: false
|
|
2963
3162
|
} : unref(appExperiment).popover.value, {
|
|
2964
|
-
onSelect: _cache[
|
|
2965
|
-
onSave: _cache[
|
|
2966
|
-
onDetach: _cache[
|
|
3163
|
+
onSelect: _cache[3] || (_cache[3] = ($event) => unref(appExperiment).openModal()),
|
|
3164
|
+
onSave: _cache[4] || (_cache[4] = ($event) => unref(appExperiment).handleSave()),
|
|
3165
|
+
onDetach: _cache[5] || (_cache[5] = ($event) => unref(appExperiment).handleDetach())
|
|
2967
3166
|
}), null, 16)) : createCommentVNode("", true),
|
|
2968
|
-
createElementVNode("span",
|
|
3167
|
+
createElementVNode("span", _hoisted_22$1, toDisplayString(__props.job ? JOB_STATUS_TEXT[__props.job.status] : ""), 1),
|
|
2969
3168
|
createVNode(Transition, {
|
|
2970
3169
|
name: "mint-topbar-job",
|
|
2971
3170
|
mode: "out-in",
|
|
@@ -2981,48 +3180,110 @@ var AppTopBar_default = /* @__PURE__ */ defineComponent({
|
|
|
2981
3180
|
"aria-label": jobName.value,
|
|
2982
3181
|
"aria-expanded": __props.jobsOpen,
|
|
2983
3182
|
"aria-controls": __props.jobsPanelId,
|
|
2984
|
-
onClick: _cache[
|
|
3183
|
+
onClick: _cache[6] || (_cache[6] = ($event) => emit("job-click"))
|
|
2985
3184
|
}, [(openBlock(), createBlock(resolveDynamicComponent(JOB_ICONS[__props.job.status]), {
|
|
2986
3185
|
class: normalizeClass(["mint-topbar__job-icon", { "mint-topbar__job-icon--spin": __props.job.status === "running" || __props.job.status === "queued" }]),
|
|
2987
3186
|
size: 14,
|
|
2988
3187
|
"aria-hidden": "true"
|
|
2989
|
-
}, null, 8, ["class"])), jobPercent.value != null ? (openBlock(), createElementBlock("span",
|
|
3188
|
+
}, null, 8, ["class"])), jobPercent.value != null ? (openBlock(), createElementBlock("span", _hoisted_24$1, [createElementVNode("span", { style: normalizeStyle({ width: `${jobPercent.value}%` }) }, null, 4)])) : createCommentVNode("", true)], 10, _hoisted_23$1)) : __props.job === null ? (openBlock(), createElementBlock("button", {
|
|
2990
3189
|
key: "idle",
|
|
2991
3190
|
type: "button",
|
|
2992
3191
|
class: "mint-topbar__job mint-topbar__job--idle",
|
|
2993
|
-
"aria-label": __props.jobsDone ? `Jobs, ${__props.jobsDone} completed` :
|
|
3192
|
+
"aria-label": __props.jobsDone ? `Jobs, ${__props.jobsDone} completed` : "Jobs",
|
|
3193
|
+
title: "Jobs",
|
|
2994
3194
|
"aria-expanded": __props.jobsOpen,
|
|
2995
3195
|
"aria-controls": __props.jobsPanelId,
|
|
2996
|
-
onClick: _cache[
|
|
3196
|
+
onClick: _cache[7] || (_cache[7] = ($event) => emit("job-click"))
|
|
2997
3197
|
}, [
|
|
2998
3198
|
createVNode(unref(ListChecks), {
|
|
2999
3199
|
class: "mint-topbar__job-icon",
|
|
3000
3200
|
size: 14,
|
|
3001
3201
|
"aria-hidden": "true"
|
|
3002
3202
|
}),
|
|
3003
|
-
_cache[
|
|
3004
|
-
__props.jobsDone ? (openBlock(), createElementBlock("span",
|
|
3005
|
-
], 8,
|
|
3203
|
+
_cache[15] || (_cache[15] = createElementVNode("span", { class: "mint-topbar__job-label" }, "Jobs", -1)),
|
|
3204
|
+
__props.jobsDone ? (openBlock(), createElementBlock("span", _hoisted_26$1, toDisplayString(__props.jobsDone), 1)) : createCommentVNode("", true)
|
|
3205
|
+
], 8, _hoisted_25$1)) : createCommentVNode("", true)]),
|
|
3006
3206
|
_: 1
|
|
3007
3207
|
})
|
|
3008
3208
|
], 2)) : createCommentVNode("", true),
|
|
3009
|
-
renderSlot(_ctx.$slots, "actions"),
|
|
3010
3209
|
unref(onboarding)?.enabled.value ? (openBlock(), createBlock(AppTopBarOnboardingInternal_default, {
|
|
3011
3210
|
key: 2,
|
|
3012
3211
|
state: unref(onboarding)
|
|
3013
3212
|
}, null, 8, ["state"])) : createCommentVNode("", true),
|
|
3014
|
-
|
|
3213
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(visibleActions.value, (action) => {
|
|
3214
|
+
return openBlock(), createElementBlock(Fragment, { key: action.id }, [action.icon ? (openBlock(), createElementBlock("button", {
|
|
3215
|
+
key: 0,
|
|
3216
|
+
type: "button",
|
|
3217
|
+
class: "mint-topbar__icon-btn",
|
|
3218
|
+
"aria-label": action.label,
|
|
3219
|
+
title: action.title ?? action.label,
|
|
3220
|
+
disabled: action.disabled || action.loading,
|
|
3221
|
+
"aria-busy": action.loading || void 0,
|
|
3222
|
+
"data-action": action.id,
|
|
3223
|
+
onClick: ($event) => action.onSelect()
|
|
3224
|
+
}, [action.loading ? (openBlock(), createBlock(unref(LoaderCircle), {
|
|
3225
|
+
key: 0,
|
|
3226
|
+
class: "mint-topbar__icon-btn-icon mint-topbar__job-icon--spin",
|
|
3227
|
+
"aria-hidden": "true"
|
|
3228
|
+
})) : (openBlock(), createBlock(LucideIconInternal_default, {
|
|
3229
|
+
key: 1,
|
|
3230
|
+
name: action.icon,
|
|
3231
|
+
size: 16
|
|
3232
|
+
}, null, 8, ["name"])), action.dot ? (openBlock(), createElementBlock("span", {
|
|
3233
|
+
key: 2,
|
|
3234
|
+
class: normalizeClass(["mint-topbar__icon-btn-dot", `mint-topbar__icon-btn-dot--${action.dot}`]),
|
|
3235
|
+
"aria-hidden": "true"
|
|
3236
|
+
}, null, 2)) : createCommentVNode("", true)], 8, _hoisted_27$1)) : (openBlock(), createBlock(BaseButton_default, {
|
|
3237
|
+
key: 1,
|
|
3238
|
+
variant: "secondary",
|
|
3239
|
+
size: "sm",
|
|
3240
|
+
title: action.title,
|
|
3241
|
+
loading: action.loading,
|
|
3242
|
+
disabled: action.disabled,
|
|
3243
|
+
"data-action": action.id,
|
|
3244
|
+
onClick: ($event) => action.onSelect()
|
|
3245
|
+
}, {
|
|
3246
|
+
default: withCtx(() => [createTextVNode(toDisplayString(action.label), 1)]),
|
|
3247
|
+
_: 2
|
|
3248
|
+
}, 1032, [
|
|
3249
|
+
"title",
|
|
3250
|
+
"loading",
|
|
3251
|
+
"disabled",
|
|
3252
|
+
"data-action",
|
|
3253
|
+
"onClick"
|
|
3254
|
+
]))], 64);
|
|
3255
|
+
}), 128)),
|
|
3256
|
+
overflowMenuItems.value.length ? (openBlock(), createBlock(ActionMenu_default, {
|
|
3015
3257
|
key: 3,
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3258
|
+
label: "More actions",
|
|
3259
|
+
items: overflowMenuItems.value,
|
|
3260
|
+
onSelect: selectOverflowAction
|
|
3261
|
+
}, {
|
|
3262
|
+
trigger: withCtx(({ open, toggle, keydown }) => [createElementVNode("button", {
|
|
3263
|
+
type: "button",
|
|
3264
|
+
class: "mint-topbar__icon-btn",
|
|
3265
|
+
"aria-label": "More actions",
|
|
3266
|
+
title: "More actions",
|
|
3267
|
+
"aria-haspopup": "menu",
|
|
3268
|
+
"aria-expanded": open,
|
|
3269
|
+
onClick: toggle,
|
|
3270
|
+
onKeydown: keydown
|
|
3271
|
+
}, [createVNode(unref(Ellipsis), {
|
|
3272
|
+
class: "mint-topbar__icon-btn-icon",
|
|
3273
|
+
"aria-hidden": "true"
|
|
3274
|
+
})], 40, _hoisted_28$1)]),
|
|
3275
|
+
_: 1
|
|
3276
|
+
}, 8, ["items"])) : createCommentVNode("", true),
|
|
3277
|
+
_ctx.$slots.actions ? (openBlock(), createElementBlock("span", _hoisted_29$1, [renderSlot(_ctx.$slots, "actions")])) : createCommentVNode("", true)
|
|
3278
|
+
])) : createCommentVNode("", true), createElementVNode("div", _hoisted_30$1, [
|
|
3279
|
+
createVNode(ThemeToggle_default, { size: "sm" }),
|
|
3280
|
+
createElementVNode("button", {
|
|
3020
3281
|
type: "button",
|
|
3021
3282
|
class: "mint-topbar__settings-btn",
|
|
3022
3283
|
"aria-label": "Open settings",
|
|
3023
3284
|
"data-onboarding": "topbar-settings",
|
|
3024
|
-
onClick: _cache[
|
|
3025
|
-
}, [..._cache[
|
|
3285
|
+
onClick: _cache[8] || (_cache[8] = ($event) => settingsOpen.value = true)
|
|
3286
|
+
}, [..._cache[16] || (_cache[16] = [createElementVNode("svg", {
|
|
3026
3287
|
class: "mint-topbar__settings-icon",
|
|
3027
3288
|
viewBox: "0 0 24 24",
|
|
3028
3289
|
fill: "none",
|
|
@@ -3034,14 +3295,14 @@ var AppTopBar_default = /* @__PURE__ */ defineComponent({
|
|
|
3034
3295
|
cx: "12",
|
|
3035
3296
|
cy: "12",
|
|
3036
3297
|
r: "3"
|
|
3037
|
-
})], -1)])])
|
|
3298
|
+
})], -1)])]),
|
|
3038
3299
|
renderSlot(_ctx.$slots, "account")
|
|
3039
|
-
])
|
|
3040
|
-
])], 2),
|
|
3041
|
-
|
|
3300
|
+
])])
|
|
3301
|
+
], 2)], 2),
|
|
3302
|
+
settingsOpen.value ? (openBlock(), createBlock(unref(SettingsModal), {
|
|
3042
3303
|
key: 0,
|
|
3043
3304
|
open: settingsOpen.value,
|
|
3044
|
-
"onUpdate:open": _cache[
|
|
3305
|
+
"onUpdate:open": _cache[9] || (_cache[9] = ($event) => settingsOpen.value = $event),
|
|
3045
3306
|
title: settingsConfig.value?.title,
|
|
3046
3307
|
tabs: normalizedSettingsTabs.value,
|
|
3047
3308
|
"show-appearance": settingsConfig.value?.showAppearance ?? true,
|
|
@@ -3051,7 +3312,7 @@ var AppTopBar_default = /* @__PURE__ */ defineComponent({
|
|
|
3051
3312
|
spec: settingsConfig.value?.spec,
|
|
3052
3313
|
values: settingsConfig.value?.values,
|
|
3053
3314
|
"user-type": settingsConfig.value?.userType,
|
|
3054
|
-
"onUpdate:values": _cache[
|
|
3315
|
+
"onUpdate:values": _cache[10] || (_cache[10] = ($event) => emit("settings-values-change", $event))
|
|
3055
3316
|
}, createSlots({
|
|
3056
3317
|
appearance: withCtx(() => [renderSlot(_ctx.$slots, "settings-appearance")]),
|
|
3057
3318
|
_: 2
|
|
@@ -3072,7 +3333,7 @@ var AppTopBar_default = /* @__PURE__ */ defineComponent({
|
|
|
3072
3333
|
"values",
|
|
3073
3334
|
"user-type"
|
|
3074
3335
|
])) : createCommentVNode("", true),
|
|
3075
|
-
unref(appExperiment) && !isStandalone.value && canBindExperiment.value && unref(appExperiment).selectorModal.value.open ? (openBlock(), createBlock(unref(ExperimentSelectorModal), mergeProps({ key: 1 }, unref(appExperiment).selectorModal.value, { "onUpdate:open": _cache[
|
|
3336
|
+
unref(appExperiment) && !isStandalone.value && canBindExperiment.value && unref(appExperiment).selectorModal.value.open ? (openBlock(), createBlock(unref(ExperimentSelectorModal), mergeProps({ key: 1 }, unref(appExperiment).selectorModal.value, { "onUpdate:open": _cache[11] || (_cache[11] = ($event) => $event ? unref(appExperiment).openModal() : unref(appExperiment).closeModal()) }), null, 16)) : createCommentVNode("", true)
|
|
3076
3337
|
], 64);
|
|
3077
3338
|
};
|
|
3078
3339
|
}
|
|
@@ -4355,10 +4616,10 @@ var AppSidebar_default = /* @__PURE__ */ defineComponent({
|
|
|
4355
4616
|
};
|
|
4356
4617
|
}
|
|
4357
4618
|
function badgeToneClass(section) {
|
|
4358
|
-
return `mint-sidebar__rail-badge--${section.badgeTone ?? "
|
|
4619
|
+
return `mint-sidebar__rail-badge--${section.badgeTone ?? "primary"}`;
|
|
4359
4620
|
}
|
|
4360
4621
|
function tagToneClass(section) {
|
|
4361
|
-
return `mint-sidebar__tag--${section.badgeTone ?? "
|
|
4622
|
+
return `mint-sidebar__tag--${section.badgeTone ?? "primary"}`;
|
|
4362
4623
|
}
|
|
4363
4624
|
function actionClasses(action) {
|
|
4364
4625
|
return ["mint-sidebar__group-action", action.tone ? `mint-sidebar__group-action--${action.tone}` : ""];
|
|
@@ -4541,6 +4802,6 @@ var AppSidebar_default = /* @__PURE__ */ defineComponent({
|
|
|
4541
4802
|
}
|
|
4542
4803
|
});
|
|
4543
4804
|
//#endregion
|
|
4544
|
-
export {
|
|
4805
|
+
export { controlValuesToComponentBindings as A, warnDeprecatedOnce as C, getControlDefaults as D, defineControls as E, controlsToSettingsSchema as F, getDefaultControlView as I, CollapsibleCard_default as L, controlValuesToComponentProps as M, controlsTo as N, useControlSchema as O, controlsToFormSchema as P, ThemeToggle_default as R, AppLayout_default as S, defineControlComponentBindings as T, provideOnboarding as _, pickExistingRecordKeys as a, normalizeItemInput as b, valuesEqual as c, useForm as d, AppTopBar_default as f, defineOnboarding as g, ONBOARDING_KEY as h, formSchemaFieldNames as i, controlValuesToComponentBindingsById as j, controlBindings as k, useFormBuilder as l, ANCHOR_WAIT_MS as m, FormSchemaInternal_default as n, pickRecordKeys as o, providePluginIdentity as p, FormFieldRendererInternal_default as r, recordValuesEqualForKeys as s, AppSidebar_default as t, evaluateCondition as u, useOnboarding as v, usePluginWorkspace as w, normalizeLabelItemInput as x, PluginIcon_default as y, useTheme as z };
|
|
4545
4806
|
|
|
4546
|
-
//# sourceMappingURL=AppSidebar-
|
|
4807
|
+
//# sourceMappingURL=AppSidebar-C-Vq5x4I.js.map
|