@dyrected/vue 0.0.0-pr-18-20260828214838

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/LICENSE.md ADDED
@@ -0,0 +1,50 @@
1
+ Business Source License 1.1
2
+
3
+ Parameters
4
+
5
+ Licensor: Dyrected
6
+ Licensed Work: Dyrected
7
+ Additional Use Grant: Production use and commercial use of the Licensed Work are permitted for your own internal business operations, your own websites and applications, and client websites or applications that you build or deploy on behalf of a client, provided that you do not, without a separate commercial license from the Licensor, (a) provide the Licensed Work as a hosted or managed service to third parties, (b) embed, white-label, sublicense, or otherwise redistribute the Licensed Work as part of a multi-tenant or customer-facing SaaS, platform, or developer service, or (c) enable third parties to create, manage, or operate independent projects, sites, workspaces, or environments using the Licensed Work as a material part of the service you provide.
8
+ Change Date: 2030-05-18
9
+ Change License: Apache License 2.0
10
+
11
+ ---
12
+
13
+ Business Source License 1.1
14
+
15
+ License text copyright © 2024 MariaDB plc, All Rights Reserved.
16
+ “Business Source License” is a trademark of MariaDB plc.
17
+
18
+ ### Terms
19
+
20
+ The Licensor hereby grants you the right to copy, modify, create derivative works, redistribute, and make non-production use of the Licensed Work. The Licensor may make an Additional Use Grant, above, permitting limited production use.
21
+
22
+ Effective on the Change Date, or the fourth anniversary of the first publicly available distribution of a specific version of the Licensed Work under this License, whichever comes first, the Licensor hereby grants you rights under the terms of the Change License, and the rights granted in the paragraph above terminate.
23
+
24
+ If your use of the Licensed Work does not comply with the requirements currently in effect as described in this License, you must purchase a commercial license from the Licensor, its affiliated entities, or authorized resellers, or you must refrain from using the Licensed Work.
25
+
26
+ All copies of the original and modified Licensed Work, and derivative works of the Licensed Work, are subject to this License. This License applies separately for each version of the Licensed Work and the Change Date may vary for each version of the Licensed Work released by Licensor.
27
+
28
+ You must conspicuously display this License on each original or modified copy of the Licensed Work. If you receive the Licensed Work in original or modified form from a third party, the terms and conditions set forth in this License apply to your use of that work.
29
+
30
+ Any use of the Licensed Work in violation of this License will automatically terminate your rights under this License for the current and all other versions of the Licensed Work.
31
+
32
+ This License does not grant you any right in any trademark or logo of Licensor or its affiliates (provided that you may use a trademark or logo of Licensor as expressly required by this License).
33
+
34
+ TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND TITLE.
35
+
36
+ MariaDB hereby grants you permission to use this License’s text to license your works, and to refer to it using the trademark “Business Source License”, as long as you comply with the Covenants of Licensor below.
37
+
38
+ ### Covenants of Licensor
39
+
40
+ In consideration of the right to use this License’s text and the “Business Source License” name and trademark, Licensor covenants to MariaDB, and to all other recipients of the licensed work to be provided by Licensor:
41
+
42
+ 1. To specify as the Change License the GPL Version 2.0 or any later version, or a license that is compatible with GPL Version 2.0 or a later version, where “compatible” means that software provided under the Change License can be included in a program with software provided under GPL Version 2.0 or a later version. Licensor may specify additional Change Licenses without limitation.
43
+
44
+ 2. To either: (a) specify an additional grant of rights to use that does not impose any additional restriction on the right granted in this License, as the Additional Use Grant; or (b) insert the text “None”.
45
+
46
+ 3. Not to modify this License in any other way.
47
+
48
+ ---
49
+
50
+ The Business Source License (this document, or the “License”) is not an Open Source license. However, the Licensed Work will eventually be made available under an Open Source License, as stated in this License.
@@ -0,0 +1,31 @@
1
+ import { AppContext, Component } from 'vue';
2
+ import * as ReactModule from 'react';
3
+ /**
4
+ * wrapVueComponent — Higher-order component that wraps a Vue 3 component
5
+ * so it can be rendered within a React component tree.
6
+ *
7
+ * Rather than spinning up a full `createApp()` per rendered instance, each
8
+ * island is mounted with Vue's low-level `render()` and shares a single
9
+ * `appContext` — normally the host app's, captured by `<DyrectedAdmin>`. That
10
+ * keeps the cost of many custom fields/slots low and lets host-app plugins,
11
+ * `provide`/`inject`, Pinia, and i18n flow into custom components.
12
+ *
13
+ * React is imported from the host dependency graph. The Nuxt adapter dedupes
14
+ * React resolution so custom Vue field components share the admin's React copy.
15
+ */
16
+ export declare function wrapVueComponent(VueComp: Component, appContext?: AppContext | null): {
17
+ (props: any): ReactModule.DetailedReactHTMLElement<{
18
+ ref: ReactModule.RefObject<HTMLDivElement | null>;
19
+ className: string;
20
+ style: {
21
+ display: "contents";
22
+ };
23
+ }, HTMLDivElement>;
24
+ displayName: string;
25
+ };
26
+ /**
27
+ * wrapComponents — Recursively wraps all components in a nested object.
28
+ * Useful for the `components` prop in DyrectedAdmin. The optional `appContext`
29
+ * is threaded down so every wrapped island shares the host app's context.
30
+ */
31
+ export declare function wrapComponents(components: any, appContext?: AppContext | null): any;
@@ -0,0 +1,57 @@
1
+ import { PropType, Component } from 'vue';
2
+ export interface BlocksItem {
3
+ /** Discriminator selecting which component renders this item. */
4
+ blockType: string;
5
+ /**
6
+ * Selected presentation variant, when the block defines `variants` in its
7
+ * schema. Passed straight through to the component so it can switch layout.
8
+ */
9
+ variant?: string;
10
+ /** Optional stable id; used as the render key when present. */
11
+ id?: string;
12
+ [key: string]: unknown;
13
+ }
14
+ /**
15
+ * Blocks — renders an array of block items by `blockType`, wrapping each in a
16
+ * `DyPathScope` scoped to `${path}.${index}` so child components can call
17
+ * `useDyPath('field')` without ever writing an index or full path.
18
+ *
19
+ * Render-function component (no template/JSX) so the package needs no extra
20
+ * build tooling.
21
+ *
22
+ * @example (render function usage in a page)
23
+ * h(Blocks, { items: data.body, components: { hero: HeroBlock } })
24
+ * @example (template usage)
25
+ * <Blocks :items="data.body" :components="{ hero: HeroBlock }" />
26
+ */
27
+ export declare const Blocks: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
28
+ items: {
29
+ type: PropType<BlocksItem[]>;
30
+ required: true;
31
+ };
32
+ components: {
33
+ type: PropType<Record<string, Component>>;
34
+ required: true;
35
+ };
36
+ path: {
37
+ type: StringConstructor;
38
+ default: string;
39
+ };
40
+ }>, () => (import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
41
+ [key: string]: any;
42
+ }> | null)[], {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
43
+ items: {
44
+ type: PropType<BlocksItem[]>;
45
+ required: true;
46
+ };
47
+ components: {
48
+ type: PropType<Record<string, Component>>;
49
+ required: true;
50
+ };
51
+ path: {
52
+ type: StringConstructor;
53
+ default: string;
54
+ };
55
+ }>> & Readonly<{}>, {
56
+ path: string;
57
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * DyPathScope — a minimal wrapper component whose sole job is to own one
3
+ * `provide()` scope for the ambient base path.
4
+ *
5
+ * In Vue, `provide()` is bound to the calling component *instance*, not to a
6
+ * render position, so a single component cannot provide a distinct value per
7
+ * item in a loop. `<Blocks>` renders one `DyPathScope` per item to give each
8
+ * block its own scoped base path.
9
+ *
10
+ * Written as a render-function component (no template/JSX) so the package needs
11
+ * no extra build tooling.
12
+ */
13
+ export declare const DyPathScope: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
14
+ path: {
15
+ type: StringConstructor;
16
+ required: true;
17
+ };
18
+ }>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
19
+ [key: string]: any;
20
+ }>[] | undefined, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
21
+ path: {
22
+ type: StringConstructor;
23
+ required: true;
24
+ };
25
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,27 @@
1
+ import { AdminThemeController, AdminThemePreference, ResolvedAdminTheme } from '@dyrected/admin/public';
2
+ type __VLS_Props = {
3
+ /**
4
+ * The Dyrected configuration object.
5
+ */
6
+ config: {
7
+ apiKey: string;
8
+ siteId: string;
9
+ baseUrl: string;
10
+ };
11
+ /**
12
+ * Custom components to inject into the Admin UI.
13
+ * Can be raw Vue components; they will be automatically wrapped.
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;
24
+ };
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>;
26
+ declare const _default: typeof __VLS_export;
27
+ export default _default;
@@ -0,0 +1,17 @@
1
+ type __VLS_Props = {
2
+ /**
3
+ * The value of an `icon` field — a Lucide icon name such as
4
+ * `"ChartNoAxesCombined"` or `"BellRing"`. See https://lucide.dev/icons.
5
+ * Typed as `string` rather than the 1700+ icon-name union to avoid a TS
6
+ * "union too complex" (TS2590) blow-up in the generated declarations.
7
+ */
8
+ name?: string | null;
9
+ /**
10
+ * Icon name to render when `name` is missing or not a known icon.
11
+ * Renders nothing when omitted and `name` cannot be resolved.
12
+ */
13
+ fallback?: string;
14
+ };
15
+ 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>;
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import { Media } from '@dyrected/sdk';
2
+ type __VLS_Props = {
3
+ media: Media | string;
4
+ width?: number | string;
5
+ height?: number | string;
6
+ alt?: string;
7
+ };
8
+ 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>;
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;
@@ -0,0 +1,20 @@
1
+ import { Media } from '@dyrected/sdk';
2
+ type __VLS_Props = {
3
+ media: Media | string;
4
+ width?: number | string;
5
+ height?: number | string;
6
+ alt?: string;
7
+ };
8
+ declare var __VLS_1: {};
9
+ type __VLS_Slots = {} & {
10
+ fallback?: (props: typeof __VLS_1) => any;
11
+ };
12
+ declare const __VLS_base: 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>;
13
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
16
+ type __VLS_WithSlots<T, S> = T & {
17
+ new (): {
18
+ $slots: S;
19
+ };
20
+ };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Renders a Dyrected `richText` field value.
3
+ *
4
+ * The field stores an HTML string, so this outputs it via `v-html`. Render only
5
+ * content you trust; sanitize upstream if untrusted users can author it.
6
+ */
7
+ type __VLS_Props = {
8
+ content?: string | null;
9
+ };
10
+ 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>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
@@ -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,30 @@
1
+ import { InjectionKey } from 'vue';
2
+ /**
3
+ * Injection key carrying the ambient base path for the block/section currently
4
+ * being rendered, e.g. "body.2". `provideDyPath` sets it; `useDyPath` reads it.
5
+ * Defaults to '' (document root).
6
+ */
7
+ export declare const DY_PATH_KEY: InjectionKey<string>;
8
+ /**
9
+ * provideDyPath — set the ambient base path for the current component's
10
+ * subtree. Must be called in `setup()`. `<Blocks>` calls this for you via
11
+ * `DyPathScope`; use it directly only for a standalone section.
12
+ */
13
+ export declare function provideDyPath(path: string): void;
14
+ /**
15
+ * useDyPath — returns an attribute object annotating an element with its
16
+ * document value path, so the Dyrected live-preview editor can map a click in
17
+ * the preview back to the exact field. Spread it onto the element (render
18
+ * functions) or bind with `v-bind` in templates.
19
+ *
20
+ * Must be called in `setup()`. Authors pass only the field name relative to the
21
+ * current block; the ancestor `<Blocks>`/`provideDyPath` supplies the base path.
22
+ *
23
+ * @example (render function)
24
+ * h('h1', useDyPath('heading'), props.heading)
25
+ * @example (template)
26
+ * <h1 v-bind="useDyPath('heading')">{{ heading }}</h1>
27
+ */
28
+ export declare function useDyPath(field?: string): {
29
+ 'data-dy-path': string;
30
+ };
@@ -0,0 +1,53 @@
1
+ import { Ref, InjectionKey } from 'vue';
2
+ import { DyrectedClient, SchemaShape, RegisteredSchema } from '@dyrected/sdk';
3
+ /** A collection slug from your registered schema (or any string until types are generated). */
4
+ type CollectionSlug = keyof RegisteredSchema['collections'] & string;
5
+ /** The document type for a given collection slug. */
6
+ type CollectionDoc<K extends CollectionSlug> = RegisteredSchema['collections'][K];
7
+ /** A global slug from your registered schema. */
8
+ type GlobalSlug = keyof RegisteredSchema['globals'] & string;
9
+ /** The data type for a given global slug. */
10
+ type GlobalData<K extends GlobalSlug> = RegisteredSchema['globals'][K];
11
+ export declare const DYRECTED_CLIENT_KEY: InjectionKey<DyrectedClient>;
12
+ /**
13
+ * useDyrectedClient — Returns the injected Dyrected client.
14
+ */
15
+ export declare function useDyrectedClient<TSchema extends SchemaShape = RegisteredSchema>(): DyrectedClient<TSchema>;
16
+ /**
17
+ * provideDyrectedClient — Provides a Dyrected client to the Vue app.
18
+ */
19
+ export declare function provideDyrectedClient(client: DyrectedClient): {
20
+ [x: number]: DyrectedClient<import('@dyrected/sdk').BaseSchema>;
21
+ };
22
+ export interface UseDyrectedOptions {
23
+ depth?: number;
24
+ [key: string]: any;
25
+ }
26
+ /**
27
+ * useDyrected — Reactive composable for fetching a single document.
28
+ */
29
+ export declare function useDyrected<K extends CollectionSlug, T = CollectionDoc<K>>(collection: K, idOrSlug: string, options?: UseDyrectedOptions): {
30
+ doc: Ref<T | null, T | null>;
31
+ pending: Ref<boolean, boolean>;
32
+ error: Ref<any, any>;
33
+ refresh: () => Promise<void>;
34
+ };
35
+ /**
36
+ * useDyrectedCollection — Reactive composable for fetching a collection.
37
+ */
38
+ export declare function useDyrectedCollection<K extends CollectionSlug, T = CollectionDoc<K>>(collection: K, options?: UseDyrectedOptions): {
39
+ docs: Ref<T[], T[]>;
40
+ pending: Ref<boolean, boolean>;
41
+ error: Ref<any, any>;
42
+ refresh: () => Promise<void>;
43
+ };
44
+ /**
45
+ * useDyrectedGlobal — Reactive composable for fetching a global.
46
+ */
47
+ export declare function useDyrectedGlobal<K extends GlobalSlug, T = GlobalData<K>>(slug: K, options?: UseDyrectedOptions): {
48
+ data: Ref<T | null, T | null>;
49
+ pending: Ref<boolean, boolean>;
50
+ error: Ref<any, any>;
51
+ refresh: () => Promise<void>;
52
+ };
53
+ export {};
@@ -0,0 +1,32 @@
1
+ import { Ref } from 'vue';
2
+ import { DyrectedClient } from '@dyrected/sdk';
3
+ export interface DyrectedAuthUser {
4
+ id: string;
5
+ email: string;
6
+ [key: string]: any;
7
+ }
8
+ export interface UseDyrectedAuthOptions {
9
+ baseUrl: string;
10
+ apiKey: string;
11
+ siteId?: string;
12
+ /**
13
+ * Optional token storage. Defaults to localStorage.
14
+ */
15
+ storage?: {
16
+ getItem: (key: string) => string | null;
17
+ setItem: (key: string, value: string) => void;
18
+ removeItem: (key: string) => void;
19
+ };
20
+ }
21
+ /**
22
+ * useDyrectedAuth — Generic Vue composable for auth collections.
23
+ */
24
+ export declare function useDyrectedAuth(collection: string, options: UseDyrectedAuthOptions): {
25
+ user: Ref<DyrectedAuthUser | null, DyrectedAuthUser | null>;
26
+ isLoggedIn: import('vue').ComputedRef<boolean>;
27
+ token: Ref<string | null, string | null>;
28
+ login: (email: string, password: string) => Promise<DyrectedAuthUser>;
29
+ logout: () => Promise<void>;
30
+ fetchMe: () => Promise<DyrectedAuthUser | null>;
31
+ client: DyrectedClient<import('@dyrected/sdk').BaseSchema>;
32
+ };
@@ -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,24 @@
1
+ import { Ref } from 'vue';
2
+ export interface LivePreviewOptions<T> {
3
+ /**
4
+ * The initial data to show before any postMessage arrives.
5
+ */
6
+ initialData: T;
7
+ /**
8
+ * The origin of the Dyrected Admin UI that will send preview messages.
9
+ * Defaults to '*' (accepts from any origin).
10
+ */
11
+ serverURL?: string;
12
+ }
13
+ /**
14
+ * useLivePreview — Vue composable for Dyrected live preview (postMessage mode).
15
+ *
16
+ * Listen for postMessage events from the Admin UI and update data reactively.
17
+ * Supports inline edit mode: when the Admin sends 'dyrected-enter-edit-mode',
18
+ * elements with data-dy-path become clickable so the Admin sidebar scrolls to
19
+ * the matching field.
20
+ */
21
+ export declare function useLivePreview<T = any>(options: LivePreviewOptions<T>): {
22
+ data: Ref<T>;
23
+ isLive: Ref<boolean>;
24
+ };
@@ -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>;