@sidekick-coder/zenith-kit 0.3.2 → 0.3.3
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/client/index.d.mts +17 -2
- package/dist/client/index.mjs +2 -2
- package/dist/components/index.es.js +78 -71
- package/dist/server/index.d.mts +40 -3
- package/dist/server/index.mjs +4 -4
- package/dist/shared/index.d.mts +1 -1
- package/package.json +1 -1
- package/tsdown.config.ts +2 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as vue from "vue";
|
|
2
|
-
import { computed, watch, shallowRef, shallowReadonly, customRef, toValue as toValue$2, isRef, reactive, unref, readonly as readonly$1, getCurrentInstance, getCurrentScope, hasInjectionContext, inject, onScopeDispose, onMounted, nextTick, toRef as toRef$1, ref as ref$1, onBeforeUnmount, watchEffect, effectScope, provide, toRefs, onUpdated, isVNode, defineComponent, useAttrs, openBlock, createElementBlock, Fragment, createCommentVNode, createElementVNode, renderList, mergeProps, createBlock, normalizeStyle, normalizeClass, withCtx, renderSlot, createVNode, resolveDynamicComponent, normalizeProps, createTextVNode, toDisplayString, toHandlerKey, camelize, triggerRef, onUnmounted, h as h$3, Comment, cloneVNode, withKeys, Teleport, guardReactiveProps, withModifiers, markRaw, watchSyncEffect, withMemo, watchPostEffect, mergeDefaults, withDirectives, vShow, toRaw, onBeforeMount, toHandlers, useSlots, vModelText, useModel, mergeModels, resolveComponent, createSlots,
|
|
2
|
+
import { computed, watch, shallowRef, shallowReadonly, customRef, toValue as toValue$2, isRef, reactive, unref, readonly as readonly$1, getCurrentInstance, getCurrentScope, hasInjectionContext, inject, onScopeDispose, onMounted, nextTick, toRef as toRef$1, ref as ref$1, onBeforeUnmount, watchEffect, effectScope, provide, toRefs, onUpdated, isVNode, defineComponent, useAttrs, openBlock, createElementBlock, Fragment, createCommentVNode, createElementVNode, renderList, mergeProps, createBlock, normalizeStyle, normalizeClass, withCtx, renderSlot, createVNode, resolveDynamicComponent, normalizeProps, createTextVNode, toDisplayString, onDeactivated, onActivated, toHandlerKey, camelize, triggerRef, onUnmounted, h as h$3, Comment, cloneVNode, withKeys, Teleport, guardReactiveProps, withModifiers, markRaw, watchSyncEffect, withMemo, watchPostEffect, mergeDefaults, withDirectives, vShow, toRaw, onBeforeMount, toHandlers, useSlots, vModelText, useModel, mergeModels, resolveComponent, createSlots, withAsyncContext } from "vue";
|
|
3
3
|
import { isNotNestedPath, cleanupNonNestedPath, useForm as useForm$1, FieldContextKey, useFieldError, useIsFieldTouched, useIsFieldDirty, useIsFieldValid, ErrorMessage, Field, useField } from "vee-validate";
|
|
4
4
|
import { Form, Field as Field2, FieldArray, Form as Form2 } from "vee-validate";
|
|
5
5
|
import { useRoute, useRouter } from "vue-router";
|
|
@@ -15412,6 +15412,81 @@ function useValibotForm(schema, options = {}) {
|
|
|
15412
15412
|
validationSchema: toTypedSchema$1(schema)
|
|
15413
15413
|
});
|
|
15414
15414
|
}
|
|
15415
|
+
function walkResolver(val, resolve, key) {
|
|
15416
|
+
if (key === "_resolver")
|
|
15417
|
+
return val;
|
|
15418
|
+
if (typeof val === "function" && (!key || key !== "titleTemplate" && !key.startsWith("on")))
|
|
15419
|
+
val = val();
|
|
15420
|
+
const v2 = resolve ? resolve(key, val) : val;
|
|
15421
|
+
if (Array.isArray(v2))
|
|
15422
|
+
return v2.map((r3) => walkResolver(r3, resolve));
|
|
15423
|
+
if (v2?.constructor === Object) {
|
|
15424
|
+
const next = {};
|
|
15425
|
+
for (const k in v2) {
|
|
15426
|
+
if (k === "__proto__" || k === "constructor" || k === "prototype")
|
|
15427
|
+
continue;
|
|
15428
|
+
next[k] = walkResolver(v2[k], resolve, k);
|
|
15429
|
+
}
|
|
15430
|
+
return next;
|
|
15431
|
+
}
|
|
15432
|
+
return v2;
|
|
15433
|
+
}
|
|
15434
|
+
const headSymbol = "usehead";
|
|
15435
|
+
const VueResolver = (_2, value2) => {
|
|
15436
|
+
return isRef(value2) ? toValue$2(value2) : value2;
|
|
15437
|
+
};
|
|
15438
|
+
// @__NO_SIDE_EFFECTS__
|
|
15439
|
+
function injectHead() {
|
|
15440
|
+
if (hasInjectionContext()) {
|
|
15441
|
+
const instance2 = inject(headSymbol);
|
|
15442
|
+
if (instance2) {
|
|
15443
|
+
return instance2;
|
|
15444
|
+
}
|
|
15445
|
+
}
|
|
15446
|
+
throw new Error("useHead() was called without provide context, ensure you call it through the setup() function.");
|
|
15447
|
+
}
|
|
15448
|
+
function useHead$1(input, options = {}) {
|
|
15449
|
+
const head = options.head || /* @__PURE__ */ injectHead();
|
|
15450
|
+
return head.ssr ? head.push(input || {}, options) : clientUseHead(head, input, options);
|
|
15451
|
+
}
|
|
15452
|
+
function clientUseHead(head, input, options = {}) {
|
|
15453
|
+
const deactivated = ref$1(false);
|
|
15454
|
+
if (options.onRendered) {
|
|
15455
|
+
const scope = getCurrentScope();
|
|
15456
|
+
if (scope) {
|
|
15457
|
+
const _onRendered = options.onRendered;
|
|
15458
|
+
options = { ...options, onRendered: (ctx) => scope.run(() => _onRendered(ctx)) };
|
|
15459
|
+
}
|
|
15460
|
+
}
|
|
15461
|
+
let entry;
|
|
15462
|
+
watchEffect(() => {
|
|
15463
|
+
const i2 = deactivated.value ? {} : walkResolver(input, VueResolver);
|
|
15464
|
+
if (entry) {
|
|
15465
|
+
entry.patch(i2);
|
|
15466
|
+
} else {
|
|
15467
|
+
entry = head.push(i2, options);
|
|
15468
|
+
}
|
|
15469
|
+
});
|
|
15470
|
+
const vm = getCurrentInstance();
|
|
15471
|
+
if (vm) {
|
|
15472
|
+
onBeforeUnmount(() => {
|
|
15473
|
+
entry.dispose();
|
|
15474
|
+
});
|
|
15475
|
+
onDeactivated(() => {
|
|
15476
|
+
deactivated.value = true;
|
|
15477
|
+
});
|
|
15478
|
+
onActivated(() => {
|
|
15479
|
+
deactivated.value = false;
|
|
15480
|
+
});
|
|
15481
|
+
}
|
|
15482
|
+
return entry;
|
|
15483
|
+
}
|
|
15484
|
+
const UNHEAD_VUE_CONTAINER_KEY = "unhead-vue";
|
|
15485
|
+
const unheadVue = container.proxy(UNHEAD_VUE_CONTAINER_KEY);
|
|
15486
|
+
const zenithUseHead = (...args2) => {
|
|
15487
|
+
return unheadVue.useHead(...args2);
|
|
15488
|
+
};
|
|
15489
|
+
const useHead = zenithUseHead;
|
|
15415
15490
|
const emmitter = container.proxy(EmmitterService);
|
|
15416
15491
|
class LayoutService {
|
|
15417
15492
|
static __container_entry_key = "LayoutService";
|
|
@@ -63522,75 +63597,6 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
63522
63597
|
};
|
|
63523
63598
|
}
|
|
63524
63599
|
});
|
|
63525
|
-
function walkResolver(val, resolve, key) {
|
|
63526
|
-
if (key === "_resolver")
|
|
63527
|
-
return val;
|
|
63528
|
-
if (typeof val === "function" && (!key || key !== "titleTemplate" && !key.startsWith("on")))
|
|
63529
|
-
val = val();
|
|
63530
|
-
const v2 = resolve ? resolve(key, val) : val;
|
|
63531
|
-
if (Array.isArray(v2))
|
|
63532
|
-
return v2.map((r3) => walkResolver(r3, resolve));
|
|
63533
|
-
if (v2?.constructor === Object) {
|
|
63534
|
-
const next = {};
|
|
63535
|
-
for (const k in v2) {
|
|
63536
|
-
if (k === "__proto__" || k === "constructor" || k === "prototype")
|
|
63537
|
-
continue;
|
|
63538
|
-
next[k] = walkResolver(v2[k], resolve, k);
|
|
63539
|
-
}
|
|
63540
|
-
return next;
|
|
63541
|
-
}
|
|
63542
|
-
return v2;
|
|
63543
|
-
}
|
|
63544
|
-
const headSymbol = "usehead";
|
|
63545
|
-
const VueResolver = (_2, value2) => {
|
|
63546
|
-
return isRef(value2) ? toValue$2(value2) : value2;
|
|
63547
|
-
};
|
|
63548
|
-
// @__NO_SIDE_EFFECTS__
|
|
63549
|
-
function injectHead() {
|
|
63550
|
-
if (hasInjectionContext()) {
|
|
63551
|
-
const instance2 = inject(headSymbol);
|
|
63552
|
-
if (instance2) {
|
|
63553
|
-
return instance2;
|
|
63554
|
-
}
|
|
63555
|
-
}
|
|
63556
|
-
throw new Error("useHead() was called without provide context, ensure you call it through the setup() function.");
|
|
63557
|
-
}
|
|
63558
|
-
function useHead(input, options = {}) {
|
|
63559
|
-
const head = options.head || /* @__PURE__ */ injectHead();
|
|
63560
|
-
return head.ssr ? head.push(input || {}, options) : clientUseHead(head, input, options);
|
|
63561
|
-
}
|
|
63562
|
-
function clientUseHead(head, input, options = {}) {
|
|
63563
|
-
const deactivated = ref$1(false);
|
|
63564
|
-
if (options.onRendered) {
|
|
63565
|
-
const scope = getCurrentScope();
|
|
63566
|
-
if (scope) {
|
|
63567
|
-
const _onRendered = options.onRendered;
|
|
63568
|
-
options = { ...options, onRendered: (ctx) => scope.run(() => _onRendered(ctx)) };
|
|
63569
|
-
}
|
|
63570
|
-
}
|
|
63571
|
-
let entry;
|
|
63572
|
-
watchEffect(() => {
|
|
63573
|
-
const i2 = deactivated.value ? {} : walkResolver(input, VueResolver);
|
|
63574
|
-
if (entry) {
|
|
63575
|
-
entry.patch(i2);
|
|
63576
|
-
} else {
|
|
63577
|
-
entry = head.push(i2, options);
|
|
63578
|
-
}
|
|
63579
|
-
});
|
|
63580
|
-
const vm = getCurrentInstance();
|
|
63581
|
-
if (vm) {
|
|
63582
|
-
onBeforeUnmount(() => {
|
|
63583
|
-
entry.dispose();
|
|
63584
|
-
});
|
|
63585
|
-
onDeactivated(() => {
|
|
63586
|
-
deactivated.value = true;
|
|
63587
|
-
});
|
|
63588
|
-
onActivated(() => {
|
|
63589
|
-
deactivated.value = false;
|
|
63590
|
-
});
|
|
63591
|
-
}
|
|
63592
|
-
return entry;
|
|
63593
|
-
}
|
|
63594
63600
|
class MenuItem extends compose(BaseEntity) {
|
|
63595
63601
|
id;
|
|
63596
63602
|
label;
|
|
@@ -64215,7 +64221,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
64215
64221
|
}),
|
|
64216
64222
|
emits: ["update:breadcrumbs"],
|
|
64217
64223
|
setup(__props) {
|
|
64218
|
-
useHead({ bodyAttrs: { class: "admin" } });
|
|
64224
|
+
useHead$1({ bodyAttrs: { class: "admin" } });
|
|
64219
64225
|
const open = ref$1(true);
|
|
64220
64226
|
const props2 = __props;
|
|
64221
64227
|
const breadcrumbs = useModel(__props, "breadcrumbs");
|
|
@@ -65679,6 +65685,7 @@ export {
|
|
|
65679
65685
|
useFetchPagination,
|
|
65680
65686
|
useForm,
|
|
65681
65687
|
useHSL,
|
|
65688
|
+
useHead,
|
|
65682
65689
|
useHex,
|
|
65683
65690
|
useLayoutOptions,
|
|
65684
65691
|
useLoading,
|