@dyrected/vue 2.5.59 → 2.5.61
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/bridge/react-in-vue.d.ts +11 -4
- package/dist/components/DyrectedAdmin.vue.d.ts +0 -5
- package/dist/components/DyrectedRichText.vue.d.ts +12 -0
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3492 -3487
- package/package.json +4 -4
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
import { Component } from 'vue';
|
|
1
|
+
import { AppContext, Component } from 'vue';
|
|
2
2
|
import * as ReactModule from 'react';
|
|
3
3
|
/**
|
|
4
4
|
* wrapVueComponent — Higher-order component that wraps a Vue 3 component
|
|
5
5
|
* so it can be rendered within a React component tree.
|
|
6
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
|
+
*
|
|
7
13
|
* React is imported from the host dependency graph. The Nuxt adapter dedupes
|
|
8
14
|
* React resolution so custom Vue field components share the admin's React copy.
|
|
9
15
|
*/
|
|
10
|
-
export declare function wrapVueComponent(VueComp: Component): {
|
|
16
|
+
export declare function wrapVueComponent(VueComp: Component, appContext?: AppContext | null): {
|
|
11
17
|
(props: any): ReactModule.DetailedReactHTMLElement<{
|
|
12
18
|
ref: ReactModule.RefObject<HTMLDivElement | null>;
|
|
13
19
|
className: string;
|
|
@@ -19,6 +25,7 @@ export declare function wrapVueComponent(VueComp: Component): {
|
|
|
19
25
|
};
|
|
20
26
|
/**
|
|
21
27
|
* wrapComponents — Recursively wraps all components in a nested object.
|
|
22
|
-
* Useful for the `components` prop in DyrectedAdmin.
|
|
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.
|
|
23
30
|
*/
|
|
24
|
-
export declare function wrapComponents(components: any): any;
|
|
31
|
+
export declare function wrapComponents(components: any, appContext?: AppContext | null): any;
|
|
@@ -7,11 +7,6 @@ type __VLS_Props = {
|
|
|
7
7
|
siteId: string;
|
|
8
8
|
baseUrl: string;
|
|
9
9
|
};
|
|
10
|
-
/**
|
|
11
|
-
* The base path where the admin is mounted.
|
|
12
|
-
* @default "/admin"
|
|
13
|
-
*/
|
|
14
|
-
basename?: string;
|
|
15
10
|
/**
|
|
16
11
|
* Custom components to inject into the Admin UI.
|
|
17
12
|
* Can be raw Vue components; they will be automatically wrapped.
|
|
@@ -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;
|