@dyrected/vue 2.6.1 → 2.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/DyrectedAdmin.vue.d.ts +9 -0
- package/dist/composables/useAddMediaFromUrl.d.ts +9 -0
- package/dist/composables/useAdminSchemas.d.ts +12 -0
- package/dist/composables/useAdminTheme.d.ts +22 -0
- package/dist/composables/useDyrectedForm.d.ts +34 -0
- package/dist/composables/useField.d.ts +9 -0
- package/dist/composables/useMediaLibrary.d.ts +10 -0
- package/dist/composables/useMediaURL.d.ts +10 -0
- package/dist/composables/useMediaUpload.d.ts +10 -0
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.js +3794 -3492
- package/package.json +4 -4
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AdminThemeController, AdminThemePreference, ResolvedAdminTheme } from '@dyrected/admin';
|
|
1
2
|
type __VLS_Props = {
|
|
2
3
|
/**
|
|
3
4
|
* The Dyrected configuration object.
|
|
@@ -12,6 +13,14 @@ type __VLS_Props = {
|
|
|
12
13
|
* Can be raw Vue components; they will be automatically wrapped.
|
|
13
14
|
*/
|
|
14
15
|
components?: any;
|
|
16
|
+
/** Optional externally managed admin theme controller. */
|
|
17
|
+
themeController?: AdminThemeController;
|
|
18
|
+
/** Preferred theme when the wrapper should control the admin theme. */
|
|
19
|
+
theme?: AdminThemePreference;
|
|
20
|
+
/** Current resolved system theme when the wrapper should control the admin theme. */
|
|
21
|
+
systemTheme?: ResolvedAdminTheme;
|
|
22
|
+
/** Called when the admin UI changes the preferred theme. */
|
|
23
|
+
onThemeChange?: (theme: AdminThemePreference) => void;
|
|
15
24
|
};
|
|
16
25
|
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
17
26
|
declare const _default: typeof __VLS_export;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { UseMediaURLOptions } from './useMediaURL';
|
|
2
|
+
export interface UseAddMediaFromUrlOptions extends UseMediaURLOptions {
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* Backwards-compatible alias for `useMediaURL`.
|
|
6
|
+
*
|
|
7
|
+
* Prefer `useMediaURL` for new code.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useAddMediaFromUrl(options: UseAddMediaFromUrlOptions): import('./useAdminSchemas').VueStateify<import('@dyrected/admin/public').MediaURLHookResult>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AdminSchemasResult } from '@dyrected/admin/public';
|
|
2
|
+
export type VueStateify<T> = {
|
|
3
|
+
[K in keyof T]: T[K] extends (...args: any[]) => any ? T[K] : Readonly<import('vue').Ref<T[K]>>;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Loads the admin schema registry for the current Dyrected client.
|
|
7
|
+
*
|
|
8
|
+
* Most apps will use higher-level composables like `useMediaUpload` instead of
|
|
9
|
+
* calling this directly. It exists as the schema-aware foundation for custom
|
|
10
|
+
* Vue admin UI.
|
|
11
|
+
*/
|
|
12
|
+
export declare function useAdminSchemas(): VueStateify<AdminSchemasResult>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { InjectionKey } from 'vue';
|
|
2
|
+
import { AdminThemeHookResult, AdminThemeController, AdminThemeControllerOptions } from '@dyrected/admin/public';
|
|
3
|
+
import { VueStateify } from './useAdminSchemas';
|
|
4
|
+
export interface ProvideAdminThemeOptions extends AdminThemeControllerOptions {
|
|
5
|
+
/** Use an existing theme controller instead of creating one. */
|
|
6
|
+
controller?: AdminThemeController;
|
|
7
|
+
}
|
|
8
|
+
export declare const ADMIN_THEME_CONTROLLER_KEY: InjectionKey<AdminThemeController>;
|
|
9
|
+
/**
|
|
10
|
+
* Creates or provides an admin theme controller to the current Vue subtree.
|
|
11
|
+
*
|
|
12
|
+
* This is the recommended entry point when you want theme state to be shared by
|
|
13
|
+
* a custom Vue admin surface.
|
|
14
|
+
*/
|
|
15
|
+
export declare function provideAdminTheme(options?: ProvideAdminThemeOptions): AdminThemeController;
|
|
16
|
+
/**
|
|
17
|
+
* Vue composable for reading and mutating Dyrected admin theme state.
|
|
18
|
+
*
|
|
19
|
+
* When no provider is present, it falls back to a local system-theme-derived
|
|
20
|
+
* read-only state so components can still render consistently.
|
|
21
|
+
*/
|
|
22
|
+
export declare function useAdminTheme(): VueStateify<AdminThemeHookResult>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { InjectionKey } from 'vue';
|
|
2
|
+
import { DyrectedFormController, DyrectedFormHookResult } from '@dyrected/admin/public';
|
|
3
|
+
import { VueStateify } from './useAdminSchemas';
|
|
4
|
+
export declare const DYRECTED_FORM_CONTROLLER_KEY: InjectionKey<DyrectedFormController>;
|
|
5
|
+
export declare const DYRECTED_FIELD_PATH_KEY: InjectionKey<string | null>;
|
|
6
|
+
/**
|
|
7
|
+
* Provides a Dyrected form controller to the current Vue component subtree.
|
|
8
|
+
*
|
|
9
|
+
* Call this once near the root of a custom form implementation, then use
|
|
10
|
+
* `useDyrectedForm()` and `useField()` lower in the tree.
|
|
11
|
+
*/
|
|
12
|
+
export declare function provideDyrectedForm(controller: DyrectedFormController): DyrectedFormController;
|
|
13
|
+
/**
|
|
14
|
+
* Provides the ambient field path for descendant `useField()` calls.
|
|
15
|
+
*
|
|
16
|
+
* This is useful when building nested field components that should resolve
|
|
17
|
+
* child paths relative to a parent object, array item, or block.
|
|
18
|
+
*/
|
|
19
|
+
export declare function provideDyrectedFieldPath(path: string): void;
|
|
20
|
+
/**
|
|
21
|
+
* Returns the current Dyrected form controller from Vue injection context.
|
|
22
|
+
*/
|
|
23
|
+
export declare function useDyrectedFormController(): DyrectedFormController;
|
|
24
|
+
/**
|
|
25
|
+
* Returns the current ambient field path from Vue injection context.
|
|
26
|
+
*/
|
|
27
|
+
export declare function useDyrectedFieldPath(): string | null;
|
|
28
|
+
/**
|
|
29
|
+
* Vue composable for reading and mutating Dyrected form state.
|
|
30
|
+
*
|
|
31
|
+
* Use this inside custom form shells, field containers, or document editors
|
|
32
|
+
* that are backed by a provided `DyrectedFormController`.
|
|
33
|
+
*/
|
|
34
|
+
export declare function useDyrectedForm(): VueStateify<DyrectedFormHookResult>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DyrectedFieldHookResult } from '@dyrected/admin/public';
|
|
2
|
+
import { VueStateify } from './useAdminSchemas';
|
|
3
|
+
/**
|
|
4
|
+
* Vue composable for interacting with a single Dyrected field.
|
|
5
|
+
*
|
|
6
|
+
* Pass a full field path directly, or rely on `provideDyrectedFieldPath()` to
|
|
7
|
+
* resolve paths relative to the current nested field scope.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useField(path?: string): VueStateify<DyrectedFieldHookResult>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MediaLibraryHookOptions, MediaLibraryHookResult } from '@dyrected/admin/public';
|
|
2
|
+
import { VueStateify } from './useAdminSchemas';
|
|
3
|
+
export type UseMediaLibraryOptions = MediaLibraryHookOptions;
|
|
4
|
+
/**
|
|
5
|
+
* Vue composable for browsing and selecting media from the Dyrected media library.
|
|
6
|
+
*
|
|
7
|
+
* It exposes reactive pagination, search, selection, and loading state so host
|
|
8
|
+
* apps can build their own picker UI without reimplementing library behavior.
|
|
9
|
+
*/
|
|
10
|
+
export declare function useMediaLibrary({ collection, pageSize, initialSearchQuery, initialSelectedIds, }: UseMediaLibraryOptions): VueStateify<MediaLibraryHookResult>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MediaURLHookOptions, MediaURLHookResult } from '@dyrected/admin/public';
|
|
2
|
+
import { VueStateify } from './useAdminSchemas';
|
|
3
|
+
export type UseMediaURLOptions = MediaURLHookOptions;
|
|
4
|
+
/**
|
|
5
|
+
* Vue composable for Dyrected's URL-based media ingestion flow.
|
|
6
|
+
*
|
|
7
|
+
* It classifies external URLs and routes them through the same shared media
|
|
8
|
+
* ingestion behavior used by the admin app.
|
|
9
|
+
*/
|
|
10
|
+
export declare function useMediaURL({ collection, compressImages, maxDimension, quality, onAdded, onError, }: UseMediaURLOptions): VueStateify<MediaURLHookResult>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MediaUploadHookOptions, MediaUploadHookResult } from '@dyrected/admin/public';
|
|
2
|
+
import { VueStateify } from './useAdminSchemas';
|
|
3
|
+
export type UseMediaUploadOptions = MediaUploadHookOptions;
|
|
4
|
+
/**
|
|
5
|
+
* Vue composable for Dyrected's shared media upload pipeline.
|
|
6
|
+
*
|
|
7
|
+
* Use this to build a custom upload UI while reusing the admin app's queueing,
|
|
8
|
+
* image compression, progress tracking, and collection resolution behavior.
|
|
9
|
+
*/
|
|
10
|
+
export declare function useMediaUpload({ collectionSlug, compressImages, maxDimension, quality, onCompletedItem, onAllCompleted, onError, }?: UseMediaUploadOptions): VueStateify<MediaUploadHookResult>;
|